forked from loafle/openapi-generator-original
The gradle plugin sets all System properties before generation, then reverts them back to their original state. System.getProperty/setProperty return null if the property was not previously set. The Kotlin map was defined with non-nullable key/value constraints, so setting something not commonly set (modelDocs: "false") would result in an runtime exception. This changes the map to support nullable values, and rather than setting a null System property at the end, it clears those which previously had no value.
Local Spec Sample
This example assumes you have Gradle 4.7+ installed. No gradle wrapper is provided in samples.
First, publish the openapi-generator-gradle-plugin locally via ./gradlew assemble install
in the module directory.
Then, run the following tasks in this example directory.
gradle openApiGenerate
gradle openApiMeta
gradle openApiValidate
gradle buildGoSdk
gradle generateGoWithInvalidSpec
The samples can be tested against other versions of the plugin using the openApiGeneratorVersion
property. For example:
gradle -PopenApiGeneratorVersion=3.2.0 openApiValidate