499 Commits

Author SHA1 Message Date
Stefan Koppier
227c8602f7
[kotlin-client][jvm-spring-*] Fix runtime error in endpoints of type Unit (#17664)
* Fixed invalid extraction of response body in kotlin-client jvm-spring-*

* Generated echo-api for kotlin-jvm-spring-3-restclient

* Specific echo-api for Kotlin without allOf/anyOf

* Specific echo-api for Kotlin without allOf/anyOf

* Generated all samples

* Added kotlin-jvm-spring-3-restclient sample to workflow

* Fixed syntax problem
2024-01-22 10:57:40 +08:00
William Cheng
d810d7c534
R echo client tests (#17629)
* add r echo api client sample

* add r workflow

* fix

* add env

* set r version

* install curl

* install dep

* fix

* comment out installation
2024-01-18 09:05:35 +08:00
dependabot[bot]
eab34c9b3f
Bump actions/cache from 3 to 4 (#17636)
Bumps [actions/cache](https://github.com/actions/cache) from 3 to 4.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-18 08:59:37 +08:00
Alexis Couvreur
092463a513
feat: add java-wiremock generator (#17614)
* feat: add `java-wiremock` generator

* remove text block usage for samples

this will allow more version of jav to be compatible with this

* fix extra parenthesis

* Add java-wiremock workflow
2024-01-16 11:40:13 +08:00
Robert Schweizer
a0418c2855
[python][client] Clean up samples and CI (#17509)
* chore: Remove leftover Github action file

This was probably added by mistake. A similar file is active in
.github/workflows/samples-python-pydantic-v1-petstore.yaml.

* chore: Remove leftover VERSION from old python-experimental sample

* ci: Stop running Python integration tests in Circle CI

These Python clients are all tested with Github Actions already, which
is faster, more cleanly separated and only runs on modifications.

I'm not cleaning up the pydantic-v1 client, I expect it to be removed soon anyway.

* chore: Remove true from sample folder name

python-disallowAdditionalPropertiesIfNotPresent-true
-> python-disallowAdditionalPropertiesIfNotPresent
2024-01-16 10:34:04 +08:00
Dennis Ameling
13edc5d494
kotlin-server: Add support for Javalin (#17596)
* kotlin-server: Add support for Javalin

* kotlin-server: Add Javalin generated sample code

* Add output from build scripts

* Address MR feedback

* Update CI to include new Javalin sample
2024-01-15 20:22:20 +08:00
mikkka
455add6d80
Implement scala http4s server generator (#17430)
* Implement scala http4s server generator

* Fix types and auth

* Add proper handling of various responses

* Fix configs

* Drop null values in json encoder

* Add sample files

---------

Co-authored-by: m.tkachev <m.tkachev@tinkoff.ru>
2024-01-10 11:40:31 +08:00
Anakael
11caad92df
[CSharp] feat!: add useDateOnly flag (#17471)
* feat: DateOnly for client

* fix: generated doc for csharp

* doc: fix generators README for csharp

* add DateOnly option for aspnet

* refactor: update csharp docs

* refactor: fix typo

* finish

* finish

* finish

* regenerate

* rebuild and regenerate

* fix build error

* finish

* revert path

* regenerate

* remove exceed samples

* regenerate

* add DateOnly to nullable

* remove obsolete file from list

* update test files list

* remove obsolete sample build

* revert manual tests

* revert samples to master and regenerate

* remove new samples

* remove eol

* remove eol

* add new specs

* try fix test

* update tests

* update files

* remove eol

* revert

* remove eol

* regenerate

* add net6+ support to aspnetcore

* add jobs
2024-01-10 11:34:14 +08:00
Rugal Bernstein
1e0e8fe0eb
Add ability to append ServerHttpRequest for kotlin-spring generator (#17158)
* Add ability to append ServerHttpRequest for kotlin-spring generator

* Add generated doc & sample
2024-01-10 11:11:23 +08:00
Linh Tran Tuan
9827098057
[Rust] [Server] New generator bases on Axum (#17549)
* Rust Server - Axum based (#5)

* Fix typo

* Address comment

* Address comment
2024-01-09 11:38:54 +08:00
Jonathan Ballet
22a0fc1727
python: adjust basic typing information (#17511)
* python: adjust basic typing information

This is an initial pass to fix and adjust the typing information for the
generated client. This is enough to have mypy runnning without complains
on all the (modern) generated clients (Pydantic v1 code is not checked
for instance)

mypy is also now run directly in the CI, so further changes will also be
checked and thus, will need to be compliant with good typing
information.

Note that this doesn't *fully* type all the code: mypy is not run in
"strict" mode and there are still many functions/methods/attributes
which are still not fully typed, but it's a first good step in that
direction.

* ApiResponse's raw_data can't be None

* Fix indentation

* Revert test changes

* run mypy on tests/ directory

* don't forcefully convert the client response headers to dict

* override petstore ApiResponse model

* adjust type of 'any/one_of_schemas' fields
2024-01-06 15:40:42 +08:00
Martin Delille
cb84dffb2a
[cpp-qt-client] Add cpp-qt-client technical committee to CODEOWNERS (#17481) 2024-01-03 10:22:09 +08:00
William Cheng
c215bc681d
better java resteasy echo api client tests (#17473) 2023-12-26 10:25:55 +08:00
Mickael Magniez
38c33b92fe
Add scala-pekko client generator (#17417)
* feat: add scala-pekko client generator

* feat: add scala-pekko client to CI
2023-12-22 10:58:27 +08:00
Yonatan Karp-Rudin
5435b44e40
Fix missing convertor for jackson in retrofit (#17418)
* Add missing Jackson converter for Retrofit

This commit adds the missing configuration for a ApiClient so all Jackson serializations will start to work correctly.

* Add sample project code for Retrofit Jackson
2023-12-19 10:29:50 +08:00
Beppe Catanese
58345a9a80
[POSTMAN] Add Samples GitHub workflow (#17412)
* Add Python tests

* Add workflow to verify Postman samples

* Correct path
2023-12-18 10:52:59 +08:00
dependabot[bot]
bc2443ecb0
Bump actions/download-artifact from 3 to 4 (#17400)
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 3 to 4.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](https://github.com/actions/download-artifact/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-15 08:59:24 +08:00
dependabot[bot]
c49701b804
Bump actions/upload-artifact from 3 to 4 (#17401)
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 3 to 4.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-15 08:59:09 +08:00
Stefan Koppier
7f05c1f41d
[kotlin-client] New generator: kotlin-jvm-spring-restclient (#17366)
* Created kotlin jvm spring restclient

* Fixed kotlin jvm-spring-restclient

* Fixed earlier problems

* Fixed earlier problems

* Updated kotlin.md
2023-12-11 12:49:36 +08:00
William Cheng
10da7a3c5a
[Ruby] add file download tests (#17362)
* add new ruby echo api clients

* add tests for ruby faraday file download

* add file download test to ruby Typhoeus

* add ruby workflow, add tests for ruby httpx

* update

* fix
2023-12-09 22:05:27 +08:00
dependabot[bot]
1b2917d69f
Bump actions/setup-python from 4 to 5 (#17338)
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 4 to 5.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-07 11:28:14 +08:00
dependabot[bot]
f593adff18
Bump actions/setup-go from 4 to 5 (#17337)
Bumps [actions/setup-go](https://github.com/actions/setup-go) from 4 to 5.
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](https://github.com/actions/setup-go/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/setup-go
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-07 11:28:01 +08:00
dependabot[bot]
d9b795171a
Bump actions/setup-dotnet from 3.2.0 to 4.0.0 (#17312)
Bumps [actions/setup-dotnet](https://github.com/actions/setup-dotnet) from 3.2.0 to 4.0.0.
- [Release notes](https://github.com/actions/setup-dotnet/releases)
- [Commits](https://github.com/actions/setup-dotnet/compare/v3.2.0...v4.0.0)

---
updated-dependencies:
- dependency-name: actions/setup-dotnet
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-05 15:25:54 +08:00
Martin Delille
95340d5264
[cpp-qt-client] pass QString by const reference instead of by value (#16793)
* [cpp-qt-client] pass QString by const reference instead of by value

* Add another signal instead of changing its signature

* Bump qt version

* Fix CODEOWNERS

* Try to fix workflow

* use v3

* Remove openssl from windows build

---------

Co-authored-by: William Cheng <wing328hk@gmail.com>
2023-12-03 18:14:22 +08:00
dependabot[bot]
77127ecf65
Bump actions/setup-java from 3 to 4 (#17252)
Bumps [actions/setup-java](https://github.com/actions/setup-java) from 3 to 4.
- [Release notes](https://github.com/actions/setup-java/releases)
- [Commits](https://github.com/actions/setup-java/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/setup-java
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-30 13:50:10 +08:00
dependabot[bot]
7c551e65dd
Bump s4u/setup-maven-action from 1.10.0 to 1.11.0 (#17175)
Bumps [s4u/setup-maven-action](https://github.com/s4u/setup-maven-action) from 1.10.0 to 1.11.0.
- [Release notes](https://github.com/s4u/setup-maven-action/releases)
- [Commits](https://github.com/s4u/setup-maven-action/compare/v1.10.0...v1.11.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-11-24 12:54:35 +08:00
William Cheng
aaed846f5f
Update Dockerfile (cli, online) to use eclipse-temurin:17.0.3_7-jre-focal (#17139)
* add tests for openapi-generator-cli dockerfile

* trigger workflow

* add cp

* restore

* use eclipse-temurin:17.0.3_7-jre-focal

* update dockerfile

* update image to newer version
2023-11-23 11:08:31 +08:00
Csaba Kozák
ab0b44a1c4
[kotlin-client] add support for kotlinx-datetime (#17166)
Closes #14490
2023-11-22 17:52:37 +00:00
Vignesh
87b86c78dc
feat: Support useSingleRequestParameter feature for java microprofile client generation (#17072) 2023-11-21 11:56:11 +08:00
William Cheng
186fde250b
[spring-cloud] add http basic test (#17135)
* update samples

* add tests for spring cloud http basic

* fix path

* update samples
2023-11-19 16:07:28 +08:00
Aurélien Joga
1f5b590d5a
Python-server workflow fixes + pytest (#17060)
* Fix referenced path for tests

* Explicit dependencies

Flask 2.3 has breaking changes

* Marks all async tests with pytest.mark.asyncio

Otherwise they are skipped by pytest and coverage is zero

* Fix path for pytest

On suggestion from https://github.com/OpenAPITools/openapi-generator/pull/17060#discussion_r1392666369
2023-11-18 10:10:10 +08:00
William Cheng
07620cebe2
update webclient dep to newer version, add tests (#17106) 2023-11-17 10:34:22 +08:00
Tomohiko Ozawa
37451fa569
[Java][resttemplate] Add test for bearer auth (#17081)
* add bearer auth API to echo-api

* run generate-samples.sh

* add resttemplate echo-api sample

* add bearer auth test

* remove @Ignore
2023-11-16 00:38:49 +08:00
devhl-labs
dd4143b75e
[csharp] Added .net8 (#17075)
* added .net8

* change .net version in the github action

* upgrade manual sample
2023-11-15 15:35:02 +08:00
litetex
2c25443260
Update base image of Dockerfile (#17007)
* Update base image of Dockerfile

* Make github workflow "Docker tests" manually triggerable

* Don't possibly downgrade TLS version

* Update Dockerimage in ``run-in-docker.sh``

* Use Maven's non interactive mode inside workflow

* Don't spam log

* Use java 17

because it won't compile with 21

* Removed hard memory limit

as memory should be controlled by the container

* Update hub dockerfiles
2023-11-14 11:41:49 +08:00
William Cheng
de8599906e
Better handling of API response in 3.1 spec (#16986)
* better handling of API response in 3.1 spec

* update PR template

* add tests
2023-11-05 15:24:02 +08:00
William Cheng
5d03c4ac82
[java-okhttp] Restore integration tests (#16985)
* restore java okhttp tests

* update PR template, update sha
2023-11-04 22:50:23 +08:00
William Cheng
8d76ab9511
[Go] Add multiple file upload support (#16956)
* add go echo api client github workflow

* add support for multi file upload in go client

* update go samples
2023-11-01 11:35:25 +08:00
Cameron Koegel
c2a4163bdb
[typescript-axios] Fix Explode Query Parameters (#16898)
* [typescript-axios] Fix Explode Query Parameters

* use `paramName` instead of `baseName`

* add config, workflow and tests for echo api

* generate echo api sample

* update test dependencies and add gitignore

* update space in package json and regenerate samples

* remove tsc in test package

* update samples

* undo samples

* regenerate samples

* regenerate samples again
2023-11-01 09:41:06 +08:00
dependabot[bot]
eae2051d37
Bump actions/setup-node from 3 to 4 (#16893)
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 3 to 4.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-27 00:55:56 +08:00
dependabot[bot]
5f71bb9afa
Bump jurplel/install-qt-action from 3 to 4 (#16885)
Bumps [jurplel/install-qt-action](https://github.com/jurplel/install-qt-action) from 3 to 4.
- [Release notes](https://github.com/jurplel/install-qt-action/releases)
- [Commits](https://github.com/jurplel/install-qt-action/compare/v3...v4)

---
updated-dependencies:
- dependency-name: jurplel/install-qt-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-22 21:05:45 +08:00
martin-mfg
b6db4f73f1
[JAVA] fix: oneOf generates incorrect model for primitive types (#16834)
* generate samples

* try fix

* add new sample for fixed case

* also improve native library

Other libraries don't need fixes.

* add oneOf_twoPrimitives.yaml

* generate samples

* resolve comment
2023-10-16 22:18:52 +08:00
dabdirb
4a0ab21ba4
[Spring] resolves #16054, resolves #15088 add vendor extension x-spring-provide-args (#16663)
* add vendor extenstion x-spring-provide-args

* add vendor extenstion x-spring-provide-args

* Revert "add vendor extenstion x-spring-provide-args"

This reverts commit 8a0cbc93eb5825651e4b97cbe83054adbaa1acce.

* catch up latest main and re-generate samples

* remove un-used import

* add vendor extenstion x-spring-provide-args (#16054,#15088)

* update  X_SPRING_PROVIDE_ARGS for better description

---------

Co-authored-by: xiangxi.chen <xiangxi.chen@cerence.com>
2023-10-05 11:11:55 +08:00
William Cheng
a1d00e4785
[Java][okhttp-gson] fix AWS auth issue (#16721)
* fix samples

* fix awsauth in okhttp gson java client

* update github workflow
2023-10-04 18:28:50 +08:00
William Cheng
3fcf5584c6
Add tests for python client with disallowAdditionalPropertiesIfNotPresent set to true (#16690)
* add tests for python client with different option

* update samples

* update tests
2023-10-01 17:34:52 +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
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
martin-mfg
1cff462d90
remove jersey 1 (#16646) 2023-09-26 09:10:11 +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
Jonathan Ballet
e892d50075
Test with Python 3.11 (#16649) 2023-09-23 13:09:11 +08:00