5759 Commits

Author SHA1 Message Date
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
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
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
fbl100
4da8176b04
[python experimental] Issue 13043: fixes toExampleValueRecursive stackoverflow (#13062)
Fixes an issue in python-experimental that was causing a stackoverflow
error.

* Fixed by adding composed schemas to the list of 'includedSchemas'
* Fixed an additional issue that was causing a schema to be added to the
'includedSchemas' list
* Added a unit test with a minimal GeoJson spec to confirm results
2022-08-03 07:28:33 -07:00
William Cheng
aa1f6276f3
[R][httr2] fix HTTP header (#13066)
* add test for header parameters

* fix header parameter in r httr2 client
2022-08-03 15:05:39 +08:00
William Cheng
d8771de9c1
fix query param, fix spec (#13065) 2022-08-03 11:49:34 +08:00
Marco Martinelli
1cf9d178d6
Update tsconfig.mustache (#12753)
Fix #12728
2022-08-02 12:26:00 +02:00
Justin Black
c959a6cf38
[python-experimental] Fixes issue 12986 (#13054)
* Adds fix for api names and tag names

* Removes sample spec

* Samples regenerated
2022-08-01 15:17:25 -07:00
Justin Black
68fb5a96c5
[python-experimental] consolidates endpoints into paths module (#13007)
* Adds endpoint creation in path modules

* REgens samples

* Adds BaseApi so there can be 2 class interfaces for http method and operationid

* Adds paths init

* Adds enum containing paths

* Uses path enum for endpoint paths

* Adds camel case to undersce converstion in to ineum var name

* Fixes path enum generation

* Moves path api combination module into apis

* Moves tag apis into a tags module

* Adds path_to_api

* Changes module path to paths

* Fixes tag api imports

* Fixes self type in endpoint methods

* Adds test changes

* Adds tag enum

* Adds tag_to_api

* Adds missing tag

* Fixes self types in endpoint methods

* Refactors java endpoint generation to be simpler

* Further refactors generateEndpoints

* Generates one test file per endpoint

* Updates v3 samples

* Fixes endpoint tests, all tests passing now

* Samples regenerated

* Fixes petstore tests

* Generates separate endpoint test methods on each endpoint

* Fixes api docs and enum string values in those docs

* Regenerates samples

* Removes pass to fix tests
2022-08-01 11:22:35 -07:00
William Cheng
4635dda518
[R] Add httr2 support (work in progress) (#13005)
* add httr2 support to r client gen

* fix headers

* add accepts, content-types

* update samples

* fix req

* update samples

* various fixes

* add data file test

* fix streaming, add tests
2022-08-01 00:58:19 +08:00
William Cheng
6b6403b2bf
enhance api exception in r client (#13046) 2022-07-31 16:20:39 +08:00
William Cheng
054264df90
[R] refactor the client to prepare additional HTTP library support (#13045)
* remove httr functions from api files

* fix comments
2022-07-31 10:52:57 +08:00
Max K
c81a63fd7a
[aspnetcore] Added parameter to generate models in a seperate csproj (#13024)
* Added parameter to add models in seperate project

* Update samples

* refactored ELSE
2022-07-30 15:35:56 +08:00
Yohei Kitamura
6a3226d004
[Ruby] Remove configuring verbose option from Faraday template (#13037) 2022-07-30 15:30:10 +08:00
HappyFeedFriends
79c5091de4
[Typescript] Fix generated type for files (#12831)
* fix file types

description problem in: https://github.com/OpenAPITools/openapi-generator/issues/12744

* fix: generate
2022-07-28 16:53:54 +02:00
William Cheng
e5e4e8fc07
throw exception if username, password is not set in http auth in r client (#13035) 2022-07-28 17:06:52 +08:00
William Cheng
c905760898
fix query, header params (#13034) 2022-07-28 16:31:12 +08:00
uesyn
bc65be4c9a
[typescript] typescript client generator supports import mapping (#12957)
* support import mapping

* Remove unused imports

* Remove unused variable

* Not to clear importMapping

* Re-generate samples

* Use same model import path everywhere

* Move import mapping logic from toModelImport method

Co-authored-by: Bodo Graumann <mail@bodograumann.de>
2022-07-27 17:09:27 +02:00
Pierre-Quentin Warlot
6226dc2848
fix issue content-type default charset (#13009) 2022-07-27 19:01:45 +08:00
William Cheng
e811d6bbe2
prefix local variables in api functions in r client (#13018) 2022-07-26 19:20:23 +08:00
William Cheng
adf7062e63
add support for accept, content-type headers in r client (#13017) 2022-07-26 17:19:23 +08:00
Bruno Coelho
87dc75780a
[kotlin][client] add support for unknown default case with Kotlinx Serialization (#12930)
* [kotlin][client] Kotlinx Serialization cleanup

* [kotlin][client] Kotlinx Serialization cleanup

* [kotlin][client] add support for unknown default case with Kotlinx Serialization

* [kotlin][client] add support for unknown default case with Kotlinx Serialization

* [kotlin][client] add support for unknown default case with Kotlinx Serialization

* [kotlin][client] improve Kotlinx Serialization naming

* [kotlin][client] improve Kotlinx Serialization naming
2022-07-26 09:42:19 +01:00
William Cheng
bc98014146
Add auto-generated .swiftformat to Swift clients (#13002)
* add .swfitformat to swift client

* minor format change
2022-07-26 11:21:53 +08:00
Justin Black
2b9a1ad0fc
[python-experimental] Consolidates model tests into a subfolder (#13006)
* Consolidates model tests into a subfolder

* Regenerates samples
2022-07-24 14:02:34 -07:00
Justin Black
30f1f11205
[python-experimental] Adds response body tests for json content type (#12988)
* Tags renamed

* Spec updated to add response bodies

* Adds correct tag to response body routes

* Adds response body autogen tests

* Adds pos test cases, removes dead code

* Adds and uses api_test_partial

* Samples regenerated
2022-07-24 12:33:23 -07:00
Bogdan Ilchyshyn
96b7d35e97
fixing FetchError to be compatible with esnext (#13004)
closes #12927
2022-07-24 14:09:27 +02:00
William Cheng
b6ca40031a
fix issue when discriminator property is an enum string (#13001) 2022-07-24 17:55:08 +08:00
y-tomida
3eb3337c2b
[typescript] Don't throw exception when additionalProperties is set to true (#13003)
* use DefaultCodegen#getSchemaAdditionalProperties instead of Schema#getAdditionalProperties

* add testcase

* fix comment
2022-07-24 09:48:00 +02:00