forked from OpenAPITools/openapi-generator
-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
merge master #23
Merged
Merged
merge master #23
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#9852) * [BUG][PYTHON] Do not set Content-Type for GET, HEAD or DELETE requests The Python generator no longer sets a default `Content-Type` of `application/json` for `GET`, `HEAD` and `DELETE` requests. Having the `Content-Type` set for these requests was causing issues with other tools which insist that GET, HEAD and DELETE requests do not have a Content-Type (as per the OpenAPI 3 specification). An example of the problem that this commit fixes is when using [Prism][1] as a [validation proxy][2]. [Prism rejects any GET request that has a Content-Type][3]. Here is [an example of the problem manifesting itself][4]. To validate the fix in this commit: 1. Start with any OpenAPI3 spec e.g. the Petstore example at https://editor.swagger.io/ 2. Generate Python client code for the spec 3. Look at the generated `rest.py` e.g. in the [standard sample in this repo][5] and see that the `Content-Type` defaults to `application/json` for all HTTP methods (including `GET`, `HEAD` and `DELETE`), rather than there being no `Content-Type` for `GET`, `HEAD` and `DELETE`. Fixes #9831 [1]: https://github.com/stoplightio/prism [2]: https://meta.stoplight.io/docs/prism/docs/guides/03-validation-proxy.md [3]: stoplightio/prism#1408 (comment) [4]: https://github.com/agilepathway/gauge-openapi-example/pull/28/checks?check_run_id=2888606052#step:13:18 [5]: https://github.com/OpenAPITools/openapi-generator/blob/969cea8ce10cb9d012c3936fb377d631c0d044c9/samples/openapi3/client/petstore/python/petstore_api/rest.py#L141 * update samples * Fix Python DELETE bug introduced in earlier commit The earlier commit 9dfe1f6 introduced a bug for `DELETE` requests on the standard Python generator. This commit fixes that bug and also includes the updated samples. Co-authored-by: William Cheng <[email protected]>
* [swift5][client] avoid variable name collision * [swift5][client] update sample projects
* 5.2.0 release * update samples * update meta codegen
* bump verions to 5.2.1-SNAPSHOT * update samples * update readme * fix gradle properties
* Adds boolean enum component and object property and tests of it * Regenerates samples * Passes needed locale argument to toUpperCase * Regenerates samples
* [kotlin][client] define coroutines context * [kotlin][client] update sample projects * [kotlin][client] add missing kotlinx coroutines dependency * [kotlin][client] update sample projects
* Fixes camel-case query parameters (perPage => per_page) * Prep for PR
For tests it’s useful to have direct access to the Wai `Application`, which is the plain function from `Request` to `Response`. Then you don’t need to use a full-blown http server to run requests.
* fix optional parameter dataType * add test * removed stray spaces * improved test method name
…ield NoContent (#9916) * Make endpoints which don't return anything yield NoContent Relevant issue: #9901 The haskell-http-client generator tries to generate a polymorphic return type for endpoints which don't return anything in the success case, but still produce content in other cases. This means that these endpoints hit a decoding error in the success case, because there is no content to decode. This changes the behaviour so that endpoints that don't return anything are *always* generated as returning NoContent, and never try to decode the response. This change is based on a similar one for the haskell-servant generator, which can be found at: #9830 which resolved a similar issue for that generator. * Update samples after haskell-http-client NoContent change
* feat: templating elixir's mix.exs :package and :description * adding updated elixir sample
* remove reduce logic in adding IColletion * remove redundant logic in csharp client generator * update samples
* do not keep generator_state in cowboy match structure * update generated example
…alse instead of 1/0 (#9951)
* prevent future problems of this kind by adding the pubspec.lock file to VCS for all 3 test projects
…ion (#9971) * Add new Ruby versions to the Travis CI build matrix configuration * Build the project and update samples
* Introduce jaxrs-cxf-client-jackson-nullable sample Generated using: ./bin/generate-samples.sh bin/configs/other/openapi3/jaxrs-cxf-client-jackson-nullable.yaml * Add support for openApiNullable to JavaCXFClientCodegen Add import mapping for JsonNullable to AbstractJavaCodegen * Deduplicate string "jackson" in generators extending AbstractJavaCodegen * Adjust nullable fields * Adjust standard getters for nullable fields add @JsonIgnore to standard getters * Adjust standard setters for nullable fields * Adjust fluent setter for nullable fields * Introduce distinct getter and setter for nullable fields * Adjust add method for nullable lists * Adjust put method for nullable maps * Cleanup JavaJaxRS/cxf/pojo.mustache * Further cleanup JavaJaxRS/cxf/pojo.mustache * Adjust inner enum getters
Refs #3358 Ensure `deprecated` operations are annotated/documented as such on the generated methods. Libraries updated: * [feign] * [google-api-client] * [microprofile] * [okhttp-gson] * [resttemplate] * [retrofit] * [retrofit/play*] * [webclient] * [vertx] Ensure `deprecated` schemas are annotated/documented as such on the generated classes/fields. Libraries updated: * [feign] * [google-api-client] * [jersey2] * [microprofile] * [native] * [okhttp-gson] * [rest-assured] * [resteasy] * [resttemplate] * [retrofit*] * [webclient] * [vertx] Also fix two minor bugs to get the java sample tests working: * Fix an invalid jackson-datatype-threetenbp version number in vertx/pom.mustache * Fix a bad return type in webclient/api_test.mustache when uniqueItems=true Since this commit updates petstore-with-fake-endpoints-models-for-testing.yaml, several other samples were updated, but it's just new files to reflect the deprecated schemas, so there should be no consequential differences. Relevant bits of the spec: * https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#user-content-operationdeprecated * https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#user-content-schemadeprecated
* Add @javax.annotation.Nonnull to required getters * Add updated samples * Consider the nullable constraint
* remove new java samples * java feign, webclient use fake petstore for tests * update samples
* Remove 7.2 from TravisCI config * Bump Composer PHP requirement * Bump PHP version in docblocks * Add PHP 8 notice to readme * Refresh samples
* fix-filename-from-header-response-retrieval: fix early exit of iteration before a match could be found * fix-filename-from-header-response-retrieval: fixed same bug for alamofire usage too * fix-filename-from-header-response-retrieval: build project and update samples Co-authored-by: Christopher Gretzki <[email protected]>
* Properly escape default values * Support default values for array types * Use Kotlin initializers, not Java Co-authored-by: Sigrid Andersson <[email protected]>
…Query Param examples. (#10323) * Updated the HTML2 Doc Curl Examples to provide sample Request Body & Query Param examples. * Updated the HTML2 Doc Curl Examples to provide sample Request Body & Query Param examples. Co-authored-by: Kraust <[email protected]>
For setters the Jackson based property name conversion (e. g. from _-separated to CamelCase) is missing. So I propose this.
Co-authored-by: Bas Huisman <[email protected]>
If an item in a go array is nullable, we want to represent it as a pointer, otherwise it will be deserialized with a default value and it will be impossible to differentiate it from null.
* Add archunit to programatically test format and scope of loggers * Fix use of loggers * Update error message * Add check for abstract class * Test if classes with abstract in name are abstract * Make abstract class abstract * Rename test class * Make logger private final * Make logger private
…t&) bug which incorrectly returns zero (#10300) * BUG FIX: A missing semicolon in cpp-pistache-server generated code. * BUG FIX: Provide default values of schema in cpp-pistache-server generated code. * BUG FIX: Provide default values of schema in cpp-pistache-server generated code. * Fix a bug in cpprest-sdk generator (Issue #8450) * Fix a bug in cpprest-sdk generator (Issue #8450) * Fix a bug in cpprest-sdk generator (Issue #8450) * Revert "Fix a bug in cpprest-sdk generator (Issue #8450)" This reverts commit 7d8f842. * Fix a bug in cpprest-sdk generator (Issue #8450)
* test python in node3 * install python3 * install python 3.6 * use pyenv * run with 3.5.2 * install py 3.8.9 * fix folder name * install via pyenv * list pyenv * install 3.6.3 * rearrange test * Revert "rearrange test" This reverts commit 1b075ed. * only test py3
* Add a link to documentation * add link description
* Bump jimschubert/query-tag-action from 1 to 2 Bumps [jimschubert/query-tag-action](https://github.com/jimschubert/query-tag-action) from 1 to 2. - [Release notes](https://github.com/jimschubert/query-tag-action/releases) - [Commits](jimschubert/query-tag-action@v1...v2) Signed-off-by: dependabot[bot] <[email protected]> * Updated Dart2 template to fix linting errors when using recommended rules. * Updated Petstore code. * Revert to having no EOF marker at end of few files. * Fix a call on null value. * Updated Petstore code. * Add more checks for nulls. * Updated Petstore code. * Updated Petstore code. * Revert back decoding an enum value. * Revert back decoding an enum value. * Updated Petstore code. * Revert to older version of _convertParametersForCollectionFormat method. * Updated Petstore code. * Updated template and Petstore files. * Adjust doc for analysis_options file. * Updated Petstore sources. * Shorten command to replace path parameters. * Updated Petstore code. * Add a space for readability. * Adjust template per feedback. * Remove unneeded break statements. * Updated Petstore code. * Keep a new line character when replacing parameter names (like before). * Remove string interpolation. * Updated Petstore code. * Remove commented code. * Regenerate Petstore code. * Regenerated Petstore code. * Use another parameter name to stop variable shadowing. * Regenerated Petstore code. * Put description adjacent to the class. * Add another global ignore for all files: constant_identifier_names * Use const for contentTypes and authNames. * Regenerate Petstore code. * Use shorter code to check for an empty array. * Regenerate Petstore code. Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Fix ci again * Improve .gitignore
* [swift5][client] Fix issue 9953 * [swift5][client] update docs
* Updated template so that generated code now renders docstrings and function parameters nicely in IDE. Endpoints are still accessible in generated code, mainly to satisfy some test cases. * fixed manual tests
- update stack/deps to LTS 18.10 for ghc-8.10.7 - fixes for GHC 9 - update samples
* Upgrade typescript-axios from 0.21.1 to 0.21.4 * Update samples
* Fix default value for kotlin class * fix style: remove trailing line * fix ktorm schema
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR checklist
This is important, as CI jobs will verify all generator outputs of your HEAD commit as it would merge with master.
These must match the expectations made by your contribution.
You may regenerate an individual generator by passing the relevant config(s) as an argument to the script, for example
./bin/generate-samples.sh bin/configs/java*
.For Windows users, please run the script in Git BASH.
master
,5.1.x
,6.0.x