Skip to content
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

Security scheme parsing appears to be incorrect. #260

Open
trinary opened this issue Nov 18, 2021 · 0 comments
Open

Security scheme parsing appears to be incorrect. #260

trinary opened this issue Nov 18, 2021 · 0 comments

Comments

@trinary
Copy link

trinary commented Nov 18, 2021

Hello, I've been having trouble using this library to parse oauth2 security schemes in OpenAPI 3.0 documents. I believe that the parser as implemented does not match the OpenAPI spec. There may be other issues, but on security schemes specifically the parser looks for schemes of the structure (from kaizen-openapi-parser/src/test/resources/models/parseTest.yaml):

    scheme2:
      type: oauth2
      description: This is a description
      name: name
      in: query
      scheme: http
      bearerFormat: bearerFormat
      flow:
        authorizationCode:
          authorizationUrl: authorizationUrl
          tokenUrl: tokenUrl
          refreshUrl: refreshUrl
          scopes:
            xxx: xxx
            yyy: yyy
            x-foo: []
          x-foo: foo

The "flow" property here is incorrect and should be "flows", see https://spec.openapis.org/oas/latest.html#security-scheme-object

The linksTest.yaml and parseTest.yaml files used for testing do not validate with several openapi validation tools.

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

1 participant