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
[General] Remove defunct global property withXml from generator, docs, maven & gradle plugin (#18568)
* Mention that Golang generator also supports XML annotations
Looking at src/main/resources/go/model_simple.mustache and
src/main/java/org/openapitools/codegen/languages/GoClientCodegen.java
the GoLang seems to cater for withXml=true
* Fix maven plugin config description for `withXml`
* Add basic test for global withXml setting
* Use global withXml setting if not configured in ConfigOptions
Resolves#3839 and #5764
* Don't generate metadata or other files when only Models are tested
* Reformat table for readability
* Remove global property `withXml` from generator and docs
* Move WITH_XML constant out of system constants block
Currently there is only a single reference to this value in the whole
codebase (GoClientOptionsProvider). Maybe we should re-think how this
file is organised (i.e. provide a clearer split / mapping / understanding
what are system properties vs. global properties vs. configOptions and
where to put them).
* Remove global option `withXml` from Maven plugin (Breaking change)
This is a "soft" breaking change: Plugin will no longer execute if
user have this option – which is good, b/c it never worked as expected.
We may want to hint this in the 8.0 release notes.
* Remove global property `withXml` from Gradle plugin (Breaking change)
This is a "soft" breaking change: Plugin will no longer execute if
user have this option – which is good, b/c it never worked as expected.
We may want to hint this in the 8.0 release notes, so they can add it
to the `configOptions` map if required, or simply delete it
* Update samples to reflect removed `withXml` property
* Move `withXml` option into ConfigOptions for Java Microprofile sample
* Remove unused local vars and parameters
* Avoid repetition using fluent assertions
* Remove extraneous debug output
Copy file name to clipboardExpand all lines: docs/global-properties.md
+16-17
Original file line number
Diff line number
Diff line change
@@ -5,23 +5,22 @@ title: Global Properties
5
5
6
6
## Available Global Properties
7
7
8
-
| Property | Description | Acceptable value |
9
-
| -------- | ------------| ---------------- |
10
-
| debugOpenAPI | Dumps JSON formatted and fully parsed OpenAPI document during generation | none |
11
-
| debugModels | Dumps JSON formatted template-bound model information during generation | none |
12
-
| debugOperations | Dumps JSON formatted template-bound operation information during generation | none |
13
-
| debugSupportingFiles | Dumps JSON formatted Supporting File information during generation | none |
14
-
| verbose | Defines the verbosity |`true` or `false`|
15
-
| generateAliasAsModel | Defines whether primitive types defined at the model/schema level will be wrapped in a model |`true` or `false`|
16
-
| org.openapitools.codegen.utils.oncelogger.enabled | Enable/disable the "OnceLogger" which reduces noise for select repeated logs |`true` or `false`|
17
-
| supportingFiles | Allows the user to define which supporting files will be generated. Prefer using the more robust `.openapi-generator-ignore`. | no value, or a colon-separated string of file names |
18
-
| models | Allows the user to define which models will be generated. Prefer using the more robust `.openapi-generator-ignore`. | no value, or a colon-separated string of model names |
19
-
| apis | Allows the user to define which apis will be generated. Prefer using the more robust `.openapi-generator-ignore`. | no value, or a colon-separated string of api names |
20
-
| apiDocs | Allows the user to define if api docs will be generated. Prefer using the more robust `.openapi-generator-ignore`. |`true` or `false`|
21
-
| modelDocs | Allows the user to define if model docs will be generated. Prefer using the more robust `.openapi-generator-ignore`. |`true` or `false`|
22
-
| apiTests | Allows the user to define if api tests will be generated. Prefer using the more robust `.openapi-generator-ignore`. |`true` or `false`|
23
-
| modelTests | Allows the user to define if model tests will be generated. Prefer using the more robust `.openapi-generator-ignore`. |`true` or `false`|
24
-
| withXml | Allows the user to control support of XML generated constructs, where supported | none |
| debugOpenAPI | Dumps JSON formatted and fully parsed OpenAPI document during generation | none |
11
+
| debugModels | Dumps JSON formatted template-bound model information during generation | none |
12
+
| debugOperations | Dumps JSON formatted template-bound operation information during generation | none |
13
+
| debugSupportingFiles | Dumps JSON formatted Supporting File information during generation | none |
14
+
| verbose | Defines the verbosity |`true` or `false`|
15
+
| generateAliasAsModel | Defines whether primitive types defined at the model/schema level will be wrapped in a model |`true` or `false`|
16
+
| org.openapitools.codegen.utils.oncelogger.enabled | Enable/disable the "OnceLogger" which reduces noise for select repeated logs |`true` or `false`|
17
+
| supportingFiles | Allows the user to define which supporting files will be generated. Prefer using the more robust `.openapi-generator-ignore`. | no value, or a colon-separated string of file names |
18
+
| models | Allows the user to define which models will be generated. Prefer using the more robust `.openapi-generator-ignore`. | no value, or a colon-separated string of model names |
19
+
| apis | Allows the user to define which apis will be generated. Prefer using the more robust `.openapi-generator-ignore`. | no value, or a colon-separated string of api names |
20
+
| apiDocs | Allows the user to define if api docs will be generated. Prefer using the more robust `.openapi-generator-ignore`. |`true` or `false`|
21
+
| modelDocs | Allows the user to define if model docs will be generated. Prefer using the more robust `.openapi-generator-ignore`. |`true` or `false`|
22
+
| apiTests | Allows the user to define if api tests will be generated. Prefer using the more robust `.openapi-generator-ignore`. |`true` or `false`|
23
+
| modelTests | Allows the user to define if model tests will be generated. Prefer using the more robust `.openapi-generator-ignore`. |`true` or `false`|
Copy file name to clipboardExpand all lines: modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/OpenApiGeneratorPlugin.kt
-1
Original file line number
Diff line number
Diff line change
@@ -144,7 +144,6 @@ class OpenApiGeneratorPlugin : Plugin<Project> {
Copy file name to clipboardExpand all lines: modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/extensions/OpenApiGeneratorGenerateExtension.kt
-7
Original file line number
Diff line number
Diff line change
@@ -342,12 +342,6 @@ open class OpenApiGeneratorGenerateExtension(project: Project) {
342
342
*/
343
343
val generateApiDocumentation = project.objects.property<Boolean>()
344
344
345
-
/**
346
-
* A special-case setting which configures some generators with XML support. In some cases,
347
-
* this forces json OR xml, so the default here is false.
348
-
*/
349
-
val withXml = project.objects.property<Boolean>()
350
-
351
345
/**
352
346
* To write all log messages (not just errors) to STDOUT
353
347
*/
@@ -408,7 +402,6 @@ open class OpenApiGeneratorGenerateExtension(project: Project) {
Copy file name to clipboardExpand all lines: modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/tasks/GenerateTask.kt
-12
Original file line number
Diff line number
Diff line change
@@ -506,14 +506,6 @@ open class GenerateTask @Inject constructor(private val objectFactory: ObjectFac
506
506
@Input
507
507
val generateApiDocumentation = project.objects.property<Boolean>()
508
508
509
-
/**
510
-
* A special-case setting which configures some generators with XML support. In some cases,
511
-
* this forces json OR xml, so the default here is false.
512
-
*/
513
-
@Optional
514
-
@Input
515
-
val withXml = project.objects.property<Boolean>()
516
-
517
509
/**
518
510
* To write all log messages (not just errors) to STDOUT
519
511
*/
@@ -680,10 +672,6 @@ open class GenerateTask @Inject constructor(private val objectFactory: ObjectFac
Copy file name to clipboardExpand all lines: modules/openapi-generator-maven-plugin/README.md
-1
Original file line number
Diff line number
Diff line change
@@ -107,7 +107,6 @@ mvn clean compile
107
107
| `generateModelDocumentation` | `openapi.generator.maven.plugin.generateModelDocumentation` | generate the model documentation (`true` by default. Only available if `generateModels` is `true`)
108
108
| `generateApiTests` | `openapi.generator.maven.plugin.generateApiTests` | generate the api tests (`true` by default. Only available if `generateApis` is `true`)
109
109
| `generateApiDocumentation` | `openapi.generator.maven.plugin.generateApiDocumentation` | generate the api documentation (`true` by default. Only available if `generateApis` is `true`)
110
-
| `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)
111
110
| `skip` | `codegen.skip` | skip code generation (`false` by default. Can also be set globally through the `codegen.skip` property)
112
111
| `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)
113
112
| `addCompileSourceRoot` | `openapi.generator.maven.plugin.addCompileSourceRoot` | Add the output directory to the project as a source root, so that the generated java types are compiled and included in the project artifact (`true` by default). Mutually exclusive with `addTestCompileSourceRoot`.
0 commit comments