| additionalModelTypeAnnotations | Additional annotations for model type(class level annotations). List separated by semicolon(;) or new line (Linux or Windows) | | null |
| annotationLibrary | Select the complementary documentation annotation library. | - none
- Do not annotate Model and Api with complementary annotations.
- swagger1
- Annotate Model and Api using the Swagger Annotations 1.x library.
- swagger2
- Annotate Model and Api using the Swagger Annotations 2.x library.
| swagger2 |
| apiPackage | api package for generated code | | org.openapitools.api |
| apiSuffix | suffix for api classes | | Api |
| artifactId | Generated artifact id (name of jar). | | openapi-spring |
| artifactVersion | Generated artifact's package version. | | 1.0.0 |
| basePackage | base package (invokerPackage) for generated code | | org.openapitools |
| beanQualifiers | Whether to add fully-qualifier class names as bean qualifiers in @Component and @RestController annotations. May be used to prevent bean names clash if multiple generated libraries (contexts) added to single project. | | false |
| configPackage | configuration package for generated code | | org.openapitools.configuration |
| declarativeInterfaceReactiveMode | What type of reactive style to use in Spring Http declarative interface | - coroutines
- Use kotlin-idiomatic 'suspend' functions
- reactor
- Use reactor return wrappers 'Mono' and 'Flux'
| coroutines |
| delegatePattern | Whether to generate the server files using the delegate pattern | | false |
| documentationProvider | Select the OpenAPI documentation provider. | - none
- Do not publish an OpenAPI specification.
- source
- Publish the original input OpenAPI specification.
- springfox
- Generate an OpenAPI 2 (fka Swagger RESTful API Documentation Specification) specification using SpringFox 2.x. Deprecated (for removal); use springdoc instead.
- springdoc
- Generate an OpenAPI 3 specification using SpringDoc.
| springdoc |
| enumPropertyNaming | Naming convention for enum properties: 'camelCase', 'PascalCase', 'snake_case', 'UPPERCASE', and 'original' | | original |
| exceptionHandler | generate default global exception handlers (not compatible with reactive. enabling reactive will disable exceptionHandler ) | | true |
| gradleBuildFile | generate a gradle build file using the Kotlin DSL | | true |
| groupId | Generated artifact package's organization (i.e. maven groupId). | | org.openapitools |
| includeHttpRequestContext | Whether to include HttpServletRequest (blocking) or ServerWebExchange (reactive) as additional parameter in generated methods. | | false |
| interfaceOnly | Whether to generate only API interface stubs without the server files. | | false |
| library | library template (sub-template) | - spring-boot
- Spring-boot Server application.
- spring-cloud
- Spring-Cloud-Feign client with Spring-Boot auto-configured settings.
- spring-declarative-http-interface
- Spring Declarative Interface client
| spring-boot |
| modelMutable | Create mutable models | | false |
| modelPackage | model package for generated code | | org.openapitools.model |
| packageName | Generated artifact package name. | | org.openapitools |
| parcelizeModels | toggle "@Parcelize" for generated models | | null |
| reactive | use coroutines for reactive behavior | | false |
| requestMappingMode | Where to generate the class level @RequestMapping annotation. | - api_interface
- Generate the @RequestMapping annotation on the generated Api Interface.
- controller
- Generate the @RequestMapping annotation on the generated Api Controller Implementation.
- none
- Do not add a class level @RequestMapping annotation.
| controller |
| schemaImplements | A map of single interface or a list of interfaces per schema name that should be implemented (serves similar purpose as x-kotlin-implements, but is fully decoupled from the api spec). Example: yaml schemaImplements: {Pet: com.some.pack.WithId, Category: [com.some.pack.CategoryInterface], Dog: [com.some.pack.Canine, com.some.pack.OtherInterface]} implements interfaces in schemas Pet (interface com.some.pack.WithId), Category (interface com.some.pack.CategoryInterface), Dog(interfaces com.some.pack.Canine, com.some.pack.OtherInterface) | | empty map |
| schemaImplementsFields | A map of single field or a list of fields per schema name that should be prepended with override (serves similar purpose as x-kotlin-implements-fields, but is fully decoupled from the api spec). Example: yaml schemaImplementsFields: {Pet: id, Category: [name, id], Dog: [bark, breed]} marks fields to be prepended with override in schemas Pet (field id), Category (fields name, id) and Dog (fields bark, breed) | | empty map |
| serializableModel | boolean - toggle "implements Serializable" for generated models | | null |
| serverPort | configuration the port in which the sever is to run on | | 8080 |
| serviceImplementation | generate stub service implementations that extends service interfaces. If this is set to true service interfaces will also be generated | | false |
| serviceInterface | generate service interfaces to go alongside controllers. In most cases this option would be used to update an existing project, so not to override implementations. Useful to help facilitate the generation gap pattern | | false |
| skipDefaultInterface | Whether to skip generation of default implementations for interfaces (Api interfaces or Delegate interfaces depending on the delegatePattern option) | | false |
| sortModelPropertiesByRequiredFlag | Sort model properties to place required parameters before optional parameters. | | null |
| sortParamsByRequiredFlag | Sort method arguments to place required parameters before optional parameters. | | null |
| sourceFolder | source folder for generated code | | src/main/kotlin |
| title | server title name or client service name | | OpenAPI Kotlin Spring |
| useBeanValidation | Use BeanValidation API annotations to validate data types | | true |
| useFeignClientUrl | Whether to generate Feign client with url parameter. | | true |
| useFlowForArrayReturnType | Whether to use Flow for array/collection return types when reactive is enabled. If false, will use List instead. | | true |
| useResponseEntity | Whether (when false) to return actual type (e.g. List<Fruit>) and handle non-happy path responses via exceptions flow or (when true) return entire ResponseEntity (e.g. ResponseEntity<List<Fruit>>). If disabled, method are annotated using a @ResponseStatus annotation, which has the status of the first response declared in the Api definition | | true |
| useSpringBoot3 | Generate code and provide dependencies for use with Spring Boot ≥ 3 (use jakarta instead of javax in imports). Enabling this option will also enable useJakartaEe. | | false |
| useSwaggerUI | Open the OpenApi specification in swagger-ui. Will also import and configure needed dependencies | | true |
| useTags | Whether to use tags for creating interface and controller class names | | false |
| xKotlinImplementsFieldsSkip | A list of fields per schema name that should NOT be created with override keyword despite their presence in vendor extension x-kotlin-implements-fields for the schema. Example: yaml xKotlinImplementsFieldsSkip: Pet: [photoUrls] skips override for photoUrls in schema Pet | | empty map |
| xKotlinImplementsSkip | A list of fully qualified interfaces that should NOT be implemented despite their presence in vendor extension x-kotlin-implements. Example: yaml xKotlinImplementsSkip: [com.some.pack.WithPhotoUrls] skips implementing the interface in any schema | | empty list |