7409 Commits

Author SHA1 Message Date
Cameron Koegel
2c4daeae0b
[Ruby] Added Support for Binary Media Data Return (#11254)
* update template files

* fixed binary data return

* update samples

* apply change to file download logic and regenerate samples
2022-03-23 21:19:31 +08:00
Matthew Fernandez
61245fc52b
[Python] abbreviate dictionary membership testing idiom (#11905)
This is a more brief and efficient way of accomplishing the same thing.
2022-03-23 01:28:02 +08:00
Basil
196b9f266f
[php] use http_build_query for deepObject support (#11225)
* Update ObjectSerializer::toQueryValue method

It looks a bit ugly right now, but at least all tests has been passed.

* Add tests of query serialization

I used fixtures from OpenAPISpec main doc. Some prop combinations are not
officially documented yet, for instance behavior for nested objects and
arrays.

* Add test fixture from @nadar

* Add tests of Guzzle query build failure

* Add query build wrapper static method

Co-authored-by: Yuriy Belenko <yura-bely@mail.ru>
2022-03-22 12:56:15 +03:00
Oren Samuel
5e32f0c366
[java][resttemplate] using uriBuilderFactory to encode all template values (#11922)
* issue 11921 - encode all template values

* add test for url and query param encoding
2022-03-21 23:42:56 +08:00
William Cheng
caa0ba0d6d
only support jdk8+ (#11917) 2022-03-21 11:07:31 +08:00
LeComptoirDesPharmacies
87a5182c24
[Python] - Migrate enable per request authentification in new python codegen (#11279)
* LDS-2166 : add request auth to api client and api call

Can now overwrite request auth by request

Envoyé depuis mon iPhone.
P.S. : Ce commit est certifié sans gluten

* LDS-2166 : Add samples

Envoyé depuis mon iPhone.
P.S. : Ce commit est certifié sans gluten

* LDS-2166 : fix test

Envoyé depuis mon iPhone.
P.S. : Ce commit est certifié sans gluten

* LDS-2166 : Fixing test in python_disallowAdditionalPropertiesIfNotPresent

Envoyé depuis mon iPhone.
P.S. : Ce commit est certifié sans gluten

* LDS-2166 : add removed line break

Envoyé depuis mon iPhone.
P.S. : Ce commit est certifié sans gluten

* LDS-2166 : add name for _request_auth params

Add None when _content_type is not set

Envoyé depuis mon iPhone.
P.S. : Ce commit est certifié sans gluten

* LDS-2166 : add tabulation

Envoyé depuis mon iPhone.
P.S. : Ce commit est certifié sans gluten

* LDS-2166 : fix missing values

Envoyé depuis mon iPhone.
P.S. : Ce commit est certifié sans gluten

* LDS-2166 : generate sample

Add _request_auth in sample

Envoyé depuis mon iPhone.
P.S. : Ce commit est certifié sans gluten

* Request auth can now use multiple auth

Request auth is now a list of dict

Envoyé depuis mon iPhone.
P.S. : Ce commit est certifié sans gluten

* Add request_auths in test

Envoyé depuis mon iPhone.
P.S. : Ce commit est certifié sans gluten

Co-authored-by: Géry THRASIBULE <g.thrasibule@lecomptoirdespharmacies.fr>
2022-03-20 13:12:59 -07:00
William Cheng
571e635a54
[csharp][netcore] better tests for oneOf with primitive types (#11907)
* update samples

* undo changes for generichost
2022-03-19 22:21:33 +08:00
tuanchien
1fe2eb6b7a
Fix undefined object in Python model __copy__ template (#11792)
* Fix new_cls in methods_shared copy template

* Add generated files
2022-03-18 21:34:06 -07:00
Jason Finch
ffd758d82d
fix: [csharp-netcore]: oneOf fixes for Primitive types (#11427)
* fix: [csharp-netcore]: oneOf fixes for Primitive types

- Escape type in XML comment to avoid issue with types<T> rendering.
- Conditionals for string and Object to still throw ArgumentException.

* fix: Adjust whitespace in csharp-netcore template.  Regenerate Petstore clients due to different order of items in composedSchemas.
2022-03-18 11:58:46 +08:00
Bruno Coelho
8e68ff71c4
[swift5][client] fix non public visibility modifier for NullEncodable (#11903)
* [swift5][client] fix non public visibility modifier for NullEncodable

* [swift5][client] fix non public visibility modifier for NullEncodable
2022-03-18 09:58:52 +08:00
William Cheng
5d8b80a5cd
[Java] rename x-contentType to x-content-type (#11895)
* rename x-contentType to x-content-type

* undo changes
2022-03-18 09:50:42 +08:00
William Cheng
7cbdf4c163
[java][jersey2] update junit from 4.x to 5.x (major upgrade) (#11898)
* update java jersey2 junit to 5.x

* update jersey2-java8-special-characters

* update jersey2-java8-localdatetime

* update samples/openapi3/client/petstore/java/jersey2-java8

* better code format
2022-03-18 09:50:26 +08:00
William Cheng
a4d320489d
fix warning, update build.gradle, build.sbt (#11896) 2022-03-18 09:50:05 +08:00
bgong-mdsol
fa9c7a669b
[java][native] add connection timeout (#11890)
* java-native: add connection timeout

update connection timeout

* updated samples for connection timeout
2022-03-18 09:45:27 +08:00
cachescrubber
e07c7d1617
[Feature][Java/Spring] Support Discriminator Based OneOf Interface (#11650)
* Fix OpenAPITools#5381
added x-is-one-of-interface extension for oneOf interface in mustache
template

* Fix OpenAPITools#5381
fixed name of model from UNKNOWN_BASE_TYPE to right one in api: operationId + OneOf

Fix OpenAPITools#5381
parcelableModel is not required

* Fix OpenAPITools#5381
removed not needed methods

* Fix OpenAPITools#5381
catch NPE cases in preprocessOpenAPI
updated samples

* Fix OpenAPITools#5381
fixed generation of oneOf Models

* Fix OpenAPITools#5381
addOneOfInterfaceModel only for cases when useOneOfInterfaces is true and for spring

* Fix OpenAPITools#5381
NPE fix

* Fix OpenAPITools#5381
spring: fixed use of oneOf Models in API

* Fix OpenAPITools#5381
implementing oneOf for spring lib overriding methods with different behavior from default

* Fix OpenAPITools#5381
added x-is-one-of-interface extension for oneOf interface in mustache
template

* Fix OpenAPITools#5381
fixed name of model from UNKNOWN_BASE_TYPE to right one in api: operationId + OneOf

Fix OpenAPITools#5381
removed not needed methods

Fix OpenAPITools#5381
fixed generation of oneOf Models

Fix OpenAPITools#5381
addOneOfInterfaceModel only for cases when useOneOfInterfaces is true and for spring

Fix OpenAPITools#5381
NPE fix for tests

* Fix OpenAPITools#5381
fixed handing of composed schema with array

* Fix OpenAPITools#5381
fixed NPE in addOneOfInterfaceModel

* Fix OpenAPITools#5381
fixed generation of oneOf models with descriminator

* Initial merge of 5.0

* Aligned with master formatting

* Corrected spacing for class names to align with samples.

* Merged master

* Updated samples

* Consolidate methods from JavaClient and SpringCodegen (mov up to AbstractJavaCodegen)

* set useLegacyDiscriminator to false, format templates

* Suport JsonTypeName, fq class name for spring.io.Resource

* Generate Samples

* Test full qualified usage of the spring Resource interface.

* Add java-camel to samples.circleci.spring profile

* Add more complex example combining inheritance and oneof-interface

* Remove x-implements Serializable from JavaClientCodegen (moved to AbstractJavaCodegen)

* Fix spacing before opening brace after extends/implements

* Generate Samples

* Add more complex example combining inheritance and oneof-interface

* Generate Samples

* Fix JsonTypeName annotation handling in Java and JavaSpring

* Content mediatype is hardcoded in api.mustache #11511

* Generate Samples

* OAS3 incorrect data type when providing a default value #11367

* Generate Samples

* Fix JsonTypeName annotation handling in Java and JavaSpring

* Generate Samples

* getIsClassnameSanitized: use null safe equals

* Fix JsonTypeName annotation handling in Java and JavaSpring (merge)

* Generate Samples

* Generate Samples

* Add oneof sample

* Generate Samples

* Giv example oas spec a meaningful name, demo usage of oneOf in Model

* Generate Samples

* Remove unnecessary JsonTypeName include, add example for JsonTypeName (Bar_Create)

* Generate Samples

* Generate Samples

Co-authored-by: Alexej <oleksejk@gmail.com>
Co-authored-by: JBurgess <joel.burgess@gmail.com>
Co-authored-by: William Cheng <wing328hk@gmail.com>
2022-03-16 22:50:05 +08:00
William Cheng
a3fb571a1b update C# samples 2022-03-16 22:47:19 +08:00
William Cheng
9a1e6d778a
[Java][okhttp-gson] update junit to 5.8.2 from 4.13.2 (#11882)
* update junit to 5.8.2 in java okhttp-gson client

* undo changes to yaml

* update samples

* update tests

* fix indentation

* restore tests

* update samples
2022-03-16 16:33:47 +08:00
William Cheng
941d4845d7 minor fix to java okhttp-gson pom.xml 2022-03-16 01:03:17 +08:00
devhl-labs
86281a28c7
[charp-netcore] Fixed property and parameter sorting (#11807)
* refactor nrt annotation

* enable nrt by default in .net6.0+

* use shorter nrt annotation

* build samples

* removed debugging lines

* fixed model and operatoin constructors

* reverted a commented line for comparison

* upgraded to System.Text.Json

* build samples

* build samples

* deleted samples to remove old files

* bug fixes

* bug fixes

* added cumpulsory property to codegen

* build samples

* fixed bug

* fixed bug

* fixes

* removed bugged code that wasnt needed

* build samples

* restored sorting and default values for required params

* fixed bugs in comparison

* fixed sort comparators

* recreate tests

* build samples...again...

* removed debugging line breaks

* simplified constructor signature
2022-03-16 00:35:27 +08:00
Andriy Dmytruk
47f07158a3
[Micronaut] Add support for OffsetDateTime for Micronaut generators (#11871)
* Fix test output folder error for MicronautServerGenerator

* Add java8 OffsetDateTime support for Micronaut Codegens
2022-03-16 00:05:55 +08:00
satackey
213828d01b
[PHP] Fix deprecations in PHP 8.1 (#11743)
* Fix deprecations in PHP 8.1

* Use `bool` type instead of boolean
2022-03-15 16:20:05 +03:00
HexagonSun
834b50233e
[typescript-angular] Prevent syntax error when using isDateTime=true (#11860)
Fixes a bug where the the `append` method's closing brace was not
generated when using code-generation option `isDateTime=true`.

Fixes #11267.
2022-03-15 14:02:37 +01:00
William Cheng
82b7dee480
update java jersey2 dependencies to newer versions (#11878) 2022-03-15 18:38:34 +08:00
William Cheng
2db3070b2d
Update java (okhttp-gson) client dependencies to newer versions (#11877)
* update java okhttp-gson client dependencies to newer versions

* update samples
2022-03-15 18:38:12 +08:00
Cameron Koegel
266de25cf3
[Python] Added Support for Validating and Converting Model Attributes (#11134)
* [Python] Added Support for Validating and Converting Model Attributes

* generate new samples

* remove attribute error

* update samples

* revert old changes

* changed spec_property_naming default to true

* regenerated samples

* regenerate samples
2022-03-15 00:35:39 +08:00
William Cheng
7ac90ed98f
[Go] add more tests to cover more cases (#11849)
* more tests for go client

* add new files

* update samples

* add more tests
2022-03-11 10:42:24 +08:00
NoTuxNoBux
795db0c19e
Fix incorrect FileParameter deserialization in csharp-netcore (#11850) 2022-03-11 10:37:45 +08:00
devhl-labs
22a1906480
[csharp-netcore] Upgrade to System.Text.Json (#11741)
* refactor nrt annotation

* enable nrt by default in .net6.0+

* use shorter nrt annotation

* build samples

* removed debugging lines

* fixed model and operatoin constructors

* reverted a commented line for comparison

* upgraded to System.Text.Json

* build samples

* build samples

* deleted samples to remove old files

* bug fixes

* bug fixes

* added tasks to track the bugs
2022-03-10 15:02:42 +08:00
Gustavo De Micheli
26f65de5ec
Add auto-generated doc to scala-akka client (#11840)
Co-authored-by: Gustavo De Micheli <gustavo.de.micheli@lunatech.com>
2022-03-10 10:04:51 +08:00
Cameron Koegel
fd1ede6a73
[Python] Added Ability to Initialize Models by Passing in Dictionaries (#11125)
* [Python] Added Ability to Initialize Models by Passing in Dictionaries

* formatting change

* generate new python samples
2022-03-09 09:41:15 -08:00
Cameron Koegel
94b1440074
[Python] Add Support for Content-Disposition Header without filename (#11055)
* [Python] Add Support for CD header w/o filename

* updated documentation per PR instructions

* fixed formatting and updated samples and docs

* revert docs changes

* regenerate python samples

* updated sample python test
2022-03-09 01:10:49 +08:00
Cameron Koegel
b1c6513015
[Ruby] Added Support for Building Models from Hashes with Strings as Keys (#11243)
* [Ruby] Added Support for Building Models from Hashes with Strings as
Keys

* generate samples
2022-03-09 00:59:53 +08:00
Katsuyuki Omuro
16fd760b16
[Ruby] Add x-group-parameters support to Ruby client (#11825)
* add group parameter support to Ruby templates

* update generated sample files
2022-03-09 00:52:46 +08:00
Bruno Coelho
00ef435018
[swift5][client] create comment to warn about android api version (#11830) 2022-03-09 00:03:02 +08:00
Radek Postołowicz
c22997b9b8
Cleanup Jackson type info mess fixes (#9441) (#11691)
* Cleanup Jackson type info mess fixes (#9441)

* fixup! add import mapping for JsonIgnoreProperties
2022-03-07 09:36:05 +08:00
William Cheng
482032d14f
fix warnings due to incorrect docstring (#11815) 2022-03-07 09:23:09 +08:00
William Cheng
188f37f5a9 Merge branch 'master' of https://github.com/OpenAPITools/openapi-generator 2022-03-06 22:35:33 +08:00
William Cheng
03d4d75431 update C# samples 2022-03-06 22:35:04 +08:00
William Cheng
79872523d6
add tests, better code format (#11814) 2022-03-06 22:34:33 +08:00
William Cheng
f33ace6b03 update c samples 2022-03-06 21:48:00 +08:00
William Cheng
087c5a2fdb update c# samples 2022-03-06 21:29:49 +08:00
Oleh Kurpiak
2e0dc573b3
[Java][WebClient] allow sync requests (#11780) 2022-03-04 22:58:03 +08:00
William Cheng
876f2fe9f7
[typescript-angular] update package.json (v11) to address security alerts (#11765)
* remove package-lock.json

* remove package-lock.json, update dev dependencies

* add package-lock.json
2022-03-02 17:21:13 +08:00
William Cheng
c87f33dc46 remove typescript angular v6, v7 samples 2022-03-02 16:25:02 +08:00
sdoeringNew
53c2c66682
#8881: add ESM to typescript-fetch (#11720)
In case of "supportsES6" an additional tsconfig.esm.json is created. That will add an ECMAScript module to the npm build.
2022-03-02 08:37:54 +01:00
Jérôme Jutteau
21f649e087
[Rust] Support for withAWSV4Signature option (#11690)
* [rust] add support for withAWSV4Signature option in reqwest (#11193)

Signed-off-by: Jérôme Jutteau <jerome.jutteau@outscale.com>

* [rust] add petstore sample for withAWSV4Signature option for reqwest (#11193)

Signed-off-by: Jérôme Jutteau <jerome.jutteau@outscale.com>

* [rust] update all samples (#11193)

Signed-off-by: Jérôme Jutteau <jerome.jutteau@outscale.com>
2022-03-02 01:20:58 +08:00
LeComptoirDesPharmacies
dfc471dd90
LDS-2228 : remove undefined headers (#11757)
Remove undefined value from header

Envoyé depuis mon iPhone.
P.S. : Ce commit est certifié sans gluten

Co-authored-by: Géry THRASIBULE <g.thrasibule@lecomptoirdespharmacies.fr>
2022-03-01 17:37:56 +01:00
Stephane Carrez
e37400554c
[Ada] New options to choose the Ada support library in client and server (#11749)
* [Ada] New options to choose the Ada support library in client and server generated code

* new option httpSupport to choose between Curl or AWS (Ada Web Server) support
* new option openApiName to choose the package name of the OpenAPI support library
* update the templates to customize the support library
* update generated GNAT config.gpr file
* update the client petstore Ada samples

* Fix call to toLowerCase() to give a locale

* Rebuild the Ada generator documentation
2022-03-02 00:30:29 +08:00
Mico Piira
4daead1aea
[Java] Fix reactor-netty dependency (#11747)
The spring-boot-starter-webflux uses
io.projectreactor.netty:reactor-netty-http
dependency so the io.projectreactor.ipc:reactor-netty
is actually not used at all
2022-03-01 17:39:58 +08:00
William Cheng
bdfca5b95f
fix typo in cpp qt client (#11752) 2022-03-01 13:52:41 +08:00