9299 Commits

Author SHA1 Message Date
Nathan Baulch
c1c5775271
[go] More idiomatic godoc comments (#10044)
* [go] More idiomatic godoc comments

* [go] Mark deprecated fields and functions

* [go] Minor mustache readability/consistency fixes

* [go] Mark deprecated operation parameters

* [go] Deprecate a petstore component property for testing

* [go] Apply deprecated godoc in Go servers also
2021-08-03 17:11:16 +08:00
Sem Schilder
4210b41f84
[php-symfony] Add backslash to "load" namespaces from global namespace (#9740)
* Add backslash to load namespace from global namespace

* Update example

* Remove hardcoded slash

* Add backslash from java side

* Update samples

* Fix first sample

* Fix other snapshot

* Update version file
2021-08-03 17:09:52 +08:00
William Cheng
c28c1253a4
fix missing jackson-databind-nullable in okhttp java client (#10078) 2021-08-03 17:07:14 +08:00
Ween Jiann
bea17c9d68
[typescript] Fix: any type (8 liner PR) (#10080)
* [typescript] Fix: any type (1 liner PR)

* Add toAllOfName override

* Add tests

* Add line at EOF
2021-08-03 16:48:20 +08:00
William Cheng
31eb65ab67
[C#][netcore] minor bug fixes (#10074)
* fix property name, fix enum comment

* update doc
2021-08-03 16:43:39 +08:00
William Cheng
0ceeddb441
fix path and query parameters encoding (#10069) 2021-08-03 16:43:21 +08:00
Noor Dawod
e39e4bcd6e
Kotlin client/spacings indentations (#9853)
* 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](https://github.com/jimschubert/query-tag-action/compare/v1...v2)

Signed-off-by: dependabot[bot] <support@github.com>

* Adjust spacings, bring back suppresses to silence IntelliJ IDEs.

* Suppress few warnings since we know we are using them in the code.

* toLowerCase() is deprecated.

* Wrap enum values in backticks to guard against reserved names, bring back encode/decode for each enum.

* Wrap property names in backticks to guard against reserved names.

* Regenerate samples.

* Do not warn about unused imports.

* Regenerate samples.

* Updated petstore code.

* Add missing reserved Kotlin operators and special keywords.

* Revert adding backticks.

* Regenerate pet store shop code.

* Remove unused suppression.

* Use 3 braces to wrap name.

* Regenerate pet store shop code.

* Remove get from reserved words.

* Revert back removal of description.

* Regenerate source code for Petstore.

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-08-02 17:38:22 +08:00
Ghufran Zahidi
e5ce66aae6
[csharp-netcore]Model's FromJson method check for jsonstring is not nullOrEmpty before deserializing (#10060)
* check for jsonstring is not nullOrEmpty before desrializing for oneOf and anyOf

* update samples

Co-authored-by: William Cheng <wing328hk@gmail.com>
2021-08-02 11:35:00 +08:00
William Cheng
70982ddc75 update samples 2021-07-31 21:28:10 +08:00
Bruno Coelho
8a714f48d3
[Kotlin][Client] improve imports (#10052) 2021-07-29 18:02:20 +08:00
Piotr Krzemiński
b1a009803e
[Kotlin][Multiplatform] Add missing JVM dependency (#10051)
This dependency was accidentally removed in PR #9755 where we switched
from `build.gradle` to `build.gradle.kts`.
2021-07-29 18:01:44 +08:00
Ween Jiann
870ef3a87a
[go-server] Allow user to specify how errors are handled (#9764)
* Added error.go

* Updated controller to use error

* Fix redeclared func

* Add generated files

* Merge

* Added docs

* Remove variadic

* Regenerate files

* Updated go doc to meet standard

* Updated doc to meet go standard

* Updated
2021-07-28 17:19:47 +08:00
William Cheng
4c8c576a0f add new file 2021-07-28 11:13:49 +08:00
William Cheng
d68c14cf98
use fully qualified name for Pageable (#10045) 2021-07-28 11:03:24 +08:00
Oleh Kurpiak
b1cc7445a0
[Java][Spring] fix Spring RequestMapping (#9900) 2021-07-27 14:27:47 +08:00
William Cheng
fcdc9d49f7 update samples 2021-07-27 14:16:55 +08:00
unintended
68d48ea03a
Store uri template attribute for webclient to store in metrics (#9964)
* store URI template attribute for webclient

* generate samples
2021-07-27 14:13:24 +08:00
Oleh Kurpiak
aa4018d09b
[Java] fix nullable arrays when JsonNullable is used (#10012) 2021-07-27 13:57:07 +08:00
Richard Moorhead
ddd23ab197
fix java8 datetime jaxrs-resteasy (#10014) 2021-07-27 13:51:31 +08:00
William Cheng
ab5ab94bf2 update samples 2021-07-27 11:58:05 +08:00
William Cheng
b799ca9ee0 Merge remote-tracking branch 'origin/5.3.x' into 6.0.x 2021-07-27 11:52:19 +08:00
William Cheng
3825a20ddc update samples 2021-07-27 11:42:45 +08:00
William Cheng
56aafe30d9 Merge remote-tracking branch 'origin/master' into 5.3.x 2021-07-27 11:33:35 +08:00
Peter Leibiger
88e22b0a52
[dart][dart-dio-next] Authentication fixes and improvements (#9975)
* [dart-dio-next] Update http mock test library

* [dart-dio-next] Fix authentication problems

* correctly map authentication by type and scheme
* add new authentication interceptor for `bearer` scheme - this currently does the same as the OAuth interceptor
* add tests for all authentication types except OAuth
* use temporary test library branch until new fixes and features get merge there

* Actually commit the fixed test library dependency

* Update http mock library

* Format :/
2021-07-27 10:04:05 +08:00
William Cheng
f0ebcd56d1
[Java][resttemplate] better code format (#10033)
* java restemplate: better code format

* update samples
2021-07-25 16:07:04 +08:00
Robin Trietsch
8eba70dd3d
[BUG][Kotlin] Add support for collection of generic classes (Jackson / Gson / Moshi) (#9918)
* Cherry picked commits from add-support-for-collection-of-generic-classes

* Regenerated samples

* Missing work by @adamsz-lume

* Try to fix maven plugin error

Co-authored-by: Bruno Coelho <4brunu@gmail.com>
2021-07-24 23:04:14 +08:00
Sebastian Weddmark Olsson
888f9cd84a
[erlang-server] Dialyzer spec (#9983)
* [erlang-server] Fix dialyzer spec

* add generated file
2021-07-24 22:37:40 +08:00
William Cheng
38a2fac37e
migrate rust client samples to 3.0 spec (#9999) 2021-07-23 11:22:20 +08:00
Yuriy Belenko
fe9636e9d9
[php] Fix Composer 2 name error (#10002)
* Fix obvious typo

* Add function to build Composer package name

* Add composerPackageName codegen property

* Use package name if it's not empty

* Refresh samples
2021-07-22 10:32:11 +08:00
Oleh Kurpiak
9e314d165b
[Java][Server] remove snapshot dependency (#9997) 2021-07-21 22:53:23 +08:00
Jorge Rodríguez Martín
e568376a01
[Java][RestTemplate][WebClient] Templatized query params for metrics and evicts oom (#9871)
* [Java][RestTemplate] Templatized query params for metrics and evicts oom

* [Java][WebClient] Templatized query params for metrics and evicts oom

* [Java][RestTemplate] Templatized query params for metrics and evicts oom

* Update samples

* [Java] Add javadoc

* [Java] Update samples
2021-07-21 17:03:19 +08:00
Christopher Gretzki
d23915a7b4
[swift5 client] fix filename for binary downloads (#9989)
* 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 <gretzki@adesso-mobile.de>
2021-07-21 12:37:48 +08:00
Yuriy Belenko
1d648223e6
[php] Set PHP version to 7.3 (#9986)
* Remove 7.2 from TravisCI config

* Bump Composer PHP requirement

* Bump PHP version in docblocks

* Add PHP 8 notice to readme

* Refresh samples
2021-07-20 21:06:50 +08:00
William Cheng
2e1b028ccd update samples 2021-07-19 11:43:03 +08:00
William Cheng
e263e6acc0
[Java] update test samples (#9972)
* remove new java samples

* java feign, webclient use fake petstore for tests

* update samples
2021-07-19 11:08:44 +08:00
Marcel Stör
c5f5d3dd6a
[Java] Add @javax.annotation.Nonnull to required getters (#9593)
* Add @javax.annotation.Nonnull to required getters

* Add updated samples

* Consider the nullable constraint
2021-07-19 10:48:58 +08:00
Jon Jensen
bd070308d9
[Java][*] Annotate deprecated operations and schemas (#9478)
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
2021-07-19 10:27:03 +08:00
Florian Kamella
c42e03e251
Support openApiNullable in jaxrs-cxf-client generator (#8863)
* 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
2021-07-19 10:22:52 +08:00
szTheory
6229801935
[Ruby] Add new Ruby versions to the Travis CI build matrix configuration (#9971)
* Add new Ruby versions to the Travis CI build matrix configuration

* Build the project and update samples
2021-07-19 09:57:55 +08:00
Peter Leibiger
5920bbd6df
[dart] Fix tests failing in CI after automatic dependency update (#9961)
* prevent future problems of this kind by adding the pubspec.lock file to VCS for all 3 test projects
2021-07-16 21:05:23 +08:00
William Cheng
160db768af update cpp ue4 samples 2021-07-16 11:46:03 +08:00
Mikael Lixenstrand
2e030c0c47
[Erlang] decrease memory usage (#9946)
* do not keep generator_state in cowboy match structure

* update generated example
2021-07-16 11:34:18 +08:00
Toby Archer
8df43a10c1
[Elixir] Adding :package and :description to mix.exs template (#9945)
* feat: templating elixir's mix.exs :package and :description

* adding updated elixir sample
2021-07-16 11:16:18 +08:00
Isaac van Bakel
65a271c50b
Haskell-http-generator - Make endpoints which don't return anything yield NoContent (#9916)
* Make endpoints which don't return anything yield NoContent

Relevant issue: OpenAPITools/openapi-generator#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:

OpenAPITools/openapi-generator#9830

which resolved a similar issue for that generator.

* Update samples after haskell-http-client NoContent change
2021-07-15 10:57:14 -05:00
William Cheng
79866e90cf update haskell servant samples 2021-07-13 21:03:07 +08:00
Jacob Heider
aa88d5bbe6
Swift5/Vapor query parameter coding keys required (#9924)
* Fixes camel-case query parameters (perPage => per_page)

* Prep for PR
2021-07-13 15:27:44 +08:00
Bruno Coelho
26f998b043
[kotlin][client] define kotlin coroutines context (#9936)
* [kotlin][client] define coroutines context

* [kotlin][client] update sample projects

* [kotlin][client] add missing kotlinx coroutines dependency

* [kotlin][client] update sample projects
2021-07-13 15:26:59 +08:00
William Cheng
05e4c3cf64 update samples 2021-07-12 17:15:22 +08:00
William Cheng
35f933b27f Merge remote-tracking branch 'origin/5.3.x' into 6.0.x 2021-07-12 17:11:35 +08:00
Justin Black
11515da053
Python client - fixes boolean enum use case (#9926)
* Adds boolean enum component and object property and tests of it

* Regenerates samples

* Passes needed locale argument to toUpperCase

* Regenerates samples
2021-07-09 18:55:22 -07:00