Interface OpenApiConfigProperty


@Internal public interface OpenApiConfigProperty
Supported configuration properties.
Since:
4.10.0
  • Field Details

    • MICRONAUT_OPENAPI_SCHEMA

      @Deprecated(forRemoval=true) static final String MICRONAUT_OPENAPI_SCHEMA
      Deprecated, for removal: This API element is subject to removal in a future version.
      Use `micronaut.openapi.schema.mapping` property instead
      Properties prefix to set custom schema implementations for selected classes. For example, if you want to set simple 'java.lang.String' class to some complex 'org.somepackage.MyComplexType' class you need to write:

      micronaut.openapi.schema.org.somepackage.MyComplexType=java.lang.String

      Also, you can set it in your application.yml file like this:

       micronaut:
         openapi:
           schema:
             org.somepackage.MyComplexType: java.lang.String
             org.somepackage.MyComplexType2: java.lang.Integer
       
      See Also:
    • MICRONAUT_OPENAPI_SCHEMA_PREFIX

      @Deprecated(forRemoval=true) static final String MICRONAUT_OPENAPI_SCHEMA_PREFIX
      Deprecated, for removal: This API element is subject to removal in a future version.
      Use `micronaut.openapi.schema.decorator.prefix` property instead
      Properties prefix to set schema name prefix or postfix by package. For example, if you have some classes with same names in different packages you can set postfix like this:

      micronaut.openapi.schema-postfix.org.api.v1_0_0=1_0_0 micronaut.openapi.schema-postfix.org.api.v2_0_0=2_0_0

      Also, you can set it in your application.yml file like this:

       micronaut:
         openapi:
           schema-postfix:
             org.api.v1_0_0: 1_0_0
             org.api.v2_0_0: 2_0_0
       
      See Also:
    • MICRONAUT_OPENAPI_SCHEMA_POSTFIX

      @Deprecated(forRemoval=true) static final String MICRONAUT_OPENAPI_SCHEMA_POSTFIX
      Deprecated, for removal: This API element is subject to removal in a future version.
      Use `micronaut.openapi.schema.decorator.postfix` property instead
      See Also:
    • MICRONAUT_SERVER_CONTEXT_PATH

      static final String MICRONAUT_SERVER_CONTEXT_PATH
      Loaded micronaut-http server context path property.
      See Also:
    • SPRING_SERVER_CONTEXT_PATH

      static final String SPRING_SERVER_CONTEXT_PATH
      Context path property for spring boot applications.
      See Also:
    • SPRING_WEBFLUX_BASE_PATH

      static final String SPRING_WEBFLUX_BASE_PATH
      Context path property for reactive spring boot applications.
      See Also:
    • MICRONAUT_JACKSON_JSON_VIEW_ENABLED

      static final String MICRONAUT_JACKSON_JSON_VIEW_ENABLED
      Loaded micronaut-http-server-netty property (json-view.enabled).
      See Also:
    • MICRONAUT_OPENAPI_ENABLED

      static final String MICRONAUT_OPENAPI_ENABLED
      System property that enables or disables open api annotation processing.
      Default: true
      See Also:
    • MICRONAUT_OPENAPI_31_ENABLED

      static final String MICRONAUT_OPENAPI_31_ENABLED
      System property that enables generating OpenAPI version 3.1.
      Default: false
      See Also:
    • MICRONAUT_OPENAPI_31_JSON_SCHEMA_DIALECT

      static final String MICRONAUT_OPENAPI_31_JSON_SCHEMA_DIALECT
      System property that specifies jsonSchemaDialect URI.
      See Also:
    • MICRONAUT_OPENAPI_CONFIG_FILE

      static final String MICRONAUT_OPENAPI_CONFIG_FILE
      System property that enables setting the open api config file.
      See Also:
    • MICRONAUT_OPENAPI_EXPAND_PREFIX

      static final String MICRONAUT_OPENAPI_EXPAND_PREFIX
      Prefix for expandable properties.
      See Also:
    • MICRONAUT_OPENAPI_CONTEXT_SERVER_PATH

      static final String MICRONAUT_OPENAPI_CONTEXT_SERVER_PATH
      System property for server context path.
      See Also:
    • MICRONAUT_OPENAPI_PROPERTY_NAMING_STRATEGY

      static final String MICRONAUT_OPENAPI_PROPERTY_NAMING_STRATEGY
      System property for naming strategy. One jackson PropertyNamingStrategy.
      See Also:
    • MICRONAUT_OPENAPI_VIEWS_SPEC

      static final String MICRONAUT_OPENAPI_VIEWS_SPEC
      System property for views specification.
      See Also:
    • MICRONAUT_OPENAPI_TARGET_FILE

      static final String MICRONAUT_OPENAPI_TARGET_FILE
      System property that enables setting the target file to write to.
      See Also:
    • MICRONAUT_OPENAPI_VIEWS_DEST_DIR

      static final String MICRONAUT_OPENAPI_VIEWS_DEST_DIR
      System property that specifies the path where the generated UI elements will be located.
      See Also:
    • MICRONAUT_OPENAPI_ADDITIONAL_FILES

      static final String MICRONAUT_OPENAPI_ADDITIONAL_FILES
      System property that specifies the location of additional swagger YAML and JSON files to read from.
      See Also:
    • MICRONAUT_OPENAPI_PROJECT_DIR

      static final String MICRONAUT_OPENAPI_PROJECT_DIR
      System property that specifies the location of current project.
      See Also:
    • MICRONAUT_OPENAPI_SECURITY_DEFAULT_SCHEMA_NAME

      static final String MICRONAUT_OPENAPI_SECURITY_DEFAULT_SCHEMA_NAME
      System property that specifies the default security schema name, if it's not specified by annotation SecurityScheme.
      See Also:
    • MICRONAUT_OPENAPI_FIELD_VISIBILITY_LEVEL

      static final String MICRONAUT_OPENAPI_FIELD_VISIBILITY_LEVEL
      System property that specifies the schema classes fields visibility level. By default, only public fields visible.

      Available values:

      PRIVATE PACKAGE PROTECTED PUBLIC
      See Also:
    • MICRONAUT_OPENAPI_JSON_FORMAT

      static final String MICRONAUT_OPENAPI_JSON_FORMAT
      Is this property true, output file format will be JSON, otherwise YAML.
      See Also:
    • MICRONAUT_OPENAPI_FILENAME

      static final String MICRONAUT_OPENAPI_FILENAME
      The name of the result swagger file.

      Default filename is <info.title>-<info.version>.yml. If info annotation not set, filename will be swagger.yml.

      See Also:
    • MICRONAUT_OPENAPI_ENVIRONMENTS

      static final String MICRONAUT_OPENAPI_ENVIRONMENTS
      Active micronaut environments which will be used for @Requires annotations.
      See Also:
    • MICRONAUT_ENVIRONMENT_ENABLED

      static final String MICRONAUT_ENVIRONMENT_ENABLED
      Is this property true, properties wll be loaded in the standard way from application.yml. Also, environments from "micronaut.openapi.environments" property will set as additional environments, if you want to set specific environment name for openAPI generator.
      Default value is "true".
      See Also:
    • MICRONAUT_OPENAPI_SECURITY_ENABLED

      static final String MICRONAUT_OPENAPI_SECURITY_ENABLED
      Is this property true, micronaut-openapi will process micronaut-security properties and annotations to construct openapi security schema.
      Default value is "true".
      See Also:
    • MICRONAUT_OPENAPI_VERSIONING_ENABLED

      static final String MICRONAUT_OPENAPI_VERSIONING_ENABLED
      Is this property true, micronaut-openapi will process micronaut-router versioning properties and annotations.
      Default value is "true".
      See Also:
    • MICRONAUT_CONFIG_FILE_LOCATIONS

      static final String MICRONAUT_CONFIG_FILE_LOCATIONS
      Config file locations. By default, micronaut-openapi search config in standard path: <project_path>/src/main/resources/

      You can set your custom paths separated by ','. To set absolute paths use prefix 'file:', classpath paths use prefix 'classpath:' or use prefix 'project:' to set paths from project directory.

      See Also:
    • MICRONAUT_OPENAPI_JSON_VIEW_DEFAULT_INCLUSION

      static final String MICRONAUT_OPENAPI_JSON_VIEW_DEFAULT_INCLUSION
      Property that determines whether properties that have no view annotations are included in JSON serialization views. If enabled, non-annotated properties will be included; when disabled, they will be excluded.
      Default value is "true".
      See Also:
    • MICRONAUT_APPLICATION_NAME

      static final String MICRONAUT_APPLICATION_NAME
      micronaut-context application name property.
      See Also:
    • SPRING_APPLICATION_NAME

      static final String SPRING_APPLICATION_NAME
      spring-context application name property.
      See Also:
    • MICRONAUT_OPENAPI_SWAGGER_FILE_GENERATION_ENABLED

      static final String MICRONAUT_OPENAPI_SWAGGER_FILE_GENERATION_ENABLED
      If this property is 'true', then generated OpenAPI specification will be with extensions for OpenAPI Generator and the generated client according to this specification will be much more accurate than without it. For example, enumerations will be described with extensions `x-enum-varnames`, `x-enum-descriptions` and `x-deprecated`.
      Default: false
      See Also:
    • MICRONAUT_OPENAPI_SCHEMA_EXTRA_ENABLED

      static final String MICRONAUT_OPENAPI_SCHEMA_EXTRA_ENABLED
      System property that enables extra schema processing.
      See Also:
    • MICRONAUT_OPENAPI_SCHEMA_DUPLICATE_RESOLUTION

      static final String MICRONAUT_OPENAPI_SCHEMA_DUPLICATE_RESOLUTION
      System property to set schema duplicate resolution. Available values: - auto - micronaut-openapi automatically add index suffix to duplicate schema. - error - micronaut-openapi throws an exception when found duplicate schema.
      Default: auto
      See Also:
    • MICRONAUT_OPENAPI_SCHEMA_NAME_SEPARATOR_EMPTY

      static final String MICRONAUT_OPENAPI_SCHEMA_NAME_SEPARATOR_EMPTY
      System property that enables or disables schema name separator for generics and inner classes. If it's true separators will be skipped. For example, schema name for class with name MyClass.MyInnerClass<MyGeneric1, MyGeneric2> will be MyClassMyInnerClassMyGeneric1MyGeneric2
      Default: false
      See Also:
    • MICRONAUT_OPENAPI_SCHEMA_NAME_SEPARATOR_GENERIC

      static final String MICRONAUT_OPENAPI_SCHEMA_NAME_SEPARATOR_GENERIC
      System property to set custom separator for generic classes. By default, it is "_".
      Default: _
      See Also:
    • MICRONAUT_OPENAPI_SCHEMA_NAME_SEPARATOR_INNER_CLASS

      static final String MICRONAUT_OPENAPI_SCHEMA_NAME_SEPARATOR_INNER_CLASS
      System property to set custom separator for inner classes. By default, it is ".".
      Default: .
      See Also:
    • MICRONAUT_OPENAPI_GENERATOR_EXTENSIONS_ENABLED

      static final String MICRONAUT_OPENAPI_GENERATOR_EXTENSIONS_ENABLED
      If this property is 'true', then generated OpenAPI specification will be with extensions for OpenAPI Generator and the generated client according to this specification will be much more accurate than without it.

      For example, enumerations will be described with extensions `x-enum-varnames`, `x-enum-descriptions` and `x-deprecated`.
      Default: true

      See Also:
    • MICRONAUT_OPENAPI_SCHEMA_MAPPING

      static final String MICRONAUT_OPENAPI_SCHEMA_MAPPING
      Properties prefix to set custom schema implementations for selected classes. For example, if you want to set simple 'java.lang.String' class to some complex 'org.somepackage.MyComplexType' class you need to write:

      micronaut.openapi.schema.mapping.org.somepackage.MyComplexType=java.lang.String

      Also, you can set it in your application.yml file like this:

       micronaut:
         openapi:
           schema:
             mapping:
               org.somepackage.MyComplexType: java.lang.String
               org.somepackage.MyComplexType2: java.lang.Integer
       
      ...
      See Also:
    • MICRONAUT_OPENAPI_SCHEMA_DECORATOR_PREFIX

      static final String MICRONAUT_OPENAPI_SCHEMA_DECORATOR_PREFIX
      Properties prefix to set schema name prefix or postfix by package. For example, if you have some classes with same names in different packages you can set postfix like this:

      micronaut.openapi.schema.decorator.postfix.org.api.v1_0_0=1_0_0 micronaut.openapi.schema.decorator.postfix.org.api.v2_0_0=2_0_0

      Also, you can set it in your application.yml file like this:

       micronaut:
         openapi:
           schema:
             decorator:
               postfix:
                 org.api.v1_0_0: 1_0_0
                 org.api.v2_0_0: 2_0_0
       
      See Also:
    • MICRONAUT_OPENAPI_SCHEMA_DECORATOR_POSTFIX

      static final String MICRONAUT_OPENAPI_SCHEMA_DECORATOR_POSTFIX
      See Also:
    • MICRONAUT_OPENAPI_GROUPS

      static final String MICRONAUT_OPENAPI_GROUPS
      Properties prefix to set custom schema implementations for selected classes. For example, if you want to set simple 'java.lang.String' class to some complex 'org.somepackage.MyComplexType' class you need to write:

      -Dmicronaut.openapi.group.my-group1.title="Title 1"

      Also, you can set it in your application.yml file like this:

       micronaut:
         openapi:
           group:
             my-group1:
               title: Title 1
               filename: swagger-${group}-${apiVersion}-${version}.yml
             my-group2:
               title: Title 2
       
      See Also:
    • MICRONAUT_OPENAPI_ADOC_TEMPLATE_PREFIX

      static final String MICRONAUT_OPENAPI_ADOC_TEMPLATE_PREFIX
      Prefix for custom sub-template names.
      See Also:
    • MICRONAUT_OPENAPI_ADOC_ENABLED

      static final String MICRONAUT_OPENAPI_ADOC_ENABLED
      Is conversion to Asciidoc enabled.
      See Also:
    • MICRONAUT_OPENAPI_ADOC_TEMPLATES_DIR_PATH

      static final String MICRONAUT_OPENAPI_ADOC_TEMPLATES_DIR_PATH
      Custom template directory.
      See Also:
    • MICRONAUT_OPENAPI_ADOC_TEMPLATE_FILENAME

      static final String MICRONAUT_OPENAPI_ADOC_TEMPLATE_FILENAME
      Custom final template filename.
      See Also:
    • MICRONAUT_OPENAPI_ADOC_OUTPUT_DIR_PATH

      static final String MICRONAUT_OPENAPI_ADOC_OUTPUT_DIR_PATH
      Result adoc file output directory.
      See Also:
    • MICRONAUT_OPENAPI_ADOC_OUTPUT_FILENAME

      static final String MICRONAUT_OPENAPI_ADOC_OUTPUT_FILENAME
      Result adoc filename.
      See Also:
    • MICRONAUT_OPENAPI_ADOC_OPENAPI_PATH

      static final String MICRONAUT_OPENAPI_ADOC_OPENAPI_PATH
      OpenAPI file path.
      See Also:
    • OPENAPI_CONFIG_FILE

      static final String OPENAPI_CONFIG_FILE
      Default openapi config file.
      See Also:
    • ALL

      static final Set<String> ALL
      All supported annotation processor properties.