12694 Commits

Author SHA1 Message Date
devhl-labs
930643b7bc
Add switches (authentication collections) to support files (#9884)
* added authentication switches to support files

* build samples

* build samples

* added documentation
2021-08-07 21:54:23 +08:00
Ahmed Fwela
dbd80fbf8a
[dart-dio-next] improve encodeCollectionQueryParameter to handle cases where collectionFormat is null (#10105)
* improve encodeCollectionQueryParameter to handle cases where collectionFormat is null

* updated samples
2021-08-07 21:53:36 +08:00
Ween Jiann
11d29eb22b
[go-server] Feat: add required assertions to models (#10068)
* Add RequiredError

* Add IsZeroValue helper

* Add AssertRequired method to all models

* Add AssertRequired call for body param

* Regenerate files

* Add DisallowUnknownFields

* Regenerate samples

* Use hasRequired in model to remove unnecessary code

* Revert disallowUnknownFields

* Use isAdditionalPropertiesTrue for disallowing unknown fields

* Updated samples

* Fix indent

* Add require checks for nested slices

* Add new tests

* Regenerate samples

* Regenerate samples after merging
2021-08-07 21:29:14 +08:00
Yorick Holkamp
189b44b191
[dart2] Include request body on DELETE call (#10100)
* Include request body on DELETE call

This change updates the generated `ApiClient` to include the request body on DELETE calls. [Per the RFC on page 2][1], DELETE calls are allowed to have a request body, even though the behavior may be undefined. I've not come across many APIs that use this behavior but there are a few, in particular the [Ory Kratos API][2] does so, not forwarding the body prevents such an API from being used. An API spec that does not define a request body should continue to function as expected.

[1] https://datatracker.ietf.org/doc/html/rfc7231#section-4.3.5
[2] https://www.ory.sh/kratos/docs/reference/api/#operation/submitSelfServiceLogoutFlowWithoutBrowser

* Samples generated with dart2 template change
2021-08-07 21:11:03 +08:00
James Gilliland
09a4da0970
Make php's array a primitive (#10093)
Fixes a bug where code generation would sometimes treat arrays as
objects and break serialization and code documentation.
2021-08-07 21:02:40 +08:00
ND Tai
fe63b0e28e
Fix typo on rust client (#10096) 2021-08-07 20:53:27 +08:00
Richard Willis
6d8791c3da
[typescript-fetch] Fix double comma arguments due to initOverrides. Refs #10050 (#10101) 2021-08-06 10:21:05 +02:00
Braden Mars
39901c824f
[typescript-inversify] fix: Sets IsCollectionFormatMulti to true on multi file uploads (#9796) 2021-08-06 09:25:10 +02:00
ota42y
e2ff39d3e3
[TypeScript-fetch] disable lint in index file (#9675)
* [TS] disable lint in index file

We disable lint in typescript-fetch in this PR
https://github.com/OpenAPITools/openapi-generator/pull/4110

But we doesn't disable index.ts files so we'll get error with [no-cycle](https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-cycle.md) rule.

- index.ts [import all classFiles](https://github.com/OpenAPITools/openapi-generator/blob/master/modules/openapi-generator/src/main/resources/typescript-fetch/models.index.mustache#L4) to exporting
- When model use another models (i.e. article model have user model as author), model import another model [using index.ts](https://github.com/OpenAPITools/openapi-generator/blob/master/modules/openapi-generator/src/main/resources/typescript-fetch/modelGeneric.mustache#L10)

So we need disable all generated file.

* generate files

Co-authored-by: Esteban Gehring <esteban.gehring@bithost.ch>
2021-08-06 09:22:24 +02:00
Richard Willis
c4b9804139
[typescript-fetch] Add initOverrides (#10050)
You can now pass in fetch initOverrides per request.

This change is mainly to add support for request cancellation (via AbortSignal).
2021-08-06 09:14:52 +02:00
duxiaofeng
c05ec99182
make typescript-fetch code compatiable with nodejs environment (#10072) 2021-08-06 08:59:40 +02:00
Nathan Baulch
ca5de9d503
[php] Deprecated annotation on operations and fields (#10085) 2021-08-04 17:29:19 +08:00
Nathan Baulch
dc23267580
[csharp] Obsolete attribute on deprecated operations and properties (#10084) 2021-08-04 17:28:45 +08:00
William Cheng
865510ea59
Update test build files to the latest SNAPSHOT version (#10090)
* fix versions in test build files

* test branch

* Revert "test branch"

This reverts commit 00ce0f029d4b524fcfc266ed787512e13cd85e5a.
2021-08-04 17:03:54 +08:00
Peter Leibiger
ccd23ec75a
[dart-dio] Fix parameter generation problems (#10061)
* fix parameter with list of `MultipartFile` being generated as single `MultipartFile`
* generate serializer factories for all container params, not only body params
* fix compilation errors when `skipFormModel=false`
2021-08-04 14:25:26 +08:00
Gareth Smith
98e4eb708f
[BUG]Java] Fix a race condition in RetryingOAuth.mustache (#10087)
If there were multiple concurrent requests at a time at which the OAuth token had expired, only a single request would be retried. The other requests would fail because of the expired token, but not be retried and so the failures would be propagated to the caller.
2021-08-04 10:06:39 +08:00
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
Hui Yu
c21e6de7da
[C][Client] Treat the data type "byteArray" same as "string", part 2 (#10067) 2021-08-03 16:50: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
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