11973 Commits

Author SHA1 Message Date
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
William Cheng
594d08a7a4
update kotlin auto-generated test to avoid npe (#10058) 2021-08-02 18:44:03 +08:00
William Cheng
ec49dc3fed
[Kotlin] minor bug fixes (#10071)
* fix http basic auth, deprecate option, escape special property name

* update doc
2021-08-02 18:04:38 +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
fc28661dde
add AnyType support to Kotlin (#10070) 2021-08-02 00:19:05 +08:00
Mike
831034bb24
Move the JsonbProperty annotation from the getter to the field declaration (#10035)
Co-authored-by: Mike Anderson <mike.d.anderson@oracle.com>
2021-07-31 21:19:44 +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
Stefan Burnicki
d18ee5459c
[kotlin-spring] Support model objects and date-time query params (#8257)
* [kotlin-spring] Support query params with model objects (#8080)

Must fix #8080

* [kotlin-spring] Support parsing date and date-time parameters

adopted #3860 for kotlin-spring

Co-authored-by: Мышкин Максим <m.myshkin@tinkoff.ru>
2021-07-29 10:37:31 +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
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
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
b799ca9ee0 Merge remote-tracking branch 'origin/5.3.x' into 6.0.x 2021-07-27 11:52:19 +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
Hui Yu
5fb845a58f
[C][Client]Treat the data type "byteArray" as "string" (#10034) 2021-07-27 00:10:36 +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
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
sigand
352ff98dff
Fix Kotlin default values for strings and arrays (#9865)
* Properly escape default values

* Support default values for array types

* Use Kotlin initializers, not Java

Co-authored-by: Sigrid Andersson <sigrid.andersson@entur.org>
2021-07-21 15:58:16 +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
Michael Marner
e20ccd49ed
9955 dart-dio-next only remove typed_data import if safe (#9956) 2021-07-19 17:27:46 +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
Samuel Kahn
27e2ee0b64
[cpp-ue4] Added support for bool in URL parameters, now writes true/false instead of 1/0 (#9951) 2021-07-16 11:37:34 +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
William Cheng
d99f16edc5
[C#][netcore] Remove redundant logic in adding ICollection (#9938)
* remove reduce logic in adding IColletion

* remove redundant logic in csharp client generator

* update samples
2021-07-16 11:33:40 +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
devhl-labs
519ab9290e
[abstract csharp] Optional param data type (#9885)
* fix optional parameter dataType

* add test

* removed stray spaces

* improved test method name
2021-07-13 17:12:31 +08:00
Profpatsch
7bd633f1ae
[haskell][server] Export the Wai Application for the server (#9801)
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.
2021-07-13 17:00:06 +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
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
William Cheng
39fbf53150 create v5.3.0 2021-07-10 00:12:23 +08:00
William Cheng
02835b35bc
Prepare v5.2.1 (#9922)
* bump verions to 5.2.1-SNAPSHOT

* update samples

* update readme

* fix gradle properties
2021-07-09 22:42:31 +08:00
William Cheng
90f7bcd909
Prepare v5.2.0 release (#9920)
* 5.2.0 release

* update samples

* update meta codegen
2021-07-09 17:06:55 +08:00
Bruno Coelho
f5c3430a26
[swift5][client] avoid local variable name collision (#9913)
* [swift5][client] avoid variable name collision

* [swift5][client] update sample projects
2021-07-09 01:03:54 +08:00