Annotation Interface OpenApi.SecurityRequirements

Enclosing class:
OpenApi

@Target({TYPE,METHOD}) @Retention(CLASS) @Documented @Inherited public static @interface OpenApi.SecurityRequirements
Container for repeated OpenApi.SecurityRequirement.

An empty container on a method clears inherited endpoint security and emits security: [] for the generated operation. An empty container on an endpoint clears endpoint-level security for operations which do not declare method-level security requirements. Type-level usage on a declarative REST endpoint contract also applies to its implementations. An inherited empty container conflicts with a non-empty security requirement from an unrelated endpoint contract and causes declarative OpenAPI code generation to fail. A security requirements container declared directly on an endpoint implementation replaces requirements inherited from its contract.