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

Bug: securitySchemes oauth2 empty scopes is stripped #289

Closed
khart-twilio opened this issue May 8, 2024 · 2 comments
Closed

Bug: securitySchemes oauth2 empty scopes is stripped #289

khart-twilio opened this issue May 8, 2024 · 2 comments

Comments

@khart-twilio
Copy link
Contributor

khart-twilio commented May 8, 2024

input:

components:
  securitySchemes:
    someName:
      type: oauth2
      flows:
        clientCredentials:
          tokenUrl: https://oauth.somewhere.com/v1/token
          scopes: {}

invalid output (scopes key is removed but is required as per https://swagger.io/docs/specification/authentication/oauth2/):

components:
  securitySchemes:
    someName:
      type: oauth2
      flows:
        clientCredentials:
          tokenUrl: https://oauth.somewhere.com/v1/token

can this be fixed, and in the meantime what is the best way to work around the issue?

Thanks for the library, I love the website style :)

khart-twilio added a commit to khart-twilio/libopenapi that referenced this issue May 9, 2024
daveshanley pushed a commit that referenced this issue May 11, 2024
@daveshanley
Copy link
Member

Fixed in v0.16.6 Thank you for your contribution!

@khart-twilio
Copy link
Contributor Author

Thanks, I was digging into the tests but it takes a while to get familiar. I appreciate you taking it up!

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