Annotation Interface 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
    The class of the Handler bean.
    The method of the handler Bean.
    Narrows the primary mapping by media types that can be consumed by the mapped handler.
    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 for Operation.
    Class<?>[]
    The parameters of the handler method.
    The path mapping URIs (e.g.
    Narrows the primary mapping by media types that can be produced by the mapped handler.
  • Element Details

    • path

      String path
      The 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[] method
      The 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[] 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 request Content-Type header. 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:
      {}
    • operation

      io.swagger.v3.oas.annotations.Operation operation
      The swagger operation description Alias for Operation.
      Returns:
      The operation
      Default:
      @io.swagger.v3.oas.annotations.Operation