Annotation Interface OpenApi.Response

Enclosing class:
OpenApi

@Target(METHOD) @Retention(CLASS) @Repeatable(OpenApi.Responses.class) @Documented public static @interface OpenApi.Response
OpenAPI Response Object metadata.

When a method declares one or more explicit responses, generated OpenAPI response content is taken only from content(); return-type response content is not inferred for those explicit responses.

  • Element Details

    • status

      int status
      HTTP status code in the range 100..599. A method can declare at most one response for each status.

      This element supports exact status codes only. To declare default or a wildcard response range (1XX through 5XX), define the complete containing operation in a static OpenAPI document or an OpenApiDocumentSource, and configure Helidon not to generate the same path and method from annotations.

      Returns:
      status code
    • description

      String description
      Response description.
      Returns:
      description
    • summary

      String summary
      Response summary.

      Rendered only for OpenAPI 3.2 output.

      Returns:
      summary
      Default:
      ""
    • content

      OpenApi.Content[] content
      Response content entries.
      Returns:
      content
      Default:
      {}
    • headers

      OpenApi.Header[] headers
      Response headers.
      Returns:
      headers
      Default:
      {}
    • links

      OpenApi.Link[] links
      Response links.
      Returns:
      links
      Default:
      {}