Package io.swagger.v3.oas.annotations
Annotation Type OpenAPIDefinition
-
@Target({TYPE,PACKAGE,ANNOTATION_TYPE}) @Retention(RUNTIME) @Inherited public @interface OpenAPIDefinition
The annotation that may be used to populate OpenAPI Object fields info, tags, servers, security and externalDocs If more than one class is annotated withOpenAPIDefinition, with the same fields defined, behaviour is inconsistent.- See Also:
- OpenAPI (OpenAPI specification)
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description Extension[]extensionsThe list of optional extensionsExternalDocumentationexternalDocsAny additional external documentation for the APIInfoinfoProvides metadata about the API.SecurityRequirement[]securityA declaration of which security mechanisms can be used across the API.Server[]serversAn array of Server Objects, which provide connectivity information to a target server.Tag[]tagsA list of tags used by the specification with additional metadata.
-
-
-
Element Detail
-
info
Info info
Provides metadata about the API. The metadata MAY be used by tooling as required.- Returns:
- the metadata about this API
- Default:
- @io.swagger.v3.oas.annotations.info.Info
-
-
-
tags
Tag[] tags
A list of tags used by the specification with additional metadata. The order of the tags can be used to reflect on their order by the parsing tools.- Returns:
- the tags used by the specification with any additional metadata
- Default:
- {}
-
-
-
servers
Server[] servers
An array of Server Objects, which provide connectivity information to a target server. If the servers property is not provided, or is an empty array, the default value would be a Server Object with a url value of /.- Returns:
- the servers of this API
- Default:
- {}
-
-
-
security
SecurityRequirement[] security
A declaration of which security mechanisms can be used across the API.- Returns:
- the array of servers used for this API
- Default:
- {}
-
-
-
externalDocs
ExternalDocumentation externalDocs
Any additional external documentation for the API- Returns:
- the external documentation for this API.
- Default:
- @io.swagger.v3.oas.annotations.ExternalDocumentation
-
-
-
extensions
Extension[] extensions
The list of optional extensions- Returns:
- an optional array of extensions
- Default:
- {}
-
-