-
-
Notifications
You must be signed in to change notification settings - Fork 0
Supported 'openapi‐generator‐maven‐plugin' Configuration options
The plugin openapi-generator-maven-plugin
has various configurations, <configuration>
, which will affect what will be generated and how it will be generated.
Since openapi-generator-maven-plugin
uses mustache to generate classes, overriding these mustache templates may result in classes being generated incorrectly, or not at all. Because of this, the following table will describe which configurations are supported, are inapplicable or are known to cause issues.
Important
This list of <configuration>
-options are sourced from openapi-generator-maven-plugin/README.md, and may not always be up-to-date. For this reason, please refer to the original source for the detailed description of each option. The version being used can be found in the pom.xml
-file.
Note
The options can be set either in the build <configuration>
-tag,
or by the complete property name prefixed by openapi.generator.maven.plugin.{option}
.
Tip
The following options are supported. See the second table for the remaining <configuration>
-options.
Option | Supported | Works as Designed | Additional Comments |
---|---|---|---|
generateModels |
✔️ | ✔️ | |
modelPackage |
✔️ | ✔️ | |
modelNamePrefix |
✔️ | ✔️ | |
modelNameSuffix |
✔️ | ✔️ | |
library |
❗ | ❗ | Planned to support okhttp-gson (default) and webclient
|
configOptions |
❗ | ❗ | Planned to support configOptions for okhttp-gson (default) and webclient
|
templateDirectory |
✔️ | ✔️ | Not Applicable. |
groupId |
✔️ | ✔️ | Not Applicable. |
artifactId |
✔️ | ✔️ | Not Applicable. |
artifactVersion |
✔️ | ✔️ | Not Applicable. |
Warning
The following options have not yet been evaluated, and may either be ignored or may cause issues. Use caution when using these options.
Option | Applicable | Checked | Works as Designed | Additional Comments |
---|---|---|---|---|
verbose |
||||
inputSpec |
||||
inputSpecRootDirectory |
||||
mergedFileName |
||||
language |
||||
generatorName |
||||
cleanupOutput |
||||
output |
||||
gitHost |
||||
gitUserId |
||||
gitRepoId |
||||
collapsedSpec |
||||
includeCollapsedSpecInArtifacts |
||||
templateResourcePath |
||||
engine |
||||
auth |
||||
configurationFile |
||||
skipOverwrite |
||||
apiPackage |
||||
invokerPackage |
||||
packageName |
||||
apiNameSuffix |
||||
ignoreFileOverride |
||||
httpUserAgent |
||||
removeOperationIdPrefix |
||||
skipOperationExample |
||||
logToStderr |
||||
enablePostProcessFile |
||||
skipValidateSpec |
||||
strictSpec |
||||
openapiNormalizer |
||||
generateAliasAsModel |
||||
instantiationTypes |
||||
importMappings |
||||
typeMappings |
||||
schemaMappings |
||||
nameMappings |
||||
modelNameMappings |
||||
parameterNameMappings |
||||
inlineSchemaNameMappings |
||||
inlineSchemaOptions |
||||
languageSpecificPrimitives |
||||
additionalProperties |
||||
serverVariableOverrides |
||||
reservedWordsMappings |
||||
generateApis |
||||
apisToGenerate |
||||
modelsToGenerate |
||||
generateSupportingFiles |
||||
supportingFilesToGenerate |
||||
generateModelTests |
||||
generateModelDocumentation |
||||
generateApiTests |
||||
generateApiDocumentation |
||||
skip |
||||
skipIfSpecIsUnchanged |
||||
addCompileSourceRoot |
||||
addTestCompileSourceRoot |
||||
dryRun |
||||
environmentVariables |
||||
globalProperties |
||||
configHelp |
Tip
The following options are supported and are completely optional. These can be enabled like so:
<configuration>
<configOptions>
<{option}>{value}</{option}>
</configOptions>
</configuration>
Option | Default value | Description |
---|---|---|
useEnumCaseInsensitive |
false |
Adds a case-insensitive parse-method fromValue(String) to each Enum class, if true . |
useJakartaEe |
false |
Annotates fields with @Nullable /@Nonnull . Uses @jakarta if true , otherwise @javax . |
Warning
Other <configOptions>
not listed here may either be ignored, or may cause issues. Use with caution.
©️ 2024 Chrimle