{"action":"created","comment":{"url":"https://api.github.com/repos/swagger-api/swagger-parser/pulls/comments/120962428","pull_request_review_id":42965983,"id":120962428,"diff_hunk":"@@ -1,23 +1,2081 @@\n package io.swagger.parser.v3.util;\n \n import com.fasterxml.jackson.databind.JsonNode;\n+import com.fasterxml.jackson.databind.node.ArrayNode;\n+import com.fasterxml.jackson.databind.node.JsonNodeType;\n+import com.fasterxml.jackson.databind.node.ObjectNode;\n+import com.fasterxml.jackson.databind.node.TextNode;\n+import io.swagger.oas.models.Components;\n+import io.swagger.oas.models.ExternalDocumentation;\n+import io.swagger.oas.models.OpenAPI;\n+import io.swagger.oas.models.Operation;\n+import io.swagger.oas.models.PathItem;\n+import io.swagger.oas.models.Paths;\n+import io.swagger.oas.models.callbacks.Callback;\n+import io.swagger.oas.models.callbacks.Callbacks;\n+import io.swagger.oas.models.examples.Example;\n+import io.swagger.oas.models.links.Link;\n+import io.swagger.oas.models.info.Contact;\n+import io.swagger.oas.models.info.Info;\n+import io.swagger.oas.models.media.AllOfSchema;\n+import io.swagger.oas.models.media.AnyOfSchema;\n+import io.swagger.oas.models.media.ArraySchema;\n+import io.swagger.oas.models.media.Content;\n+import io.swagger.oas.models.media.Encoding;\n+import io.swagger.oas.models.media.MediaType;\n+import io.swagger.oas.models.media.OneOfSchema;\n+import io.swagger.oas.models.media.Schema;\n+import io.swagger.oas.models.media.XML;\n+import io.swagger.oas.models.security.OAuthFlow;\n+import io.swagger.oas.models.security.OAuthFlows;\n+import io.swagger.oas.models.security.Scopes;\n+import io.swagger.oas.models.security.SecurityScheme;\n+import io.swagger.oas.models.tags.Tag;\n+import io.swagger.oas.models.info.License;\n+import io.swagger.oas.models.media.EncodingProperty;\n+import io.swagger.oas.models.headers.Header;\n+import io.swagger.oas.models.parameters.CookieParameter;\n+import io.swagger.oas.models.parameters.HeaderParameter;\n+import io.swagger.oas.models.parameters.Parameter;\n+import io.swagger.oas.models.parameters.PathParameter;\n+import io.swagger.oas.models.parameters.QueryParameter;\n+import io.swagger.oas.models.parameters.RequestBody;\n+import io.swagger.oas.models.responses.ApiResponse;\n+import io.swagger.oas.models.responses.ApiResponses;\n+import io.swagger.oas.models.security.SecurityRequirement;\n+import io.swagger.oas.models.servers.Server;\n+import io.swagger.oas.models.servers.ServerVariable;\n+import io.swagger.oas.models.servers.ServerVariables;\n import io.swagger.oas.models.OpenAPI;\n import io.swagger.parser.models.SwaggerParseResult;\n-import io.swagger.parser.v3.ObjectMapperFactory;\n-\n+import io.swagger.util.Json;\n+import org.apache.commons.lang3.StringUtils;\n+import java.math.BigDecimal;\n+import java.util.ArrayList;\n import java.util.Arrays;\n+import java.util.Iterator;\n+import java.util.LinkedHashMap;\n+import java.util.LinkedHashSet;\n+import java.util.List;\n+import java.util.Map;\n+import java.util.Set;\n+\n \n public class OpenAPIDeserializer {\n+\n+    protected static Set<String> ROOT_KEYS = new LinkedHashSet<>(Arrays.asList(\"openapi\", \"info\", \"host\", \"paths\", \"parameters\", \"responses\", \"security\", \"tags\", \"externalDocs\"));\n+    protected static Set<String> INFO_KEYS = new LinkedHashSet<>(Arrays.asList(\"title\", \"description\", \"termsOfService\", \"contact\", \"license\", \"version\"));\n+    protected static Set<String> CONTACT_KEYS = new LinkedHashSet<>(Arrays.asList(\"name\", \"url\", \"email\"));\n+    protected static Set<String> LICENSE_KEYS = new LinkedHashSet<>(Arrays.asList(\"name\", \"url\"));\n+    protected static Set<String> OPERATION_KEYS = new LinkedHashSet<>(Arrays.asList(\"scheme\", \"tags\", \"summary\", \"description\", \"externalDocs\", \"operationId\", \"parameters\", \"responses\", \"schemes\", \"deprecated\", \"security\"));\n+    protected static Set<String> PATH_KEYS = new LinkedHashSet<>(Arrays.asList(\"$ref\", \"get\", \"put\", \"post\", \"delete\", \"head\", \"patch\", \"options\", \"parameters\"));\n+    protected static Set<String> EXTERNAL_DOCS_KEYS = new LinkedHashSet<>(Arrays.asList(\"description\", \"url\"));\n+    protected static Set<String> RESPONSE_KEYS = new LinkedHashSet<>(Arrays.asList(\"description\", \"schema\", \"headers\", \"examples\"));\n+    private static final String QUERY_PARAMETER = \"query\";\n+    private static final String COOKIE_PARAMETER = \"cookie\";\n+    private static final String PATH_PARAMETER = \"path\";\n+    private static final String HEADER_PARAMETER = \"header\";\n+\n     public SwaggerParseResult deserialize(JsonNode rootNode) {\n         SwaggerParseResult result = new SwaggerParseResult();\n         try {\n-            // TODO\n-            OpenAPI api = ObjectMapperFactory.createJson().convertValue(rootNode, OpenAPI.class);\n+            ParseResult rootParse = new ParseResult();\n+            OpenAPI api = parseRoot(rootNode, rootParse);\n             result.setOpenAPI(api);\n-        }\n-        catch (Exception e) {\n+            result.setMessages(rootParse.getMessages());\n+        } catch (Exception e) {\n             result.setMessages(Arrays.asList(e.getMessage()));\n+\n         }\n         return result;\n     }\n+\n+    public OpenAPI parseRoot(JsonNode node, ParseResult result) {\n+        String location = \"\";\n+        OpenAPI openAPI = new OpenAPI();\n+        if (node.getNodeType().equals(JsonNodeType.OBJECT)) {\n+            ObjectNode rootNode = (ObjectNode) node;\n+\n+            // required\n+            String value = getString(\"openapi\", rootNode, true, location, result);\n+\n+            // we don't even try if the version isn't there\n+            if(value == null || !value.startsWith(\"3.0\")) {\n+                return null;\n+            }\n+            openAPI.setOpenapi(value);\n+\n+            ObjectNode obj = getObject(\"info\", rootNode, true, \"\", result);\n+            if (obj != null) {\n+                Info info = getInfo(obj, \"info\", result);\n+                openAPI.setInfo(info);\n+            }\n+\n+            obj = getObject(\"paths\", rootNode, true, location, result);\n+            if (obj != null) {\n+                Paths paths = getPaths(obj, \"paths\", result);\n+                openAPI.setPaths(paths);\n+            }\n+\n+            obj = getObject(\"components\", rootNode, true, location, result);\n+            if (obj != null) {\n+                Components components = getComponents(obj, \"components\", result);\n+                openAPI.setComponents(components);\n+            }\n+\n+            ArrayNode array = getArray(\"servers\", rootNode, false, location, result);\n+            if (array != null) {\n+                openAPI.setServers(getServersList(array, location, result));\n+            }\n+\n+            obj = getObject(\"externalDocs\", rootNode, false, location, result);\n+            if (obj != null) {\n+                ExternalDocumentation externalDocs = getExternalDocs(obj, \"externalDocs\", result);\n+                openAPI.setExternalDocs(externalDocs);\n+            }\n+\n+            array = getArray(\"tags\", rootNode, false, location, result);\n+            if (array != null) {\n+                openAPI.setTags(getTagList(array, location, result));\n+            }\n+\n+            array = getArray(\"security\", rootNode, false, location, result);\n+            if (array != null) {\n+                openAPI.setSecurity(getSecurityRequirementsList(array, \"security\", result));\n+            }\n+            openAPI.setExtensions(new LinkedHashMap<>());\n+\n+            Set<String> keys = getKeys(rootNode);\n+            for(String key : keys) {\n+                if(key.startsWith(\"x-\")) {\n+                    openAPI.getExtensions().put(key, Json.mapper().convertValue(rootNode.get(key), Object.class));\n+                }\n+                else if(!ROOT_KEYS.contains(key)) {\n+                    result.extra(location, key, rootNode.get(key));\n+                }\n+            }\n+\n+        } else {\n+            result.invalidType(\"\", \"\", \"object\", node);\n+            result.invalid();\n+            return null;\n+        }\n+\n+\n+        return openAPI;\n+    }\n+\n+    public Components getComponents(ObjectNode obj, String location, ParseResult result) {\n+        if (obj == null) {\n+            return null;\n+        }\n+        Components components = new Components();\n+\n+        ObjectNode node = getObject(\"schemas\",obj,false,location,result);\n+        if(node != null) {\n+            components.setSchemas(getSchemas(node,location,result));\n+        }\n+\n+        node = getObject(\"responses\",obj,false,location,result);\n+        if(node != null) {\n+            components.setResponses(getResponses(node,location,result));\n+        }\n+\n+        node = getObject(\"parameters\",obj,false,location,result);\n+        if(node != null) {\n+            components.setParameters(getParameters(node,location,result));\n+        }\n+        node = getObject(\"examples\",obj,false,location,result);\n+        if(node != null) {\n+            components.setExamples(getExamples(node,location,result));\n+        }\n+\n+        node = getObject(\"requestBodies\",obj,false,location,result);\n+        if(node != null) {\n+            components.setRequestBodies(getRequestBodies(node,location,result));\n+        }\n+\n+        node = getObject(\"headers\",obj,false,location,result);\n+        if(node != null) {\n+            components.setHeaders(getHeaders(node,location,result));\n+        }\n+\n+        node = getObject(\"securitySchemes\",obj,false,location,result);\n+        if(node != null) {\n+            components.setSecuritySchemes(getSecuritySchemes(node,location,result));\n+        }\n+\n+        node = getObject(\"links\",obj,false,location,result);\n+        if(node != null) {\n+            components.setLinks(getLinks(node,location,result));\n+        }\n+\n+        node = getObject(\"callbacks\",obj,false,location,result);\n+        if(node != null) {\n+            components.setCallbacks(getCallbacks(node,location,result));\n+        }\n+        components.setExtensions(new LinkedHashMap<>());\n+\n+        Set<String> keys = getKeys(obj);\n+        for(String key : keys) {\n+            if(key.startsWith(\"x-\")) {\n+                components.getExtensions().put(key, Json.mapper().convertValue(obj.get(key), Object.class));\n+            }\n+        }\n+\n+        return  components;\n+    }\n+\n+    public List<Tag> getTagList(ArrayNode obj, String location, ParseResult result) {\n+        if (obj == null) {\n+            return null;\n+        }\n+        List<Tag> tags = new ArrayList<>();\n+        for (JsonNode item : obj) {\n+            if (item.getNodeType().equals(JsonNodeType.OBJECT)) {\n+                Tag tag = getTag((ObjectNode) item, location, result);\n+                if (tag != null) {\n+                    tags.add(tag);\n+                }\n+            }\n+        }\n+        return tags;\n+    }\n+\n+    public Tag getTag(ObjectNode obj, String location, ParseResult result) {\n+        if (obj == null) {\n+            return null;\n+        }\n+\n+        Tag tag = new Tag();\n+\n+        String value = getString(\"name\", obj, true, location, result);\n+        tag.setName(value);\n+\n+        value = getString(\"description\", obj, false, location, result);\n+        tag.setDescription(value);\n+\n+        Set<String> tagKeys = getKeys(obj);\n+        for (String tagName : tagKeys) {\n+            JsonNode tagValue = obj.get(tagName);\n+            if (!tagValue.getNodeType().equals(JsonNodeType.OBJECT)) {\n+                result.invalidType(location, tagName, \"object\", tagValue);\n+            } else {\n+                ObjectNode tagObj = (ObjectNode) tagValue;\n+                ExternalDocumentation externalDocs = getExternalDocs(tagObj, String.format(\"%s.%s'\", location, tagName), result);\n+                tag.setExternalDocs(externalDocs);\n+            }\n+        }\n+\n+\n+        return tag;\n+    }\n+\n+\n+\n+    public List<Server> getServersList(ArrayNode obj, String location, ParseResult result) {\n+\n+        List<Server> servers = new ArrayList<>();\n+        if (obj == null) {\n+            return null;\n+\n+        }\n+        for (JsonNode item : obj) {\n+            if (item.getNodeType().equals(JsonNodeType.OBJECT)) {\n+                Server server = getServer((ObjectNode) item, location, result);\n+                if (server != null) {\n+                    servers.add(server);\n+                }\n+            }\n+        }\n+        return servers;\n+    }\n+\n+    public Server getServer(ObjectNode obj, String location, ParseResult result) {\n+        if (obj == null) {\n+            return null;\n+        }\n+\n+        Server server = new Server();\n+\n+        String value = getString(\"url\", obj, true, location, result);\n+        server.setUrl(value);\n+\n+        value = getString(\"description\", obj, false, location, result);\n+        server.setDescription(value);\n+\n+        server.setVariables(getServerVariables(obj,location,result));\n+\n+        server.setExtensions(new LinkedHashMap<>());\n+\n+        Set<String> keys = getKeys(obj);\n+        for(String key : keys) {\n+            if(key.startsWith(\"x-\")) {\n+                server.getExtensions().put(key, Json.mapper().convertValue(obj.get(key), Object.class));\n+            }\n+        }\n+\n+\n+        return server;\n+    }\n+\n+    public ServerVariables getServerVariables(ObjectNode obj, String location, ParseResult result){\n+        ServerVariables serverVariables = new ServerVariables();\n+        if (obj == null) {\n+            return null;\n+        }\n+\n+        Set<String> serverKeys = getKeys(obj);\n+        for (String serverName : serverKeys) {\n+            JsonNode serverValue = obj.get(serverName);\n+            if (!serverValue.getNodeType().equals(JsonNodeType.OBJECT)) {\n+                result.invalidType(location, serverName, \"object\", serverValue);\n+            } else {\n+                ObjectNode server = (ObjectNode) serverValue;\n+                serverVariables = getServerVariable(server, String.format(\"%s.%s'\", location, serverName), result);\n+            }\n+        }\n+\n+        return serverVariables;\n+    }\n+\n+    public ServerVariables getServerVariable(ObjectNode obj, String location, ParseResult result){\n+        if(obj == null){\n+            return null;\n+        }\n+        final ServerVariables serverVariables = new ServerVariables();\n+        ServerVariable serverVariable = null;\n+\n+        Set<String> variableKeys = getKeys(obj);\n+        for (String variableName : variableKeys) {\n+            JsonNode variableValue = obj.get(variableName);\n+            if (!variableValue.getNodeType().equals(JsonNodeType.OBJECT)) {\n+                result.invalidType(location, variableName, \"object\", variableValue);\n+            } else {\n+                serverVariable = new ServerVariable();\n+                ObjectNode objNode = getObject(variableName, obj, false, location, result);\n+\n+                ArrayNode an = getArray(\"enum\",objNode,false,location,result);\n+                if (an != null) {\n+                    List<String> _enum = new ArrayList<>();\n+                    for(JsonNode n : an) {\n+                        if(n.isValueNode()) {\n+                            _enum.add(n.asText());\n+                            serverVariable.setEnum(_enum);\n+                        }\n+                        else {\n+                            result.invalidType(location, \"enum\", \"value\", n);\n+                        }\n+                    }\n+                }\n+                String value = getString(\"default\", objNode, true, String.format(\"%s.%s'\", location, variableName), result);\n+                serverVariable.setDefault(value);\n+\n+                value = getString(\"description\", objNode, false, String.format(\"%s.%s'\", location, variableName), result);\n+                serverVariable.setDescription(value);\n+\n+\n+                serverVariable.setExtensions(new LinkedHashMap<>());\n+\n+                Set<String> keys = getKeys(objNode);\n+                for(String key : keys) {\n+                    if(key.startsWith(\"x-\")) {\n+                        serverVariable.getExtensions().put(key, Json.mapper().convertValue(objNode.get(key), Object.class));\n+                    }\n+                }\n+                serverVariables.addServerVariable(variableName,serverVariable);\n+            }\n+        }\n+        return serverVariables;\n+    }\n+\n+    //PathsObject\n+\n+    public Paths getPaths(ObjectNode obj, String location, ParseResult result) {\n+        final Paths paths = new Paths();\n+        if (obj == null) {\n+            return null;\n+        }\n+        Set<String> pathKeys = getKeys(obj);\n+        for (String pathName : pathKeys) {\n+            JsonNode pathValue = obj.get(pathName);\n+            if (!pathValue.getNodeType().equals(JsonNodeType.OBJECT)) {\n+                result.invalidType(location, pathName, \"object\", pathValue);\n+            } else {\n+                ObjectNode path = (ObjectNode) pathValue;\n+                PathItem pathObj = getPathItem(path, String.format(\"%s.%s'\", location, pathName), result);\n+                paths.put(pathName, pathObj);\n+\n+            }\n+        }\n+        return paths;\n+    }\n+\n+    public PathItem getPathItem(ObjectNode obj, String location, ParseResult result) {\n+\n+\n+        PathItem pathItem = new PathItem();\n+\n+        if (obj.get(\"$ref\") != null) {\n+            JsonNode ref = obj.get(\"$ref\");\n+\n+            if (ref.getNodeType().equals(JsonNodeType.STRING)) {\n+                pathItem.set$ref(ref.asText());\n+                return pathItem.ref(ref.asText());\n+            } else if (ref.getNodeType().equals(JsonNodeType.OBJECT)) {\n+                ObjectNode node = (ObjectNode) ref;\n+\n+                // extra keys\n+                Set<String> keys = getKeys(node);\n+                for (String key : keys) {\n+                    result.extra(location, key, node.get(key));\n+                }\n+            }\n+            return null;\n+        }\n+\n+        String value = getString(\"summary\", obj, true, location, result);\n+        pathItem.setSummary(value);\n+\n+        value = getString(\"description\", obj, false, location, result);\n+        pathItem.setDescription(value);\n+\n+        ArrayNode parameters = getArray(\"parameters\", obj, false, location, result);\n+        pathItem.setParameters(getParameterList(parameters, location, result));\n+\n+        ArrayNode servers = getArray(\"servers\", obj, false, location, result);\n+        pathItem.setServers(getServersList(servers, location, result));\n+\n+        ObjectNode node = getObject(\"get\", obj, false, location, result);\n+        if (node != null) {\n+            Operation operation = getOperation(node, location + \"(get)\", result);\n+            if (operation != null) {\n+                pathItem.setGet(operation);\n+            }\n+        }\n+        node = getObject(\"put\", obj, false, location, result);\n+        if (node != null) {\n+            Operation operation = getOperation(node, location + \"(put)\", result);\n+            if (operation != null) {\n+                pathItem.setPut(operation);\n+            }\n+        }\n+        node = getObject(\"post\", obj, false, location, result);\n+        if (node != null) {\n+            Operation operation = getOperation(node, location + \"(post)\", result);\n+            if (operation != null) {\n+                pathItem.setPost(operation);\n+            }\n+        }\n+        node = getObject(\"head\", obj, false, location, result);\n+        if (node != null) {\n+            Operation operation = getOperation(node, location + \"(head)\", result);\n+            if (operation != null) {\n+                pathItem.setHead(operation);\n+            }\n+        }\n+        node = getObject(\"delete\", obj, false, location, result);\n+        if (node != null) {\n+            Operation operation = getOperation(node, location + \"(delete)\", result);\n+            if (operation != null) {\n+                pathItem.setDelete(operation);\n+            }\n+        }\n+        node = getObject(\"patch\", obj, false, location, result);\n+        if (node != null) {\n+            Operation operation = getOperation(node, location + \"(patch)\", result);\n+            if (operation != null) {\n+                pathItem.setPatch(operation);\n+            }\n+        }\n+        node = getObject(\"options\", obj, false, location, result);\n+        if (node != null) {\n+            Operation operation = getOperation(node, location + \"(options)\", result);\n+            if (operation != null) {\n+                pathItem.setOptions(operation);\n+            }\n+        }\n+\n+        pathItem.setExtensions(new LinkedHashMap<>());\n+        Set<String> keys = getKeys(obj);\n+        for (String key : keys) {\n+            if (key.startsWith(\"x-\")) {\n+                pathItem.getExtensions().put(key, Json.mapper().convertValue(obj.get(key), Object.class));\n+            } else if (!PATH_KEYS.contains(key)) {\n+                result.extra(location, key, obj.get(key));\n+            }\n+        }\n+        return pathItem;\n+    }\n+\n+\n+    public ExternalDocumentation getExternalDocs(ObjectNode node, String location, ParseResult result) {\n+        ExternalDocumentation externalDocs = null;\n+\n+        if (node != null) {\n+            externalDocs = new ExternalDocumentation();\n+            Set<String> keys = getKeys(node);\n+\n+            String value = getString(\"description\", node, false, location, result);\n+            externalDocs.description(value);\n+\n+            value = getString(\"url\", node, true, location, result);\n+            externalDocs.url(value);\n+\n+            externalDocs.setExtensions(new LinkedHashMap<>());\n+\n+            for (String key : keys) {\n+                if (key.startsWith(\"x-\")) {\n+                    externalDocs.getExtensions().put(key, Json.mapper().convertValue(node.get(key), Object.class));\n+                } else if (!EXTERNAL_DOCS_KEYS.contains(key)) {\n+                    result.extra(location + \".externalDocs\", key, node.get(key));\n+                }\n+            }\n+        }\n+\n+        return externalDocs;\n+    }\n+\n+\n+    public String getString(String key, ObjectNode node, boolean required, String location, ParseResult result) {\n+        String value = null;\n+        JsonNode v = node.get(key);\n+        if (node == null || v == null) {\n+            if (required) {\n+                result.missing(location, key);\n+                result.invalid();\n+            }\n+        } else if (!v.isValueNode()) {\n+            result.invalidType(location, key, \"string\", node);\n+        } else {\n+            value = v.asText();\n+        }\n+        return value;\n+    }\n+\n+    public Set<String> getKeys(ObjectNode node) {\n+        Set<String> keys = new LinkedHashSet<>();\n+        if (node == null) {\n+            return keys;\n+        }\n+\n+        Iterator<String> it = node.fieldNames();\n+        while (it.hasNext()) {\n+            keys.add(it.next());\n+        }\n+\n+        return keys;\n+    }\n+\n+\n+    public ObjectNode getObject(String key, ObjectNode node, boolean required, String location, ParseResult result) {\n+        JsonNode value = node.get(key);\n+        ObjectNode object = null;\n+        if (value == null) {\n+            if (required) {\n+                result.missing(location, key);\n+                result.invalid();\n+            }\n+        } else if (!value.getNodeType().equals(JsonNodeType.OBJECT)) {\n+            result.invalidType(location, key, \"object\", value);\n+            if (required) {\n+                result.invalid();\n+            }\n+        } else {\n+            object = (ObjectNode) value;\n+        }\n+        return object;\n+    }\n+\n+    public Info getInfo(ObjectNode node, String location, ParseResult result) {\n+        if (node == null)\n+            return null;\n+\n+        Info info = new Info();\n+        String value = getString(\"title\", node, true, location, result);\n+        info.setTitle(value);\n+\n+        value = getString(\"description\", node, false, location, result);\n+        info.setDescription(value);\n+\n+        value = getString(\"termsOfService\", node, false, location, result);\n+        info.setTermsOfService(value);","path":"modules/swagger-parser-v3/src/main/java/io/swagger/parser/v3/util/OpenAPIDeserializer.java","position":608,"original_position":608,"commit_id":"f94b6eb552d3e8c48c59a4597a11f55b892c20fb","original_commit_id":"f94b6eb552d3e8c48c59a4597a11f55b892c20fb","user":{"login":"fehguy","id":249413,"avatar_url":"https://avatars0.githubusercontent.com/u/249413?v=3","gravatar_id":"","url":"https://api.github.com/users/fehguy","html_url":"https://github.com/fehguy","followers_url":"https://api.github.com/users/fehguy/followers","following_url":"https://api.github.com/users/fehguy/following{/other_user}","gists_url":"https://api.github.com/users/fehguy/gists{/gist_id}","starred_url":"https://api.github.com/users/fehguy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fehguy/subscriptions","organizations_url":"https://api.github.com/users/fehguy/orgs","repos_url":"https://api.github.com/users/fehguy/repos","events_url":"https://api.github.com/users/fehguy/events{/privacy}","received_events_url":"https://api.github.com/users/fehguy/received_events","type":"User","site_admin":false},"body":"do a `StringUtils.isNotBlank(...)` check before setting","created_at":"2017-06-08T18:21:19Z","updated_at":"2017-06-08T18:31:28Z","html_url":"https://github.com/swagger-api/swagger-parser/pull/467#discussion_r120962428","pull_request_url":"https://api.github.com/repos/swagger-api/swagger-parser/pulls/467","_links":{"self":{"href":"https://api.github.com/repos/swagger-api/swagger-parser/pulls/comments/120962428"},"html":{"href":"https://github.com/swagger-api/swagger-parser/pull/467#discussion_r120962428"},"pull_request":{"href":"https://api.github.com/repos/swagger-api/swagger-parser/pulls/467"}}},"pull_request":{"url":"https://api.github.com/repos/swagger-api/swagger-parser/pulls/467","id":124553901,"html_url":"https://github.com/swagger-api/swagger-parser/pull/467","diff_url":"https://github.com/swagger-api/swagger-parser/pull/467.diff","patch_url":"https://github.com/swagger-api/swagger-parser/pull/467.patch","issue_url":"https://api.github.com/repos/swagger-api/swagger-parser/issues/467","number":467,"state":"open","locked":false,"title":"First OAS 3.0 Deserializer Feature/3.0.0 rc0","user":{"login":"gracekarina","id":4115783,"avatar_url":"https://avatars0.githubusercontent.com/u/4115783?v=3","gravatar_id":"","url":"https://api.github.com/users/gracekarina","html_url":"https://github.com/gracekarina","followers_url":"https://api.github.com/users/gracekarina/followers","following_url":"https://api.github.com/users/gracekarina/following{/other_user}","gists_url":"https://api.github.com/users/gracekarina/gists{/gist_id}","starred_url":"https://api.github.com/users/gracekarina/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gracekarina/subscriptions","organizations_url":"https://api.github.com/users/gracekarina/orgs","repos_url":"https://api.github.com/users/gracekarina/repos","events_url":"https://api.github.com/users/gracekarina/events{/privacy}","received_events_url":"https://api.github.com/users/gracekarina/received_events","type":"User","site_admin":false},"body":"This is the first deliver of parser supporting version 3.0.\r\n","created_at":"2017-06-08T02:09:58Z","updated_at":"2017-06-08T18:31:28Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b939de0df6ca4e5651ab2ac5a92d41ae1996b550","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/swagger-api/swagger-parser/pulls/467/commits","review_comments_url":"https://api.github.com/repos/swagger-api/swagger-parser/pulls/467/comments","review_comment_url":"https://api.github.com/repos/swagger-api/swagger-parser/pulls/comments{/number}","comments_url":"https://api.github.com/repos/swagger-api/swagger-parser/issues/467/comments","statuses_url":"https://api.github.com/repos/swagger-api/swagger-parser/statuses/f94b6eb552d3e8c48c59a4597a11f55b892c20fb","head":{"label":"gracekarina:feature/3.0.0-rc0","ref":"feature/3.0.0-rc0","sha":"f94b6eb552d3e8c48c59a4597a11f55b892c20fb","user":{"login":"gracekarina","id":4115783,"avatar_url":"https://avatars0.githubusercontent.com/u/4115783?v=3","gravatar_id":"","url":"https://api.github.com/users/gracekarina","html_url":"https://github.com/gracekarina","followers_url":"https://api.github.com/users/gracekarina/followers","following_url":"https://api.github.com/users/gracekarina/following{/other_user}","gists_url":"https://api.github.com/users/gracekarina/gists{/gist_id}","starred_url":"https://api.github.com/users/gracekarina/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gracekarina/subscriptions","organizations_url":"https://api.github.com/users/gracekarina/orgs","repos_url":"https://api.github.com/users/gracekarina/repos","events_url":"https://api.github.com/users/gracekarina/events{/privacy}","received_events_url":"https://api.github.com/users/gracekarina/received_events","type":"User","site_admin":false},"repo":{"id":91145860,"name":"swagger-parser","full_name":"gracekarina/swagger-parser","owner":{"login":"gracekarina","id":4115783,"avatar_url":"https://avatars0.githubusercontent.com/u/4115783?v=3","gravatar_id":"","url":"https://api.github.com/users/gracekarina","html_url":"https://github.com/gracekarina","followers_url":"https://api.github.com/users/gracekarina/followers","following_url":"https://api.github.com/users/gracekarina/following{/other_user}","gists_url":"https://api.github.com/users/gracekarina/gists{/gist_id}","starred_url":"https://api.github.com/users/gracekarina/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gracekarina/subscriptions","organizations_url":"https://api.github.com/users/gracekarina/orgs","repos_url":"https://api.github.com/users/gracekarina/repos","events_url":"https://api.github.com/users/gracekarina/events{/privacy}","received_events_url":"https://api.github.com/users/gracekarina/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/gracekarina/swagger-parser","description":"Swagger Spec to Java POJOs","fork":true,"url":"https://api.github.com/repos/gracekarina/swagger-parser","forks_url":"https://api.github.com/repos/gracekarina/swagger-parser/forks","keys_url":"https://api.github.com/repos/gracekarina/swagger-parser/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gracekarina/swagger-parser/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gracekarina/swagger-parser/teams","hooks_url":"https://api.github.com/repos/gracekarina/swagger-parser/hooks","issue_events_url":"https://api.github.com/repos/gracekarina/swagger-parser/issues/events{/number}","events_url":"https://api.github.com/repos/gracekarina/swagger-parser/events","assignees_url":"https://api.github.com/repos/gracekarina/swagger-parser/assignees{/user}","branches_url":"https://api.github.com/repos/gracekarina/swagger-parser/branches{/branch}","tags_url":"https://api.github.com/repos/gracekarina/swagger-parser/tags","blobs_url":"https://api.github.com/repos/gracekarina/swagger-parser/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gracekarina/swagger-parser/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gracekarina/swagger-parser/git/refs{/sha}","trees_url":"https://api.github.com/repos/gracekarina/swagger-parser/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gracekarina/swagger-parser/statuses/{sha}","languages_url":"https://api.github.com/repos/gracekarina/swagger-parser/languages","stargazers_url":"https://api.github.com/repos/gracekarina/swagger-parser/stargazers","contributors_url":"https://api.github.com/repos/gracekarina/swagger-parser/contributors","subscribers_url":"https://api.github.com/repos/gracekarina/swagger-parser/subscribers","subscription_url":"https://api.github.com/repos/gracekarina/swagger-parser/subscription","commits_url":"https://api.github.com/repos/gracekarina/swagger-parser/commits{/sha}","git_commits_url":"https://api.github.com/repos/gracekarina/swagger-parser/git/commits{/sha}","comments_url":"https://api.github.com/repos/gracekarina/swagger-parser/comments{/number}","issue_comment_url":"https://api.github.com/repos/gracekarina/swagger-parser/issues/comments{/number}","contents_url":"https://api.github.com/repos/gracekarina/swagger-parser/contents/{+path}","compare_url":"https://api.github.com/repos/gracekarina/swagger-parser/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gracekarina/swagger-parser/merges","archive_url":"https://api.github.com/repos/gracekarina/swagger-parser/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gracekarina/swagger-parser/downloads","issues_url":"https://api.github.com/repos/gracekarina/swagger-parser/issues{/number}","pulls_url":"https://api.github.com/repos/gracekarina/swagger-parser/pulls{/number}","milestones_url":"https://api.github.com/repos/gracekarina/swagger-parser/milestones{/number}","notifications_url":"https://api.github.com/repos/gracekarina/swagger-parser/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gracekarina/swagger-parser/labels{/name}","releases_url":"https://api.github.com/repos/gracekarina/swagger-parser/releases{/id}","deployments_url":"https://api.github.com/repos/gracekarina/swagger-parser/deployments","created_at":"2017-05-13T03:13:38Z","updated_at":"2017-05-13T03:13:39Z","pushed_at":"2017-06-08T17:36:58Z","git_url":"git://github.com/gracekarina/swagger-parser.git","ssh_url":"git@github.com:gracekarina/swagger-parser.git","clone_url":"https://github.com/gracekarina/swagger-parser.git","svn_url":"https://github.com/gracekarina/swagger-parser","homepage":"http://swagger.io","size":1368,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"swagger-api:feature/3.0.0-rc1","ref":"feature/3.0.0-rc1","sha":"3efa3bdec209ca0dfa45b8701d5c8b97df8e262a","user":{"login":"swagger-api","id":7658037,"avatar_url":"https://avatars0.githubusercontent.com/u/7658037?v=3","gravatar_id":"","url":"https://api.github.com/users/swagger-api","html_url":"https://github.com/swagger-api","followers_url":"https://api.github.com/users/swagger-api/followers","following_url":"https://api.github.com/users/swagger-api/following{/other_user}","gists_url":"https://api.github.com/users/swagger-api/gists{/gist_id}","starred_url":"https://api.github.com/users/swagger-api/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/swagger-api/subscriptions","organizations_url":"https://api.github.com/users/swagger-api/orgs","repos_url":"https://api.github.com/users/swagger-api/repos","events_url":"https://api.github.com/users/swagger-api/events{/privacy}","received_events_url":"https://api.github.com/users/swagger-api/received_events","type":"Organization","site_admin":false},"repo":{"id":18997610,"name":"swagger-parser","full_name":"swagger-api/swagger-parser","owner":{"login":"swagger-api","id":7658037,"avatar_url":"https://avatars0.githubusercontent.com/u/7658037?v=3","gravatar_id":"","url":"https://api.github.com/users/swagger-api","html_url":"https://github.com/swagger-api","followers_url":"https://api.github.com/users/swagger-api/followers","following_url":"https://api.github.com/users/swagger-api/following{/other_user}","gists_url":"https://api.github.com/users/swagger-api/gists{/gist_id}","starred_url":"https://api.github.com/users/swagger-api/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/swagger-api/subscriptions","organizations_url":"https://api.github.com/users/swagger-api/orgs","repos_url":"https://api.github.com/users/swagger-api/repos","events_url":"https://api.github.com/users/swagger-api/events{/privacy}","received_events_url":"https://api.github.com/users/swagger-api/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/swagger-api/swagger-parser","description":"Swagger Spec to Java POJOs","fork":false,"url":"https://api.github.com/repos/swagger-api/swagger-parser","forks_url":"https://api.github.com/repos/swagger-api/swagger-parser/forks","keys_url":"https://api.github.com/repos/swagger-api/swagger-parser/keys{/key_id}","collaborators_url":"https://api.github.com/repos/swagger-api/swagger-parser/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/swagger-api/swagger-parser/teams","hooks_url":"https://api.github.com/repos/swagger-api/swagger-parser/hooks","issue_events_url":"https://api.github.com/repos/swagger-api/swagger-parser/issues/events{/number}","events_url":"https://api.github.com/repos/swagger-api/swagger-parser/events","assignees_url":"https://api.github.com/repos/swagger-api/swagger-parser/assignees{/user}","branches_url":"https://api.github.com/repos/swagger-api/swagger-parser/branches{/branch}","tags_url":"https://api.github.com/repos/swagger-api/swagger-parser/tags","blobs_url":"https://api.github.com/repos/swagger-api/swagger-parser/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/swagger-api/swagger-parser/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/swagger-api/swagger-parser/git/refs{/sha}","trees_url":"https://api.github.com/repos/swagger-api/swagger-parser/git/trees{/sha}","statuses_url":"https://api.github.com/repos/swagger-api/swagger-parser/statuses/{sha}","languages_url":"https://api.github.com/repos/swagger-api/swagger-parser/languages","stargazers_url":"https://api.github.com/repos/swagger-api/swagger-parser/stargazers","contributors_url":"https://api.github.com/repos/swagger-api/swagger-parser/contributors","subscribers_url":"https://api.github.com/repos/swagger-api/swagger-parser/subscribers","subscription_url":"https://api.github.com/repos/swagger-api/swagger-parser/subscription","commits_url":"https://api.github.com/repos/swagger-api/swagger-parser/commits{/sha}","git_commits_url":"https://api.github.com/repos/swagger-api/swagger-parser/git/commits{/sha}","comments_url":"https://api.github.com/repos/swagger-api/swagger-parser/comments{/number}","issue_comment_url":"https://api.github.com/repos/swagger-api/swagger-parser/issues/comments{/number}","contents_url":"https://api.github.com/repos/swagger-api/swagger-parser/contents/{+path}","compare_url":"https://api.github.com/repos/swagger-api/swagger-parser/compare/{base}...{head}","merges_url":"https://api.github.com/repos/swagger-api/swagger-parser/merges","archive_url":"https://api.github.com/repos/swagger-api/swagger-parser/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/swagger-api/swagger-parser/downloads","issues_url":"https://api.github.com/repos/swagger-api/swagger-parser/issues{/number}","pulls_url":"https://api.github.com/repos/swagger-api/swagger-parser/pulls{/number}","milestones_url":"https://api.github.com/repos/swagger-api/swagger-parser/milestones{/number}","notifications_url":"https://api.github.com/repos/swagger-api/swagger-parser/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/swagger-api/swagger-parser/labels{/name}","releases_url":"https://api.github.com/repos/swagger-api/swagger-parser/releases{/id}","deployments_url":"https://api.github.com/repos/swagger-api/swagger-parser/deployments","created_at":"2014-04-21T16:00:22Z","updated_at":"2017-06-08T14:02:52Z","pushed_at":"2017-06-08T17:37:00Z","git_url":"git://github.com/swagger-api/swagger-parser.git","ssh_url":"git@github.com:swagger-api/swagger-parser.git","clone_url":"https://github.com/swagger-api/swagger-parser.git","svn_url":"https://github.com/swagger-api/swagger-parser","homepage":"http://swagger.io","size":1196,"stargazers_count":139,"watchers_count":139,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":163,"mirror_url":null,"open_issues_count":48,"forks":163,"open_issues":48,"watchers":139,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/swagger-api/swagger-parser/pulls/467"},"html":{"href":"https://github.com/swagger-api/swagger-parser/pull/467"},"issue":{"href":"https://api.github.com/repos/swagger-api/swagger-parser/issues/467"},"comments":{"href":"https://api.github.com/repos/swagger-api/swagger-parser/issues/467/comments"},"review_comments":{"href":"https://api.github.com/repos/swagger-api/swagger-parser/pulls/467/comments"},"review_comment":{"href":"https://api.github.com/repos/swagger-api/swagger-parser/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/swagger-api/swagger-parser/pulls/467/commits"},"statuses":{"href":"https://api.github.com/repos/swagger-api/swagger-parser/statuses/f94b6eb552d3e8c48c59a4597a11f55b892c20fb"}}}}
{"actor":{"display_login":"fehguy"}}