Skip to content

OpenAPI v2 converter: NullPointerException when info section is missing #755

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
jmini opened this issue Jul 6, 2018 · 2 comments
Closed

Comments

@jmini
Copy link
Contributor

jmini commented Jul 6, 2018

With a OAS2 Spec like this:

swagger: '2.0'
host: petstore.swagger.io
basePath: /v2
schemes:
  - http
paths:
  /ping:
    post:
      summary: test
      description: 'test it'
      operationId: pingOp
      responses:
        '200':
          description: OK

There is a NullPointerException during conversion OAS2 -> OAS3:

Exception in thread "main" java.lang.NullPointerException
	at io.swagger.v3.parser.converter.SwaggerConverter.convert(SwaggerConverter.java:422)
	at io.swagger.v3.parser.converter.SwaggerConverter.convert(SwaggerConverter.java:144)
	at io.swagger.v3.parser.converter.SwaggerConverter.readLocation(SwaggerConverter.java:93)
	at io.swagger.parser.OpenAPIParser.readLocation(OpenAPIParser.java:19)
@jmini
Copy link
Contributor Author

jmini commented Jul 6, 2018

This is fixed in PR #753 by @bmordue

jmini added a commit to OpenAPITools/swagger-parser that referenced this issue Jul 6, 2018
@ralphdoe
Copy link
Contributor

Reviewed and merged! Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants