You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: modules/openapi-generator-maven-plugin/README.md
+50-45Lines changed: 50 additions & 45 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -39,51 +39,56 @@ mvn clean compile
39
39
40
40
:bulb: These **general** configurations should be in the same level
41
41
42
-
-`inputSpec` - OpenAPI Spec file path
43
-
-`language` - target generation language (deprecated, replaced by `generatorName` as values here don't represent only 'language' any longer)
44
-
-`generatorName` - target generator name
45
-
-`output` - target output path (default is `${project.build.directory}/generated-sources/openapi`. Can also be set globally through the `openapi.generator.maven.plugin.output` property)
46
-
-`templateDirectory` - directory with mustache templates
47
-
-`addCompileSourceRoot` - add the output directory to the project as a source root (`true` by default)
48
-
-`modelPackage` - the package to use for generated model objects/classes
49
-
-`apiPackage` - the package to use for generated api objects/classes
50
-
-`invokerPackage` - the package to use for the generated invoker objects
51
-
-`modelNamePrefix` and `modelNameSuffix` - Sets the pre- or suffix for model classes and enums
52
-
-`withXml` - enable XML annotations inside the generated models and API (only works with Java `language` and libraries that provide support for JSON and XML)
53
-
-`configOptions` - a map of language-specific parameters. To show a full list of generator-specified parameters (options), please use `configHelp` (explained below)
54
-
-`configHelp` - dumps the configuration help for the specified library (generates no sources)
55
-
-`ignoreFileOverride` - specifies the full path to a `.openapi-generator-ignore` used for pattern based overrides of generated outputs
-`skipValidateSpec` - Whether or not to skip validating the input spec prior to generation. By default, invalid specifications will result in an error.
60
-
-`strictSpec` - Whether or not to treat an input document strictly against the spec. 'MUST' and 'SHALL' wording in OpenAPI spec is strictly adhered to. e.g. when false, no fixes will be applied to documents which pass validation but don't follow the spec.
61
-
-`generateAliasAsModel` - generate alias (array, map) as model
62
-
-`generateApis` - generate the apis (`true` by default)
63
-
-`generateApiTests` - generate the api tests (`true` by default. Only available if `generateApis` is `true`)
64
-
-`generateApiDocumentation` - generate the api documentation (`true` by default. Only available if `generateApis` is `true`)
65
-
-`generateModels` - generate the models (`true` by default)
66
-
-`modelsToGenerate` - A comma separated list of models to generate. All models is the default.
67
-
-`generateModelTests` - generate the model tests (`true` by default. Only available if `generateModels` is `true`)
68
-
-`generateModelDocumentation` - generate the model documentation (`true` by default. Only available if `generateModels` is `true`)
69
-
-`generateSupportingFiles` - generate the supporting files (`true` by default)
70
-
-`supportingFilesToGenerate` - A comma separated list of supporting files to generate. All files is the default.
71
-
-`skip` - skip code generation (`false` by default. Can also be set globally through the `codegen.skip` property)
72
-
-`verbose` - verbose mode (`false` by default)
73
-
-`groupId`, `artifactId` and `artifactVersion` - sets project information in generated pom.xml/build.gradle or other build script. Language-specific conversions occur in non-jvm generators
74
-
-`gitUserId` and `gitRepoId` - sets git information of the project
75
-
-`auth` - adds authorization headers when fetching the OpenAPI definitions remotely. Pass in a URL-encoded string of `name:header` with a comma separating multiple values
76
-
-`configurationFile` - Path to separate json configuration file. File content should be in a json format {"optionKey":"optionValue", "optionKey1":"optionValue1"...} Supported options can be different for each language. Run `config-help -g {generator name}` command for language specific config options
77
-
-`skipOverwrite` - Specifies if the existing files should be overwritten during the generation. (`false` by default)
78
-
-`library` - library template (sub-template)
79
-
-`instantiationTypes` - sets instantiation type mappings in the format of type=instantiatedType,type=instantiatedType. For example (in Java): `array=ArrayList,map=HashMap`. In other words array types will get instantiated as ArrayList in generated code. You can also have multiple occurrences of this option
80
-
-`importMappings` - specifies mappings between a given class and the import that should be used for that class in the format of type=import,type=import. You can also have multiple occurrences of this option
81
-
-`typeMappings` - sets mappings between OpenAPI spec types and generated code types in the format of OpenAPIType=generatedType,OpenAPIType=generatedType. For example: `array=List,map=Map,string=String`. You can also have multiple occurrences of this option
82
-
-`languageSpecificPrimitives` - specifies additional language specific primitive types in the format of type1,type2,type3,type3. For example: `String,boolean,Boolean,Double`. You can also have multiple occurrences of this option
83
-
-`additionalProperties` - sets additional properties that can be referenced by the mustache templates in the format of name=value,name=value. You can also have multiple occurrences of this option
84
-
-`reservedWordsMappings` - specifies how a reserved name should be escaped to. Otherwise, the default `_<name>` is used. For example `id=identifier`. You can also have multiple occurrences of this option
85
-
-`skipIfSpecIsUnchanged` - Skip the execution if the source file is older than the output folder (`false` by default. Can also be set globally through the `codegen.skipIfSpecIsUnchanged` property)
86
-
-`engine` - The name of templating engine to use, "mustache" (default) or "handlebars" (beta)
| `language` | `openapi.generator.maven.plugin.language` | target generation language (deprecated, replaced by `generatorName` as values here don't represent only 'language' any longer)
46
+
| `generatorName` | `openapi.generator.maven.plugin.generatorName` | target generator name
47
+
| `output` | `openapi.generator.maven.plugin.output` | target output path (default is `${project.build.directory}/generated-sources/openapi`. Can also be set globally through the `openapi.generator.maven.plugin.output` property)
48
+
| `templateDirectory` | `openapi.generator.maven.plugin.templateDirectory` | directory with mustache templates
49
+
| `addCompileSourceRoot` | `openapi.generator.maven.plugin.addCompileSourceRoot` | add the output directory to the project as a source root (`true` by default)
50
+
| `modelPackage` | `openapi.generator.maven.plugin.modelPackage` | the package to use for generated model objects/classes
51
+
| `apiPackage` | `openapi.generator.maven.plugin.apiPackage` | the package to use for generated api objects/classes
52
+
| `invokerPackage` | `openapi.generator.maven.plugin.invokerPackage` | the package to use for the generated invoker objects
53
+
| `modelNamePrefix` | `openapi.generator.maven.plugin.modelNamePrefix` | Sets the prefix for model classes and enums
54
+
| `modelNameSuffix` | `openapi.generator.maven.plugin.modelNameSuffix` | Sets the suffix for model classes and enums
55
+
| `withXml` | `openapi.generator.maven.plugin.withXml` | enable XML annotations inside the generated models and API (only works with Java `language` and libraries that provide support for JSON and XML)
56
+
| `configOptions` | N/A | a map of language-specific parameters. To show a full list of generator-specified parameters (options), please use `configHelp` (explained below)
57
+
| `configHelp` | `codegen.configHelp` | dumps the configuration help for the specified library (generates no sources)
58
+
| `ignoreFileOverride` | `openapi.generator.maven.plugin.ignoreFileOverride` | specifies the full path to a `.openapi-generator-ignore` used for pattern based overrides of generated outputs
| `skipValidateSpec` | `openapi.generator.maven.plugin.skipValidateSpec` | Whether or not to skip validating the input spec prior to generation. By default, invalid specifications will result in an error.
63
+
| `strictSpec` | `openapi.generator.maven.plugin.strictSpec` | Whether or not to treat an input document strictly against the spec. 'MUST' and 'SHALL' wording in OpenAPI spec is strictly adhered to. e.g. when false, no fixes will be applied to documents which pass validation but don't follow the spec.
64
+
| `generateAliasAsModel` | `openapi.generator.maven.plugin.generateAliasAsModel` | generate alias (array, map) as model
65
+
| `generateApis` | `openapi.generator.maven.plugin.generateApis` | generate the apis (`true` by default)
66
+
| `generateApiTests` | `openapi.generator.maven.plugin.generateApiTests` | generate the api tests (`true` by default. Only available if `generateApis` is `true`)
67
+
| `generateApiDocumentation` | `openapi.generator.maven.plugin.generateApiDocumentation` | generate the api documentation (`true` by default. Only available if `generateApis` is `true`)
68
+
| `generateModels` | `openapi.generator.maven.plugin.generateModels` | generate the models (`true` by default)
69
+
| `modelsToGenerate` | `openapi.generator.maven.plugin.modelsToGenerate` | A comma separated list of models to generate. All models is the default.
70
+
| `generateModelTests` | `openapi.generator.maven.plugin.generateModelTests` | generate the model tests (`true` by default. Only available if `generateModels` is `true`)
71
+
| `generateModelDocumentation` | `openapi.generator.maven.plugin.generateModelDocumentation` | generate the model documentation (`true` by default. Only available if `generateModels` is `true`)
72
+
| `generateSupportingFiles` | `openapi.generator.maven.plugin.generateSupportingFiles` | generate the supporting files (`true` by default)
73
+
| `supportingFilesToGenerate` | `openapi.generator.maven.plugin.supportingFilesToGenerate` | A comma separated list of supporting files to generate. All files is the default.
74
+
| `skip` | `codegen.skip` | skip code generation (`false` by default. Can also be set globally through the `codegen.skip` property)
75
+
| `verbose` | `openapi.generator.maven.plugin.verbose` | verbose mode (`false` by default)
76
+
| `groupId` | `openapi.generator.maven.plugin.groupId` | sets project information in generated pom.xml/build.gradle or other build script. Language-specific conversions occur in non-jvm generators
77
+
| `artifactId` | `openapi.generator.maven.plugin.artifactId` | sets project information in generated pom.xml/build.gradle or other build script. Language-specific conversions occur in non-jvm generators
78
+
| `artifactVersion` | `openapi.generator.maven.plugin.artifactVersion` | sets project information in generated pom.xml/build.gradle or other build script. Language-specific conversions occur in non-jvm generators
79
+
| `gitUserId` and `gitRepoId` | `openapi.generator.maven.plugin.gitUserId` | sets git information of the project
80
+
| `auth` | `openapi.generator.maven.plugin.auth` | adds authorization headers when fetching the OpenAPI definitions remotely. Pass in a URL-encoded string of `name:header` with a comma separating multiple values
81
+
| `configurationFile` | `openapi.generator.maven.plugin.configurationFile` | Path to separate json configuration file. File content should be in a json format {"optionKey":"optionValue", "optionKey1":"optionValue1"...} Supported options can be different for each language. Run `config-help -g {generator name}` command for language specific config options
82
+
| `skipOverwrite` | `openapi.generator.maven.plugin.skipOverwrite` | Specifies if the existing files should be overwritten during the generation. (`false` by default)
| `instantiationTypes` | `openapi.generator.maven.plugin.instantiationTypes` | sets instantiation type mappings in the format of type=instantiatedType,type=instantiatedType. For example (in Java): `array=ArrayList,map=HashMap`. In other words array types will get instantiated as ArrayList in generated code. You can also have multiple occurrences of this option
85
+
| `importMappings` | `openapi.generator.maven.plugin.importMappings` | specifies mappings between a given class and the import that should be used for that class in the format of type=import,type=import. You can also have multiple occurrences of this option
86
+
| `typeMappings` | `openapi.generator.maven.plugin.typeMappings` | sets mappings between OpenAPI spec types and generated code types in the format of OpenAPIType=generatedType,OpenAPIType=generatedType. For example: `array=List,map=Map,string=String`. You can also have multiple occurrences of this option
87
+
| `languageSpecificPrimitives` | `openapi.generator.maven.plugin.languageSpecificPrimitives` | specifies additional language specific primitive types in the format of type1,type2,type3,type3. For example: `String,boolean,Boolean,Double`. You can also have multiple occurrences of this option
88
+
| `additionalProperties` | `openapi.generator.maven.plugin.additionalProperties` | sets additional properties that can be referenced by the mustache templates in the format of name=value,name=value. You can also have multiple occurrences of this option
89
+
| `reservedWordsMappings` | `openapi.generator.maven.plugin.reservedWordsMappings` | specifies how a reserved name should be escaped to. Otherwise, the default `_<name>` is used. For example `id=identifier`. You can also have multiple occurrences of this option
90
+
| `skipIfSpecIsUnchanged` | `codegen.skipIfSpecIsUnchanged` | Skip the execution if the source file is older than the output folder (`false` by default. Can also be set globally through the `codegen.skipIfSpecIsUnchanged` property)
91
+
| `engine` | `openapi.generator.maven.plugin.engine` | The name of templating engine to use, "mustache" (default) or "handlebars" (beta)
0 commit comments