Annotation Interface OpenApi.Content

Enclosing class:
OpenApi

@Target({}) @Retention(CLASS) @Documented public static @interface OpenApi.Content
OpenAPI Media Type Object metadata.

Declarative OpenAPI annotations do not model encoding metadata, including per-part content types and headers, or OpenAPI 3.2 prefixEncoding and itemEncoding. To use such metadata, 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.

  • Element Details

    • value

      String value
      Media type.
      Returns:
      media type
      Default:
      ""
    • schema

      Class<?> schema
      Schema class. Defaults to the effective request or response entity type unless itemSchema() is set. If itemSchema is set without an explicit schema, the inferred entity schema is omitted.
      Returns:
      schema class
      Default:
      java.lang.Void.class
    • itemSchema

      Class<?> itemSchema
      Item schema class for OpenAPI 3.2 sequential media types. This is an alternative to schema().

      If set without an explicit schema, this suppresses the inferred entity schema. Applications that use this attribute must select OpenAPI 3.2 output; earlier output versions omit it.

      Returns:
      item schema class
      Default:
      java.lang.Void.class
    • examples

      OpenApi.Example[] examples
      Examples.
      Returns:
      examples
      Default:
      {}