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

Allow security override of specific endpoints #55

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

johnsusek
Copy link
Contributor

@johnsusek johnsusek commented Mar 10, 2020

For an endpoint specified like this:

  /pets:
      get:
        description: Example
        security: []

Currently openapi-client still will add security to the endpoint, just because the array exists.

This change removes the security from the operation if an empty array is passed in.

This is discussed a little more here: OAI/OpenAPI-Specification#14

I think this aligns with the spec because if you load a spec into the swagger editor with an endpoint like above, it won't show a lock icon, indicating there should not be auth.

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

Successfully merging this pull request may close these issues.

1 participant