Annotation Interface OpenApi.Example

Enclosing class:
OpenApi

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

value() is mutually exclusive with dataValue(), serializedValue(), and externalValue(). serializedValue() and externalValue() are mutually exclusive. dataValue() can be used by itself, or with either serializedValue() or externalValue() for OpenAPI 3.2 output.

  • Element Details

    • name

      String name
      Example name.
      Returns:
      name
      Default:
      ""
    • summary

      String summary
      Example summary.
      Returns:
      summary
      Default:
      ""
    • description

      String description
      Example description.
      Returns:
      description
      Default:
      ""
    • value

      String value
      Example value.

      Declarative OpenAPI generation parses valid JSON as a structured OpenAPI value and emits non-JSON text as a string.

      Mutually exclusive with dataValue(), serializedValue(), and externalValue().

      Returns:
      value
      Default:
      ""
    • dataValue

      String dataValue
      OpenAPI 3.2 data value.

      Declarative OpenAPI generation parses valid JSON as a structured OpenAPI value and emits non-JSON text as a string.

      Rendered only for OpenAPI 3.2 output.

      Can be used with either serializedValue() or externalValue(). Mutually exclusive with value().

      Returns:
      data value
      Default:
      ""
    • serializedValue

      String serializedValue
      OpenAPI 3.2 serialized value.

      Declarative OpenAPI generation emits this value as a string and does not parse it as JSON.

      Rendered only for OpenAPI 3.2 output.

      Can be used with dataValue(). Mutually exclusive with value() and externalValue().

      Returns:
      serialized value
      Default:
      ""
    • externalValue

      String externalValue
      External example value URI.

      Can be used with dataValue(). Mutually exclusive with value() and serializedValue().

      Returns:
      external value URI
      Default:
      ""