* feat(r): Added handling exception with ApiException class and document generation
* feat(r):enhancements to exception handling and documentation
* fix(r): fixes and reverting the man folder
* fix(r): minor fix of import statement
* fix(r): generated the docs file
* fix(r) minor doc casing fixes
* Update DefaultCodeGen to allow additional primitive types
If a string field is specified with a format which is also defined using
--typeMappings, it will be treated as a primitive type
* Fixed typo in android-petstore-httpclient.bat
Previously, this pulled from the GENERATOR_HOST system property. This
should have been an environment variable. Fallback is now generator.host
system property.
* First set of fixes to support ver 3.0, useswashbuckle does not work yet
* Fix swashbuckle issues iwth aspnetcore 3.0
* Use default routing for 2.2 and turn off default for 3.0
* fix up documentation
* PR Feedback and wrong name in mustache file
* Fix for 2.1 usage too
* Change isFramework to useFrameworkReference as name to make thngs explicitly clear. Also fix small messages for the review comments
* Make JSON.NET version configurable
* Activate endpoint routing and use camel case NamingStrategy
* Make Newtonsoft version configurable to match ASP.NET Core preview 5
* Fix spelling of an option, remove a duplicate call and update docs
* feat(r): Inclusion of useragent timeout and serialization
* fix(r): fixing name of timeout parameter
* fix(r): fixing unit tests
* fix(r): fixing minor issues
* fix(r): updated r petstore batch command
* fix(r): minor unit test fix
* fix(r): refactor of useragent passing and other minor
* feat(typescript-rxjs): change BaseAPI to arrow functions, use shorthands where possible
* feat(typescript-rxjs): replace null checking with throwIfRequired helper function in api controllers
* feat(typescript-rxjs): use shorthand syntax for object creation of query and header params
* feat(typescript-rxjs): provide fallback for previously exported RequiredError and querystring
* refactor(typescript-rxjs): change order of query and headers definition
* feat(typescript-rxjs): regenerate samples
* fix(typescript-rxjs): missing closing curly
* fix(typescript-rxjs): add condition to prevent undefined parameters in header or query params
* [Go][Client] Ensure test errors don't crash
Previously we did not interrupt execution of a test case
when an error was returned from an API call. This was
causing the tests to crash as soon as we try to
dereference the response.
We now fail the tests as soon as the first API error
is received.
* [Go][Client] Use configured Scheme and Host in requests
Previously we were simply setting the Host header and
completely ignoring the configured scheme.
* Initial implementation of a validation framework in core
* Print surefire summary (helps evaluate errors)
* Bump versions: surefire plugin,jmockit
* Depend on jmockit within maven-surefire-plugin which requires it
* Release versioning script with marker tags.
Introduces bump.sh which supports moving from version to version but
only within delimiting marker tags in the target file.
This script currently doesn't do validations or anything fancy.
* Allow bumping version according to type (major,minor,build,revision)
* bump.sh will display error if file contents are unchanged
URL-special characters such as /,?,% should be encoded when inside path
parameters. I changed the Ruby-client to do so.
https://github.com/OpenAPITools/openapi-generator/pull/3039
Unfortunately, some projects relied on slashes not being expanded within
path paramters:
https://github.com/OpenAPITools/openapi-generator/issues/3119
With this commit, these projects can now pass `--strict-spec false` to
not have / converted to %2F.
strict spec not specified: / -> %2F
--strict-spec true: / -> %2F
--strict-spec false: / -> /
* Add Flow import to kotlin spring reactive
* Add runBlockingTest to api tests
* Add kotlin-springboot-petstore-server-reactive.sh to ensure-up-to-date
* add reactive check for runBlockingTest
* Samples
* feat(csharp-documentation): Improving documentation and example
* feat(csharp-documentation): Updating pet project
* feat(csharp-documentation): Minor updates
* feat(csharp-documentation): Updating pet project
* feat(csharp): Updating pet project
* feat(csharp-netcore): Updating pet project
* feat(r): fixing serialization and deserialization issues
* feat(r): pet store file generated with serialization fixes
* fix(r): updated the query params with keyname in get request
* fix(r):fix issue with package name and other minor
* fix(r): fixing unit tests
* feat(r): adding api calls WithHttpInfo method
* fix(r): reverting unit test changes
* feat(r): saving changes for reference
* Revert "feat(r): saving changes for reference"
This reverts commit 0d091b5c20f8f7f83e8b3318c1f7ddf5c0a4cced.
* feat(r): minor refactor of method position
* fix(r): fixing bug in withhttpinfo method args passing
* fix(r): generated petstore with fix
* Bump up babel version
* Update samples
bin/javascript-flowtyped-petstore.sh
* The dependency `babel-preset-react-app` requires `NODE_ENV` or `BABEL_ENV`
* Run `env BABEL_ENV=development npm run build` to update the samples
* 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
* Add support for enum schemas and properties to the rust generator
Also:
* Skip serializing a field with serde if it's optional and empty
* Fix borrow checker error when using &std::path::Path (should be std::path::PathBuf)
* Add script to generate sample with rust-reqwest
* Regenerate petstore sample for both rust targets
* Remove go code from README.md
* Fix formatting of serde skip_serializing_if attribute
* Explicitly ignore .bak in gradle samples directory
* Add gradle wrapper to local-spec sample, make .java-version (jenv local) be less machine specific
* Include gradle plugin samples in travis build
`URI.encode` is obsolete. `CGI.escape`, `URI.encode_www_form` or
`URI.encode_www_form_component` are recommended instead.
https://ruby-doc.org/stdlib-2.6/libdoc/uri/rdoc/URI/Escape.html#method-i-escape
URI.encode has different behaviour to CGI.escape:
```ruby
URI.encode('hello/world?test%string')
=> "hello/world?test%25string"
CGI.escape('hello/world?test%string')
=> "hello%2Fworld%3Ftest%25string"
```
I recently raised pull request #3039
201cbdce29cc6cdbbbe9efcb1afb250a05bc2ffd
That pull request escapes path items at insertion.
Before either pull request, the path item 'hello?world' would go into
the URL as 'hello?world'. That behaviour was insecure as if an attacker
could control the path item value, they could change the URL the
application connected to.
After #3039 'hello?world' would go in as 'hello%253Fworld'. This was
safer than before, but it's still not correct.
If I'd realised at the time, I would have made it correct at the time.
What this pull request does is make it go in as 'hello%35world', which
is correct.
ApiClient::build_request_url was URI.encoding the whole path.
This wasn't protecting against all undesirable characters in the path
items, but was escaping % characters a 2nd time which was unhelpful.
I have additionally removed URI.encode from Configuration::base_url as I
can't see any benefit it could be bringing.
There is no justification for it in the commit where it was originally
added: 47c8597d36
* general support to add scopes for bearer auth too
implemented authorize workflow in aspnet core too
* petstore update
* fix missing )
* multi roles fix
* null pointer error prevention
* null point exception fixes
* null pointer fixes
* npe fix
* solved line break issue
* Fixed case where invalid comma is added to consumes/produces list in case last element is empty.
* Changed default HttpStatus.OK response to match first response code in definition.
Allowing also other responses 201, 202 ...
* Changed default HttpStatus.OK response to match first response code in definition.
Allowing also other responses 201, 202 ...
* run ./bin/kotlin-springboot-petstore-server.sh
Updated APIs
* feat(java-jersey2): Adding http response headers and making example compilable
* feat(java-jersey2): Updating pet project
* feat(java-jersey2): Removing uncessary lines from Readme
* feat(java-jersey2): Updating pet projects
* feat(java-jersey2): Updating pet projects
* refactor(golang): Use http constants for methods
* regenerate samples
* fix: Only import strings when needed
* regenerate samples
* Only import fmt and strings when needed
* regenerate samples
* kotlin spring : add reactivity via kotlin's coroutines
* add kotlin spring boot reactive samples
* bug : fix spring version and import for coroutines
* remove exception handler for reactive (webflux doesn't support it)
* add spring milestone repository to maven pom
* add reactive type for list in Api and ApiImpl methodes for mathching body responsive parameter
* fix baseType for ArraySchema
* regenerate samples
* updating documentation
* 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 {{{}}}