Class Extensions

java.lang.Object
io.github.torand.openapi2java.collectors.Extensions

public class Extensions extends Object
Handles custom OpenAPI format extensions.
  • Field Details

    • EXT_RESTCLIENT_CONFIGKEY

      public static final String EXT_RESTCLIENT_CONFIGKEY
      Config key used for getting MP Rest Client config.
      See Also:
    • EXT_RESTCLIENT_HEADERS

      public static final String EXT_RESTCLIENT_HEADERS
      Map of custom client header names and their values.
      See Also:
    • EXT_RESTCLIENT_HEADERSFACTORY

      public static final String EXT_RESTCLIENT_HEADERSFACTORY
      Fully qualified classname of an MP Rest Client header factory.
      See Also:
    • EXT_RESTCLIENT_PROVIDERS

      public static final String EXT_RESTCLIENT_PROVIDERS
      Array of fully qualified classnames of MP Rest Client providers.
      See Also:
    • EXT_JSON_SERIALIZER

      public static final String EXT_JSON_SERIALIZER
      Fully qualified classname of a JSON serializer class for the schema.
      See Also:
    • EXT_VALIDATION_CONSTRAINT

      public static final String EXT_VALIDATION_CONSTRAINT
      Fully qualified classname of an annotation class to validate the schema.
      See Also:
    • EXT_NULLABLE

      public static final String EXT_NULLABLE
      If `true` the type of the schema/property can be `null`.
      See Also:
    • EXT_MODEL_SUBDIR

      public static final String EXT_MODEL_SUBDIR
      Subdirectory to place the generated DTO model class.
      See Also:
    • EXT_DEPRECATION_MESSAGE

      public static final String EXT_DEPRECATION_MESSAGE
      Describing why something is deprecated, and what to use instead.
      See Also:
  • Method Details

    • extensions

      public static Extensions extensions(Map<String,Object> extensionsByName)
      Returns an Extensions object processing the specified OpenAPI extension map.
      Parameters:
      extensionsByName - the OpenAPI extensions.
      Returns:
      the Extensions object.
    • getString

      public Optional<String> getString(String name)
      Gets value of a string extension property.
      Parameters:
      name - the extension property name.
      Returns:
      the extension property string value, if found; else empty.
    • getStringArray

      public Optional<List<String>> getStringArray(String name)
      Gets value of a string array extension property.
      Parameters:
      name - the extension property name.
      Returns:
      the extension property value, if found; else empty.
    • getBoolean

      public Optional<Boolean> getBoolean(String name)
      Gets value of a boolean extension property.
      Parameters:
      name - the extension property name.
      Returns:
      the extension property value, if found; else empty.
    • getMap

      public Optional<Map<String,Object>> getMap(String name)
      Gets value of a map extension property.
      Parameters:
      name - the extension property name.
      Returns:
      the extension property value, if found; else empty.