Package org.springdoc.core.annotations
Annotation Type RouterOperation
-
@Target({TYPE,METHOD}) @Retention(RUNTIME) @Inherited public @interface RouterOperation
The annotation may be used to define a single Router Operation as an OpenAPI Operation, and/or to define additional properties using @Operation annotation.- Author:
- bnasslahsen
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description Class<?>beanClassThe class of the Handler bean.StringbeanMethodThe method of the handler Bean.String[]consumesNarrows the primary mapping by media types that can be consumed by the mapped handler.String[]headersThe headers of the mapped request, narrowing the primary mapping.org.springframework.web.bind.annotation.RequestMethod[]methodThe HTTP request methods to map to, narrowing the primary mapping: GET, POST, HEAD, OPTIONS, PUT, PATCH, DELETE, TRACE.io.swagger.v3.oas.annotations.OperationoperationThe swagger operation description Alias forOperation.Class<?>[]parameterTypesThe parameters of the handler method.StringpathThe path mapping URIs (e.g.String[]producesNarrows the primary mapping by media types that can be produced by the mapped handler.
-
-
-
Element Detail
-
path
String path
The path mapping URIs (e.g."/profile"). Path mapping URIs may contain placeholders (e.g."/${profile_path}").- Returns:
- the string
- Default:
- ""
-
-
-
consumes
String[] consumes
Narrows the primary mapping by media types that can be consumed by the mapped handler. Consists of one or more media types one of which must match to the requestContent-Typeheader. Examples:consumes = "text/plain" consumes = {"text/plain", "application/*"} consumes = MediaType.TEXT_PLAIN_VALUE- Returns:
- the string [ ]
- Default:
- {}
-
-
-
produces
String[] produces
Narrows the primary mapping by media types that can be produced by the mapped handler. Consists of one or more media types one of which must be chosen via content negotiation against the "acceptable" media types of the request. Typically those are extracted from the"Accept"header but may be derived from query parameters, or other. Examples:produces = "text/plain" produces = {"text/plain", "application/*"} produces = MediaType.TEXT_PLAIN_VALUE produces = "text/plain;charset=UTF-8"- Returns:
- the string [ ]
- Default:
- {}
-
-
-
headers
String[] headers
The headers of the mapped request, narrowing the primary mapping.Same format for any environment: a sequence of "My-Header=myValue" style expressions, with a request only mapped if each such header is found to have the given value.
- Returns:
- the string [ ]
- Default:
- {}
-
-
-
beanClass
Class<?> beanClass
The class of the Handler bean.- Returns:
- the class of the Bean
- Default:
- java.lang.Void.class
-
-
-
beanMethod
String beanMethod
The method of the handler Bean.- Returns:
- The method of the handler Bean.
- Default:
- ""
-
-
-
parameterTypes
Class<?>[] parameterTypes
The parameters of the handler method.- Returns:
- The parameters of the handler method.
- Default:
- {}
-
-