This allows easier creation of custom `GenerateTask`. Specifically, this makes:
- generateModelTests
- generateModelDocumentation
- generateApiTests
- generateApiDocumentation
- withXml
optional, following the same pattern as other properties in GenerateTask.
Without this change, we get `java.lang.IllegalStateException: No value
has been specified for this provider.` until these properties are
specified for the task, when attempting to define a custom generate task
(such as one to generate API docs).
* [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.
* added my fork from https://github.com/Place1/swagger-codegen-typescript-browser
* ran bin/typescript-fetch-petstore-all.sh
* use FormData.append rather than .set for IE11 compat
* reverted change to licenseInfo.mustache
* reverted some comments
* added package.json and tsconfig.json back to the generator
* added support for blob (application/octet-stream) responses
* models and apis are now in folders
* added support for modelPropertyNaming based on the spec
* bug fix
* updated samples
* Restore pom.xml for typescript project
* Restore samples/client/petstore/typescript-fetch/tests/default/package.json
≈
* added support for response type Date conversion
* updated samples
* Rework pom in "samples.ci"
* Restore "samples/client/petstore/typescript-fetch/tests/default"
* updated configuration class to use property getters to allow clients to implement configuration values as getters
* added {{datatype}}ToJSON functions to handle serialization and naming conversions
* fixed missing import
* fixed compilation error. updated samples
* 1 character change to get CI to run again
* updated samples
* added support for array type request body
* updated tests
* support for optional request bodies
* updated models json converters to handle undefined inputs (to simplify usage in optional contexts like optional request bodies)
* updated samples
* updated tests
* changed to typescript version 2.4
* updated samples
* support for optional properties being null, undefined or omitted
* updated samples
* bug fix
* bug fix
* updated samples
* ran npm install in test project
* patch to get tests running
* added support for retrieving raw response. added support for binary request bodies. added support for blob data type for files/binary.
* update jmockit version
* list jvm
* test jdk9 in appveyor
* use latest version of gradle
* update to jdk9
* use openjdk9
* use default java version in appveyor
* use jdk8 docker image
* consolidate bash, ios pom into parent pom
* consolidate circlecii pom into parent pom
* remove circleci pom.xml
* Support Gradle 4.10
Gradle 4.10 is bundled with Kotlin 1.60 and Kotlin DSL 1.0-rc1. The new
Kotlin DSL isn't binary compatible with the `tasks` registration used in
this plugin.
Updating to Kotlin DSL 1.0-rc1 with no other changes would require users
to update to Gradle 4.10.
As a workaround, I've modified the tasks registration being done in
OpenApiGeneratorPlugin.kt, so rather than using the Kotlin DSL's invoke,
it creates tasks manually against the TasksContainer. This works locally
with Gradle 4.7+ for all scenarios in the sample (samples/local-spec).
There may be edge cases that I'm unaware of, and we may want to consider
defining the minimum supported Gradle version of 4.10 in the next major
version of openapi-generator-gradle-plugin if we experience those cases.
* Uncomment snapshots repo (commented it during local testing)
* update pom.xml for exec gradle plugin
* update release version, disabled ensure up to date script
* update release table
* update stable version to 3.2.3
* update samples/meta-codegen/lib/pom.xml and release_version_update.sh
I had previously copied the multi-task description in the gradle
plugin's docs from a response made in an issue. The reference to 'the
old swagger plugin' have no context in the gradle plugin README, so I've
updated that wording.
Also, I found that the link to openapi-generator-cli.sh in the root
README was broken. It pointed to openapi-generator.cli.sh instead of
openapi-generator-cli.sh.
A user asked about how one would approach generating code from multiple
specifications. Adding this information to the README, as it seems
others would find the information helpful. Also explaining how to use
tasks from this plugin as this may not be commonly known or intuitive
beahvior.
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.