{"action":"opened","issue":{"url":"https://api.github.com/repos/OpenAPITools/openapi-generator/issues/67","repository_url":"https://api.github.com/repos/OpenAPITools/openapi-generator","labels_url":"https://api.github.com/repos/OpenAPITools/openapi-generator/issues/67/labels{/name}","comments_url":"https://api.github.com/repos/OpenAPITools/openapi-generator/issues/67/comments","events_url":"https://api.github.com/repos/OpenAPITools/openapi-generator/issues/67/events","html_url":"https://github.com/OpenAPITools/openapi-generator/issues/67","id":323570263,"number":67,"title":"NullPointerException when run \"validate\" with OAS2 spec","user":{"login":"ackintosh","id":1885716,"avatar_url":"https://avatars0.githubusercontent.com/u/1885716?v=4","gravatar_id":"","url":"https://api.github.com/users/ackintosh","html_url":"https://github.com/ackintosh","followers_url":"https://api.github.com/users/ackintosh/followers","following_url":"https://api.github.com/users/ackintosh/following{/other_user}","gists_url":"https://api.github.com/users/ackintosh/gists{/gist_id}","starred_url":"https://api.github.com/users/ackintosh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ackintosh/subscriptions","organizations_url":"https://api.github.com/users/ackintosh/orgs","repos_url":"https://api.github.com/users/ackintosh/repos","events_url":"https://api.github.com/users/ackintosh/events{/privacy}","received_events_url":"https://api.github.com/users/ackintosh/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-05-16T10:57:09Z","updated_at":"2018-05-16T10:57:09Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"<!--\r\nPlease follow the issue template below for bug reports and feature requests.\r\nAlso please indicate in the issue title which language/library is concerned. Eg:  [JAVA] Bug generating foo with bar \r\n-->\r\n\r\n##### Description\r\n\r\n```\r\n$ java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar validate -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml\r\nValidating spec file (modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml)\r\nException in thread \"main\" java.lang.NullPointerException\r\n        at java.util.HashSet.<init>(HashSet.java:118)\r\n        at org.openapitools.codegen.cmd.Validate.run(Validate.java:44)\r\n        at org.openapitools.codegen.OpenAPIGenerator.main(OpenAPIGenerator.java:52)\r\n```\r\n\r\nIt may caused by [SwaggerConverter](https://github.com/ackintosh/swagger-parser/blob/c959d1df580b8af37f4ffd3a1ee04f6c172499cc/modules/swagger-parser-v2-converter/src/main/java/io/swagger/v3/parser/converter/SwaggerConverter.java#L123) as the converter doesn't [set message](https://github.com/ackintosh/swagger-parser/blob/8acfafa6a4dd2e808b0c2f6067d2860810f3c9dc/modules/swagger-parser-core/src/main/java/io/swagger/v3/parser/core/models/SwaggerParseResult.java#L19).\r\n\r\nIn case of parsing OAS3, OpenAPIDeserializer [sets message](https://github.com/ackintosh/swagger-parser/blob/0a51b0baa92b5889e5ebe3bdf666961d39b83104/modules/swagger-parser-v3/src/main/java/io/swagger/v3/parser/util/OpenAPIDeserializer.java#L105).\r\n\r\n"}}
{"actor":{"display_login":"ackintosh"}}