Skip to content

Clarification about the meaning of an empty security array #3938

@MathieuVeber

Description

@MathieuVeber

Hi, while I was trying to implement the specification, I ran into some existential questions about security requirements!

It's unclear to me if an empty security array ([]) is equivalent to a security array with an empty object ([{}])... The spec doesn't even mention if it would be valid to have an empty security array at the OpenApi Object level and what would that mean...

A declaration of which security mechanisms can be used across the API. The list of values includes alternative security requirement objects that can be used. Only one of the security requirement objects need to be satisfied to authorize a request. Individual operations can override this definition. To make security optional, an empty security requirement ({}) can be included in the array.

A declaration of which security mechanisms can be used for this operation. The list of values includes alternative security requirement objects that can be used. Only one of the security requirement objects need to be satisfied to authorize a request. To make security optional, an empty security requirement ({}) can be included in the array. This definition overrides any declared top-level security. To remove a top-level security declaration, an empty array can be used.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions