20229 Commits

Author SHA1 Message Date
Aarni Koskela
67b129fda9
python: Remove usage of six (#16675) 2023-09-28 19:26:42 +08:00
Samson
3c4561ece2
Update configuration.md (#16683)
added additional example for --additional-properties command with comma (,) seperator
2023-09-28 19:26:02 +08:00
Jonathan Ballet
04fa53b692
python: generate Pydantic v2 + typing complete code (#16624)
* python: improve type generation with more specific typing

* Annotate function parameters

* Remove unused imports

* remove unused files

* remove temporary hack

* remove lock file

* fix Annotated import

* support Python 3.7

* Regenerate code with typing-extensions

* Fix setup.py

* More Pydantic v2 compatibility

* depend on pydantic v2

* fix client_echo tests

* fix JSON serialization

* Fix references

* Skip circular dependency tests for now

* Temporarily hide the "float" property

The "float" property aliases the "float" type and completely breaks the
model: all the properties that were "float" now become the type of the
"float" property instead.

* Fix errors

* Import Literal from typing_extensions

* Fix GitHub Action workflows

* Fix Python 3.7 failure

* Fix quotes

* Apply suggestions from code review

* Fix tests

* split model imports from other modules imports

* fix workflow

* Comment the array unique items convertion, remove set translation

* Replace alias usage
2023-09-28 19:13:14 +08:00
Ivan Vasheka
af352df10f
fix: Fixes headers annotation for kotlin retrofit2 api template (#16680) 2023-09-28 19:01:36 +08:00
William Cheng
bb3096c99c
Jaxrs jersey3 server (#16676)
* Introduced Jersey3 to JavaJerseyServerCodgen and its test class

* Added date ParamConverterProvider to new jersey3 resource directory

* Copied and adjusted jaxrs-jersey2 directory to jaxrs-jersey3

* Added unit tests for Jersey2 (jakarta|javax) and jersey3 (jakarta only)

* Added Jersey3 to markdown documentation

* Added several mustache files for Jersey3

* Further adjustments in JavaJerseyServerCodegen for Jersey3

* Removed tabs from JavaJerseyServerCodegen

* Further improvements in pom and web template

* Changed to swagger-jaxrs2-servlet-initializer-v2 within the projects pom

* Changed servlet-initializer to jakarta version

* Removed tabs in JavaJerseyServerCodegenTest.java

* Removed tabs from JavaJerseyServerCodegen

* Out commented Swagger 1.x part in api.mustache (see ApiImplicitParams)

* Exchanged import of javax* by jakarta* in file verify.groovy

* Changed Parameter annotations to Schema annotations

* Added web.mustache for jersey3

According to the 'Swagger 2.X Integration and Configuration' doc at
https://github.com/swagger-api/swagger-core/wiki/Swagger-2.X---Integration-and-Configuration

* Adjusted README to point to ./openapi.json instead of ./swagger.json

* Added ./bin/configs/jaxrs-jersey-jersey3.yaml as requested

* Added new jersey3 example (see ./samples/server/petstore/jaxrs/jersey3

* Corrected formParams.mustache exchanged @FormParam by QueryParam

* Resolved ModelValidationException for Map query parameter

* Improved api.mustache (layout and deprecated class instantiation )

* Updated jersey3 example under ./samples/server/petstore/jaxrs/jersey3

* fix tests

* add jeresey3 to github workflow test

* add new workflow

* remove jersey3

---------

Co-authored-by: CDerksen <christian.derksen@uni-due.de>
2023-09-28 16:53:20 +08:00
Robbert van Waveren
beb67aa74d
[JAVA] Prioritize mapped discriminators over generated (relates to issue #12777) (#15284)
* prioritize mapped discriminators over generated

* update samples with new ordering

* explain reason behind discriminator prioritization

* add new samples

* prioritize explicit mapping over any generated mappings

* update examples to reflect new logic

* update tests to reflect explicit mappings
2023-09-27 17:50:39 +08:00
William Cheng
4f8d61c05c
fix kotlin enum name (#16666) 2023-09-27 13:45:59 +08:00
Graeme Wilson
fdd179e60a
[csharp] Fix Issue #16660 System.NotImplementedException in ApiClient.cs with OAuth2 (#16661)
* Set authenticator against clientOptions instead of client

* Changes from generate-samples.sh ./bin/configs/csharp*
2023-09-26 11:28:16 +08:00
William Cheng
fce2dcbb37
[php-nextgen] Fix default value for array of items (#16654)
* fix form parameter default value

* fix only phpnextgen
2023-09-26 10:26:03 +08:00
William Cheng
6c1a937663
remove supportJava6 (#16664) 2023-09-26 10:14:36 +08:00
martin-mfg
1cff462d90
remove jersey 1 (#16646) 2023-09-26 09:10:11 +08:00
William Cheng
077744a7af
[python-pydantic-v1] various improvements (#16658)
* rename, add tests

* remove library support in python pydantic v1 codegen

* copy tests

* copy echo api tests

* update samples

* update doc

* add back library support
2023-09-25 15:59:06 +08:00
Jonathan Ballet
3b95f701e5
python: copy the current Python generator into a "pydantic v1" generator (#16656)
* Copy the current Python generator into a "pydantic v1" generator

This generator will be deprecated over time and the normal generator will
focus on Pydantic v2.

* add missing doc
2023-09-25 12:13:24 +08:00
William Cheng
d58e68f8c0 update php samples 2023-09-23 15:28:43 +08:00
Julian Vennen
d165b8879f
[php-nextgen] Use php type declarations (#16572)
* WIP: implement strict types

* Add parameter and return types to API methods

* Cleanup imports and some code, fix some phpdoc

* Add toDefaultValue override
2023-09-23 15:22:09 +08:00
Kyle Dodson
7d60a46bc7
Fix ASP.NET Core server type mappings (#16653) 2023-09-23 13:59:27 +08:00
Jonathan Ballet
e892d50075
Test with Python 3.11 (#16649) 2023-09-23 13:09:11 +08:00
martin-mfg
2ca99bdf8e
use model class for request body with additionalProperties (#16613)
* try out simple fix

* add test case

* generate samples
2023-09-23 13:07:53 +08:00
Graeme Wilson
f99002a974
[csharp] fix authorization header casing issue (#16622)
* Capitalise auth scheme irrespective of token_type capitalisation

* Changes from generate-samples.sh

* Add comment to change
2023-09-23 12:59:51 +08:00
dependabot[bot]
19d8dbc7d5
Bump s4u/setup-maven-action from 1.9.0 to 1.10.0 (#16652)
Bumps [s4u/setup-maven-action](https://github.com/s4u/setup-maven-action) from 1.9.0 to 1.10.0.
- [Release notes](https://github.com/s4u/setup-maven-action/releases)
- [Commits](https://github.com/s4u/setup-maven-action/compare/v1.9.0...v1.10.0)

---
updated-dependencies:
- dependency-name: s4u/setup-maven-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-23 12:33:15 +08:00
William Cheng
7d154c988c
[kotlin-client] add spotless plugin (#16645)
* add spotless plugin to kotlin client

* add spotless plugin to kotlin client

* use 6.13.0
2023-09-23 12:32:25 +08:00
James Choi
a68eba649f
[typescript-axios]: handle explode query (#16435)
* [typescript-axios]: handle explode query

* [typescript-axios]: handle explode query based on isPrimitive

* Use `of` instead of `for...in`

* Update modules/openapi-generator/src/main/resources/typescript-axios/apiInner.mustache

---------

Co-authored-by: nightspite <n16h75p173@gmail.com>
Co-authored-by: Esteban Gehring <esteban.gehring@gmail.com>
2023-09-22 10:07:13 +02:00
Julian Kalinowski
55c580579e
fix(#9682): API class has multiple imports of 'okhttp3.ResponseBody' (#16638) 2023-09-22 13:41:13 +08:00
William Cheng
0f2a27d3c5
add tests for useAbstractionForFiles option (webclient, resttemplate) (#16644) 2023-09-22 12:51:50 +08:00
Tom Deering
1a4b574a48
feat: [JAVA] [webclient] [#16589] Support file abstraction for WebClient responses (#16590)
* Support file abstraction for  WebClient responses

Issue-16589

* Fix issue flagged by tests. Yay tests!

Issue-16589

* Update generation of test file too

* Fix generated tests for webclient, resttemplate
2023-09-22 12:31:41 +08:00
Jonathan Ballet
e5a29b6328
python: run the Python samples tests with GitHub Actions (#16643) 2023-09-22 10:45:18 +08:00
Luckl
29033bf62a
Fix incorrect @InputFile on inputSpecRootDirectory argument (#16420)
* 16419 fix incorrect InputFile on inputSpecRootDirectory argument of gradle-plugin

* 16419 fix incorrect InputFile on inputSpecRootDirectory argument of gradle-plugin

* 16419 fix incorrect InputFile on inputSpecRootDirectory argument of gradle-plugin

* 16419 delete unused files
2023-09-21 18:10:47 +08:00
William Cheng
1bcf79236f update samples 2023-09-21 17:19:35 +08:00
krasv
8f8fd85fd6
contribution #6123: add spring support for SSE conform specs (#16543)
* add spring support for SSE conform specs

see https://github.com/OpenAPITools/openapi-generator/issues/6123 for the ongoing discussion

* extend generator option documentation

* applied review suggestions

* regenerated samples

* regenerated docu

* fix code style: removed tabs
2023-09-21 17:08:24 +08:00
Beppe Catanese
254b359a56
Change default value of 'pathParamsAsVariables' config option (#16404)
* Change default value for config option

* Regenerate samples
2023-09-20 17:35:30 +08:00
William Cheng
9b39887eba
move option to kotlin client (#16627) 2023-09-20 17:06:55 +08:00
William Cheng
16c6cff28f
fix required parameter check (#16628) 2023-09-20 17:05:55 +08:00
William Cheng
25b67dd6bf
Run tests for C# Echo API client in CI (#16626)
* run tests for C# echo api client in ci

* trigger build failure

* Revert "trigger build failure"

This reverts commit 844ec9a3d2d00a989e3bb961d84587ecba0e9589.
2023-09-20 15:21:44 +08:00
MachineUserPTV
f530496f21
[dotnetcore] Implement QueryParameter deepObject style is missing for… (#15945)
* [dotnetcore] Implement QueryParameter deepObject style is missing for async function

* Add some csharp-restsharp tests

* add and fix tests

* restore missing files

* remove test with datetime problem

---------

Co-authored-by: Oliver Krug <Oliver.Krug@ptvgroup.com>
2023-09-20 14:57:33 +08:00
Jonathan Ballet
a2f6b8eae5
python: remove non-async code path from the aiohttp generator (#16601)
* python: remove non-async code path from the aiohttp generator

This removes all the non-async code from the aiohttp generator:

* all the methods that should be asynchronous are marked as `async`
* the `async_req` parameter is gone; calls are directly awaitables now
* the async calls into a thread pool are gone and the thread pool is
  gone too (now useless)

Closes: #15824
Closes: #5539
Related: #763
Related: #3696

* Fix empty line

* remove more
2023-09-20 10:48:31 +08:00
William Cheng
69bc994ba7
Update sponsor (#16619)
* add BairesDev to the sponsor list

* add dmTECH
2023-09-19 18:13:58 +08:00
William Cheng
df994b77f2
fix mapping options in gradle plugin (#16616) 2023-09-19 13:49:06 +08:00
William Cheng
bab67e44e4
add -SkipPublisherCheck (#16610) 2023-09-18 17:37:52 +08:00
William Cheng
5e8e2d7f6d
Prepare v7.1.0 in master (#16608)
* prepare v7.1.0 in master

* update
2023-09-18 17:37:36 +08:00
William Cheng
5b720ded0c trigger build v7.0.1 2023-09-18 16:51:54 +08:00
William Cheng
875c3ecd3c
7.0.1 release (#16607)
* v7.0.1 release

* update readme

* update template

* update readme
2023-09-18 14:57:09 +08:00
Alex Kucksdorf
352182a7b9
fix(go-server): Allow optional request bodies (#16579)
* fix(go-server): Allow optional request bodies

Closes #16578

* chore: Run scripts

* chore: Remove unnecessary whitespace change

* fix: Use correct error
2023-09-18 13:59:28 +08:00
William Cheng
8c8be7482b
Update java undertow to newer version (#16606)
* update java undertow to newer version

* update compiler plugin to newer version

* test undertow in circleci

* use 3.0 spec
2023-09-18 11:26:33 +08:00
Beppe Catanese
7d86adccc4
Add postman-collection generator to list (others) (#16599) 2023-09-18 10:38:22 +08:00
William Cheng
5f0d7053e4
Update go gin to newer version (#16593)
* update go gin to newer version

* update test
2023-09-15 15:50:25 +08:00
William Cheng
70bffffc5a
remove option, update doc (#16592) 2023-09-15 15:01:21 +08:00
prashant-pant
4b87606665
Autoset constants (Required fields having single valid enum value) Java (OkHttp) Implementation of #16547 (#16550)
* Autosets the parameters with the only value specified as enum if the parameter is also marked as required

* Autosets the parameters with the only value specified as enum if the parameter is also marked as required

* Autosets the parameters with the only value specified as enum if the parameter is also marked as required for Java default client.

* Autosets the parameters with the only value specified as enum if the parameter is also marked as required for Java default client.

* Autosets the parameters with the only value specified as enum if the parameter is also marked as required for Java default client.

* Autosets the parameters with the only value specified as enum if the parameter is also marked as required for Java default client.
2023-09-15 14:41:17 +08:00
William Cheng
d671fe24ee
better null check to avoid NPE (#16588) 2023-09-15 13:42:11 +08:00
Barczi
e75e5a2c57
[swift] remove unavailable property to fix Xcode 15 compiler error (#16504) 2023-09-14 11:36:01 +01:00
Kado Yasuyuki
ec59334904
Fix ValidateTask failure if recommend is not assigned (#16580)
* spec for recommend test

* add ValidateTask test for custom defined tasks

* add ValidateTask test for recommend option

* ValidateTask recommend default value is true
2023-09-14 13:33:06 +08:00