Skip to content

OpenAPIParser.readLocation fails when fetching valid Swagger 2.0 resource with AuthorizationValues provided #785

@charlesyu108

Description

@charlesyu108

I have a simple server that serves a Swagger doc when a specified header and value are provided. When I try to load the resource via

Swagger parseResult = new OpenAPIParser().readLocation(uri, docAuths, null);

where docAuths are my AuthorizationValues, the parser will fail with the message "attribute openapi is missing" if my server provides a 2.0 resource but not a 3.0 resource (the 3.0 resource I provide is the converted version of the 2.0 one using swagger-parser).

I believe that the fetched resource isn't being run through the converter first when Authorization is provided.

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