Package io.micronaut.openapi.annotation
Annotation Interface OpenAPIDecorator
The annotation can be used to add suffix and prefix for operationIds. For example, when you have
2 controllers with same operations, but use generics:
@OpenAPIDecorator(opIdPrefix = "cats-", opIdSuffix = "-suffix")
@Controller("/cats")
interface MyCatsOperations extends Api<MyRequest, MyResponse> {
}
@OpenAPIDecorator("dogs-")
@Controller("/dogs")
interface MyDogsOperations extends Api<MyRequest, MyResponse> {
}
- Since:
- 4.5.0
-
Optional Element Summary
Modifier and TypeOptional ElementDescriptionboolean
-
Element Details
-
value
String value- Returns:
- Prefix for operation ids.
- Default:
- ""
-
opIdPrefix
- Returns:
- Prefix for operation ids.
- Default:
- ""
-
opIdSuffix
String opIdSuffix- Returns:
- Suffix for operation ids.
- Default:
- ""
-
addAlways
boolean addAlways- Returns:
- is this flag false, prefixes and suffixes will not be added to operationId
if operationId is set explicitly in the
Operation
annotation
- Default:
- true
-