Open
Description
I wonder why these "Optional OAuth2 security" examples were created in the first place.
I agree that an API can have several options how the API client authenticates but having oauth2 security or alternatively none seems not a good security practice.
If the example was intended to show multiple alternative security requirements or the combination of an oauth2 security object with another non-oauth2 security object, then the second one should not be empty.
Maybe the API is migrating from apiKey to oauth2 and is deprecating api_key.
{
"security": [
{
"api_key": []
},
{
"petstore_auth": [
"write:pets",
"read:pets"
]
}
]
}