[BUG] Gradle plugin, value of validateSpec is overridden by skipValidateSpec
Created by: iurii-untilov
Description
skipValidateSpec.ifNotEmpty { value ->
configurator.setValidateSpec(value)
}
as a result validateSpec is set as value of skipValidateSpec, as by default skipValidateSpec == false it means that validateSpec will be assigned false, and build will not fail even in case of errors in provided swagger / openApi specification.
openapi-generator version
4.0.0-beta2
Command line used for generation
./gradlew openApiGenerate
Steps to reproduce
Run openApiGenerate for invalid swagger/openAPI specification, it should continue even after reporting that errors where found: There were issues with the specification, but validation has been explicitly disabled.
Suggest a fix
Please rewrite it as:
skipValidateSpec.ifNotEmpty { value ->
configurator.setSkipValidateSpec(value)
}