Annotation Interface OpenApi.Extension

Enclosing class:
OpenApi

@Target({TYPE,METHOD}) @Retention(CLASS) @Repeatable(OpenApi.Extensions.class) @Documented public static @interface OpenApi.Extension
OpenAPI Specification Extension metadata.

Type-level usage applies only to @OpenApi.Document metadata types. Method-level usage applies to generated operations.

Declarative OpenAPI annotations do not apply extensions to other OpenAPI objects, including servers, responses, headers, and links. Use a static OpenAPI document or an OpenApiDocumentSource to define such extensions. If the extended object belongs to an operation, the static document or document source must own the complete operation and Helidon must not also generate the same path and method from annotations.

  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    Extension name.
    Extension value.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    boolean
    Whether to parse the resolved value() as JSON.
  • Element Details

    • name

      String name
      Extension name. Must start with x-.
      Returns:
      name
    • value

      String value
      Extension value.

      By default, the value is rendered as an OpenAPI string. Set parseValue() to true to parse the resolved value as JSON.

      Returns:
      value
    • parseValue

      boolean parseValue
      Whether to parse the resolved value() as JSON.

      When enabled, the resolved value must contain exactly one valid JSON value.

      Returns:
      whether to parse the value
      Default:
      false