* 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
* Ruby client: escape path parameters
Path parameters should be escaped when encoded into the path.
In the path '/pet/{petId}' let's pretend petId is a string instead of a
number.
If the user uses "Bobby" as the petId then they correctly get the path
'/pet/Bobby'.
But if they put 'Bobby/Tables' as the petId then they used to get the
path '/pet/Bobby/Tables' which will be interpreted by the server as a
different route.
Using CGI::Escape they now get '/pet/Bobby%2FTables' which is correct.
* Ruby client- regenerate further files
Thank you @autopp for noticing I needed to update
`samples/openapi3/client/petstore/ruby`.
Regenerated by running `bin/openapi3/ruby-client-petstore.sh`.
PR #3039
* [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.
* [typescript-fetch] Fix uploading files
* Check for Blob instead of File
* Update samples
* Update samples
* Update samples
* Update samples
* Regenerate samples
* Bug
* Manually fix samples
* Implement support for Buffer and Blob in a backwards-compatible way
* Rework how blob and buffer instance checking works
* Check for Blob/Buffer existence properly
* Avoid using Buffer and Blob in type declarations
* Remove Buffer support
* Update samples/client/petstore/typescript-fetch/tests/default/test/PetApi.ts
Co-Authored-By: Esteban Marin <estebanmarin@gmx.ch>
* Update samples/client/petstore/typescript-fetch/tests/default/test/PetApi.ts
Co-Authored-By: Esteban Marin <estebanmarin@gmx.ch>
* Support python 3.7 for all server-generators
Signed-off-by: Guillaume Smaha <guillaume.smaha@gmail.com>
* Rename typing_patch.py to typing_utils.py
* Renaming typing_patch.mustache to typing_utils.mustache
* Fix comparaison in typing_utils.is_dict for python3.7
* Use golang's provided method names (gin)
This commit modifies the gin template for the router to leverage the http constants for method types as defined by RFC 7231 section 4.3. These are documented on:
https://golang.org/pkg/net/http/#pkg-constants
This removes the need for the `strings` dependency and does not require any new dependencies, as `net/http` is already imported.
* Remove strings dependency which is no longer used
* Update samples
* fix(okhttp-gson): Make example executable
* fix(okhttp-gson): Make example executable
* fix(okhttp-gson): Make example executable
* fix(okhttp-gson): Updating pet project
* fix(okhttp-gson): Updating parcelable project
* fix(okhttp-gson): Using {{{}}}
* fix(okhttp-gson-java): Adding response headers on api_doc.mustache
* feat(okhttp-gson): Adding Http response headers to docs and javadocs
* feat(okhttp-gson): Included dots in custom tage
* feat(java-okhttpgson): Updating pet project
* feat(java-okhttpgson): Updating other pet project
* To fix conflict params name 'url'
Sometime we have api params named url that will conflict with imported module url named url.
* run samples
* run samples
* update samples
* update ts axios petstore all
* add apiSuffix configuration
* refactor the global option apiSuffix to kotlin specific feature
* add testcase
* add testFolder for kotlin gen
* add basic api_test.mustache template
* add api_test,mustache
* add tests
* improve usage of file separators
* replace defined file separator into os specific separators
* improve test templates and kotlin-springboot sample
* add test dependecies into gradle template
* add newline into template file