17551 Commits

Author SHA1 Message Date
William Cheng
19eeebf083 add refresh token setting, use oauth_client_secret instead 2022-08-15 02:11:45 +08:00
William Cheng
c4dd42e7a0
fix r model validations, add tests (#13181) 2022-08-15 00:27:10 +08:00
William Cheng
9e20b01b12
[R] allow oauth scopes customization, remove unused import (#13179)
* add oauth scopes, remove unused import

* fix null check
2022-08-14 22:50:36 +08:00
William Cheng
1f42b09b33
fix issues reported by roxygen in r client (#13176) 2022-08-13 12:23:49 +08:00
William Cheng
123f92d136
add validations to R models (#13157) 2022-08-12 17:09:36 +08:00
William Cheng
456d7d0159
Add tests to Rust (hyper, reqwest) clients (#13165)
* add tests to rust clients

* add new file
2022-08-12 13:50:32 +08:00
Justin Black
8cd0d38446
Adds $ref data to schema classes (#13163)
* Adds getRef/setRef

* Adds ref to CodegenModel

* Adds ref to CodegenProperty

* Adds ref to CodegenParameter

* Adds ref to CodegenResponse

* Sets ref on CodegenModel and CodegenProperty

* Samples regenerated
2022-08-11 12:57:00 -07:00
Elric Milon
7fede83a56
Fix template for nullable models in rust new() fns (#10778)
Co-authored-by: Elric Milon <whirm@gmx.com>
2022-08-12 00:38:51 +08:00
Ewoud Kohl van Wijngaarden
9abaa53db1
Replace use of deprecated Faraday::UploadIO (#13127)
Faraday 0.16.0 added Faraday::FilePart as an alias to Faraday::UploadIO
and deprecated Faraday::UploadIO. In Faraday 2.0 the deprecated UploadIO
was removed.

Fixes: e12100b033c13b835fc3b3f1de159dc7f4634fc0
2022-08-11 15:18:39 +08:00
Jacob Peterson
c987e75f92
Fix missing import in api.mustache for Typescript generator (#13105)
* Fix missing import in `api.mustache` for Typescript generator

This fixes issue OpenAPITools/openapi-generator#11288.

* Generate samples
2022-08-11 08:27:52 +02:00
William Cheng
c5a0374d2b
[Ruby] add useAutoload option to use autoload instead of require (#13153)
* [Ruby] Use Ruby autoload to lower memory usage and load times

Fixes #12648

Requiring all models up front can be very expensive in both time and
memory if there are many models. In an example client with 6000 models,
this would consume nearly 400MB of memory and take about 7 seconds to
load. This is mostly unnecessary as most users of the client library
will only actually use a small percentage of the library.

The changes in this commit use Ruby's autoload capability to defer the
loading until the constant is actually used. In that same example client
with 6000 models, when initially requiring the library, the memory
usage dropped to ~20MB and loaded in 0.3 seconds. As the constants are
loaded on-demand, the memory would increase towards that 400MB ceiling,
but if only a few constants are actually used, then memory will never
actually hit that ceiling.

An additional side effect of using Ruby's autoload is that the order of
declaring the constants is not important, as Ruby will naturally load
them in the correct order when they are needed. Thus, this commit obviates
PR #9103 and fixes #4690.

* add option to use autoload in ruby client

* test ruby clients only

* add tests

* update samples

* Revert "test ruby clients only"

This reverts commit 0aaf71cd4cc5d266f824b261a4d312f07bd589e5.

* update doc

Co-authored-by: Jason Frey <fryguy9@gmail.com>
2022-08-11 12:45:13 +08:00
William Cheng
5662d6136f update samples 2022-08-11 10:39:34 +08:00
thrykol
e58b8b14c3
Cleaned up cargo clippy warnings (#13011)
* Cleaned up cargo clippy warnings

* Re-add clippy allow statements; don't lowercase variable names
2022-08-11 10:29:08 +08:00
shubham-lakhiwal
91e8fcbd38
[Typescript-axios] Dot prefix on every query parameter (#13149)
* [#12887] dot prefix fixed for pr #13051

* [#12887] dot prefix fixed for pr #13051

* [#12887] review comment incorporated #13051
2022-08-10 22:04:46 +02:00
shubham-lakhiwal
d547a89f4e
[#12887] typescript-axios: nested object as query parameter (#13051)
* [#12887] typescript-axios: object as query parameter resolved

* Added samples for typescript-axios

* minor variable name change

* minor indentation fixes

* [OpenAPITools#12887] typescript-axios: backward compantiability maintained

* [OpenAPITools#12887] typescript-axios: backward compantiability maintained

* [OpenAPITools#12887] typescript-axios: backward compantiability maintained

* [#12887] Review comments incorporated

Co-authored-by: Esteban Gehring <esteban.gehring@gmail.com>

* Review comment incorporated

Co-authored-by: Esteban Gehring <esteban.gehring@gmail.com>

* [#12887] samples updated

Co-authored-by: Esteban Gehring <esteban.gehring@gmail.com>
2022-08-10 15:33:07 +02:00
William Cheng
1c0d6d84d8
[Go] Fix missing import for array/map of file (#13143)
* fix missing import for array/map of file in go client

* add new files
2022-08-10 16:26:10 +08:00
William Cheng
a6ce5f711b
Better logic to handle duplicated properties in parent, child models (#13135)
* better logic to handle duplicated properties in child, parent models

* add tests, update samples
2022-08-10 14:15:25 +08:00
William Cheng
fd56b8f26b
[Java] enum space value must not be generated as underscore (#13136)
* [Java] enum space value must not be generated as underscore

as this is invalid in Java 9

this closes #9607

* script changes

Co-authored-by: Sven Meier <sven@meiers.net>
2022-08-09 11:05:27 +08:00
Laurens-W
9a04113258
Allow useInlineModelResolver to be influenced by generator options (#13056)
* Move logic so that it can dynamically be influenced by opts

* Or should it be here?

* We handle the useInlineModelResolver logic in configureGeneratorProperties after processOpts

Co-authored-by: Westerlaken, H.L. (Laurens) <laurens.westerlaken@devolksbank.nl>
2022-08-08 16:04:13 -07:00
Justin Black
9610a81a13
Adds requiredVarsMap (#13117)
* Adds requiredVarsMap

* Fixes imports

* Adds requiredVarsMap to CodegenParameter

* Updates CodegenResponse

* Adds feature to codegenModel

* Fixes codegenProperty

* Switches to getRequiredVarsMap

* Uses curly braces for set definition

* Added blocked examples back n to test spec now that the required bug is fixed

* Sample regenerated

* Handles escaping required property names

* Fixes CI tests

* Samples regenerated

* Samples regnerated

* Fixes test
2022-08-08 09:47:43 -07:00
lsalgo
186ad25cee
fix: [JAVA/SPRING] [#12692] fixed optional config property legacyDisc… (#12713)
* fix: [JAVA/SPRING] [#12692] fixed optional config property legacyDiscriminatorBehavior always being overwritten to false in spring codegen

* feat: [JAVA/SPRING] [#12692] spaces instead of tabs

* feat: [JAVA/SPRING] [#12692] spaces instead of tabs in test

* fix: [JAVA/SPRING] [#12692] added comment

* fix: [JAVA/SPRING] [#12692] spaces instead of tabs

* fix: [JAVA/SPRING] [#12692] spaces instead of tabs in test
2022-08-09 00:06:28 +08:00
fbl100
d3dd676960
Issue 13043: Improved handling of recursive schemas (#13109)
* Issue 13043: Improved handling of recursive schemas

Converted Exception to a warning when a Schema is doubly added to the includedSchemas list
Broke recursion in a more reasonable place when generating example values

* Addressed comments from PR
2022-08-08 08:39:17 -07:00
RomainPruvostMHH
032e1a42d6
[Spring] Fix generated api ignore basePath (#10573)
* remove @RequestMapping from the apiController.mustache file and add it
to the api.mustache file

* move the defaultBasePath.mustache file in src/main/resources/JavaSpring
so that it commun with all Spring server-side libraries (spring-boot,
spring-mvc). The value of default context path is the value of
contextPath variable.

* added a unit test to verify it

* update the outputDir variable to samples/server/petstore/spring-stubs in
the  bin/configs/spring-stubs.yaml file because it generates Spring
server-side classes. And not on the client-side as the output directory
seemed to suggest.

* Results of "generate-samples.sh bin/configs/spring*" command

* Remove default value of url in @FeignClient

* resolve conflicts with origin/master

* merge remote/master into branch

* fix samples after a merge with master

* delete the directory samples/client/petstore/spring-stubs because it
moved to samples/openapi3/...

* add samples/client/petstore/spring-stubs just for the CI build (normally
it is unnecessary))

* delete 3 kotlin class files commited by error in
samples/server/petstore/kotlin-springboot and
samples/server/petstore/kotlin-springboot-reactive

* Update the unit test SpringCodegenTest.doAnnotateDatesOnModelParameters
because one more annotation is generated (@RequestMapping)

Co-authored-by: rpruvost <rpruvost@ITEM-S78402.emea.msad.sopra>
Co-authored-by: rpruvost <rpruvost@ITEM-S78402>
Co-authored-by: rpruvost <rpruvost>
2022-08-08 15:43:23 +08:00
William Cheng
3c4948ac08
skip client id, secret validation to allow multiple auth schemas (#13126) 2022-08-08 01:39:07 +08:00
William Cheng
fb29284a99
improve r regular expression handling (#13125) 2022-08-08 00:56:43 +08:00
William Cheng
f287dde875
[R][httr2] better support for OAuth authoriziation flows (#13123)
* better oauth support in r client

* better comment

* update samples

* remove commented code

* update samples

* fix mustache tag
2022-08-07 21:49:04 +08:00
y-tomida
5644e23128
[Kotlin] Add reserved word contract (#13108) 2022-08-07 09:50:47 +01:00
Linus Klöckner
fca13eb9e9
[csharp-netcore] Form data serialize non-primitive objects (#12967)
* csharp-netcore: serialize non-primitive objects in form-data

* csharp-netcore: update samples
2022-08-06 21:59:06 +08:00
William Cheng
d3a268924f
better validation for r parameters (#13119) 2022-08-06 21:06:39 +08:00
AnaTofuZ
462f927b87
Fix Perl cannot string bind undef (#13114)
* fix and add perl client tests

* fixed undefined value in Perl

* update perl client sample

* fix test case
2022-08-06 21:05:37 +08:00
William Cheng
f73decb0f0 update test file sha256 2022-08-06 18:46:13 +08:00
William Cheng
35feca98cf fix test 2022-08-06 16:34:21 +08:00
Krzysztof Łabuś
641d5159eb
C# API Client CancellationToken, Base Validation and Nullable/Required (#13049)
* Ensure CancellationTokenSource disposal in CSharp clients

* Fixed broken BaseValidate in CSharp models

* Ensure final CancellationToken is used in CSharp API clients

* Ensure EmitDefaultValue true for required properties in CSharp clients

* Regenerated samples

* Fixed broken C# ApiClient.ExecAsync disposable resources
2022-08-06 16:33:18 +08:00
William Cheng
f5900c7015
[R] fix auto-generated doc, add checks for bearer/access token (#13112)
* update readme to show bearer auth

* fix doc

* fix doc
2022-08-06 16:32:18 +08:00
William Cheng
247574aa0c
fix assignment, clean up tests, use !!! operator (#13075) 2022-08-05 14:09:24 +08:00
Max K
a4a89caf73
Added parameter to add models in seperate project (#13044)
Samples and build for seperate model projects
2022-08-05 13:46:58 +08:00
Justin Black
aa1b0a15da
[python-experimental] removes print (#13107)
* Removes print

* Samples regenerated
2022-08-04 17:04:03 -07:00
Justin Black
8c3a734c64
[python-experimental] moves model and api docs into subfolders (#13106)
* Regens docs in new locations, adds endpoint anchors

* Updates readme links and top of page link

* Model updates so the readme links work

* Samples regenerated

* Adds missing module names to apis and models
2022-08-04 14:03:21 -07:00
Justin Black
69121a9b8f
3.0.3 spec updated with json schema tags (#13104)
* Spec updated with json schema tags

* Samples regenerated
2022-08-04 12:14:06 -07:00
William Cheng
cdc9683331
[jaxrs-spec] to fix default values for array (#13076)
* fix 13025 with correct default values for array

* fix missing curly bracket
2022-08-05 00:13:22 +08:00
Justin Black
a3490d7379
Revert "Issue 13043: converted an exception to a warning" (#13074)
* Revert "Issue 13043: converted an exception to a warning for doubly adding schemas to the includedSchemas list (#13070)"

This reverts commit bbf463f7275b69053345630c61444b909d6e345d.

* Samples regen
2022-08-03 13:22:32 -07:00
William Cheng
0d50b4044f
fix TS model tests in Windows (#13072) 2022-08-04 01:24:15 +08:00
plotbox-io
4fa427c653
Update php-symfony/model_variables.mustache to fix template bug (#13060) (#13061) 2022-08-04 01:12:40 +08:00
jiangyuan
72991e6be3
[Java] apache-httpclient serialize support custom contentType (#13058)
* java http-client multiPartBuilder support custom contentType for textBody

* java apache-httpclient serialize support custom contentType

* modify getContentType method
2022-08-04 00:41:18 +08:00
Thomas Hansen
1e3a39b460
[PHP] Add support for server variables in operations (#12982)
* [FEATURE] Support for server variables in operations

* [AUTOGENERATED] update samples

* [PHP] Added tests for server variables in operations
2022-08-04 00:15:51 +08:00
dependabot[bot]
c9c0b6267f
Bump eventsource from 1.0.7 to 1.1.1 in /website (#12499)
Bumps [eventsource](https://github.com/EventSource/eventsource) from 1.0.7 to 1.1.1.
- [Release notes](https://github.com/EventSource/eventsource/releases)
- [Changelog](https://github.com/EventSource/eventsource/blob/master/HISTORY.md)
- [Commits](https://github.com/EventSource/eventsource/compare/v1.0.7...v1.1.1)

---
updated-dependencies:
- dependency-name: eventsource
  dependency-type: indirect
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-08-04 00:13:53 +08:00
dependabot[bot]
ab9af4c7b2
Bump terser from 4.6.3 to 4.8.1 in /website (#12946)
Bumps [terser](https://github.com/terser/terser) from 4.6.3 to 4.8.1.
- [Release notes](https://github.com/terser/terser/releases)
- [Changelog](https://github.com/terser/terser/blob/master/CHANGELOG.md)
- [Commits](https://github.com/terser/terser/commits)

---
updated-dependencies:
- dependency-name: terser
  dependency-type: indirect
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-08-04 00:13:38 +08:00
Flux Xu
6d1c51c95b
[rust] fix incorrect Cargo.toml generated when supportAsync & withAWSV4Signature are both enabled. (#13015) 2022-08-04 00:11:08 +08:00
William Cheng
13d34b9b63
[R][httr2] Fix form parameter support (#13057)
* fix form parameter support in the r client

* fix query param

* fix form parameters
2022-08-03 23:45:12 +08:00
fbl100
bbf463f727
Issue 13043: converted an exception to a warning for doubly adding schemas to the includedSchemas list (#13070) 2022-08-03 08:18:03 -07:00