Skip to content

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