openapi-generator/modules/openapi-generator-gradle-plugin/samples/local-spec
Jim Schubert 4fa926604f [gradle] Add 4 boolean properties supported by codegenConfigurator (#1881)
* [gradle] Add 4 boolean properties supported by codegenConfigurator

* [gradle] Add Windows workaround for Android Studio

After release 3.0.0, a guava dependency was updated and this exposed an
issue in Windows where Guava's CharMatcher.ASCII is called to validate a
path. The version of Guava referenced by OpenAPI Generator causes a
'NoSuchField' error because the referenced dependency names this static
field CharMatcher.Ascii.

This error is not surfaced on macOS, and appears to be Windows-specific.

This adds a potential workaround to the Gradle plugin's readme.

See #1818 for more details.
2019-01-11 19:14:05 +08:00
..
.gitignore [gradle-plugin] Initial implementation (#162) 2018-05-31 19:23:05 +08:00
build.gradle [gradle] Add 4 boolean properties supported by codegenConfigurator (#1881) 2019-01-11 19:14:05 +08:00
gradle.properties Prepare 3.3.4 release (#1583) 2018-12-01 01:00:06 +08:00
petstore-v3.0-invalid.yaml [gradle-plugin] Initial implementation (#162) 2018-05-31 19:23:05 +08:00
petstore-v3.0.yaml [gradle-plugin] Initial implementation (#162) 2018-05-31 19:23:05 +08:00
README.md Prepare 3.3.4 release (#1583) 2018-12-01 01:00:06 +08:00
settings.gradle [gradle-plugin] Initial implementation (#162) 2018-05-31 19:23:05 +08:00

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.3.4 openApiValidate