* Introduce GeneratorSettings + cleanup
GeneratorSettings is an immutable settings object, intended to limit the
manipulation of generator settings.
To move to GeneratorSettings, lots of modification was done to
CodegenConfigurator. The goal here is that CodegenConfigurator
would create the contextual information required to initiate a
generator run:
* GeneratorSettings
* Workflow related settings
* Configuring "system" GeneratorProperties (ThreadLocal properties)
* Deserializing from file to config object
* Input spec document (OpenAPI, intending to target others)
ClientOpts was generally unused, and the few places it was being used
have been updated to pass the properties to
codegen.additionalProperties.
* Add sanity to system properties
The -D argument for the generate command is an application argument
which is easily confused for Java System Properties. This isn't the
case, as setting values here doesn't update the configuration in
System.getProperties().
This adds a warning and deprecation to that option, as defining these
values as system properties will also continue to work as expected. This
makes the -D application argument redundant and confusing.
* Contextualize generator/workflow settings
This splits settings relevant to generator configuration (the what) and
workflow configuration (the how) in an attempt to make configuration
easier to conceptualize.
* Update Gradle task w/ CodegenConfigurator setters
* Remove -D usage in scripts
* Add -p option for additional properties
* Regnerate samples
* [gradle] Reworking publishing pipeline
TravisCI proxies separate external requests with different orginating IP
addresses, while Sonatype associates artifacts for auto-generated
repositories by IP address. This leads to many gradle deploys from CI
resulting in "split" staging repositories with no way to combine in
Sonatype Nexus.
This introduces a workflow which should resolve this issue on the next
revision release. Specifically, nexus-publish-plugin is included to
create singular staging repositories from TravisCI and
gradle-nexus-staging-plugin is included to auto-release and promote
this repository.
NOTE:
We need to publish via publishPluginMavenPublicationToNexusRepository,
because publishToNexus will publish _all_ publish-related tasks,
including the one intended only for the Gradle Plugin Portal.
Tested in standalone open source Nexus Repo Manager, which doesn't
support the staging plugin. So, only SNAPSHOT workflow has been
validated locally.
* Change the 'publish' task to 'publishToMavenLocal' in the helper pom.xml
* Add condition on signing and be explicit about sources/javadoc artifacts
* Call close/closeAndReleaseRepository
* Reuse same closeAndReleaseRepository for SNAPSHOT + releases using a task guard, and publish to Gradle Plugin portal only on tagged build.
* Add v prefix for tag check.
* [cli] Support packageName as global option
CLI supports other package-related options (--api-package,
--model-package, --invoker-package). This aligns those options with
--package-name to avoid confusion about how to configure these options
where those are supported.
This intentionally does not apply a packageName getter/setter to
DefaultCodegen to reduce the footprint of this change.
* [gradle] Add packagName as global option
This makes packageName available as a global option, beside apiPackage,
modelPackage, and invokerPackage to reduce potential confusion about how
to configure the four of these options by generators which support them.
* update travis to test gradle plugin
* update gradle version
* show gradle version
* test gradle plugin in circleci
* test appveyor in gradle
* use direct link
* revert other ci config
* [Doc] Better highlight of generators docs page with generators specific parameters
* [Doc] Better highlight of generators docs page with generators specific parameters
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