Annotation Type Tag
-
@Target({METHOD,TYPE,ANNOTATION_TYPE}) @Retention(RUNTIME) @Repeatable(Tags.class) @Inherited public @interface Tag
The annotation may be applied at class or method level, or inOperation.tags()
to define tags for the single operation (when applied at method level) or for all operations of a class (when applied at class level).It can also be used in
OpenAPIDefinition.tags()
to define spec level tags.When applied at method or class level, if only a name is provided, the tag will be added to operation only; if additional fields are also defined, like description or externalDocs, the Tag will also be added to openAPI.tags field
- See Also:
- Tag (OpenAPI specification),
OpenAPIDefinition
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description String
description
A short description for this tag.Extension[]
extensions
The list of optional extensionsExternalDocumentation
externalDocs
Additional external documentation for this tag.
-
-
-
Element Detail
-
name
String name
The name of this tag.- Returns:
- the name of this tag
-
-
-
description
String description
A short description for this tag.- Returns:
- the description of this tag
- Default:
- ""
-
-
-
externalDocs
ExternalDocumentation externalDocs
Additional external documentation for this tag.- Returns:
- the external documentation for this tag
- Default:
- @io.swagger.v3.oas.annotations.ExternalDocumentation
-
-
-
extensions
Extension[] extensions
The list of optional extensions- Returns:
- an optional array of extensions
- Default:
- {}
-
-