7409 Commits

Author SHA1 Message Date
William Cheng
68360cab92
better error messages for oneOf in java okhttp-gson (#12311) 2022-05-10 17:16:02 +08:00
William Cheng
ad3b5f7045
[Inline model resolver] various improvements (#12293)
* better handling of requestbody in the inline resolver

* remove commented code

* better request body naming

* fix unique naming

* minor code format change

* removed additional underscore from names, fix test

* more fixes, update tests

* fix all tests

* undo changes to default codegen

* update samples

* update python tests

* add new files

* update samples
2022-05-10 17:13:57 +08:00
Yuriy Belenko
e639dad66a
[php] Add PSR-12 rule set (#12302)
* Upgrade PHPCS-Fixer to 3.5 version

This version requires PHP 7.4 or 8.0 which perfectly meets our supported
PHP right now.

* Rename config file to .php-cs-fixer.dist.php

This way it can be overwritten with local file(same name without "dist"
part). Also it's recommended filename from the package doc.

* Add PSR12 rule set to config

I've changed config file a bit to look like example from the doc.
Ref: https://github.com/FriendsOfPHP/PHP-CS-Fixer/blob/HEAD/doc/config.rst

* Ignore new cache format

* Remove blank line after class opening

* Set constants in models public

* Refresh samples
2022-05-10 00:34:38 +08:00
Thi
b7d079b7e3
[Cpp][Qt][client] Fixed issue with unique items in OpenAPI schema (#11954)
* [cpp-qt-client] Fix CMakeLists.txt

Changed: Always add Qt5::Gui to build
Added: find_package for OpenSSL (if not Apple)

* Revert "[cpp-qt-client] Fix CMakeLists.txt"

This reverts commit db5c3423b92410115f4c3d5f8b6ca0cabb58f9f6.

* Revert "Revert "[cpp-qt-client] Fix CMakeLists.txt""

This reverts commit c4f055f3cdf666b3ce265fa14e297c3b11d803d9.

* [Cpp][Qt][client] Fixed unique items in OpenAPI schema

Added equal operator for schema objects
Added qhash Operator

in api template
depending on unique items
output.insert(val) -- QSet (unique items)
or
ouput.appen(val) -- QList (not unique items)

* Added petstore with unique items to tests schemas, added config for [cpp][qt] and this schema

* Run ./bin/generate-samples.sh bin/configs/cpp-qt-client* for new schemas and tests

* Update bin/configs/cpp-qt-client-petstore-unique.yaml

Co-authored-by: Martin Delille <martin@delille.org>

* Update bin/configs/cpp-qt-client-petstore-unique.yaml

Co-authored-by: Martin Delille <martin@delille.org>

* Fixxed typo in name of spec file, too.

* Moved petstore_plus_unique.json to correct directory  (2_0 -> 3_0 )

moved open api specification
rerun generate samples

* Deleted obsolete samples output

* Removed obsolete files   (unique items petstore yaml definition and samples)

* Updated samples output for cpp-qt

Co-authored-by: Martin Delille <martin@delille.org>
2022-05-08 15:14:41 +08:00
Jon Schoning
8511ce360c
[haskell-http-client] Update haskell-http-client generator to Aeson 2.x (#12309)
* Update haskell-http-client generator to Aeson 2.x

Co-authored-by: Andrea Cognolato <andrecogno@hotmail.it>
2022-05-07 17:53:52 -05:00
Eugene Aleinikov
1cca865a69
Move Feign Client url parameter under condition. (#12250) 2022-05-07 00:10:52 +08:00
Johan Sjöblom
706791f43f
[Bug][Kotlin-client] Can now handle path param of type list (#12244)
* Bugfix Kotlin-client: Can now handle path param of type list for jvm-volley and multiplatform. Also cleaning up generated code

* Adding samples to github workflow. Deleting old workflow

* Tweaking setup of jvm-volley

* Updating samples

Co-authored-by: William Cheng <wing328hk@gmail.com>
2022-05-05 01:04:20 +08:00
Sergey Vladimirov
6bd7036ff8
[kotlin-client] Add ktor library with Jackson and GSON processing support (#11838) 2022-05-05 00:50:45 +08:00
Miklos Szots
bee9c79e5a
[Scala][sttp] various bug fixes (#12254)
* avoid using deprecated enum naming

* map anytype to any for sttp

* circe codecs and enum fixes

* regenerated the samples
2022-05-05 00:40:58 +08:00
William Cheng
1e48c95d48 update samples 2022-05-03 13:38:23 +08:00
Johannes
3e5ec3c6ef
Allow the baseUrl of elixir APIs to be overridden (#12268)
* Allow the baseUrl of elixir APIs to be overridden

* Run generator

* Add missing `:`

* Update modules/openapi-generator/src/main/resources/elixir/connection.ex.mustache

Co-authored-by: Michael Ramstein <633688+mrmstn@users.noreply.github.com>

* Generate sample with new change

Co-authored-by: Joe Eifert <joe@databerg.rocks>
Co-authored-by: Michael Ramstein <633688+mrmstn@users.noreply.github.com>
2022-05-01 15:48:52 +08:00
William Cheng
e8742e8850 update samples 2022-05-01 15:23:04 +08:00
Hui Yu
2ca6cf7d62
[C][Client] Eliminate compiler warnings (#12260) 2022-04-30 16:41:26 +08:00
Johan Sjöblom
8950a9a3c0
[BUG][Kotlin-client] Handling default values of parameters (#12255)
* Bugfix Kotlin-client: Handling default values of parameters

* Adding object
2022-04-29 15:26:29 +01:00
William Cheng
b6a8037f62 update samples 2022-04-27 20:45:24 +08:00
William Cheng
e0d8d0f5d6
better code format for python cilent (#12251) 2022-04-27 16:00:44 +08:00
William Cheng
73a534d54c
fix response type string (#12246) 2022-04-27 02:07:11 +08:00
Kirill Baurchanu
ffd31f557d
[Java][Native] Reference to Consumer is ambiguous (#10744)
* [java][native] reference to Consumer is ambiguous

* [java][native] reference to Consumer is ambiguous

Co-authored-by: Kirill Baurchanu <baurchanu.k@gmail.com>
Co-authored-by: Kirill_Baurchanu <kirill_baurchanu@epam.com>
2022-04-27 01:52:27 +08:00
cghislai
dab458bd02
[angular-v13] Add compilation test for typescript-angular-v13-provided-in-root using petstore v3 (#11471) 2022-04-27 01:39:21 +08:00
William Cheng
53eebc953f
New option to map inline schema names (#12237)
* add option to specify inline schema nam mapping

* update samples

* update samples

* add new option to plugins

* better code format

* better code format

* better log info

* better docstring

* add tests
2022-04-27 01:13:45 +08:00
Johan Sjöblom
074010e124
Bugfix Kotlin-client: Can now handle default dataclass values for multiplatform (#12242) 2022-04-26 13:51:19 +01:00
Panos Argyrakis
981c090e0f
[Java][OkHTTP] Include HTTP response data in ApiException getMessage() (#12207)
* added getMessage() override

* Updated samples

* Updated test to expect new message format

* Updated pattern to expect specific message

* updated to platform agnostic line separators
2022-04-26 11:26:36 +08:00
William Cheng
23ee8fdf7a
better code format for python client (#12231) 2022-04-25 23:25:42 +08:00
Kuzma
6b3abd9421
[Php] Exclude query params when they're not required (#12120)
* exclude query params when they are not required

* fix check on empty

* update samples

* fix

* add tests

* update test

* Fix style

I guess PHPCodeSniffer would find PSR12 violated but we use CS-Fixer
instead. Anyway, conditions should contain spaces between logical
operators for readability.

* Apply CS-Fixer changes to templates

* Refresh samples

* Add required param to docblock

Co-authored-by: Yuriy Belenko <yura-bely@mail.ru>
2022-04-25 18:16:00 +08:00
Dmitry Vasilev
6f1fa4592b
[BUG][python] Fix PEP8 E111 issue in rest.mustache (#12229)
* Fix PEP8 E111 issue

* Update samples
2022-04-25 17:00:27 +08:00
William Cheng
4ee5f72214
Use LinkedHashMap for deterministic iteration order (#12230)
* to LinkedHashMap

* LinkedHashMap

* allModels to LinkedHaskMap

Co-authored-by: yilinwang <linda.yilin@gmail.com>
2022-04-25 13:33:24 +08:00
AJ Rice
5441aeca72
[csharp-netcore] Add support for byte[] response deserialization (#12188)
* [csharp-netcore] DX-2532 - Add support for `byte[]` response deserialization

Add support for `byte[]` response type deserialization

* Update Samples and Docs
2022-04-25 12:27:56 +08:00
Auke Schrijnen
85170ee314
[java-micronaut] Generate visitor for subtypes with a discriminator (#12192)
* [java-micronaut] Generate visitor for subtypes with a discriminator

When types which extend a common type and are distinguished based on a
discriminator are consumed they are often cast to their specific Java
type which results in error prone boilerplate code.

By generating a visitor for those kind of types the various subtypes can
be consumed in a type safe manner.

* [java-micronaut] Remove redundant public access modifiers
2022-04-25 10:54:06 +08:00
Andriy Dmytruk
52d8a969ce
[Micronaut] Add option to describe response wrappers (#12186)
* Minor refactor for Micronaut generators

* Add support for security roles in micronaut server generator

* Micronaut Server Generator refactor the x-roles String variable

* Add support for Micronaut HttpResponse wrapper

* Generate samples

* Optimize the usage of context-path for Micronaut server
2022-04-24 16:10:33 +08:00
Johan Sjöblom
aa51d421cc
Fixing bug in Kotlin Client with BigDecimal default value (#12213) 2022-04-24 15:42:17 +08:00
William Cheng
8e49875871 update samples, docs 2022-04-24 15:38:16 +08:00
adessoDpd
1602942292
[Wsdl] Adding cli-option for generating different versions of WSDL-files regarding Media type versioning (content negotiation) (#12206)
* add wsdl version generation

* add option to use specified operationId

* update samples

* update cli description
2022-04-24 15:29:09 +08:00
mkusaka
5b6b4c9d48
[typescript-fetch] allow initOverrides with async function (#12098)
* [typescript-fetch] allow initOverrides with async function

* [typescript-fetch] update samples

* [typescript-fetch] refactoring initFnction apply

* [typescript-fetch] update samples

* [typescript-fetch] refactoring create body function

* [typescript-fetch] update samples

* [typescript-fetch] make interface more flexible

* [typescript-fetch] update samples

* [typescript-fetch] support 2.x version of typescript & update samples

* [typescript-axios] update samples

* [typescript-fetch] refactor: add type alias

* [typescript-fetch] override with init params even if initOverrides is function

* [typescript-fetch] update samples
2022-04-23 10:42:21 +02:00
William Cheng
f92f8f1e58 update java samples 2022-04-21 11:00:39 +08:00
William Cheng
e98c054693
Improvements to csharp-netcore-function generator (#12183)
* improvements to csharp-netcore-function generator

* update samples

* update doc, samples
2022-04-21 01:40:23 +08:00
William Cheng
2df68d9359
[Java][microprofile] update API test template to work with v3.0 (#12177)
* update microprofile api test to work with 3.0

* minor format change

* update samples
2022-04-20 15:18:45 +08:00
Andrii Serkes
783f810a05
Allow selection of MP REST API version for MicroProfile REST client g… (#12043)
* Allow selection of MP REST API version for MicroProfile REST client generation

* fix typo in pom.xml

* fix typo in pom.xml, update samples

* add exception when incorrect MP Rest Client version is chosen
2022-04-20 14:29:43 +08:00
William Cheng
67b659f47e update php samples 2022-04-20 14:06:34 +08:00
fengelniederhammer
8a83a34bb4
[php] make ObjectSerializer::toString actually return a string (#12158) 2022-04-20 14:02:09 +08:00
William Cheng
8330e16d66
Better inline model resolver to handle inline schema in array item (#12104)
* better support of inline schema in array item

* update tests

* update samples

* regenerate samples

* fix allof naming, remove files

* add files

* update samples

* update readme

* fix tests

* update samples

* update samples

* add new files

* update test spec

* add back tests

* remove unused files

* comment out python test

* update js test using own spec

* remove files

* remove unused files

* remove files

* remove unused files

* better handling of allOf with a single type

* comment out go test

* remove test_all_of_with_single_ref_single_ref_type.py

* fix inline resolver, uncomment go test
2022-04-20 10:28:15 +08:00
Oleh Kurpiak
12454de3ac
[Java][OkHTTP] fix empty request body handling (#12172) 2022-04-20 00:17:28 +08:00
leszek-s
5f1f47d156
[swift5] Abstract away URLSession (#11651) (#12110) 2022-04-19 10:53:16 +01:00
William Cheng
2abdd3acb7 set follow_location default to true 2022-04-16 17:46:55 +08:00
Connor Moore
7b1795a159
[REQ][Ruby] Ruby Allow Follow Redirect (#12047)
* Add `follow_location` option

Implementation of https://github.com/OpenAPITools/openapi-generator/issues/10028

* regenerated clients
2022-04-16 16:51:01 +08:00
Yohei Kitamura
e12100b033
[Ruby] Add support for faraday 2.x (#12112)
* [ruby] Add faraday 2.x support

* Remove redundant params_encoder config

* Memoize Faraday connection and refactor
2022-04-16 16:42:58 +08:00
Hui Yu
16ab5feeb9
do not put the invalid value of the enum to a JSON structure (#12133) 2022-04-16 16:28:28 +08:00
William Cheng
c533deb9a9
improve errorObjectType to avoid regression (#12131) 2022-04-14 16:31:42 +08:00
Anton Koscejev
7851dfe148
[kotlin][client] fix encoding of individual parts of a multipart request (#11911)
* [kotlin][client] fix encoding (and Content-Type headers) of individual parts of a multipart request

* [kotlin][client] fix incorrect handling of binary downloads

* [kotlin][client] update samples
2022-04-14 01:52:01 +08:00
mkusaka
498ba58881
[typescript-fetch] Removed functions that are unused when withoutRuntime is true. (#12101)
* [typescript-fetch] remove unused function when withoutRuntimeCheks option to true

* [typescript-fetch] update samples
2022-04-13 09:06:02 +02:00
William Cheng
4c2a981230
[C++][Qt] update petstore to 3.0 spec (#12124)
* test update sampels

* update samples

* add file
2022-04-13 10:22:37 +08:00