Skip to content

Commit

Permalink
Remove global property withXml from Gradle plugin (Breaking change)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Philzen committed May 21, 2024
1 parent 772c1ba commit 1decced
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 25 deletions.
5 changes: 0 additions & 5 deletions modules/openapi-generator-gradle-plugin/README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -389,11 +389,6 @@ apply plugin: 'org.openapi.generator'
|true
|Defines whether or not api-related _documentation_ files should be generated.

|withXml
|Boolean
|false
|A special-case setting which configures some generators with XML support. In some cases, this forces json OR xml, so the default here is false.

|configOptions
|Map(String,String)
|None
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,6 @@ class OpenApiGeneratorPlugin : Plugin<Project> {
generateModelDocumentation.set(generate.generateModelDocumentation)
generateApiTests.set(generate.generateApiTests)
generateApiDocumentation.set(generate.generateApiDocumentation)
withXml.set(generate.withXml)
configOptions.set(generate.configOptions)
logToStderr.set(generate.logToStderr)
enablePostProcessFile.set(generate.enablePostProcessFile)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -342,12 +342,6 @@ open class OpenApiGeneratorGenerateExtension(project: Project) {
*/
val generateApiDocumentation = project.objects.property<Boolean>()

/**
* A special-case setting which configures some generators with XML support. In some cases,
* this forces json OR xml, so the default here is false.
*/
val withXml = project.objects.property<Boolean>()

/**
* To write all log messages (not just errors) to STDOUT
*/
Expand Down Expand Up @@ -408,7 +402,6 @@ open class OpenApiGeneratorGenerateExtension(project: Project) {
generateModelDocumentation.set(true)
generateApiTests.set(true)
generateApiDocumentation.set(true)
withXml.set(false)
configOptions.set(mapOf())
validateSpec.set(true)
logToStderr.set(false)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -506,14 +506,6 @@ open class GenerateTask @Inject constructor(private val objectFactory: ObjectFac
@Input
val generateApiDocumentation = project.objects.property<Boolean>()

/**
* A special-case setting which configures some generators with XML support. In some cases,
* this forces json OR xml, so the default here is false.
*/
@Optional
@Input
val withXml = project.objects.property<Boolean>()

/**
* To write all log messages (not just errors) to STDOUT
*/
Expand Down Expand Up @@ -680,10 +672,6 @@ open class GenerateTask @Inject constructor(private val objectFactory: ObjectFac
GlobalSettings.setProperty(CodegenConstants.API_TESTS, generateApiTests.get().toString())
}

if (withXml.isPresent) {
GlobalSettings.setProperty(CodegenConstants.WITH_XML, withXml.get().toString())
}

if (inputSpec.isPresent && remoteInputSpec.isPresent) {
logger.warn("Both inputSpec and remoteInputSpec is specified. The remoteInputSpec will take priority over inputSpec.")
}
Expand Down

0 comments on commit 1decced

Please sign in to comment.