Annotation Interface OpenApi.License

Enclosing class:
OpenApi

@Target(TYPE) @Retention(CLASS) @Documented public static @interface OpenApi.License
OpenAPI License Object metadata.

Use only on @OpenApi.Document metadata types.

  • Required Element Summary

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

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    SPDX license identifier.
    License URL.
  • Element Details

    • value

      String value
      License name.
      Returns:
      name
    • url

      String url
      License URL.

      For OpenAPI 3.1 and later output, this value is ignored when identifier() is set.

      Returns:
      URL
      Default:
      ""
    • identifier

      String identifier
      SPDX license identifier.

      Rendered only for OpenAPI 3.1 and later output. When set together with url(), this value takes precedence for those versions; the URL remains available for OpenAPI 3.0 output.

      Returns:
      license identifier
      Default:
      ""