Compare commits

...

151 Commits

Author SHA1 Message Date
dependabot[bot]
4f9f14a7d8 Bump express (#22483)
Bumps [express](https://github.com/expressjs/express) from 4.18.0 to 4.22.1.
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/v4.22.1/History.md)
- [Commits](https://github.com/expressjs/express/compare/4.18.0...v4.22.1)

---
updated-dependencies:
- dependency-name: express
  dependency-version: 4.22.1
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-02 17:57:08 +08:00
William Cheng
da778c46b0 add option to set params_encoder (#22484) 2025-12-02 17:54:44 +08:00
dependabot[bot]
abea33c32a Bump express (#22481)
Bumps [express](https://github.com/expressjs/express) from 4.18.0 to 4.22.1.
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/v4.22.1/History.md)
- [Commits](https://github.com/expressjs/express/compare/4.18.0...v4.22.1)

---
updated-dependencies:
- dependency-name: express
  dependency-version: 4.22.1
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-02 17:04:35 +08:00
dependabot[bot]
7a431db7ef Bump express from 4.19.2 to 4.22.1 in /website (#22479)
Bumps [express](https://github.com/expressjs/express) from 4.19.2 to 4.22.1.
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/v4.22.1/History.md)
- [Commits](https://github.com/expressjs/express/compare/4.19.2...v4.22.1)

---
updated-dependencies:
- dependency-name: express
  dependency-version: 4.22.1
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-02 13:31:43 +08:00
Nicolas Rodriguez
f125e1072f [crystal-lang] Various fixes for Crystal client (#22465)
* [crystal] implement "multi" params

See: https://github.com/mamantoha/crest?tab=readme-ov-file#crestnestedparamsencoder

* [crystal] remove useless templates (imported from ruby)
2025-12-02 11:15:35 +08:00
William Cheng
9a6f14ad47 Add workflow to test Crystal client (#22477)
* add workflow to test crystal client

* update

* shards install

* fix

* use localhost
2025-12-02 11:04:54 +08:00
Julian Ste
2d3082a1b7 Fixes oatpp generator to expose network server on 0.0.0.0 instead of localhost (#22330)
* Change server address from 'localhost' to '0.0.0.0'

* Change server connection to listen on all interfaces
2025-12-02 10:12:24 +08:00
KRJ-RTX
18b359ba17 Add Basic and Bearer Authorization to the CPP Pistache generator (#22337)
* [cpp][pistache-server] Add extraction and forwarding of credentials for HTTP Basic protected endpoints.

* [cpp][pistache-server] Change HTTP Basic credentials to be contained on a struct instead of two std::strings

* [cpp][pistache-server] Add callbacks to authenticate http basic credentials.

* [cpp][pistache-server] Add `void* userdata` to HttpBasicCredentials.

This allows for data ft be passed on from the authenticator to the
handler implementation. For example a userid that has already been
looked up

* [cpp][pistache-server] Add support for HTTP Bearer authentication.

* [cpp][pistache-server] Add new file `api-base-source.mustache`

`api-base-source.mustache` contain implementations of security
related methods and also the empty constructor.

* [cpp][pistache-server] Add re-generated samples.

* Fix PR 19978: Updated indentation levels and fixed test problems

---------

Co-authored-by: Morten Winkler <morten@winkler.dk>
2025-12-02 10:07:47 +08:00
dependabot[bot]
39ea9b6da7 Bump express in /samples/client/others/typescript-angular-v20 (#22475)
Bumps [express](https://github.com/expressjs/express) from 5.1.0 to 5.2.1.
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/master/History.md)
- [Commits](https://github.com/expressjs/express/compare/v5.1.0...v5.2.1)

---
updated-dependencies:
- dependency-name: express
  dependency-version: 5.2.1
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-02 10:07:00 +08:00
dependabot[bot]
fc5ccdf3a5 Bump express (#22473)
Bumps [express](https://github.com/expressjs/express) from 4.18.2 to 4.22.0.
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/4.22.0/History.md)
- [Commits](https://github.com/expressjs/express/compare/4.18.2...4.22.0)

---
updated-dependencies:
- dependency-name: express
  dependency-version: 4.22.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-02 10:06:49 +08:00
dependabot[bot]
bf5f7b0d6b Bump swift-actions/setup-swift from 2 to 3 (#22476)
Bumps [swift-actions/setup-swift](https://github.com/swift-actions/setup-swift) from 2 to 3.
- [Release notes](https://github.com/swift-actions/setup-swift/releases)
- [Commits](https://github.com/swift-actions/setup-swift/compare/v2...v3)

---
updated-dependencies:
- dependency-name: swift-actions/setup-swift
  dependency-version: '3'
  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-12-02 10:06:32 +08:00
dsteeley
41f97d8187 fix: Rust-server bytes response fixed to not attempt string conversion (#22471) 2025-12-01 21:36:50 +08:00
scarf
5a2503dc49 fix(typescript-fetch): fix logic when stringEnums is explicitly set to false (#22466)
Passing `stringEnums=false` was incorrectly treated as `true`. This went unnoticed since the default behavior works as expected. Made the logic consistent with `typescript-axios`.
2025-12-01 09:51:13 +01:00
Linh Tran Tuan
1e7ca08ccc [Rust-Axum] Fix: do not gen Partial Ord/Ord for Any type (#22469) 2025-12-01 16:38:32 +08:00
William Cheng
c0d98864e0 [Java] fix missing header parameters in the generated google-api-client Java client (#22468)
* fix(java): add header parameter handling for google-api-client

  Header parameters defined in OpenAPI specs were being accepted as method
  parameters but never actually added to the HTTP request.

  Fixes #22457

* update samples

* minor enhancement

---------

Co-authored-by: artnan <artn@outlook.com>
2025-12-01 13:09:28 +08:00
William Cheng
788f67dd01 Fix Spring Framework 7 compatibility in jvm-spring-restclient and jvm-spring-webclient (#22467)
* Fix Spring Framework 7 compatibility issues

Fixes #22368

* update samples

---------

Co-authored-by: jwalter <joakim.waltersson@gmail.com>
2025-12-01 12:24:37 +08:00
Piotr Kubowicz
7b83462a83 [kotlin] Make API classes open (non-final) unless nonPublicApi is used (#22461)
* [kotlin] Make API classes open (non-final) unless nonPublicApi is used

By making those classes open, AspectJ can be used to enhance their
behavior.

I'm not changing kotlin-multiplatform templates, where 'open' was
already present before my changes.

Closes #22271

* Fail Kotlin sample compilation if API classes stop to be public

Serves as a 'regression test'.
2025-12-01 00:03:29 +08:00
dsteeley
453997bd16 Ensure rust-server compiles with no-default-features (#22445) 2025-11-30 23:05:25 +08:00
Elric Milon
e9bc44bebe [Rust] Implement support for multipart file uploads for reqwest-async and reqwest-trait (#22454)
* feat(Rust): Add support for multipart file uploads in reqwest generators

* chore: Regen relevant samples affected by the updated multipart support
2025-11-30 23:04:29 +08:00
gonzalad
7a48bd8ef5 [typescript-angular] fix integration tests (#22463)
The expected files where not the correct ones.
2025-11-29 16:46:43 +08:00
William Cheng
1689d7b5b6 Typescript-Angular: Fix several query parameters serialization issues (#22459)
* Generate skeleton for new integration test

* Typescript-angular: Move query param deep-object test

* typescript-angular: Add query param JSON test

* Typescript-angular: Add query param form test

* Test for #20998

* typescript-angular: Reimplement query param serialisation

This notably fixes:
- JSON query param serialisation
- array serialisation with style=form and explode=true

As the class HttpParams from Angular is specially designed for the
mimetype: `application/x-www-form-urlencoded` it does not support
the range of query parameters defined by the OpenAPI specification.
To workaround this issue, this patch introduces a custom
`OpenAPIHttpParams` class which supports a wider range of query param
styles.

Note that as `HttpClient` is used afterwards, the class
`OpenApiHttpParams` has a method to convert it into a `HttpParams` from
Angular with a no-op HttpParameterCodec to avoid double serialisation of
the query parameters.

* update samples

---------

Co-authored-by: Vladimir Svoboda <vsvoboda@forkoder.eu>
2025-11-28 20:59:29 +08:00
David Gamero
08858a91e6 [typescript] migrate node-fetch to undici (#22408)
* migrate typescript generator to undici

* smaples

* missing comma

* upgrade types in encode test

* remove EOL node versions, add new LTS

* fix export issue in encode/decode

* d.js issue and commonjs module in tsconfig for esm dual support

* update samples merge master

* sync samples

* files samples
2025-11-27 16:36:19 +08:00
William Cheng
e9c842f150 fix: do not add dependency on urllib3 if not required (#22453)
* fix: do not add dependency on urllib3 if not required

* update samples

* remove import

---------

Co-authored-by: Sascha Kreutz <saschakreutz@hotmail.de>
2025-11-27 16:03:21 +08:00
dependabot[bot]
41c54e8122 Bump node-forge (#22447)
Bumps [node-forge](https://github.com/digitalbazaar/forge) from 1.3.1 to 1.3.2.
- [Changelog](https://github.com/digitalbazaar/forge/blob/main/CHANGELOG.md)
- [Commits](https://github.com/digitalbazaar/forge/compare/v1.3.1...v1.3.2)

---
updated-dependencies:
- dependency-name: node-forge
  dependency-version: 1.3.2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-11-27 14:45:57 +08:00
dependabot[bot]
b8df8e7f22 Bump node-forge (#22448)
Bumps [node-forge](https://github.com/digitalbazaar/forge) from 1.3.1 to 1.3.2.
- [Changelog](https://github.com/digitalbazaar/forge/blob/main/CHANGELOG.md)
- [Commits](https://github.com/digitalbazaar/forge/compare/v1.3.1...v1.3.2)

---
updated-dependencies:
- dependency-name: node-forge
  dependency-version: 1.3.2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-11-27 14:45:47 +08:00
William Cheng
578bdbe679 minor fix documentation for customization (#22440) 2025-11-26 18:00:50 +08:00
Jachym Metlicka
1b557790e6 [kotlin-spring][server] Feat: Return from controllers without ResponseEntity wrapper. (#22377)
* remove "async" and "responseWrapper" from template as these are not supported by kotlin-spring generator

* try to force pipelines rerun

* force pipelines rerun

* fix mustache to keep generated code identical

* Revert "fix mustache to keep generated code identical"

This reverts commit c573b43401.

* Reapply "fix mustache to keep generated code identical"

This reverts commit 2c3b065c5c.

* Add support for 'useResponseEntity' in kotlin-spring. Consolidate with the separate flag 'declarativeInterfaceWrapResponses' as these can now be controlled both by one flag. Default to true.

* fix status annotation and add compile-test samples

* satisfy samples-up-to-date check

* add unit tests covering both reactive and non-reactive

* fix template to avoid unnecessary empty line

* fix template to avoid unnecessary empty line

* put method params (if present) on separate lines to improve readability

* put method params (if present) on separate lines to improve readability; fix double spaces, spaces before comma, incorrect spaces

* fix test

* store PATHs as accesible strings in companion objects.

* fix missing import

* fix incorrect import

* fix fallback to nested placeholders.
2025-11-26 18:00:17 +08:00
William Cheng
3d6e9d5693 better format in build.gradle (kotlin) (#22439) 2025-11-26 17:41:17 +08:00
Konstantin Ignatyev
b9d4b56d1c added ability to publish kotlin-client to maven local repo (#22438)
* this allows pushing client jar to local maven repository gradle -i clean jar publishToMavenLocal;  also generates jar with sources;

* this allows pushing client jar to local maven repository gradle -i clean jar publishToMavenLocal;  also generates jar with sources;
2025-11-26 16:59:41 +08:00
Julian Vennen
ea62c676c9 [php][php-nextgen] Cleanup api authentication code when using api keys in cookies or supporting multiple authentication methods (#22433) 2025-11-26 14:36:16 +08:00
dependabot[bot]
6be8fb3047 Bump actions/setup-dotnet from 5.0.0 to 5.0.1 (#22437)
Bumps [actions/setup-dotnet](https://github.com/actions/setup-dotnet) from 5.0.0 to 5.0.1.
- [Release notes](https://github.com/actions/setup-dotnet/releases)
- [Commits](https://github.com/actions/setup-dotnet/compare/v5.0.0...v5.0.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-11-26 13:54:45 +08:00
David Gamero
6e0fe098f1 [typescript] replace headers with same case-insensitive key to match http spec (#22393)
* replace headers with same caseinsensitive key to match http spec

* regenerate samples

* regenerate samples

* enable test for header case-insensitive replacement

* reduce redundant test comments
2025-11-25 10:58:22 +01:00
dschodits-secunet
41024dc23b [JAVA](native-client) Add support for UnaryInterceptors (#22381)
* added UnaryInterceptor functionality

* set useUnaryInterceptor default to false

* added generated files

* updated generated files to new default value

* fixed asyncResponseInterceptor and indentations

* fixed newlines and generate comments on config

* updated comment in async response interceptor

* reverting docstring

* adjusting newlines
2025-11-25 13:54:29 +08:00
Devon
9116411dac [cpp-rest] Fixes segfault for nullable strings (#22405) 2025-11-25 13:37:05 +08:00
William Cheng
1c447a1605 update swagger parser to 2.1.36 (#22429)
* update swagger parser to 2.1.36

* comment out test
2025-11-25 13:21:36 +08:00
Devon
4a7e0c9bdc [nim] Nim Generator Fixes (#22385)
* Nim Generator Fixes

* remove test that is tested via yaml anyway

* Only include required parameters or non-empty optional parameters in URLs, support oneOf/anyOf via nim object variants, optional field support

* snapshot

* docs gen

* Improved handling of enums
2025-11-23 17:19:16 +08:00
Ruben Hönle
65f99ebb21 fix(enums): add character handling for euro symbol (#22414)
relates to #22413
2025-11-23 17:08:11 +08:00
William Cheng
5d12e71b40 [typescript-rxjs] Feat: Add @deprecated JSDoc tag to API operations (#22419)
* feat(typescript-rxjs): Add @deprecated tag to generated API operations

This commit introduces the JSDoc @deprecated tag to API operations in the typescript-rxjs generator when the operation is marked as deprecated in the OpenAPI specification.

This ensures that IDEs (like VS Code or WebStorm) correctly flag the method as deprecated, providing better developer experience and warning consumers about upcoming removals or changes.

* minor updates

---------

Co-authored-by: Dirk Niemeier <dirk.niemeier@cgi.com>
2025-11-23 16:15:43 +08:00
Cas van Dinter
5711f391e9 build(pom): update swagger-parser to 2.1.35 (#22410) 2025-11-23 15:24:11 +08:00
Josh Wulf
ddfcc95b61 fix: use httpx in generated configuration.py (#22418)
* fix: use httpx in generated configuration.py

* fix: add enum_values for httpx

* chore: update petstore samples
2025-11-23 15:11:48 +08:00
Ary Obenholzner
c5e0d0840b [typescript-nestjs-server] Fix #21842 by updating api.module.mustache (#22403) 2025-11-23 00:16:34 +08:00
Brendan Burns
8a4246cbaf Add support for custom tls server names. (#22372)
* Add support for custom tls server names.

* Update samples

* Fix missing declaration.
2025-11-20 10:36:11 +08:00
William Cheng
a1b962d0b6 minor change to code format in package.json (ts nestjs server) (#22397) 2025-11-20 10:35:29 +08:00
dependabot[bot]
3b4494d751 Bump glob and @nestjs/cli (#22396)
Bumps [glob](https://github.com/isaacs/node-glob) to 12.0.0 and updates ancestor dependency [@nestjs/cli](https://github.com/nestjs/nest-cli). These dependencies need to be updated together.


Updates `glob` from 11.0.1 to 12.0.0
- [Changelog](https://github.com/isaacs/node-glob/blob/main/changelog.md)
- [Commits](https://github.com/isaacs/node-glob/compare/v11.0.1...v12.0.0)

Updates `@nestjs/cli` from 11.0.7 to 11.0.12
- [Release notes](https://github.com/nestjs/nest-cli/releases)
- [Changelog](https://github.com/nestjs/nest-cli/blob/master/.release-it.json)
- [Commits](https://github.com/nestjs/nest-cli/compare/11.0.7...11.0.12)

---
updated-dependencies:
- dependency-name: glob
  dependency-version: 12.0.0
  dependency-type: indirect
- dependency-name: "@nestjs/cli"
  dependency-version: 11.0.12
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-11-20 10:11:24 +08:00
William Cheng
2c4c24728f update ruby samples 2025-11-20 10:04:12 +08:00
Devon
5ad2f84650 [Ruby] Fixes anyOf Support in Responses (#22392)
* [Ruby] Fixes anyOf Support in Responses

* re-gen samples

* Revert "re-gen samples"

This reverts commit 1b4d85d359.
2025-11-20 09:59:43 +08:00
William Cheng
74be550d94 update go-gin crypto to newer version (#22395) 2025-11-20 09:44:53 +08:00
William Cheng
554e10dc34 Fix siblings of $ref using allOf in openapi normalizer (#22364)
* fix ref sibiling using allOf in normalizer

* update samples
2025-11-19 20:35:07 +08:00
William Cheng
6699ecd9d2 update jersey3 to newer version (#22388) 2025-11-19 19:19:54 +08:00
Xi Lu
9655c22ff6 [Protobuf] Add isEnumSchema check in generateNestedSchema (#22384)
Co-authored-by: xil <xil@uber.com>
2025-11-19 17:46:43 +08:00
William Cheng
6210db308e fix website to use load instead of safeLoad (#22386) 2025-11-19 16:53:26 +08:00
Daniil Iastremskii
e86daf9059 Add support for oneOf with discriminator when using kotlinx.serialization (#22373)
* Generate wrappers for oneOf with discriminator when using kotlinx.serialization

* Add spec with oneOf using discriminator

* Add config to generate samples

* Generate samples

* Update samples

* Change naming of wrapper classes

* Fix empty model test

* Update GH workflow with new samples
2025-11-19 02:55:37 +08:00
Jachym Metlicka
c52cc1f275 [kotlin-spring][server] Feat: Make it possible to include "HttpServletRequest" or "ServerWebExchange" as a method parameter in controller interfaces and/or implementations (#22263)
* modify templates to enable possibility to add reactive or blocking request context

* add logic to enable additional property

* regenerate files

* regenerate documentation

* revert unrelated formatting changes

* revert commented out code

* add tests

* refactor test to DRY them a bit

* move tests around

* increase tests coverage

* fix for delegate

* fix for delegate - and refactor tests

* fix tests

* refactor tests

* add tests for delegate

* add kotlin project compile check test for include-http-request-context

* fix

* fix

* fix output folder naming. Add the sample to github action config file.

* add missing interfaces to fix compilation

* regenerate samples

* fix also api_test.mustache to enable testing

* add tests for generated tests
2025-11-19 00:29:07 +08:00
dsteeley
2c7efda060 Update rust-server swagger dependency to 7.0 (#22365) 2025-11-17 18:59:28 +08:00
dependabot[bot]
107d72c5f5 Bump js-yaml from 3.14.1 to 4.1.1 in /website (#22363)
Bumps [js-yaml](https://github.com/nodeca/js-yaml) from 3.14.1 to 4.1.1.
- [Changelog](https://github.com/nodeca/js-yaml/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nodeca/js-yaml/compare/3.14.1...4.1.1)

---
updated-dependencies:
- dependency-name: js-yaml
  dependency-version: 4.1.1
  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-11-17 13:48:21 +08:00
Levi Lutz
a52e902cb5 [RUST] Fix #22356 / Introduce useSerdePathToError option to improve JSON error messages (#22357)
* Add CLI option

* Add dep to generated Cargo.toml

* Add new `Error::SerdePathToError` error type

* Add `serde_path_to_error` invocation to API layer

* Add sample for serde-path-to-error

* Add arg & docstring to cliOptions as well

* Fix sample
2025-11-16 22:13:55 +08:00
ddl-rliu
547eee1970 [BUG] Fix #22351 by updating exceptions.mustache to log both the response data and response body, when applicable (#22352)
* Update exceptions.mustache

* Add autogen files
2025-11-16 22:06:23 +08:00
Jachym Metlicka
c1c74c0ec8 [kotlin-spring][server] Feat: Add Spring Declarative HTTP Interface support for easy client instantiation (#22302)
* add required template files and logic in generator

* add possibility to choose between coroutines and reactor style reactive for spring declarative http client

* remove Flow as array-type input param for declarative http interface

* better name for switches

* revert change

* fix implementation and add tests

* revert unrelated formatting changes

* add compile check for generated code to  github action config file

* fix output folder for config files

* commit generated files

* commit generated docs files

* fix compile test output folder names

* fix sample generation

* fix compile to jdk 17+

* force test rerun

* remove misleading warning

* remove extraneous mustache files. Rebuild samples

* restoring incorrectly deleted output files
2025-11-16 21:54:19 +08:00
William Cheng
7690545276 add sample to test useGzipFeature in java native (#22361) 2025-11-16 21:52:17 +08:00
Ilya Nemtsev
ecb1e9e2cb [JAVA][NATIVE] Add gzip capability (#22358)
* add gzip capability

* fixed test

* added docstring

* regenerated samples
2025-11-16 21:23:08 +08:00
Daniil Iastremskii
039de98d4f Fix generation of an empty data class when using kotlinx.serialization (#22350)
* Fix generation of an empty data class

* Add a test

* Delete polymorphicJacksonSerialization artifacts on exit
2025-11-16 18:59:21 +08:00
William Cheng
6892768009 [typescript-axios] add support for accept headers (#22318)
* cherry pick the change from 22299

* fix accept headers
2025-11-15 14:40:58 +08:00
dsteeley
fd72d4d521 Merge branch 'allow-trait-mocking' into 'rust-openapi' (#22332)
allow trait mocking

See merge request tools.core/swagger-codegen!379

Co-authored-by: Richard Whitehouse <richard.whitehouse@metaswitch.com>
2025-11-13 13:45:30 +08:00
dsteeley
1e3f6d0ed9 Refresh rust-server Cargo.toml wiht updated dependencies and move jsonwebtoken to dev-deps (#22338) 2025-11-12 19:18:14 +08:00
William Cheng
886e4a6dd0 [kotlin] Test array integer (enum) with kotlin client generator (#22336)
* add tests for array of enum

* update
2025-11-12 16:39:01 +08:00
William Cheng
57d304f3f6 add tests for deprecated enum class (#22335) 2025-11-12 16:09:42 +08:00
William Cheng
59f7d09c2e [java][jersey2][jersey3] Cleanup samples (#22328)
* clean up java jersey3 smaples

* clean up jersey3 samples

* update tests
2025-11-12 15:40:19 +08:00
Christopher Molin
ec8ca20dec [Java] Support Deprecation of Generated enum-classes (#22312)
* [Java] Annotate Deprecated `enum`-classes with `@Deprecated`

* Update Generated 'samples'-files

Signed-off-by: Chrimle <28791817+Chrimle@users.noreply.github.com>

* Update `modelEnum.mustache` According to Review Comment

Signed-off-by: Chrimle <28791817+Chrimle@users.noreply.github.com>

* Update Generated 'sample'-files

Signed-off-by: Chrimle <28791817+Chrimle@users.noreply.github.com>

* Update Java Native `modelEnum.mustache` File

Signed-off-by: Chrimle <28791817+Chrimle@users.noreply.github.com>

* Update Java JaxRS `modelEnum.mustache` File

Signed-off-by: Chrimle <28791817+Chrimle@users.noreply.github.com>

* Update Java Okhttp-gson `modelEnum.mustache` File

Signed-off-by: Chrimle <28791817+Chrimle@users.noreply.github.com>

* Update Java Micronaut `modelEnum.mustache` File

Signed-off-by: Chrimle <28791817+Chrimle@users.noreply.github.com>

* Update Java Helidon `modelEnum.mustache` File

Signed-off-by: Chrimle <28791817+Chrimle@users.noreply.github.com>

---------

Signed-off-by: Chrimle <28791817+Chrimle@users.noreply.github.com>
2025-11-12 15:33:28 +08:00
Olek Janiszewski
2ab5365fb2 Fix kotlin codegen for enum with int items (#22324) 2025-11-11 22:18:43 +08:00
dsteeley
2326eef7cf Fixups for rust-server hyper1 support (#22321) 2025-11-11 18:27:11 +08:00
Julian Vennen
d318752478 [php][php-nextgen] fix return type if empty and non-empty responses are mixed (#22322) 2025-11-10 22:06:21 +08:00
Julian Vennen
86ff873a03 [php][php-nextgen] fix array enum query parameters (#22320) 2025-11-10 19:14:41 +08:00
rignicat
28e2254e7a [JAXRS] Partial revert changing path generation if interface, fixes #22279 (#22316)
* Partial revert changing path generation if interface

This reverts commit 65703ff320.

* update samples and docs
2025-11-10 16:54:06 +08:00
William Cheng
69da1ea470 Add new JAX-RS samples to Github workflow (#22314)
* add new jaxrs samples to github workflow

* trigger ci
2025-11-10 15:07:40 +08:00
Raoul de Haard
b1f2a67bc3 [JAVA jaxrs-spec gen] add option for generating swagger V3 annotations (#22300)
* feat: add support for Swagger v3 annotations to jaxrs-spec

* test added unittest for jaxrs-spec with swagger3Annotations

* test added integrationtest for jaxrs-spec with swagger3Annotations

* test added integrationtest for jaxrs-spec with swaggerV2Annotations

* documentation update for new option useSwaggerV3Annotations in the jaxrs-spec.md

* test added integrationtest for jaxrs-spec with swaggerV3Annotations icm use JakartaEE

* update documentation by executing:  ./bin/utils/export_docs_generators.sh

* ran on wsl: ./bin/generate-samples.sh ./bin/configs/*.yaml
2025-11-10 14:50:10 +08:00
BiekerUdan
48648a4051 fix(c): Remove duplicate code generation for UUID path parameters (#22285)
* fix(c): Remove duplicate code generation for UUID path parameters

The C generator was generating duplicate path parameter handling code
when a parameter had format: uuid. This occurred because UUID parameters
have both isString=true and isUuid=true flags set, causing both the
{{#isString}} and {{#isUuid}} template blocks to execute.

The duplicate {{#isUuid}} block has been removed since it generated
identical code to the {{#isString}} block. This makes UUID parameters
consistent with email parameters, which already work this way
(isEmail=true and isString=true, but only use the {{#isString}} block).

The generated code now compiles successfully without duplicate variable
declarations.

* test(c): Add UUID path parameter test case to petstore

Adds endpoint with UUID path parameter to verify C generator produces compilable code without duplicate variable declarations.

* chore(samples): Regenerate all C samples with template fix

Regenerated all C sample variants to include the UUID path parameter example.
2025-11-10 14:36:58 +08:00
William Cheng
a6c753ea69 php template minor refactoring (#22310) 2025-11-09 17:22:18 +08:00
William Cheng
81285b75e4 add exts alias to simply the templates (rust-server) (#22309) 2025-11-09 15:42:14 +08:00
William Cheng
c596bb7d8a add check for optionl to show null in doc (php) (#22307) 2025-11-08 23:12:27 +08:00
Enric Pou
ce338a4a23 Added UUID support in python docs (#22301) 2025-11-08 22:29:12 +08:00
Achton Smidt Winther
fb444bf15e [php] Fix PHP generator validation for nullable required properties (#22292)
* [php] Fix null+required properties to accept null values in generated models. Also fix PHP annotations related to same.

* [php] Update samples.
2025-11-08 22:28:37 +08:00
macmanad
a144678459 [csharp][generichost] Fix format string parameter (#22282) (#22283)
* [csharp][generichost] Fix format string parameter (#22282)

* Update samples
2025-11-08 21:54:42 +08:00
William Cheng
95b9438fd9 add tests for api key name in ccp rest sdk (#22306) 2025-11-08 21:38:06 +08:00
Devon
7beb8a6102 [cpp-rest] Fixing Incorrect Header Name Used (#22298) 2025-11-08 21:19:07 +08:00
Devon
2107686d3d [Rust Reqwest] Fixes Enums in Query Parameters via Causing Compilation Failure (#22281)
* [Rust Reqwest] Fixes Enums in Query Parameters via  Causing Compilation Failure

* regen
2025-11-08 20:56:07 +08:00
Mattias Sehlstedt
7486f12e62 Correct unsafe pistache documentation link (#22296)
* Replace outdated/incorrect documentation link with correct https version

* Generate samples
2025-11-08 15:04:52 +08:00
Enric Pou
600c051fa5 Dart Dio: fix typo in markdown files (#22293) 2025-11-08 15:04:06 +08:00
Enric Pou
f37b8cce58 Add UUID examples and documentation (#22303) 2025-11-08 14:56:46 +08:00
William Cheng
64c8711356 [python] Fix pyproject (poetry 2.x) for httpx (#22289)
* fix poetry 2 httpx dependencies

* use poetry 2 for tests
2025-11-06 14:09:54 +08:00
Michael Munch
65359d8050 [Java] Use new location for hibernate validator (#22287)
* Use new location for hibernate validator
org.hibernate:hibernate-validator -> org.hibernate.validator:hibernate-validator

* Update samples

* Update samples

---------

Co-authored-by: Michael Munch <mmu@bankdata.dk>
2025-11-06 01:42:18 +08:00
Linh Tran Tuan
7ce0096e73 [Rust-Axum] Fix Regex (#22277) 2025-11-04 13:35:51 +08:00
Aman Rao
0ae50f5a10 Fixes #22146. Fixed the code to call the correct method to prevent duplication of Prefix added to the model when using --model-name-prefix (#22188)
* Fixes #22146

* Added handling for when super.getSchemaType method
returns null
2025-11-03 15:26:22 +08:00
William Cheng
3347204425 [java][microprofile] Using incorrect @Multipart instead of @FormParam (#22266)
* fix: #10618 Using incorrect @Multipart instead of @FormParam in microprofile java client

[BUG][JAVA] Using incorrect @Multipart instead of @FormParam when generated Microprofile java client #10618
https://github.com/OpenAPITools/openapi-generator/issues/10618

* fix: #10618 put updated samples under sourcecontrol

* fix: #10618 delete configoption disableMultipart for microprofile

* fix: #10618 put updated samples after cleanup of "disableMultipart"

* fix: #10618 make samples compile and switch jandex-maven-plugin

* fix: #10618 sync my fork with upstream & clean pom

* fix: #10618 regenerate samples

* fix: #10618 microprofile-rest-client-with-useSingleRequestParameter

* update

* update

---------

Co-authored-by: Riedlinger, Jochen (IT 480) <jochen.riedlinger@l-bank.de>
Co-authored-by: Jochen Riedlinger <j_ri@gmx.de>
Co-authored-by: Jochen Riedlinger <14962274+jochenr@users.noreply.github.com>
2025-11-02 16:56:10 +08:00
Lars van Leeuwen
93d7821281 Patch dependencies (#22262) 2025-10-31 22:08:58 +08:00
William Cheng
1e614d4b96 update samples 2025-10-31 16:07:52 +08:00
Marcel Jacek
66b742038a fix(java): default values from allOfs are not correctly definied (#22200)
* fix: extend check for default values of integer and number schema

* add testcases to openapi specs

* generate java clients with the updated fix
2025-10-31 15:58:20 +08:00
William Cheng
9b8ab659ac update undertow to newer version (#22259) 2025-10-31 13:27:43 +08:00
William Cheng
f9d2b8b579 Prepare v7.18.0 release (#22250)
* Revert "v7.17.0 release (#22248)"

This reverts commit 0120486e62.

* prepare v7.18.0 release

* update samples

* update doc
2025-10-30 01:25:35 +08:00
William Cheng
0120486e62 v7.17.0 release (#22248) 2025-10-30 00:18:40 +08:00
Ivan ROGER
44075c9edf Fix explode query params for typescript-fetch (#22246)
Fixes: #10438
2025-10-29 16:28:00 +01:00
William Cheng
3d4f29eac7 [PYTHON-FASTAPI] update starlette to newer version 0.49.1 (#22243)
* update starlette to newer version 0.49.1

* update fastapi to newer version
2025-10-29 15:18:27 +08:00
William Cheng
351b601368 openapi-normalizer: Add REMOVE_PROPERTIES_FROM_TYPE_OTHER_THAN_OBJECT normalize option (#22236)
* fix bug 21680: Introduce REMOVE_PROPERTIES_FROM_TYPE_OTHER_THAN_OBJECT normalize option

* Advise to use REMOVE_PROPERTIES_FROM_TYPE_OTHER_THAN_OBJECT

* update doc

---------

Co-authored-by: Guillaume ALAMOME <guillaume.alamome@gmail.com>
2025-10-28 13:54:49 +08:00
Jason Frey
2c248e6c93 [ruby] Introduce ApiModelBase (#22052)
The Ruby code that is generated copies numerous methods into every
model. This creates bloat both in file size and run-time memory usage.
This commit introduces a base class for all models to store common
methods. This commit's focus is only on static methods that do not
change between models.
2025-10-28 12:42:51 +08:00
Eddie Sholl
68b0dfe6d1 Expose mtls certificate config params in python and php configuration templates (#22229)
* Expose mtls config params in python template

* Expose certFile and keyFile configuration items to support mtls in php generated client

* Regenerate of examples
2025-10-28 12:33:05 +08:00
Leon Linhart
31e462dc3e Make Gradle properties non-nullable (#22050)
They were never really intended to support null values, so this is kind of a bug. However, this is technically also breaking for users that set these properties to `null` explicitly (instead of leaving them unset).
2025-10-27 15:18:08 +08:00
Elliott Kember
74488fa3c3 Update modelOneOf.mustache (#22220)
Adds booleans to modelOneOf
2025-10-27 15:15:57 +08:00
William Cheng
8c54f18f7c remove BACKTICK_PLAN.md 2025-10-27 14:56:13 +08:00
Anshul Singhvi
57d12811ef [Julia] Fix docstring parameter formatting with backticks (#22190)
* [Julia] Fix docstring parameter formatting with backticks

Wrap parameter names in backticks in generated Julia client docstrings
to prevent markdown from misinterpreting underscores as italic formatting.

This fixes an issue where parameter names like `pet_id`, `api_key`, and
`additional_metadata` would render incorrectly in documentation, with
underscores being treated as markdown italic markers instead of literal
characters.

Related issue: JuliaComputing/OpenAPI.jl#72

* Also wrap data types and return types in backticks

* Regenerate Julia client samples with backticked docstrings

* [Julia] Add backticks to all markdown documentation templates

Extend backtick formatting to markdown documentation templates for
both Julia client and server generators. This ensures consistent
markdown rendering of identifiers with underscores.

Changes:
- julia-client/api_doc.mustache: Add backticks to function signatures,
  parameter names, types, and return types in markdown API docs
- julia-server/api_doc.mustache: Same changes for server API docs
- julia-client/model_doc.mustache: Add backticks to property names and
  types in markdown model documentation
- julia-server/model_doc.mustache: Same changes for server model docs

All generated markdown files now properly display identifiers like
`pet_id`, `Custom_Type`, `update_pet_with_form` with literal
underscores instead of broken italic formatting.

Related to JuliaComputing/OpenAPI.jl#72
2025-10-27 14:55:35 +08:00
lbilger
676efae183 [Java] Add import for java.util.Arrays if there is a set property in a model. Arrays.asList is used when initializing the property if it has a default value. (#22207) 2025-10-27 14:55:10 +08:00
Rens Groothuijsen
a4d05b38f5 [go] Correctly set default array value on query parameters (#22060) 2025-10-27 10:30:08 +08:00
Mattias Sehlstedt
75ae04ecfd Fix so that the x-field-extra-annotation properly split any array items (#22226)
* Fix so that the x-field-extra-annotation properly split any array items

* Add a unit test to show that the annotations are generated as expected
2025-10-27 09:56:38 +08:00
rignicat
808d106e0c [jaxrs] Support jackson option (true by default) (#22169)
* allow configuring jackson, remove jackson import if disabled

* do not generate root resource or application file if generating interface

* change template files to remove jackson if disabled

* updated samples and docs as required by PR checklist
2025-10-27 09:56:07 +08:00
William Cheng
9d810e0fbb update jackson databind nullable to v0.2.8 (#22230) 2025-10-27 00:35:51 +08:00
Kevin Liddle
91a499b8c6 [rust-axum] Fix polymorphic type discriminators (#22222)
* [rust-axum] Make discriminator field name camelCase

* [rust-axum] Give polymorphic enum values a serde alias using the mapping keys if available

* update samples

* update test file checksum
2025-10-25 22:43:56 +08:00
dependabot[bot]
eda2e67b94 Bump actions/download-artifact from 5 to 6 (#22225)
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 5 to 6.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](https://github.com/actions/download-artifact/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  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-10-25 17:31:18 +08:00
Rens Groothuijsen
8643bc1d66 [python-fastapi] Remove additional slashes in query regex (#22223) 2025-10-25 17:16:17 +08:00
dependabot[bot]
2b22d172da Bump actions/upload-artifact from 4 to 5 (#22224)
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4 to 5.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/upload-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-10-25 17:14:59 +08:00
William Cheng
d605afeef5 update vertx-web to 4.x 2025-10-23 10:32:20 +08:00
William Cheng
6eff628139 update logback to newer versions (#22204) 2025-10-22 18:51:38 +08:00
William Cheng
1d071288f8 use path from spec in ts angular documentation (#22194) 2025-10-21 15:40:48 +08:00
dependabot[bot]
816befc466 Bump vite and @angular-devkit/build-angular (#22192)
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) to 6.4.1 and updates ancestor dependency [@angular-devkit/build-angular](https://github.com/angular/angular-cli). These dependencies need to be updated together.


Updates `vite` from 6.3.6 to 6.4.1
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/create-vite@6.4.1/packages/vite)

Updates `@angular-devkit/build-angular` from 19.2.17 to 19.2.17
- [Release notes](https://github.com/angular/angular-cli/releases)
- [Changelog](https://github.com/angular/angular-cli/blob/main/CHANGELOG.md)
- [Commits](https://github.com/angular/angular-cli/compare/19.2.17...19.2.17)

---
updated-dependencies:
- dependency-name: vite
  dependency-version: 6.4.1
  dependency-type: indirect
- dependency-name: "@angular-devkit/build-angular"
  dependency-version: 19.2.17
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-21 15:08:27 +08:00
William Cheng
3d00fd2adc update C# samples 2025-10-21 11:40:43 +08:00
Fabian Buchenberger
00d16496c8 [csharp] do not use deprecated HttpRequestMessage.Properties (#20737) 2025-10-21 10:58:47 +08:00
William Cheng
57752d190c add cache: gradle to java setup workflow (#22183) 2025-10-20 17:15:36 +08:00
William Cheng
6572d5d9a6 Use JDK11 for kotlin-server projects (#22182)
* use jdk11 for kotlin server projects

* test with jdk11 by default
2025-10-20 16:54:50 +08:00
William Cheng
c15ba67fc9 update kotlin-spring projects to use jdk11 (#22181) 2025-10-20 15:48:10 +08:00
William Cheng
63ddce0c1b default REFACTOR_ALLOF_WITH_PROPERTIES_ONLY to true (#22180) 2025-10-20 11:39:09 +08:00
Kevin Liddle
01139e6963 [rust-axum] don't include quotes in output string from Display trait for string types (#22161)
* [rust-axum] don't include quotes in output string from Display trait for string types

* [rust-axum] update samples
2025-10-20 10:35:18 +08:00
Sven Allers
e7dae1a81e Custom error messages for size, length, min & max validations in Spring & Spring-Kotlin (#22090)
* Custom error messages for size, length, min & max validations in Spring & Spring-Kotlin

* Run scripts
2025-10-19 21:25:03 +08:00
Ilia
4e7bba659b [dart] Fix compile error in inline enum properties with "default" values(#22120) (#22165) 2025-10-19 20:47:20 +08:00
jpfinne
88bba259e9 OpenApiNormalizer FILTER improvements. Multi filters + filter on path (#22128)
* Use Filter Parser and allow multiple filters

* OpenAPINormalizer fails for invalid FILTER syntax

* Fix typo

* Use constants for filter keys.
Improve exception handling and tests.

* Fix format missing Locale.ROOT

* Make Filter extensible

* Additional unit test for invalid filter
2025-10-18 22:39:44 +08:00
William Cheng
8c85e3cedc [typescript-axios] Add support for AWSv4 Signature (#22174)
* [typescript-axios] Add support for AWSv4 Signature

* update typescript-axios.md file

* update doc

---------

Co-authored-by: qasim <qasim@calo.app>
2025-10-18 16:52:24 +08:00
Jérémy Reynard
d840c495c4 [FEAT] Support nullable Array<org.springframework.web.multipart.MultipartFile> in Kotlin-Spring generator (#21994)
* Support nullable `org.springframework.web.multipart.MultipartFile` in Kotlin Spring generator

- nullable is only supported for MultipartFile. However, Array<MultipartFile> could be also nullable

* Support nullable `org.springframework.web.multipart.MultipartFile` in Kotlin Spring generator

* Support nullable `org.springframework.web.multipart.MultipartFile` in Kotlin Spring generator

Update kotlin-spring-additionalproperties samples
2025-10-18 16:44:19 +08:00
Martin Tomašovič
7c000687e4 [csharp][generichost] Fix DateOnly parsing (#22099)
* Fix DateOnly parsing

* update samples
2025-10-18 14:58:36 +08:00
Mattias Sehlstedt
23a2aafe91 [CSHARP] Fix how the array type is set when using NULLABLE_REFERENCE_TYPES (#22071)
* Fix how the type is calculated for deep inline arrays

* Add list alias objects to petstore specification and regenerate samples
2025-10-18 14:58:08 +08:00
daberni
2afe7d29cd [Spring] Remove unnecessary modifiers from API interface templates (#22132)
* public static final String PATH_

* regenerate samples
2025-10-18 14:56:59 +08:00
William Cheng
6ede03d546 remove includeEndpointUrl (#22173) 2025-10-18 14:52:51 +08:00
Rostislav Svoboda
ee85775afd chore: Misc cleanup related to deprecations (#22172)
* Replace deprecated StringUtils.startsWith methods

* Add missing @Deprecated annotations
2025-10-18 14:52:19 +08:00
Robin Csutorás
94e8997cc7 [typescript-angular] Add includeEndpointUrl option to include endpoint URLs in generated service comments (#22152)
Adds a new boolean option 'includeEndpointUrl' that, when enabled, includes endpoint URL information as JSDoc comments in generated service methods and interfaces. This helps developers quickly identify the HTTP method and path for each API operation.

Co-authored-by: Robin Csutoras <robin.csutoras@Robins-Laptop.local>
2025-10-18 14:35:58 +08:00
jheyens
552ab4c6d5 Java-wiremock: Correctly handle multiple MIME-types in HTTP-Accept-headers (#22133)
* Java-wiremock: Allow matching multiple Accept-header values

* Wiremock: Ignore casing when matching requests' Content-Type headers

* Java-wiremock: Regenerate samples
2025-10-18 14:27:03 +08:00
daberni
2b00bab60a [Spring] Optimize and omit unnecessary imports on Api in ApiController templates (#22164)
* Optimize imports

* remove unnecessary blank line

* revert unintended indentation
2025-10-18 14:19:35 +08:00
Zach Hornback
ccd43a5ce4 [python-fastapi] Fix: Skip sorting of path operations (#22163) (#22166)
* [python-fastapi] Fix: Skip sorting of path operations (#22163)

Make use of helpful code added in
243f501aef to skip sorting of path
parameters.  In FastAPI, order matters, see link for details:
https://fastapi.tiangolo.com/tutorial/path-params/?h=path#order-matters

Issue: https://github.com/OpenAPITools/openapi-generator/issues/22163

* Update samples after previous commit

Reading comprehension is hard.  I missed the part of step 3 where
samples would be updated in response to the change I had previous
submitted.

Via this commit, update samples to match expectations.  The order of
various endpoint implementations is now changed in the sample, matchcing
the order in the yaml files that created them.
2025-10-18 14:18:15 +08:00
Rens Groothuijsen
592c262277 Set default value for isOauth field (#22162) 2025-10-17 15:49:26 +08:00
Bradford Hovinen
40b9d69d5a Support deprecated API endpoints in reqwest-based Rust clients (#22131)
Previously, if an API endpoint was marked deprecated, this fact was not
reflected in the generated Rust clients using the reqwest library. We
want to know exactly when our client code is using a deprecated endpoint,
so marking the corresponding functions with the `#[deprecatd]` attribute
would be very helpful. Uses of the endpoint would then be picked up by
linters so that we can react.

This adds a line to the template which marks functions generated from
deprecated endpoints with the `#[deprecated]` attribute.

This does not touch any of the other client generators for Rust or any
other language, since they are out of scope for our needs.

Co-authored-by: Bradford Hovinen <bho@qwello.eu>
2025-10-16 19:41:28 +08:00
CG
323f978674 fix(kotlin-spring): the generated RequestHeader defaultValue for String parameters contains duplicated double quotes (#22123) 2025-10-16 18:34:33 +08:00
William Cheng
4fe1c4ac73 feat(typescript-fetch): add docs support (#22110)
* feat(typescript-fetch): add docs support

fixes #18276

* chore: regenerate

- generate-samples.sh
- export_docs_generators.sh

* chore: address PR feedback

* update samples

* update samples

* clean up unused files

---------

Co-authored-by: Aaron Heckmann <aaron@plane.so>
2025-10-16 18:21:41 +08:00
monksy
ecaf3ea48a Removed a duplicate binding for an address for rust-server (#22116)
* Removed a duplicate binding for an address for rust-server. The address binding happens higher up in the method.

* Updated samples.
2025-10-16 17:04:41 +08:00
jheyens
ce1e9e0866 Jersey2/3: Fixes a bug in OAuth token renewal, where the previous HTTP 401 code is reused even after the retry succeeds (#22134)
* Jersey2/3: Fix a bug where, when using OAuth, the HTTP 401 status code persisted even if the second request after renewing the Bearer access token succeeded

* Jersey2/3: Regenerate samples
2025-10-16 16:32:05 +08:00
Adnan
fc12a1b63a feat(rust-axum): make the Object value public (#22144)
* feat(rust-axum): make the Object value public

* feat(rust-axum): regenerate samples
2025-10-16 15:01:19 +08:00
William Cheng
bce0ea65fe CircleCI: clean up unused tests/setup (#22158)
* clean up circleci tests

* ignore .angular

* trigger build failure

* Revert "trigger build failure"

This reverts commit ee228266b1.
2025-10-16 14:50:41 +08:00
Linh Tran Tuan
117042aa44 [Rust-Axum] Fix wrong validation for non-model Body (#22155)
* Fix Issue 21143

* Update
2025-10-16 14:25:01 +08:00
10954 changed files with 162356 additions and 44230 deletions

View File

@@ -19,6 +19,7 @@ jobs:
with:
java-version: 11
distribution: 'temurin'
cache: gradle
- name: Cache maven dependencies
uses: actions/cache@v4
env:

View File

@@ -37,6 +37,7 @@ jobs:
with:
distribution: 'temurin'
java-version: 11
cache: gradle
# Cache Gradle Dependencies
- name: Setup Gradle Dependencies Cache
uses: actions/cache@v4

View File

@@ -27,6 +27,7 @@ jobs:
with:
distribution: 'temurin'
java-version: ${{ matrix.java }}
cache: gradle
- uses: actions/cache@v4
with:
@@ -61,7 +62,7 @@ jobs:
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
- name: Upload Maven build artifact
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v5
if: matrix.java == '11' && matrix.os == 'ubuntu-latest'
with:
name: artifact
@@ -95,8 +96,9 @@ jobs:
with:
java-version: 11
maven-version: 3.8.8
cache: gradle
- name: Download build artifact
uses: actions/download-artifact@v5
uses: actions/download-artifact@v6
with:
name: artifact
- name: Run Ensures Script

View File

@@ -21,6 +21,7 @@ jobs:
with:
java-version: 11
distribution: 'temurin'
cache: gradle
- name: Cache maven dependencies
uses: actions/cache@v4
env:
@@ -41,7 +42,7 @@ jobs:
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
- run: ls -la modules/openapi-generator-cli/target
- name: Upload openapi-generator-cli.jar artifact
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v5
with:
name: openapi-generator-cli.jar
path: modules/openapi-generator-cli/target/openapi-generator-cli.jar
@@ -59,6 +60,7 @@ jobs:
with:
java-version: 11
distribution: 'temurin'
cache: gradle
- name: Cache maven dependencies
uses: actions/cache@v4
env:
@@ -79,7 +81,7 @@ jobs:
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
- name: Publish unit test reports
if: ${{ always() }}
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v5
with:
name: surefire-test-results
path: '**/surefire-reports/TEST-*.xml'
@@ -97,7 +99,7 @@ jobs:
java-version: 11
distribution: 'temurin'
- name: Download openapi-generator-cli.jar artifact
uses: actions/download-artifact@v5
uses: actions/download-artifact@v6
with:
name: openapi-generator-cli.jar
path: modules/openapi-generator-cli/target
@@ -136,7 +138,7 @@ jobs:
java-version: 11
distribution: 'temurin'
- name: Download openapi-generator-cli.jar artifact
uses: actions/download-artifact@v5
uses: actions/download-artifact@v6
with:
name: openapi-generator-cli.jar
path: modules/openapi-generator-cli/target

View File

@@ -26,7 +26,7 @@ jobs:
- samples/server/petstore/aspnet/fastendpoints-useValidators
steps:
- uses: actions/checkout@v5
- uses: actions/setup-dotnet@v5.0.0
- uses: actions/setup-dotnet@v5.0.1
with:
dotnet-version: '8.0.x'
- name: Build

37
.github/workflows/samples-crystal.yaml vendored Normal file
View File

@@ -0,0 +1,37 @@
name: Samples Crystal clients
on:
push:
paths:
- samples/client/petstore/crystal/**
pull_request:
paths:
- samples/client/petstore/crystal/**
jobs:
build:
name: Build Crystal projects
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
sample:
# clients
- samples/client/petstore/crystal/
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: Install Crystal
uses: crystal-lang/install-crystal@v1
- name: Shards Install
run: shards install
working-directory: ${{ matrix.sample }}
- name: Run tests
run: crystal spec
working-directory: ${{ matrix.sample }}

View File

@@ -26,7 +26,7 @@ jobs:
- samples/client/petstore/csharp/restsharp/standard2.0/Petstore/
steps:
- uses: actions/checkout@v5
- uses: actions/setup-dotnet@v5.0.0
- uses: actions/setup-dotnet@v5.0.1
with:
dotnet-version: '7.0.x'
- name: Build

View File

@@ -28,7 +28,7 @@ jobs:
# - samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/
steps:
- uses: actions/checkout@v5
- uses: actions/setup-dotnet@v5.0.0
- uses: actions/setup-dotnet@v5.0.1
with:
dotnet-version: 3.1.*
- name: Build

View File

@@ -25,7 +25,7 @@ jobs:
- samples/server/petstore/aspnetcore-6.0-useSwashBuckle
steps:
- uses: actions/checkout@v5
- uses: actions/setup-dotnet@v5.0.0
- uses: actions/setup-dotnet@v5.0.1
with:
dotnet-version: '6.0.x'
- name: Build

View File

@@ -43,7 +43,7 @@ jobs:
- samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/
steps:
- uses: actions/checkout@v5
- uses: actions/setup-dotnet@v5.0.0
- uses: actions/setup-dotnet@v5.0.1
with:
dotnet-version: '7.0.x'
- name: Build

View File

@@ -19,7 +19,7 @@ jobs:
- samples/client/echo_api/csharp/restsharp/net8/EchoApi
steps:
- uses: actions/checkout@v5
- uses: actions/setup-dotnet@v5.0.0
- uses: actions/setup-dotnet@v5.0.1
with:
dotnet-version: '8.0.x'
- name: Run echo server

View File

@@ -19,7 +19,7 @@ jobs:
- samples/client/petstore/csharp/restsharp/net8/useVirtualForHooks/
steps:
- uses: actions/checkout@v5
- uses: actions/setup-dotnet@v5.0.0
- uses: actions/setup-dotnet@v5.0.1
with:
dotnet-version: '8.0.x'
- name: Build

View File

@@ -26,7 +26,7 @@ jobs:
- samples/server/petstore/aspnetcore-8.0-use-centralized-package-version-management
steps:
- uses: actions/checkout@v5
- uses: actions/setup-dotnet@v5.0.0
- uses: actions/setup-dotnet@v5.0.1
with:
dotnet-version: '8.0.x'
- name: Build

View File

@@ -34,7 +34,7 @@ jobs:
- samples/client/petstore/csharp/generichost/net8/UseDateTimeForDate
steps:
- uses: actions/checkout@v5
- uses: actions/setup-dotnet@v5.0.0
- uses: actions/setup-dotnet@v5.0.1
with:
dotnet-version: '8.0.x'
- name: Build

View File

@@ -48,7 +48,7 @@ jobs:
#- samples/client/petstore/csharp/unityWebRequest/net9/Petstore
steps:
- uses: actions/checkout@v5
- uses: actions/setup-dotnet@v5.0.0
- uses: actions/setup-dotnet@v5.0.1
with:
dotnet-version: '9.0.101'
- name: Build

View File

@@ -26,6 +26,7 @@ jobs:
with:
distribution: 'temurin'
java-version: 8
cache: gradle
- name: Cache maven dependencies
uses: actions/cache@v4
env:

View File

@@ -61,6 +61,7 @@ jobs:
- samples/client/petstore/java/native
- samples/client/petstore/java/native-async
- samples/client/petstore/java/native-jakarta
- samples/client/petstore/java/native-useGzipFeature
- samples/client/petstore/java/retrofit2
- samples/client/petstore/java/retrofit2rx2
- samples/client/petstore/java/retrofit2rx3
@@ -118,6 +119,7 @@ jobs:
with:
distribution: 'temurin'
java-version: 11
cache: gradle
- name: Cache maven dependencies
uses: actions/cache@v4
env:

View File

@@ -42,6 +42,7 @@ jobs:
with:
distribution: 'temurin'
java-version: 17
cache: gradle
- name: Cache maven dependencies
uses: actions/cache@v4
env:

View File

@@ -34,6 +34,9 @@ jobs:
- samples/server/petstore/jaxrs-cxf-cdi
- samples/server/petstore/jaxrs-cxf-non-spring-app
- samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations
- samples/server/petstore/jaxrs-spec-swagger-annotations
- samples/server/petstore/jaxrs-spec-swagger-v3-annotations-jakarta
- samples/server/petstore/jaxrs-spec-swagger-v3-annotations
steps:
- uses: actions/checkout@v5
- uses: actions/setup-java@v5

View File

@@ -44,6 +44,7 @@ jobs:
- samples/client/petstore/kotlin-threetenbp
- samples/client/petstore/kotlin-kotlinx-datetime
- samples/client/petstore/kotlin-uppercase-enum
- samples/client/petstore/kotlin-array-integer-enum
- samples/client/petstore/kotlin-default-values-jvm-okhttp4
- samples/client/petstore/kotlin-default-values-jvm-retrofit2
- samples/client/petstore/kotlin-default-values-jvm-volley
@@ -71,12 +72,14 @@ jobs:
- samples/client/others/kotlin-jvm-okhttp-path-comments
- samples/client/others/kotlin-integer-enum
- samples/client/petstore/kotlin-allOf-discriminator-kotlinx-serialization
- samples/client/others/kotlin-oneOf-discriminator-kotlinx-serialization
steps:
- uses: actions/checkout@v5
- uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: 11
cache: gradle
- name: Cache maven dependencies
uses: actions/cache@v4
env:

View File

@@ -26,6 +26,7 @@ jobs:
with:
distribution: 'temurin'
java-version: 17
cache: gradle
- name: Cache maven dependencies
uses: actions/cache@v4
env:

View File

@@ -8,6 +8,7 @@ on:
- 'samples/server/petstore/kotlin-server-modelMutable/**'
- 'samples/server/petstore/kotlin-springboot-*/**'
- 'samples/server/petstore/kotlin-server-required-and-nullable-properties/**'
- 'samples/server/petstore/kotlin-spring-declarative*/**'
# comment out due to gradle build failure
# - samples/server/petstore/kotlin-spring-default/**
pull_request:
@@ -17,6 +18,7 @@ on:
- 'samples/server/petstore/kotlin-server-modelMutable/**'
- 'samples/server/petstore/kotlin-springboot-*/**'
- 'samples/server/petstore/kotlin-server-required-and-nullable-properties/**'
- 'samples/server/petstore/kotlin-spring-declarative*/**'
# comment out due to gradle build failure
# - samples/server/petstore/kotlin-spring-default/**
@@ -34,6 +36,7 @@ jobs:
# server
- samples/server/petstore/kotlin-server-required-and-nullable-properties
- samples/server/petstore/kotlin-springboot-3
- samples/server/petstore/kotlin-springboot-3-no-response-entity
- samples/server/petstore/kotlin-springboot-additionalproperties
- samples/server/petstore/kotlin-springboot-delegate-nodefaults
- samples/server/petstore/kotlin-springboot-request-cookie
@@ -44,6 +47,10 @@ jobs:
- samples/server/petstore/kotlin-server/ktor
- samples/server/petstore/kotlin-server/ktor2
- samples/server/petstore/kotlin-misk
- samples/server/petstore/kotlin-spring-declarative-interface
- samples/server/petstore/kotlin-spring-declarative-interface-reactive-coroutines
- samples/server/petstore/kotlin-spring-declarative-interface-reactive-reactor-wrapped
- samples/server/petstore/kotlin-spring-declarative-interface-wrapped
# comment out due to gradle build failure
# - samples/server/petstore/kotlin-spring-default/
steps:
@@ -52,6 +59,7 @@ jobs:
with:
distribution: 'temurin'
java-version: 17
cache: gradle
- name: Cache maven dependencies
uses: actions/cache@v4
env:

View File

@@ -32,6 +32,7 @@ jobs:
with:
distribution: 'temurin'
java-version: 21
cache: gradle
- name: Cache maven dependencies
uses: actions/cache@v4
env:

View File

@@ -29,6 +29,8 @@ jobs:
sample:
# server
- samples/server/petstore/kotlin-springboot
- samples/server/petstore/kotlin-springboot-no-response-entity
- samples/server/petstore/kotlin-springboot-no-response-entity-delegate
- samples/server/petstore/kotlin-springboot-multipart-request-model
- samples/server/petstore/kotlin-springboot-bigdecimal-default
- samples/server/petstore/kotlin-springboot-delegate
@@ -39,6 +41,7 @@ jobs:
- 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-springboot-include-http-request-context-delegate
- samples/server/petstore/kotlin-server/ktor
- samples/server/petstore/kotlin-server/ktor2
- samples/server/petstore/kotlin-server/jaxrs-spec
@@ -59,7 +62,8 @@ jobs:
- uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: 8
java-version: 11
cache: gradle
- name: Cache maven dependencies
uses: actions/cache@v4
env:

View File

@@ -39,7 +39,10 @@ jobs:
- name: Build
working-directory: ${{ matrix.sample }}
run: cargo build --all-targets --all-features
run: |
set -e
cargo build --all-targets --all-features
cargo build --all-targets --no-default-features
- name: Tests
working-directory: ${{ matrix.sample }}
run: |

View File

@@ -35,7 +35,7 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v5
- uses: swift-actions/setup-swift@v2
- uses: swift-actions/setup-swift@v3
if: ${{ matrix.os == 'ubuntu-latest' }}
with:
swift-version: '5'

View File

@@ -4,6 +4,7 @@ on:
push:
paths:
- samples/client/others/typescript-angular/**
- samples/client/others/typescript-angular-v20/**
# comment out angular released before Nov 2023
#- samples/client/petstore/typescript-angular-v12-provided-in-root/**
#- samples/client/petstore/typescript-angular-v13-provided-in-root/**
@@ -43,6 +44,7 @@ on:
pull_request:
paths:
- samples/client/others/typescript-angular/**
- samples/client/others/typescript-angular-v20/**
#- samples/client/petstore/typescript-angular-v12-provided-in-root/**
#- samples/client/petstore/typescript-angular-v13-provided-in-root/**
#- samples/client/petstore/typescript-angular-v14-provided-in-root/**
@@ -92,6 +94,7 @@ jobs:
- "20.x"
sample:
- samples/client/others/typescript-angular/
- samples/client/others/typescript-angular-v20/
#- samples/client/petstore/typescript-angular-v12-provided-in-root/
#- samples/client/petstore/typescript-angular-v13-provided-in-root/
#- samples/client/petstore/typescript-angular-v14-provided-in-root/

View File

@@ -16,9 +16,9 @@ jobs:
# clients
- samples/client/others/typescript/encode-decode/test
node-version:
- 16
- 18
- 20
- 22
- 24
steps:
- uses: actions/checkout@v5

View File

@@ -24,6 +24,7 @@ jobs:
with:
java-version: ${{ matrix.java }}
distribution: 'temurin'
cache: gradle
- name: Cache maven dependencies
uses: actions/cache@v4
env:

2
.gitignore vendored
View File

@@ -49,6 +49,8 @@ nb-configuration.xml
*.xml~
*.t~
**/.angular
/target
/generated-files
test-output/

View File

@@ -11,43 +11,15 @@ export NODE_ENV=test
if [ "$NODE_INDEX" = "1" ]; then
echo "Running node $NODE_INDEX ..."
java -version
sudo apt-get -y install cpanminus
# install rust
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
source "$HOME/.cargo/env"
echo "Testing perl"
(cd samples/client/petstore/perl && /bin/bash ./test.bash)
echo "Testing ruby"
(cd samples/client/petstore/ruby && mvn integration-test)
(cd samples/client/petstore/ruby-faraday && mvn integration-test)
(cd samples/client/petstore/ruby-httpx && mvn integration-test)
(cd samples/client/petstore/ruby-autoload && mvn integration-test)
echo "Testing rust"
(cd samples/server/petstore/rust-axum && mvn integration-test)
elif [ "$NODE_INDEX" = "2" ]; then
echo "Running node $NODE_INDEX to test Go"
# install haskell
#curl -sSLk https://get.haskellstack.org/ | sh
#stack upgrade
#stack --version
# install curl
#sudo apt-get -y build-dep libcurl4-gnutls-dev
#sudo apt-get -y install libcurl4-gnutls-dev
# Install golang version 1.18
go version
sudo mkdir /usr/local/go1.18
wget -c https://dl.google.com/go/go1.18.linux-amd64.tar.gz -O - | sudo tar -xz -C /usr/local/go1.18
export PATH="/usr/local/go1.18/go/bin:$PATH"
go version
echo "Running node $NODE_INDEX to test cpp-restsdk"
# install cpprestsdk
sudo apt-get install libcpprest-dev
@@ -62,54 +34,15 @@ elif [ "$NODE_INDEX" = "3" ]; then
echo "Running node $NODE_INDEX ... "
## Install node@stable (for angular 6)
#set +e
#curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash
#export NVM_DIR="/opt/circleci/.nvm"
#[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
##nvm install stable
## install v16 instead of the latest stable version
#nvm install 18
#nvm alias default 18
#node --version
## Each step uses the same `$BASH_ENV`, so need to modify it
#echo 'export NVM_DIR="/opt/circleci/.nvm"' >> $BASH_ENV
#echo "[ -s \"$NVM_DIR/nvm.sh\" ] && . \"$NVM_DIR/nvm.sh\"" >> $BASH_ENV
#(cd samples/client/others/typescript-angular && mvn integration-test)
#(cd samples/client/petstore/typescript-angular-v12-provided-in-root && mvn integration-test)
#(cd samples/client/petstore/typescript-angular-v13-provided-in-root && mvn integration-test)
#(cd samples/client/petstore/typescript-angular-v14-provided-in-root && mvn integration-test)
#(cd samples/client/petstore/typescript-angular-v15-provided-in-root && mvn integration-test)
#(cd samples/client/petstore/typescript-angular-v16-provided-in-root && mvn integration-test)
#(cd samples/client/petstore/typescript-angular-v17-provided-in-root && mvn integration-test)
#(cd samples/client/petstore/typescript-angular-v18-provided-in-root && mvn integration-test)
#(cd samples/client/petstore/typescript-angular-v19-provided-in-root && mvn integration-test)
#(cd samples/openapi3/client/petstore/typescript/builds/default && mvn integration-test)
#(cd samples/openapi3/client/petstore/typescript/tests/default && mvn integration-test)
#(cd samples/openapi3/client/petstore/typescript/builds/jquery && mvn integration-test)
#(cd samples/openapi3/client/petstore/typescript/tests/jquery && mvn integration-test)
#(cd samples/openapi3/client/petstore/typescript/builds/object_params && mvn integration-test)
#(cd samples/openapi3/client/petstore/typescript/tests/object_params && mvn integration-test)
#(cd samples/openapi3/client/petstore/typescript/builds/inversify && mvn integration-test)
#(cd samples/openapi3/client/petstore/typescript/tests/inversify && mvn integration-test)
##(cd samples/openapi3/client/petstore/typescript/tests/deno && mvn integration-test)
#(cd samples/openapi3/client/petstore/typescript/builds/browser && mvn integration-test)
#(cd samples/openapi3/client/petstore/typescript/tests/browser && mvn integration-test)
#(cd samples/openapi3/client/petstore/typescript/builds/nullable-enum && mvn integration-test)
#(cd samples/client/petstore/typescript-fetch/builds/default && mvn integration-test)
#(cd samples/client/petstore/typescript-fetch/builds/es6-target && mvn integration-test)
#(cd samples/client/petstore/typescript-fetch/builds/with-npm-version && mvn integration-test)
#(cd samples/client/petstore/typescript-fetch/tests/default && mvn integration-test)
#(cd samples/client/petstore/typescript-node/npm && mvn integration-test)
#(cd samples/client/petstore/typescript-rxjs/builds/with-npm-version && mvn integration-test)
#(cd samples/client/petstore/typescript-axios/builds/with-npm-version && mvn integration-test)
#(cd samples/client/petstore/typescript-axios/tests/default && mvn integration-test)
#(cd samples/client/petstore/typescript-axios/tests/with-complex-headers && mvn integration-test)
echo "Testing ruby"
(cd samples/client/petstore/ruby && mvn integration-test)
(cd samples/client/petstore/ruby-faraday && mvn integration-test)
(cd samples/client/petstore/ruby-httpx && mvn integration-test)
(cd samples/client/petstore/ruby-autoload && mvn integration-test)
else
echo "Running node $NODE_INDEX ..."
java -version
./mvnw clean install
fi

View File

@@ -15,7 +15,7 @@
<div align="center">
[Master](https://github.com/OpenAPITools/openapi-generator/tree/master) (`7.17.0`):
[Master](https://github.com/OpenAPITools/openapi-generator/tree/master) (`7.18.0`):
[![Integration Test2](https://circleci.com/gh/OpenAPITools/openapi-generator.svg?style=shield)](https://circleci.com/gh/OpenAPITools/openapi-generator)
[![Bitrise](https://img.shields.io/bitrise/4a2b10a819d12b67/master?label=bitrise%3A%20Swift+4,5&token=859FMDR8QHwabCzwvZK6vQ)](https://app.bitrise.io/app/4a2b10a819d12b67)
@@ -148,8 +148,8 @@ The OpenAPI Specification has undergone 3 revisions since initial creation in 20
| OpenAPI Generator Version | Release Date | Notes |
| --------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------ | ------------------------------------------------- |
| 7.17.0 (upcoming minor release) [SNAPSHOT](https://github.com/OpenAPITools/openapi-generator/wiki/FAQ#how-to-test-with-the-latest-master-of-openapi-generator) | 24.10.2025 | Minor release with breaking changes (with fallback) |
| [7.16.0](https://github.com/OpenAPITools/openapi-generator/releases/tag/v7.16.0) (latest stable release) | 28.09.2025 | Minor release with breaking changes (with fallback) |
| 7.18.0 (upcoming minor release) [SNAPSHOT](https://github.com/OpenAPITools/openapi-generator/wiki/FAQ#how-to-test-with-the-latest-master-of-openapi-generator) | 10.12.2025 | Minor release with breaking changes (with fallback) |
| [7.17.0](https://github.com/OpenAPITools/openapi-generator/releases/tag/v7.17.0) (latest stable release) | 29.10.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) |
@@ -212,16 +212,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.16.0/openapi-generator-cli-7.16.0.jar`
JAR location: `https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.17.0/openapi-generator-cli-7.17.0.jar`
For **Mac/Linux** users:
```sh
wget https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.16.0/openapi-generator-cli-7.16.0.jar -O openapi-generator-cli.jar
wget https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.17.0/openapi-generator-cli-7.17.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.16.0/openapi-generator-cli-7.16.0.jar
Invoke-WebRequest -OutFile openapi-generator-cli.jar https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.17.0/openapi-generator-cli-7.17.0.jar
```
After downloading the JAR, run `java -jar openapi-generator-cli.jar help` to show the usage.
@@ -456,7 +456,7 @@ openapi-generator-cli version
To use a specific version of "openapi-generator-cli"
```sh
openapi-generator-cli version-manager set 7.16.0
openapi-generator-cli version-manager set 7.17.0
```
Or install it as dev-dependency:
@@ -480,7 +480,7 @@ pip install openapi-generator-cli
To install a specific version
```
pip install openapi-generator-cli==7.16.0
pip install openapi-generator-cli==7.17.0
```
You can also install with [jdk4py](https://github.com/activeviam/jdk4py) instead of java binary. (python>=3.10 is required)
@@ -506,7 +506,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.16.0/openapi-generator-cli-7.16.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.17.0/openapi-generator-cli-7.17.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`
@@ -1182,6 +1182,7 @@ Here is a list of template creators:
* Scala Finch: @jimschubert [:heart:](https://www.patreon.com/jimschubert)
* Scala Lagom: @gmkumar2005
* Scala Play: @adigerber
* TypeScript NestJS: @aryobenholzner
* Documentation
* AsciiDoc: @man-at-home
* HTML Doc 2: @jhitchcock

View File

@@ -6,6 +6,7 @@ additionalProperties:
shardVersion: 1.0.0
moduleName: Petstore
shardName: petstore
#paramsEncoder: Crest::EnumeratedFlatParamsEncoder
strictSpecBehavior: false
modelNameMappings:
PropertyNameMapping: AnotherPropertyNameMapping

View File

@@ -0,0 +1,9 @@
generatorName: java
outputDir: samples/client/petstore/java/native-useGzipFeature
library: native
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore-addpet-only.yaml
templateDir: modules/openapi-generator/src/main/resources/Java
additionalProperties:
artifactId: petstore-native-useGzipFeature
hideGenerationTimestamp: "true"
useJakartaEe: "true"

View File

@@ -0,0 +1,11 @@
generatorName: jaxrs-spec
outputDir: samples/server/petstore/jaxrs-spec-swagger-annotations
inputSpec: modules/openapi-generator/src/test/resources/3_0/jaxrs-spec/petstore-with-fake-endpoints-models-for-testing.yaml
templateDir: modules/openapi-generator/src/main/resources/JavaJaxRS/spec
additionalProperties:
artifactId: jaxrs-spec-petstore-server
serializableModel: "true"
hideGenerationTimestamp: "true"
implicitHeadersRegex: (api_key|enum_header_string)
generateBuilders: "true"
useSwaggerAnnotations: "true"

View File

@@ -0,0 +1,12 @@
generatorName: jaxrs-spec
outputDir: samples/server/petstore/jaxrs-spec-swagger-v3-annotations-jakarta
inputSpec: modules/openapi-generator/src/test/resources/3_0/jaxrs-spec/petstore-with-fake-endpoints-models-for-testing.yaml
templateDir: modules/openapi-generator/src/main/resources/JavaJaxRS/spec
additionalProperties:
artifactId: jaxrs-spec-petstore-server-jakarta-swagger-v3
serializableModel: "true"
hideGenerationTimestamp: "true"
implicitHeadersRegex: (api_key|enum_header_string)
generateBuilders: "true"
useSwaggerV3Annotations: "true"
useJakartaEe: "true"

View File

@@ -0,0 +1,11 @@
generatorName: jaxrs-spec
outputDir: samples/server/petstore/jaxrs-spec-swagger-v3-annotations
inputSpec: modules/openapi-generator/src/test/resources/3_0/jaxrs-spec/petstore-with-fake-endpoints-models-for-testing.yaml
templateDir: modules/openapi-generator/src/main/resources/JavaJaxRS/spec
additionalProperties:
artifactId: jaxrs-spec-petstore-server
serializableModel: "true"
hideGenerationTimestamp: "true"
implicitHeadersRegex: (api_key|enum_header_string)
generateBuilders: "true"
useSwaggerV3Annotations: "true"

View File

@@ -0,0 +1,8 @@
generatorName: kotlin
outputDir: samples/client/petstore/kotlin-array-integer-enum
inputSpec: modules/openapi-generator/src/test/resources/3_0/kotlin/issue15204-int-array-enum.yaml
templateDir: modules/openapi-generator/src/main/resources/kotlin-client
additionalProperties:
artifactId: kotlin-array-integer-enum
serializableModel: "true"
dateLibrary: java8

View File

@@ -0,0 +1,12 @@
generatorName: kotlin
outputDir: samples/client/others/kotlin-oneOf-discriminator-kotlinx-serialization
inputSpec: modules/openapi-generator/src/test/resources/3_0/kotlin/polymorphism-oneof-discriminator.yaml
templateDir: modules/openapi-generator/src/main/resources/kotlin-client
additionalProperties:
artifactId: kotlin-oneOf-discriminator
serializableModel: "false"
dateLibrary: java8
library: jvm-retrofit2
enumUnknownDefaultCase: true
serializationLibrary: kotlinx_serialization
generateOneOfAnyOfWrappers: true

View File

@@ -0,0 +1,14 @@
generatorName: kotlin-spring
outputDir: samples/server/petstore/kotlin-springboot-3-no-response-entity
library: spring-boot
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml
templateDir: modules/openapi-generator/src/main/resources/kotlin-spring
additionalProperties:
documentationProvider: none
annotationLibrary: none
useSwaggerUI: "false"
serviceImplementation: "true"
serializableModel: "true"
beanValidations: "true"
useSpringBoot3: "true"
requestMappingMode: api_interface

View File

@@ -0,0 +1,17 @@
generatorName: kotlin-spring
outputDir: samples/server/petstore/kotlin-springboot-include-http-request-context-delegate
library: spring-boot
inputSpec: modules/openapi-generator/src/test/resources/3_0/kotlin/petstore-with-x-kotlin-implements.yaml
templateDir: modules/openapi-generator/src/main/resources/kotlin-spring
additionalProperties:
documentationProvider: none
annotationLibrary: swagger1
useSwaggerUI: false
serviceImplementation: false
skipDefaultInterface: true
interfaceOnly: false
serializableModel: true
beanValidations: true
includeHttpRequestContext: true
reactive: true
delegatePattern: true

View File

@@ -0,0 +1,15 @@
generatorName: kotlin-spring
outputDir: samples/server/petstore/kotlin-springboot-no-response-entity-delegate
library: spring-boot
inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml
templateDir: modules/openapi-generator/src/main/resources/kotlin-spring
additionalProperties:
documentationProvider: none
annotationLibrary: none
useSwaggerUI: "false"
serviceImplementation: "true"
serializableModel: "true"
beanValidations: "true"
useResponseEntity: "false"
delegatePattern: true
requestMappingMode: controller

View File

@@ -0,0 +1,14 @@
generatorName: kotlin-spring
outputDir: samples/server/petstore/kotlin-springboot-no-response-entity
library: spring-boot
inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml
templateDir: modules/openapi-generator/src/main/resources/kotlin-spring
additionalProperties:
documentationProvider: none
annotationLibrary: none
useSwaggerUI: "false"
serviceImplementation: "true"
serializableModel: "true"
beanValidations: "true"
useResponseEntity: "false"
requestMappingMode: controller

View File

@@ -5,10 +5,11 @@ inputSpec: modules/openapi-generator/src/test/resources/3_0/kotlin/petstore-with
templateDir: modules/openapi-generator/src/main/resources/kotlin-spring
additionalProperties:
documentationProvider: none
annotationLibrary: none
useSwaggerUI: "false"
serviceImplementation: "false"
skipDefaultInterface: "true"
interfaceOnly: "true"
serializableModel: "true"
beanValidations: "true"
annotationLibrary: swagger1
useSwaggerUI: false
serviceImplementation: false
skipDefaultInterface: true
interfaceOnly: true
serializableModel: true
beanValidations: true
includeHttpRequestContext: true

View File

@@ -0,0 +1,16 @@
generatorName: kotlin-spring
outputDir: samples/server/petstore/kotlin-spring-declarative-interface-reactive-coroutines
library: spring-declarative-http-interface
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml
templateDir: modules/openapi-generator/src/main/resources/kotlin-spring
additionalProperties:
documentationProvider: springDoc
annotationLibrary: swagger2
useSwaggerUI: "false"
serializableModel: "true"
beanValidations: "true"
interfaceOnly: true
reactive: true
useResponseEntity: false
useFlowForArrayReturnType: false
declarativeInterfaceReactiveMode: "coroutines"

View File

@@ -0,0 +1,16 @@
generatorName: kotlin-spring
outputDir: samples/server/petstore/kotlin-spring-declarative-interface-reactive-reactor-wrapped
library: spring-declarative-http-interface
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml
templateDir: modules/openapi-generator/src/main/resources/kotlin-spring
additionalProperties:
documentationProvider: springDoc
annotationLibrary: swagger2
useSwaggerUI: "false"
serializableModel: "true"
beanValidations: "true"
interfaceOnly: true
reactive: true
useResponseEntity: true
useFlowForArrayReturnType: false
declarativeInterfaceReactiveMode: "reactor"

View File

@@ -0,0 +1,15 @@
generatorName: kotlin-spring
outputDir: samples/server/petstore/kotlin-spring-declarative-interface-wrapped
library: spring-declarative-http-interface
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml
templateDir: modules/openapi-generator/src/main/resources/kotlin-spring
additionalProperties:
documentationProvider: springDoc
annotationLibrary: swagger2
useSwaggerUI: "false"
serializableModel: "true"
beanValidations: "true"
interfaceOnly: true
reactive: false
useResponseEntity: true
useFlowForArrayReturnType: false

View File

@@ -0,0 +1,15 @@
generatorName: kotlin-spring
outputDir: samples/server/petstore/kotlin-spring-declarative-interface
library: spring-declarative-http-interface
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml
templateDir: modules/openapi-generator/src/main/resources/kotlin-spring
additionalProperties:
documentationProvider: springDoc
annotationLibrary: swagger2
useSwaggerUI: "false"
serializableModel: "true"
beanValidations: "true"
interfaceOnly: true
reactive: false
useResponseEntity: true
useFlowForArrayReturnType: false

View File

@@ -6,7 +6,7 @@ library: httpx
additionalProperties:
packageName: petstore_api
mapNumberTo: float
poetry1: true
poetry1: false
nameMappings:
_type: underscore_type
type_: type_with_underscore

View File

@@ -0,0 +1,8 @@
generatorName: rust
outputDir: samples/client/others/rust/reqwest/enum-query-params
library: reqwest
inputSpec: modules/openapi-generator/src/test/resources/3_0/rust/enum-query-params.yaml
templateDir: modules/openapi-generator/src/main/resources/rust
additionalProperties:
supportAsync: true
packageName: enum-query-params-reqwest

View File

@@ -5,6 +5,7 @@ inputSpec: modules/openapi-generator/src/test/resources/3_0/rust/petstore.yaml
templateDir: modules/openapi-generator/src/main/resources/rust
additionalProperties:
supportAsync: true
useAsyncFileStream: true
supportMiddleware: true
supportMultipleResponses: true
packageName: petstore-reqwest-async-middleware

View File

@@ -5,6 +5,7 @@ inputSpec: modules/openapi-generator/src/test/resources/3_0/rust/petstore.yaml
templateDir: modules/openapi-generator/src/main/resources/rust
additionalProperties:
supportAsync: true
useAsyncFileStream: true
supportTokenSource: true
supportMultipleResponses: true
packageName: petstore-reqwest-async-tokensource

View File

@@ -5,6 +5,7 @@ inputSpec: modules/openapi-generator/src/test/resources/3_0/rust/petstore.yaml
templateDir: modules/openapi-generator/src/main/resources/rust
additionalProperties:
supportAsync: true
useAsyncFileStream: true
supportMultipleResponses: true
packageName: petstore-reqwest-async
useSingleRequestParameter: true

View File

@@ -5,6 +5,7 @@ inputSpec: modules/openapi-generator/src/test/resources/3_0/rust/petstore.yaml
templateDir: modules/openapi-generator/src/main/resources/rust
additionalProperties:
supportAsync: true
useAsyncFileStream: true
supportMultipleResponses: true
avoidBoxedModels: true
packageName: petstore-reqwest-avoid-box

View File

@@ -0,0 +1,11 @@
generatorName: rust
outputDir: samples/client/petstore/rust/reqwest/petstore-serde-path-to-error
library: reqwest
inputSpec: modules/openapi-generator/src/test/resources/3_0/rust/petstore.yaml
templateDir: modules/openapi-generator/src/main/resources/rust
additionalProperties:
packageName: petstore-reqwest-serde-path-to-error
useAsyncFileStream: true
useSerdePathToError: true
enumNameMappings:
delivered: shipped

View File

@@ -1,8 +0,0 @@
generatorName: typescript-angular
outputDir: samples/client/petstore/typescript-angular-v19/builds/deep-object
inputSpec: modules/openapi-generator/src/test/resources/3_0/deep-object-query.yaml
templateDir: modules/openapi-generator/src/main/resources/typescript-angular
additionalProperties:
ngVersion: 19.0.0
npmName: sample-angular-19-0-0-deep-object
supportsES6: true

View File

@@ -0,0 +1,8 @@
generatorName: typescript-angular
outputDir: samples/client/others/typescript-angular-v20/builds/query-param-deep-object
inputSpec: modules/openapi-generator/src/test/resources/3_0/query-param-deep-object.yaml
templateDir: modules/openapi-generator/src/main/resources/typescript-angular
additionalProperties:
ngVersion: 20.0.0
npmName: sample-angular-20-0-0-query-param-deep-object
supportsES6: true

View File

@@ -0,0 +1,8 @@
generatorName: typescript-angular
outputDir: samples/client/others/typescript-angular-v20/builds/query-param-form
inputSpec: modules/openapi-generator/src/test/resources/3_0/query-param-form.yaml
templateDir: modules/openapi-generator/src/main/resources/typescript-angular
additionalProperties:
ngVersion: 20.0.0
npmName: sample-angular-20-0-0-query-param-form
supportsES6: true

View File

@@ -0,0 +1,8 @@
generatorName: typescript-angular
outputDir: samples/client/others/typescript-angular-v20/builds/query-param-json
inputSpec: modules/openapi-generator/src/test/resources/3_0/query-param-json.yaml
templateDir: modules/openapi-generator/src/main/resources/typescript-angular
additionalProperties:
ngVersion: 20.0.0
npmName: sample-angular-20-0-0-query-param-json
supportsES6: true

View File

@@ -31,10 +31,10 @@
sha256: 24c6a39a9d7327d397dc038c368a19c84f14ed96a69fe28d53719b3eaf0a725c
- filename: "samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/api/PetApiTest.java"
sha256: 5e9f471d34310f94895751bb96cc79583376f043593c3a387c82077c70f8102f
- filename: "samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/MammalTest.java"
sha256: 67a9e63e13ebddac21cb236aa015edce30f5d3bd8d6adcf50044cad00d48c45e
- filename: "samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/ZebraTest.java"
sha256: 15eeb6d8a9a79d0f1930b861540d9c5780d6c49ea4fdb68269ac3e7ec481e142
- filename: "samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/MammalTest.java"
sha256: a09c120b694788b12f8d73cc0dd307e509ee1744b2ff45c5711b1186c419f915
- filename: "samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/ZebraTest.java"
sha256: 15e509d8cb8e9b050c6418cfbf8a5dced9acc97cf29e5727da9f907c52d11f1e
- filename: "samples/client/petstore/java/okhttp-gson-3.1/src/test/java/org/openapitools/client/api/PetApiTest.java"
sha256: d8f7fff724f81e666daf115cc25f8347e1fda4e861aa30df0dae3fa50c91404c
- filename: "samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/api/PetApiTest.java"
@@ -59,6 +59,6 @@
sha256: 45cdaba3d2adc212cd4f0184ad475419a95e2326254c2ef84175e210c922b2f3
# rust axum test files
- filename: "samples/server/petstore/rust-axum/output/rust-axum-oneof/tests/oneof_with_discriminator.rs"
sha256: 2d4f5a069fdcb3057bb078d5e75b3de63cd477b97725e457079df24bd2c30600
sha256: b2093528aac971193f2863a70f46eea45cf8bda79120b133a614599e80d8b46d
- filename: "samples/server/petstore/rust-axum/output/openapi-v3/tests/oneof_untagged.rs"
sha256: 1d3fb01f65e98290b1d3eece28014c7d3e3f2fdf18e7110249d3c591cc4642ab

View File

@@ -538,6 +538,8 @@ OpenAPI Normalizer transforms the input OpenAPI doc/spec (which may not perfectl
- SIMPLIFY_ONEOF_ANYOF
- SIMPLIFY_BOOLEAN_ENUM
- SIMPLIFY_ONEOF_ANYOF_ENUM
- REFACTOR_ALLOF_WITH_PROPERTIES_ONLY
(One can use `DISABLE_ALL=true` to disable all the rules)
@@ -564,8 +566,7 @@ Example:
java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generate -g java -i modules/openapi-generator/src/test/resources/3_0/simplifyAnyOfStringAndEnumString_test.yaml -o /tmp/java-okhttp/ --openapi-normalizer SIMPLIFY_ANYOF_STRING_AND_ENUM_STRING=true
```
- `SIMPLIFY_ONEOF_ANYOF_ENUM`: when set to true, oneOf/anyOf with only enum sub-schemas all containing enum values will be converted to a single enum
This is enabled by default
- `SIMPLIFY_ONEOF_ANYOF_ENUM`: when set to true, oneOf/anyOf with only enum sub-schemas all containing enum values will be converted to a single enum. This is enabled by default.
Example:
@@ -643,9 +644,16 @@ Example:
java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generate -g java -i modules/openapi-generator/src/test/resources/3_0/required-properties.yaml -o /tmp/java-okhttp/ --openapi-normalizer NORMALIZER_CLASS=org.openapitools.codegen.OpenAPINormalizerTest$RemoveRequiredNormalizer
```
- `REMOVE_PROPERTIES_FROM_TYPE_OTHER_THAN_OBJECT`: When set to true, remove the "properties" of a schema with type other than "object".
Example:
```
java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generate -g java -i modules/openapi-generator/src/test/resources/3_0/required-properties.yaml -o /tmp/java-okhttp/ --openapi-normalizer REMOVE_PROPERTIES_FROM_TYPE_OTHER_THAN_OBJECT=true
```
- `FILTER`
The `FILTER` parameter allows selective inclusion of API operations based on specific criteria. It applies the `x-internal: true` property to operations that do **not** match the specified values, preventing them from being generated.
The `FILTER` parameter allows selective inclusion of API operations based on specific criteria. It applies the `x-internal: true` property to operations that do **not** match the specified values, preventing them from being generated. Multiple filters can be separated by a semicolon.
### Available Filters
@@ -658,6 +666,9 @@ The `FILTER` parameter allows selective inclusion of API operations based on spe
- **`tag`**
When set to `tag:person|basic`, operations **not** tagged with `person` or `basic` will be marked as internal (`x-internal: true`), and will not be generated.
- **`path`**
When set to `path:/v1|/v2`, operations on paths **not** starting with `/v1` or with `/v2` will be marked as internal (`x-internal: true`), and will not be generated.
### Example Usage
```sh
@@ -665,7 +676,7 @@ java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generat
-g java \
-i modules/openapi-generator/src/test/resources/3_0/petstore.yaml \
-o /tmp/java-okhttp/ \
--openapi-normalizer FILTER="operationId:addPet|getPetById"
--openapi-normalizer FILTER="operationId:addPet|getPetById ; tag:store"
```
- `SET_CONTAINER_TO_NULLABLE`: When set to `array|set|map` (or just `array`) for example, it will set `nullable` in array, set and map to true.

View File

@@ -3,6 +3,7 @@ id: generators
title: Generators List
---
[main] INFO o.o.c.l.PythonFastAPIServerCodegen - Skipping sorting of path operations, order matters, let the developer decide via their specification file.
The following generators are available:
## CLIENT generators

View File

@@ -25,6 +25,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true|
|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C# have this enabled by default).|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.</dd></dl>|true|
|moduleName|module name (e.g. TwitterClient| |OpenAPIClient|
|paramsEncoder|params_encoder setting (e.g. Crest::NestedParamsEncoder, Crest::EnumeratedFlatParamsEncoder, Crest::ZeroEnumeratedFlatParamsEncoder| |Crest::NestedParamsEncoder|
|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false|
|shardAuthor|shard author (only one is supported).| |null|
|shardAuthorEmail|shard author email (only one is supported).| |null|

View File

@@ -133,6 +133,9 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|x-spring-paginated|Add `org.springframework.data.domain.Pageable` to controller method. Can be used to handle `page`, `size` and `sort` query parameters. If these query parameters are also specified in the operation spec, they will be removed from the controller method as their values can be obtained from the `Pageable` object.|OPERATION|false
|x-version-param|Marker property that tells that this parameter would be used for endpoint versioning. Applicable for headers & query params. true/false|OPERATION_PARAMETER|null
|x-pattern-message|Add this property whenever you need to customize the invalidation error message for the regex pattern of a variable|FIELD, OPERATION_PARAMETER|null
|x-size-message|Add this property whenever you need to customize the invalidation error message for the size or length of a variable|FIELD, OPERATION_PARAMETER|null
|x-minimum-message|Add this property whenever you need to customize the invalidation error message for the minimum value of a variable|FIELD, OPERATION_PARAMETER|null
|x-maximum-message|Add this property whenever you need to customize the invalidation error message for the maximum value of a variable|FIELD, OPERATION_PARAMETER|null
|x-spring-api-version|Value for 'version' attribute in @RequestMapping (for Spring 7 and above).|OPERATION|null

View File

@@ -105,6 +105,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|useRxJava3|Whether to use the RxJava3 adapter with the retrofit2 library. IMPORTANT: This option has been deprecated.| |false|
|useSealedOneOfInterfaces|Generate the oneOf interfaces as sealed interfaces. Only supported for WebClient and RestClient.| |false|
|useSingleRequestParameter|Setting this property to &quot;true&quot; will generate functions with a single argument containing all API endpoint parameters instead of one argument per parameter. ONLY native, jersey2, jersey3, okhttp-gson, microprofile, Spring RestClient, Spring WebClient support this option. Setting this property to &quot;static&quot; does the same as &quot;true&quot;, but also makes the generated arguments class static with single parameter instantiation.| |false|
|useUnaryInterceptor|If true it will generate ResponseInterceptors using a UnaryOperator. This can be usefull for manipulating the request before it gets passed, for example doing your own decryption| |false|
|webclientBlockingOperations|Making all WebClient operations blocking(sync). Note that if on operation 'x-webclient-blocking: false' then such operation won't be sync| |false|
|withAWSV4Signature|whether to include AWS v4 signature support (only available for okhttp-gson library)| |false|
|withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false|

View File

@@ -105,6 +105,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|useRxJava3|Whether to use the RxJava3 adapter with the retrofit2 library. IMPORTANT: This option has been deprecated.| |false|
|useSealedOneOfInterfaces|Generate the oneOf interfaces as sealed interfaces. Only supported for WebClient and RestClient.| |false|
|useSingleRequestParameter|Setting this property to &quot;true&quot; will generate functions with a single argument containing all API endpoint parameters instead of one argument per parameter. ONLY native, jersey2, jersey3, okhttp-gson, microprofile, Spring RestClient, Spring WebClient support this option. Setting this property to &quot;static&quot; does the same as &quot;true&quot;, but also makes the generated arguments class static with single parameter instantiation.| |false|
|useUnaryInterceptor|If true it will generate ResponseInterceptors using a UnaryOperator. This can be usefull for manipulating the request before it gets passed, for example doing your own decryption| |false|
|webclientBlockingOperations|Making all WebClient operations blocking(sync). Note that if on operation 'x-webclient-blocking: false' then such operation won't be sync| |false|
|withAWSV4Signature|whether to include AWS v4 signature support (only available for okhttp-gson library)| |false|
|withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false|

View File

@@ -84,6 +84,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|useMutiny|Whether to use Smallrye Mutiny instead of CompletionStage for asynchronous computation. Only valid when library is set to quarkus.| |false|
|useOneOfInterfaces|whether to use a java interface to describe a set of oneOf options, where each option is a class that implements the interface| |false|
|useSwaggerAnnotations|Whether to generate Swagger annotations.| |true|
|useSwaggerV3Annotations|Whether to generate Swagger v3 (OpenAPI v3) annotations.| |false|
|useTags|use tags for creating interface and controller classnames| |false|
|withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false|

View File

@@ -85,6 +85,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|useMutiny|Whether to use Smallrye Mutiny instead of CompletionStage for asynchronous computation. Only valid when library is set to quarkus.| |false|
|useOneOfInterfaces|whether to use a java interface to describe a set of oneOf options, where each option is a class that implements the interface| |false|
|useSwaggerAnnotations|Whether to generate Swagger annotations.| |true|
|useSwaggerV3Annotations|Whether to generate Swagger v3 (OpenAPI v3) annotations.| |false|
|useTags|use tags for creating interface and controller classnames| |false|
|withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false|

View File

@@ -27,14 +27,16 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|basePackage|base package (invokerPackage) for generated code| |org.openapitools|
|beanQualifiers|Whether to add fully-qualifier class names as bean qualifiers in @Component and @RestController annotations. May be used to prevent bean names clash if multiple generated libraries (contexts) added to single project.| |false|
|configPackage|configuration package for generated code| |org.openapitools.configuration|
|declarativeInterfaceReactiveMode|What type of reactive style to use in Spring Http declarative interface|<dl><dt>**coroutines**</dt><dd>Use kotlin-idiomatic 'suspend' functions</dd><dt>**reactor**</dt><dd>Use reactor return wrappers 'Mono' and 'Flux'</dd></dl>|coroutines|
|delegatePattern|Whether to generate the server files using the delegate pattern| |false|
|documentationProvider|Select the OpenAPI documentation provider.|<dl><dt>**none**</dt><dd>Do not publish an OpenAPI specification.</dd><dt>**source**</dt><dd>Publish the original input OpenAPI specification.</dd><dt>**springfox**</dt><dd>Generate an OpenAPI 2 (fka Swagger RESTful API Documentation Specification) specification using SpringFox 2.x. Deprecated (for removal); use springdoc instead.</dd><dt>**springdoc**</dt><dd>Generate an OpenAPI 3 specification using SpringDoc.</dd></dl>|springdoc|
|enumPropertyNaming|Naming convention for enum properties: 'camelCase', 'PascalCase', 'snake_case', 'UPPERCASE', and 'original'| |original|
|exceptionHandler|generate default global exception handlers (not compatible with reactive. enabling reactive will disable exceptionHandler )| |true|
|gradleBuildFile|generate a gradle build file using the Kotlin DSL| |true|
|groupId|Generated artifact package's organization (i.e. maven groupId).| |org.openapitools|
|includeHttpRequestContext|Whether to include HttpServletRequest (blocking) or ServerWebExchange (reactive) as additional parameter in generated methods.| |false|
|interfaceOnly|Whether to generate only API interface stubs without the server files.| |false|
|library|library template (sub-template)|<dl><dt>**spring-boot**</dt><dd>Spring-boot Server application.</dd><dt>**spring-cloud**</dt><dd>Spring-Cloud-Feign client with Spring-Boot auto-configured settings.</dd></dl>|spring-boot|
|library|library template (sub-template)|<dl><dt>**spring-boot**</dt><dd>Spring-boot Server application.</dd><dt>**spring-cloud**</dt><dd>Spring-Cloud-Feign client with Spring-Boot auto-configured settings.</dd><dt>**spring-declarative-http-interface**</dt><dd>Spring Declarative Interface client</dd></dl>|spring-boot|
|modelMutable|Create mutable models| |false|
|modelPackage|model package for generated code| |org.openapitools.model|
|packageName|Generated artifact package name.| |org.openapitools|
@@ -53,6 +55,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|useBeanValidation|Use BeanValidation API annotations to validate data types| |true|
|useFeignClientUrl|Whether to generate Feign client with url parameter.| |true|
|useFlowForArrayReturnType|Whether to use Flow for array/collection return types when reactive is enabled. If false, will use List instead.| |true|
|useResponseEntity|Whether (when false) to return actual type (e.g. List&lt;Fruit&gt;) and handle non-happy path responses via exceptions flow or (when true) return entire ResponseEntity (e.g. ResponseEntity&lt;List&lt;Fruit&gt;&gt;). If disabled, method are annotated using a @ResponseStatus annotation, which has the status of the first response declared in the Api definition| |true|
|useSpringBoot3|Generate code and provide dependencies for use with Spring Boot 3.x. (Use jakarta instead of javax in imports). Enabling this option will also enable `useJakartaEe`.| |false|
|useSwaggerUI|Open the OpenApi specification in swagger-ui. Will also import and configure needed dependencies| |true|
|useTags|Whether to use tags for creating interface and controller class names| |false|
@@ -67,6 +70,9 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|x-discriminator-value|Used with model inheritance to specify value for discriminator that identifies current model|MODEL|
|x-field-extra-annotation|List of custom annotations to be added to property|FIELD, OPERATION_PARAMETER|null
|x-pattern-message|Add this property whenever you need to customize the invalidation error message for the regex pattern of a variable|FIELD, OPERATION_PARAMETER|null
|x-size-message|Add this property whenever you need to customize the invalidation error message for the size or length of a variable|FIELD, OPERATION_PARAMETER|null
|x-minimum-message|Add this property whenever you need to customize the invalidation error message for the minimum value of a variable|FIELD, OPERATION_PARAMETER|null
|x-maximum-message|Add this property whenever you need to customize the invalidation error message for the maximum value of a variable|FIELD, OPERATION_PARAMETER|null
|x-kotlin-implements|Ability to specify interfaces that model must implement|MODEL|empty array
|x-kotlin-implements-fields|Specify attributes that are implemented by the interface(s) added via `x-kotlin-implements`|MODEL|empty array

View File

@@ -226,8 +226,8 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|Polymorphism|✗|OAS2,OAS3
|Union|✗|OAS3
|allOf|✗|OAS2,OAS3
|anyOf||OAS3
|oneOf||OAS3
|anyOf||OAS3
|oneOf||OAS3
|not|✗|OAS3
### Security Feature

View File

@@ -55,6 +55,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
<ul class="column-ul">
<li>Dict</li>
<li>List</li>
<li>UUID</li>
<li>bool</li>
<li>bytes</li>
<li>date</li>
@@ -155,7 +156,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|DateTime|✓|OAS2,OAS3
|Password|✓|OAS2,OAS3
|File|✓|OAS2
|Uuid||
|Uuid||
|Array|✓|OAS2,OAS3
|Null|✗|OAS3
|AnyType|✗|OAS2,OAS3

View File

@@ -55,6 +55,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
<ul class="column-ul">
<li>Dict</li>
<li>List</li>
<li>UUID</li>
<li>bool</li>
<li>bytes</li>
<li>date</li>
@@ -155,7 +156,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|DateTime|✓|OAS2,OAS3
|Password|✓|OAS2,OAS3
|File|✓|OAS2
|Uuid||
|Uuid||
|Array|✓|OAS2,OAS3
|Null|✗|OAS3
|AnyType|✗|OAS2,OAS3

View File

@@ -50,6 +50,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
<ul class="column-ul">
<li>Dict</li>
<li>List</li>
<li>UUID</li>
<li>bool</li>
<li>bytes</li>
<li>date</li>
@@ -150,7 +151,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|DateTime|✓|OAS2,OAS3
|Password|✓|OAS2,OAS3
|File|✓|OAS2
|Uuid||
|Uuid||
|Array|✓|OAS2,OAS3
|Null|✗|OAS3
|AnyType|✗|OAS2,OAS3

View File

@@ -55,6 +55,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
<ul class="column-ul">
<li>Dict</li>
<li>List</li>
<li>UUID</li>
<li>bool</li>
<li>bytes</li>
<li>date</li>
@@ -155,7 +156,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|DateTime|✓|OAS2,OAS3
|Password|✓|OAS2,OAS3
|File|✓|OAS2
|Uuid||
|Uuid||
|Array|✓|OAS2,OAS3
|Null|✗|OAS3
|AnyType|✗|OAS2,OAS3

View File

@@ -53,6 +53,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
<ul class="column-ul">
<li>Dict</li>
<li>List</li>
<li>UUID</li>
<li>bool</li>
<li>bytearray</li>
<li>bytes</li>
@@ -155,7 +156,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|DateTime|✓|OAS2,OAS3
|Password|✓|OAS2,OAS3
|File|✓|OAS2
|Uuid||
|Uuid||
|Array|✓|OAS2,OAS3
|Null|✗|OAS3
|AnyType|✗|OAS2,OAS3

View File

@@ -34,6 +34,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|supportTokenSource|If set, add support for google-cloud-token. This option is for 'reqwest' and 'reqwest-trait' library only and requires the 'supportAsync' option| |false|
|topLevelApiClient|Creates a top level `Api` trait and `ApiClient` struct that contain all Apis. This option is for 'reqwest-trait' library only| |false|
|useBonBuilder|Use the bon crate for building parameter types. This option is for the 'reqwest-trait' library only| |false|
|useSerdePathToError|If set, use the serde_path_to_error library to enhance serde error messages. This option is for 'reqwest' and 'reqwest-trait' library only| |false|
|useSingleRequestParameter|Setting this property to true will generate functions with a single argument containing all API endpoint parameters instead of one argument per parameter.| |false|
|withAWSV4Signature|whether to include AWS v4 signature support| |false|

View File

@@ -126,6 +126,9 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|x-spring-paginated|Add `org.springframework.data.domain.Pageable` to controller method. Can be used to handle `page`, `size` and `sort` query parameters. If these query parameters are also specified in the operation spec, they will be removed from the controller method as their values can be obtained from the `Pageable` object.|OPERATION|false
|x-version-param|Marker property that tells that this parameter would be used for endpoint versioning. Applicable for headers & query params. true/false|OPERATION_PARAMETER|null
|x-pattern-message|Add this property whenever you need to customize the invalidation error message for the regex pattern of a variable|FIELD, OPERATION_PARAMETER|null
|x-size-message|Add this property whenever you need to customize the invalidation error message for the size or length of a variable|FIELD, OPERATION_PARAMETER|null
|x-minimum-message|Add this property whenever you need to customize the invalidation error message for the minimum value of a variable|FIELD, OPERATION_PARAMETER|null
|x-maximum-message|Add this property whenever you need to customize the invalidation error message for the maximum value of a variable|FIELD, OPERATION_PARAMETER|null
|x-spring-api-version|Value for 'version' attribute in @RequestMapping (for Spring 7 and above).|OPERATION|null

View File

@@ -44,6 +44,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|supportsES6|Generate code that conforms to ES6.| |false|
|useSingleRequestParameter|Setting this property to true will generate functions with a single argument containing all API endpoint parameters instead of one argument per parameter.| |false|
|useSquareBracketsInArrayNames|Setting this property to true will add brackets to array attribute names, e.g. my_values[].| |false|
|withAWSV4Signature|whether to include AWS v4 signature support| |false|
|withInterfaces|Setting this property to true will generate interfaces next to the default class implementations.| |false|
|withNodeImports|Setting this property to true adds imports for NodeJS| |false|
|withSeparateModelsAndApi|Put the model and api in separate folders and in separate classes. This requires in addition a value for 'apiPackage' and 'modelPackage'| |false|
@@ -291,7 +292,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|OAuth2_ClientCredentials|✗|OAS2,OAS3
|OAuth2_AuthorizationCode|✗|OAS2,OAS3
|SignatureAuth|✗|OAS3
|AWSV4Signature||ToolingExtension
|AWSV4Signature||ToolingExtension
### Wire Format Feature
| Name | Supported | Defined By |

View File

@@ -22,7 +22,7 @@ npm install @openapitools/openapi-generator-cli -g
To install a specific version of the tool, pass the version during installation:
<!-- RELEASE_VERSION -->
```bash
openapi-generator-cli version-manager set 7.16.0
openapi-generator-cli version-manager set 7.17.0
```
<!-- /RELEASE_VERSION -->
To install the tool as a dev dependency in your current project:
@@ -119,18 +119,18 @@ docker run --rm \
<!-- 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.16.0/openapi-generator-cli-7.16.0.jar`
JAR location: `https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.17.0/openapi-generator-cli-7.17.0.jar`
For **Mac/Linux** users:
```bash
wget https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.16.0/openapi-generator-cli-7.16.0.jar -O openapi-generator-cli.jar
wget https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.17.0/openapi-generator-cli-7.17.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.
```powershell
Invoke-WebRequest -OutFile openapi-generator-cli.jar https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.16.0/openapi-generator-cli-7.16.0.jar
Invoke-WebRequest -OutFile openapi-generator-cli.jar https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.17.0/openapi-generator-cli-7.17.0.jar
```
<!-- /RELEASE_VERSION -->

View File

@@ -16,7 +16,7 @@ Add to your `build->plugins` section (default phase is `generate-sources` phase)
<plugin>
<groupId>org.openapitools</groupId>
<artifactId>openapi-generator-maven-plugin</artifactId>
<version>7.16.0</version>
<version>7.17.0</version>
<executions>
<execution>
<goals>

View File

@@ -4,7 +4,7 @@
<groupId>org.openapitools</groupId>
<artifactId>openapi-generator-project</artifactId>
<!-- RELEASE_VERSION -->
<version>7.17.0-SNAPSHOT</version>
<version>7.18.0-SNAPSHOT</version>
<!-- /RELEASE_VERSION -->
<relativePath>../../pom.xml</relativePath>
</parent>

View File

@@ -29,6 +29,7 @@ import io.airlift.airline.Arguments;
import io.airlift.airline.Command;
import io.airlift.airline.Option;
import org.apache.commons.io.FileUtils;
import org.apache.commons.lang3.Strings;
import org.apache.commons.lang3.StringUtils;
import org.openapitools.codegen.ClientOptInput;
import org.openapitools.codegen.CodegenConfig;
@@ -248,7 +249,7 @@ public class GenerateBatch extends OpenApiGeneratorCommand {
Path filesMeta = Paths.get(outDir.toAbsolutePath().toString(), ".openapi-generator", "FILES");
if (filesMeta.toFile().exists()) {
FileUtils.readLines(filesMeta.toFile(), StandardCharsets.UTF_8).forEach(relativePath -> {
if (!StringUtils.startsWith(relativePath, ".")) {
if (!Strings.CS.startsWith(relativePath, ".")) {
Path file = outDir.resolve(relativePath).toAbsolutePath();
// hack: disallow directory traversal outside of output directory. we don't want to delete wrong files.
if (file.toString().startsWith(outDir.toAbsolutePath().toString())) {

View File

@@ -6,7 +6,7 @@
<artifactId>openapi-generator-project</artifactId>
<groupId>org.openapitools</groupId>
<!-- RELEASE_VERSION -->
<version>7.17.0-SNAPSHOT</version>
<version>7.18.0-SNAPSHOT</version>
<!-- /RELEASE_VERSION -->
<relativePath>../../pom.xml</relativePath>
</parent>

View File

@@ -97,7 +97,7 @@ task validateGoodSpec(type: org.openapitools.generator.gradle.plugin.tasks.Valid
[source,group]
----
plugins {
id "org.openapi.generator" version "7.16.0"
id "org.openapi.generator" version "7.17.0"
}
----
@@ -113,7 +113,7 @@ buildscript {
// url "https://plugins.gradle.org/m2/"
}
dependencies {
classpath "org.openapitools:openapi-generator-gradle-plugin:7.16.0"
classpath "org.openapitools:openapi-generator-gradle-plugin:7.17.0"
}
}
@@ -759,7 +759,7 @@ buildscript {
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
classpath('org.openapitools:openapi-generator-gradle-plugin:7.16.0') {
classpath('org.openapitools:openapi-generator-gradle-plugin:7.17.0') {
exclude group: 'com.google.guava'
}
}

View File

@@ -1,5 +1,5 @@
# RELEASE_VERSION
openApiGeneratorVersion=7.17.0-SNAPSHOT
openApiGeneratorVersion=7.18.0-SNAPSHOT
# /RELEASE_VERSION
# BEGIN placeholders

View File

@@ -4,7 +4,7 @@
<groupId>org.openapitools</groupId>
<artifactId>openapi-generator-project</artifactId>
<!-- RELEASE_VERSION -->
<version>7.17.0-SNAPSHOT</version>
<version>7.18.0-SNAPSHOT</version>
<!-- /RELEASE_VERSION -->
<relativePath>../../pom.xml</relativePath>
</parent>

View File

@@ -19,5 +19,5 @@ gradle generateGoWithInvalidSpec # expected outcome: BUILD FAILED
The samples can be tested against other versions of the plugin using the `openApiGeneratorVersion` property. For example:
```bash
gradle -PopenApiGeneratorVersion=7.16.0 openApiValidate
gradle -PopenApiGeneratorVersion=7.17.0 openApiValidate
```

View File

@@ -1,3 +1,3 @@
# RELEASE_VERSION
openApiGeneratorVersion=7.17.0-SNAPSHOT
openApiGeneratorVersion=7.18.0-SNAPSHOT
# /RELEASE_VERSION

View File

@@ -81,12 +81,12 @@ open class OpenApiGeneratorGenerateExtension(project: Project) {
/**
* The template directory holding a custom template.
*/
val templateDir = project.objects.property<String?>()
val templateDir = project.objects.property<String>()
/**
* The template location (which may be a directory or a classpath location) holding custom templates.
*/
val templateResourcePath = project.objects.property<String?>()
val templateResourcePath = project.objects.property<String>()
/**
* Adds authorization headers when fetching the OpenAPI definitions remotely.
@@ -109,7 +109,7 @@ open class OpenApiGeneratorGenerateExtension(project: Project) {
/**
* Specifies if the existing files should be overwritten during the generation.
*/
val skipOverwrite = project.objects.property<Boolean?>()
val skipOverwrite = project.objects.property<Boolean>()
/**
* Package for generated classes (where supported)
@@ -244,32 +244,32 @@ open class OpenApiGeneratorGenerateExtension(project: Project) {
/**
* Reference the library template (sub-template) of a generator.
*/
val library = project.objects.property<String?>()
val library = project.objects.property<String>()
/**
* Git host, e.g. gitlab.com.
*/
val gitHost = project.objects.property<String?>()
val gitHost = project.objects.property<String>()
/**
* Git user ID, e.g. openapitools.
*/
val gitUserId = project.objects.property<String?>()
val gitUserId = project.objects.property<String>()
/**
* Git repo ID, e.g. openapi-generator.
*/
val gitRepoId = project.objects.property<String?>()
val gitRepoId = project.objects.property<String>()
/**
* Release note, default to 'Minor update'.
*/
val releaseNote = project.objects.property<String?>()
val releaseNote = project.objects.property<String>()
/**
* HTTP user agent, e.g. codegen_csharp_api_client, default to 'OpenAPI-Generator/{packageVersion}/{language}'
*/
val httpUserAgent = project.objects.property<String?>()
val httpUserAgent = project.objects.property<String>()
/**
* Specifies how a reserved name should be escaped to. Otherwise, the default _<name> is used.
@@ -279,17 +279,17 @@ open class OpenApiGeneratorGenerateExtension(project: Project) {
/**
* Specifies an override location for the .openapi-generator-ignore file. Most useful on initial generation.
*/
val ignoreFileOverride = project.objects.property<String?>()
val ignoreFileOverride = project.objects.property<String>()
/**
* Remove prefix of operationId, e.g. config_getId => getId
*/
val removeOperationIdPrefix = project.objects.property<Boolean?>()
val removeOperationIdPrefix = project.objects.property<Boolean>()
/**
* Skip examples defined in the operation
*/
val skipOperationExample = project.objects.property<Boolean?>()
val skipOperationExample = project.objects.property<Boolean>()
/**
* Defines which API-related files should be generated. This allows you to create a subset of generated files (or none at all).
@@ -394,7 +394,7 @@ open class OpenApiGeneratorGenerateExtension(project: Project) {
/**
* Templating engine: "mustache" (default) or "handlebars" (beta)
*/
val engine = project.objects.property<String?>()
val engine = project.objects.property<String>()
/**
* Defines whether the output dir should be cleaned up before generating the output.

View File

@@ -55,7 +55,6 @@ import org.openapitools.codegen.config.MergedSpecBuilder
*
* @author Jim Schubert
*/
@Suppress("UnstableApiUsage")
@CacheableTask
open class GenerateTask @Inject constructor(private val objectFactory: ObjectFactory) : DefaultTask() {
@@ -154,14 +153,14 @@ open class GenerateTask @Inject constructor(private val objectFactory: ObjectFac
@get:Optional
@get:InputDirectory
@get:PathSensitive(PathSensitivity.RELATIVE)
val templateDir = project.objects.property<String?>()
val templateDir = project.objects.property<String>()
/**
* Resource path containing template files.
*/
@get:Optional
@get:Input
val templateResourcePath = project.objects.property<String?>()
val templateResourcePath = project.objects.property<String>()
/**
* Adds authorization headers when fetching the OpenAPI definitions remotely.
@@ -193,7 +192,7 @@ open class GenerateTask @Inject constructor(private val objectFactory: ObjectFac
*/
@get:Optional
@get:Input
val skipOverwrite = project.objects.property<Boolean?>()
val skipOverwrite = project.objects.property<Boolean>()
/**
* Package for generated classes (where supported)
@@ -384,42 +383,42 @@ open class GenerateTask @Inject constructor(private val objectFactory: ObjectFac
*/
@get:Optional
@get:Input
val library = project.objects.property<String?>()
val library = project.objects.property<String>()
/**
* Git host, e.g. gitlab.com.
*/
@get:Optional
@get:Input
val gitHost = project.objects.property<String?>()
val gitHost = project.objects.property<String>()
/**
* Git user ID, e.g. openapitools.
*/
@get:Optional
@get:Input
val gitUserId = project.objects.property<String?>()
val gitUserId = project.objects.property<String>()
/**
* Git repo ID, e.g. openapi-generator.
*/
@get:Optional
@get:Input
val gitRepoId = project.objects.property<String?>()
val gitRepoId = project.objects.property<String>()
/**
* Release note, default to 'Minor update'.
*/
@get:Optional
@get:Input
val releaseNote = project.objects.property<String?>()
val releaseNote = project.objects.property<String>()
/**
* HTTP user agent, e.g. codegen_csharp_api_client, default to 'OpenAPI-Generator/{packageVersion}/{language}'
*/
@get:Optional
@get:Input
val httpUserAgent = project.objects.property<String?>()
val httpUserAgent = project.objects.property<String>()
/**
* Specifies how a reserved name should be escaped to.
@@ -434,21 +433,21 @@ open class GenerateTask @Inject constructor(private val objectFactory: ObjectFac
@get:Optional
@get:InputFile
@get:PathSensitive(PathSensitivity.RELATIVE)
val ignoreFileOverride = project.objects.property<String?>()
val ignoreFileOverride = project.objects.property<String>()
/**
* Remove prefix of operationId, e.g. config_getId => getId
*/
@get:Optional
@get:Input
val removeOperationIdPrefix = project.objects.property<Boolean?>()
val removeOperationIdPrefix = project.objects.property<Boolean>()
/**
* Remove examples defined in the operation
*/
@get:Optional
@get:Input
val skipOperationExample = project.objects.property<Boolean?>()
val skipOperationExample = project.objects.property<Boolean>()
/**
* Defines which API-related files should be generated. This allows you to create a subset of generated files (or none at all).
@@ -581,7 +580,7 @@ open class GenerateTask @Inject constructor(private val objectFactory: ObjectFac
*/
@get:Optional
@get:Input
val engine = project.objects.property<String?>()
val engine = project.objects.property<String>()
/**
* Defines whether the output dir should be cleaned up before generating the output.
@@ -598,19 +597,11 @@ open class GenerateTask @Inject constructor(private val objectFactory: ObjectFac
@get:Input
val dryRun = project.objects.property<Boolean>()
private fun <T : Any?> Property<T>.ifNotEmpty(block: Property<T>.(T) -> Unit) {
private fun <T> Property<T>.ifNotEmpty(block: Property<T>.(T) -> Unit) {
if (isPresent) {
val item: T? = get()
if (item != null) {
when (get()) {
is String -> if ((get() as String).isNotEmpty()) {
block(get())
}
is String? -> if (true == (get() as String?)?.isNotEmpty()) {
block(get())
}
else -> block(get())
}
when (val value = get()) {
is String -> if (value.isNotEmpty()) block(value)
else -> block(value)
}
}
}
@@ -725,7 +716,7 @@ open class GenerateTask @Inject constructor(private val objectFactory: ObjectFac
}
skipOverwrite.ifNotEmpty { value ->
configurator.setSkipOverwrite(value ?: false)
configurator.setSkipOverwrite(value)
}
generatorName.ifNotEmpty { value ->
@@ -820,11 +811,11 @@ open class GenerateTask @Inject constructor(private val objectFactory: ObjectFac
}
removeOperationIdPrefix.ifNotEmpty { value ->
configurator.setRemoveOperationIdPrefix(value!!)
configurator.setRemoveOperationIdPrefix(value)
}
skipOperationExample.ifNotEmpty { value ->
configurator.setSkipOperationExample(value!!)
configurator.setSkipOperationExample(value)
}
logToStderr.ifNotEmpty { value ->

View File

@@ -12,7 +12,7 @@ Add to your `build->plugins` section (default phase is `generate-sources` phase)
<groupId>org.openapitools</groupId>
<artifactId>openapi-generator-maven-plugin</artifactId>
<!-- RELEASE_VERSION -->
<version>7.16.0</version>
<version>7.17.0</version>
<!-- /RELEASE_VERSION -->
<executions>
<execution>

View File

@@ -13,7 +13,7 @@
<groupId>org.openapitools</groupId>
<artifactId>openapi-generator-maven-plugin</artifactId>
<!-- RELEASE_VERSION -->
<version>7.17.0-SNAPSHOT</version>
<version>7.18.0-SNAPSHOT</version>
<!-- /RELEASE_VERSION -->
<executions>
<execution>

View File

@@ -15,7 +15,7 @@
<groupId>org.openapitools</groupId>
<artifactId>openapi-generator-maven-plugin</artifactId>
<!-- RELEASE_VERSION -->
<version>7.17.0-SNAPSHOT</version>
<version>7.18.0-SNAPSHOT</version>
<!-- /RELEASE_VERSION -->
<executions>
<execution>

View File

@@ -19,7 +19,7 @@
<groupId>org.openapitools</groupId>
<artifactId>openapi-generator-maven-plugin</artifactId>
<!-- RELEASE_VERSION -->
<version>7.17.0-SNAPSHOT</version>
<version>7.18.0-SNAPSHOT</version>
<!-- /RELEASE_VERSION -->
<dependencies>
<dependency>

View File

@@ -13,7 +13,7 @@
<groupId>org.openapitools</groupId>
<artifactId>openapi-generator-maven-plugin</artifactId>
<!-- RELEASE_VERSION -->
<version>7.17.0-SNAPSHOT</version>
<version>7.18.0-SNAPSHOT</version>
<!-- /RELEASE_VERSION -->
<executions>
<execution>

View File

@@ -13,7 +13,7 @@
<groupId>org.openapitools</groupId>
<artifactId>openapi-generator-maven-plugin</artifactId>
<!-- RELEASE_VERSION -->
<version>7.17.0-SNAPSHOT</version>
<version>7.18.0-SNAPSHOT</version>
<!-- /RELEASE_VERSION -->
<executions>
<execution>

View File

@@ -20,7 +20,7 @@
<groupId>org.openapitools</groupId>
<artifactId>openapi-generator-maven-plugin</artifactId>
<!-- RELEASE_VERSION -->
<version>7.17.0-SNAPSHOT</version>
<version>7.18.0-SNAPSHOT</version>
<!-- /RELEASE_VERSION -->
<executions>
<execution>

View File

@@ -5,7 +5,7 @@
<groupId>org.openapitools</groupId>
<artifactId>openapi-generator-project</artifactId>
<!-- RELEASE_VERSION -->
<version>7.17.0-SNAPSHOT</version>
<version>7.18.0-SNAPSHOT</version>
<!-- /RELEASE_VERSION -->
<relativePath>../../pom.xml</relativePath>
</parent>

View File

@@ -4,7 +4,7 @@
<groupId>org.openapitools</groupId>
<artifactId>openapi-generator-project</artifactId>
<!-- RELEASE_VERSION -->
<version>7.17.0-SNAPSHOT</version>
<version>7.18.0-SNAPSHOT</version>
<!-- /RELEASE_VERSION -->
<relativePath>../../pom.xml</relativePath>
</parent>

View File

@@ -4,7 +4,7 @@
<groupId>org.openapitools</groupId>
<artifactId>openapi-generator-project</artifactId>
<!-- RELEASE_VERSION -->
<version>7.17.0-SNAPSHOT</version>
<version>7.18.0-SNAPSHOT</version>
<!-- /RELEASE_VERSION -->
<relativePath>../../pom.xml</relativePath>
</parent>

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