9299 Commits

Author SHA1 Message Date
Justin Black
4d544994fd
[python-experimental] BoolSchema + NoneSchema improvements (#12411)
* Moves is_none is_true is_false methods into base mixins, adds tests

* Improves docstrings
2022-05-23 15:55:49 -07:00
William Cheng
ccd64ce203
update gson to newer version in kotlin templates (#12425) 2022-05-22 14:13:03 +08:00
William Cheng
06688cdfe1
update gson to 2.8.9 in android httpclient (#12423) 2022-05-21 22:02:05 +08:00
William Cheng
8804ba50ed
update android dependencies to newer versions (#12421) 2022-05-21 17:04:42 +08:00
William Cheng
e0bd2440f1
[Java] Update rest-assured dependencies (#12420)
* update rest-assure dependencies in java client

* update rest assured version

* update gradle, sbt build files
2022-05-21 16:18:39 +08:00
William Cheng
4cf66a4871 update cwiki samples 2022-05-21 15:13:34 +08:00
William Cheng
c270640a36
Better support for inline schemas in parameters (#12369)
* better support for inline schema in parameters

* fix parameter model type

* add new method for model

* minor update

* fix isModelWithProperties

* fix is model check

* null check for properties

* inline parameter enhance with python-experimental fix [WIP] (#12397)

* Uses unaliasSchema rather than ModelUtils.getReferencedSchema

* Fixes python-experimental, delays param schema setting

* Samples regenerated

* Adds parameterModelName setting back in

* Samples regenerated

* removes needToSetSchema

* Sets schema differently depending on if inline model resolver is used

* Adds step for getting ref schema

* Samples regen

* fix test

* bug fix for rust generator

Co-authored-by: Justin Black <spacether@users.noreply.github.com>
2022-05-20 20:25:15 +08:00
cachescrubber
8be490d130
Upgrade Spring Boot to 2.5.14 / 2.7.0 (#12408)
* Upgrade Spring Boot to 2.5.14 / 2.7.0

* Generate Samples
2022-05-20 20:24:13 +08:00
William Cheng
fb8eac1258 update java samples 2022-05-20 17:17:58 +08:00
Miroslav Oujeský
3f788d3d77
[java][Micronaut] generator fixes (#11803)
* Fix ConfigurableAuthorization package name import to come from configuration

* Fix Micronaut @Consumes and @Produces annotations, allow multiple content types

* Fix security schemes rendering and Micronaut @Authentication pairing with application settings when special characters are present

* Updated samples

* Code review feedback

* Add xml to dependencies and fix tests

Co-authored-by: Andriy Dmytruk <andriy.dmytruk@oracle.com>
2022-05-20 13:24:48 +08:00
Andriy Dmytruk
0ad970f4cf
[Micronaut] Improvements for Server and Client (#12297)
* Add the applicationName parameter to support generation of multiple clients

* Change indentation in application.yml to double-space

* Update swagger annotations version, and option to choose not to generate the annotations

* Generate operations only in the first defined tag class for micronaut server

* Improve micronaut client options by setting the correct default values in the JavaMicronautAbstractCodegen constructor

* Fix visitor pattern having abstract method in non-abstract class. Update samples

* Update server sample FILES

* Minor refactor

* Fix for context path
2022-05-19 02:03:45 +08:00
William Cheng
3597621fbc
[R] Use snake_case in method parameter names (#12390)
* use snake_case in method parameter names

* update doc
2022-05-19 01:23:27 +08:00
Mikko Maunu
3a102e0e5b
Added linefeed between @Generated-annotation and start of class declaration. fixes #10746 (#12181) 2022-05-18 15:45:34 +08:00
Auke Schrijnen
a57509695a
[java-micronaut] Return HTTP 501 in default implementation (#12365)
The default controller implementation returns an empty response. This
might result in unexpected behavior when an operation isn't implemented,
as a consumer of the API there is no way to notice the difference
between an unimplemented method and an actual empty response.

By changing the default behavior to return HTTP 501 Not Implemented the
user will be made aware of unimplemented methods. The former default
behavior, returning an empty response by default, can be activated with
a configuration option.
2022-05-18 14:17:22 +08:00
Nick Dunne
d38cb1b37a
[java][spring] added springdoc support for service metadata and security (#12346)
* added springdoc config file to codegen

* added mustache template for springdoc config

* changed type to all caps so it can be used in the template

* added security scheme details
caveat: didn't add oauth2 flows

* removed url not supported by codegensecurity

* Fixed default doc provider in help message

* refactored config file generation test
and added springdoc test

* removed default codegen modification
implemented through booleans in template instead

* added new/updated generator files

* fixed escaping of description

* fixed appDescription in template
removed if and fixed escaping

* updated generated files again

* updated to springdoc in generator docs
2022-05-18 11:20:54 +08:00
William Cheng
35dc6451e4
update .RBuildIgnore (#12383) 2022-05-17 16:07:26 +08:00
William Cheng
1b7b4ede44
[R] fix warnings in DESCRIPTION (#12380)
* fix warnings in description

* fix maintainer

* update test with jsonlite method instead
2022-05-17 13:25:16 +08:00
William Cheng
13496aad5b
[R] Add import in the namespace file (#12372)
* add import in the namespace file

* add import r6
2022-05-17 10:52:39 +08:00
William Cheng
040482e977
add support to download response as file (#12373) 2022-05-17 10:52:09 +08:00
Nikos Epping
1225c4c613
[typescript-fetch] Support Sets in query parameters (when uniqueItems=true) (#12318)
* [typescript-fetch] Support Sets in query parameters

* [typescript-fetch] Update sample builds
2022-05-16 09:56:42 +02:00
Artem Kuzmenko
5221ca2b0a
feat(typescript): add repository field to package.json (#12292) 2022-05-16 09:54:37 +02:00
Thi
559a2618df
Qt cpp client primitives types body (#12301)
* Fixxed issue with numeric primitive in body

* Aded primitives to cpp-qt/petstore.yaml (test ressource)

* generated  samples via  ./bin/generate-samples.sh
2022-05-15 17:48:19 +08:00
Yuriy Belenko
023f4e760b
[php] Bump required PHP version to 7.4 (#12359)
* Bump minimal PHP version to 7.4

* Refresh samples
2022-05-15 17:28:31 +08:00
Peter Leibiger
02f16267cf
[dart] Bump min dio version to prevent unused import (#12354) 2022-05-13 14:09:33 +08:00
William Cheng
12cdacabbf
[Inline model resolver] better handling of inline responses and bug fixes (#12353)
* better handling of inline response schemas, bug fixes

* update samples

* add new files

* better code format

* remove unused ruby files

* fix java test

* remove unused js spec files

* remove inline_response_default_test.dart

* fix webclient tests

* fix spring tests
2022-05-13 10:17:59 +08:00
William Cheng
2cf3d3805f remove samples/client/petstore/java/okhttp-gson-nextgen 2022-05-12 23:40:11 +08:00
William Cheng
d135f1992e
Fix inline allOf in request body (#12348)
* fix inline allof in request body

* update samples
2022-05-12 12:51:36 +08:00
William Cheng
5867845419 update samples 2022-05-11 15:39:38 +08:00
bflamand
575b6b4330
Playframework oauth small upgrade (#12332)
* update surefire to newer version

* small tweak to add support for "leeway" when verifying oauth tokens.

Co-authored-by: William Cheng <wing328hk@gmail.com>
Co-authored-by: Bruno Flamand <bflamand@stingray.com>
2022-05-11 15:19:59 +08:00
William Cheng
884a74550a
add tests to set httpUserAgent in r client (#12321) 2022-05-10 17:23:13 +08:00
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
Rory Dungan
fd5ad7f895
Fix issue with fastapi generator converting all fields to snake_case (#12261)
* Fix issue with python-fastapi generator converting all fields to snake_case

* Update Python-FastAPI sample

Co-authored-by: Rory Dungan <contact@rorydungan.com>
2022-05-10 01:08:59 +08:00
jsoizo
d242a98343
[scala-akka-http-server] model default value when field is not required (#12068)
* scala-akka-http-server model default value when field is not required

* scala-akka-http-server sample generate

* delete bin/configs/other/scala-akka-http-server.yaml
2022-05-10 00:43:09 +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
Justin Black
8fc85530e8
[python-experimental] fixes delete endpoint with no body use case (#12287)
* Generates delete_coffee endpoint

* Adds test of delete_coffee

* Removes .run files

* Fixes bug and adds test

* Reverts version file

* Reverts function sig

* Removes comma
2022-05-02 18:42:13 -07:00
ppngn
153e1db8a1
[C++][Pistache] Fixes for struct model (#12006)
* [C++][Pistache] fix Wconversion warning

* [C++][Pistache] fix struct model compilation with std::optional

* [C++][Pistache] Add validation to struct model
2022-05-02 00:11:19 +08:00
Mateusz Szychowski (Muttley)
e342513391
[C++][Pistache] Add support for validating arrays, use full namespace type with custom types (#12221)
fixes #11246
2022-05-01 23:53:48 +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
Johan Sjöblom
21d8d3a26e
Kotlin spring version bump (#12281)
* [Kotlin-Spring] Bumping dependency versions

* Downgrading Springfox, updating annotation

* Updating samples

* Updating unrelated samples
2022-05-01 15:20:18 +08:00
William Cheng
324020f09d update samples 2022-04-30 17:21:15 +08:00
Peter Leibiger
89d17e2845
[dart] Rename dart-dio-next to dart-dio and make it stable (#12258) 2022-04-30 16:43:11 +08:00
Hui Yu
2ca6cf7d62
[C][Client] Eliminate compiler warnings (#12260) 2022-04-30 16:41:26 +08:00