Compare commits

...

370 Commits

Author SHA1 Message Date
William Cheng
fec88b3e88
Migrate tests from AppVeyor to GitHub workflow (#21982)
* migrate tests from appveyor to github workflow

* test with dotnet 7

* test on windows

* set dotnet version

* Revert "set dotnet version"

This reverts commit 87af6a63ad04e12ad3d099193c6ed2e3a17aec02.

* use localhost

* update

* update

* update tets

* update

* remove appveyor
2025-09-17 16:03:02 +08:00
William Cheng
0e1cba6eb6
update commons deps to newer versions (#21980) 2025-09-16 17:40:27 +08:00
William Cheng
45e4fa1633
Add workflow for PowerShell clients (#21979)
* add workflow for powershell client

* update

* fix container

* import, test

* combine

* use localhost

* update tests

* remove powershell tests from appveyor.yml
2025-09-16 15:24:22 +08:00
William Cheng
46de9c8c16
separate workflow to test java with sbt (#21978) 2025-09-16 14:24:58 +08:00
William Cheng
ab6c827098
Mark scala-lagom-server as deprecated (#21977)
* mark scala-lagom-server as deprecated

* update workflow
2025-09-16 13:59:00 +08:00
William Cheng
e68e3e88b3
More dart dio tests, update samples (#21975)
* more dart dio tests, update samples

* update

* update

* more tests

* update

* update
2025-09-16 11:46:52 +08:00
William Cheng
8b01ebb5c2
[dart-dio][timemachine] Bugfix: saving offset_date_serializer instead of local_date_serialize (#21974)
* Bugfix: saving offset_date_serializer instead of local_date_serializer.dart

* New config for dart-dio (timemachine)

* test samples in github workflow

* update workflow, samples

* rename

---------

Co-authored-by: Enric Pou <enricpou@gmail.com>
2025-09-16 10:40:07 +08:00
William Cheng
7dcef20355 update java samples 2025-09-16 10:05:15 +08:00
Simon
6e48cf4247
[BUG][JAVA] RestTemplate uses hardcoded User-Agent Java-SDK #21972 (#21973)
Co-authored-by: Simon Baranov <simon.baranov@zahlungswerk.de>
2025-09-16 10:01:18 +08:00
Jachym Metlicka
6278512122
[kotlin-spring][server] Feat: Allow implementation of arbitrary interface in DTOs (similar to x-implements from java-spring) (#21950)
* add basic implementation and tests

* improve test a bit

* modify kotlin-spring.md

* add x-kotlin-implements also to enum

* update samples & properly define implemented vendor extension

* use enum.getName() instead of hardcoded string as key in vendor extension map

* fix docs

* fix test openapi spec and test

* add samples for x-kotlin-implements

* add samples for x-kotlin-implements to proper output folder

* fix

* revert unwanted changes

* move to correct place

* fix mustache template

* add to samples-kotlin-server.yaml

* reuse 1 open api schema for everything. Add also case where interface extends interface.

* add warn logs when x-kotlin-implements-fields is used without x-kotlin-implements to improve usability

* remove unnecessary generated files

* remove unnecessary generated files

* remove "status" inner enum from Pet as it fails to properly import as Pet.Status in implementations. This is a separate bug - not caused by x-kotlin-implements
2025-09-16 02:13:08 +08:00
Csaba Kozák
5c04b754ab
[kotlin-client] update Kotlin and libraries versions (#21866) 2025-09-16 02:01:29 +08:00
William Cheng
b7749712b8
feat: Add Java Dubbo code generator for Apache Dubbo microservices (#21968)
* feat: add Apache Dubbo code generator with multi-registry support

- Add comprehensive Dubbo microservice code generator
- Support Zookeeper and Nacos registries with auto-dependency selection
- Implement version-aware dependency management (Dubbo 3.2 vs 3.3+)
- Generate service interfaces, implementations, and Spring Boot REST controllers
- Include complete Spring Boot application structure with configuration
- Add detailed documentation and usage examples
- Support async operations and generic response wrappers
- Provide flexible configuration options for packages, versions, and features

* feat: Add dubbo sample with CI validation

Adds a new sample generator configuration for dubbo.

The existing GitHub workflow for Java samples is updated to build and test this new sample automatically.

* fix: fix Dubbo protocol extension issue in test environment

- Set registry address to N/A to avoid ZooKeeper dependency
- Change protocol from 'triple' to 'tri' to resolve extension loading error

* various fix to java dubbo server generator

* update doc

* update readme

---------

Co-authored-by: redoom <gyklcy@iCloud.com>
2025-09-16 01:51:12 +08:00
Rodrigo de Almeida - RMA3
c30fb413bb
issue 21965 - [REQ] MergedSpecBuilder load servers urls from input specs (#21966)
Co-authored-by: Rodrigo Maciel de Almeida <rodrigo.almeida@wefin.com.br>
2025-09-16 01:50:32 +08:00
Jean-Marc Le Roux
6b692739e8
[Rust] Add support for native-tls and rustls-tls Cargo features for the reqwest library (#21925)
* feat(rust): add the native-tls (default) and rustls Cargo features for `reqwest`

* refactor(rust): rename the `rustls` Cargo feature to follow the ecosystem naming convention
2025-09-14 17:22:11 +08:00
Christophe Moine
ee4cb9ac22
[jaxrs-spec][quarkus] Feat: Add an option to use "org.jboss.resteasy.reactive.RestResponse" (#21877)
* replace Response by RestResponse

* fix rest response for Async

* update documentation

* Add option "returnJBossResponse"

* Add tests + fixes

* Polish

* Add dependency "io.quarkus.resteasy.reactive:resteasy-reactive" when returnJBossResponse=true

* fix JavaJAXRSSpecServerCodegenTest

* generate samples & docs
2025-09-14 17:11:06 +08:00
GregDThomas
ec28d6261c
Fix #21921 by marking required path parameters as @NotNull (#21951) 2025-09-13 17:48:47 +08:00
Leon Linhart
0edcc9d204
Correctly annotate Gradle task in- & outputs and enable stricter plugin validation (#21957)
* Correctly apply Gradle task input & output annotations to accessors

Gradle's task input and output annotations should be applied to the accessors instead of the properties. No adhering to this can cause funky behavior in the generated stubs. Examples of this can be found in the docs: https://docs.gradle.org/current/userguide/implementing_custom_tasks.html

Also adds missing annotations so that validation passes

* Enable strict Gradle plugin validation
2025-09-13 16:49:06 +08:00
MarcoZurich
59eac42b0f
Fix "defaultToEmptyContainer" not properly implemented for non-nullable, required Map (#21953)
* Issue 21890: Fixed flag to use for check of required, non-nullable map

* Issue 21890: added test (first draft)

* Issue 21890: Added Test

---------

Co-authored-by: Marco <chorizoparatodos@gmail.com>
2025-09-13 16:47:45 +08:00
William Cheng
5efe16c66b
[java] Update rest-assured dependencies to newer versions (#21961)
* update rest-assured dep to newer versions

* update build
2025-09-13 16:32:31 +08:00
Adam Drakeford
8a061acc7c
Remove myself from Kotlin technical committee (#21959)
Unfortunately i have not had time to engage in this project in recent years, and as such feel its best for myself and the community if i remove myself from the Kotlin technical committe. 

Thanks for all the great work done by all contributors.
2025-09-12 23:50:09 +08:00
William Cheng
177b94b1b4
Add tests for numeric form data (kotlin - jvm-ktor) (#21952)
* add tests for numeric form data (kotlin)

* remove null check as its done already
2025-09-12 15:28:57 +08:00
Jef LeCompte
58fde20e2c
fix: parameter appending for number types (#21947)
* fix: parameter appending for number types

Updated string and number parameter handling to ensure proper conversion to string before appending.

* Update api.mustache
2025-09-12 13:10:40 +08:00
William Cheng
8300794c5e update python samples 2025-09-11 20:56:37 +08:00
Maik Dijkstra
9b692e5ef7
fix(ruby-client): Fix incorrect boolean parsing in OneOf/AnyOf (#21943)
Changes the logic of parsing of OneOf/AnyOf to fix incorrect type coercion
in OneOf/AnyOf contexts. The guard which checks whether typed_data is true-ish
fails for booleans. If the oneOf includes a boolean type and the data is false then
it will correctly parse this value as a boolean. However, the guard class will determine
that false is not true-ish and therefore returns nil. So the result of the type coercion
of false will be nil. This can result in problems when dealing with default true.

For example how a false can turn into a true with defaults:
1. The API returns false
2. The type coercion determines false becomes nil
3. When storing this retrieved record with a default of true for this column the stored value is suddenly true
while the API specifically returned false

This fix removes this guard and will rely on the exception raised to return nil when type coercion fails.
2025-09-11 20:46:06 +08:00
Knut Erik Langdahl
d523903827
fix(kotlin): set isVoid to true for Unit datatypes (#21940) 2025-09-11 20:17:05 +08:00
Artem ILIN
5f647b8477
[python] fixes #21936, api client type checks (#21935) 2025-09-11 00:04:48 +08:00
Pascal Bachor
6825d9ccaa
python: feature flag for lazy imports (#21885)
* python: feature flag for lazy imports

* python: update samples

* python: add python-lazyImports to test job

* python: reuse tests in lazyImports sample

* python: avoid using non-imported submodules

* add normalizer option

---------

Co-authored-by: Pascal Bachor <bachorp@users.noreply.github.com>
Co-authored-by: William Cheng <wing328hk@gmail.com>
2025-09-10 17:22:41 +08:00
keepConcentration
0e42edc95b
[#21619] fix(python): update pyproject.toml license format with poetry1 fallback (#21931)
* Add support for both string and object license formats in `pyproject.toml` for Python and Python-Pydantic generators. (#21619)

* Generate the samples (#21698)

* Generate the samples (#21698)

* Remove Python-Pydantic-v1 license format tests (#21619)

* Revert license format to string in Python-Pydantic-v1 samples (#21619)
2025-09-10 15:35:10 +08:00
Ruben Hönle
278d7ae4c9
java-client: fix some javadoc comments (#21932)
* java-client: fix some javadoc comments

* update samples
2025-09-10 01:44:36 +08:00
William Cheng
7b3de8dbce
[python] fix default value when enum is a reference (#21923)
* fix default value when enum is ref (python)

* update spec
2025-09-09 09:21:09 +08:00
William Cheng
bdfbb32cdd
Improve Go client tests (#21919)
* test withXml option

* fix path

* update go code (withXml: true)

* test one more go client
2025-09-08 16:45:46 +08:00
William Cheng
6e089f5f03
Support normalizing anyof/oneof enum constraints to a single enum (#21917)
* Support normalizing anyof/oneof enum constraints to a single enum

* Add SIMPLIFY_ONEOF_ANYOF_ENUM to the documentation

* Process referenced schemas with oneof/enum as well

* Implement referenced enum merging from oneof/anyof

* Implement retaining the enum description as x-enum-desriptions for oneof enum

* Update samples and docs with oneOf enum normalization

* update samples to fix python tests

* fix test file name

* fix incorrect filename

---------

Co-authored-by: Pieter Bos <pieter.bos@nedap.com>
2025-09-07 17:36:02 +08:00
William Cheng
e62908e30e
Add tests for withXml option in Go client generator (#21913)
* test withXml option

* fix path
2025-09-06 22:48:32 +08:00
William Cheng
6164836b57
update workflow to use jdk 11 (#21912) 2025-09-06 22:35:54 +08:00
Tim Van Wassenhove
ee40887d47
fix(rust): Add anyOf support to Rust client generator (#21896)
* feat(rust): Add anyOf support to Rust client generator

This commit adds support for anyOf schemas in the Rust client generator
by treating them similarly to oneOf schemas, generating untagged enums
instead of empty structs.

The implementation reuses the existing oneOf logic since Rust's serde
untagged enum will deserialize to the first matching variant, which
aligns well with anyOf semantics where one or more schemas must match.

Fixes the issue where anyOf schemas would generate empty unusable structs.

* test(rust): Add test for anyOf support

This commit adds a test case to verify that anyOf schemas generate
proper untagged enums instead of empty structs in the Rust client
generator.

The test includes:
- A test OpenAPI spec with anyOf schemas
- Unit test that verifies the generated code structure
- Assertions to ensure enums are created instead of empty structs

* Fix anyOf support for Rust generator

- Fixed template closing tag issue that prevented anyOf schemas from generating enums
- Changed {{/composedSchemas.oneOf}} to {{/composedSchemas}} at line 262
- Put #[serde(untagged)] and pub enum on same line for test compatibility
- Fixed TestUtils.linearize() method replacing spaces with literal '\s' string

The Rust generator already converts anyOf to oneOf for processing, but the
template wasn't correctly handling these converted schemas. Now anyOf schemas
generate proper untagged enums, matching the expected behavior for oneOf
schemas without discriminators.

* fix(rust): maintain multi-line formatting for serde attributes in oneOf/anyOf enums

- Keep #[serde(untagged)] on separate line from pub enum for better readability
- Update test assertions to use two separate checks instead of linearize()
- Ensures generated Rust code maintains consistent formatting with existing samples
- Preserves the original multi-line attribute style preferred in Rust ecosystem
2025-09-06 18:46:24 +08:00
William Cheng
1d739f1598
New generator for Scala3 + sttp4 + jsoniter-scala (#21908)
* started impl

* seems to work

* generated docs

* fix class name duplicates on case-insensitive filesystems

* wip

* added script to rebuild all projects

* dropped bash slop

* fixed directory structure

* ok, now it makes sense

* update sttp, serialize query params, fix enums serialization, fix not required files params

* fix compile errors after sttp upgrade, fix missing enum import in operations, fix file response. change serialization from Map to Seq to avoid deleting duplicate keys

* auth support

* fix enums entries, multipart support(partially), header, path and cookie serialization support

* support of option fields

* add samples, update workflow

* add new files

* fix

* remove tab

* remove tab

* update doc

* update header

* update readme

---------

Co-authored-by: Łukasz Biały <lukasz.marcin.bialy@gmail.com>
Co-authored-by: Kamil-Lontkowski <kamillont14@gmail.com>
2025-09-06 13:36:44 +08:00
yzaoui
2a556ff24e
Fix missing @Serializable on enums for kotlin/jvm-retrofit2 (#21907)
* Add @Serializable annotation to enum for kotlinx-serialization

* Adjust template, generate samples

* Fix template
2025-09-06 10:17:28 +08:00
Jens Fischer
29a817afdb
[kotlin-client] Fix string comparison in discriminator post-processing (#21881)
We encountered occassional build failures with the logic introduced in #21531 due to discriminator properties still being generated in rare cases.
Not sure why it didn't happen consistently, may be related to Gradle caching or parallel builds or whatever.
Since patching these string comparisons, this has no longer occurred.
2025-09-06 09:46:37 +08:00
dependabot[bot]
3029ac62f7
Bump actions/setup-python from 5 to 6 (#21901)
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 5 to 6.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-version: '6'
  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>
2025-09-05 09:53:37 +08:00
dependabot[bot]
27018b0a0d
Bump actions/setup-node from 4 to 5 (#21903)
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 4 to 5.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-version: '5'
  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>
2025-09-05 09:36:39 +08:00
dependabot[bot]
5544e6acc5
Bump actions/setup-go from 5 to 6 (#21902)
Bumps [actions/setup-go](https://github.com/actions/setup-go) from 5 to 6.
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](https://github.com/actions/setup-go/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/setup-go
  dependency-version: '6'
  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>
2025-09-05 09:16:19 +08:00
Sebastian Rühl
08733aaf25
feat(golang): support for wrapped and xml name (#21899)
* feat(golang): support for wrapped and xml name

* test(golang): add two test cases for wrapped

- with name
- without name

* chore(golang): update samples
2025-09-05 01:14:14 +08:00
William Cheng
3f24026b87 update parser to 2.1.33 2025-09-04 17:41:05 +08:00
dependabot[bot]
27ed27f135
Bump actions/checkout from 4 to 5 (#21889)
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '5'
  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>
2025-09-04 15:43:28 +08:00
dependabot[bot]
3cc094485d
Bump actions/setup-dotnet from 4.3.1 to 5.0.0 (#21887)
* Bump actions/setup-dotnet from 4.3.1 to 5.0.0

Bumps [actions/setup-dotnet](https://github.com/actions/setup-dotnet) from 4.3.1 to 5.0.0.
- [Release notes](https://github.com/actions/setup-dotnet/releases)
- [Commits](https://github.com/actions/setup-dotnet/compare/v4.3.1...v5.0.0)

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

Signed-off-by: dependabot[bot] <support@github.com>

* trigger c# build workflow

* Revert "trigger c# build workflow"

This reverts commit cb0ea32e98d4bf6a5847afadf2603d552a8156e3.

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: William Cheng <wing328hk@gmail.com>
2025-09-04 15:43:11 +08:00
Kevin Liddle
86f107047e
[BUG][rust-axum] Fix duplicate route operations when supplying multiple tags on a path with a camelCase param (#21873)
* [BUG][rust-axum] Fix duplicate route operations when supplying multiple tags on a path with a camelCase param

* Update rust-axum sample
2025-09-04 01:36:26 +08:00
Julius
2ebda09b9f
feat: add support for minimal update option in maven plugin (#21872) 2025-09-04 01:00:00 +08:00
Mattias Sehlstedt
fde017150e
[C#] Fixes array TypeDeclaration parsing order to fix deep aliases (#21600)
* Adjust array TypeDeclaration parsing order to fix deep inline aliases

* Update samples
2025-09-04 00:58:13 +08:00
dsteeley
5daef3e901
fix: Resolve issue21805 rust-server compilation failure with large maximums by handling minimum and maximum using BigInt instead of longValue. (#21875) 2025-09-03 16:45:02 +08:00
William Cheng
6e443f1354
fix: honor required fields in jackson @JsonProperty annotations (#21876)
* fix: honor required fields in jackson @JsonProperty annotations

* add samples

* fix: trigger build

* fix: undo

* update to handle nullable as well

---------

Co-authored-by: Erik Lagerholm <erik.lagerholm@volvocars.com>
2025-09-03 16:41:59 +08:00
Jochen Schalanda
babb3e272b
[Java] Add missing Locale to String.format() invocations (#21871)
* [Java] Add missing Locale to String.format() invocations

* chore: ./bin/generate-samples.sh ./bin/configs/*.yaml
2025-09-03 14:52:49 +08:00
Jochen Schalanda
d1df75c61d
[Java] Remove unnecessary String.format from jersey2, jersey3, native (#21870) 2025-09-03 14:17:49 +08:00
William Cheng
20d5126b17
disable tests due to too many false alarams (#21865) 2025-09-02 16:21:10 +08:00
fkellner
efd06f5719
Fix bug in ModelUtils.getParentName resulting in wrong inner Models for oneOf-composed schemas (#21799)
* Test Cases for more than two oneOf-Options (both passing, but important to narrow down observed bug)

* fix language-specific tests broken by adding a third fruit to oneOf test

* create reproducer unit test for java client codegen

* fix typo in test yaml

* fix ModelUtils.getParentName returning name of first element in composed schema instead of null when there are multiple elements and it is not clear which one should be parent

* rename test yaml and added tests for clarity

* update samples

* update samples again
2025-09-02 15:26:26 +08:00
Leo Gomes @Amadeus
c854a23682
[protobuf] fix generation of enums with UNSPECIFIED values (#21774) 2025-09-02 12:42:27 +08:00
Yasuhiro SHIMIZU
1c2fd67cc9
fix typo in Kotlin client discriminator samples (#21853)
* fix typo in kotlin client samples

allOff -> allOf

* fix gradlew permission

* update samples
2025-09-01 21:28:04 +08:00
Eduardo Menges Mattje
27d3c6f326
[3.1] Fixed lack of check for booleanSchemaValue (#21742)
* [3.1] Fixed lack of check for ´booleanSchemaValue`

* [3.1] Fixed `isMapSchema`
2025-09-01 14:06:27 +08:00
William Cheng
eae5088f7c
Remove travis ci setting from ci pipeline (#21834) 2025-09-01 13:44:23 +08:00
William Cheng
90d6af2bab
Refactor Rust github workflow for clients and servers (#21851)
* add workflow to test rust clients

* update to use localhost

* rename rust server workflow
2025-09-01 11:43:25 +08:00
CatBraaain
d8593ef6d7
style: add a space before comment text in .gitignore (#21844) 2025-08-31 22:35:54 +08:00
Bruno Coelho
9148db26fc
[Swift6][client]Make Swift 6 generator stable (#21846)
* Make Swift 6 generator stable

* Make Swift 6 generator stable
2025-08-31 10:08:17 +08:00
Yasuhiro SHIMIZU
2cdd9ae687
Kotlin Multiplatform polymorphism with custom discriminator support (#21772)
* Enable descriminator for kotlin-client multiplatform

* update template

* add sample

* update samples-kotlin-client workflow

* add missing JsonClassDiscriminator import

* fix gradlew permission

* update sample

* fix sample

* re-generate sample
2025-08-31 02:22:12 +08:00
William Cheng
443fd76529
Add new workflow to test dart-dio samples (#21838)
* add new workflow to test dart

* fix

* fix

* fix versions

* newer version

* newer version

* newer version

* newer version

* newer version

* setup flutter

* update

* update

* fix path

* trigger build failure

* Revert "trigger build failure"

This reverts commit 36b688dfcb2937224add7186e84ea82b9f2ae76b.
2025-08-30 21:33:54 +08:00
Thomas Ville
9c1b680fdf
[rust] enable useAsyncFileStream only for files in the body (#21839)
Co-authored-by: Thomas Ville <thomas.ville@aerys.in>
2025-08-29 21:02:45 +08:00
Kristian Nedrevold
bd0b81d26d
Update baseClient.mustache for scala-http4s (#21825)
The code for setting the form body parameters were wrong,

e.g. the key value pair (id, 12345) would be encoded as
id=%28id%2C12345%29

This commit adds a fix to the base client to correctly setting formBody values the previous pair will now be encoded as

id=12345
2025-08-29 13:55:06 +08:00
William Cheng
afedd3fd33 update php samples 2025-08-28 15:59:35 +08:00
William Cheng
399547c2ba update php samples 2025-08-28 15:53:49 +08:00
Paul Parenko
daa8eb422d
import Nullable if required (#21829)
Also allows to override it eg with: <importMapping>Nullable=org.jspecify.annotations.Nullable</importMapping>
2025-08-28 15:48:12 +08:00
florentausha
e4c9eb36e9
fix PHP: Fixed typing of offsetGet/offsetSet (#21583) 2025-08-28 15:46:44 +08:00
William Cheng
ac5478e909 update php symfony samples 2025-08-28 14:06:54 +08:00
Elias Kotlyar
992e387e27
Update ApiPass.mustache (#21808)
-> added void type
2025-08-28 14:05:02 +08:00
William Cheng
e903a89ccf
Add PHP server syntax check worfklow (#21830)
* add php server syntax check worfklow

* update

* fix

* trigger build failure

* Revert "trigger build failure"

This reverts commit cd8fa3000dfb98afd57a3f25081a30ebc52fe496.

* add more folders

* comment
2025-08-28 14:04:41 +08:00
William Cheng
ffaeca3204 update 2025-08-28 13:35:52 +08:00
Linh Tran Tuan
7c4d7277b4
Separate Basic Authorization into new template file (#21828) 2025-08-28 13:00:06 +08:00
Nikos Atlas
065eceb824
[Typescript] add missing typeRoots config on tsconfig (#21824)
* add missing typeRoots config on tsconfig

* add samples

* Apply suggestion from @macjohnny

Co-authored-by: Esteban Gehring <esteban.gehring@gmail.com>

* update samples

---------

Co-authored-by: Esteban Gehring <esteban.gehring@gmail.com>
2025-08-27 13:28:03 +02:00
Daniel Genchev
8ce639ddae
[kotlin-client][kotlin-spring] Fix duplicate discriminator serialization with Jackson used as serialization library (#21734)
* [kotlin-client][kotlin-spring] Fix duplicate discriminator serialization with Jackson used as serialization library

* Update samples
2025-08-27 17:37:38 +08:00
Konrad Schultz
ca7e8bd932
typescript-fetch: Fix model date crash (#21821)
* typescript-fetch: Fix model date crash

Fix a runtime crash converting to json when a date or datetime is both nullable
AND required. There are 4 cases to account for:

| required | nullable | values |
|----------|----------|--------|
| f        | f        | string OR undefined |
| f        | t        | string OR null OR undefined |
| t        | f        | string |
| t        | t        | string OR null |

And importantly when required and nullable code that would crash on null was
being generated. additionally when required is false and nullable is true we
still want to allow consumers to be able to pass in `undefined` OR `null` and
pass that value to the server. Some servers treat null and undefined differently
for some operations so having that ability is pretty reasonable.

fix: https://github.com/OpenAPITools/openapi-generator/issues/21820

* Update typescript-fetch samples

./bin/generate-samples.sh ./bin/configs/*.yaml || exit
2025-08-27 11:08:54 +02:00
Yannick Pfaff
e1447bc3dc
docs(spring): fix discriminator property defaults (#21767) 2025-08-27 16:15:22 +08:00
William Cheng
c134a8adbf
Add skipCopyWith option for dart-dio (#21816)
* add skipCopyWith option for dart-dio

* update dart tests
2025-08-27 13:51:46 +08:00
Julien Debon
9c11fcf6bc
[Fix][OCaml] Incorrect encoding/decoding for required free-form objects; Odoc for record fields (#21819)
* [OCaml] Fix inconsistent oneOf primitive sample name

* [OCaml] Fix encoding/decoding for free-form required fields

* [OCaml] Change field comment to Odoc, move it after the field

As per Odoc documentation, record field documentation should be *after* the
field, not before.
See https://ocaml.github.io/odoc/odoc/odoc_for_authors.html#special_comments
type `my_record`

* [OCaml] Cleanup non-generated files for ocaml sample
2025-08-26 18:59:11 +08:00
William Cheng
6215e6e005
update swagger parser to 2.1.32 (#21818) 2025-08-26 18:31:31 +08:00
GregDThomas
814f406472
Fix #20370 by adding an OAuth access token supplier (#21800) 2025-08-26 14:41:45 +08:00
Julien Debon
3d93cc05ec
[OCaml] Generate .ocamlformat file; format all generated OCaml files (#21809)
* [OCaml] Generate .ocamlformat file

Fixes https://github.com/OpenAPITools/openapi-generator/issues/21806

* [OCaml] Run `dune fmt` on all OCaml folders

* Don't format in Git

* Add myself for OCaml
2025-08-26 00:36:49 +08:00
Julien Debon
dc8fac21d9
[OCaml] Introduce support for oneOf/anyOf, fix default value for non-required maps (#21798)
* Add OCaml fake-petstore to test corner cases

* Prefix List functions with Stdlib as the fake petstore generates a List module

* Handle decimal and any types

* Indent to_json.mustache for easier maintenance

* Indent api-impl.mustache a bit more for readability before fix

* Fix: do not call `to_json` for free forms and byte arrays

Fixes https://github.com/OpenAPITools/openapi-generator/issues/21312

* Fix compilation for binary types

The implementation may not be correct, but at least it compiles. To be checked
if someday someone actually uses it/complains.

* Indent to_string.mustache

* Add support for exploded form-style object query params

Fixes https://github.com/OpenAPITools/openapi-generator/issues/21307

* Add ocaml-fake-petstore to CI

* Fix free-form body params

* Cohttp_lwt.Response is deprecated, use Cohttp.Response instead

* Safe Java code cleanup

* Split into model-record.mustache

* Add some support for oneOf/anyOf

* Re-generate all OCaml samples

* Fix: correctly mark non-required maps with default empty list

* Fix: Correctly encode/decode maps

* Refresh documentation

* Refresh after merging master
2025-08-25 17:27:27 +08:00
Oliver Kuntze
cd7fe341d3
Fix validation constraints for parameters in request body of form request are not generated (at least with Spring Boot generator) (#21749)
* fix(Spring Boot): adds validation to body params of forms requests

* fix(Spring Boot): adds test for validation of body params of forms requests

* fix(Spring Boot): adds samples
2025-08-23 15:58:46 +08:00
William Cheng
66c2a287cc
update doc to reference 7.14.0 (#21795) 2025-08-22 19:25:37 +08:00
William Cheng
20be2decde
Prepare v7.16.0 release (#21794)
* Revert "v7.15.0 release (#21792)"

This reverts commit 2c816f89cbd6c4670aaf6e3387c88daadae6cbad.

* prepare 7.15.0 release

* update samples
2025-08-22 19:17:23 +08:00
William Cheng
cc3d6968fa after docker release to trigger on tags 2025-08-22 18:17:17 +08:00
William Cheng
2c816f89cb
v7.15.0 release (#21792)
* v7.15.0 release

* fix gradle test workflow
2025-08-22 17:43:01 +08:00
devhl-labs
f6eeb01895
[csharp] Fixed any of inline enum (#21764)
* fixed composed any of

* fixed composed any of

* fixed spacing
2025-08-22 15:35:07 +08:00
agilis allievo
8ee69bfe74
Fix MergedSpecBuilder not passing auth (#21782) 2025-08-22 15:21:34 +08:00
William Cheng
8d06496cce
update swagger parser to newer version (#21789) 2025-08-22 15:05:17 +08:00
andershausding
2569321b82
feat: add async file stream support for reqwest client (#21771) 2025-08-22 15:02:55 +08:00
Adam Juraszek
dbe0419034
[Java][HttpClient] Fix memory leak with virtual threads (#21729) (#21752) 2025-08-22 14:41:12 +08:00
dependabot[bot]
bae8082b9a
Bump actions/checkout from 3 to 5 (#21785)
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 5.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3...v5)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '5'
  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>
2025-08-22 14:29:00 +08:00
dependabot[bot]
7fba143c5e
Bump actions/setup-java from 3 to 5 (#21786)
Bumps [actions/setup-java](https://github.com/actions/setup-java) from 3 to 5.
- [Release notes](https://github.com/actions/setup-java/releases)
- [Commits](https://github.com/actions/setup-java/compare/v3...v5)

---
updated-dependencies:
- dependency-name: actions/setup-java
  dependency-version: '5'
  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>
2025-08-22 14:28:48 +08:00
dependabot[bot]
001bc833db
Bump actions/cache from 3 to 4 (#21787)
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-version: '4'
  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>
2025-08-22 14:28:35 +08:00
William Cheng
07b764e0a2
Clean up docker release workflow (#21788)
* clean up docker release workflow

* undo

* comment out docker in travis.yml
2025-08-22 14:27:06 +08:00
William Cheng
11a0075c46
Add workflow for docker release (#21780)
* add workflow for docker release

* fix

* use and

* fx

* build

* fix dir

* debug

* update

* publish cli images

* fix commands

* fix env

* fix operator
2025-08-21 19:12:08 +08:00
William Cheng
9264669a17
Add maven release workflow (#21779)
* add maven release workflow

* minor updates
2025-08-21 15:59:21 +08:00
scarf
96b44ce727
[typescript-axios]: align jsdoc for @deprecated (#21778)
* refactor: simplify `description` OR `deprecated` template

* chore: update generator output

---------

Co-authored-by: nocontribute <>
2025-08-21 08:50:22 +02:00
jack-edmonds-dd
caf53ac6c4
Fix overly permissive regular expression. (#21777) 2025-08-21 13:44:49 +08:00
scarf
8c0f8677f0
[typescript-axios]: slim down jsdoc (#21776)
* feat: remove `@export` and more

* feat: remove `@memberof`

* feat: only add description jsdoc if it exists

* feat: remove obvious `@type`

* feat: only display JSDoc when `description` OR `deprecated` exists

* chore: update generator output

---------

Co-authored-by: nocontribute <>
2025-08-20 10:46:59 +02:00
David Gamero
d06ed32df0
[typescript] use built-in abortsignal (#21741)
* use built in

* upgrade types from pinned fetch

* samples

* csharp samples

* merge master and samples

---------

Co-authored-by: David Gamero <davidgamero@microsoft.com>
2025-08-19 09:31:01 +02:00
Mattias Sehlstedt
490de02971
Fix so that the oneOfAnyOf normalizer retains the read/write only attribute (#21737) 2025-08-18 00:36:14 +08:00
William Cheng
3ebb299981
[kotlin-client] Support for integer enums with kotlinx with custom serializer (#21765)
* [kotlin-client] Add support for integer enums with custom serializer for kotlinx

* [kotlin-client] Fix @SerialName annotation being used on non-string enums

* Format samples

* remove blank line

* add tests for kotlin client with integer enum

* add folders

---------

Co-authored-by: CHervaudBetclic <c.hervaud@betclicgroup.com>
2025-08-18 00:11:43 +08:00
Espen Haugsdal
43d58ee9b0
Use Python uuid.UUID instead of StrictStr (#21740) 2025-08-17 22:25:53 +08:00
Mattias Sehlstedt
2513d82989
Exclude the discriminator field from getting a nullable_var_annotations (#21155)
* Exclude the discriminator field from getting a nullable_var_annotations

* Update samples

* Manually add annotations since the remote pipeline insists that they should be there

* Add description for why the discriminator does not have a nullability-annotation

* Update samples
2025-08-16 18:08:22 +08:00
Mattias Sehlstedt
6c31cbbf47
[Typescript] Fix warning logs for additional properties that have not been set (#21630)
* Fix warning logs for additional properties that have not been set

* Readd warning log details to clarify what option that the log refers to
2025-08-16 13:15:25 +08:00
William Cheng
fe5305f2cf
add tests for uuid in oneOf/anyOf (java okhttp-gson) (#21763) 2025-08-16 12:23:04 +08:00
Ruben Hönle
030be5d3c7
fix(java): handle validation of UUIDs (#21747)
relates to OpenAPITools/openapi-generator#16868
2025-08-16 12:01:55 +08:00
William Cheng
2bbb19a1d5
Update gradle jar to newer version (java micronut) (#21762)
* update gradle wrapper to newer version (java micronaut)

* update gradle setup to v4
2025-08-16 11:45:15 +08:00
Pim Merks
9cd04e71fa
Add TrimLineBreaks and TrimWhitespace lambdas to default codegen (#21759) 2025-08-16 11:36:35 +08:00
David Gamero
d7aee8a0d6
pin windows gradle version (#21761)
Co-authored-by: David Gamero <davidgamero@microsoft.com>
2025-08-16 11:32:50 +08:00
Kuzma
e1aed293cf
Update form-data to the latest version (#21748) 2025-08-14 15:55:56 +02:00
William Cheng
1870fbb7cf
Fix github workflow (linux.yaml) (#21743)
* remove with from workflow

* test with gradle 8.x
2025-08-14 13:19:22 +08:00
tomcra
9cb04c1b9d
#21582 [BUG][dart-dio] Bug generating inline enums with common names (#21591)
* #21582 [BUG][dart-dio] Bug generating inline enums with common names

* #21582 [BUG][dart-dio] Bug generating inline enums with common names added petstore test

* #21582 [BUG][dart-dio] Bug generating inline enums with common names added generated samples to commit.

* #21582 [BUG][dart-dio] Bug generating inline enums with common names removed bug test files that were duplicates

* #21582 [BUG][dart-dio] Bug generating inline enums with common names. Added generated files that were missed.

* #21582 [BUG][dart-dio] Bug generating inline enums with common names. Added generated files that were missed.

* #21582 [BUG][dart-dio] Bug generating inline enums with common names. Added generated files that where updated as a result of changes in master.
2025-08-14 12:24:34 +08:00
dependabot[bot]
aacbdf88c0
Bump actions/checkout from 4 to 5 (#21728)
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '5'
  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>
2025-08-13 01:48:03 +08:00
0x5457
3e032bfcfd
fix(typescript): add Date instance check before date formatting (#21722)
* fix(typescript): add Date instance check before date formatting

* chore(typescript): generate samples

* fix: resolve type errors in ObjectSerializer Date formatting

* chore: update samples

* chore: ensure-up-to-date
2025-08-12 16:04:17 +02:00
andershausding
1860efade2
[Rust] fix: add location prefix to prevent parameter name collisions (#21611)
* [Rust] fix: add location prefix to prevent parameter name collisions when escaping parameter names

* chore: update samples

* [Rust] fix: do not use locationSuffix if useSingleRequestParameter feature is enabled
2025-08-12 20:54:09 +08:00
William Cheng
bfc989c6ab update samples 2025-08-12 16:51:45 +08:00
Erwin de Haan
77e3326a36
Make all C# flavors support x-zero-based-enum and add tables to documentation (#21463)
* Make all C# flavors support x-zero-based-enum and add table to documentation

* Add the documentation stuff properly
2025-08-12 11:13:16 +08:00
Juuso Tuononen
36cea14781
[dart][dart-dio] Support OpenAPI 3.1 composed schemas (#20475) 2025-08-12 11:12:04 +08:00
Mattias Sehlstedt
4d9fd4df92
Support Json-serialized query parameters in Spring client RestClient and WebClient (#21725)
* Add so that a query parameter can be serialized as Json in the Spring clients RestClient and WebClient

* Update samples

* Add clientCodeGen test
2025-08-12 10:26:33 +08:00
Alec Petersen
4b88cf8243
[REQ][CSHARP][GENERICHOST] Support stream for binary response (#21677)
* Add ContentStream property to ApiResponse

* Add a constructor which sets ContentStream

* Create and use a memory stream for binary model types

* Remove extra space

* Update samples

* Add {{nrt?}} to support older versions

* Remove public modifier for interface property
2025-08-11 15:47:12 +08:00
Mattias Sehlstedt
8874df4702
Codegen parameter for query json serialization (#21718)
* Add endpoints with query parameters that require Json-serialization

* Add property for query json-serialization

* Update samples

* Adjust indentation for specification
2025-08-10 22:47:51 +08:00
Mattias Sehlstedt
6ff9e67bad
Specify Gradle version (#21720) 2025-08-09 23:16:52 +08:00
Alec Petersen
3e577d58c3
[BUG][CSHARP][GENERICHOST] Write enum values in expected JSON format (#21698)
* Use ValueConverter method for enums to output in the correct JSON format

* Fix doc comment

* Update samples

* Call ToString on return value of converter

* Update samples

* Update samples

* Add test
2025-08-09 12:11:02 +08:00
William Cheng
89a108aca0
Default nested array to null in java generators (#21713)
* default nested array to null in java generators

* add test schema
2025-08-08 15:59:16 +08:00
​Andrzej Ressel
0f231d9494
Fix rust-axum homepage toml quotes (#21716) 2025-08-08 13:29:54 +08:00
Laha Luhem
517bbeb9a9
Feat: #21665 [dart][dart-dio] CopyWith for json_serializable (#21667)
* Add `@CopyWith()` annotation to model class mustache

* Add copyWith deps to pubspec mustache template

* generate examples

* add import for copyWith
2025-08-07 22:45:13 +08:00
kenkon
5db1e75fa6
[Swift5][Swift6] support "x-enum-descriptions" (#21706)
* [swift5] Support x-enum-descriptions

* [swift5] Add x-enum-descriptions to test YAML

* [swift5] Regenerate samples

* [swift6] Support x-enum-descriptions

* [swift6] Regenerate samples
2025-08-07 08:58:58 +01:00
Kraust
5b8a11546c
[C++] [Client] Added cpp-oatpp-client (#21711)
* Added cpp-oatpp-client.

* Updated pipelines.

* Should match formatting now.

* Moved includes around.

* Ran doc generator.
2025-08-07 10:01:55 +08:00
Rens Groothuijsen
603dbfd7f9
[rust] Extend oneOf array enum names with inner type (#21599) 2025-08-07 09:38:07 +08:00
William Cheng
e2652f1c62 update C# samples 2025-08-07 09:22:56 +08:00
Arcueid D`athemon
c077d005d5
[REQ] [CSHARP] [UNITYWEBREQUEST] Support Stream for unityWebRequest library (#21704)
* Update ApiClient.mustache

* Update ApiClient.mustache
2025-08-07 09:20:11 +08:00
phactum-mnestler
f659457f90
[spring] Adapt HttpHeaders access to remain compatible with Spring 7 (#21691)
* [spring] Adapt HttpHeaders access to remain compatible with Spring 7

* update pom.xml patch version
2025-08-06 15:46:37 +08:00
Rui Ventura
bf6e83ea63
feat(java): Generate servers for restclient library (#21699) 2025-08-06 15:36:38 +08:00
Christopher Gual
7e974272be
[bug][kotlin-spring] fix allowableValues quotes in documentation anno… (#21700)
* [bug][kotlin-spring] fix allowableValues quotes in documentation annotations for path parameters

* Remove unused imports in KotlinSpringServerCodegenTest

* Fix Swagger1 annotation

* Streamline Swagger1 annotation

* Remove extra line break

---------

Co-authored-by: Chris Gual <cgual@omnidian.com>
2025-08-06 15:17:36 +08:00
dependabot[bot]
bb6acc132a
Bump actions/download-artifact from 4 to 5 (#21701)
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 4 to 5.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](https://github.com/actions/download-artifact/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-version: '5'
  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>
2025-08-06 13:37:40 +08:00
devhl-labs
f6de5b71dc
[csharp] Fix composed enum handling (#21690)
* composed enums

* revert sample changes

* add new sample due to HttpClient library not working with the new models

* added to appveyor

* build samples again
2025-08-05 11:33:50 +08:00
​Andrzej Ressel
a7af767e34
[Rust] Replace more HeaderValue::from_str with compile time HeaderValue::from_static (#21689) 2025-08-05 11:21:21 +08:00
William Cheng
de3e227328
feat(typescript-angular): prepare build (#21684)
* feat(typescript-angular): prepare build

Prepare build is required in order to publish

* update php laravel samples

* update samples

---------

Co-authored-by: Evan Gillogley <evanjmg@gmail.com>
2025-08-05 10:23:36 +08:00
devhl-labs
df1d562f24
[csharp] Ensure unique property names (#21649)
* started fixing multiple issues

* weather api builds

* added docstring

* ensure property names are unique

* force pr gates to restart

* force pr gates to restart

* force pr gates to restart

* force pr gates to restart
2025-08-04 01:31:55 +08:00
devhl-labs
302590a215
fix testing respone (#21687) 2025-08-04 00:47:46 +08:00
Daniel García
31060931b6
Add reqwest-trait crate to workspace and rename it (#21674)
* Add reqwest-trait crate to workspace and rename it

* Fix missing ^isArray condition
2025-08-04 00:46:44 +08:00
​Andrzej Ressel
9f2c92079e
Fix double @ in README (#21688) 2025-08-04 00:45:11 +08:00
Julien Debon
81be9cd409
OCaml: derive eq (#21679) 2025-08-02 12:32:44 +08:00
devhl-labs
8de694d4bb
windows latest (#21682) 2025-08-02 12:19:17 +08:00
Mattias Sehlstedt
02ba9f68ac
[Scala sttp] Fix header serialization for Optional values (#21603)
* Adjust header serialization for Optional values

* Add additional test verification to display the header type

* Do not get a null value from an option if it is empty, but rather keep the None value. If a value is present it is converted to an Option[String]
2025-08-02 11:36:40 +08:00
William Cheng
87231c3b58
[php][php-nextgen] add new github workflow to perform syntax check on php files (#21678)
* update php laravel samples

* add php-nextgen to the github workflow

* trigger build failure

* add syntax checker workflow

* Revert "trigger build failure"

This reverts commit 5be28f2e768cb22d9edca83ec897cbaa9cf296e9.
2025-08-01 17:48:04 +08:00
Ezra Singh
f846f307ca
Added symlink to generator cli in Docker image (#15559)
Co-authored-by: Ezra Singh <ezra@liontech.nyc>
2025-08-01 16:35:38 +08:00
Henk van de Berg
faa3a0e4c1
Removed try/catch to enable framework error handling to pick up the error (#21523) 2025-08-01 16:15:05 +08:00
dsteeley
97aa4a8587
Fixup dependency on forked serde_xml (#21664) 2025-08-01 16:06:30 +08:00
dependabot[bot]
5ba0650659
Bump multer and @nestjs/platform-express (#21673)
Bumps [multer](https://github.com/expressjs/multer) to 2.0.2 and updates ancestor dependency [@nestjs/platform-express](https://github.com/nestjs/nest/tree/HEAD/packages/platform-express). These dependencies need to be updated together.


Updates `multer` from 2.0.1 to 2.0.2
- [Release notes](https://github.com/expressjs/multer/releases)
- [Changelog](https://github.com/expressjs/multer/blob/main/CHANGELOG.md)
- [Commits](https://github.com/expressjs/multer/compare/v2.0.1...v2.0.2)

Updates `@nestjs/platform-express` from 11.1.3 to 11.1.5
- [Release notes](https://github.com/nestjs/nest/releases)
- [Commits](https://github.com/nestjs/nest/commits/v11.1.5/packages/platform-express)

---
updated-dependencies:
- dependency-name: multer
  dependency-version: 2.0.2
  dependency-type: indirect
- dependency-name: "@nestjs/platform-express"
  dependency-version: 11.1.5
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-01 16:05:23 +08:00
Ary Obenholzner
fcc83db0f8
NestJS server codegen (#21494)
* setup basic codegen for nestjs server

* set up generated file structure

* adapted moustache files

* fixed imports

* adapted templates

* added module bootstrap

* added model generation

* fixed error with generic type

* added README

* added usage clarification to README, introduced module index.ts

* Update modules/openapi-generator/src/main/resources/typescript-nestjs-server/api.module.mustache

Co-authored-by: Esteban Gehring <esteban.gehring@gmail.com>

* cleaned up package.mustache, added parameters for versions

* cleaned up unneeded boilerplate templates

* fixed indentations from templates

* implemented useSingleRequestParameter

* fixed parameter handling

* added samples with tests

* added docs

* fixed samples

* corrected docs

* updated docs after merge of master

* fixed samples build

* fixed workflow

---------

Co-authored-by: Esteban Gehring <esteban.gehring@gmail.com>
2025-07-31 14:37:44 +02:00
William Cheng
3fbf52f395 remove unused github workflow 2025-07-31 16:52:02 +08:00
some00
dba7aee41e
Kotlinx polymorphism with custom discriminator support (#21531)
* kotlinx serialization fixes

- added new config with kotlinx, discriminator (/w custom name) and
  kotlinx_serialization
- remove discriminator properties from the generator in both base and
  derived classes
- set discriminatorValue in additionalProperties of derived classes
- add JsonClassDiscriminator the derived classes in the template
- set SerialName to discriminatorValue in the template
- change base classes to sealed class instead of interface
- make variables in base classes abstract

* Generated kotlin-allOff-discriminator-kotlinx-serialization sample

* Added test for kotlinx_serialization with discriminator

* renamed yaml

* Added new sample to github workflow

* Added comments to KotlinClientCodegen::postProcessAllModels
2025-07-31 16:29:39 +08:00
Christopher Gual
d7a8aae6e2
[BUG][typescript-fetch] Default case for oneOf serialization method returning undefined variable. (#21669)
* fix bug for returning uninitialized variable for serialization method in oneOf models with discriminator

* Update samples

---------

Co-authored-by: Chris Gual <cgual@omnidian.com>
2025-07-31 08:53:42 +02:00
hellopabu
7af84cad94
[docs][website] add am gmbh as user to users (#21660)
* [docs][website] add am gmbh logo

* [docs][website] add am gmbh to users

* [docs][website] add transparent am gmbh logo
2025-07-30 17:02:09 +08:00
Marcel
7664c6f511
feature: Add control flag for static compile (#21635) 2025-07-30 16:02:34 +08:00
hirish
e275826d1b
add curl handler pre-invoke-callback to c-libcurl (#21654) 2025-07-30 15:06:35 +08:00
Christopher Gual
d29a4bea25
[Bug][typescript-fetch] Typescript fetch one of addtl props imports (#21656)
* Add unit tests for bug in imports for oneOf schemas with additional properties set to true #21587

* Fix bug in filtering primitive, built-in types from model imports in TypeScriptFetchClientCodegen

* Add YAML OAS file for #21587

* Revert change to issue_21259.yaml

* Remove comment from issue_21259.yaml

* Filter out arrays from oneOfModels along with primitive types

* Update issue_21587 unit test to catch the Array<Model> case

---------

Co-authored-by: Chris Gual <cgual@omnidian.com>
2025-07-30 09:02:40 +02:00
William Cheng
657f5fb004
Test go client with aws signature in github workflow (#21657)
* test go client with aws signature in github workflow

* fix path

* fix path

* test with windows

* omit version
2025-07-30 14:38:58 +08:00
dennismouwen-eye
fbb15fd324
Update AWS Go SDK from v1 to v2 in Go client templates (#3) (#21653)
* Update AWS Go SDK from v1 to v2 in Go client templates (#3)

* Initial plan

* Update AWS Go SDK from v1 to v2 in Go client templates

Co-authored-by: dennismouwen-eye <107839749+dennismouwen-eye@users.noreply.github.com>

* Final validation: AWS SDK v2 integration working correctly

Co-authored-by: dennismouwen-eye <107839749+dennismouwen-eye@users.noreply.github.com>

* Fix AWS v4 signature implementation: retrieve credentials properly from provider

Co-authored-by: dennismouwen-eye <107839749+dennismouwen-eye@users.noreply.github.com>

* Fix AWS v4 signature payload hash: properly compute SHA-256 hash for request body

Co-authored-by: dennismouwen-eye <107839749+dennismouwen-eye@users.noreply.github.com>

* Implement proper payload hashing

* Revert go.sum file to original state as requested

Co-authored-by: dennismouwen-eye <107839749+dennismouwen-eye@users.noreply.github.com>

* Revert go.mod and rename import alias from v4 back to awsv4

Co-authored-by: dennismouwen-eye <107839749+dennismouwen-eye@users.noreply.github.com>

* Revert go.mod file to original state removing all changes

Co-authored-by: dennismouwen-eye <107839749+dennismouwen-eye@users.noreply.github.com>

* Rename credentials import to awscredentials alias as requested

Co-authored-by: dennismouwen-eye <107839749+dennismouwen-eye@users.noreply.github.com>

* Fix spacing

* Fix credentials and imports

* Update aws sdk to latest version

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: dennismouwen-eye <107839749+dennismouwen-eye@users.noreply.github.com>
Co-authored-by: Dennis Mouwen <dennis.mouwen@eye.security>

* Update indenting

---------

Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
2025-07-30 13:55:40 +08:00
Christopher Gual
7c1dce4756
[Bug][typescript-fetch] Fix missing close parenthesis in oneOf models. (#21645)
* Modify unit tests for typescript-fetch, issue 21259 to check for closing parens & fix a typo in TypeScriptFetchModelTest

* Fix bug in closing parens in modelOneOf.mustache and some spacing adjustments

* Update samples

---------

Co-authored-by: Chris Gual <cgual@omnidian.com>
2025-07-29 13:28:26 +02:00
Matt Pollock
815a7324e3
[R] add null checks to nullable api parameters (#21629)
* [R] check optional parametrs for null before evaluating param conditions

* update petstore

* handle isNullable when checking api parameters

* update samples

* allow not-nullable parameters to be missing

* update samples

* samples
2025-07-29 13:34:18 +08:00
William Cheng
1a178ae804
add @dsteeley to Rust technical committee (#21651) 2025-07-29 11:42:46 +08:00
William Cheng
2f70572219 update samples 2025-07-28 20:24:46 +08:00
P.H. Knot
86052aa989
fix: Use correct constructor for ApiException in PSR-18 PHP library (#21631)
* fix: Use correct constructor for ApiException

* chore: Generate samples

* fix: Missing $

* fix: Remove extraneous line
2025-07-28 20:19:59 +08:00
Mattias Sehlstedt
7c4ada33c4
[Java] [SpringClient] Introduce setting for sealed oneOf interfaces for Spring clients (#21586)
* Add setting for generating the oneOf interfaces as sealed interfaces

* Generate samples

* Add internal java17 additionalProperty setting

* Move samples to highlight that they do not use the petstore

* Align documentation

* Update samples

* Align documentation

* Update mustache files and samples to change gradle settings to java17
2025-07-28 20:03:54 +08:00
William Cheng
3453c7ba10
Test PHP clients in Github workflow (#21643)
* test php clients in github workflow

* trigger build failure

* update workflow

* Revert "trigger build failure"

This reverts commit 572a69f6bcbab426103c77de55c069bd74b5e7fb.

* update tests

* update tests

* update test

* fix tests

* fix async test

* update tests
2025-07-28 18:33:52 +08:00
Christopher Gual
a60d3d4f81
[Bug][java-spring] Use Flux only for multipart-form-data file parameters with multiple file uploads (#21561)
* Use Flux only for multipart-form-data file parameters with multiple files

* Update samples

---------

Co-authored-by: Chris Gual <cgual@omnidian.com>
2025-07-28 18:28:53 +08:00
Simon
d69714f197
[php] Fix file uploads by backporting #21458 (#21632)
* [php] Backport #21458 to php client

Fixes #21485

Credits to @jozefbriss

* [php] Fix deprecation warning when running integration tests

OpenAPI\Client\FakeHttpClient::setResponse(): Implicitly marking parameter $response as nullable is deprecated, the explicit nullable type must be used instead

---------

Co-authored-by: simonhammes <simonhammes@users.noreply.github.com>
2025-07-28 16:58:03 +08:00
hirish
7d3913f1dd
Add verbose, keepalive, keepidle, keepintvl to c-libcurl (#21613)
* Add keepalive to c-libcurl

* Fix manual tests on client/petstore/c

* Update Readme of c/libcurl

* better curlConfig handling on c-libcurl
2025-07-28 16:43:34 +08:00
Iurii Ignatko
f5da0ea4a1
Remove [this-escape] warnings in generated ApiClient classes (#21620) 2025-07-28 16:43:14 +08:00
Tobias Guttenberger
1c2ef3356d
Bugfix for remote specs with params (#21634)
* [Bugfix][Maven-Plugin] Bugfix for remote input specs with parameters

If the inputSpec was a web address that contained parameters, code generation would fail, because the filepath would contain illegal characters, since the code inside the if-block would be skipped. A side effect of this was, that in the log and in the filename in linux the parameters would be leaked, which could potentially sensitive information like Gitlab Access Tokens

* [Test][Gradle Plugin] Update GenerateTaskDslTest.kt

Extended the Test for testing remote inputSpecs with urlParams, a case that caused problems in the maven plugin.
2025-07-28 16:40:20 +08:00
Mattias Sehlstedt
edbacaa3c7
Add suggestion to PR template to encourage contributors to use a GitHub link their PR to issue (#21624) 2025-07-28 16:02:05 +08:00
klahap
f3944b152d
Add treatWarningsAsErrors option to ValidateTask in gradle plugin (#21626) 2025-07-28 16:01:31 +08:00
Stefan Wurzinger
0e97e19bbc
kotlin-spring: fix exception thrown in enum.forValue (#21622)
* kotlin-spring: fix exception thrown in enum.forValue

* update samples
2025-07-28 16:01:03 +08:00
Christopher Gual
ee5a12a29d
[test][typescript-fetch] Add / improve unit tests for current typescript-fetch oneOf logic #21057 #21464 (#21638)
* Add unit tests for current oneOf logic #21057 #21464

* Remove comment from issue_21259.yaml

---------

Co-authored-by: Chris Gual <cgual@omnidian.com>
2025-07-28 09:28:07 +02:00
devhl-labs
64e9b372c0
[csharp] Handle nested maps recursively (#21636)
* handle nested maps recurssively

* improve git diff readability
2025-07-28 11:28:27 +08:00
devhl-labs
dfc66e34aa
[csharp][generichost] Verify net9 samples up to date (#21637)
* verify net9 samples up to date

* verify net9 samples up to date

* remove erroneous files

* use different logic to delete directories
2025-07-28 10:56:24 +08:00
Ilya Nemtsev
ef22749345
[Java][native] Add ability to add header to specific calls (#21495)
* add bearer capability

* avoid using shared state

* revert needless change

* Revert authentication changes from unused root Java/api.mustache template

* applied change to correct lib type

* updated test files

* made security method more generic for flexibility

* regenerated samples

* further cleanup

* code style

* regenerated samples

* made header assignment more explicit, per each method

* fixed extra comma

* fixed commas, regenerated samples

* moved header population to utility method

* moved static class inside main class

* regenerated samples

* added comments, fixed indentation

* regenerated samples

---------

Co-authored-by: Ilya Nemtsev <ilyanemtsev@192.168.1.34>
2025-07-27 11:18:39 +08:00
DavidGrath
f1a093537d
[typescript-fetch] oneOf models now consider primitives when converting. Issue #21259 (#21464)
* [typescript-fetch] number, string, and Date now considered in oneOf models. Issue #21259

* Generated samples
2025-07-24 08:05:06 +02:00
Linh Tran Tuan
777b7eeea0
[Rust-Axum] Basic Authorization - Basic Analytic - XSS Sanitize (#21578)
* Update

* Update

* Update

* Update

* Update

* Update
2025-07-22 17:43:46 +08:00
William Cheng
0b0d534d0d
use cpp oatapp test spec (#21601) 2025-07-21 18:23:47 +08:00
Christopher Gual
bfb69388aa
[Bug][kotlin-spring] add a Spring type converter for enum values #21564 (#21579)
* [kotlin-spring] add a Spring type converter for enum values #21564

* [kotlin-spring] simplify unit test for inner enum converter

* update samples

* code review feedback; move containsEnums to ModelUtils

* code review feedback; provide comment for generated EnumConverterConfiguration.kt

* update samples

---------

Co-authored-by: Chris Gual <cgual@omnidian.com>
2025-07-21 18:22:32 +08:00
Christopher Gual
31089c0e49
[Java-Spring] add comment to EnumConverterConfiguration mustache file (#21598)
* [java-spring] provide a clarifying comment for the generated EnumConverterConfiguration class

* update samples

---------

Co-authored-by: Chris Gual <cgual@omnidian.com>
2025-07-21 18:21:44 +08:00
Kraust
20ed1ee3cc
Fixes to cpp-oatpp-server generator. (#21595) 2025-07-21 18:08:44 +08:00
Mikko Maunu
90001d4fac
Conditional import of AtomicInteger added to delegate template. fix #21566 (#21597) 2025-07-21 17:27:33 +08:00
William Cheng
b7fb3b2107
update go version, oauth2 dep (#21594) 2025-07-19 22:10:53 +08:00
James Shaw
7ca3fc3115
Fix response model generation with ParseOptions.resolveResponses=true (#21568)
* set resolveResponses=true

needed by swagger-parser>=2.1.23, see https://github.com/swagger-api/swagger-parser/pull/2127

* update samples

---------

Co-authored-by: James Shaw <james.shaw@masabi.com>
2025-07-19 21:37:11 +08:00
Ilia
f632ab7977
[dart-dio] Fix compile error in enum properties with "default" values (#20495) (#21355)
* [dart-dio] Fix compile error in enum properties with "default" values(#20495)

* Add a test schema with enum properties
2025-07-17 13:11:39 +08:00
William Cheng
0f305a5958
update reactor netty to newer version (#21574) 2025-07-17 13:09:03 +08:00
Rym Bouabid
4372659a0b
Add 'isFormStyle', 'isSpaceDelimited', and 'isPipeDelimited' flags to CodegenParameter (#21240) 2025-07-17 01:53:21 +08:00
Mikko Maunu
d82ca75cc3
Type check of array element only when array is not empty. fix #21276 (#21571) 2025-07-17 01:30:31 +08:00
Mikko Maunu
faf6924f63
Regular comment instead of document comment before package declaration. fix #21496 (#21572) 2025-07-17 01:29:18 +08:00
andreas-umbricht
ad53684e11
Fixed primitive type check for array of array (#21500) 2025-07-16 16:20:31 +08:00
JacobOJ
63c56f00b7
[java][Microprofile] add config options to disable usage of ApiExceptionMapper (#20762)
* [java][Microprofile] add config options to disable usage of ApiExceptionMapper

* Update modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaClientCodegen.java

Co-authored-by: martin-mfg <2026226+martin-mfg@users.noreply.github.com>

---------

Co-authored-by: martin-mfg <2026226+martin-mfg@users.noreply.github.com>
2025-07-16 16:14:23 +08:00
Pascal Bachor
c4a7c14c8f
python: Reinstate lazy imports (#21486)
* python: reinstate lazy imports

* python: Update samples

---------

Co-authored-by: Pascal Bachor <bachorp@users.noreply.github.com>
2025-07-16 15:53:38 +08:00
William Cheng
ee77b7f4f0
update copyright, minor code formatting change (#21569) 2025-07-16 15:48:39 +08:00
Diego Casella
7f2ee8520e
Generators "scala-sttp" and "scala-sttp4" produce valid code when using APIKeyQuery, APIKeyHeader and APIKeyCookie #13474 (#21551)
* fix: using APIKeyQuery and APIKeyHeader generates invalid code (#13474)

* fix: include test

* fix: also fix auth generation for sttp4

* fix: maintain prev whitespaces & update generated APIs
2025-07-16 15:41:01 +08:00
Kraust
8862b960f8
Add cpp-oatpp-server generator (alpha) (#21547)
* Oat++ Server Generator (C++)

* Fixed for support for newest OpenAPI version.

* ALPHA not STABLE.

* Fixed for support for newest OpenAPI version.

* Added github workflow & changed to OA3 Petstore.

* Good catch on adding the Workflow.

* Might help to update the samples.

* Set C++ Standard the CMake way.

* Would be easier if there was a .pc file.

* oatpp.lib.

* Add ws2.

* This probably doesn't work, need to take a time out.
2025-07-16 15:32:28 +08:00
jase
64ab13a790
feat(typescript-angular): add Angular 20 support (#21563)
* feat(typescript-angular): add Angular 20 support

* chore: remove unused .openapi-generator-ignore file
2025-07-15 11:44:12 +02:00
Jonas Reichert
f9098d5a89
[swift] [urlsession] Fixes crash for uploads with content-type "image/" (#21544)
* Fix image upload for content-type image

* update samples

* add test case in spec and update samples

* update bitrise stack so we get xcpretty 0.4.1

* Revert "add test case in spec and update samples"

This reverts commit 92202dd8506b2482cda69fe1d95a61d5a51881e3.
2025-07-15 16:25:34 +08:00
daniel
ca8c6d2f5d
Add Null-check and return if null (#21556) 2025-07-15 16:06:00 +08:00
David Gamero
0995e5935c
[typescript] COPY: Add optional erasable syntax configuration to Typescript generator. (#21560)
* Add optional erasable syntax configuration.

* Changes from generation clean-up.

---------

Co-authored-by: Brendan Burns <5751682+brendandburns@users.noreply.github.com>
2025-07-15 09:25:09 +02:00
Nico Kraetschmer
473343ff94
[Typescript Fetch] Fix missing closing bracket (#21549) 2025-07-14 15:41:50 +02:00
William Cheng
d63459c051
update common langs dep to newer version (#21552) 2025-07-14 17:11:11 +08:00
donilg
7a6be5a3e6
[scala][http4s] fix codegen for using reserved words in openapi (#21518) 2025-07-12 22:18:55 +08:00
Adrian Hjertstedt
65cb95bef0
Revert "[typescript-fetch] to fix incorrect parsing with additional properties (#20923)" (#21542)
This reverts commit 0becb3feb7c346585f7cc85501e75f58aa63e95c.

Co-authored-by: Adrian Hjertstedt <ahjertstedt@ldms.com>
2025-07-10 18:41:29 +02:00
Florian Brombauer
78691cb11c
Followup fix for importFileExtension config for typescript-axios (#21541) 2025-07-10 17:16:23 +02:00
Christopher Gual
81e135e038
[req] Allow models and apis list properties to span multi-lines and i… (#21536)
* [req] Allow models and apis list properties to span multi-lines and include white space (#19628)

* Add comment for DefaultGenerator.getPropertyAsSet

* Fix some variable names in DefaultGeneratorTest.testGenerateMultiLinePropertiesIssue19628

---------

Co-authored-by: Chris Gual <cgual@omnidian.com>
2025-07-10 16:41:05 +08:00
Mattias Sehlstedt
c6b51ff6fc
DefaultCodegenTest use same test engine for all tests (#21532)
* Changes so that the tests use one test engine (junit) rather than switching between two (junit and testng)

* Update outdated samples

* Correct remaining missed assertEquals clauses (expected - actual misplaced)
2025-07-10 16:40:47 +08:00
Lukáš Vasek
117be2ca4c
1385 Generate constants for path in spring boot @RequestMapping (#19782) 2025-07-09 16:26:52 +08:00
William Cheng
1b352c2d00 update samples 2025-07-09 10:45:51 +08:00
Daniel García
991883636f
Fix typo in cli title (#21534) 2025-07-09 10:37:07 +08:00
Leon Linhart
3ef45f1b4d
Discard mapped dmodels with matching explicit discriminator mappings (#20939) 2025-07-08 11:18:13 +08:00
William Cheng
7e439fd0bd
update chi to newer version (#21528) 2025-07-08 11:00:10 +08:00
Mattias Sehlstedt
63df7ca574
Add samples for when using the useSealed setting for Spring (#21515)
* Add samples for when using the useSealed setting for Spring

* Add the new sample generation to the workflow
2025-07-08 10:27:53 +08:00
Daniel García
98b315c137
Qualify rust trait template comments (#21527) 2025-07-08 10:26:22 +08:00
William Cheng
a809c187b4
[JavaSpring] Fix when openapi spec file has array of files (#21524)
* [JavaSpring] Fix when openapi spec file has array of files

The isArray is not checked for non-reactive isFile condition. This is remediated.

* update samples

---------

Co-authored-by: Siddharth Wagle <SidWagz@users.noreply.github.com>
2025-07-07 17:45:22 +08:00
Pascal Bachor
d966f1234d
Bump jmustache 1.15 -> 1.16 (#21352)
* Bump jmustache

* adjust templates to updated jmustache semantics

---------

Co-authored-by: Pascal Bachor <bachorp@users.noreply.github.com>
2025-07-07 16:59:08 +08:00
William Dutton
6fdb632fb9
fix: #21345 Java Native Client, handle Byte[] and File response types correctly (#21346) 2025-07-04 00:34:08 +08:00
William Cheng
c7542dea3e
Add SerpApi to bronze sponsor list (#21517)
* add serapi to bronze sponsor list

* update

* update
2025-07-04 00:29:13 +08:00
William Cheng
66dfad2b09
use dart petstore test spec (#21516) 2025-07-04 00:05:15 +08:00
staticdev
9e5e4b1fd4
fix(python): Change template default license to Unlicense (#21514) 2025-07-03 21:01:29 +08:00
dsteeley
2af194b014
[rust-server] Update to hyper1 in rust-server generator (#21422)
* Add rust-server-deprecated generator in preparation for hyper1 upgrade to rust-server generator

* [Rust Server] Fix spacing in `Cargo.mustache` (#17876)

* [Rust Server] Update dependency versions in `Cargo.mustache` (#17876)

* [Rust Server] Update templates so generated client and server compile (#17876)

* [Rust Server] Get `server` example to compile (#17876)

* [Rust Server] Update `client` example to compile (#17876)

* [Rust Server] Update `bin/cli.rs` to compile (#17876)

* Revert changes to use typed auth in rust-server. Run sample generation.

* Hyper1 fixup compilation errors in all examples

* Add tests to all examples, clippy, tests, cli-bin, run examples
* Use headers Auth structs
* Fixup various clippy lints
* Move more Service impl to use BoxBody
* Reduce generic restriction on some Service impl where possible

* Appease clippy lints in rust 1.88

---------

Co-authored-by: Azriel Hoh <azriel@healthpoint.co.nz>
2025-07-03 01:55:33 +08:00
Samuel Gulliksson
65773a9024
[JavaSpring] Allow configuring generic ResponseEntity for Spring generator. (#21387)
* Allow configuring generic ResponseEntity for Spring generator.

* Re-run documentation update script.
2025-07-02 18:16:57 +08:00
Jochen Schalanda
311233d804
[Java][MicroProfile] Support additionalProperties with Jackson (#21451)
Refs #20853
Refs #20947
2025-07-02 15:52:58 +08:00
Lukáš Černý
b444de2b5c
php-nextgen - Fix flatten() to support arrays of files (#21458)
* php-nextgen - Fix flatten() to support arrays of files in multipart/form-data

Previously, FormDataProcessor::flatten() unconditionally passed all values through ObjectSerializer::toString(),
which caused an error when flattening arrays containing file resources (e.g. for OpenAPI
multipart/form-data definitions with `type: array`, `items: type: string, format: binary`).

This change adds a check for is_resource() to preserve stream handles without serialization,
ensuring correct behavior when uploading multiple files in a single request.

* php-nextgen - Fix flatten() to support arrays of files in multipart/form-data - samples
2025-07-02 15:46:42 +08:00
William Cheng
d0327b2683
add tests for scala http4s server: (#21507) 2025-07-02 15:45:58 +08:00
donilg
af6ab0ed0e
[scala][http4s] fix codegen for using reserved words in openapi (#21490) 2025-07-02 15:29:33 +08:00
Mattias Sehlstedt
050dcae3ab
Move the singleRequestParameter template into a separate file (#21489)
* Move the singleRequestParameter template into a separate file

* Update formatting of non-singleRequestParameter webclient and restclient samples
2025-07-02 15:18:52 +08:00
William Cheng
e948355127 update Dart samples 2025-07-01 20:52:55 +08:00
Matthew Nitschke
7c57c55194
[dart-dio] Fix json_serializable response for type:string format:binary (#21379)
* fixed inconsistencies with the dart-dio json_serializable string binary response types

* update deserialize template to handle responseFile

* regenerate samples

* only convert return_type to Uint8List

* remove unused imports from previous changes

* fixed issues where import wouldn't get included

* specific unit test for binary response

* reverted changes to nested generators

* removed 2 additional php modifications

* regen samples
2025-07-01 20:39:26 +08:00
Bruno Coelho
a5f638fefd
Revert "[kotlin-client] Add support for integer enums in serialization for kotlin-client (#21248)" (#21491)
This reverts commit 0aaeb45dbebaff4b03c2548d0f0ffe48457c54d2.
2025-06-29 18:40:08 +01:00
DavidGrath
0e67c3a5ad
[typescript] Utility types now considered when generating schemas (Issue #21317) (#21414)
* Added failing test to fix Record renaming issue

* Typescript utility types now taken into account when generating. Addresses #21317

* Ran generation script

* Remove print statements

* Removed TS ANTLR. Added Utility Types Sample. Pending Regeneration

* Generated samples for utility types

* Samples fix

* Removed TypeScript utility type samples. Other reviews applied

* Updated samples

* meta-codegen
2025-06-29 13:04:22 +02:00
Daniel Jibouleau
43fa1b736a
Markdown docs : No lowercase on anchors in README file (#21442)
Co-authored-by: Daniel Jibouleau <daniel.jibouleau@aina.ai>
2025-06-29 17:48:46 +08:00
Jorren Hendriks
304b3cbcaa
[Java][Native] Fix POJOs with additionalProperties incorrectly extending HashMap (#21367)
* [Java][Native] Fix POJO with additionalProperties to not extend HashMap

* [Java][Native] Update samples to remove HashMap extension
2025-06-29 17:46:37 +08:00
CG
d7a74849f2
fix: fix Boolean type mismatch for kotlin-spring generator (#21481) 2025-06-29 16:52:32 +08:00
William Cheng
c0dc9c63d0
update swagger parser to newer version (#21484) 2025-06-29 16:11:00 +08:00
Steven Crake
03effd7d05
Replace periods with underscores in Rust model names (#21480)
Fix issue where period-delimited model names (e.g. microsoft.graph.fido2AuthenticationMethod)
were being converted to unwieldy names with "Period" substitutions. Now periods are replaced
with underscores like hyphens, resulting in cleaner and more idiomatic Rust identifiers.

Fixes #15254
2025-06-29 15:52:55 +08:00
Gregory Merlet
d11d008e71
Fix typescript-fetch missing imports for oneof field with discriminator (#21477)
* fix: add support for discriminator in oneOf schemas and update model imports

* chore: generate samples

* fix: enhance model imports for oneOf arrays in mustache templates

* fix: correct import formatting in mustache templates and TypeScript files
2025-06-27 15:26:30 +02:00
Beppe Catanese
b6b71cd4da
[Typescript]: add deprecated tags (#21436)
* Add deprecation markers

* Move inputSpec (avoid sharing with other generators)

* Generate samples

* Refactor unit tests

* Add test helper method

* Revert "Add test helper method"

This reverts commit d3935e87d9b6c33b6ca2e1564e2aaf914b1dd14c.

* Assert number of expected @deprecated
2025-06-27 14:45:47 +02:00
Rory Schadler
6b5fd6e622
fix(python): skip license if not provided (#21471)
* fix: skip license if not provided

* chore: formatting diff for JavaTimeFormatter.java, Pair.java
2025-06-27 00:47:50 +08:00
William Cheng
c010c89915 update samples 2025-06-27 00:39:13 +08:00
DavidGrath
b05604dab7
Restricted Java oneOf imports to Jackson only when needed (#21404) (#21405)
* Fixed issue #21404 - Restricted Java oneOf imports to Jackson when needed

* Fix TODOs
2025-06-26 17:12:37 +08:00
Ron Reynolds
cfe476f32d
immutable Pair, better performant HttpBearerAuth, consistent code-style (#20743)
* make Pair immutable and in google-code-style

* apply google-code-style to JavaTimeFormatter (to make it consistent with most other auto-generated java)

* move upperCaseBearer to ctor (scheme is final and private; only needs to be fixed once); also replaced Optional with ternary (perf and cleaner code)

* apply google-code-style to Authentication to make it consistent with rest of auth code

* fresh samples
2025-06-26 17:10:36 +08:00
Miguel Teixeira
d911a71be9
[BUG][Kotlin] fix: kotlin code generator should sanitize enum values according to convention (#21459)
* fix kotlin code generator should sanitize enum values according to convention

* update samples

* Revert "update samples"

This reverts commit 51a55bcdfe3b58a6d767b3d42a7fa3181e27a9d6.
2025-06-25 16:43:31 +01:00
William Cheng
046be5dba1
Prepare 7.15.0 (#21445)
* Revert "v7.14.0 release (#21443)"

This reverts commit 5eb083e5ce1dd99659fadc03d7c6e809d3077af6.

* prepare v7.15.0 snapshot

* update samples

* update readme

* update doc
2025-06-25 21:34:58 +08:00
William Cheng
5eb083e5ce
v7.14.0 release (#21443) 2025-06-20 16:21:21 +08:00
William Cheng
0903ecf85e
update urllib3 to newer versions in python-fastpi (#21439) 2025-06-19 21:47:05 +08:00
Al Scott
88bc79e906
[Typescript Fetch] Handle date parameters in the URL path (#19313)
* Handle date parameters in the URL path

* Reformat template and add cast for date fields

* Change code structure by moving path tranformations to assignment

Couldn't get handlebars to format the inline replaces in a sane way
without collapsing everything onto one very ugly line. This way keeps
some sane template formatting while still outputting workable code.

* Regenerate samples after merge

* Updated param checking

* Try a new commit after manually re-logging into CircleCI
2025-06-19 11:47:16 +02:00
Steven Blakowski
cef971cf9a
[Java][RestTemplate] Gradle Build include non-compatible Spring Dependency with jakarta disabled (#21426)
* [Java][resttemplate] fix spring-web dependency for gradle without jakarta enabled

* fix samples
2025-06-19 16:11:37 +08:00
Stefan Paul Noack
8d8e3ddf16
fix(typescript-fetch): use type modifier on imports for discriminator.mappedModels (#21397)
* typescript-fetch: use `type` modifier on imports for `discriminator.mappedModels`

This ensures that the generated code works when `--verbatimModuleSyntax` is enabled for the TypeScript compiler.
Regular imports already use the `type` modifier, so this should not be a breaking change.

* update samples
2025-06-18 16:50:20 +02:00
William Cheng
623463a6ed
[Java] Fix content for enum in MultiPart (#21428)
* [Java] Fix content for enum in addPartToMultiPartBuilder ([#19973](https://github.com/OpenAPITools/openapi-generator/issues/19973))

* [Java] Fix content for enum with restclient (#19973)

* [Java] Fix content for enum with restclient (#19973)

* [Java] Fix content for enum with restclient (#19973)

* update samples

---------

Co-authored-by: Michael Bornholdt Nielsen <michaelbornholdtnielsen@gmail.com>
Co-authored-by: Michael Bornholdt Nielsen <jarryDk@users.noreply.github.com>
2025-06-18 16:52:54 +08:00
Youri Westerman
43e878b421
[python] Validate pyproject.toml and fix the pyproject.toml version constraint format (#21402)
* Validate pyproject.toml of echo client python sample

* Use PEP-508 compatible version constraint for `requires-python` key

* Update samples

* Move job to petstore workflow

* Update generated sample

* Use equals or greater than operator instead of greater than

* Update samples
2025-06-18 16:39:37 +08:00
Youri Westerman
50c6754fcc
Fix broken mypy checks (#21423) 2025-06-18 15:51:04 +08:00
David Gamero
d2b8a1eeac
[typescript] add abort signal to requestcontext (#21323)
* add abort signal to requestcontext

* regenerate

* rebuild and regenerate

* abort signal import

* refresh samples

* clean csharp samples

* csharp sample cleanup

* add missing cs samples from master

* abort testing
2025-06-17 10:45:43 +02:00
William Cheng
dbc5d09da6
update python-fastapi requests to newer version (#21421) 2025-06-16 20:42:16 +08:00
Amin Ya
6e9dedba75
[cpp-rest-sdk] fix enum values being used instead of names (#21223)
* [cpp-rest-sdk] fix enum values being used instead of names

* [cpp-rest-sdk] remove unnecessary prefix for enum classes

* [cpprest-sdk]: use _XPLATSTR for string_t on Windows
2025-06-16 17:50:36 +08:00
KatyaValik
fc29daa6c0
Add enums to scala-http4s-server (#21320) 2025-06-16 11:42:02 +08:00
Rens Groothuijsen
db38f0f556
[rust-axum] Prevent multiple declarations of the same operation (#21396)
* [rust-axum] Prevent multiple declarations of the same operation

* [rust-axum] Add missing "delete on exit" to duplicate declaration test
2025-06-16 10:35:03 +08:00
dependabot[bot]
d5ab8f225e
Bump brace-expansion from 1.1.11 to 1.1.12 in /website (#21418)
Bumps [brace-expansion](https://github.com/juliangruber/brace-expansion) from 1.1.11 to 1.1.12.
- [Release notes](https://github.com/juliangruber/brace-expansion/releases)
- [Commits](https://github.com/juliangruber/brace-expansion/compare/1.1.11...v1.1.12)

---
updated-dependencies:
- dependency-name: brace-expansion
  dependency-version: 1.1.12
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-16 10:26:44 +08:00
William Cheng
055687935b
update spring web version in resttemplate (#21417) 2025-06-16 10:20:01 +08:00
William Cheng
6bfd39f5de fix sponsor link in readme 2025-06-16 09:55:56 +08:00
Ilia
7f578d7444
[kotlin] Fix compile error in enum properties with "" values(#18660) (#21416) 2025-06-15 09:04:15 +01:00
oscarobr
8087f2b365
[Java][vertx] fix path param encoding (#21403)
* Issue:21401 Fix Java vertx path param encoding

* Generate samples
2025-06-12 19:29:18 +08:00
Andrei
937d314e19
[jaxrs-spec][quarkus] fix cookie in param (#21400) 2025-06-12 18:29:20 +08:00
Amin Ya
12fa2c0032
[cpp-restsdk] store Object as a shared pointer (#21349)
* [cpp-restsdk] store Object as a shared pointer

* [cpp-restsdk] add test for object property
2025-06-10 14:53:55 +08:00
Mostafa Aghajani
fa64c8e012
Issue: #21334 Abstract PHP support of "original" for variableNamingConvention (#21336)
* feat(php): add support for 'off' variable naming convention in AbstractPhpCodegen

* feat(php-laravel): add tests for issue 21334 with API and model definitions

* feat(php-laravel): update variableNamingConvention option in php-laravel help file to include 'off' as a valid value

* feat: enhance variableNamingConvention options to include 'off' and detailed descriptions in documentation

* feat(php): update variableNamingConvention from 'off' to 'original' in AbstractPhpCodegen

* feat: include php-laravel-issue-21334 in workflow triggers for push and pull_request events
2025-06-09 19:26:53 +08:00
devhl-labs
fbd94d5fbb
removed duplicate service registration (#21395) 2025-06-08 23:09:26 +08:00
Andrew Wilson
4402d836bb
Fix MiskKotlin OpenApiGenerator types (#21390)
* first pass

* fixup up Array -> List

* fixup up Array -> List

* File response type

* don't mess returnTypes.mustache
2025-06-06 20:47:39 +08:00
Nicklas Utgaard
89eea742fe
avoid intersection type (#21378)
avoid intersection type by splitting the statements into separate code-branches. for each branch the type of `value` is therefor no longer an intersection

Fixes https://github.com/OpenAPITools/openapi-generator/issues/20636
2025-06-04 20:48:11 +01:00
William Cheng
eb8ce7331a
update common custom user data maven extensions to 2.x (#21377) 2025-06-04 21:00:33 +08:00
William Cheng
4cfc8eff00
Add tests for enum names with dots in python cilents (#21374)
* add tests for enum names with dot

* remove file

* apply same fix to python pydantic v1

* update test
2025-06-04 16:18:10 +08:00
Ondřej Šimon
9d70de44d6
[JavaSpring][21200] improve Kotlin interopability with optional values (#21202)
nullable annotations are now added to getters, setters, parameters, for optional attributes without default value
2025-06-04 15:47:43 +08:00
Peter Caisse
d88d588665
Replace periods with '_DOT_' in Python enum member names (#21372)
This is relevant for enums whose values are floats since without this
step the enum is syntactically invalid.

See: https://github.com/OpenAPITools/openapi-generator/issues/21322
2025-06-04 15:18:58 +08:00
William Cheng
b57c23b121
update java restemplate dependencies to newer versions (#21368) 2025-06-04 02:28:52 +08:00
William Cheng
b20c569187
update devlocity to newer versions (#21369) 2025-06-03 23:41:45 +08:00
Thomas Sickinger
49cadfec3a
fix(python-fastapi): remove 200 fallback code and use default (#12481) (#21333)
Co-authored-by: Thomas Sickinger <thomas.sickinger@teamviewer.com>
2025-06-03 21:02:24 +08:00
LuukvH
81cdc82af7
fix(ruby-client): fix incorrect Date parsing in OneOf (#21364)
Changes Date.parse to Date.iso8601 to fix incorrect type coercion in OneOf contexts. Previously, arbitrary strings matching Date.parse's lenient pattern (e.g., "ABC1") were incorrectly coerced to dates (2025-06-01), when they should have remained as strings.

For example:
- "ABC1" was parsed as Date(2025-06-01) instead of remaining "ABC1"
- This occurred because Date.parse treats the first char as month ('A'=1)
  and remaining digits as day

The fix ensures only ISO8601 formatted strings (e.g. "2025-06-02") are parsed as dates, improving type safety and preventing unexpected coercion of string values.
2025-06-03 16:57:21 +08:00
martin-mfg
9ebc6308b9
update slack invitation links (#21361) 2025-06-03 15:26:46 +08:00
Mikhail Obidin
fbca2b28d0
[gradle-plugin] Pass openapiGeneratorIgnoreList option from the openApiGenerate extension to the corresponding task (#21363) 2025-06-03 15:26:32 +08:00
William Dutton
b929970db2
fix: #21329 Java Native, Provide Null Check before toString on param variables (#21330)
* fix: #21329 Java Native, Provide Null Check before toString on param variables

* #21329 - Samples Generated
2025-06-02 16:56:22 +08:00
Amin Ya
18ccf86a6a
[cpp-restsdk] link cpprest without crypto libraries (#21348)
These libraries aren't needed in the generated code. Cpprest doesn't need the crypto libraries directly. It uses OpenSSL
2025-06-02 16:55:41 +08:00
Nicklas Wiegandt
5997acb592
feat (JAVA NATIVE): add support for useSingleRequestParameter to java native client (#21331) 2025-06-02 15:36:59 +08:00
William Cheng
bce88c93ba
update swagger pareer to 2.1.28 (#21325) 2025-06-02 15:33:27 +08:00
devhl-labs
a428cff3f4
[csharp][generichost] Updated docs (#21357)
* updated docs

* updated docs

* updated docs
2025-06-01 18:10:08 +08:00
Csaba Kozák
959326048f
[kotlin-client][multiplatform] update Kotlin and libraries versions (#21353) 2025-06-01 18:03:37 +08:00
Alexandre Cassagne
1f8787e53a
fix: update axum generated multipart requests to own the body (#21301)
* fix: update axum generated multipart requests to own the Multipart or Body

Notes: &Multipart cannot access fields, as we need mutable access.

* chore: run the updated rust-axum sample

* chore: run the updated rust-axum sample (2)
Notes: Ran
   ./mvnw clean package || exit
   ./bin/generate-samples.sh
   ./bin/configs/*.yaml || exit
   ./bin/utils/export_docs_generators.sh || exit

* chore: fix inconsistent lifetimes

Notes: Multipart should be owned; normal request remains borrowed

* chore: rerun axum samples
2025-05-31 23:32:03 +08:00
William Cheng
1b57d4b1e6
Better handling of metadata in allOf (#21342)
* better handling of metadata in allof

* update samples
2025-05-30 20:37:53 +08:00
Florian Brombauer
5677f5b09b
Introduce option 'importFileExtension' to typescript-axios (#21343) (#21344) 2025-05-29 13:13:04 +02:00
andreas-umbricht
05e672d856
[Kotlin] Primitive array items validity check (#21315)
* Primitive array items validity check

* Update samples
2025-05-27 23:34:41 +08:00
William Cheng
2c67841e5c
Add option to set container's default to empty container (#21269)
* add default to empty container option

* test map default to empty container

* update java generators to respect default value

* various fixes

* fix tests

* update doc
2025-05-27 16:59:35 +08:00
jase
dcd89bf3c5
feat(typescript-angular): add util "provideApi" and update docs to standalone applications (#21173)
* feat(angular): add util "provideApi" for standalone applications (Angular 17 and above)

* feat(angular): update README with new provideApi usage examples for Angular applications

* feat(angular): update README to reflect new provideApi import path and usage examples

* feat(angular): add support for README_beforeV17 and update provideApi return type

* feat(angular): add support for README_beforeV17 and update provideApi return type

* feat(angular): add support for README_beforeV17 and update provideApi return type

* fix: correct casing in DuplicateTest and FooDuplicateTest headers

* feat(angular): add provideApi function and update README with usage examples
2025-05-26 13:02:34 +02:00
William Cheng
d2196dd727
use poetry 1.x in python aiohttp client (#21328) 2025-05-25 22:43:22 +08:00
Youri Westerman
041d36c954
[python] Fix poetry deprecation warnings (#21268)
* Convert pyproject.toml template to the format expected by Poetry >=2.0
(https://python-poetry.org/blog/announcing-poetry-2.0.0)

* Update samples

* Add option to fallback to Poetry 1.x style pyproject.toml

* Generate new docs and samples

* Place project.urls section a bit further down, so that it doesn't clash with other sections

* Update samples
2025-05-25 21:16:31 +08:00
DavidGrath
c6a88eaf8e
[JAVA] Correct generation of schema default values of type object (issue #21051) (#21278)
* Fix Issue #21051

* Renamed Test to avoid being overriden by JUnit import

* Test fix
2025-05-25 18:34:42 +08:00
Spencer Cornish
c4dad53455
[GO] Go Server: Adds ordered routes to go-server router (#21280)
* Adds ordered routes to go-server router

* Generate and fix test

* Newline

* Readd escaping

* Fixes go router unit test

* Updates tests, one more time
2025-05-25 13:49:15 +08:00
devhl-labs
a891876ea9
fixed token availablity (#21326) 2025-05-25 13:48:49 +08:00
devhl-labs
66ff91a687
bumped dependency versions (#21327) 2025-05-25 13:48:17 +08:00
Youri Westerman
4379a23608
[python] Explicitly define github workflow permissions (#21311)
* Explicitly define github workflow permissions (python)

* Update samples
2025-05-22 10:21:19 +08:00
William Cheng
f735c6e091
add savetwt to sponsor list (#21310) 2025-05-21 11:37:42 +08:00
William Cheng
5ec4e4c8f1
add tests for cpp-restsdk client (#21305) 2025-05-20 16:45:49 +08:00
Michael Vistein (DLR)
cdef985ca7
Fix referenced primitive types (#19456) 2025-05-20 16:41:21 +08:00
martin-mfg
dac1e6b7d3
optimize regex (#21188) 2025-05-20 16:27:19 +08:00
Tassilo Karge
894008f325
[Python] Correct sanitize_for_serialization in python generator for list in oneOf schema elements, fixes #18106 (#19405)
* correct sanitize_for_serialization in python generator, fixes #18106

The method did not consider the objects created for oneOf schemata. If one of the cases was a list, to_dict would return it instead of something that has an items() method.

* generate new samples
2025-05-20 16:26:38 +08:00
William Cheng
5f63385a31
Provide " as member" where needed (#21304)
* fix: #20878 Provide " as member" where needed

- Generate new samples
- Add tests for all effected python versions
- Ran tests with success

Commands used to verify:
./bin/generate-samples.sh ./bin/configs/python*
mvn verify -Psamples
mvn integration-test -f modules/openapi-generator/pom.xml -Dtest=org.openapitools.codegen.python.PythonPydanticV1ClientCodegenTest -e
mvn integration-test -f modules/openapi-generator/pom.xml -Dtest=org.openapitools.codegen.python.PythonClientCodegenTest -e

* remove 3.8 tests

* use localhost

* update tests

* update test

---------

Co-authored-by: Robert Plummer <rplummer@sequel.ae>
2025-05-20 16:25:11 +08:00
sandwoodK
13c95f1dd2
Fix nim compilation in case a edge case of a schema with enum (#20780)
If enum constraint contains one value which is not a valid nim
identifier, we must surround this identifier with backtick.
2025-05-20 15:38:58 +08:00
Andreas Kuhtz
78b54b9283
Fix broken build on Windows OS if the schema contains references to other schema files. (#21300) 2025-05-20 10:06:01 +08:00
CHervaudBetclic
0aaeb45dbe
[kotlin-client] Add support for integer enums in serialization for kotlin-client (#21248) 2025-05-19 08:43:24 +01:00
Guillaume Turri
6e2b4f99ba
[PHP-Symfony] revamp the computation of the contentType (#21292)
recent commit 40894382fc9fe959f3beacd20cfd6421eaf840b0 already improved
that method: before that other commit it was juste impossible to query
a endpoint with a response type that was something else than
application/json or application/xml. With that commit it became possible
to query such endpoint provided that the client declare in its Accept
header that it can cope with */* (or provided that the client omitted
that header altogether).

But there were still cases badly handled. For instance if an endpoint
returns a response of type image/png and that it receives a query with
header "Accept: image/png", then it would reply with 406.

To avoid any other issue with type resolution, this commit revamps the
getOutputFormat function more thoroughly and does it by implementing
the specification available at
https://httpwg.org/specs/rfc9110.html#field.accept ), which means that
the format accepted by the client are ordered by the relative weights
specified it specified.
2025-05-19 10:09:16 +08:00
Rens Groothuijsen
45047b77f1
[python-fastapi] Upgrade dependencies to support Python 3.13 (#21291) 2025-05-18 09:56:24 +08:00
William Cheng
b3935922cd
update snakeyaml version to 2.4 (#21293) 2025-05-17 13:49:09 +08:00
Andrew Wilson
9b39c05563
Kotlin Misk Add Extra Parameters (#21271)
* first pass

* squash

* fixing FILES
2025-05-16 14:37:49 +08:00
Jens Balvig
cfe0b6fae3
Fix spelling mistake in validations (#21287) 2025-05-16 13:55:18 +08:00
Guillaume Turri
6c0e7274ea
[Php-Symfony] showcase recent features in petstore.yaml (#21286)
PR #21261 added support for endpoint with response of type text/plain
or even image/png.

This commit adds such endpoint so that:
- the way those are supported is clearer (as it is now directly visible
  in the generated sample files)
- if a future commit impacts this part of the generation it will be easier
  to assess that impact
2025-05-16 10:32:52 +08:00
Peter Storch
5b885cd3db
[kotlin-spring] fix validation regression in kotlin-spring generator (#21255)
* fix #21238 regression in kotlin-spring generator

* add tests for issue #21238
2025-05-16 00:08:51 +08:00
Ondřej Šimon
68c1d8970e
[20808] add Autowired annotations guard to skip generation (#21198)
annotation import and usage is not generated when API is not a Spring Bean
2025-05-15 18:51:25 +08:00
Sohaib Athar
bd8a206ebd
fix(cpp-qt-client): add asJsonObject method to OAIEnum class (#19307) (#21211)
* add asJsonObject method to OAIEnum class to fix enum handling in query parameters

* update samples

---------

Co-authored-by: William Cheng <wing328hk@gmail.com>
2025-05-15 14:00:55 +08:00
William Cheng
0bfce24071
Add model name mapping option to rust generators (#21282)
* add model name mapping option to rust generators

* update package name

* update samples
2025-05-15 13:29:37 +08:00
Guillaume Turri
40894382fc
[php-symfony] fix handling of endpoints with "text/plain" or "image/png" response type (#21261)
* [php-symfony] Never return 406 when user accepts */*

When a query has header "Accept" set to "*/*" it means it accepts
everything. It is hence weird to return a 406.
This patch ensures it does not occur: when the query accepts everything
then we take any produced type.

This fixes #13334. This also partly makes the open PR #15560 obsolete
(or at least, it provides a workaround)

* [php-symfony] Don't crash at runtime on null convertFormat

$this->convertFormat may return "null". When it's the case we end up
calling

    ...->serialize($data, null);

but this crashes at runtime because that serialize method declares that
the 2nd parameter is of type "string" (so null is not accepted).

With this patch we avoid having an error 500. Instead we return something
that makes perfect sense when the OpenApi specification declares a content
of type "text/plain" and that the returned value is for instance a string,
an int, or a boolean.

* [php Symfony] fix return type for non json/xml api

This fixes the generated returned type of controller methods for
endpoint with a response declared like

    content:
      text/plain:
        schema:
          type: <boolean|string|integer|number>

or for

    content:
      image/png:
        schema:
          type: string
          format: binary

Without this commit the generated method *had to* return a value that
matched "array|object|null", which does not work in this case.
This commit makes it possible to return the proper type.
2025-05-14 21:11:39 +08:00
Amin Ya
429da9860b
[rust] support model/maps as deep/explode params (#21262)
* [rust] support model/maps as deep/explode params

* [rust] add tests for rust deep objects

* [rust] detect normal non deep objects

* [rust] distinguish model and object

* [rust] fix objects as params for hyper
2025-05-14 14:44:05 +08:00
jglagrimas
a0b9ecd773
[php-laravel generator] update $request->bool to $request->boolean (#21273)
* Chores : update $request->bool to $request->boolean

$request->bool is not a laravel function should be $request->boolean()

* Chores : update FakeController.php $request->boolean()
2025-05-14 14:37:16 +08:00
William Cheng
2fb26c362e update kotlin samples 2025-05-11 23:43:24 +08:00
Ross Sullivan
9981a408d1
[kotlin] Added path sanitization in javadoc comments (#20767)
* [kotlin] Added path sanitization in javadoc comments

* added sample as regression test

* Added samples/client/others/kotlin-jvm-okhttp-path-comments to github workflow
2025-05-11 23:23:50 +08:00
Mostafa Aghajani
91630b8591
feat: add default values support to Avro schema generator with related test cases (#21226) 2025-05-11 22:48:53 +08:00
Alex B
57bf6925bb
[Java] Make Java ApiClient extendable (#21251)
* Make all Java ApiClients in templates extendable

* Make all Java ApiClients in samples extendable

* Fix compilation of enum constructor

* Fix compilation of enum constructor in templates
2025-05-11 22:47:40 +08:00
Jonas Renggli
be17698320
[php-flight] fix: remove trailing spaces (#21254)
According to the Guidelines for Contributing
(https://github.com/OpenAPITools/openapi-generator/blob/master/CONTRIBUTING.md)
generated PHP code should conform to PSR-12
(https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-12-extended-coding-style-guide.md).

There are some minor violations regarding the following rule

> There MUST NOT be trailing whitespace at the end of lines.

This change removes trailing spaces in generated code.
2025-05-11 22:32:27 +08:00
DavidGrath
2fd1ee66cc
Added ANTLR. Fix Issue #20960 (#21230)
* Added ANTLR. Started work on issue 20960

* Ran generation scripts

* Excluded ANTLR generated files from JavaDoc generation

* Whitespace fix
2025-05-11 22:31:54 +08:00
Jonas Renggli
6344bfa779
[php-flight] fix: use static PHPUnit assertions (#21253)
Static analysis tools such as PHPStan report errors when dynamic calls are used
for static methods.

```
ERROR Dynamic call to static method PHPUnit\Framework\Assert::assertEquals().
```

According to the source code of PHPUnit
(https://github.com/sebastianbergmann/phpunit/blob/9.5.0/src/Framework/Assert.php)
the function is indeed static.

```php
public static function assertTrue($condition, string $message = ''): void
```

This change updates to PHP Flight test template `register_routes_test.mustache`
to use static calls for PHPUnit assertions.
2025-05-11 22:22:34 +08:00
Amin Ya
66e8c932c3
[cpp-rest-sdk] support serializing model base as parameters (#21235)
* [cpp-rest-sdk] support serializing models as parameters

This fixes the code generation for the cases where the model is referenced as a parameter

* [cpprest-sdk] avoid newlines when no model import
2025-05-11 21:52:09 +08:00
Billy Booth
d6c4634269
[csharp] Add missing ConfigureAwait(false) for csharp generator (#21244)
* [csharp] ApiClient.mustache: Apply ConfigureAwait(false) consistently

* [csharp] Update samples to include 59936f29f00
2025-05-09 12:02:38 +08:00
Eric Rolli
bb811db2a2
[JavaJaxRs] generate getValue() for enums with the correct type (#21183)
* [JavaJaxRs] enumClass.mustache added getValue()

JavaJaxRs enums are missing getValue() method returning the correct data type.

* Update InlineObject2.java added getValue() for enums

* Update Pet.java added getValue() to enum

* Update BigCat.java added getValue for enum

* Update EnumArrays.java added getValue() to enum

* Update EnumArrays.java added getValue() to enum

* Update EnumTest.java added getValue() to enums

* Update MapTest.java added getValue() to enum

* Update Order.java added getValue() to enum

* Update Pet.java added getValue() to enum

* Update EnumArrays.java added getValue() to enums

* Update EnumTest.java added getValue() to enums

* Update MapTest.java added getValue() to enum

* Update Order.java added getValue() to enum

* Update ParentWithNullable.java added getValue() to enum

* Update BigCat.java added getValue() to enum

* Update EnumArrays.java added getValue() to enums

* Update EnumTest.java added getValue() to enums

* Update MapTest.java added getValue() to enum

* Update Order.java added getValue() to enum

* Update Pet.java added getValue() to enum

* Update BigCat.java added getValue() to enum

* Update EnumArrays.java added getValue() to enums

* Update EnumTest.java added getValue() to enums

* Update MapTest.java added getValue() to enum

* Update Order.java added getValue() to enum

* Update Pet.java added getValue to enum

* Update EnumArrays.java added getValue() to enum

* Update EnumTest.java added getValue() to enums

* Update MapTest.java added getValue() to enum

* Update Order.java added getValue() to enum

* Update ParentWithNullable.java added getValue() to enum

* Update Pet.java added getValue() to enum

* Update EnumTest.java getValue() with Integer

* Update EnumTest.java
2025-05-09 11:15:20 +08:00
martin-mfg
b55ae3caa8
update documentation about lambdas (#21241) 2025-05-09 11:00:53 +08:00
ksn-partisia
ecd5d253a8
[Bug] [Java] Fix java compilation warnings in RFC3339JavaTimeModule and RFC3339InstantDeserializer (#21243)
* Fix java compilation warnings in RFC3339JavaTimeModule and RFC3339InstantDeserializer

* Regen missing samples
2025-05-09 11:00:07 +08:00
Philip Thomas Casado
4cffd32f87
[Feat][Typescript Angular] Implement deepObject query params (OAS3.0) (#21108)
* feature: implement deepObject query params as per documentation.
Closes OpenAPITools/openapi-generator#19342.

* chore: regenerate samples.

* chore: symplify code (via @joscha)

* chore: regenerate samples

* test: add integration test for typescript-angular deepObject query params

* fix: typo in the integration tests path

* chore: use node v18 for integration tests

* chore: make ES6 compliant

* chore: make test name semantically accurate

* chore: regenerate samples

* test: add angular v16 deep-object test

* chore: delete previous bespoke test for deep objects (uses test introduced in 71629f8d9a instead)

* chore: restore missing OAS for deep object API tests

* test: move angular deepObject tests to v19 and delete v16 ones

* test: atomic deepObject test on service rather than integration with app component

* chore: clean up superfluous import
2025-05-07 16:40:02 +02:00
Juanpe Araque
f2813716fb
[Python] Add __all__ variable in the package __init__.py file for Python APIs (#21185)
* Add __all__ to the package __init__.py file for Python APIs

* Remove empty line before closing bracket

* Add missing samples
2025-05-07 15:59:49 +08:00
Amin Ya
3048fb02e1
[cpp-rest-sdk] remove U macro definition from public headers (#21221)
Cpprest has a public U macro definition that causes build errors in libraries as U is a common name for template parameters. This PR fixes the issue by turning it off.

[microsoft/cpprestsdk@411a109/Release/include/cpprest/details/basic_types.h#L87](411a109150/Release/include/cpprest/details/basic_types.h (L87))

Related to https://github.com/microsoft/cpprestsdk/issues/1805 and https://github.com/fmtlib/fmt/issues/4180
2025-05-07 15:08:38 +08:00
martin-mfg
5117616b53
CodegenOperation & CodegenProperty: turn fields into getters (#21225)
* turn fields into getters

* update samples
2025-05-07 15:04:04 +08:00
William Cheng
5e5a053bfa
update PR tempalte, issue template, link to validator (#21232) 2025-05-07 14:39:37 +08:00
Amin Ya
f5b8fd6f5e
[cpp-rest-sdk] fix finding of the crypto libraries (#21219)
* [cpp-rest-sdk] fix finding of the crypto libraries

This fixes finding of the crypto for cpprest sdk via find_library. It also bumps the minimum CMake version to 3.10 to avoid deprecation warnings

* docs: add myself as a technical committee member
2025-05-07 14:30:18 +08:00
Amin Ya
4b2abdf48d
fix: fix dev container failing to build (#21218)
The dev container fails to build because of the outdated docker-in-docker feature. This updates the docker-in-docker and fixes the build. I also updated the docker compose references in the docs.
2025-05-05 15:34:02 +08:00
William Cheng
2010c2a60a
Add workflow to test Elixir clients (#21214)
* add elixir workflow

* update

* fix

* add elixir workflow (#21215)

* update tests to use built-in json module instead of jason

* update base_url

* temporarily disable type-casting for dates

* retry failing tests

* update spec to use localhost

* add petsore local server to workflow

---------

Co-authored-by: Enrique Fernández <enrique@bluelabs.eu>
2025-05-05 15:32:05 +08:00
devhl-labs
41012588dd
ignore date length validation (#21217) 2025-05-05 15:06:22 +08:00
martin-mfg
e22d079bb0
ensure correct value for hasParams (#21209)
* turn hasParams into getter

* restore hasRequiredParams
2025-05-05 00:49:01 +08:00
Enrique Fernández
d38898a4d0
fix: delete unused file (#21213) 2025-05-04 23:39:17 +08:00
Ross Sullivan
652d4ed95c
Remove duplicate oneOf schemas during pre-processing (#21174)
* fix: Remove duplicate oneOf schemas during pre-processing

* chore: Updated samples

* fix: Fixed regression with oneOf+discriminator

* fix: Fixed possible null pointer during schema preprocessing

* refactor: Moved oneOf deduplication to OpenAPINormalizer
2025-05-04 23:30:42 +08:00
Devon
104ceb9c16
Java: Optimize HashSet Initialization (#21205)
* Optimize HashSet Initialization

Noticed this while debugging - we can avoid wasting memory/cpu creating 16 buckets when we only need one or a few.

* generate samples

* use Arrays.asList
2025-05-04 22:56:33 +08:00
Enrique Fernández
0389a99cec
simplify connection module (#21158) 2025-05-04 22:51:35 +08:00
devhl-labs
f3af25b10c
fixed encoding (#21207) 2025-05-04 22:30:40 +08:00
devhl-labs
56fe7e3286
[csharp] Fixed duplicate property names (#21206)
* fixed duplicate property names

* discard samples

* discard samples

* added new sample
2025-05-04 22:29:12 +08:00
Enrique Fernández
ac77339fcd
[chore][elixir] update dependencies (#21210)
* chore: bump tesla version

* chore: bump ex_doc version

* chore: bump dialyxir version
2025-05-04 22:27:26 +08:00
Jaime Sánchez
3c664d1a59
[java] [spring] Fix multipart optional params error compilation using delegates (#20793)
* fix spring multipart optional parameters

* use optional only in not required params

* remove debug line

---------

Co-authored-by: Jaime Sanchez <jaime.sanchezf@externos.santalucia.es>
Co-authored-by: William Cheng <wing328hk@gmail.com>
2025-04-30 14:28:38 +08:00
Andrew Wilson
76540e591f
Improve Kotlin Misk OpenApi Generator (#21165)
* first pass

* fixing types

* fixing action

* updating samples

* updating files

* adding guido

* fixing misk

* removing old files

* cleaning generated files

* cleaning generated files

* adding back in license

* first pass

* second pass

* third pass

* typo

* fixup

* fixup 2

* fixup 3

* fixup 4

* fixup 5

* fixup 6

* fixing api override

* fixing docs

* fixing docs json

* fix misk version

* add action prefix

* fixup

* fixup 2

* fixup 3

* fixup 4

* fixup 5
2025-04-30 01:53:32 +08:00
kenji yoshida
56eb8f7bc9
update akka-http and pekko-http server generator and example (#21166) 2025-04-30 01:46:49 +08:00
Akihito Nakano
3bac186b2f
Fix the layout issue in the donation message (#21184)
The emoji might not render correctly for Windows users.
2025-04-30 01:45:41 +08:00
William Cheng
d04c0ddbb4
minor fix to javadoc (#21177) 2025-04-29 15:58:16 +08:00
RickyMa
afa135f93d
[cpprestsdk] Support passing enum request parameters (#20836)
* [cpprestsdk] Support passing enum request parameters

* Add a fake endpoint to test enum request parameters

* Add auto-generated sample codes

* Update to date with master branch

---------

Co-authored-by: leslizhang <453688819@qq.com>
2025-04-29 15:54:07 +08:00
Simon Podlipsky
2327562af4
fix(php-nextgen): do not call static methods dynamically (#21163) 2025-04-29 15:29:52 +08:00
martin-mfg
daeffde719
fix vertxFuture setting (#21176) 2025-04-29 15:07:30 +08:00
martin-mfg
9a289e9713
adjust jersey2/jersey3 templates (#21171)
* respect useJakartaEE in jersey3

* useJakarteEE=true in jersey3 samples

* don't force jakarta package for jersey3

* adjust whitespace between jersey2 and jersey3

* enforce useJakartaEe for jersey3, warn on misuse for jersey 2

* set useJakartaEe for jersey3, generate samples
2025-04-29 15:01:43 +08:00
martin-mfg
3fadfe3889
fix documentation versions (#21175) 2025-04-29 15:01:16 +08:00
Oliver Fast
65c312653a
fix(typescript-fetch): Use null as a value when the date value is nullable (#21133)
* fix use null when available for dates

* generated typescript-fetch-default-v3.0 sample

* ran all typescript examples
2025-04-28 10:59:48 +02:00
William Cheng
29b6b771d7
add unified.to to bronze sponsor list (#21160) 2025-04-27 23:58:17 +08:00
William Cheng
9eefc09487 update readme 2025-04-27 22:07:23 +08:00
William Cheng
dbf720c093
Prepare 7.14.0 release (#21159)
* Revert "v7.13.0 release (#21157)"

This reverts commit 4b805ff6b7ac5bd2557555810357569fe2677311.

* prepare v7.14.0 release

* update samples
2025-04-27 22:04:03 +08:00
14644 changed files with 412590 additions and 120113 deletions

View File

@ -11,10 +11,9 @@
},
"ghcr.io/devcontainers/features/rust:1": {},
"ghcr.io/snebjorn/devcontainer-feature/chromium:latest": {},
"docker-in-docker": {
"ghcr.io/devcontainers/features/docker-in-docker:2": {
"version": "latest",
"moby": true,
"dockerDashComposeVersion": "v1"
"moby": true
}
},
// Configure tool-specific properties.

4
.github/CODEOWNERS vendored
View File

@ -28,3 +28,7 @@ modules/openapi-generator/src/main/resources/cpp-qt-client/**/* @martindelille
samples/client/petstore/cpp-qt/**/* @martindelille
modules/openapi-generator/src/main/resources/cpp-qt-client/**/* @muttleyxd
samples/client/petstore/cpp-qt/**/* @muttleyxd
# cpp-rest-client technical committee
modules/openapi-generator/src/main/resources/cpp-rest-client/**/* @aminya
samples/client/petstore/cpp-restsdk/**/* @aminya

View File

@ -10,7 +10,7 @@ assignees: ''
#### Bug Report Checklist
- [ ] Have you provided a full/minimal spec to reproduce the issue?
- [ ] Have you validated the input using an OpenAPI validator ([example](https://apitools.dev/swagger-parser/online/))?
- [ ] Have you validated the input using an OpenAPI validator?
- [ ] Have you [tested with the latest master](https://github.com/OpenAPITools/openapi-generator/wiki/FAQ#how-to-test-with-the-latest-master-of-openapi-generator) to confirm the issue still exists?
- [ ] Have you searched for related issues/PRs?
- [ ] What's the actual output vs expected output?

View File

@ -11,11 +11,12 @@
./bin/generate-samples.sh ./bin/configs/*.yaml || exit
./bin/utils/export_docs_generators.sh || exit
```
(For Windows users, please run the script in [Git BASH](https://gitforwindows.org/))
(For Windows users, please run the script in [WSL](https://learn.microsoft.com/en-us/windows/wsl/install))
Commit all changed files.
This is important, as CI jobs will verify _all_ generator outputs of your HEAD commit as it would merge with master.
These must match the expectations made by your contribution.
You may regenerate an individual generator by passing the relevant config(s) as an argument to the script, for example `./bin/generate-samples.sh bin/configs/java*`.
IMPORTANT: Do **NOT** purge/delete any folders/files (e.g. tests) when regenerating the samples as manually written tests may be removed.
- [ ] File the PR against the [correct branch](https://github.com/OpenAPITools/openapi-generator/wiki/Git-Branches): `master` (upcoming `7.x.0` minor release - breaking changes with fallbacks), `8.0.x` (breaking changes without fallbacks)
- [ ] If your PR solves a reported issue, reference it using [GitHub's linking syntax](https://docs.github.com/en/issues/tracking-your-work-with-issues/using-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword) (e.g., having `"fixes #123"` present in the PR description)
- [ ] If your PR is targeting a particular programming language, @mention the [technical committee](https://github.com/openapitools/openapi-generator/#62---openapi-generator-technical-committee) members, so they are more likely to review the pull request.

74
.github/workflows/docker-release.yml vendored Normal file
View File

@ -0,0 +1,74 @@
name: Release to DockerHub (snapshot, stable)
on:
push:
tags:
- 'v*' # Triggers on any tag starting with 'v' (e.g., v1.0, v2.1.3)
branches:
- master
jobs:
docker:
name: Publish images
runs-on: ubuntu-latest
steps:
# build the JARs
- uses: actions/checkout@v5
with:
fetch-depth: 0
- name: Set up JDK 11
uses: actions/setup-java@v5
with:
java-version: 11
distribution: 'zulu'
- name: Cache Maven packages
uses: actions/cache@v4
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: Build
run: ./mvnw clean install -DskipTests=true
# docker workflow
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Setup variables
run: |
# set as GitHub ENV variables
echo "cli_version=$(\./mvnw -o org.apache.maven.plugins:maven-help-plugin:2.1.1:evaluate -Dexpression=project.version | grep -v '\[')" >> $GITHUB_ENV
echo "build_date=$(date -u +"%Y-%m-%dT%H:%M:%SZ")" >> $GITHUB_ENV
echo "DOCKER_GENERATOR_IMAGE_NAME=openapitools/openapi-generator-online" >> $GITHUB_ENV
echo "DOCKER_CODEGEN_CLI_IMAGE_NAME=openapitools/openapi-generator-cli" >> $GITHUB_ENV
# online images
- name: Publish openapi-generator-online snapshot version
if: github.ref_type != 'tag' # not tag (release)
run: |
docker buildx create --use
docker buildx build --push --platform linux/amd64,linux/arm64 --label=org.opencontainers.image.created=${{ env.build_date }} --label=org.opencontainers.image.title=openapi-generator-online --label=org.opencontainers.image.revision=$GITHUB_SHA --label=org.opencontainers.image.version=${{ env.cli_version }} -t ${{ env.DOCKER_GENERATOR_IMAGE_NAME }} ./modules/openapi-generator-online
- name: Publish openapi-generator-online stable version
if: github.ref_type == 'tag' # tagged (release)
run: |
docker buildx create --use
docker buildx build --push --platform linux/amd64,linux/arm64 --label=org.opencontainers.image.created=${{ env.build_date }} --label=org.opencontainers.image.title=openapi-generator-online --label=org.opencontainers.image.revision=$GITHUB_SHA --label=org.opencontainers.image.version=${{ env.cli_version }} -t ${{ env.DOCKER_GENERATOR_IMAGE_NAME }}:latest -t ${{ env.DOCKER_GENERATOR_IMAGE_NAME }}:${{ github.ref_name }} -t ${{ env.DOCKER_GENERATOR_IMAGE_NAME }} -t ${{ env.DOCKER_GENERATOR_IMAGE_NAME }}:latest-release ./modules/openapi-generator-online
# cli images
- name: Publish openapi-generator-cli snapshot version
if: github.ref_type != 'tag' # not tag (release)
run: |
cp docker-entrypoint.sh ./modules/openapi-generator-cli
docker buildx create --use
docker buildx build --push --platform linux/amd64,linux/arm64 --label=org.opencontainers.image.created=${{ env.build_date }} --label=org.opencontainers.image.title=openapi-generator-cli --label=org.opencontainers.image.revision=$GITHUB_SHA --label=org.opencontainers.image.version=${{ env.cli_version }} -t ${{ env.DOCKER_CODEGEN_CLI_IMAGE_NAME }} ./modules/openapi-generator-cli
- name: Publish openapi-generator-cli stable version
if: github.ref_type == 'tag' # tagged (release)
run: |
cp docker-entrypoint.sh ./modules/openapi-generator-cli
docker buildx create --use
docker buildx build --push --platform linux/amd64,linux/arm64 --label=org.opencontainers.image.created=${{ env.build_date }} --label=org.opencontainers.image.title=openapi-generator-cli --label=org.opencontainers.image.revision=$GITHUB_SHA --label=org.opencontainers.image.version=${{ env.cli_version }} -t ${{ env.DOCKER_CODEGEN_CLI_IMAGE_NAME }}:latest -t ${{ env.DOCKER_CODEGEN_CLI_IMAGE_NAME }}:${{ github.ref_name }} -t ${{ env.DOCKER_CODEGEN_CLI_IMAGE_NAME }} -t ${{ env.DOCKER_CODEGEN_CLI_IMAGE_NAME }}:latest-release ./modules/openapi-generator-cli

View File

@ -26,7 +26,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
uses: actions/checkout@v5
- name: Test run-in-docker.sh
shell: bash

View File

@ -13,9 +13,9 @@ jobs:
name: Gradle plugin tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- name: Set up JDK 11
uses: actions/setup-java@v4
uses: actions/setup-java@v5
with:
java-version: 11
distribution: 'temurin'
@ -34,12 +34,22 @@ jobs:
restore-keys: |
${{ runner.os }}-test-gradle-plugin-${{ env.cache-name }}-
${{ runner.os }}-test-gradle-plugin-
- name: Run tests
- name: mvn clean install
run: |
./mvnw clean --no-snapshot-updates --batch-mode --quiet install -DskipTests -Dorg.slf4j.simpleLogger.defaultLogLevel=error
- name: Run tests with wrapper
env:
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
run: |
./mvnw clean --no-snapshot-updates --batch-mode --quiet install -DskipTests -Dorg.slf4j.simpleLogger.defaultLogLevel=error
(cd modules/openapi-generator-gradle-plugin/samples/local-spec && ./gradlew buildGoSdk) # using gradle-6.8.3 via wrapper
(cd modules/openapi-generator-gradle-plugin/samples/local-spec && ./gradlew openApiGenerate)
(cd modules/openapi-generator-gradle-plugin/samples/local-spec && ./gradlew buildDotnetSdk)
- name: Setup Gradle
uses: gradle/gradle-build-action@v3
with:
gradle-version: '8.14.3'
- name: Run tests without wrapper
env:
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
run: |
(cd modules/openapi-generator-gradle-plugin/samples/local-spec && gradle buildJavaResttemplateSdk) # not using gradle wrapper

View File

@ -32,8 +32,8 @@ jobs:
- samples/client/petstore/java/native
- samples/client/petstore/java/native-jakarta
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
- uses: actions/checkout@v5
- uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: 11

View File

@ -20,10 +20,10 @@ jobs:
os: [ubuntu-latest]
steps:
- name: Check out code
uses: actions/checkout@v4
uses: actions/checkout@v5
- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v4
uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: ${{ matrix.java }}
@ -44,6 +44,10 @@ jobs:
restore-keys: |
${{ runner.os }}-gradle-
- uses: gradle/actions/setup-gradle@v4
with:
gradle-version: '8.14.3'
- name: Setup Maven
uses: s4u/setup-maven-action@v1.18.0
with:
@ -65,7 +69,7 @@ jobs:
- name: Test Gradle plugin usage
shell: bash
run: gradle -b modules/openapi-generator-gradle-plugin/samples/local-spec/build.gradle buildGoSdk --stacktrace
run: gradle --project-dir modules/openapi-generator-gradle-plugin/samples/local-spec buildGoSdk --stacktrace
- name: Test Maven plugin integration
if: matrix.java == '11'
@ -85,14 +89,14 @@ jobs:
os: [ubuntu-latest]
steps:
- name: Check out code
uses: actions/checkout@v4
uses: actions/checkout@v5
- name: Setup Maven
uses: s4u/setup-maven-action@v1.18.0
with:
java-version: 11
maven-version: 3.8.8
- name: Download build artifact
uses: actions/download-artifact@v4
uses: actions/download-artifact@v5
with:
name: artifact
- name: Run Ensures Script

View File

@ -13,9 +13,9 @@ jobs:
name: Maven plugin tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- name: Set up JDK 11
uses: actions/setup-java@v4
uses: actions/setup-java@v5
with:
java-version: 11
distribution: 'temurin'

61
.github/workflows/maven-release.yml vendored Normal file
View File

@ -0,0 +1,61 @@
name: Release to Maven Central (snapshot, stable)
on:
push:
branches:
- master
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 0
- name: Set up JDK 11
uses: actions/setup-java@v5
with:
java-version: 11
distribution: 'zulu'
- name: Cache Maven packages
uses: actions/cache@v4
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: Build
run: ./mvnw clean install -DskipTests=true
#run: ./mvnw clean install
publish:
runs-on: ubuntu-latest
name: Publish to Maven Central
needs: build
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 0
- id: install-secret-key
name: Install gpg secret key
run: |
cat <(echo -e "${{ secrets.GPG_PRIVATE_KEY }}") | gpg --batch --import
gpg --list-secret-keys --keyid-format LONG
- name: Set up Maven Central Repository
uses: actions/setup-java@v5
with:
java-version: 11
distribution: 'zulu'
server-id: central
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
- name: Publish package
run: ./mvnw -DskipTests=true --batch-mode -P release -Dgpg.passphrase=${{ secrets.GPG_PASSPHRASE }} deploy
env:
MAVEN_USERNAME: ${{ secrets.OSS_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSS_PASSWORD }}

View File

@ -15,7 +15,7 @@ jobs:
name: Misc tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- uses: ruby/setup-ruby@v1
with:
ruby-version: '2.6'

View File

@ -15,9 +15,9 @@ jobs:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- name: Set up JDK 11
uses: actions/setup-java@v4
uses: actions/setup-java@v5
with:
java-version: 11
distribution: 'temurin'
@ -53,9 +53,9 @@ jobs:
needs:
- build
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- name: Set up JDK 11
uses: actions/setup-java@v4
uses: actions/setup-java@v5
with:
java-version: 11
distribution: 'temurin'
@ -90,14 +90,14 @@ jobs:
needs:
- build
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- name: Set up JDK 11
uses: actions/setup-java@v4
uses: actions/setup-java@v5
with:
java-version: 11
distribution: 'temurin'
- name: Download openapi-generator-cli.jar artifact
uses: actions/download-artifact@v4
uses: actions/download-artifact@v5
with:
name: openapi-generator-cli.jar
path: modules/openapi-generator-cli/target
@ -129,49 +129,32 @@ jobs:
- build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- name: Set up JDK 11
uses: actions/setup-java@v4
uses: actions/setup-java@v5
with:
java-version: 11
distribution: 'temurin'
- name: Download openapi-generator-cli.jar artifact
uses: actions/download-artifact@v4
uses: actions/download-artifact@v5
with:
name: openapi-generator-cli.jar
path: modules/openapi-generator-cli/target
- name: Delete samples that are entirely generated
run: |
rm -rf samples/client/petstore/csharp/generichost/latest/HelloWorld
rm -rf samples/client/petstore/csharp/generichost/latest/Tags
rm -rf samples/client/petstore/csharp/generichost/net8/AllOf
rm -rf samples/client/petstore/csharp/generichost/net8/AnyOf
rm -rf samples/client/petstore/csharp/generichost/net8/AnyOfNoCompare
rm -rf samples/client/petstore/csharp/generichost/net8/FormModels
rm -rf samples/client/petstore/csharp/generichost/net8/NullReferenceTypes
rm -rf samples/client/petstore/csharp/generichost/net8/OneOf
rm -rf samples/client/petstore/csharp/generichost/net8/Petstore
rm -rf samples/client/petstore/csharp/generichost/net8/SourceGeneration
rm -rf samples/client/petstore/csharp/generichost/net8/UseDateTimeForDate
rm -rf samples/client/petstore/csharp/generichost/standard2.0/Petstore
rm -rf samples/client/petstore/csharp/generichost/net4.8/AllOf
rm -rf samples/client/petstore/csharp/generichost/net4.8/AnyOf
rm -rf samples/client/petstore/csharp/generichost/net4.8/AnyOfNoCompare
rm -rf samples/client/petstore/csharp/generichost/net4.8/FormModels
rm -rf samples/client/petstore/csharp/generichost/net4.8/OneOf
rm -rf samples/client/petstore/csharp/generichost/net4.8/Petstore
rm -rf samples/client/petstore/csharp/generichost/net4.8/UseDateTimeForDate
rm -rf samples/client/petstore/csharp/generichost/net4.7/AllOf
rm -rf samples/client/petstore/csharp/generichost/net4.7/AnyOf
rm -rf samples/client/petstore/csharp/generichost/net4.7/AnyOfNoCompare
rm -rf samples/client/petstore/csharp/generichost/net4.7/FormModels
rm -rf samples/client/petstore/csharp/generichost/net4.7/OneOf
rm -rf samples/client/petstore/csharp/generichost/net4.7/Petstore
rm -rf samples/client/petstore/csharp/generichost/net4.7/UseDateTimeForDate
# List all directories in generichost, filter out Manual directories, and remove the rest
cd samples/client/petstore/csharp/generichost
for version_dir in */ ; do
if [ -d "$version_dir" ]; then
cd "$version_dir"
for dir in */ ; do
if [ -d "$dir" ] && [[ ! "$dir" =~ Manual ]]; then
rm -rf "$dir"
fi
done
cd ..
fi
done
- name: Generate samples
run: |
bash bin/generate-samples.sh

View File

@ -25,8 +25,8 @@ jobs:
- samples/server/petstore/aspnet/fastendpoints-useResponseCaching
- samples/server/petstore/aspnet/fastendpoints-useValidators
steps:
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4.3.1
- uses: actions/checkout@v5
- uses: actions/setup-dotnet@v5.0.0
with:
dotnet-version: '8.0.x'
- name: Build

View File

@ -25,7 +25,7 @@ jobs:
- 'samples/client/others/c/bearerAuth/'
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- name: Prepare
run: |
sudo apt-get update

View File

@ -0,0 +1,30 @@
name: Samples cpp oat++ client
on:
push:
branches:
- "samples/client/petstore/cpp-oatpp/**"
pull_request:
paths:
- "samples/client/petstore/cpp-oatpp/**"
env:
GRADLE_VERSION: 6.9
jobs:
build:
name: Build cpp oat++ client
strategy:
matrix:
sample:
- samples/client/petstore/cpp-oatpp
os:
- ubuntu-latest
- macOS-latest
- windows-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v5
- name: Build
working-directory: ${{ matrix.sample }}
run: cmake -B build && cmake --build build --verbose

View File

@ -0,0 +1,30 @@
name: Samples cpp oat++ server
on:
push:
branches:
- "samples/server/petstore/cpp-oatpp/**"
pull_request:
paths:
- "samples/server/petstore/cpp-oatpp/**"
env:
GRADLE_VERSION: 6.9
jobs:
build:
name: Build cpp oat++ server
strategy:
matrix:
sample:
- samples/server/petstore/cpp-oatpp
os:
- ubuntu-latest
- macOS-latest
- windows-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v5
- name: Build
working-directory: ${{ matrix.sample }}
run: cmake -B build && cmake --build build --verbose

View File

@ -25,7 +25,7 @@ jobs:
- windows-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- name: Install Qt
uses: jurplel/install-qt-action@v4
with:

View File

@ -0,0 +1,59 @@
name: Samples Dart (build, test)
on:
push:
branches:
paths:
#- samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/**
#- samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake_tests/**
#- samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/**
- samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/**
- samples/openapi3/client/petstore/dart-dio/oneof/**
- samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/**
- samples/openapi3/client/petstore/dart-dio/binary_response/**
- samples/openapi3/client/petstore/dart-dio/petstore-timemachine/**
pull_request:
paths:
#- samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/**
#- samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake_tests/**
#- samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/**
- samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/**
- samples/openapi3/client/petstore/dart-dio/oneof/**
- samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/**
- samples/openapi3/client/petstore/dart-dio/binary_response/**
- samples/openapi3/client/petstore/dart-dio/petstore-timemachine/**
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
sdk: ["3.9.0"]
sample:
#- samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/
#- samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake_tests/
#- samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/
- samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/
- samples/openapi3/client/petstore/dart-dio/oneof/
- samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/
- samples/openapi3/client/petstore/dart-dio/binary_response/
- samples/openapi3/client/petstore/dart-dio/petstore-timemachine/
steps:
- uses: actions/checkout@v5
- uses: dart-lang/setup-dart@v1
with:
sdk: ${{ matrix.sdk }}
- name: pub get
working-directory: ${{ matrix.sample }}
run: dart pub get
- name: build_runner build
working-directory: ${{ matrix.sample }}
run: dart run build_runner build
- name: test
working-directory: ${{ matrix.sample }}
run: dart test

View File

@ -17,8 +17,8 @@ jobs:
name: Tests Dart
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
- uses: actions/checkout@v5
- uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: 11

View File

@ -12,7 +12,7 @@ on:
jobs:
build:
name: Build .Net projects
runs-on: windows-2019
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
@ -33,7 +33,7 @@ jobs:
- samples/client/petstore/csharp/generichost/net4.8/Petstore
- samples/client/petstore/csharp/generichost/net4.8/UseDateTimeForDate
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- name: Build
working-directory: ${{ matrix.sample }}
run: dotnet build Org.OpenAPITools.sln

View File

@ -0,0 +1,37 @@
name: Samples C# .Net Client (Petstore)
on:
push:
paths:
- samples/client/petstore/csharp/restsharp/standard2.0/Petstore/**
pull_request:
paths:
- samples/client/petstore/csharp/restsharp/standard2.0/Petstore/**
jobs:
build:
name: Build clients
runs-on: ubuntu-latest
services:
petstore-api:
image: swaggerapi/petstore
ports:
- 80:8080
env:
SWAGGER_HOST: http://petstore.swagger.io
SWAGGER_BASE_PATH: /v2
strategy:
fail-fast: false
matrix:
sample:
- samples/client/petstore/csharp/restsharp/standard2.0/Petstore/
steps:
- uses: actions/checkout@v5
- uses: actions/setup-dotnet@v5.0.0
with:
dotnet-version: '7.0.x'
- name: Build
working-directory: ${{ matrix.sample }}
run: dotnet build Org.OpenAPITools.sln
- name: Test
working-directory: ${{ matrix.sample }}
run: dotnet test Org.OpenAPITools.sln

View File

@ -27,8 +27,8 @@ jobs:
- samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/
# - samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/
steps:
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4.3.1
- uses: actions/checkout@v5
- uses: actions/setup-dotnet@v5.0.0
with:
dotnet-version: 3.1.*
- name: Build

View File

@ -24,8 +24,8 @@ jobs:
- samples/server/petstore/aspnetcore-6.0-project4Models
- samples/server/petstore/aspnetcore-6.0-useSwashBuckle
steps:
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4.3.1
- uses: actions/checkout@v5
- uses: actions/setup-dotnet@v5.0.0
with:
dotnet-version: '6.0.x'
- name: Build

View File

@ -0,0 +1,54 @@
name: Samples C# .Net 7 Client
on:
push:
paths:
# the .NET Core 3.0 runtime is no longer supported as it reached its end-of-life on March 3, 2020
#- samples/client/petstore/csharp/httpclient/standard2.0/Petstore/**
- samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/**
- samples/client/petstore/csharp/restsharp/net4.7/Petstore/**
- samples/client/petstore/csharp/restsharp/net4.8/Petstore/**
- samples/client/petstore/csharp/restsharp/net8/ParameterMappings/**
- samples/client/petstore/csharp/restsharp/net8/EnumMappings/**
- samples/client/petstore/csharp/restsharp/net8/Petstore/**
- samples/client/petstore/csharp/restsharp/net8/UseDateTimeForDate/**
- samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/**
pull_request:
paths:
#- samples/client/petstore/csharp/httpclient/standard2.0/Petstore/**
- samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/**
- samples/client/petstore/csharp/restsharp/net4.7/Petstore/**
- samples/client/petstore/csharp/restsharp/net4.8/Petstore/**
- samples/client/petstore/csharp/restsharp/net8/ParameterMappings/**
- samples/client/petstore/csharp/restsharp/net8/EnumMappings/**
- samples/client/petstore/csharp/restsharp/net8/Petstore/**
- samples/client/petstore/csharp/restsharp/net8/UseDateTimeForDate/**
- samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/**
jobs:
build:
name: Build clients
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
sample:
#- samples/client/petstore/csharp/httpclient/standard2.0/Petstore/
- samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/
- samples/client/petstore/csharp/restsharp/net4.7/Petstore/
- samples/client/petstore/csharp/restsharp/net4.8/Petstore/
- samples/client/petstore/csharp/restsharp/net8/ParameterMappings/
- samples/client/petstore/csharp/restsharp/net8/EnumMappings/
- samples/client/petstore/csharp/restsharp/net8/Petstore/
- samples/client/petstore/csharp/restsharp/net8/UseDateTimeForDate/
- samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/
steps:
- uses: actions/checkout@v5
- uses: actions/setup-dotnet@v5.0.0
with:
dotnet-version: '7.0.x'
- name: Build
working-directory: ${{ matrix.sample }}
run: dotnet build Org.OpenAPITools.sln
- name: Test
working-directory: ${{ matrix.sample }}
run: dotnet test Org.OpenAPITools.sln

View File

@ -18,8 +18,8 @@ jobs:
# clients
- samples/client/echo_api/csharp/restsharp/net8/EchoApi
steps:
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4.3.1
- uses: actions/checkout@v5
- uses: actions/setup-dotnet@v5.0.0
with:
dotnet-version: '8.0.x'
- name: Run echo server

View File

@ -18,8 +18,8 @@ jobs:
- samples/client/petstore/csharp/restsharp/net8/ParameterMappings/
- samples/client/petstore/csharp/restsharp/net8/useVirtualForHooks/
steps:
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4.3.1
- uses: actions/checkout@v5
- uses: actions/setup-dotnet@v5.0.0
with:
dotnet-version: '8.0.x'
- name: Build

View File

@ -25,8 +25,8 @@ jobs:
- samples/server/petstore/aspnetcore-8.0-useSwashBuckle
- samples/server/petstore/aspnetcore-8.0-use-centralized-package-version-management
steps:
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4.3.1
- uses: actions/checkout@v5
- uses: actions/setup-dotnet@v5.0.0
with:
dotnet-version: '8.0.x'
- name: Build

View File

@ -33,8 +33,8 @@ jobs:
- samples/client/petstore/csharp/generichost/net8/SourceGeneration
- samples/client/petstore/csharp/generichost/net8/UseDateTimeForDate
steps:
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4.3.1
- uses: actions/checkout@v5
- uses: actions/setup-dotnet@v5.0.0
with:
dotnet-version: '8.0.x'
- name: Build

View File

@ -23,8 +23,11 @@ jobs:
fail-fast: false
matrix:
sample:
- samples/client/petstore/csharp/generichost/latest/ComposedEnum
- samples/client/petstore/csharp/generichost/latest/InlineEnumAnyOf
- samples/client/petstore/csharp/generichost/latest/Tags
- samples/client/petstore/csharp/generichost/latest/HelloWorld
- samples/client/petstore/csharp/generichost/latest/OneOfList
- samples/client/petstore/csharp/generichost/net9/AllOf
- samples/client/petstore/csharp/generichost/net9/AnyOf
- samples/client/petstore/csharp/generichost/net9/AnyOfNoCompare
@ -43,8 +46,8 @@ jobs:
# unity
#- samples/client/petstore/csharp/unityWebRequest/net9/Petstore
steps:
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4.3.1
- uses: actions/checkout@v5
- uses: actions/setup-dotnet@v5.0.0
with:
dotnet-version: '9.0.101'
- name: Build

39
.github/workflows/samples-elixir.yaml vendored Normal file
View File

@ -0,0 +1,39 @@
name: Samples Elixir
on:
push:
paths:
- samples/client/petstore/elixir/**
pull_request:
paths:
- samples/client/petstore/elixir/**
jobs:
build:
runs-on: ubuntu-latest
name: OTP ${{matrix.otp}} / Elixir ${{matrix.elixir}}
strategy:
matrix:
otp: ['25.3.2', '26.2.5', '27.3.3']
elixir: ['1.18.3']
sample:
- samples/client/petstore/elixir/
services:
petstore-api:
image: swaggerapi/petstore
ports:
- 80:8080
env:
SWAGGER_HOST: http://petstore.swagger.io
SWAGGER_BASE_PATH: /v2
steps:
- uses: actions/checkout@v5
- uses: erlef/setup-beam@v1
with:
otp-version: ${{matrix.otp}}
elixir-version: ${{matrix.elixir}}
- name: mix deps.get
run: mix deps.get
working-directory: ${{ matrix.sample }}
- name: mix test
run: mix test
working-directory: ${{ matrix.sample }}

View File

@ -23,7 +23,7 @@ jobs:
- samples/client/petstore/elm
- samples/openapi3/client/elm
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- uses: jorelali/setup-elm@v6
with:
elm-version: 0.19.1

View File

@ -26,7 +26,7 @@ jobs:
- samples/client/petstore/erlang-client/
- samples/client/petstore/erlang-proper/
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- uses: erlef/setup-beam@v1
with:
otp-version: '27'

View File

@ -16,12 +16,12 @@ jobs:
# clients
- samples/client/echo_api/go
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
- uses: actions/checkout@v5
- uses: actions/setup-go@v6
with:
go-version: "stable"
- name: Setup node.js
uses: actions/setup-node@v4
uses: actions/setup-node@v5
- name: Run echo server
run: |
git clone https://github.com/wing328/http-echo-server -b openapi-generator-test-server

View File

@ -0,0 +1,37 @@
name: Samples Go Clients
on:
push:
paths:
- 'samples/openapi3/client/petstore/go/go-petstore-aws-signature/**'
- 'samples/openapi3/client/petstore/go-petstore-withXml/**'
- samples/openapi3/client/petstore/go-petstore-generateMarshalJSON-false/**
pull_request:
paths:
- 'samples/openapi3/client/petstore/go/go-petstore-aws-signature/**'
- 'samples/openapi3/client/petstore/go-petstore-withXml/**'
- samples/openapi3/client/petstore/go-petstore-generateMarshalJSON-false/**
jobs:
build:
name: Build Go
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
sample:
- 'samples/openapi3/client/petstore/go/go-petstore-aws-signature/'
- 'samples/openapi3/client/petstore/go-petstore-withXml/'
- samples/openapi3/client/petstore/go-petstore-generateMarshalJSON-false/
steps:
- uses: actions/checkout@v5
- uses: actions/setup-go@v6
- run: go version
- name: Install Dependencies
working-directory: ${{ matrix.sample }}
run: |
go mod tidy
- name: Run test
working-directory: ${{ matrix.sample }}
run: go test -mod=mod -v

View File

@ -21,8 +21,8 @@ jobs:
- samples/server/petstore/go-gin-api-server/
- samples/server/petstore/go-gin-api-server-interface-only/
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
- uses: actions/checkout@v5
- uses: actions/setup-go@v6
with:
go-version: "stable"
- run: go version

View File

@ -27,8 +27,8 @@ jobs:
- samples/server/petstore/go-chi-server/
- samples/server/others/go-server/no-body-path-params/
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
- uses: actions/checkout@v5
- uses: actions/setup-go@v6
with:
go-version: "stable"
- run: go version
@ -47,9 +47,9 @@ jobs:
go-version:
- "1.18"
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- name: Set up Go
uses: actions/setup-go@v5
uses: actions/setup-go@v6
with:
go-version: ${{ matrix.go-version }}
- name: Install Dependencies

View File

@ -21,8 +21,8 @@ jobs:
sample:
- samples/client/petstore/groovy
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
- uses: actions/checkout@v5
- uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: 8

View File

@ -27,7 +27,7 @@ jobs:
- samples/server/others/haskell-servant-ping/
- samples/client/petstore/haskell-http-client/
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- uses: haskell/actions/setup@v2
with:
# ghc-version: '8.8.4' # Exact version of ghc to use

View File

@ -22,8 +22,8 @@ jobs:
- samples/client/echo_api/java/resttemplate
- samples/client/echo_api/java/resteasy
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
- uses: actions/checkout@v5
- uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: 11
@ -36,7 +36,7 @@ jobs:
~/.m2
key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }}
- name: Setup node.js
uses: actions/setup-node@v4
uses: actions/setup-node@v5
- name: Run echo server
run: |
git clone https://github.com/wing328/http-echo-server -b openapi-generator-test-server

View File

@ -23,8 +23,8 @@ jobs:
- samples/client/echo_api/java/resteasy
- samples/client/echo_api/java/restclient
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
- uses: actions/checkout@v5
- uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: 17
@ -37,7 +37,7 @@ jobs:
~/.m2
key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }}
- name: Setup node.js
uses: actions/setup-node@v4
uses: actions/setup-node@v5
- name: Run echo server
run: |
git clone https://github.com/wing328/http-echo-server -b openapi-generator-test-server

View File

@ -29,8 +29,8 @@ jobs:
- samples/client/echo_api/java/resttemplate
- samples/client/echo_api/java/resteasy
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
- uses: actions/checkout@v5
- uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: 8
@ -43,7 +43,7 @@ jobs:
~/.m2
key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }}
- name: Setup node.js
uses: actions/setup-node@v4
uses: actions/setup-node@v5
- name: Run echo server
run: |
git clone https://github.com/wing328/http-echo-server -b openapi-generator-test-server

View File

@ -71,6 +71,7 @@ jobs:
- samples/client/petstore/java/microprofile-rest-client-mutiny
- samples/client/petstore/java/microprofile-rest-client-3.0
- samples/client/petstore/java/microprofile-rest-client-3.0-jackson
- samples/client/petstore/java/microprofile-rest-client-3.0-jackson-mutiny
- samples/client/petstore/java/microprofile-rest-client-3.0-jackson-with-xml
- samples/client/petstore/java/microprofile-rest-client-3.0-mutiny
- samples/client/petstore/java/microprofile-rest-client-with-useSingleRequestParameter
@ -97,8 +98,8 @@ jobs:
- samples/client/others/java/resttemplate-list-schema-validation/
- samples/client/petstore/java/okhttp-gson-3.1-duplicated-operationid/
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
- uses: actions/checkout@v5
- uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: 11
@ -110,6 +111,27 @@ jobs:
path: |
~/.m2
key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }}
- name: Build
- name: Build with Maven
working-directory: ${{ matrix.sample }}
run: mvn clean package --no-transfer-progress
- name: Cache gradle dependencies
uses: actions/cache@v4
env:
cache-name: gradle-caches
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('**/*.gradle', '**/*.gradle.kts') }}
- name: Cache gradle wrapper
uses: actions/cache@v4
env:
cache-name: gradle-wrapper
with:
path: ~/.gradle/wrapper
key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}
- name: Build with Gradle
working-directory: ${{ matrix.sample }}
if: ${{ hashFiles('./gradlew') != '' }}
run: ./gradlew build -x test

View File

@ -6,13 +6,17 @@ on:
- samples/client/petstore/java/resttemplate-jakarta/**
- samples/client/petstore/java/webclient-jakarta/**
- samples/client/petstore/java/restclient-*/**
- samples/client/others/java/webclient-sealedInterface/**
- samples/client/petstore/java/webclient-useSingleRequestParameter/**
- samples/client/others/java/restclient-enum-in-multipart/**
pull_request:
paths:
- samples/client/petstore/java/resttemplate-jakarta/**
- samples/client/petstore/java/webclient-jakarta/**
- samples/client/petstore/java/restclient-*/**
- samples/client/others/java/webclient-sealedInterface/**
- samples/client/petstore/java/webclient-useSingleRequestParameter/**
- samples/client/others/java/restclient-enum-in-multipart/**
jobs:
build:
name: Build Java Client JDK17
@ -29,10 +33,12 @@ jobs:
- samples/client/petstore/java/restclient-swagger2
- samples/client/petstore/java/restclient-useSingleRequestParameter
- samples/client/petstore/java/restclient-useSingleRequestParameter-static
- samples/client/others/java/webclient-sealedInterface
- samples/client/petstore/java/webclient-useSingleRequestParameter
- samples/client/others/java/restclient-enum-in-multipart
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
- uses: actions/checkout@v5
- uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: 17

View File

@ -0,0 +1,39 @@
name: Samples Java Dubbo
on:
push:
paths:
- 'samples/server/petstore/java-dubbo/**'
pull_request:
paths:
- 'samples/server/petstore/java-dubbo/**'
jobs:
build:
name: Build Java Dubbo
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
sample:
# servers
- samples/server/petstore/java-dubbo
steps:
- uses: actions/checkout@v5
- uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: 17
- name: Cache maven dependencies
uses: actions/cache@v4
env:
cache-name: maven-repository
with:
path: |
~/.m2
key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }}
- name: Build
working-directory: ${{ matrix.sample }}
run: mvn clean package --no-transfer-progress -DskipTests
# add -DskipTests as the app compiles but fails to start
#run: mvn clean package --no-transfer-progress

View File

@ -26,8 +26,8 @@ jobs:
- samples/server/others/java-helidon-server/v3/mp-format-test
version: [17]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
- uses: actions/checkout@v5
- uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: ${{ matrix.version }}

View File

@ -27,8 +27,8 @@ jobs:
- samples/server/others/java-helidon-server/v4/mp-format-test
version: [21]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
- uses: actions/checkout@v5
- uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: ${{ matrix.version }}

View File

@ -29,8 +29,8 @@ jobs:
- samples/server/petstore/java-play-framework-no-swagger-ui
- samples/server/petstore/java-play-framework-no-wrap-calls
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
- uses: actions/checkout@v5
- uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: 11

38
.github/workflows/samples-java-sbt.yaml vendored Normal file
View File

@ -0,0 +1,38 @@
name: Samples Java (sbt)
on:
push:
paths:
- 'samples/client/petstore/java/okhttp-gson/**'
pull_request:
paths:
- 'samples/client/petstore/java/okhttp-gson/**'
jobs:
build:
name: Build sbt/Java client, servers
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
sample:
# clients
- samples/client/petstore/java/okhttp-gson
steps:
- uses: actions/checkout@v5
- uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: 11
- name: Setup sbt launcher
uses: sbt/setup-sbt@v1
- name: Cache maven dependencies
uses: actions/cache@v4
env:
cache-name: maven-repository
with:
path: |
~/.ivy2
key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('**/build.sbt') }}
- name: Build and test
working-directory: ${{ matrix.sample }}
run: sbt -v +test

View File

@ -31,8 +31,8 @@ jobs:
#- samples/server/petstore/java-undertow/
- samples/server/petstore/java-microprofile/
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
- uses: actions/checkout@v5
- uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: 8

View File

@ -17,8 +17,8 @@ jobs:
sample:
- samples/server/petstore/java-wiremock
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
- uses: actions/checkout@v5
- uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: 11

View File

@ -18,8 +18,8 @@ jobs:
# servers
- samples/server/petstore/jaxrs/jersey3
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
- uses: actions/checkout@v5
- uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: 11

View File

@ -38,11 +38,11 @@ jobs:
- samples/server/petstore/jaxrs-cxf-non-spring-app
- samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
- uses: actions/checkout@v5
- uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: 8
java-version: 11
- name: Cache maven dependencies
uses: actions/cache@v4
env:

View File

@ -58,8 +58,8 @@ jobs:
- samples/server/petstore/java-helidon-server/v3/mp/
- samples/server/petstore/java-helidon-server/v3/se
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
- uses: actions/checkout@v5
- uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: 17

View File

@ -31,8 +31,8 @@ jobs:
- samples/server/petstore/java-helidon-server/v4/mp/
- samples/server/petstore/java-helidon-server/v4/se/
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
- uses: actions/checkout@v5
- uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: 21

View File

@ -15,7 +15,7 @@ jobs:
name: Tests Julia
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- uses: julia-actions/setup-julia@v2
with:
version: 1.8

View File

@ -5,10 +5,12 @@ on:
branches:
- 'samples/client/petstore/kotlin*/**'
- 'samples/client/others/kotlin-jvm-okhttp-parameter-tests/**'
- samples/client/others/kotlin-integer-enum/**
pull_request:
paths:
- 'samples/client/petstore/kotlin*/**'
- 'samples/client/others/kotlin-jvm-okhttp-parameter-tests/**'
- samples/client/others/kotlin-integer-enum/**
jobs:
build:
@ -31,6 +33,7 @@ jobs:
- samples/client/petstore/kotlin-moshi-codegen
- samples/client/petstore/kotlin-multiplatform
- samples/client/petstore/kotlin-multiplatform-kotlinx-datetime
- samples/client/petstore/kotlin-multiplatform-allOf-discriminator
- samples/client/petstore/kotlin-nonpublic
- samples/client/petstore/kotlin-nullable
- samples/client/petstore/kotlin-retrofit2
@ -65,9 +68,12 @@ jobs:
- samples/client/echo_api/kotlin-jvm-spring-3-restclient
- samples/client/petstore/kotlin-name-parameter-mappings
- samples/client/others/kotlin-jvm-okhttp-parameter-tests
- samples/client/others/kotlin-jvm-okhttp-path-comments
- samples/client/others/kotlin-integer-enum
- samples/client/petstore/kotlin-allOf-discriminator-kotlinx-serialization
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
- uses: actions/checkout@v5
- uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: 11

View File

@ -21,8 +21,8 @@ jobs:
- samples/client/echo_api/kotlin-model-prefix-type-mappings
- samples/client/echo_api/kotlin-jvm-okhttp
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
- uses: actions/checkout@v5
- uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: 17
@ -40,7 +40,7 @@ jobs:
build-root-directory: ${{ matrix.sample }}
arguments: wrapper
- name: Setup node.js
uses: actions/setup-node@v4
uses: actions/setup-node@v5
- name: Run echo server
run: |
git clone https://github.com/wing328/http-echo-server -b openapi-generator-test-server

View File

@ -46,8 +46,8 @@ jobs:
# comment out due to gradle build failure
# - samples/server/petstore/kotlin-spring-default/
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
- uses: actions/checkout@v5
- uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: 17

View File

@ -27,8 +27,8 @@ jobs:
- samples/server/petstore/kotlin-server-required-and-nullable-properties
- samples/server/petstore/kotlin-misk
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
- uses: actions/checkout@v5
- uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: 21

View File

@ -38,6 +38,7 @@ jobs:
- samples/server/petstore/kotlin-springboot-source-swagger1
- samples/server/petstore/kotlin-springboot-source-swagger2
- samples/server/petstore/kotlin-springboot-springfox
- samples/server/petstore/kotlin-springboot-x-kotlin-implements
- samples/server/petstore/kotlin-server/ktor
- samples/server/petstore/kotlin-server/ktor2
- samples/server/petstore/kotlin-server/jaxrs-spec
@ -48,13 +49,14 @@ jobs:
- samples/server/others/kotlin-server/jaxrs-spec-array-response
- samples/server/petstore/kotlin-spring-cloud
- samples/server/petstore/kotlin-misk
- samples/server/petstore/kotlin-misk-config
# comment out due to gradle build failure
#- samples/server/petstore/kotlin-spring-default
# no build.gradle file
#- samples/server/petstore/kotlin-vertx-modelMutable
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
- uses: actions/checkout@v5
- uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: 8

View File

@ -22,8 +22,8 @@ jobs:
- samples/server/petstore/kotlin-wiremock-responses
- samples/server/echo_api/kotlin-wiremock
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
- uses: actions/checkout@v5
- uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: 11

View File

@ -4,9 +4,15 @@ on:
push:
paths:
- 'samples/client/petstore/ocaml/**'
- 'samples/client/petstore/ocaml-fake-petstore/**'
- 'samples/client/petstore/ocaml-oneOf-primitive/**'
- 'samples/client/petstore/ocaml-additional-properties/**'
pull_request:
paths:
- 'samples/client/petstore/ocaml/**'
- 'samples/client/petstore/ocaml-fake-petstore/**'
- 'samples/client/petstore/ocaml-oneOf-primitive/**'
- 'samples/client/petstore/ocaml-additional-properties/**'
jobs:
build:
@ -17,8 +23,11 @@ jobs:
matrix:
sample:
- 'samples/client/petstore/ocaml/'
- 'samples/client/petstore/ocaml-fake-petstore/'
- 'samples/client/petstore/ocaml-oneOf-primitive/'
- 'samples/client/petstore/ocaml-additional-properties/'
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- name: Set-up OCaml
uses: ocaml/setup-ocaml@v3
with:

View File

@ -0,0 +1,45 @@
name: Samples PHP clients
on:
push:
paths:
- samples/client/petstore/php/OpenAPIClient-php/**
pull_request:
paths:
- samples/client/petstore/php/OpenAPIClient-php/**
jobs:
build:
name: Build PHP projects
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php:
- "8.1"
- "8.2"
- "8.3"
- "8.4"
sample:
# clients
- samples/client/petstore/php/OpenAPIClient-php/
services:
petstore-api:
image: swaggerapi/petstore
ports:
- 80:8080
env:
SWAGGER_HOST: http://petstore.swagger.io
SWAGGER_BASE_PATH: /v2
steps:
- uses: actions/checkout@v5
- name: Setup PHP with tools
uses: shivammathur/setup-php@v2
with:
php-version: "${{ matrix.php }}"
tools: php-cs-fixer, phpunit
- name: composer install
working-directory: ${{ matrix.sample }}
run: composer install
- name: phpunit
working-directory: ${{ matrix.sample }}
run: vendor/bin/phpunit tests

View File

@ -0,0 +1,48 @@
name: Samples PHP (Server) Syntax Checker
on:
push:
paths:
- samples/server/petstore/php-symfony/SymfonyBundle-php/**
#- samples/server/petstore/php-laravel/**
- samples/server/petstore/php-flight/**
- samples/server/petstore/php-mezzio-ph-modern/**
- samples/server/petstore/php-mezzio-ph/**
- samples/server/petstore/php-slim4/**
pull_request:
paths:
- samples/server/petstore/php-symfony/SymfonyBundle-php/**
#- samples/server/petstore/php-laravel/**
- samples/server/petstore/php-flight/**
- samples/server/petstore/php-mezzio-ph-modern/**
- samples/server/petstore/php-mezzio-ph/**
- samples/server/petstore/php-slim4/**
jobs:
build:
name: Build PHP projects
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php:
- "8.1"
- "8.2"
- "8.3"
- "8.4"
sample:
# servers
- samples/server/petstore/php-symfony/SymfonyBundle-php/
#- samples/server/petstore/php-laravel/
- samples/server/petstore/php-flight/
- samples/server/petstore/php-mezzio-ph-modern/
- samples/server/petstore/php-mezzio-ph/
- samples/server/petstore/php-slim4/
steps:
- uses: actions/checkout@v5
- name: Setup PHP with tools
uses: shivammathur/setup-php@v2
with:
php-version: "${{ matrix.php }}"
- name: php -l
working-directory: ${{ matrix.sample }}
run: find . -name "*.php" -exec php -l {} +

View File

@ -0,0 +1,36 @@
name: Samples PHP Syntax Checker
on:
push:
paths:
- samples/client/petstore/php/OpenAPIClient-php/**
- samples/client/petstore/php-nextgen/OpenAPIClient-php/**
pull_request:
paths:
- samples/client/petstore/php/OpenAPIClient-php/**
- samples/client/petstore/php-nextgen/OpenAPIClient-php/**
jobs:
build:
name: Build PHP projects
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php:
- "8.1"
- "8.2"
- "8.3"
- "8.4"
sample:
# clients
- samples/client/petstore/php/OpenAPIClient-php/
- samples/client/petstore/php-nextgen/OpenAPIClient-php/
steps:
- uses: actions/checkout@v5
- name: Setup PHP with tools
uses: shivammathur/setup-php@v2
with:
php-version: "${{ matrix.php }}"
- name: php -l
working-directory: ${{ matrix.sample }}
run: find . -name "*.php" -exec php -l {} +

View File

@ -6,11 +6,13 @@ on:
- samples/server/petstore/php-symfony/SymfonyBundle-php/**
- samples/server/petstore/php-flight/**
- samples/server/petstore/php-laravel/**
- samples/server/petstore/php-laravel-issue-21334/**
pull_request:
paths:
- samples/server/petstore/php-symfony/SymfonyBundle-php/**
- samples/server/petstore/php-flight/**
- samples/server/petstore/php-laravel/**
- samples/server/petstore/php-laravel-issue-21334/**
jobs:
build:
name: Build PHP projects
@ -28,8 +30,9 @@ jobs:
- samples/server/petstore/php-symfony/SymfonyBundle-php/
- samples/server/petstore/php-flight/
- samples/server/petstore/php-laravel/
- samples/server/petstore/php-laravel-issue-21334/
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- name: Setup PHP with tools
uses: shivammathur/setup-php@v2
with:

View File

@ -19,8 +19,8 @@ jobs:
python-version:
- "3.12"
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- uses: actions/checkout@v5
- uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Install

View File

@ -0,0 +1,40 @@
name: Samples PowerShell
on:
push:
paths:
- samples/client/petstore/powershell/**
pull_request:
paths:
- samples/client/petstore/powershell/**
jobs:
build:
runs-on: ubuntu-latest
name: Test Powershell Clients
strategy:
matrix:
sample:
- samples/client/petstore/powershell/
services:
petstore-api:
image: swaggerapi/petstore
ports:
- 80:8080
env:
SWAGGER_HOST: http://petstore.swagger.io
SWAGGER_BASE_PATH: /v2
steps:
- uses: actions/checkout@v5
- name: Build the client
working-directory: ${{ matrix.sample }}
shell: pwsh
run: |
./Build.ps1
- name: Test
working-directory: ${{ matrix.sample }}
shell: pwsh
run: |
Import-Module -Name './src/PSPetstore'
Invoke-Pester -PassThru

View File

@ -22,7 +22,7 @@ jobs:
- 'samples/config/petstore/protobuf-schema-config/'
- 'samples/config/petstore/protobuf-schema-config-complex/'
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- name: Install Protocol Buffers Compiler
run: |
sudo apt-get update

View File

@ -24,12 +24,12 @@ jobs:
- "3.12"
- "3.13"
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- uses: actions/checkout@v5
- uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Setup node.js
uses: actions/setup-node@v4
uses: actions/setup-node@v5
- name: Run echo server
run: |
git clone https://github.com/wing328/http-echo-server -b openapi-generator-test-server

View File

@ -18,8 +18,8 @@ jobs:
# servers
- samples/server/petstore/python-fastapi/
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- uses: actions/checkout@v5
- uses: actions/setup-python@v6
with:
python-version: '3.9'
- name: Install dependencies

View File

@ -8,6 +8,18 @@ on:
- .github/workflows/samples-python-petstore.yaml
jobs:
validate-pyproject-toml:
name: Validate pyproject.toml
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/setup-python@v6
with:
python-version: "3.13"
- name: Install validator
run: pip install 'validate-pyproject[all]'
- name: Validate
run: validate-pyproject samples/openapi3/client/petstore/python/pyproject.toml
build:
name: Test Python client
runs-on: ubuntu-latest
@ -23,6 +35,7 @@ jobs:
sample:
- samples/openapi3/client/petstore/python-aiohttp
- samples/openapi3/client/petstore/python
- samples/openapi3/client/petstore/python-lazyImports
services:
petstore-api:
image: swaggerapi/petstore
@ -32,8 +45,8 @@ jobs:
SWAGGER_HOST: http://petstore.swagger.io
SWAGGER_BASE_PATH: /v2
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- uses: actions/checkout@v5
- uses: actions/setup-python@v6
id: py
with:
python-version: ${{ matrix.python-version }}

View File

@ -23,12 +23,12 @@ jobs:
- "3.11"
- "3.12"
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- uses: actions/checkout@v5
- uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Setup node.js
uses: actions/setup-node@v4
uses: actions/setup-node@v5
- name: Run echo server
run: |
git clone https://github.com/wing328/http-echo-server -b openapi-generator-test-server

View File

@ -15,7 +15,6 @@ jobs:
fail-fast: false
matrix:
python-version:
- "3.8"
- "3.9"
- "3.10"
- "3.11"
@ -32,8 +31,8 @@ jobs:
SWAGGER_HOST: http://petstore.swagger.io
SWAGGER_BASE_PATH: /v2
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- uses: actions/checkout@v5
- uses: actions/setup-python@v6
id: py
with:
python-version: ${{ matrix.python-version }}

View File

@ -18,8 +18,8 @@ jobs:
# servers
- samples/server/petstore/python-aiohttp-srclayout/
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- uses: actions/checkout@v5
- uses: actions/setup-python@v6
with:
python-version: '3.9'
- name: Test

View File

@ -1,42 +0,0 @@
name: Samples R
on:
push:
paths:
- 'samples/client/echo_api/r/**'
pull_request:
paths:
- 'samples/client/echo_api/r/**'
jobs:
build:
name: Build R
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
sample:
- 'samples/client/echo_api/r/'
steps:
- uses: actions/checkout@v4
- name: Setup node.js
uses: actions/setup-node@v4
- name: Run echo server
run: |
git clone https://github.com/wing328/http-echo-server -b openapi-generator-test-server
(cd http-echo-server && npm install && npm start &)
- uses: r-lib/actions/setup-r@v2
with:
r-version: 3.6.1
- uses: r-lib/actions/setup-r-dependencies@v2
working-directory: ${{ matrix.sample }}
with:
cache-version: 2
- name: Install curl
run: sudo apt-get install -y r-cran-curl
- name: build and test
working-directory: ${{ matrix.sample }}
run: |
# export _R_CHECK_FORCE_SUGGESTS_=false
/bin/bash build_and_test.bash
shell: bash

View File

@ -24,9 +24,9 @@ jobs:
- 'samples/client/echo_api/ruby-faraday/'
- 'samples/client/echo_api/ruby-typhoeus/'
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- name: Setup node.js
uses: actions/setup-node@v4
uses: actions/setup-node@v5
- name: Run echo server
run: |
git clone https://github.com/wing328/http-echo-server -b openapi-generator-test-server

View File

@ -0,0 +1,72 @@
name: Samples Rust Clients
on:
push:
paths:
- "samples/client/others/rust/**"
- "samples/client/petstore/rust-server/**"
pull_request:
paths:
- "samples/client/others/rust/**"
- "samples/client/petstore/rust/**"
jobs:
build:
name: Build Rust
runs-on: ubuntu-latest
services:
petstore-api:
image: swaggerapi/petstore
ports:
- 80:8080
env:
SWAGGER_HOST: http://petstore.swagger.io
SWAGGER_BASE_PATH: /v2
strategy:
fail-fast: false
matrix:
sample:
# these folders contain sub-projects of rust clients, servers
- samples/client/others/rust/
- samples/client/petstore/rust/
steps:
- uses: actions/checkout@v5
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Rust cache
uses: Swatinem/rust-cache@v2
with:
cache-targets: false # Don't cache workspace target directories as they don't exist
cache-directories:
${{ matrix.sample }}/target
workspaces: |
${{ matrix.sample }}/output/*
- name: Build
working-directory: ${{ matrix.sample }}
run: cargo build --all-targets --all-features
- name: Tests
working-directory: ${{ matrix.sample }}
run: |
set -e
# Iterate through each example and test various features
for package in $(find . -maxdepth 1 -mindepth 1 -type d)
do
# Not all versions have a client example
if test -f examples/client/main.rs; then
cargo build --example client --features="client"
fi
# Test the CLI works if present
if test -f bin/cli.rs; then
cargo build --bin ${package##*/} --features cli
target/debug/${package##*/} --help
fi
cargo fmt
cargo test
cargo clippy
cargo doc
done

View File

@ -0,0 +1,64 @@
name: Samples Rust Servers
on:
push:
paths:
- "samples/server/petstore/rust-server/**"
- "samples/server/petstore/rust-axum/**"
pull_request:
paths:
- "samples/server/petstore/rust-server/**"
- "samples/server/petstore/rust-axum/**"
jobs:
build:
name: Build Rust
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
sample:
# these folders contain sub-projects of rust clients, servers
- samples/server/petstore/rust-server/
- samples/server/petstore/rust-server-deprecated/
- samples/server/petstore/rust-axum/
steps:
- uses: actions/checkout@v5
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Rust cache
uses: Swatinem/rust-cache@v2
with:
cache-targets: false # Don't cache workspace target directories as they don't exist
cache-directories:
${{ matrix.sample }}/target
workspaces: |
${{ matrix.sample }}/output/*
- name: Build
working-directory: ${{ matrix.sample }}
run: cargo build --all-targets --all-features
- name: Tests
working-directory: ${{ matrix.sample }}
run: |
set -e
# Iterate through each example and test various features
for package in $(find . -maxdepth 1 -mindepth 1 -type d)
do
# Not all versions have a server example
if test -f examples/server/main.rs; then
cargo build --example server --features="server"
fi
# Test the CLI works if present
if test -f bin/cli.rs; then
cargo build --bin ${package##*/} --features cli
target/debug/${package##*/} --help
fi
cargo fmt
cargo test
cargo clippy
cargo doc
done

View File

@ -1,37 +0,0 @@
name: Samples Rust
on:
push:
paths:
- "samples/client/others/rust/**"
- "samples/server/petstore/rust-server/**"
- "samples/client/petstore/rust-server/**"
- "samples/server/petstore/rust-axum/**"
pull_request:
paths:
- "samples/client/others/rust/**"
- "samples/client/petstore/rust/**"
- "samples/server/petstore/rust-server/**"
- "samples/server/petstore/rust-axum/**"
jobs:
build:
name: Build Rust
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
sample:
# these folders contain sub-projects of rust clients, servers
- samples/client/others/rust/
- samples/client/petstore/rust/
- samples/server/petstore/rust-server/
- samples/server/petstore/rust-axum/
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Build
working-directory: ${{ matrix.sample }}
run: cargo build --all-targets --all-features

View File

@ -18,8 +18,8 @@ jobs:
# servers
- samples/server/petstore/scala-finch # cannot be tested with jdk11
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
- uses: actions/checkout@v5
- uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: 8

View File

@ -5,12 +5,10 @@ on:
paths:
- 'samples/client/petstore/scala**'
- 'samples/server/petstore/scala**'
- 'samples/client/petstore/java/okhttp-gson/**'
pull_request:
paths:
- 'samples/client/petstore/scala**'
- 'samples/server/petstore/scala**'
- 'samples/client/petstore/java/okhttp-gson/**'
jobs:
build:
name: Build sbt/Scala client, servers
@ -20,14 +18,13 @@ jobs:
matrix:
sample:
# clients
- samples/client/petstore/java/okhttp-gson
- samples/client/petstore/scalaz
- samples/client/petstore/scala-pekko
- samples/client/petstore/scala-http4s
- samples/client/petstore/scala-sttp4-jsoniter
#- samples/client/petstore/scala-sttp
#- samples/client/petstore/scala-sttp-circe
# servers
- samples/server/petstore/scala-lagom-server
- samples/server/petstore/scala-play-server
- samples/server/petstore/scala-akka-http-server
- samples/server/petstore/scala-pekko-http-server
@ -35,8 +32,8 @@ jobs:
- samples/server/petstore/scala-http4s-server
- samples/server/petstore/scala-cask
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
- uses: actions/checkout@v5
- uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: 11

View File

@ -10,6 +10,7 @@ on:
- samples/server/petstore/springboot-lombok-tostring
- samples/server/petstore/springboot-file-delegate-optional
- samples/server/petstore/springboot-petstore-with-api-response-examples
- samples/server/petstore/spring-boot-oneof-sealed
pull_request:
paths:
- samples/openapi3/client/petstore/spring-cloud-3-with-optional
@ -19,6 +20,7 @@ on:
- samples/server/petstore/springboot-lombok-tostring
- samples/server/petstore/springboot-file-delegate-optional
- samples/server/petstore/springboot-petstore-with-api-response-examples
- samples/server/petstore/spring-boot-oneof-sealed
jobs:
build:
name: Build Java Spring (JDK17)
@ -36,9 +38,10 @@ jobs:
- samples/server/petstore/springboot-lombok-tostring
- samples/server/petstore/springboot-file-delegate-optional
- samples/server/petstore/springboot-petstore-with-api-response-examples
- samples/server/petstore/spring-boot-oneof-sealed
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
- uses: actions/checkout@v5
- uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: 17

View File

@ -61,8 +61,8 @@ jobs:
- samples/server/petstore/springboot-useoptional
- samples/server/petstore/springboot-virtualan
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
- uses: actions/checkout@v5
- uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: 8

View File

@ -34,7 +34,7 @@ jobs:
name: Build Swift samples
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- uses: swift-actions/setup-swift@v2
if: ${{ matrix.os == 'ubuntu-latest' }}
with:

View File

@ -20,9 +20,9 @@ jobs:
- 18
- 20
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- uses: actions/setup-node@v4
- uses: actions/setup-node@v5
with:
node-version: ${{ matrix.node-version }}

View File

@ -20,9 +20,9 @@ jobs:
- 18
- 20
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- uses: actions/setup-node@v4
- uses: actions/setup-node@v5
with:
node-version: ${{ matrix.node-version }}

View File

@ -0,0 +1,35 @@
name: TypeScript NestJS Server
on:
pull_request:
paths:
- samples/server/petstore/typescript-nestjs-server/**
- .github/workflows/samples-typescript-nestjs-server.yaml
jobs:
build:
name: Test TypeScript NestJS Server
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
sample:
# clients
- samples/server/petstore/typescript-nestjs-server
node-version:
- 20
- 22
steps:
- uses: actions/checkout@v5
- uses: actions/setup-node@v5
with:
node-version: ${{ matrix.node-version }}
- name: Install
working-directory: ${{ matrix.sample }}
run: |
npm i
- name: Test
working-directory: ${{ matrix.sample }}
run: npm run test

View File

@ -20,9 +20,9 @@ jobs:
- 18
- 20
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- uses: actions/setup-node@v4
- uses: actions/setup-node@v5
with:
node-version: ${{ matrix.node-version }}

View File

@ -16,9 +16,9 @@ jobs:
node-version:
- 20
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- uses: actions/setup-node@v4
- uses: actions/setup-node@v5
with:
node-version: ${{ matrix.node-version }}

View File

@ -18,9 +18,9 @@ jobs:
sample:
- samples/client/petstore/zapier
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- name: Setup node
uses: actions/setup-node@v4
uses: actions/setup-node@v5
- name: Install dependencies
working-directory: ${{ matrix.sample }}
run: |

View File

@ -18,9 +18,9 @@ jobs:
matrix:
java: [11, 17]
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v4
uses: actions/setup-java@v5
with:
java-version: ${{ matrix.java }}
distribution: 'temurin'
@ -54,6 +54,8 @@ jobs:
java -jar ./openapi-generator-cli.jar author template --verbose -g jaxrs-spec --library quarkus
- name: Setup Gradle
uses: gradle/gradle-build-action@v3
with:
gradle-version: '8.14.3'
- name: Gradle tests
run: |
gradle -b modules/openapi-generator-gradle-plugin/samples/local-spec/build.gradle buildGoSdk --stacktrace

10
.gitignore vendored
View File

@ -16,6 +16,7 @@ modules/openapi-generator-gradle-plugin/bin/
.classpath
lib/*
build/*
.kotlin
generated-files/*
generated-sources/*
generated-code/*
@ -92,6 +93,12 @@ samples/client/petstore/cpp-restsdk/client/cmake_install.cmake
samples/client/petstore/cpp-restsdk/client/CppRestPetstoreClientConfig.cmake
samples/client/petstore/cpp-restsdk/client/CMakeCache.txt
# cpp-oatpp
samples/client/petstore/cpp-oatpp/build
samples/client/petstore/cpp-oatpp/external
samples/server/petstore/cpp-oatpp/build
samples/server/petstore/cpp-oatpp/external
#Java/Android
**/.gradle
samples/client/petstore/java/hello.txt
@ -290,6 +297,9 @@ samples/openapi3/client/petstore/go/privatekey.pem
## OCaml
samples/client/petstore/ocaml/_build/
samples/client/petstore/ocaml-fake-petstore/_build/
samples/client/petstore/ocaml-oneOf-primitive/_build/
samples/client/petstore/ocaml-additional-properties/_build/
# jetbrain http client
samples/client/jetbrains/adyen/checkout71/http/client/Apis/http-client.private.env.json

View File

@ -3,11 +3,11 @@
<extension>
<groupId>com.gradle</groupId>
<artifactId>develocity-maven-extension</artifactId>
<version>1.21.6</version>
<version>1.23.2</version>
</extension>
<extension>
<groupId>com.gradle</groupId>
<artifactId>common-custom-user-data-maven-extension</artifactId>
<version>1.12.5</version>
<version>2.0.2</version>
</extension>
</extensions>

View File

@ -1,219 +0,0 @@
sudo: required
language: java
jdk:
- openjdk11
# See https://docs.travis-ci.com/user/languages/java/#caching
before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/
# Avoid caching our built dependencies between runs.
- rm -fr $HOME/.m2/repository/org/openapitools/
cache:
yarn: true
directories:
- $HOME/.m2
- $HOME/.ivy2
- $HOME/.gradle/caches/
- $HOME/.gradle/wrapper/
- $HOME/samples/client/petstore/javascript/node_modules
- $HOME/samples/client/petstore/php/OpenAPIToolsClient-php/vendor
- $HOME/samples/client/petstore/ruby/vendor/bundle
- $HOME/samples/client/petstore/python/.venv/
- $HOME/samples/server/petstore/rust-server/target
- $HOME/samples/server/petstore/rust-axum/target
- $HOME/perl5
- $HOME/.cargo
- $HOME/.pub-cache
- $HOME/samples/server/petstore/cpp-pistache/pistache
- $HOME/.rvm/gems/ruby-2.4.1
- $HOME/website/node_modules/
- $HOME/.cache/deno
- $HOME/.phpenv/versions/8.1.4
services:
- docker
# comment out the host table change to use the public petstore server
addons:
#apt:
# sources:
# - ubuntu-toolchain-r-test
# packages:
# - g++-5
#chrome: stable
hosts:
- petstore.swagger.io
before_install:
- sudo rm -rf /var/lib/apt/lists/*
- curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
- sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) edge"
- sudo apt-get update
#- sudo apt-get install -qqy --no-install-recommends google-chrome-stable
#- sudo apt-get -y -o Dpkg::Options::="--force-confnew" install docker-ce
- mkdir -vp ~/.docker/cli-plugins/
- curl --silent -L "https://github.com/docker/buildx/releases/download/v0.3.0/buildx-v0.3.0.linux-amd64" > ~/.docker/cli-plugins/docker-buildx
- chmod a+x ~/.docker/cli-plugins/docker-buildx
# to run petstore server locally via docker
#- echo "$DOCKER_HUB_PASSWORD" | docker login --username=$DOCKER_HUB_USERNAME --password-stdin || true
#- docker pull swaggerapi/petstore
#- docker run -d -e SWAGGER_HOST=http://petstore.swagger.io -e SWAGGER_BASE_PATH=/v2 -p 80:8080 swaggerapi/petstore
#- docker ps -a
# comment out crystal installation as the tests will run on circleci or github action instead
# install crystal
#- echo 'deb http://download.opensuse.org/repositories/devel:/languages:/crystal/xUbuntu_16.04/ /' | sudo tee /etc/apt/sources.list.d/devel:languages:crystal.list
#- curl -fsSL https://download.opensuse.org/repositories/devel:languages:crystal/xUbuntu_16.04/Release.key | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/devel_languages_crystal.gpg > /dev/null
#- sudo apt update
#- sudo apt install crystal
#- crystal --version
- curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.22.0
- export PATH="$HOME/.yarn/bin:$PATH"
# install rust
#- curl https://sh.rustup.rs -sSf | sh -s -- -y -v
## required when sudo: required for the Ruby petstore tests
#- gem install bundler -v 2.3.26
## set python 3.6.3 as default
#- source ~/virtualenv/python3.6/bin/activate
# -- skip bash test to shorten build time
# Add bats test framework and cURL for Bash script integration tests
#- sudo add-apt-repository ppa:duggan/bats --yes
#- sudo apt-get update -qq
#- sudo apt-get install -qq bats
#- sudo apt-get install -qq curl
# -- skip bash test end
# install dart
#- sudo apt-get update
#- sudo apt-get install apt-transport-https
#- sudo sh -c 'curl https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -'
#- sudo sh -c 'curl https://storage.googleapis.com/download.dartlang.org/linux/debian/dart_stable.list > /etc/apt/sources.list.d/dart_stable.list'
#- sudo apt-get update
#- sudo apt-get install dart
# switch to php8
#- sudo apt-get install -f libonig-dev libzip-dev
#- git clone https://github.com/php-build/php-build $(phpenv root)/plugins/php-build
#- git clone https://github.com/ngyuki/phpenv-composer.git $(phpenv root)/plugins/phpenv-composer
#- if [ $(ls -A "$HOME/.phpenv/versions/8.1.4" | wc -l) -eq 0 ]; then
# phpenv install 8.1.4;
# fi;
#- phpenv rehash
#- phpenv versions
##- phpenv global 7.2.15
#- phpenv global 8.1.4
#- php -v
# comment out below as installation failed in travis
# Add rebar3 build tool and recent Erlang/OTP for Erlang petstore server tests.
# - Travis CI does not support rebar3 [yet](https://github.com/travis-ci/travis-ci/issues/6506#issuecomment-275189490).
# - Rely on `kerl` for [pre-compiled versions available](https://docs.travis-ci.com/user/languages/erlang#Choosing-OTP-releases-to-test-against). Rely on installation path chosen by [`travis-erlang-builder`](https://github.com/travis-ci/travis-erlang-builder/blob/e6d016b1a91ca7ecac5a5a46395bde917ea13d36/bin/compile#L18).
# - . ~/otp/18.2.1/activate && erl -version
#- curl -f -L -o ./rebar3 https://s3.amazonaws.com/rebar3/rebar3 && chmod +x ./rebar3 && ./rebar3 version && export PATH="${TRAVIS_BUILD_DIR}:$PATH"
# install C++ tools
#- sudo apt install -y --no-install-recommends valgrind cmake build-essential
#- cmake --version
# install Qt5
#- sudo apt install -y --no-install-recommends qt5-default
# install boost
#- sudo apt install -y --no-install-recommends libboost-all-dev
# perl dep
#- cpanm --local-lib=~/perl5 local::lib && eval $(perl -I ~/perl5/lib/perl5/ -Mlocal::lib)
#- cpanm --quiet --no-interactive Test::Exception Test::More Log::Any LWP::UserAgent URI::Query Module::Runtime DateTime Module::Find Moose::Role JSON || echo "Ignored failure from cpanm"
# show host table to confirm petstore.swagger.io is mapped to localhost
- cat /etc/hosts
# show java version
- java -version
- if [ "$TRAVIS_BRANCH" = "master" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
openssl aes-256-cbc -K $encrypted_6e2c8bba47c6_key -iv $encrypted_6e2c8bba47c6_iv -in sec.gpg.enc -out sec.gpg -d ;
gpg --keyserver keyserver.ubuntu.com --recv-key $SIGNING_KEY ;
gpg --check-trustdb ;
fi;
- pushd .; cd website; yarn install; popd
script:
# fail fast
- set -e
# show docker buildx version
- docker buildx version
# run integration tests defined in maven pom.xml
# WARN: Travis will timeout after 10 minutes of no stdout/stderr activity, which is problematic with mvn --quiet.
# show "error" only to reduce the log size
- ./mvnw -e --no-snapshot-updates --quiet --batch-mode --show-version clean install -DskipTests -Dmaven.javadoc.skip=true -Dorg.slf4j.simpleLogger.defaultLogLevel=error
after_success:
# push to maven repo
- if [ $SONATYPE_USERNAME ] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
if [ "$TRAVIS_BRANCH" = "master" ] && [ -z $TRAVIS_TAG ]; then
echo "Publishing from branch $TRAVIS_BRANCH";
./mvnw clean deploy --quiet -DskipTests=true -B -U -P release --settings CI/settings.xml -Dorg.slf4j.simpleLogger.defaultLogLevel=error;
echo "Finished mvn clean deploy for $TRAVIS_BRANCH";
pushd .;
cd modules/openapi-generator-gradle-plugin;
./gradlew -Psigning.keyId="$SIGNING_KEY" -Psigning.password="$SIGNING_PASSPHRASE" -Psigning.secretKeyRingFile="${TRAVIS_BUILD_DIR}/sec.gpg" -PossrhUsername="${SONATYPE_USERNAME}" -PossrhPassword="${SONATYPE_PASSWORD}" publishPluginMavenPublicationToSonatypeRepository closeAndReleaseSonatypeStagingRepository;
echo "Finished ./gradlew publishPluginMavenPublicationToSonatypeRepository closeAndReleaseSonatypeStagingRepository";
popd;
elif [ -z $TRAVIS_TAG ] && [[ "$TRAVIS_BRANCH" =~ ^[0-9]+\.[0-9]+\.x$ ]]; then
echo "Publishing from branch $TRAVIS_BRANCH";
./mvnw clean deploy --quiet --settings CI/settings.xml -Dorg.slf4j.simpleLogger.defaultLogLevel=error;
echo "Finished mvn clean deploy for $TRAVIS_BRANCH";
pushd .;
cd modules/openapi-generator-gradle-plugin;
./gradlew -PossrhUsername="${SONATYPE_USERNAME}" -PossrhPassword="${SONATYPE_PASSWORD}" publishPluginMavenPublicationToSonatypeRepository closeAndReleaseSonatypeStagingRepository;
echo "Finished ./gradlew publishPluginMavenPublicationToSonatypeRepository closeAndReleaseSonatypeStagingRepository";
popd;
fi;
if [ -n $TRAVIS_TAG ] && [[ "$TRAVIS_TAG" =~ ^[v][0-9]+\.[0-9]+\.[0-9]+$ ]]; then
echo "Publishing the gradle plugin to Gradle Portal on tag $TRAVIS_TAG (only)";
pushd .;
cd modules/openapi-generator-gradle-plugin;
./gradlew -Psigning.keyId="$SIGNING_KEY" -Psigning.password="$SIGNING_PASSPHRASE" -Psigning.secretKeyRingFile="${TRAVIS_BUILD_DIR}/sec.gpg" publishPlugins -Dgradle.publish.key=$GRADLE_PUBLISH_KEY -Dgradle.publish.secret=$GRADLE_PUBLISH_SECRET;
echo "Finished ./gradlew publishPlugins (plugin portal)";
popd;
fi;
fi;
## docker: build and push openapi-generator-online to DockerHub
- if [ $DOCKER_HUB_USERNAME ]; then
echo "$DOCKER_HUB_PASSWORD" | docker login --username=$DOCKER_HUB_USERNAME --password-stdin;
export cli_version=$(\mvn -o org.apache.maven.plugins:maven-help-plugin:2.1.1:evaluate -Dexpression=project.version | grep -v '\[');
export build_date=$(date -u +"%Y-%m-%dT%H:%M:%SZ");
docker buildx create --use;
if [ ! -z "$TRAVIS_TAG" ]; then
docker buildx build --push --platform linux/amd64,linux/arm64 --label=org.opencontainers.image.created=$build_date --label=org.opencontainers.image.title=openapi-generator-online --label=org.opencontainers.image.revision=$TRAVIS_COMMIT --label=org.opencontainers.image.version=$cli_version -t $DOCKER_GENERATOR_IMAGE_NAME:latest -t $DOCKER_GENERATOR_IMAGE_NAME:$TRAVIS_TAG -t $DOCKER_GENERATOR_IMAGE_NAME -t $DOCKER_GENERATOR_IMAGE_NAME:latest-release ./modules/openapi-generator-online;
echo "Built and tagged $DOCKER_GENERATOR_IMAGE_NAME";
fi;
if [ -z "$TRAVIS_TAG" ] && [ "$TRAVIS_BRANCH" = "master" ] && [ "$TRAVIS_PULL_REQUEST" = "false" ]; then
docker buildx build --push --platform linux/amd64,linux/arm64 --label=org.opencontainers.image.created=$build_date --label=org.opencontainers.image.title=openapi-generator-online --label=org.opencontainers.image.revision=$TRAVIS_COMMIT --label=org.opencontainers.image.version=$cli_version -t $DOCKER_GENERATOR_IMAGE_NAME ./modules/openapi-generator-online;
echo "Pushed to $DOCKER_GENERATOR_IMAGE_NAME for master";
fi;
fi;
## docker: build cli image and push to Docker Hub
- if [ $DOCKER_HUB_USERNAME ]; then
echo "$DOCKER_HUB_PASSWORD" | docker login --username=$DOCKER_HUB_USERNAME --password-stdin;
cp docker-entrypoint.sh ./modules/openapi-generator-cli;
export cli_version=$(\mvn -o org.apache.maven.plugins:maven-help-plugin:2.1.1:evaluate -Dexpression=project.version | grep -v '\[');
export build_date=$(date -u +"%Y-%m-%dT%H:%M:%SZ");
docker buildx create --use;
docker buildx build --platform linux/amd64,linux/arm64 --label=org.opencontainers.image.created=$build_date --label=org.opencontainers.image.title=openapi-generator-cli --label=org.opencontainers.image.revision=$TRAVIS_COMMIT --label=org.opencontainers.image.version=$cli_version -t $DOCKER_CODEGEN_CLI_IMAGE_NAME ./modules/openapi-generator-cli;
if [ ! -z "$TRAVIS_TAG" ]; then
docker buildx build --push --platform linux/amd64,linux/arm64 --label=org.opencontainers.image.created=$build_date --label=org.opencontainers.image.title=openapi-generator-cli --label=org.opencontainers.image.revision=$TRAVIS_COMMIT --label=org.opencontainers.image.version=$cli_version -t $DOCKER_CODEGEN_CLI_IMAGE_NAME:latest -t $DOCKER_CODEGEN_CLI_IMAGE_NAME:$TRAVIS_TAG -t $DOCKER_CODEGEN_CLI_IMAGE_NAME -t $DOCKER_CODEGEN_CLI_IMAGE_NAME:latest-release ./modules/openapi-generator-cli;
echo "Built and tagged $DOCKER_GENERATOR_IMAGE_NAME";
fi;
if [ -z "$TRAVIS_TAG" ] && [ "$TRAVIS_BRANCH" = "master" ] && [ "$TRAVIS_PULL_REQUEST" = "false" ]; then
docker buildx build --push --platform linux/amd64,linux/arm64 --label=org.opencontainers.image.created=$build_date --label=org.opencontainers.image.title=openapi-generator-cli --label=org.opencontainers.image.revision=$TRAVIS_COMMIT --label=org.opencontainers.image.version=$cli_version -t $DOCKER_CODEGEN_CLI_IMAGE_NAME ./modules/openapi-generator-cli;
echo "Pushed to $DOCKER_CODEGEN_CLI_IMAGE_NAME";
fi;
fi;
## NOTE; we will do the followign manually instead as the page doesn't need to be updated in every single travis build
## publish latest website, variables below are secure environment variables which are unavailable to PRs from forks.
# - if [ "$TRAVIS_BRANCH" = "master" ] && [ -z $TRAVIS_TAG ] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
# sed -i "s/Vector{UInt8}/Vector\&#123;UInt8\&#125;/g" docs/generators/julia-client.md;
# sed -i "s/Vector{UInt8}/Vector\&#123;UInt8\&#125;/g" docs/generators/julia-server.md;
# cd website;
# git config --global user.name "${GH_NAME}";
# git config --global user.email "${GH_EMAIL}";
# echo "machine github.com login ${GH_NAME} password ${GH_TOKEN}" > ~/.netrc;
# yarn install;
# GIT_USER="${GH_NAME}" yarn run publish-gh-pages;
# fi;
#
env:
- DOCKER_GENERATOR_IMAGE_NAME=openapitools/openapi-generator-online DOCKER_CODEGEN_CLI_IMAGE_NAME=openapitools/openapi-generator-cli NODE_ENV=test CC=gcc-5 CXX=g++-5

View File

@ -74,8 +74,8 @@ elif [ "$NODE_INDEX" = "3" ]; then
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
#nvm install stable
# install v16 instead of the latest stable version
nvm install 16
nvm alias default 16
nvm install 18
nvm alias default 18
node --version
# Each step uses the same `$BASH_ENV`, so need to modify it
@ -115,6 +115,7 @@ elif [ "$NODE_INDEX" = "3" ]; then
(cd samples/client/petstore/javascript-flowtyped && mvn integration-test)
(cd samples/client/petstore/javascript-es6 && mvn integration-test)
(cd samples/client/petstore/javascript-promise-es6 && mvn integration-test)
(cd samples/server/petstore/typescript-nestjs-server && mvn integration-test)
else
echo "Running node $NODE_INDEX ..."

View File

@ -6,7 +6,7 @@
[![Stable releases in Maven Central](https://img.shields.io/maven-metadata/v/https/repo1.maven.org/maven2/org/openapitools/openapi-generator/maven-metadata.xml.svg)](http://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22org.openapitools%22%20AND%20a%3A%22openapi-generator%22)
[![Apache 2.0 License](https://img.shields.io/badge/License-Apache%202.0-orange)](./LICENSE)
[![Open Collective backers](https://img.shields.io/opencollective/backers/openapi_generator?color=orange&label=OpenCollective%20Backers)](https://opencollective.com/openapi_generator)
[![Join the Slack chat room](https://img.shields.io/badge/Slack-Join%20the%20chat%20room-orange)](https://join.slack.com/t/openapi-generator/shared_invite/zt-2wmkn4s8g-n19PJ99Y6Vei74WMUIehQA)
[![Join the Slack chat room](https://img.shields.io/badge/Slack-Join%20the%20chat%20room-orange)](https://join.slack.com/t/openapi-generator/shared_invite/zt-36ucx4ybl-jYrN6euoYn6zxXNZdldoZA)
[![Follow OpenAPI Generator Twitter account to get the latest update](https://img.shields.io/twitter/follow/oas_generator.svg?style=social&label=Follow)](https://twitter.com/oas_generator)
[![Contribute with Gitpod](https://img.shields.io/badge/Contribute%20with-Gitpod-908a85?logo=gitpod)](https://gitpod.io/#https://github.com/OpenAPITools/openapi-generator)
[![Conan Center](https://shields.io/conan/v/openapi-generator)](https://conan.io/center/recipes/openapi-generator)
@ -15,7 +15,7 @@
<div align="center">
[Master](https://github.com/OpenAPITools/openapi-generator/tree/master) (`7.13.0`):
[Master](https://github.com/OpenAPITools/openapi-generator/tree/master) (`7.16.0`):
[![Build Status](https://api.travis-ci.com/OpenAPITools/openapi-generator.svg?branch=master&status=passed)](https://app.travis-ci.com/github/OpenAPITools/openapi-generator/builds)
[![Integration Test2](https://circleci.com/gh/OpenAPITools/openapi-generator.svg?style=shield)](https://circleci.com/gh/OpenAPITools/openapi-generator)
[![Windows Test](https://ci.appveyor.com/api/projects/status/github/openapitools/openapi-generator?branch=master&svg=true&passingText=Windows%20Test%20-%20OK&failingText=Windows%20Test%20-%20Fails)](https://ci.appveyor.com/project/WilliamCheng/openapi-generator)
@ -74,6 +74,9 @@ If you find OpenAPI Generator useful for work, please consider asking your compa
[<img src="https://openapi-generator.tech/img/companies/route4me.png" width="128" height="128">](https://route4me.com/?utm_source=openapi-generator&utm_medium=sponsorship&utm_campaign=oss-sponsorship)
[<img src="https://openapi-generator.tech/img/companies/dm.png" width="128" height="128">](https://www.dotcom-monitor.com/sponsoring-open-source-projects/?utm_source=openapi-generator&utm_medium=sponsorship&utm_campaign=oss-sponsorship)
[<img src="https://openapi-generator.tech/img/companies/clickit.jpg" width="128" height="128">](https://www.clickittech.com/?utm_source=openapi-generator&utm_medium=sponsorship&utm_campaign=oss-sponsorship)
[<img src="https://openapi-generator.tech/img/companies/unified_to.jpg" width="128" height="128">](https://unified.to/?utm_source=openapi-generator&utm_medium=sponsorship&utm_campaign=oss-sponsorship)
[<img src="https://openapi-generator.tech/img/companies/savetwt.jpg" width="128" height="128">](https://savetwt.com/?utm_source=openapi-generator&utm_medium=sponsorship&utm_campaign=oss-sponsorship)
[<img src="https://openapi-generator.tech/img/companies/serpapi.png" width="128" height="128">](https://serpapi.com/?utm_source=openapi-generator&utm_medium=sponsorship&utm_campaign=oss-sponsorship)
#### Thank you GoDaddy for sponsoring the domain names, Linode for sponsoring the VPS, Checkly for sponsoring the API monitoring and Gradle for sponsoring Develocity
@ -89,38 +92,54 @@ OpenAPI Generator allows generation of API client libraries (SDK generation), se
| | Languages/Frameworks |
| -------------------------------- |--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| **API clients** | **ActionScript**, **Ada**, **Apex**, **Bash**, **C**, **C#** (.net 2.0, 3.5 or later, .NET Standard 1.3 - 2.1, .NET Core 3.1, .NET 5.0. Libraries: RestSharp, GenericHost, HttpClient), **C++** (Arduino, cpp-restsdk, Qt5, Tizen, Unreal Engine 4), **Clojure**, **Crystal**, **Dart**, **Elixir**, **Elm**, **Eiffel**, **Erlang**, **Go**, **Groovy**, **Haskell** (http-client, Servant), **Java** (Apache HttpClient 4.x, Apache HttpClient 5.x, Jersey2.x, OkHttp, Retrofit1.x, Retrofit2.x, Feign, RestTemplate, RESTEasy, Vertx, Google API Client Library for Java, Rest-assured, Spring 5 Web Client, Spring 6 RestClient, MicroProfile Rest Client, Helidon), **Jetbrains HTTP Client**, **Julia**, **k6**, **Kotlin**, **Lua**, **N4JS**, **Nim**, **Node.js/JavaScript** (ES5, ES6, AngularJS with Google Closure Compiler annotations, Flow types, Apollo GraphQL DataStore), **Objective-C**, **OCaml**, **Perl**, **PHP**, **PowerShell**, **Python**, **R**, **Ruby**, **Rust** (hyper, reqwest, rust-server), **Scala** (akka, http4s, scalaz, sttp, swagger-async-httpclient, pekko), **Swift** (2.x, 3.x, 4.x, 5.x, 6.x), **Typescript** (AngularJS, Angular (9.x - 19.x), Aurelia, Axios, Fetch, Inversify, jQuery, Nestjs, Node, redux-query, Rxjs), **XoJo**, **Zapier** |
| **Server stubs** | **Ada**, **C#** (ASP.NET Core, Azure Functions), **C++** (Pistache, Restbed, Qt5 QHTTPEngine), **Erlang**, **F#** (Giraffe), **Go** (net/http, Gin, Echo), **Haskell** (Servant, Yesod), **Java** (MSF4J, Spring, Undertow, JAX-RS: CDI, CXF, Inflector, Jersey, RestEasy, Play Framework, [PKMST](https://github.com/ProKarma-Inc/pkmst-getting-started-examples), [Vert.x](https://vertx.io/), [Apache Camel](https://camel.apache.org/), [Helidon](https://helidon.io/)), **Julia**, **Kotlin** (Spring Boot, [Ktor](https://github.com/ktorio/ktor), [Vert.x](https://vertx.io/)), **PHP** ([Flight](https://docs.flightphp.com/), Laravel, Lumen, [Mezzio (fka Zend Expressive)](https://github.com/mezzio/mezzio), Slim, Silex, [Symfony](https://symfony.com/)), **Python** (FastAPI, Flask), **NodeJS**, **Ruby** (Sinatra, Rails5), **Rust** ([rust-server](https://openapi-generator.tech/docs/generators/rust-server/)), **Scala** (Akka, [Finch](https://github.com/finagle/finch), [Lagom](https://github.com/lagom/lagom), [Play](https://www.playframework.com/), [Cask](https://github.com/com-lihaoyi/cask), Scalatra) |
| **Server stubs** | **Ada**, **C#** (ASP.NET Core, Azure Functions), **C++** (Oat++, Pistache, Restbed, Qt5 QHTTPEngine), **Erlang**, **F#** (Giraffe), **Go** (net/http, Gin, Echo), **Haskell** (Servant, Yesod), **Java** (MSF4J, Spring, Undertow, JAX-RS: CDI, CXF, Inflector, Jersey, RestEasy, Play Framework, [PKMST](https://github.com/ProKarma-Inc/pkmst-getting-started-examples), [Vert.x](https://vertx.io/), [Apache Camel](https://camel.apache.org/), [Helidon](https://helidon.io/)), **Julia**, **Kotlin** (Spring Boot, [Ktor](https://github.com/ktorio/ktor), [Vert.x](https://vertx.io/)), **PHP** ([Flight](https://docs.flightphp.com/), Laravel, Lumen, [Mezzio (fka Zend Expressive)](https://github.com/mezzio/mezzio), Slim, Silex, [Symfony](https://symfony.com/)), **Python** (FastAPI, Flask), **NodeJS**, **Ruby** (Sinatra, Rails5), **Rust** ([rust-server](https://openapi-generator.tech/docs/generators/rust-server/)), **Scala** (Akka, [Finch](https://github.com/finagle/finch), [Lagom](https://github.com/lagom/lagom), [Play](https://www.playframework.com/), [Cask](https://github.com/com-lihaoyi/cask), Scalatra) |
| **API documentation generators** | **HTML**, **Confluence Wiki**, **Asciidoc**, **Markdown**, **PlantUML** |
| **Configuration files** | [**Apache2**](https://httpd.apache.org/) |
| **Others** | **GraphQL**, **JMeter**, **Ktorm**, **MySQL Schema**, **Postman Collection**, **Protocol Buffer**, **WSDL** |
## Table of contents
- [OpenAPI Generator](#openapi-generator)
- [Sponsors](#sponsors)
- [Thank you to our bronze sponsors!](#thank-you-to-our-bronze-sponsors)
- [Thank you GoDaddy for sponsoring the domain names, Linode for sponsoring the VPS, Checkly for sponsoring the API monitoring and Gradle for sponsoring Develocity](#thank-you-godaddy-for-sponsoring-the-domain-names-linode-for-sponsoring-the-vps-checkly-for-sponsoring-the-api-monitoring-and-gradle-for-sponsoring-develocity)
- [Overview](#overview)
- [Table of Contents](#table-of-contents)
- [Table of contents](#table-of-contents)
- [1 - Installation](#1---installation)
- [1.1 - Compatibility](#11---compatibility)
- [1.2 - Artifacts on Maven Central](#12---artifacts-on-maven-central)
- [1.3 - Download JAR](#13---download-jar)
- [Launcher Script](#launcher-script)
- [1.4 - Build Projects](#14---build-projects)
- [Nix users](#nix-users)
- [1.5 - Homebrew](#15---homebrew)
- [1.6 - Docker](#16---docker)
- [Public Pre-built Docker images](#public-pre-built-docker-images)
- [OpenAPI Generator CLI Docker Image](#openapi-generator-cli-docker-image)
- [OpenAPI Generator Online Docker Image](#openapi-generator-online-docker-image)
- [Development in docker](#development-in-docker)
- [Troubleshooting](#troubleshooting)
- [Run Docker in Vagrant](#run-docker-in-vagrant)
- [1.7 - NPM](#17---npm)
- [1.8 - pip](#18---pip)
- [2 - Getting Started](#2---getting-started)
- [3 - Usage](#3---usage)
- [To generate a sample client library](#to-generate-a-sample-client-library)
- [3.1 - Customization](#31---customization)
- [3.2 - Workflow Integration](#32---workflow-integration-maven-gradle-github-cicd)
- [3.3 - Online Generators](#33---online-openapi-generator)
- [3.4 - License Information on Generated Code](#34---license-information-on-generated-code)
- [3.2 - Workflow Integration (Maven, Gradle, Github, CI/CD)](#32---workflow-integration-maven-gradle-github-cicd)
- [3.3 - Online OpenAPI generator](#33---online-openapi-generator)
- [3.4 - License information on Generated Code](#34---license-information-on-generated-code)
- [3.5 - IDE Integration](#35---ide-integration)
- [4 - Companies/Projects using OpenAPI Generator](#4---companiesprojects-using-openapi-generator)
- [5 - Presentations/Videos/Tutorials/Books](#5---presentationsvideostutorialsbooks)
- [6 - About Us](#6---about-us)
- [6.1 - OpenAPI Generator Core Team](#61---openapi-generator-core-team)
- [Core Team Members](#core-team-members)
- [Template Creator](#template-creator)
- [How to join the core team](#how-to-join-the-core-team)
- [6.2 - OpenAPI Generator Technical Committee](#62---openapi-generator-technical-committee)
- [Members of Technical Committee](#members-of-technical-committee)
- [6.3 - History of OpenAPI Generator](#63---history-of-openapi-generator)
- [Founding Members (alphabetical order):](#founding-members-alphabetical-order)
- [7 - License](#7---license)
## [1 - Installation](#table-of-contents)
@ -131,8 +150,8 @@ The OpenAPI Specification has undergone 3 revisions since initial creation in 20
| OpenAPI Generator Version | Release Date | Notes |
| --------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------ | ------------------------------------------------- |
| 7.13.0 (upcoming minor release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/7.13.0-SNAPSHOT/) | 02.04.2025 | Minor release with breaking changes (with fallback) |
| [7.12.0](https://github.com/OpenAPITools/openapi-generator/releases/tag/v7.12.0) (latest stable release) | 28.02.2025 | Minor release with breaking changes (with fallback) |
| 7.16.0 (upcoming minor release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/7.16.0-SNAPSHOT/) | 22.09.2025 | Minor release with breaking changes (with fallback) |
| [7.15.0](https://github.com/OpenAPITools/openapi-generator/releases/tag/v7.15.0) (latest stable release) | 22.08.2025 | Minor release with breaking changes (with fallback) |
| [6.6.0](https://github.com/OpenAPITools/openapi-generator/releases/tag/v6.6.0) | 11.05.2023 | Minor release with breaking changes (with fallback) |
| [5.4.0](https://github.com/OpenAPITools/openapi-generator/releases/tag/v5.4.0) | 31.01.2022 | Minor release with breaking changes (with fallback) |
| [4.3.1](https://github.com/OpenAPITools/openapi-generator/releases/tag/v4.3.1) | 06.05.2020 | Patch release (enhancements, bug fixes, etc) |
@ -195,16 +214,16 @@ See the different versions of the [openapi-generator-cli](https://search.maven.o
<!-- RELEASE_VERSION -->
If you're looking for the latest stable version, you can grab it directly from Maven.org (Java 11 runtime at a minimum):
JAR location: `https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.12.0/openapi-generator-cli-7.12.0.jar`
JAR location: `https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.15.0/openapi-generator-cli-7.15.0.jar`
For **Mac/Linux** users:
```sh
wget https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.12.0/openapi-generator-cli-7.12.0.jar -O openapi-generator-cli.jar
wget https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.15.0/openapi-generator-cli-7.15.0.jar -O openapi-generator-cli.jar
```
For **Windows** users, you will need to install [wget](http://gnuwin32.sourceforge.net/packages/wget.htm) or you can use Invoke-WebRequest in PowerShell (3.0+), e.g.
```
Invoke-WebRequest -OutFile openapi-generator-cli.jar https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.12.0/openapi-generator-cli-7.12.0.jar
Invoke-WebRequest -OutFile openapi-generator-cli.jar https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.15.0/openapi-generator-cli-7.15.0.jar
```
After downloading the JAR, run `java -jar openapi-generator-cli.jar help` to show the usage.
@ -439,7 +458,7 @@ openapi-generator-cli version
To use a specific version of "openapi-generator-cli"
```sh
openapi-generator-cli version-manager set 7.12.0
openapi-generator-cli version-manager set 7.15.0
```
Or install it as dev-dependency:
@ -463,7 +482,7 @@ pip install openapi-generator-cli
To install a specific version
```
pip install openapi-generator-cli==7.12.0
pip install openapi-generator-cli==7.15.0
```
You can also install with [jdk4py](https://github.com/activeviam/jdk4py) instead of java binary. (python>=3.10 is required)
@ -489,7 +508,7 @@ java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generat
(if you're on Windows, replace the last command with `java -jar modules\openapi-generator-cli\target\openapi-generator-cli.jar generate -i https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g php -o c:\temp\php_api_client`)
<!-- RELEASE_VERSION -->
You can also download the JAR (latest release) directly from [maven.org](https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.12.0/openapi-generator-cli-7.12.0.jar)
You can also download the JAR (latest release) directly from [maven.org](https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.15.0/openapi-generator-cli-7.15.0.jar)
<!-- /RELEASE_VERSION -->
To get a list of **general** options available, please run `java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar help generate`
@ -1006,6 +1025,7 @@ Here is a list of template creators:
* Apex: @asnelling
* Bash: @bkryza
* C: @PowerOfCreation @zhemant [:heart:](https://www.patreon.com/zhemant)
* C++ Oat++: @Kraust
* C++ REST: @Danielku15
* C++ Tiny: @AndersSpringborg @kaareHH @michelealbano @mkakbas
* C++ UE4: @Kahncode
@ -1079,6 +1099,7 @@ Here is a list of template creators:
* Scala (Akka): @cchafer
* Scala (sttp): @chameleon82
* Scala (sttp4): @flsh86
* Scala (scala-sttp4-jsoniter): @lbialy
* Scala (Pekko): @mickaelmagniez
* Scala (http4s): @JennyLeahy
* Swift: @tkqubo
@ -1109,6 +1130,7 @@ Here is a list of template creators:
* C# Azure functions: @Abrhm7786
* C# NancyFX: @mstefaniuk
* C++ (Qt5 QHttpEngine): @etherealjoy
* C++ Oat++: @Kraust
* C++ Pistache: @sebymiano
* C++ Restbed: @stkrwork
* Erlang Server: @galaxie @nelsonvides
@ -1121,6 +1143,7 @@ Here is a list of template creators:
* Haskell Servant: @algas
* Haskell Yesod: @yotsuya
* Java Camel: @carnevalegiacomo
* Java Dubbo: @redoom
* Java MSF4J: @sanjeewa-malalgoda
* Java Spring Boot: @diyfr
* Java Undertow: @stevehu
@ -1218,7 +1241,7 @@ If you want to join the committee, please kindly apply by sending an email to te
| Apex | |
| Bash | @frol (2017/07) @bkryza (2017/08) @kenjones-cisco (2017/09) |
| C | @zhemant (2018/11) @ityuhui (2019/12) @michelealbano (2020/03) @eafer (2024/12) |
| C++ | @ravinikam (2017/07) @stkrwork (2017/07) @etherealjoy (2018/02) @martindelille (2018/03) @muttleyxd (2019/08) |
| C++ | @ravinikam (2017/07) @stkrwork (2017/07) @etherealjoy (2018/02) @martindelille (2018/03) @muttleyxd (2019/08) @aminya (2025/05) |
| C# | @mandrean (2017/08) @shibayan (2020/02) @Blackclaws (2021/03) @lucamazzanti (2021/05) @iBicha (2023/07) |
| Clojure | |
| Crystal | @cyangle (2021/01) |
@ -1237,20 +1260,20 @@ If you want to join the committee, please kindly apply by sending an email to te
| JMeter | @kannkyo (2021/01) |
| Jetbrains HTTP Client | @jlengrand (2023/01) |
| Julia | @tanmaykm (2023/01) |
| Kotlin | @dr4ke616 (2018/08) @karismann (2019/03) @Zomzog (2019/04) @andrewemery (2019/10) @4brunu (2019/11) @yutaka0m (2020/03) @stefankoppier (2022/06) @e5l (2024/10) |
| Kotlin | @karismann (2019/03) @Zomzog (2019/04) @andrewemery (2019/10) @4brunu (2019/11) @yutaka0m (2020/03) @stefankoppier (2022/06) @e5l (2024/10) |
| Lua | @daurnimator (2017/08) |
| N4JS | @mmews-n4 (2023/03) |
| Nim | |
| NodeJS/Javascript | @CodeNinjai (2017/07) @frol (2017/07) @cliffano (2017/07) |
| ObjC | |
| OCaml | @cgensoul (2019/08) |
| OCaml | @cgensoul (2019/08), @sir4ur0n (2025/08) |
| Perl | @wing328 (2017/07) [:heart:](https://www.patreon.com/wing328) @yue9944882 (2019/06) |
| PHP | @jebentier (2017/07), @dkarlovi (2017/07), @mandrean (2017/08), @jfastnacht (2017/09), [@ybelenko](https://github.com/ybelenko) (2018/07), @renepardon (2018/12) |
| PowerShell | @wing328 (2020/05) |
| Python | @cbornet (2017/09) @tomplus (2018/10) @krjakbrjak (2023/02) @fa0311 (2023/10) @multani (2023/10) |
| R | @Ramanth (2019/07) @saigiridhar21 (2019/07) |
| Ruby | @cliffano (2017/07) @zlx (2017/09) @autopp (2019/02) |
| Rust | @frol (2017/07) @farcaller (2017/08) @richardwhiuk (2019/07) @paladinzh (2020/05) @jacob-pro (2022/10) |
| Rust | @frol (2017/07) @farcaller (2017/08) @richardwhiuk (2019/07) @paladinzh (2020/05) @jacob-pro (2022/10) @dsteeley (2025/07) |
| Scala | @clasnake (2017/07), @shijinkui (2018/01), @ramzimaalej (2018/03), @chameleon82 (2020/03), @Bouillie (2020/04) @fish86 (2023/06) |
| Swift | @jgavris (2017/07) @ehyche (2017/08) @Edubits (2017/09) @jaz-ah (2017/09) @4brunu (2019/11) @dydus0x14 (2023/06) |
| TypeScript | @TiFu (2017/07) @taxpon (2017/07) @sebastianhaas (2017/07) @kenisteward (2017/07) @Vrolijkx (2017/09) @macjohnny (2018/01) @topce (2018/10) @akehir (2019/07) @petejohansonxo (2019/11) @amakhrov (2020/02) @davidgamero (2022/03) @mkusaka (2022/04) @joscha (2024/10) |

View File

@ -1,116 +0,0 @@
version: '{branch}-{build}'
image: Visual Studio 2022
hosts:
petstore.swagger.io: 127.0.0.1
install:
- cmd: SET PATH=C:\maven\apache-maven-3.8.3\bin;C:\gradle\gradle-7.6\bin;%JAVA_HOME%\bin;%PATH%
- cmd: SET MAVEN_OPTS=-Xmx4g
- cmd: SET JAVA_OPTS=-Xmx4g
- cmd: SET M2_HOME=C:\maven\apache-maven-3.8.3
- cmd: java -version
- cmd: dir/w
- cmd: docker pull swaggerapi/petstore
- cmd: docker run -d -e SWAGGER_HOST=http://petstore.swagger.io -e SWAGGER_BASE_PATH=/v2 -p 80:8080 swaggerapi/petstore
- ps: Start-Sleep -s 120
- ps: $PSVersionTable.PSVersion
- ps: Install-Module -Name Pester -Force -Scope CurrentUser -SkipPublisherCheck
build_script:
- dotnet --info
# build C# aspnetcore 5.0 server
#- dotnet build samples\server\petstore\aspnetcore-5.0\Org.OpenAPITools.sln
## build C# aspnetcore 3.1 server
#- dotnet build samples\server\petstore\aspnetcore-3.1\Org.OpenAPITools.sln
## build C# aspnetcore 3.0 server
#- dotnet build samples\server\petstore\aspnetcore-3.0\Org.OpenAPITools.sln
## build C# aspnetcore 2.2 server
#- dotnet build samples\server\petstore\aspnetcore\Org.OpenAPITools.sln
## build C# API client (multiple frameworks)
#- dotnet build samples\client\petstore\csharp\OpenAPIClientCoreAndNet47\Org.OpenAPITools.sln
## build C# API client (httpclient)
#- dotnet build samples\client\petstore\csharp\OpenAPIClient-httpclient\Org.OpenAPITools.sln
## build C# API client (generichost)
#- dotnet build samples\client\petstore\csharp\OpenAPIClient-generichost-netstandard2.0\Org.OpenAPITools.sln
## build C# API client (netcore)
#- dotnet build samples\client\petstore\csharp\OpenAPIClient\Org.OpenAPITools.sln
#- dotnet build samples\client\petstore\csharp\OpenAPIClientCore\Org.OpenAPITools.sln
## build C# API client (.net framework 4.7)
#- dotnet build samples\client\petstore\csharp\OpenAPIClient-net47\Org.OpenAPITools.sln
## build C# API client (.net framework 4.8)
#- dotnet build samples\client\petstore\csharp\OpenAPIClient-net48\Org.OpenAPITools.sln
## build C# API client (.net 5.0)
#- dotnet build samples\client\petstore\csharp\OpenAPIClient-net5.0\Org.OpenAPITools.sln
## build C# API client (.net 5.0 with ConditionalSerialization)
#- dotnet build samples\client\petstore\csharp\OpenAPIClient-ConditionalSerialization\Org.OpenAPITools.sln
test_script:
- dotnet test samples\client\petstore\csharp\generichost\latest\Tags\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\generichost\latest\HelloWorld\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\generichost\net9\AllOf\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\generichost\net9\AnyOf\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\generichost\net9\AnyOfNoCompare\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\generichost\net9\FormModels\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
# - dotnet test samples\client\petstore\csharp\generichost\net9\ManualSourceGenerationTests\ManualTests.Latest.UseSourceGeneration\ManualTests.Latest.UseSourceGeneration.csproj
# - dotnet test samples\client\petstore\csharp\generichost\net9\ManualPetstoreTests\OpenAPIClient-generichost-manual-tests\OpenAPIClient-generichost-manual-tests.csproj
- dotnet test samples\client\petstore\csharp\generichost\net9\NullReferenceTypes\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\generichost\net9\OneOf\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\generichost\net9\Petstore\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\generichost\net9\SourceGeneration\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\generichost\net9\UseDateTimeForDate\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\generichost\net8\AllOf\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\generichost\net8\AnyOf\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\generichost\net8\AnyOfNoCompare\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\generichost\net8\FormModels\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\generichost\net8\ManualSourceGenerationTests\ManualTests.Latest.UseSourceGeneration\ManualTests.Latest.UseSourceGeneration.csproj
- dotnet test samples\client\petstore\csharp\generichost\net8\ManualPetstoreTests\OpenAPIClient-generichost-manual-tests\OpenAPIClient-generichost-manual-tests.csproj
- dotnet test samples\client\petstore\csharp\generichost\net8\NullReferenceTypes\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\generichost\net8\OneOf\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\generichost\net8\Petstore\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\generichost\net8\SourceGeneration\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\generichost\net8\UseDateTimeForDate\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\generichost\standard2.0\Petstore\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\generichost\net4.8\AllOf\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\generichost\net4.8\AnyOf\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\generichost\net4.8\AnyOfNoCompare\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\generichost\net4.8\FormModels\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\generichost\net4.8\OneOf\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\generichost\net4.8\Petstore\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\generichost\net4.8\UseDateTimeForDate\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\generichost\net4.7\AllOf\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\generichost\net4.7\AnyOf\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\generichost\net4.7\AnyOfNoCompare\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\generichost\net4.7\FormModels\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\generichost\net4.7\OneOf\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\generichost\net4.7\Petstore\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\generichost\net4.7\UseDateTimeForDate\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\httpclient\standard2.0\Petstore\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\restsharp\net4.7\MultipleFrameworks\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\restsharp\net4.7\Petstore\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\restsharp\net4.8\Petstore\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\restsharp\net8\ParameterMappings\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\restsharp\net8\EnumMappings\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\restsharp\net8\Petstore\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\restsharp\net8\UseDateTimeForDate\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\restsharp\standard2.0\ConditionalSerialization\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp\restsharp\standard2.0\Petstore\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
### TODO: Execute all generators via powershell or other
# generate all petstore clients
# - .\bin\windows\run-all-petstore.cmd
# generate all petstore clients (openapi3)
# - .\bin\openapi3\windows\run-all-petstore.cmd
# test ps petstore
- ps: |
cd samples\client\petstore\powershell\
.\CIRunTest.ps1
cache:
- C:\maven\
- C:\gradle\
- C:\Users\appveyor\.m2

View File

@ -0,0 +1,4 @@
generatorName: avro-schema
outputDir: samples/openapi3/schema/petstore/avro-schema-issue6268
inputSpec: modules/openapi-generator/src/test/resources/3_0/issue6268.yaml
templateDir: modules/openapi-generator/src/main/resources/avro-schema

Some files were not shown because too many files have changed in this diff Show More