Package org.springdoc.core.annotations
Annotation 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 ElementsModifier and TypeOptional ElementDescriptionClass<?>
The class of the Handler bean.The method of the handler Bean.String[]
Narrows the primary mapping by media types that can be consumed by the mapped handler.String[]
The headers of the mapped request, narrowing the primary mapping.org.springframework.web.bind.annotation.RequestMethod[]
The HTTP request methods to map to, narrowing the primary mapping: GET, POST, HEAD, OPTIONS, PUT, PATCH, DELETE, TRACE.io.swagger.v3.oas.annotations.Operation
The swagger operation description Alias forOperation
.Class<?>[]
The parameters of the handler method.The path mapping URIs (e.g.String[]
Narrows the primary mapping by media types that can be produced by the mapped handler.
-
Element Details
-
path
String pathThe path mapping URIs (e.g."/profile"
). Path mapping URIs may contain placeholders (e.g."/${profile_path}"
).- Returns:
- the string
- Default:
- ""
-
method
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.- Returns:
- the request method [ ]
- Default:
- {}
-
consumes
String[] consumesNarrows 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-Type
header. Examples:consumes = "text/plain" consumes = {"text/plain", "application/*"} consumes = MediaType.TEXT_PLAIN_VALUE
- Returns:
- the string [ ]
- Default:
- {}
-
produces
String[] producesNarrows 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[] headersThe 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<?> beanClassThe class of the Handler bean.- Returns:
- the class of the Bean
- Default:
- java.lang.Void.class
-
beanMethod
String beanMethodThe method of the handler Bean.- Returns:
- The method of the handler Bean.
- Default:
- ""
-
parameterTypes
Class<?>[] parameterTypesThe parameters of the handler method.- Returns:
- The parameters of the handler method.
- Default:
- {}
-
operation
io.swagger.v3.oas.annotations.Operation operationThe swagger operation description Alias forOperation
.- Returns:
- The operation
- Default:
- @io.swagger.v3.oas.annotations.Operation
-