Skip to content

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

Closed

Description

@jmini

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)

Activity

  1. jmini commented on Jul 6, 2018

    @jmini
    ContributorAuthor

    This is fixed in PR #753 by @bmordue

  2. ralphdoe commented on Jul 13, 2018

    @ralphdoe
    Contributor

    Reviewed and merged! Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions