Annotation Type Extension


  • @Target({FIELD,METHOD,PARAMETER,TYPE})
    @Retention(RUNTIME)
    @Repeatable(Extensions.class)
    public @interface Extension
    A named extension that should be added to the OpenAPI definition.
    • Required Element Summary

      Required Elements 
      Modifier and Type Required Element Description
      java.lang.String name
      A name for the extension.
      java.lang.String value
      The extension value.
    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      boolean parseValue
      Should the value be parsed into an object/array or other simple type (number, boolean, etc) or left as a simple String.
    • Element Detail

      • name

        java.lang.String name
        A name for the extension.
        Returns:
        an option name for these extensions - will be prefixed with "x-"
      • value

        java.lang.String value
        The extension value. If the value should be parsed into an object or array, then the value should be stringified JSON suitable for parsing by a standard JSON parser.
        Returns:
        the actual extension value
      • parseValue

        boolean parseValue
        Should the value be parsed into an object/array or other simple type (number, boolean, etc) or left as a simple String. If this is true, then the value must be parseable as one of:
        • JSON object
        • JSON array
        • number
        • boolean
        Returns:
        true if the value should be parsed
        Default:
        false