Compare commits

...

98 Commits

Author SHA1 Message Date
William Cheng
2b23399f9a Merge remote-tracking branch 'origin/master' into 8.0.x 2024-07-28 02:26:03 +08:00
VelorumS
131fd518fb remove 3.7 in github python-pydantic-v1 workflow (#19239) 2024-07-27 23:30:08 +08:00
aspectivo GmbH
9cfd26e7a5 Adding user aspectivo (#19250)
* Update users.yml

Adding aspectivo  users.yml

* Add files via upload

Adding aspectivo logo file
2024-07-27 23:28:07 +08:00
Peter Storch
37afe57f0f [Kotlin][Spring] fix #19244 integer enum (#19248)
* [Kotlin][Spring] fix #19244 integer enum

* fix embedded array enum
2024-07-26 16:02:34 +01:00
Peter Storch
c93ec54a16 [Kotlin][Spring] fix build.gradle.kts and pom.xml for SpringBoot 2.x (#19246) 2024-07-26 14:06:26 +01:00
Venkatesh Dayananda
3c880719e1 [julia] Add support for style, explode in query params (#19238)
* set style and explode

* update client

* fix

* set the newer version
2024-07-26 17:01:14 +08:00
Makoto Aoyama
fb023b192b [swift5]Add array validation rule (#19242)
* Add ArrayRule

* Run ./bin/utils/export_docs_generators.sh

* Add ArrayValidationErrorKind

* Add validation method

* Run ./bin/generate-samples.sh

* Add array rule property

* Rename minItem and maxItem => minItems and maxItems

* Fix uniqueItems template

* Tweaks

* Add sample property

* Run ./bin/generate-samples.sh
2024-07-26 07:53:59 +01:00
Rick Lucassen
408706ef9d Add support for angular 18.1 with increased typescript and ngPackagr versions (#19228) 2024-07-25 11:18:58 +02:00
William Cheng
362d3b5aa1 [csharp] Add scope for oauth2 (#19234)
* feat: add scope for oauth2

* fix: add parameter AlwaysMultipartFormData

* fix: string to boolean

* fix: optional bool

* fix: null checks

* Optional string

* Remove all references to OAuthMultipartFormData

* Remove _multipartFormData = multipartFormData;

* Remove typo

* Run generate-samples and export_docs_generators

* Revert "Run generate-samples and export_docs_generators"

This reverts commit f051f268a5.

* Switch to string.IsNullOrEmpty, add langVersion 8

* Add langVersion 8 in ConditionalSerialization

* Use regular strings for netstandard2.0

* Remove references to langVersion 8

* Fix variable

* Use template engine to toggle nullable string

* Trigger tests

* Generate samples

* Trigger build

* Use {{nrt?}}

* update samples

---------

Co-authored-by: Morten Jansrud <morten.jansrud@snokam.no>
2024-07-24 21:15:12 +08:00
Bert Downs
9a673ea09a Rust: Support Integer enums using Serde_repr (#19199)
* rust: support repr(int) enum

* Regen APIS

* remove the extra lines

* merge most recent commits from master

* update tests to ensure that enum compiles correctly

* drop changes to kotlin files

---------

Co-authored-by: Jihyun Yu <yjh0502@gmail.com>
2024-07-24 17:14:17 +08:00
Paulo Darocha
8950892652 Fix ExtendedCodegenModel class access modifier to public (#10342) (#19230)
This commit updates the access modifier of the ExtendedCodegenModel class from its default (package-private) to public, allowing it to be accessible from outside its package.

Co-authored-by: Paulo Da Rocha Filho <paulo.darochafilho@wnco.com>
2024-07-24 09:10:20 +02:00
Sylvain Joubert
1c62c0385f [Kotlin][Spring] Add support for class and field extra annotation (#19202)
* [Kotlin][Spring] Document already supported vendor extensions

* [Kotlin][Spring] Add support for x-{class,field}-extra-annotation
2024-07-24 14:31:32 +08:00
Peter Storch
0e70d1f068 [Kotlin][Spring] use flag delegatePattern together with skipDefaultInterface (#19212)
* fix #19211 kotlin-spring flag delegatePattern together with skipDefaultInterface generates broken code

* add kotlin-springboot-delegate-nodefaults to the workflow

* fix Platform declaration clash

* move kotlin-springboot-delegate-nodefaults to the kotlin-server-jdk17 file

* fixed empty line
2024-07-23 18:41:14 +08:00
m-standfuss
6ad5864d28 Adding decimal support for python client generation (#19203)
* Adding decimal to template for Python generator

* Rerunning the build steps

* Add tests for decimal serialization and deserialization.

* Move test to python not legacy pydantic sample

* readd old imports

---------

Co-authored-by: Adam <abolfik@pollyex.com>
2024-07-23 16:16:23 +08:00
Kaido Iwamoto
fef84d956e [typescript-fetch] Fix code generation for oneOf cases without discriminator (#19219)
* Add samples using `oneOf` without discriminator

* Fix typescript-fetch code gen for `oneOf` without discriminator

* Return `{}` instead of original `json`
2024-07-23 08:59:16 +02:00
Julian Vennen
3e263ce3fc php: Fix typedoc comment for headers in ApiException (#19217) 2024-07-23 10:00:48 +08:00
Peter Storch
08e2653935 fix #18555 kotlin-spring generator flag appendRequestToHandler generates broken code when used with flag delegatePattern (#19206) 2024-07-22 08:32:31 +01:00
William Cheng
e40d3228aa Update CXF to newer version (#19210)
* update cxf to newer version

* better format
2024-07-22 00:30:51 +08:00
Christian Beikov
b5d5e572e0 Get rid of a bunch of Javadoc errors (#19209) 2024-07-21 18:48:18 +08:00
Nikita Vakula
e542b06869 [python-fastapi] return 500 if not implemented, added some unittests (#19196)
* [python-fastapi] Added some tests for FastAPI generator

1. Checks the generation of the implementation package.
2. Checks if the endpoints with and without descriptions generate correct
   output.

Signed-off-by: Nikita Vakula <programmistov.programmist@gmail.com>

* [python-fastapi] Raise 500 if there is no implementation

Signed-off-by: Nikita Vakula <programmistov.programmist@gmail.com>

---------

Signed-off-by: Nikita Vakula <programmistov.programmist@gmail.com>
2024-07-19 16:14:16 +08:00
Dimitar Tomov
f44bc30d20 [Kotlin][Spring] Fix RequestPart handling for multipart request (#19058)
* [Kotlin][Spring] Fix RequestPart handling for multipart request

* [Kotlin][Spring] Add sample spec for kotlin multipart request model

---------

Co-authored-by: dimitar.tomov <dimitar.tomov@scalefocus.com>
2024-07-19 00:58:51 +08:00
Erik Erbar
aaf3ea2528 [FIX][typescript-fetch] Fix duplicate imports for models with a discriminator (#19195)
* add new typescript-fetch self import issue sample

* add a new typescript-fetch self import issue config

* generate sample

* regenerate sample

* Prevent duplicate typescript imports

* Update generated samples

* Filter imports instead of discriminators mapped models

* Update generated samples

---------

Co-authored-by: GeroSchaarmann <Gero.S97@web.de>
2024-07-18 16:24:21 +02:00
Horace Li
e59a4ab8f8 Java libraries validation-api may use javax imports but dependency always uses jakarta namespace (#19171)
* java libraries bean validation use jakarta

* java libraries bean validation use jakarta

* java libraries bean validation use jakarta
2024-07-18 16:59:55 +08:00
Martin Schröder
ebf72a3772 adds support for x-pattern-message in kotlin-spring generator (#19134)
* adds support for x-pattern-message for patterns in kotlin-spring generator as known in java spring generator

* updates doc kotlin-spring
2024-07-18 16:22:18 +08:00
William Cheng
47abf82164 [java] update rest-assured, retrofit2, vertx to use junit 5 (#19185)
* update rest assured to use junit 5

* regenerate samples

* update junit from 4 to 5 for retrofit2, vertx

* update vertx test template
2024-07-18 16:16:27 +08:00
Nicklas Wiegandt
75cbebd2d2 test (JAVA SPRING RESTCLIENT) 18522: Add more JDK 17echo api tests & fix triggers (#19189) 2024-07-18 12:22:57 +08:00
Peter Storch
2f5529a184 fix #11353 use @get:JsonProperty instead of @field:JsonProperty (#19186) 2024-07-17 12:06:32 +01:00
Nicklas Wiegandt
045f4b6067 fix (JAVA SPRING RESTCLIENT) 19137: Fix missing imports when using withXml for Spring RestClient and fix its README (#19146) 2024-07-17 17:47:33 +08:00
Nikita Vakula
cfcc2c89d6 [python-fastapi] Fix api endpoint template (#19139)
* [python-fastapi] Fixed endpoint template

Signed-off-by: Nikita Vakula <programmistov.programmist@gmail.com>

* [python-fastapi] Fixed base class methods definition

Signed-off-by: Nikita Vakula <programmistov.programmist@gmail.com>

* [python-fastapi] Updated samples

Signed-off-by: Nikita Vakula <programmistov.programmist@gmail.com>

---------

Signed-off-by: Nikita Vakula <programmistov.programmist@gmail.com>
2024-07-17 12:31:25 +08:00
Nicklas Wiegandt
3dc3ee08bc test (JAVA SPRING RESTCLIENT) Add echo tests for the Spring 6 RestClient (#19145)
* test (JAVA SPRING RESTTEMPLATE) 17571: Add echo-api multipart form single file test

* feat (JAVA SPRING RESTCLIENT) 18522: Add RestClient to README

* test (JAVA SPRING RESTCLIENT) 18522: Add RestClient echo all of Pet test

* test (JAVA SPRING RESTCLIENT) 18522: Add RestClient echo body free form object response string test

* test (JAVA SPRING RESTCLIENT) 18522: Add RestClient echo body pet test

* test (JAVA SPRING RESTCLIENT) 18522: Add RestClient echo body pet response string test

* test (JAVA SPRING RESTCLIENT) 18522: Add RestClient echo body string enum test

* test (JAVA SPRING RESTCLIENT) 18522: Add RestClient echo body tag response test

* test (JAVA SPRING RESTCLIENT) 18522: Add RestClient echo form tests

* test (JAVA SPRING RESTCLIENT) 18522: Add RestClient echo header test

* test (JAVA SPRING RESTCLIENT) 18522: Add RestClient echo path test

* test (JAVA SPRING RESTCLIENT) 18522: Add RestClient echo query tests

* feat (JAVA SPRING RESTCLIENT) 18522: Regenerasted API Clients for RestClient with fixed import indentation
2024-07-17 12:19:31 +08:00
dependabot[bot]
0177ceda56 Bump actions/setup-dotnet from 4.0.0 to 4.0.1 (#19182)
Bumps [actions/setup-dotnet](https://github.com/actions/setup-dotnet) from 4.0.0 to 4.0.1.
- [Release notes](https://github.com/actions/setup-dotnet/releases)
- [Commits](https://github.com/actions/setup-dotnet/compare/v4...v4.0.1)

---
updated-dependencies:
- dependency-name: actions/setup-dotnet
  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>
2024-07-17 11:40:10 +08:00
Jeremy Audet
1367a16d6d Update Python versions used for unit tests (#19124)
Python 3.7 is EOL, and Python 3.12 has been released.

See: https://devguide.python.org/versions/
2024-07-17 01:02:21 +08:00
William Cheng
a330a1f38e update samples 2024-07-17 00:27:17 +08:00
Liri S
0002f8c506 Support net8 in aspnetcore (#19051)
* Support net8 in aspnetcore

* gen

* typo

* more

* default swashbuckle

* gen

---------

Co-authored-by: Liri S <liri@ownid.com>
2024-07-17 00:02:41 +08:00
Jeremy Audet
c8587bb31d Run unittest tests with unittest (#19121)
The unit tests in the following directories are written to unittest, not
pytest:

* `samples/client/echo_api/python/`
* `samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/`

If pytest is told to execute these tests, it will log warnings about
being unable to collect certain tests.
2024-07-16 23:52:56 +08:00
Giuseppe Tribulato
9ae8775987 Close #19129: java jersey2 and jersey3: Always cast path parameters to string similarly to okhttp-gson (#19161) 2024-07-16 18:09:05 +08:00
devhl-labs
c05bedb148 remove unnecessary code (#19159) 2024-07-16 17:59:49 +08:00
Sergey Vladimirov
875fdb50bd Fix issue https://github.com/OpenAPITools/openapi-generator/issues/18574 (#19173) 2024-07-16 17:58:55 +08:00
Martin Delille
49e33188cf [qt-cpp] Remove Qt support before Qt 5.15.2 (#19164) 2024-07-16 17:51:14 +08:00
Christian Beikov
94264e5598 Get rid of a bunch of Javadoc errors (#19162) 2024-07-16 17:49:21 +08:00
CirnoV (Sickle)
a81b736b24 Allow array items in TypeScript to be nullable (#19157)
* Allow array items in TypeScript to be nullable

* Regenerate samples

* Remove duplicate nullable array items codegen
2024-07-16 09:40:17 +02:00
Peter Storch
75e3be39cb fix #19156 @RestController annotation at Kotlin-Spring API interface (#19158) 2024-07-15 14:18:16 +01:00
Julian Kalinowski
304ff96577 [Swift] fix(#18074): correctly map OpenAPIDateWithoutTime to string in path (#18077) 2024-07-15 14:10:00 +01:00
Tolga Akkiraz
7f01a354a5 [Kotlin] Fix invalid gradlew.bat templates (#19165)
* Fix invalid gradlew.bat templates

* Update samples
2024-07-15 20:57:58 +08:00
William Cheng
b705972cad Upgrade rust-hyper to use hyper 1.0 (#19115)
* Upgrade to rust-hyper to use hyper 1.0

* Update rust-hyper samples for hyper 1.0 upgrade

* update cargo

* update samples

* update samples

* update doc

* Default client configuration for rust-hyper

---------

Co-authored-by: Krishna Rajendran <krishna@emptybox.org>
2024-07-14 22:11:08 +08:00
William Cheng
897a4e79d2 update elixir doc 2024-07-14 21:10:26 +08:00
Val Packett
3e6c13ede8 [Elixir] allow custom packageVersion (#19151) 2024-07-14 20:55:44 +08:00
Axel Rindle
75f4faae0c docs: add act coding to users (#19152) 2024-07-13 23:45:06 +08:00
Jeremy Audet
722be84cac Update call to assertDictContainsSubset() (#19122)
`TestCase.assertDictContainsSubset()` was deprecated in Python 3.2,
which went EOL in 2016. Rewrite the assertion to target Python 3.8+.

See: https://docs.python.org/3.2/library/unittest.html#unittest.TestCase.assertDictContainsSubset

See: https://devguide.python.org/versions/
2024-07-13 18:28:26 +08:00
Tim Grein
7b52da5d57 [go-server] Add information, where the server runs to generated README.md (#19141)
* Add information, where the server runs to README.md

* Update samples
2024-07-13 16:35:04 +08:00
Zane Pickett
8938f9dea1 [Ruby] Fix Content-Transfer-Encoding binary unpacking (#19132) 2024-07-11 14:52:38 +08:00
condorcorde
2940d3219c [PowerShell] Support ApiKeyPrefix (#19133)
* Support for ApiKeyPrefix

* Additional files after build
2024-07-11 14:38:16 +08:00
William Cheng
9948ed2cfa [dart-dio] fix JsonObject missing on a generated code #16585 (#19130)
* fix: issue 16261. JsonObject is missing on a generated code

* update samples

---------

Co-authored-by: toriumi0118 <toriumi0118@gmail.com>
2024-07-10 21:15:37 +08:00
Jeremy Audet
a4292c5db5 Update poetry lockfile (#19123)
Updated with `poetry lock`. This makes it possible to execute `poetry
run -- python -m unittest discover` and the like.
2024-07-10 17:22:01 +08:00
Wei Shih
42b0b20891 [k6] Add authentication variables in headers and cookies (#19060)
* Add global auth parsing including headers and cookies for k6.

* Add global auth statements.

* Generate samples.

* Revert "Generate samples."

This reverts commit b8cff8691b.

* Copy petstore-with-fake-endpoints-models-for-testing.yaml to a seperate k6 path as its example yaml file.

* Add global security statement in k6 example yaml instead of using the generic one.
2024-07-10 17:09:43 +08:00
William Cheng
5fdcd4857b [okhttp-gson] migrate to jakarta.ws.rs (#19113)
* javax.ws.rs:javax.ws.rs-api package was renamed on maven

* update dependencies for java okhttp pom, build.sbt

* update

* update dep

---------

Co-authored-by: Andres Aguilar <andresesfm@gmail.com>
2024-07-10 17:07:54 +08:00
Luke Tudge
005d5b0232 codegen: add == -> 'Double_Equal' to specialCharReplacements (#19125)
* codegen: add == -> 'Double_Equal' to specialCharReplacements

The double equal '==' is a common operator in a few contexts (specific use case for me is haystack operators). Currently if this value appears in an enum its name gets sanitized to empty and generates invalid syntax. Very similar to https://github.com/OpenAPITools/openapi-generator/pull/12801

* makes java underscore test more flexible

Given the name and purpose of this test, maybe it is better to test that the generated value is not an underscore rather than to test that it _is_ a specific (and possibly arbitrary) substitute value.
2024-07-10 17:02:48 +08:00
dependabot[bot]
ba056dbf10 Bump actions/setup-dotnet from 4.0.0 to 4.0.1 (#19126)
Bumps [actions/setup-dotnet](https://github.com/actions/setup-dotnet) from 4.0.0 to 4.0.1.
- [Release notes](https://github.com/actions/setup-dotnet/releases)
- [Commits](https://github.com/actions/setup-dotnet/compare/v4.0.0...v4.0.1)

---
updated-dependencies:
- dependency-name: actions/setup-dotnet
  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>
2024-07-10 11:13:24 +08:00
Clément Denis
705d853baa Update okhttp3 to 4.12.0 for Maven projects (#19118) 2024-07-10 11:12:57 +08:00
Doug Keen
011acc9950 [typescript-axios] add config parameter to specify custom axios version (#19103)
* feat(typescript-axios): allow configuration of axios version

* docs(typescript-axios): add readme docs for axiosVersion config option

* test(typescript-axios): add unit tests for custom axios version

* docs(typescript-axios): fix up typescript-axios generator docs
2024-07-09 10:52:48 +02:00
Paul Parenko
5612852fb6 Remove dependency scan for inputSpec (actually not required) (#19084)
* added test with external-ref ("external dependency" installed before actual usage)

* fixed test with resource on classpath

added test with resource on classpath with external-ref.

Test with profile 'resource' was wrong as it took JAR into account, but there was no 'petstore.yaml' on classpath.

* Remove dependency scan and do not modify inputSpec provided by user

It is still possible to provide JARs as inputSpec, however the user has to provide it by hand.

Providing dependencies in plugin section still allows correct inputSpec resolution on classpath.
2024-07-09 16:37:54 +08:00
William Cheng
039f0b85f6 Add BearerAuthInterceptor to dart-dio library exports (#19111)
* Update lib.mustache

Add missing export to dio template

* update samples

---------

Co-authored-by: Moshe Dicker <75931499+dickermoshe@users.noreply.github.com>
2024-07-09 16:26:15 +08:00
Cameron Koegel
1841f57863 [Ruby] Allow Overriding Accept Header (#19106)
* [Ruby] Allow Overriding Accept Header

* generate samples
2024-07-09 15:34:07 +08:00
Jeremy Audet
5da4f50dac Fix call to TestCase.assertEqual() (#19091)
`TestCase.assertEquals()` does not exist.
2024-07-09 02:06:22 +08:00
aaronforest-wf
8ab3bb491b Remove thread unsafe statusCode and responseHeaders instance variables from apache http ApiClient (#19054)
* remove thread unsafe statusCode and responseHeaders instance variables

* re-add status code and header getters for backwards compatibility

* add import

* whitespace cleanup

* use deprecated thread id getter for backwards compatibility with pre-19 java
2024-07-08 21:48:52 +08:00
DielN
a3912b7239 [Java][Microprofile] Fix #17526: enumOuterClass missing JSON-B (de)serializer (#18951)
* GH-17526/microprofile: Fix enumOuterClass missing JSON-B (de)serializer

* Add microprofile-rest-client-outer-enum to jdk17 samples workflow

* Regenerate samples
2024-07-08 18:30:22 +08:00
William Cheng
0820edee5d Add bytestring package to dependencies of generated haskell code (#19101)
* Add bytestring package to dependencies of generated haskell code

This broke in https://github.com/OpenAPITools/openapi-generator/pull/18047
where tvh introduced an import of Data.ByteString.Lazy. The added
bytestring package was available in some but not all cases.

* update workflow to test haskell servant ping

* update samples

---------

Co-authored-by: Bastian Senst <senst@cp-med.com>
2024-07-07 22:06:20 +08:00
Michael Hamburger
8f7cce716f Fix duplicate import javax.valid.Valid in resteasy generator (#19055)
* remove javax.valid.Valid import

* changes in samples
2024-07-07 18:48:04 +08:00
William Cheng
b84770af16 fix javadoc in various java files (#19099) 2024-07-07 18:27:23 +08:00
Vladislav Bauer
72cdb7020e Revert "[java-retrofit2] Support payload for DELETE method (#19056)" (#19100)
This reverts commit 9c4664a12c.
2024-07-07 18:23:57 +08:00
Tim Grein
7f6d2d8801 Fix docs for convertPropertyToTypeAndWriteBack and convertPropertyToStringAndWriteBack methods (#19072) 2024-07-07 16:58:24 +08:00
Martin Delille
aef9142c2c [cpp-qt-client] Stop using Qt 5.15.2 in the CI (#19049)
* [cpp-qt-client] Just for test

* Fix samples-cpp-qt-client github workflows

* Use only 6.7.1 in CI

* Revert "[cpp-qt-client] Just for test"

This reverts commit c7e19aeb6c.
2024-07-07 16:57:55 +08:00
Liri S
77737009e7 Speed up docker re-builds using mvn dependency:go-offline (#19078)
* go offline

* dup
2024-07-07 16:56:54 +08:00
Jean-François Côté
0b1b3f531e [ASPNETCORE] Fix having two "?" when not required and nullable = true (#19062)
* fix #18005: Prevent adding 2 times the "?" when not required and nullable = true

* fix #18005: Fix carriage return diff

* update samples

---------

Co-authored-by: William Cheng <wing328hk@gmail.com>
2024-07-06 21:56:22 +08:00
Not So Chiken
b897a99ebb Allow array items in kotlin to be nullable (#19080) 2024-07-06 16:29:49 +08:00
William Cheng
c8caa7cf49 remove 3.7 in github python workflow (#19098) 2024-07-06 16:17:22 +08:00
martin-mfg
4fa124b023 enable java-camel checks (#19074) 2024-07-06 15:19:49 +08:00
William Cheng
dab0a16621 update certifi to newer version (#19097) 2024-07-06 15:13:55 +08:00
Cas Cornelissen
add5c2eec7 Fix casts for typescript-fetch enum keys not working on number-based enums (#19075)
Co-authored-by: Cornelissen, Cas <cas.cornelissen@wartsila.com>
2024-07-04 14:07:40 +02:00
Bruno Coelho
21ad242ceb [kotlin][client] fix temp file name and remove old deprecated jvm-okhttp3 (#19064)
* [kotlin][client] fix temp file name and remove old deprecated jvm-okhttp3

* [kotlin][client] fix temp file name and remove old deprecated jvm-okhttp3

* [kotlin][client] fix temp file name and remove old deprecated jvm-okhttp3
2024-07-03 18:09:41 +01:00
Jacek Czerski
ff2e173de8 [Kotlin-Client][JVM-OkHttp] Override parameter enum's toString() method to use its value (#19053)
When using the JVM implementation of OkHttp with a Kotlin client, you may encounter issues with the toString() method of enum parameters. By default, the toString() method of an enum returns the name of the enum value, not its value.

To fix this issue, you can override the toString() method of your enum to return its value instead of its name.
2024-07-03 16:57:46 +08:00
dependabot[bot]
03beb3732e Bump s4u/setup-maven-action from 1.13.0 to 1.14.0 (#19045)
Bumps [s4u/setup-maven-action](https://github.com/s4u/setup-maven-action) from 1.13.0 to 1.14.0.
- [Release notes](https://github.com/s4u/setup-maven-action/releases)
- [Commits](https://github.com/s4u/setup-maven-action/compare/v1.13.0...v1.14.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-03 16:48:39 +08:00
Alexis Couvreur
59d799baa2 Add Alexis Couvreur as author of Java WireMock stub server (#19052) 2024-07-03 16:47:28 +08:00
Vladislav Bauer
9c4664a12c [java-retrofit2] Support payload for DELETE method (#19056) 2024-07-03 16:46:20 +08:00
John Arrandale
376505c25d [Typescript] Fix Issue Directly Publishing Package (#19004)
* Update package.mustache

* Updated typescript samples
2024-07-02 18:55:57 +02:00
Aron Wachter
5d61f71cdd [typescript-fetch] Fix API-generation of referenced enums for multipart/form-data (#19016)
* [typescript-fetch] Fix API-generation of referenced enums

* [typescript-fetch] re-generate samples
2024-07-02 15:07:33 +02:00
MarekBodingerBA
daa4886865 Change options from any to RawAxiosRequestConfig in typescript-axios and update samples (#18978)
Co-authored-by: Marek Bodinger <marek.bodinger@gmail.com>
2024-07-02 11:41:05 +02:00
Benedikt Radtke
860fd26449 Fix x-www-form-urlencoded date-time string parameters (#18898)
As mentioned in #13841, date-time parameters in request bodies are not ISO formatted, which breaks with certain webservers. This commit invokes `toISOString()` for date-time body parameters like it is done for queryParameters.

Fixes #13841.
2024-07-02 11:20:29 +02:00
William Cheng
20cfce0b4a Prepare v7.8.0 (#19048)
* Revert "v7.7.0 release"

This reverts commit f3dd32385e.

* prepare v7.8.0

* update readme

* update doc

* update samples
2024-07-02 16:45:53 +08:00
William Cheng
4eaac3d152 v7.7.0 release (#19046) 2024-07-02 15:44:37 +08:00
Dieter Eickstaedt
c9da04cb65 feat: x-enum-description support added to kotlin-server code generator (#19041) 2024-07-01 13:16:26 +01:00
William Cheng
99ca67d703 Merge branch 'master' into 8.0.x 2024-05-27 15:12:33 +08:00
Kuzma
bfc784e391 [Typescript] Enum types (#18531)
* Add enum type generator argument

* Generate tests

* fix default sample test

* Fix all typescript tests

* Update docs

* Added description for enum types

* Set enum type as default

* Set addition param for all tests except
2024-05-21 13:31:05 +02:00
William Cheng
c289982848 fix merge conflicts 2024-04-11 23:37:23 +08:00
William Cheng
f0f13cf932 Merge remote-tracking branch 'origin/master' into 8.0.x 2024-04-11 23:01:12 +08:00
William Cheng
3922973e85 Merge remote-tracking branch 'origin/master' into 8.0.x 2023-12-26 10:10:55 +08:00
William Cheng
29461aad1c update samples 2023-10-11 15:50:53 +08:00
William Cheng
2e69d7d950 prepare 8.0.0-SNAPSHOT 2023-10-11 15:36:26 +08:00
8318 changed files with 63154 additions and 26884 deletions

View File

@@ -45,7 +45,7 @@ jobs:
${{ runner.os }}-gradle-
- name: Setup Maven
uses: s4u/setup-maven-action@v1.13.0
uses: s4u/setup-maven-action@v1.14.0
with:
java-version: ${{ matrix.java }}
maven-version: 3.8.8
@@ -87,7 +87,7 @@ jobs:
- name: Check out code
uses: actions/checkout@v4
- name: Setup Maven
uses: s4u/setup-maven-action@v1.13.0
uses: s4u/setup-maven-action@v1.14.0
with:
java-version: 11
maven-version: 3.8.8

View File

@@ -39,6 +39,7 @@ jobs:
run: |
./mvnw clean install -DskipTests -Dmaven.javadoc.skip=true
./mvnw --no-snapshot-updates --quiet clean compile -f modules/openapi-generator-maven-plugin/examples/java-client.xml -Dorg.slf4j.simpleLogger.defaultLogLevel=error
./mvnw --no-snapshot-updates --quiet clean install -f modules/openapi-generator-maven-plugin/examples/multi-module/sample-external-ref-schema/pom.xml -Dorg.slf4j.simpleLogger.defaultLogLevel=error
./mvnw --no-snapshot-updates --quiet clean compile -f modules/openapi-generator-maven-plugin/examples/multi-module/pom.xml -Dorg.slf4j.simpleLogger.defaultLogLevel=error
./mvnw --no-snapshot-updates --quiet clean compile -f modules/openapi-generator-maven-plugin/examples/kotlin.xml -Dorg.slf4j.simpleLogger.defaultLogLevel=error
./mvnw --no-snapshot-updates --quiet clean compile -f modules/openapi-generator-maven-plugin/examples/spring.xml -Dorg.slf4j.simpleLogger.defaultLogLevel=error

View File

@@ -3,10 +3,10 @@ name: Samples cpp qt client
on:
push:
branches:
- 'samples/client/petstore/cpp-qt/**'
- "samples/client/petstore/cpp-qt/**"
pull_request:
paths:
- 'samples/client/petstore/cpp-qt/**'
- "samples/client/petstore/cpp-qt/**"
env:
GRADLE_VERSION: 6.9
@@ -16,9 +16,6 @@ jobs:
name: Build cpp qt client
strategy:
matrix:
qt-version:
- '5.15.2'
- '6.5.3'
os:
- ubuntu-latest
- macOS-latest
@@ -29,8 +26,8 @@ jobs:
- name: Install Qt
uses: jurplel/install-qt-action@v4
with:
version: ${{ matrix.qt-version }}
tools: ${{ matrix.tools }}
version: "6.7.1"
target: "desktop"
- name: Build
working-directory: "samples/client/petstore/cpp-qt"
run: cmake . && cmake --build .

View File

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

View File

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

View File

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

View File

@@ -18,7 +18,7 @@ jobs:
- samples/client/petstore/csharp/restsharp/net6/ParameterMappings/
steps:
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4.0.0
- uses: actions/setup-dotnet@v4.0.1
with:
dotnet-version: '6.0.x'
- name: Build

View File

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

View File

@@ -0,0 +1,36 @@
name: Samples C# .Net 8 Server
on:
push:
paths:
- samples/server/petstore/aspnetcore-8.0/**
- samples/server/petstore/aspnetcore-8.0-*/**
pull_request:
paths:
- samples/server/petstore/aspnetcore-8.0/**
- samples/server/petstore/aspnetcore-8.0-*/**
jobs:
build:
name: Build .Net 8 servers
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
sample:
- samples/server/petstore/aspnetcore-8.0
- samples/server/petstore/aspnetcore-8.0-NewtonsoftFalse
- samples/server/petstore/aspnetcore-8.0-nullableReferenceTypes
- samples/server/petstore/aspnetcore-8.0-pocoModels
- samples/server/petstore/aspnetcore-8.0-project4Models
- samples/server/petstore/aspnetcore-8.0-useSwashBuckle
steps:
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4.0.1
with:
dotnet-version: '8.0.x'
- name: Build
working-directory: ${{ matrix.sample }}
run: dotnet build Org.OpenAPITools.sln
- name: Test
working-directory: ${{ matrix.sample }}
run: dotnet test Org.OpenAPITools.sln

View File

@@ -5,11 +5,13 @@ on:
paths:
- samples/server/petstore/haskell-yesod/**
- samples/server/petstore/haskell-servant/**
- samples/server/others/haskell-servant-ping/**
- samples/client/petstore/haskell-http-client/**
pull_request:
paths:
- samples/server/petstore/haskell-yesod/**
- samples/server/petstore/haskell-servant/**
- samples/server/others/haskell-servant-ping/**
- samples/client/petstore/haskell-http-client/**
jobs:
build:
@@ -22,6 +24,7 @@ jobs:
# servers
- samples/server/petstore/haskell-yesod/
- samples/server/petstore/haskell-servant/
- samples/server/others/haskell-servant-ping/
- samples/client/petstore/haskell-http-client/
steps:
- uses: actions/checkout@v4

View File

@@ -3,10 +3,10 @@ name: Java Client (Echo API) JDK17
on:
push:
paths:
- samples/client/echo_api/java/restclient
- samples/client/echo_api/java/**
pull_request:
paths:
- samples/client/echo_api/java/restclient
- samples/client/echo_api/java/**
jobs:
build:
name: Build Java Client JDK17
@@ -16,6 +16,11 @@ jobs:
matrix:
sample:
# clients
- samples/client/echo_api/java/apache-httpclient
- samples/client/echo_api/java/native
- samples/client/echo_api/java/feign-gson
- samples/client/echo_api/java/resttemplate
- samples/client/echo_api/java/resteasy
- samples/client/echo_api/java/restclient
steps:
- uses: actions/checkout@v4

View File

@@ -3,8 +3,6 @@ name: Samples Java Server
on:
push:
paths:
# java-camel is tested locally for the time being
#- 'samples/server/petstore/java-camel/**'
- 'samples/server/petstore/java-vertx-web/**'
- 'samples/server/petstore/java-inflector/**'
- 'samples/server/petstore/java-pkmst/**'
@@ -13,7 +11,6 @@ on:
- 'samples/server/petstore/java-microprofile/**'
pull_request:
paths:
#- 'samples/server/petstore/java-camel/**'
- 'samples/server/petstore/java-vertx-web/**'
- 'samples/server/petstore/java-inflector/**'
- 'samples/server/petstore/java-pkmst/**'
@@ -28,7 +25,6 @@ jobs:
matrix:
sample:
# servers
#- samples/server/petstore/java-camel/
- samples/server/petstore/java-vertx-web/
- samples/server/petstore/java-inflector/
- samples/server/petstore/java-pkmst/

View File

@@ -9,8 +9,10 @@ on:
- samples/client/petstore/spring-http-interface-reactive/**
- samples/client/petstore/spring-http-interface/**
- samples/client/petstore/java/webclient-jakarta/**
- samples/client/petstore/java/microprofile-rest-client-outer-enum/**
# servers
- samples/openapi3/server/petstore/springboot-3/**
- samples/server/petstore/java-camel/**
- samples/server/petstore/java-helidon-server/v3/mp/**
- samples/server/petstore/java-helidon-server/v3/se/**
pull_request:
@@ -22,8 +24,10 @@ on:
- samples/client/petstore/spring-http-interface-reactive/**
- samples/client/petstore/spring-http-interface/**
- samples/client/petstore/java/webclient-jakarta/**
- samples/client/petstore/java/microprofile-rest-client-outer-enum/**
# servers
- samples/openapi3/server/petstore/springboot-3/**
- samples/server/petstore/java-camel/**
- samples/server/petstore/java-helidon-server/v3/mp/**
- samples/server/petstore/java-helidon-server/v3/se/**
jobs:
@@ -41,8 +45,10 @@ jobs:
- samples/client/petstore/spring-http-interface-reactive
- samples/client/petstore/spring-http-interface
- samples/client/petstore/java/webclient-jakarta
- samples/client/petstore/java/microprofile-rest-client-outer-enum
# servers
- samples/openapi3/server/petstore/springboot-3
- samples/server/petstore/java-camel/
- samples/server/petstore/java-helidon-server/v3/mp/
- samples/server/petstore/java-helidon-server/v3/se
- samples/client/petstore/spring-http-interface-reactive

View File

@@ -30,7 +30,7 @@ jobs:
# Using develop mode to install package so that it is easier to modify the package test files
julia -e "using Pkg; Pkg.develop(\"OpenAPI\");"
cd ~/.julia/dev/OpenAPI
git checkout v0.1.14
git checkout v0.1.25
cd $currdir
rm -rf ~/.julia/dev/OpenAPI/test/client/openapigenerator_petstore_v3/petstore
rm -rf ~/.julia/dev/OpenAPI/test/server/openapigenerator_petstore_v3/petstore

View File

@@ -29,6 +29,7 @@ jobs:
sample:
# server
- samples/server/petstore/kotlin-springboot-3
- samples/server/petstore/kotlin-springboot-delegate-nodefaults
- samples/server/petstore/kotlin-springboot-request
- samples/server/petstore/kotlin-springboot-request-cookie
- samples/server/petstore/kotlin-server/javalin

View File

@@ -29,6 +29,7 @@ jobs:
sample:
# server
- samples/server/petstore/kotlin-springboot
- samples/server/petstore/kotlin-springboot-multipart-request-model
- samples/server/petstore/kotlin-springboot-bigdecimal-default
- samples/server/petstore/kotlin-springboot-delegate
- samples/server/petstore/kotlin-springboot-modelMutable

View File

@@ -18,11 +18,11 @@ jobs:
- samples/client/echo_api/python
- samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent
python-version:
- "3.7"
- "3.8"
- "3.9"
- "3.10"
- "3.11"
- "3.12"
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
@@ -42,7 +42,7 @@ jobs:
- name: Test
working-directory: ${{ matrix.sample }}
run: python -m pytest
run: python -m unittest discover
- name: mypy
working-directory: ${{ matrix.sample }}

View File

@@ -15,7 +15,6 @@ jobs:
fail-fast: false
matrix:
python-version:
- "3.7"
- "3.8"
- "3.9"
- "3.10"

View File

@@ -15,7 +15,6 @@ jobs:
fail-fast: false
matrix:
python-version:
- "3.7"
- "3.8"
- "3.9"
- "3.10"

View File

@@ -39,7 +39,7 @@ jobs:
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
- name: Setup Maven
uses: s4u/setup-maven-action@v1.13.0
uses: s4u/setup-maven-action@v1.14.0
with:
java-version: ${{ matrix.java }}
maven-version: 3.8.8

View File

@@ -10,6 +10,16 @@ COPY ./LICENSE ${GEN_DIR}
# Required to compile openapi-generator
COPY ./google_checkstyle.xml ${GEN_DIR}
# All poms are copied, then we go offline, to allow for better caching of code changes without fetching all dependencies each time
COPY ./modules/openapi-generator-gradle-plugin/pom.xml ${GEN_DIR}/modules/openapi-generator-gradle-plugin/
COPY ./modules/openapi-generator-maven-plugin/pom.xml ${GEN_DIR}/modules/openapi-generator-maven-plugin/
COPY ./modules/openapi-generator-online/pom.xml ${GEN_DIR}/modules/openapi-generator-online/
COPY ./modules/openapi-generator-cli/pom.xml ${GEN_DIR}/modules/openapi-generator-cli/
COPY ./modules/openapi-generator-core/pom.xml ${GEN_DIR}/modules/openapi-generator-core/
COPY ./modules/openapi-generator/pom.xml ${GEN_DIR}/modules/openapi-generator/
COPY ./pom.xml ${GEN_DIR}
RUN mvn dependency:go-offline
# Modules are copied individually here to allow for caching of docker layers between major.minor versions
COPY ./modules/openapi-generator-gradle-plugin ${GEN_DIR}/modules/openapi-generator-gradle-plugin
COPY ./modules/openapi-generator-maven-plugin ${GEN_DIR}/modules/openapi-generator-maven-plugin
@@ -17,7 +27,6 @@ COPY ./modules/openapi-generator-online ${GEN_DIR}/modules/openapi-generator-onl
COPY ./modules/openapi-generator-cli ${GEN_DIR}/modules/openapi-generator-cli
COPY ./modules/openapi-generator-core ${GEN_DIR}/modules/openapi-generator-core
COPY ./modules/openapi-generator ${GEN_DIR}/modules/openapi-generator
COPY ./pom.xml ${GEN_DIR}
# Pre-compile openapi-generator-cli
RUN mvn -B -am -pl "modules/openapi-generator-cli" package

View File

@@ -15,7 +15,7 @@
<div align="center">
[Master](https://github.com/OpenAPITools/openapi-generator/tree/master) (`7.7.0`):
[Master](https://github.com/OpenAPITools/openapi-generator/tree/master) (`7.8.0`):
[![Build Status](https://api.travis-ci.com/OpenAPITools/openapi-generator.svg?branch=master&status=passed)](https://app.travis-ci.com/github/OpenAPITools/openapi-generator/builds)
[![Integration Test2](https://circleci.com/gh/OpenAPITools/openapi-generator.svg?style=shield)](https://circleci.com/gh/OpenAPITools/openapi-generator)
[![Windows Test](https://ci.appveyor.com/api/projects/status/github/openapitools/openapi-generator?branch=master&svg=true&passingText=Windows%20Test%20-%20OK&failingText=Windows%20Test%20-%20Fails)](https://ci.appveyor.com/project/WilliamCheng/openapi-generator)
@@ -84,13 +84,13 @@ If you find OpenAPI Generator useful for work, please consider asking your compa
OpenAPI Generator allows generation of API client libraries (SDK generation), server stubs, documentation and configuration automatically given an [OpenAPI Spec](https://github.com/OAI/OpenAPI-Specification) (both 2.0 and 3.0 are supported). Currently, the following languages/frameworks are supported:
| | Languages/Frameworks |
| -------------------------------- |-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| **API clients** | **ActionScript**, **Ada**, **Apex**, **Bash**, **C**, **C#** (.net 2.0, 3.5 or later, .NET Standard 1.3 - 2.1, .NET Core 3.1, .NET 5.0. Libraries: RestSharp, GenericHost, HttpClient), **C++** (Arduino, cpp-restsdk, Qt5, Tizen, Unreal Engine 4), **Clojure**, **Crystal**, **Dart**, **Elixir**, **Elm**, **Eiffel**, **Erlang**, **Go**, **Groovy**, **Haskell** (http-client, Servant), **Java** (Apache HttpClient 4.x, Apache HttpClient 5.x, Jersey2.x, OkHttp, Retrofit1.x, Retrofit2.x, Feign, RestTemplate, RESTEasy, Vertx, Google API Client Library for Java, Rest-assured, Spring 5 Web Client, MicroProfile Rest Client, Helidon), **Jetbrains HTTP Client**, **Julia**, **k6**, **Kotlin**, **Lua**, **N4JS**, **Nim**, **Node.js/JavaScript** (ES5, ES6, AngularJS with Google Closure Compiler annotations, Flow types, Apollo GraphQL DataStore), **Objective-C**, **OCaml**, **Perl**, **PHP**, **PowerShell**, **Python**, **R**, **Ruby**, **Rust** (hyper, reqwest, rust-server), **Scala** (akka, http4s, scalaz, sttp, swagger-async-httpclient, pekko), **Swift** (2.x, 3.x, 4.x, 5.x), **Typescript** (AngularJS, Angular (9.x - 18.x), Aurelia, Axios, Fetch, Inversify, jQuery, Nestjs, Node, redux-query, Rxjs), **XoJo**, **Zapier** |
| **Server stubs** | **Ada**, **C#** (ASP.NET Core, Azure Functions), **C++** (Pistache, Restbed, Qt5 QHTTPEngine), **Erlang**, **F#** (Giraffe), **Go** (net/http, Gin, Echo), **Haskell** (Servant, Yesod), **Java** (MSF4J, Spring, Undertow, JAX-RS: CDI, CXF, Inflector, Jersey, RestEasy, Play Framework, [PKMST](https://github.com/ProKarma-Inc/pkmst-getting-started-examples), [Vert.x](https://vertx.io/), [Apache Camel](https://camel.apache.org/), [Helidon](https://helidon.io/)), **Julia**, **Kotlin** (Spring Boot, [Ktor](https://github.com/ktorio/ktor), [Vert.x](https://vertx.io/)), **PHP** ([Flight](https://docs.flightphp.com/), Laravel, Lumen, [Mezzio (fka Zend Expressive)](https://github.com/mezzio/mezzio), Slim, Silex, [Symfony](https://symfony.com/)), **Python** (FastAPI, Flask), **NodeJS**, **Ruby** (Sinatra, Rails5), **Rust** ([rust-server](https://openapi-generator.tech/docs/generators/rust-server/)), **Scala** (Akka, [Finch](https://github.com/finagle/finch), [Lagom](https://github.com/lagom/lagom), [Play](https://www.playframework.com/), [Cask](https://github.com/com-lihaoyi/cask), Scalatra) |
| **API documentation generators** | **HTML**, **Confluence Wiki**, **Asciidoc**, **Markdown**, **PlantUML** |
| **Configuration files** | [**Apache2**](https://httpd.apache.org/) |
| **Others** | **GraphQL**, **JMeter**, **Ktorm**, **MySQL Schema**, **Postman Collection**, **Protocol Buffer**, **WSDL** |
| | Languages/Frameworks |
| -------------------------------- |--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| **API clients** | **ActionScript**, **Ada**, **Apex**, **Bash**, **C**, **C#** (.net 2.0, 3.5 or later, .NET Standard 1.3 - 2.1, .NET Core 3.1, .NET 5.0. Libraries: RestSharp, GenericHost, HttpClient), **C++** (Arduino, cpp-restsdk, Qt5, Tizen, Unreal Engine 4), **Clojure**, **Crystal**, **Dart**, **Elixir**, **Elm**, **Eiffel**, **Erlang**, **Go**, **Groovy**, **Haskell** (http-client, Servant), **Java** (Apache HttpClient 4.x, Apache HttpClient 5.x, Jersey2.x, OkHttp, Retrofit1.x, Retrofit2.x, Feign, RestTemplate, RESTEasy, Vertx, Google API Client Library for Java, Rest-assured, Spring 5 Web Client, Spring 6 RestClient, MicroProfile Rest Client, Helidon), **Jetbrains HTTP Client**, **Julia**, **k6**, **Kotlin**, **Lua**, **N4JS**, **Nim**, **Node.js/JavaScript** (ES5, ES6, AngularJS with Google Closure Compiler annotations, Flow types, Apollo GraphQL DataStore), **Objective-C**, **OCaml**, **Perl**, **PHP**, **PowerShell**, **Python**, **R**, **Ruby**, **Rust** (hyper, reqwest, rust-server), **Scala** (akka, http4s, scalaz, sttp, swagger-async-httpclient, pekko), **Swift** (2.x, 3.x, 4.x, 5.x), **Typescript** (AngularJS, Angular (9.x - 18.x), Aurelia, Axios, Fetch, Inversify, jQuery, Nestjs, Node, redux-query, Rxjs), **XoJo**, **Zapier** |
| **Server stubs** | **Ada**, **C#** (ASP.NET Core, Azure Functions), **C++** (Pistache, Restbed, Qt5 QHTTPEngine), **Erlang**, **F#** (Giraffe), **Go** (net/http, Gin, Echo), **Haskell** (Servant, Yesod), **Java** (MSF4J, Spring, Undertow, JAX-RS: CDI, CXF, Inflector, Jersey, RestEasy, Play Framework, [PKMST](https://github.com/ProKarma-Inc/pkmst-getting-started-examples), [Vert.x](https://vertx.io/), [Apache Camel](https://camel.apache.org/), [Helidon](https://helidon.io/)), **Julia**, **Kotlin** (Spring Boot, [Ktor](https://github.com/ktorio/ktor), [Vert.x](https://vertx.io/)), **PHP** ([Flight](https://docs.flightphp.com/), Laravel, Lumen, [Mezzio (fka Zend Expressive)](https://github.com/mezzio/mezzio), Slim, Silex, [Symfony](https://symfony.com/)), **Python** (FastAPI, Flask), **NodeJS**, **Ruby** (Sinatra, Rails5), **Rust** ([rust-server](https://openapi-generator.tech/docs/generators/rust-server/)), **Scala** (Akka, [Finch](https://github.com/finagle/finch), [Lagom](https://github.com/lagom/lagom), [Play](https://www.playframework.com/), [Cask](https://github.com/com-lihaoyi/cask), Scalatra) |
| **API documentation generators** | **HTML**, **Confluence Wiki**, **Asciidoc**, **Markdown**, **PlantUML** |
| **Configuration files** | [**Apache2**](https://httpd.apache.org/) |
| **Others** | **GraphQL**, **JMeter**, **Ktorm**, **MySQL Schema**, **Postman Collection**, **Protocol Buffer**, **WSDL** |
## Table of contents
@@ -128,8 +128,8 @@ The OpenAPI Specification has undergone 3 revisions since initial creation in 20
| OpenAPI Generator Version | Release Date | Notes |
| --------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------ | ------------------------------------------------- |
| 7.7.0 (upcoming minor release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/7.7.0-SNAPSHOT/) | 20.06.2024 | Minor release with breaking changes (with fallback) |
| [7.6.0](https://github.com/OpenAPITools/openapi-generator/releases/tag/v7.6.0) (latest stable release) | 20.05.2024 | Minor release with breaking changes (with fallback) |
| 7.8.0 (upcoming minor release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/7.8.0-SNAPSHOT/) | 09.08.2024 | Minor release with breaking changes (with fallback) |
| [7.7.0](https://github.com/OpenAPITools/openapi-generator/releases/tag/v7.7.0) (latest stable release) | 02.07.2024 | 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) |
@@ -192,16 +192,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.6.0/openapi-generator-cli-7.6.0.jar`
JAR location: `https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.7.0/openapi-generator-cli-7.7.0.jar`
For **Mac/Linux** users:
```sh
wget https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.6.0/openapi-generator-cli-7.6.0.jar -O openapi-generator-cli.jar
wget https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.7.0/openapi-generator-cli-7.7.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.6.0/openapi-generator-cli-7.6.0.jar
Invoke-WebRequest -OutFile openapi-generator-cli.jar https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.7.0/openapi-generator-cli-7.7.0.jar
```
After downloading the JAR, run `java -jar openapi-generator-cli.jar help` to show the usage.
@@ -599,6 +599,7 @@ Here is a list of community-contributed IDE plug-ins that integrate with OpenAPI
Here are some companies/projects (alphabetical order) using OpenAPI Generator in production. To add your company/project to the list, please visit [README.md](README.md) and click on the icon to edit the page.
- [Aalborg University](https://www.aau.dk)
- [act coding](https://github.com/actcoding)
- [Adaptant Solutions AG](https://www.adaptant.io/)
- [adesso SE](https://www.adesso.de/)
- [Adyen](https://www.adyen.com/)
@@ -932,6 +933,7 @@ Here are some companies/projects (alphabetical order) using OpenAPI Generator in
- 2023-06-28 - [Generate API contract using OpenAPI Generator Maven plugin](https://huongdanjava.com/generate-api-contract-using-openapi-generator-maven-plugin.html) by [Khanh Nguyen](https://huongdanjava.com/)
- 2023-06-30 - [Generate Client SDKs with OpenApi Generator in Springboot](https://medium.com/@ramavathvinayak/generate-client-sdks-with-openapi-generator-in-springboot-f9f012e73c0b) by [Vinayak Ramavath](https://medium.com/@ramavathvinayak)
- 2023-12-10 - [UnityでOpenAPI Generatorを使う](https://www.youtube.com/watch?v=CbNwKVV5LRM) by [Soup Tori](https://www.youtube.com/@souptori8417)
- 2024-01-24 - [Comment générer des stubs wiremock avec openapi generator](https://www.youtube.com/watch?v=0jhONfBrcKw) by [Alexis Couvreur](https://github.com/acouvreur)
- 2024-03-04 - [Generating TypeScript Types with OpenAPI for REST API Consumption](https://www.pullrequest.com/blog/generating-typescript-types-with-openapi-for-rest-api-consumption/) by [PullRequest](https://www.pullrequest.com/)
- 2024-03-07 - [Fully typed Web Apps with OpenAPI (Part 1)](https://medium.com/@gfox1984/fully-typed-web-apps-with-openapi-part-1-595d55766670) by [Guillaume Renard](https://medium.com/@gfox1984)
- 2024-03-08 - [Laravel OpenAPIによる "辛くない" スキーマ駆動開発](https://fortee.jp/phperkaigi-2024/proposal/9e2e6c38-d078-4efa-99b4-83ebf9033b34) by [KentarouTakeda](https://twitter.com/KentarouTakeda)
@@ -996,6 +998,7 @@ Here is a list of template creators:
* Java (okhttp-gson): @xhh
* Java (RestTemplate): @nbruno
* Java (Spring 5 WebClient): @daonomic
* Java (Spring 6 RestClient): @nicklas2751
* Java (RESTEasy): @gayathrigs
* Java (Vertx): @lopesmcc
* Java (Google APIs Client Library): @charlescapps
@@ -1084,6 +1087,7 @@ Here is a list of template creators:
* Java Vert.x: @lwlee2608
* Java Micronaut: @andriy-dmytruk
* Java Helidon: @spericas @tjquinno @tvallin
* Java WireMock: [@acouvreur](https://github.com/acouvreur)
* JAX-RS RestEasy: @chameleon82
* JAX-RS CXF: @hiveship
* JAX-RS CXF (CDI): @nickcmaynard

View File

@@ -0,0 +1,9 @@
generatorName: aspnetcore
outputDir: samples/server/petstore/aspnetcore-8.0-NewtonsoftFalse
inputSpec: modules/openapi-generator/src/test/resources/3_0/aspnetcore/petstore.yaml
templateDir: modules/openapi-generator/src/main/resources/aspnetcore/3.0
additionalProperties:
packageGuid: '{3C799344-F285-4669-8FD5-7ED9B795D5C5}'
aspnetCoreVersion: "8.0"
userSecretsGuid: 'cb87e868-8646-48ef-9bb6-344b537d0d37'
useNewtonsoft: false

View File

@@ -0,0 +1,9 @@
generatorName: aspnetcore
outputDir: samples/server/petstore/aspnetcore-8.0-nullableReferenceTypes
inputSpec: modules/openapi-generator/src/test/resources/3_0/aspnetcore/petstore.yaml
templateDir: modules/openapi-generator/src/main/resources/aspnetcore/3.0
additionalProperties:
packageGuid: '{3C799344-F285-4669-8FD5-7ED9B795D5C5}'
aspnetCoreVersion: "8.0"
userSecretsGuid: 'cb87e868-8646-48ef-9bb6-344b537d0d37'
nullableReferenceTypes: true

View File

@@ -0,0 +1,9 @@
generatorName: aspnetcore
outputDir: samples/server/petstore/aspnetcore-8.0-pocoModels
inputSpec: modules/openapi-generator/src/test/resources/3_0/aspnetcore/petstore.yaml
templateDir: modules/openapi-generator/src/main/resources/aspnetcore/3.0
additionalProperties:
packageGuid: '{3C799344-F285-4669-8FD5-7ED9B795D5C5}'
aspnetCoreVersion: "8.0"
userSecretsGuid: 'cb87e868-8646-48ef-9bb6-344b537d0d37'
pocoModels: true

View File

@@ -0,0 +1,9 @@
generatorName: aspnetcore
outputDir: samples/server/petstore/aspnetcore-8.0-project4Models
inputSpec: modules/openapi-generator/src/test/resources/3_0/aspnetcore/petstore.yaml
templateDir: modules/openapi-generator/src/main/resources/aspnetcore/3.0
additionalProperties:
packageGuid: '{3C799344-F285-4669-8FD5-7ED9B795D5C5}'
aspnetCoreVersion: "8.0"
userSecretsGuid: 'cb87e868-8646-48ef-9bb6-344b537d0d37'
useSeparateModelProject: true

View File

@@ -0,0 +1,11 @@
generatorName: aspnetcore
outputDir: samples/server/petstore/aspnetcore-8.0-useSwashBuckle
inputSpec: modules/openapi-generator/src/test/resources/3_0/aspnetcore/petstore.yaml
templateDir: modules/openapi-generator/src/main/resources/aspnetcore/3.0
additionalProperties:
packageGuid: '{3C799344-F285-4669-8FD5-7ED9B795D5C5}'
aspnetCoreVersion: "8.0"
userSecretsGuid: 'cb87e868-8646-48ef-9bb6-344b537d0d37'
useSwashBuckle: false
buildTarget: library
isLibrary: true

View File

@@ -0,0 +1,8 @@
generatorName: aspnetcore
outputDir: samples/server/petstore/aspnetcore-8.0
inputSpec: modules/openapi-generator/src/test/resources/3_0/aspnetcore/petstore.yaml
templateDir: modules/openapi-generator/src/main/resources/aspnetcore/3.0
additionalProperties:
packageGuid: '{3C799344-F285-4669-8FD5-7ED9B795D5C5}'
aspnetCoreVersion: "8.0"
userSecretsGuid: 'cb87e868-8646-48ef-9bb6-344b537d0d37'

View File

@@ -0,0 +1,4 @@
generatorName: haskell
outputDir: samples/server/others/haskell-servant-ping
inputSpec: modules/openapi-generator/src/test/resources/3_0/ping.yaml
templateDir: modules/openapi-generator/src/main/resources/haskell-servant

View File

@@ -0,0 +1,8 @@
generatorName: java
outputDir: samples/client/petstore/java/microprofile-rest-client-outer-enum
library: microprofile
inputSpec: modules/openapi-generator/src/test/resources/3_0/outerEnum.yaml
templateDir: modules/openapi-generator/src/main/resources/Java
additionalProperties:
artifactId: microprofile-rest-client
configKeyFromClassName: true

View File

@@ -1,6 +1,6 @@
generatorName: k6
outputDir: samples/client/petstore/k6
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml
inputSpec: modules/openapi-generator/src/test/resources/3_0/k6/petstore-with-fake-endpoints-models-for-testing.yaml
templateDir: modules/openapi-generator/src/main/resources/k6
additionalProperties:
appName: PetstoreClient

View File

@@ -0,0 +1,14 @@
generatorName: kotlin-spring
outputDir: samples/server/petstore/kotlin-springboot-delegate-nodefaults
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: swagger2
useSwaggerUI: "true"
delegatePattern: "true"
skipDefaultInterface: "true"
beanValidations: "true"
requestMappingMode: "api_interface"
useSpringBoot3: "true"

View File

@@ -8,5 +8,6 @@ additionalProperties:
annotationLibrary: swagger2
useSwaggerUI: "true"
delegatePattern: "true"
appendRequestToHandler: "true"
beanValidations: "true"
requestMappingMode: none

View File

@@ -0,0 +1,13 @@
generatorName: kotlin-spring
outputDir: samples/server/petstore/kotlin-springboot-integer-enum
library: spring-boot
inputSpec: modules/openapi-generator/src/test/resources/3_0/kotlin/issue19244_integer_enum.yaml
templateDir: modules/openapi-generator/src/main/resources/kotlin-spring
additionalProperties:
interfaceOnly: "true"
skipDefaultInterface: "true"
useTags: "true"
useSpringBoot3: "true"
annotationLibrary: none
documentationProvider: none
enumPropertyNaming: UPPERCASE

View File

@@ -0,0 +1,5 @@
generatorName: kotlin-spring
outputDir: samples/server/petstore/kotlin-springboot-multipart-request-model
library: spring-boot
inputSpec: modules/openapi-generator/src/test/resources/3_0/issue_15251_multipart_request_model.yaml
templateDir: modules/openapi-generator/src/main/resources/kotlin-spring

View File

@@ -0,0 +1,8 @@
generatorName: rust
outputDir: samples/client/petstore/rust/hyper0x/petstore
library: hyper0x
inputSpec: modules/openapi-generator/src/test/resources/3_0/rust/petstore.yaml
templateDir: modules/openapi-generator/src/main/resources/rust
additionalProperties:
supportAsync: "false"
packageName: petstore-hyper0x

View File

@@ -8,3 +8,4 @@ additionalProperties:
projectName: ts-petstore-client
moduleName: petstore
supportsES6: true
enumType: stringUnion

View File

@@ -7,3 +7,4 @@ additionalProperties:
npmName: ts-petstore-client
projectName: ts-petstore-client
moduleName: petstore
enumType: stringUnion

View File

@@ -7,3 +7,4 @@ additionalProperties:
npmName: ts-petstore-client
projectName: ts-petstore-client
moduleName: petstore
enumType: stringUnion

View File

@@ -8,3 +8,4 @@ additionalProperties:
useObjectParameters: true
projectName: ts-petstore-client
moduleName: petstore
enumType: stringUnion

View File

@@ -0,0 +1,4 @@
generatorName: typescript-fetch
outputDir: samples/client/petstore/typescript-fetch/builds/oneOf
inputSpec: modules/openapi-generator/src/test/resources/3_0/typescript-fetch/oneOf.yaml
templateDir: modules/openapi-generator/src/main/resources/typescript-fetch

View File

@@ -0,0 +1,7 @@
generatorName: typescript-fetch
outputDir: samples/client/others/typescript-fetch/self-import-issue
inputSpec: modules/openapi-generator/src/test/resources/3_0/typescript-fetch/self-import-issue.yaml
templateDir: modules/openapi-generator/src/main/resources/typescript-fetch
additionalProperties:
typescriptThreePlus: "true"
legacyDiscriminatorBehavior: "false"

View File

@@ -18,7 +18,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
| Option | Description | Values | Default |
| ------ | ----------- | ------ | ------- |
|aspnetCoreVersion|ASP.NET Core version: 6.0, 5.0, 3.1, 3.0, 2.2, 2.1, 2.0 (deprecated)|<dl><dt>**2.0**</dt><dd>ASP.NET Core 2.0</dd><dt>**2.1**</dt><dd>ASP.NET Core 2.1</dd><dt>**2.2**</dt><dd>ASP.NET Core 2.2</dd><dt>**3.0**</dt><dd>ASP.NET Core 3.0</dd><dt>**3.1**</dt><dd>ASP.NET Core 3.1</dd><dt>**5.0**</dt><dd>ASP.NET Core 5.0</dd><dt>**6.0**</dt><dd>ASP.NET Core 6.0</dd></dl>|3.1|
|aspnetCoreVersion|ASP.NET Core version: 6.0, 5.0, 3.1, 3.0, 2.2, 2.1, 2.0 (deprecated)|<dl><dt>**2.0**</dt><dd>ASP.NET Core 2.0</dd><dt>**2.1**</dt><dd>ASP.NET Core 2.1</dd><dt>**2.2**</dt><dd>ASP.NET Core 2.2</dd><dt>**3.0**</dt><dd>ASP.NET Core 3.0</dd><dt>**3.1**</dt><dd>ASP.NET Core 3.1</dd><dt>**5.0**</dt><dd>ASP.NET Core 5.0</dd><dt>**6.0**</dt><dd>ASP.NET Core 6.0</dd><dt>**7.0**</dt><dd>ASP.NET Core 7.0</dd><dt>**8.0**</dt><dd>ASP.NET Core 8.0</dd></dl>|8.0|
|buildTarget|Target to build an application or library|<dl><dt>**program**</dt><dd>Generate code for a standalone server</dd><dt>**library**</dt><dd>Generate code for a server abstract class library</dd></dl>|program|
|classModifier|Class Modifier for controller classes: Empty string or abstract.| ||
|compatibilityVersion|ASP.Net Core CompatibilityVersion| |Version_2_2|
@@ -45,7 +45,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|returnICollection|Return ICollection&lt;T&gt; instead of the concrete type.| |false|
|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true|
|sourceFolder|source folder for generated code| |src|
|swashbuckleVersion|Swashbuckle version: 3.0.0 (deprecated), 4.0.0 (deprecated), 5.0.0 (deprecated), 6.4.0|<dl><dt>**3.0.0**</dt><dd>Swashbuckle 3.0.0</dd><dt>**4.0.0**</dt><dd>Swashbuckle 4.0.0</dd><dt>**5.0.0**</dt><dd>Swashbuckle 5.0.0</dd><dt>**6.4.0**</dt><dd>Swashbuckle 6.4.0</dd></dl>|3.0.0|
|swashbuckleVersion|Swashbuckle version: 3.0.0 (deprecated), 4.0.0 (deprecated), 5.0.0 (deprecated), 6.4.0|<dl><dt>**3.0.0**</dt><dd>Swashbuckle 3.0.0</dd><dt>**4.0.0**</dt><dd>Swashbuckle 4.0.0</dd><dt>**5.0.0**</dt><dd>Swashbuckle 5.0.0</dd><dt>**6.4.0**</dt><dd>Swashbuckle 6.4.0</dd></dl>|6.4.0|
|useCollection|Deserialize array types to Collection&lt;T&gt; instead of List&lt;T&gt;.| |false|
|useDateTimeForDate|Use DateTime to model date properties even if DateOnly supported. (.net 6.0+ only)| |false|
|useDateTimeOffset|Use DateTimeOffset to model date-time properties| |false|

View File

@@ -46,7 +46,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|serverPort|configuration the port in which the sever is to run on| |8080|
|serviceImplementation|generate stub service implementations that extends service interfaces. If this is set to true service interfaces will also be generated| |false|
|serviceInterface|generate service interfaces to go alongside controllers. In most cases this option would be used to update an existing project, so not to override implementations. Useful to help facilitate the generation gap pattern| |false|
|skipDefaultInterface|Whether to skip generation of default implementations for interfaces| |false|
|skipDefaultInterface|Whether to skip generation of default implementations for interfaces (Api interfaces or Delegate interfaces depending on the delegatePattern option)| |false|
|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |null|
|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |null|
|sourceFolder|source folder for generated code| |src/main/kotlin|
@@ -57,6 +57,18 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|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|
## SUPPORTED VENDOR EXTENSIONS
| Extension name | Description | Applicable for | Default value |
| -------------- | ----------- | -------------- | ------------- |
|x-accepts|Specify custom value for 'Accept' header for operation|OPERATION|null
|x-class-extra-annotation|List of custom annotations to be added to model|MODEL|null
|x-content-type|Specify custom value for 'Content-Type' header for operation|OPERATION|null
|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
## IMPORT MAPPING
| Type/Alias | Imports |

View File

@@ -22,7 +22,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|bestFitInt|Use best fitting integer type where minimum or maximum is set| |false|
|enumNameSuffix|Suffix that will be appended to all enum names.| ||
|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true|
|library|library template (sub-template) to use.|<dl><dt>**hyper**</dt><dd>HTTP client: Hyper.</dd><dt>**reqwest**</dt><dd>HTTP client: Reqwest.</dd></dl>|reqwest|
|library|library template (sub-template) to use.|<dl><dt>**hyper**</dt><dd>HTTP client: Hyper (v1.x).</dd><dt>**hyper0x**</dt><dd>HTTP client: Hyper (v0.x).</dd><dt>**reqwest**</dt><dd>HTTP client: Reqwest.</dd></dl>|reqwest|
|packageName|Rust package name (convention: lowercase).| |openapi|
|packageVersion|Rust package version.| |1.0.0|
|preferUnsignedInt|Prefer unsigned integers where minimum value is &gt;= 0| |false|

View File

@@ -20,6 +20,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
| ------ | ----------- | ------ | ------- |
|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false|
|apiPackage|package for generated api classes| |null|
|axiosVersion|Use this property to override the axios version in package.json| |^1.6.1|
|disallowAdditionalPropertiesIfNotPresent|If false, the 'additionalProperties' implementation (set to true by default) is compliant with the OAS and JSON schema specifications. If true (default), keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>Keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.</dd></dl>|true|
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|enumNameSuffix|Suffix that will be appended to all enum names.| |Enum|

View File

@@ -24,6 +24,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|enumNameSuffix|Suffix that will be appended to all enum names.| |Enum|
|enumPropertyNaming|Naming convention for enum properties: 'camelCase', 'PascalCase', 'snake_case', 'UPPERCASE', and 'original'| |PascalCase|
|enumPropertyNamingReplaceSpecialChar|Set to true to replace '-' and '+' symbols with 'minus_' and 'plus_' in enum of type string| |false|
|enumType|Specify the enum type which should be used in the client code.|<dl><dt>**stringUnion**</dt><dd>Union of literal string types</dd><dt>**enum**</dt><dd>Typescript's [string enums](https://www.typescriptlang.org/docs/handbook/enums.html#string-enums)</dd></dl>|enum|
|enumUnknownDefaultCase|If the server adds new enum cases, that are unknown by an old spec/client, the client will fail to parse the network response.With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the server sends an enum case that is not known by the client/spec, they can safely fallback to this case.|<dl><dt>**false**</dt><dd>No changes to the enum's are made, this is the default option.</dd><dt>**true**</dt><dd>With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the enum case sent by the server is not known by the client/spec, can safely be decoded to this case.</dd></dl>|false|
|fileContentDataType|Specifies the type to use for the content of a file - i.e. Blob (Browser, Deno) / Buffer (node)| |Buffer|
|framework|Specify the framework which should be used in the client code.|<dl><dt>**fetch-api**</dt><dd>fetch-api</dd><dt>**jquery**</dt><dd>jquery</dd></dl>|fetch-api|

View File

@@ -103,18 +103,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.2.0/openapi-generator-cli-7.2.0.jar`
JAR location: `https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.7.0/openapi-generator-cli-7.7.0.jar`
For **Mac/Linux** users:
```bash
wget https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.2.0/openapi-generator-cli-7.2.0.jar -O openapi-generator-cli.jar
wget https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.7.0/openapi-generator-cli-7.7.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.2.0/openapi-generator-cli-7.2.0.jar
Invoke-WebRequest -OutFile openapi-generator-cli.jar https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.7.0/openapi-generator-cli-7.7.0.jar
```
<!-- /RELEASE_VERSION -->

View File

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

View File

@@ -6,7 +6,7 @@
<artifactId>openapi-generator-project</artifactId>
<groupId>org.openapitools</groupId>
<!-- RELEASE_VERSION -->
<version>7.7.0-SNAPSHOT</version>
<version>8.0.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.5.0"
id "org.openapi.generator" version "7.7.0"
}
----
@@ -113,7 +113,7 @@ buildscript {
// url "https://plugins.gradle.org/m2/"
}
dependencies {
classpath "org.openapitools:openapi-generator-gradle-plugin:7.2.0"
classpath "org.openapitools:openapi-generator-gradle-plugin:7.7.0"
}
}
@@ -759,7 +759,7 @@ buildscript {
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
classpath('org.openapitools:openapi-generator-gradle-plugin:7.2.0') {
classpath('org.openapitools:openapi-generator-gradle-plugin:7.7.0') {
exclude group: 'com.google.guava'
}
}

View File

@@ -1,5 +1,5 @@
# RELEASE_VERSION
openApiGeneratorVersion=7.7.0-SNAPSHOT
openApiGeneratorVersion=8.0.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.7.0-SNAPSHOT</version>
<version>8.0.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.2.0 openApiValidate
gradle -PopenApiGeneratorVersion=7.7.0 openApiValidate
```

View File

@@ -1,3 +1,3 @@
# RELEASE_VERSION
openApiGeneratorVersion=7.7.0-SNAPSHOT
openApiGeneratorVersion=8.0.0-SNAPSHOT
# /RELEASE_VERSION

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.5.0</version>
<version>7.7.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.7.0-SNAPSHOT</version>
<version>8.0.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.7.0-SNAPSHOT</version>
<version>8.0.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.7.0-SNAPSHOT</version>
<version>8.0.0-SNAPSHOT</version>
<!-- /RELEASE_VERSION -->
<dependencies>
<dependency>
@@ -27,9 +27,15 @@
<artifactId>sample-schema</artifactId>
<version>${project.parent.version}</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>sample-external-ref-schema</artifactId>
<version>${project.parent.version}</version>
</dependency>
</dependencies>
<executions>
<execution>
<id>default</id>
<goals>
<goal>generate</goal>
</goals>
@@ -48,6 +54,30 @@
<dateLibrary>joda</dateLibrary>
</configOptions>
<!-- override the default library to jersey2 -->
<library>jersey2</library>
</configuration>
</execution>
<execution>
<id>external-ref</id>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<!-- specify the OpenAPI spec -->
<inputSpec>external-ref/petstore.yaml</inputSpec>
<!-- target to generate java client code -->
<generatorName>java</generatorName>
<!-- hint: if you want to generate java server code, e.g. based on Spring Boot,
you can use the following target: <generatorName>spring</generatorName> -->
<!-- pass any necessary config options -->
<configOptions>
<dateLibrary>joda</dateLibrary>
</configOptions>
<!-- override the default library to jersey2 -->
<library>jersey2</library>
</configuration>

View File

@@ -0,0 +1,13 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.openapitools</groupId>
<artifactId>sample-external-ref-schema</artifactId>
<packaging>jar</packaging>
<version>1.0-SNAPSHOT</version>
<name>sample-external-ref-schema</name>
<url>https://maven.apache.org</url>
<!-- this POM is not a module of multi-module project to keep resources out of classpath-->
</project>

View File

@@ -0,0 +1,105 @@
openapi: 3.0.0
servers:
- url: 'http://petstore.swagger.io/v2'
info:
description: Sample file with just two endpoints and one schema (defined in an external file $ref)
version: 1.0.0
title: OpenAPI Petstore
paths:
/pet:
post:
tags:
- pet
summary: Add a new pet to the store
description: ''
operationId: addPet
responses:
'200':
description: successful operation
content:
application/xml:
schema:
$ref: '#/components/schemas/Pet'
application/json:
schema:
$ref: '#/components/schemas/Pet'
'405':
description: Invalid input
security:
- petstore_auth:
- 'write:pets'
- 'read:pets'
requestBody:
$ref: '#/components/requestBodies/Pet'
'/pet/{petId}':
get:
tags:
- pet
summary: Find pet by ID
description: Returns a single pet
operationId: getPetById
parameters:
- name: petId
in: path
description: ID of pet to return
required: true
schema:
type: integer
format: int64
responses:
'200':
description: successful operation
content:
application/xml:
schema:
$ref: '#/components/schemas/Pet'
application/json:
schema:
$ref: '#/components/schemas/Pet'
'400':
description: Invalid ID supplied
'404':
description: Pet not found
security:
- api_key: []
delete:
tags:
- pet
summary: Deletes a pet
description: ''
operationId: deletePet
parameters:
- name: api_key
in: header
required: false
schema:
type: string
- name: petId
in: path
description: Pet id to delete
required: true
schema:
type: integer
format: int64
responses:
'400':
description: Invalid pet value
security:
- petstore_auth:
- 'write:pets'
- 'read:pets'
components:
requestBodies:
Pet:
content:
application/json:
schema:
$ref: 'schemas/Pet.yaml'
application/xml:
schema:
$ref: 'schemas/Pet.yaml'
description: Pet object that needs to be added to the store
required: true
schemas:
Pet:
$ref: 'schemas/Pet.yaml'

View File

@@ -0,0 +1,29 @@
title: a Pet
description: A pet for sale in the pet store
type: object
required:
- name
- photoUrls
properties:
id:
type: integer
format: int64
name:
type: string
example: doggie
photoUrls:
type: array
xml:
name: photoUrl
wrapped: true
items:
type: string
status:
type: string
description: pet status in the store
enum:
- available
- pending
- sold
xml:
name: Pet

View File

@@ -13,7 +13,7 @@
<groupId>org.openapitools</groupId>
<artifactId>openapi-generator-maven-plugin</artifactId>
<!-- RELEASE_VERSION -->
<version>7.7.0-SNAPSHOT</version>
<version>8.0.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.7.0-SNAPSHOT</version>
<version>8.0.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.7.0-SNAPSHOT</version>
<version>8.0.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.7.0-SNAPSHOT</version>
<version>8.0.0-SNAPSHOT</version>
<!-- /RELEASE_VERSION -->
<relativePath>../../pom.xml</relativePath>
</parent>

View File

@@ -60,7 +60,7 @@ import static org.openapitools.codegen.config.CodegenConfiguratorUtils.*;
* Goal which generates client/server code from a OpenAPI json/yaml definition.
*/
@SuppressWarnings({"unused", "MismatchedQueryAndUpdateOfCollection"})
@Mojo(name = "generate", defaultPhase = LifecyclePhase.GENERATE_SOURCES, requiresDependencyResolution = ResolutionScope.COMPILE, threadSafe = true)
@Mojo(name = "generate", defaultPhase = LifecyclePhase.GENERATE_SOURCES, threadSafe = true)
public class CodeGenMojo extends AbstractMojo {
private final Logger LOGGER = LoggerFactory.getLogger(CodeGenMojo.class);
@@ -623,13 +623,7 @@ public class CodeGenMojo extends AbstractMojo {
}
if (isNotEmpty(inputSpec)) {
URL url = inputSpecRemoteUrl();
if ((! inputSpecFile.exists()) && url != null) {
configurator.setInputSpec(url.toString());
} else {
configurator.setInputSpec(inputSpec);
}
configurator.setInputSpec(inputSpec);
}
if (isNotEmpty(gitHost)) {
@@ -1015,35 +1009,15 @@ public class CodeGenMojo extends AbstractMojo {
}
/**
* Try to parse inputSpec setting string into URL (truly remote or resource)
* Try to parse inputSpec setting string into URL
* @return A valid URL or null if inputSpec is not a valid URL
*/
private URL inputSpecRemoteUrl() {
URL url = dependencyClassLoader().getResource(inputSpec);
if (url == null) {
try {
url = new URI(FilenameUtils.separatorsToUnix(inputSpec)).toURL();
} catch (URISyntaxException | MalformedURLException | IllegalArgumentException e) {
}
try {
return new URI(FilenameUtils.separatorsToUnix(inputSpec)).toURL();
} catch (URISyntaxException | MalformedURLException | IllegalArgumentException ignored) {
return null;
}
return url;
}
private ClassLoader dependencyClassLoader() {
List<URL> list = new ArrayList<>();
for (Artifact artifact : project.getArtifacts()) {
try {
if (artifact.isResolved() && artifact.getType().equals("jar")) {
list.add(new URL("jar:" + artifact.getFile().toURI() + "!/"));
}
} catch (Exception e) {
}
}
return new URLClassLoader(list.toArray(new URL[] { }), getClass().getClassLoader());
}
/**

View File

@@ -60,8 +60,12 @@ public class CodeGenMojoTest extends BaseTestCase {
testCommonConfiguration("resource");
}
public void testCommonConfigurationWithURLInputSpec() throws Exception {
testCommonConfiguration("url");
public void testCommonConfigurationWithResourceExternalRefInputSpec() throws Exception {
testCommonConfiguration("resource-external-ref");
}
public void testCommonConfigurationWithJARInputSpec() throws Exception {
testCommonConfiguration("jar");
}
@SuppressWarnings("unchecked")

View File

@@ -32,23 +32,30 @@
<profile>
<id>resource</id>
<properties>
<inputSpec>petstore.yaml</inputSpec>
<inputSpec>petstore-on-classpath.yaml</inputSpec>
</properties>
</profile>
<profile>
<id>url</id>
<id>resource-external-ref</id>
<properties>
<!-- Directory schemas inside schema-external-ref to not shadow JARs schema directory -->
<inputSpec>schema-external-ref/petstore-on-classpath.yaml</inputSpec>
</properties>
</profile>
<profile>
<id>jar</id>
<properties>
<inputSpec>jar:file:${basedir}/local-repo/petstore/schema/1/schema-1.jar!/petstore.yaml</inputSpec>
</properties>
<dependencies>
<dependency>
<groupId>petstore</groupId>
<artifactId>schema</artifactId>
<version>1</version>
</dependency>
</dependencies>
</profile>
</profiles>
<dependencies>
<dependency>
<groupId>petstore</groupId>
<artifactId>schema</artifactId>
<version>1</version>
</dependency>
</dependencies>
<build>
<finalName>common-maven</finalName>
<plugins>

View File

@@ -0,0 +1,617 @@
openapi: 3.0.0
servers:
- url: 'http://petstore.swagger.io/v2'
info:
description: >-
This is a sample server Petstore server. For this sample, you can use the api key
`special-key` to test the authorization filters.
version: 1.0.0
title: OpenAPI Petstore
license:
name: Apache-2.0
url: 'https://www.apache.org/licenses/LICENSE-2.0.html'
tags:
- name: pet
description: Everything about your Pets
- name: store
description: Access to Petstore orders
- name: user
description: Operations about user
paths:
/pet:
post:
tags:
- pet
summary: Add a new pet to the store
description: ''
operationId: addPet
responses:
'200':
description: successful operation
content:
application/xml:
schema:
$ref: 'schemas/Pet.yaml'
application/json:
schema:
$ref: 'schemas/Pet.yaml'
'405':
description: Invalid input
security:
- petstore_auth:
- 'write:pets'
- 'read:pets'
requestBody:
$ref: '#/components/requestBodies/Pet'
put:
tags:
- pet
summary: Update an existing pet
description: ''
operationId: updatePet
responses:
'200':
description: successful operation
content:
application/xml:
schema:
$ref: 'schemas/Pet.yaml'
application/json:
schema:
$ref: 'schemas/Pet.yaml'
'400':
description: Invalid ID supplied
'404':
description: Pet not found
'405':
description: Validation exception
security:
- petstore_auth:
- 'write:pets'
- 'read:pets'
requestBody:
$ref: '#/components/requestBodies/Pet'
/pet/findByStatus:
get:
tags:
- pet
summary: Finds Pets by status
description: Multiple status values can be provided with comma separated strings
operationId: findPetsByStatus
parameters:
- name: status
in: query
description: Status values that need to be considered for filter
required: true
style: form
explode: false
schema:
type: array
items:
type: string
enum:
- available
- pending
- sold
default: available
responses:
'200':
description: successful operation
content:
application/xml:
schema:
type: array
items:
$ref: 'schemas/Pet.yaml'
application/json:
schema:
type: array
items:
$ref: 'schemas/Pet.yaml'
'400':
description: Invalid status value
security:
- petstore_auth:
- 'read:pets'
/pet/findByTags:
get:
tags:
- pet
summary: Finds Pets by tags
description: >-
Multiple tags can be provided with comma separated strings. Use tag1,
tag2, tag3 for testing.
operationId: findPetsByTags
parameters:
- name: tags
in: query
description: Tags to filter by
required: true
style: form
explode: false
schema:
type: array
items:
type: string
responses:
'200':
description: successful operation
content:
application/xml:
schema:
type: array
items:
$ref: 'schemas/Pet.yaml'
application/json:
schema:
type: array
items:
$ref: 'schemas/Pet.yaml'
'400':
description: Invalid tag value
security:
- petstore_auth:
- 'read:pets'
deprecated: true
'/pet/{petId}':
get:
tags:
- pet
summary: Find pet by ID
description: Returns a single pet
operationId: getPetById
parameters:
- name: petId
in: path
description: ID of pet to return
required: true
schema:
type: integer
format: int64
responses:
'200':
description: successful operation
content:
application/xml:
schema:
$ref: 'schemas/Pet.yaml'
application/json:
schema:
$ref: 'schemas/Pet.yaml'
'400':
description: Invalid ID supplied
'404':
description: Pet not found
security:
- api_key: []
post:
tags:
- pet
summary: Updates a pet in the store with form data
description: ''
operationId: updatePetWithForm
parameters:
- name: petId
in: path
description: ID of pet that needs to be updated
required: true
schema:
type: integer
format: int64
responses:
'405':
description: Invalid input
security:
- petstore_auth:
- 'write:pets'
- 'read:pets'
requestBody:
content:
application/x-www-form-urlencoded:
schema:
type: object
properties:
name:
description: Updated name of the pet
type: string
status:
description: Updated status of the pet
type: string
delete:
tags:
- pet
summary: Deletes a pet
description: ''
operationId: deletePet
parameters:
- name: api_key
in: header
required: false
schema:
type: string
- name: petId
in: path
description: Pet id to delete
required: true
schema:
type: integer
format: int64
responses:
'400':
description: Invalid pet value
security:
- petstore_auth:
- 'write:pets'
- 'read:pets'
'/pet/{petId}/uploadImage':
post:
tags:
- pet
summary: uploads an image
description: ''
operationId: uploadFile
parameters:
- name: petId
in: path
description: ID of pet to update
required: true
schema:
type: integer
format: int64
responses:
'200':
description: successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/ApiResponse'
security:
- petstore_auth:
- 'write:pets'
- 'read:pets'
requestBody:
content:
multipart/form-data:
schema:
type: object
properties:
additionalMetadata:
description: Additional data to pass to server
type: string
file:
description: file to upload
type: string
format: binary
/store/inventory:
get:
tags:
- store
summary: Returns pet inventories by status
description: Returns a map of status codes to quantities
operationId: getInventory
responses:
'200':
description: successful operation
content:
application/json:
schema:
type: object
additionalProperties:
type: integer
format: int32
security:
- api_key: []
/store/order:
post:
tags:
- store
summary: Place an order for a pet
description: ''
operationId: placeOrder
responses:
'200':
description: successful operation
content:
application/xml:
schema:
$ref: 'schemas/Order.yaml'
application/json:
schema:
$ref: 'schemas/Order.yaml'
'400':
description: Invalid Order
requestBody:
content:
application/json:
schema:
$ref: 'schemas/Order.yaml'
description: order placed for purchasing the pet
required: true
'/store/order/{orderId}':
get:
tags:
- store
summary: Find purchase order by ID
description: >-
For valid response try integer IDs with value <= 5 or > 10. Other values
will generate exceptions
operationId: getOrderById
parameters:
- name: orderId
in: path
description: ID of pet that needs to be fetched
required: true
schema:
type: integer
format: int64
minimum: 1
maximum: 5
responses:
'200':
description: successful operation
content:
application/xml:
schema:
$ref: 'schemas/Order.yaml'
application/json:
schema:
$ref: 'schemas/Order.yaml'
'400':
description: Invalid ID supplied
'404':
description: Order not found
delete:
tags:
- store
summary: Delete purchase order by ID
description: >-
For valid response try integer IDs with value < 1000. Anything above
1000 or nonintegers will generate API errors
operationId: deleteOrder
parameters:
- name: orderId
in: path
description: ID of the order that needs to be deleted
required: true
schema:
type: string
responses:
'400':
description: Invalid ID supplied
'404':
description: Order not found
/user:
post:
tags:
- user
summary: Create user
description: This can only be done by the logged in user.
operationId: createUser
responses:
default:
description: successful operation
security:
- api_key: []
requestBody:
content:
application/json:
schema:
$ref: 'schemas/User.yaml'
description: Created user object
required: true
/user/createWithArray:
post:
tags:
- user
summary: Creates list of users with given input array
description: ''
operationId: createUsersWithArrayInput
responses:
default:
description: successful operation
security:
- api_key: []
requestBody:
$ref: '#/components/requestBodies/UserArray'
/user/createWithList:
post:
tags:
- user
summary: Creates list of users with given input array
description: ''
operationId: createUsersWithListInput
responses:
default:
description: successful operation
security:
- api_key: []
requestBody:
$ref: '#/components/requestBodies/UserArray'
/user/login:
get:
tags:
- user
summary: Logs user into the system
description: ''
operationId: loginUser
parameters:
- name: username
in: query
description: The user name for login
required: true
schema:
type: string
pattern: '^[a-zA-Z0-9]+[a-zA-Z0-9\.\-_]*[a-zA-Z0-9]+$'
- name: password
in: query
description: The password for login in clear text
required: true
schema:
type: string
responses:
'200':
description: successful operation
headers:
Set-Cookie:
description: >-
Cookie authentication key for use with the `api_key`
apiKey authentication.
schema:
type: string
example: AUTH_KEY=abcde12345; Path=/; HttpOnly
X-Rate-Limit:
description: calls per hour allowed by the user
schema:
type: integer
format: int32
X-Expires-After:
description: date in UTC when token expires
schema:
type: string
format: date-time
content:
application/xml:
schema:
type: string
application/json:
schema:
type: string
'400':
description: Invalid username/password supplied
/user/logout:
get:
tags:
- user
summary: Logs out current logged in user session
description: ''
operationId: logoutUser
responses:
default:
description: successful operation
security:
- api_key: []
'/user/{username}':
get:
tags:
- user
summary: Get user by user name
description: ''
operationId: getUserByName
parameters:
- name: username
in: path
description: The name that needs to be fetched. Use user1 for testing.
required: true
schema:
type: string
responses:
'200':
description: successful operation
content:
application/xml:
schema:
$ref: 'schemas/User.yaml'
application/json:
schema:
$ref: 'schemas/User.yaml'
'400':
description: Invalid username supplied
'404':
description: User not found
put:
tags:
- user
summary: Updated user
description: This can only be done by the logged in user.
operationId: updateUser
parameters:
- name: username
in: path
description: name that need to be deleted
required: true
schema:
type: string
responses:
'400':
description: Invalid user supplied
'404':
description: User not found
security:
- api_key: []
requestBody:
content:
application/json:
schema:
$ref: 'schemas/User.yaml'
description: Updated user object
required: true
delete:
tags:
- user
summary: Delete user
description: This can only be done by the logged in user.
operationId: deleteUser
parameters:
- name: username
in: path
description: The name that needs to be deleted
required: true
schema:
type: string
responses:
'400':
description: Invalid username supplied
'404':
description: User not found
security:
- api_key: []
externalDocs:
description: Find out more about Swagger
url: 'http://swagger.io'
components:
requestBodies:
UserArray:
content:
application/json:
schema:
type: array
items:
$ref: 'schemas/User.yaml'
description: List of user object
required: true
Pet:
content:
application/json:
schema:
$ref: 'schemas/Pet.yaml'
application/xml:
schema:
$ref: 'schemas/Pet.yaml'
description: Pet object that needs to be added to the store
required: true
securitySchemes:
petstore_auth:
type: oauth2
flows:
implicit:
authorizationUrl: 'http://petstore.swagger.io/api/oauth/dialog'
scopes:
'write:pets': modify pets in your account
'read:pets': read your pets
api_key:
type: apiKey
name: api_key
in: header
schemas:
ApiResponse:
title: An uploaded response
description: Describes the result of uploading an image resource
type: object
properties:
code:
type: integer
format: int32
type:
type: string
message:
type: string

View File

@@ -0,0 +1,12 @@
title: Pet category
description: A category for a pet
type: object
properties:
id:
type: integer
format: int64
name:
type: string
pattern: '^[a-zA-Z0-9]+[a-zA-Z0-9\.\-_]*[a-zA-Z0-9]+$'
xml:
name: Category

View File

@@ -0,0 +1,28 @@
title: Pet Order
description: An order for a pets from the pet store
type: object
properties:
id:
type: integer
format: int64
petId:
type: integer
format: int64
quantity:
type: integer
format: int32
shipDate:
type: string
format: date-time
status:
type: string
description: Order Status
enum:
- placed
- approved
- delivered
complete:
type: boolean
default: false
xml:
name: Order

View File

@@ -0,0 +1,38 @@
title: a Pet
description: A pet for sale in the pet store
type: object
required:
- name
- photoUrls
properties:
id:
type: integer
format: int64
category:
$ref: 'Category.yaml'
name:
type: string
example: doggie
photoUrls:
type: array
xml:
name: photoUrl
wrapped: true
items:
type: string
tags:
type: array
xml:
name: tag
wrapped: true
items:
$ref: 'Tag.yaml'
status:
type: string
description: pet status in the store
enum:
- available
- pending
- sold
xml:
name: Pet

View File

@@ -0,0 +1,11 @@
title: Pet Tag
description: A tag for a pet
type: object
properties:
id:
type: integer
format: int64
name:
type: string
xml:
name: Tag

View File

@@ -0,0 +1,25 @@
title: a User
description: A User who is purchasing from the pet store
type: object
properties:
id:
type: integer
format: int64
username:
type: string
firstName:
type: string
lastName:
type: string
email:
type: string
password:
type: string
phone:
type: string
userStatus:
type: integer
format: int32
description: User Status
xml:
name: User

View File

@@ -4,7 +4,7 @@
<groupId>org.openapitools</groupId>
<artifactId>openapi-generator-project</artifactId>
<!-- RELEASE_VERSION -->
<version>7.7.0-SNAPSHOT</version>
<version>8.0.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.7.0-SNAPSHOT</version>
<version>8.0.0-SNAPSHOT</version>
<!-- /RELEASE_VERSION -->
<relativePath>../../pom.xml</relativePath>
</parent>

View File

@@ -1833,6 +1833,7 @@ public class DefaultCodegen implements CodegenConfig {
specialCharReplacements.put("!=", "Not_Equal");
specialCharReplacements.put("<>", "Not_Equal");
specialCharReplacements.put("~=", "Tilde_Equal");
specialCharReplacements.put("==", "Double_Equal");
}
/**
@@ -6751,33 +6752,33 @@ public class DefaultCodegen implements CodegenConfig {
}
/**
* reads propertyKey from additionalProperties, converts it to a boolean and
* writes it back to additionalProperties to be usable as a boolean in
* mustache files.
*
* @param propertyKey property key
* @param stringSetter the setter function reference
* @return property value as String or default if not found
*/
public String convertPropertyToStringAndWriteBack(String propertyKey, Consumer<String> stringSetter) {
return convertPropertyToTypeAndWriteBack(propertyKey, Function.identity(), stringSetter);
}
/**
* reads propertyKey from additionalProperties, converts it to a boolean and
* writes it back to additionalProperties to be usable as a boolean in
* reads propertyKey from additionalProperties, converts it to a string and
* writes it back to additionalProperties to be usable as a string in
* mustache files.
*
* @param propertyKey property key
* @param stringSetter the setter function reference
* @return property value as String or null if not found
*/
public <T> T convertPropertyToTypeAndWriteBack(String propertyKey, Function<String, T> converter, Consumer<T> stringSetter) {
public String convertPropertyToStringAndWriteBack(String propertyKey, Consumer<String> stringSetter) {
return convertPropertyToTypeAndWriteBack(propertyKey, Function.identity(), stringSetter);
}
/**
* reads propertyKey from additionalProperties, converts it to T and
* writes it back to additionalProperties to be usable as T in
* mustache files.
*
* @param propertyKey property key
* @param genericTypeSetter the setter function reference
* @return property value as instance of type T or null if not found
*/
public <T> T convertPropertyToTypeAndWriteBack(String propertyKey, Function<String, T> converter, Consumer<T> genericTypeSetter) {
if (additionalProperties.containsKey(propertyKey)) {
String value = additionalProperties.get(propertyKey).toString();
T result = converter.apply(value);
writePropertyBack(propertyKey, result);
stringSetter.accept(result);
genericTypeSetter.accept(result);
return result;
}
return null;

View File

@@ -96,12 +96,8 @@ public class DefaultGenerator implements Generator {
private String contextPath;
private Map<String, String> generatorPropertyDefaults = new HashMap<>();
/**
* -- GETTER --
* Retrieves an instance to the configured template processor, available after user-defined options are
* applied via
* .
*
* @return A configured {@link TemplateProcessor}, or null.
*/
@Getter protected TemplateProcessor templateProcessor = null;

View File

@@ -111,8 +111,8 @@ public interface IJsonSchemaValidationProperties {
* - <code>categoryOneOf</code> is a parameter of class <code>GetAccountVideos_categoryOneOf_parameter</code>, a model parameter that correctly prefixed by its namespace: <code>org::openapitools::server::model::GetAccountVideos_categoryOneOf_parameter</code><br>
* - but that <code>GetAccountVideos_categoryOneOf_parameter</code> class is inside an <code>std::optional</code><br>
* <br>
* Then a correct generation of that parameter can be (for C++) <code>const std::optional<org::openapitools::server::model::GetAccountVideos_categoryOneOf_parameter> &categoryOneOf</code><br>
* but using #isModel alone without #isOptional in mustache might produce <code>const org::openapitools::server::model::std::optional<org::openapitools::server::model::GetAccountVideos_categoryOneOf_parameter> &categoryOneOf</code> instead, that do not compile.
* Then a correct generation of that parameter can be (for C++) <code>const std::optional&lt;org::openapitools::server::model::GetAccountVideos_categoryOneOf_parameter&gt; &amp;categoryOneOf</code><br>
* but using #isModel alone without #isOptional in mustache might produce <code>const org::openapitools::server::model::std::optional&lt;org::openapitools::server::model::GetAccountVideos_categoryOneOf_parameter&gt; &amp;categoryOneOf</code> instead, that do not compile.
*/
boolean getIsOptional();
void setIsOptional(boolean isOptional);

View File

@@ -316,7 +316,7 @@ public class InlineModelResolver {
if (schema.getAdditionalProperties() instanceof Schema) {
Schema inner = (Schema) schema.getAdditionalProperties();
if (inner != null) {
String schemaName = resolveModelName(schema.getTitle(), modelPrefix + this.inlineSchemaOptions.get("MAP_ITEM_SUFFIX"));
String schemaName = resolveModelName(inner.getTitle(), modelPrefix + this.inlineSchemaOptions.get("MAP_ITEM_SUFFIX"));
// Recurse to create $refs for inner models
gatherInlineModels(inner, schemaName);
if (isModelNeeded(inner)) {
@@ -1015,4 +1015,4 @@ public class InlineModelResolver {
return name;
}
}
}

View File

@@ -208,11 +208,6 @@ public abstract class AbstractCSharpCodegen extends DefaultCodegen {
instantiationTypes.put("array", "List");
instantiationTypes.put("list", "List");
instantiationTypes.put("map", "Dictionary");
this.setSortParamsByRequiredFlag(true);
// do it only on newer libraries to avoid breaking changes
// this.setSortModelPropertiesByRequiredFlag(true);
}
public void setUseCollection(boolean useCollection) {

View File

@@ -347,6 +347,12 @@ public abstract class AbstractKotlinCodegen extends DefaultCodegen implements Co
return toModelName(type);
}
private String getItemsTypeDeclaration(Schema items) {
String itemsTypeDeclaration = getTypeDeclaration(items);
String nullable = items.getNullable() != null && items.getNullable() && !itemsTypeDeclaration.endsWith("?") ? "?" : "";
return itemsTypeDeclaration + nullable;
}
/**
* Output the type declaration of the property
*
@@ -359,7 +365,7 @@ public abstract class AbstractKotlinCodegen extends DefaultCodegen implements Co
Schema<?> target = ModelUtils.isGenerateAliasAsModel() ? p : schema;
if (ModelUtils.isArraySchema(target)) {
Schema<?> items = ModelUtils.getSchemaItems( schema);
return getSchemaType(target) + "<" + getTypeDeclaration(items) + ">";
return getSchemaType(target) + "<" + getItemsTypeDeclaration(items) + ">";
} else if (ModelUtils.isMapSchema(target)) {
// Note: ModelUtils.isMapSchema(p) returns true when p is a composed schema that also defines
// additionalproperties: true

View File

@@ -629,7 +629,11 @@ public abstract class AbstractTypeScriptClientCodegen extends DefaultCodegen imp
public String getTypeDeclaration(Schema p) {
if (ModelUtils.isArraySchema(p)) {
Schema<?> items = ModelUtils.getSchemaItems(p);
return getSchemaType(p) + "<" + getTypeDeclaration(unaliasSchema(items)) + ">";
String postfix = "";
if (Boolean.TRUE.equals(items.getNullable())) {
postfix = " | null";
}
return getSchemaType(p) + "<" + getTypeDeclaration(unaliasSchema(items)) + postfix + ">";
} else if (ModelUtils.isMapSchema(p)) {
Schema<?> inner = getSchemaAdditionalProperties(p);
String nullSafeSuffix = getNullSafeAdditionalProps() ? " | undefined" : "";

View File

@@ -186,7 +186,9 @@ public class AspNetServerCodegen extends AbstractCSharpCodegen {
aspnetCoreVersion.addEnum("3.1", "ASP.NET Core 3.1");
aspnetCoreVersion.addEnum("5.0", "ASP.NET Core 5.0");
aspnetCoreVersion.addEnum("6.0", "ASP.NET Core 6.0");
aspnetCoreVersion.setDefault("3.1");
aspnetCoreVersion.addEnum("7.0", "ASP.NET Core 7.0");
aspnetCoreVersion.addEnum("8.0", "ASP.NET Core 8.0");
aspnetCoreVersion.setDefault("8.0");
aspnetCoreVersion.setOptValue(aspnetCoreVersion.getDefault());
cliOptions.add(aspnetCoreVersion);
@@ -194,7 +196,7 @@ public class AspNetServerCodegen extends AbstractCSharpCodegen {
swashbuckleVersion.addEnum("4.0.0", "Swashbuckle 4.0.0");
swashbuckleVersion.addEnum("5.0.0", "Swashbuckle 5.0.0");
swashbuckleVersion.addEnum("6.4.0", "Swashbuckle 6.4.0");
swashbuckleVersion.setDefault("3.0.0");
swashbuckleVersion.setDefault("6.4.0");
swashbuckleVersion.setOptValue(swashbuckleVersion.getDefault());
cliOptions.add(swashbuckleVersion);
@@ -427,7 +429,7 @@ public class AspNetServerCodegen extends AbstractCSharpCodegen {
supportingFiles.add(new SupportingFile("typeConverter.mustache", packageFolder + File.separator + "Converters", "CustomEnumConverter.cs"));
}
if (aspnetCoreVersion.getOptValue().startsWith("3.") || aspnetCoreVersion.getOptValue().startsWith("5.0") || aspnetCoreVersion.getOptValue().startsWith("6.")) {
if (!aspnetCoreVersion.getOptValue().startsWith("2.")) {
supportingFiles.add(new SupportingFile("OpenApi" + File.separator + "TypeExtensions.mustache", packageFolder + File.separator + "OpenApi", "TypeExtensions.cs"));
}
@@ -681,7 +683,7 @@ public class AspNetServerCodegen extends AbstractCSharpCodegen {
private void setAspnetCoreVersion(String packageFolder) {
setCliOption(aspnetCoreVersion);
if (aspnetCoreVersion.getOptValue().startsWith("3.") || aspnetCoreVersion.getOptValue().startsWith("5.0") || aspnetCoreVersion.getOptValue().startsWith("6.")) {
if (!aspnetCoreVersion.getOptValue().startsWith("2.")) {
compatibilityVersion = null;
} else if ("2.0".equals(aspnetCoreVersion.getOptValue())) {
compatibilityVersion = null;
@@ -698,6 +700,8 @@ public class AspNetServerCodegen extends AbstractCSharpCodegen {
private String determineTemplateVersion(String frameworkVersion) {
switch (frameworkVersion) {
case "8.0":
case "7.0":
case "6.0":
case "5.0":
case "3.1":

View File

@@ -745,8 +745,6 @@ public class CSharpClientCodegen extends AbstractCSharpCodegen {
if (GENERICHOST.equals(getLibrary())) {
setLibrary(GENERICHOST);
additionalProperties.put("useGenericHost", true);
// all c# libraries should be doing this, but we only do it here to avoid breaking changes
this.setSortModelPropertiesByRequiredFlag(true);
} else if (RESTSHARP.equals(getLibrary())) {
additionalProperties.put("useRestSharp", true);
needsCustomHttpMethod = true;

View File

@@ -50,7 +50,7 @@ public class ElixirClientCodegen extends DefaultCodegen {
private final Pattern simpleAtomPattern = Pattern.compile("\\A(?:(?:[_@\\p{Alpha}][_@\\p{Alnum}]*[?!]?)|-)\\z");
protected String apiVersion = "1.0.0";
@Setter protected String packageVersion = "1.0.0";
@Setter protected String moduleName;
protected static final String defaultModuleName = "OpenAPI.Client";
@@ -147,12 +147,6 @@ public class ElixirClientCodegen extends DefaultCodegen {
"__ENV__",
"__CALLER__"));
/**
* Additional Properties. These values can be passed to the templates and
* are available in models, apis, and supporting files
*/
additionalProperties.put("apiVersion", apiVersion);
/**
* Supporting Files. You can write single files for the generator with the
* entire object tree available. If the input file has a suffix of `.mustache
@@ -301,6 +295,10 @@ public class ElixirClientCodegen extends DefaultCodegen {
if (additionalProperties.containsKey(CodegenConstants.INVOKER_PACKAGE)) {
setModuleName((String) additionalProperties.get(CodegenConstants.INVOKER_PACKAGE));
}
if (additionalProperties.containsKey(CodegenConstants.PACKAGE_VERSION)) {
setPackageVersion((String) additionalProperties.get(CodegenConstants.PACKAGE_VERSION));
}
additionalProperties.put(CodegenConstants.PACKAGE_VERSION, packageVersion);
}
@Override

View File

@@ -136,10 +136,7 @@ public class JavaClientCodegen extends AbstractJavaCodegen
@Setter protected String errorObjectType;
protected String authFolder;
/**
* -- GETTER --
* Serialization library.
*
* @return 'gson' or 'jackson'
*/
@Getter protected String serializationLibrary = null;
@Setter protected boolean useOneOfDiscriminatorLookup = false; // use oneOf discriminator's mapping for model lookup

View File

@@ -72,6 +72,8 @@ import io.swagger.v3.oas.models.info.License;
import io.swagger.v3.oas.models.media.Schema;
import io.swagger.v3.oas.models.parameters.RequestBody;
import io.swagger.v3.oas.models.responses.ApiResponse;
import io.swagger.v3.oas.models.security.SecurityRequirement;
import io.swagger.v3.oas.models.security.SecurityScheme;
import io.swagger.v3.oas.models.servers.Server;
public class K6ClientCodegen extends DefaultCodegen implements CodegenConfig {
@@ -300,6 +302,7 @@ public class K6ClientCodegen extends DefaultCodegen implements CodegenConfig {
@Nullable
HTTPBody body;
boolean hasBodyExample;
boolean hasCookie;
@Nullable
HTTPParameters params;
@Nullable
@@ -308,7 +311,7 @@ public class K6ClientCodegen extends DefaultCodegen implements CodegenConfig {
DataExtractSubstituteParameter dataExtract;
public HTTPRequest(String operationId, String method, String path, @Nullable List<Parameter> query, @Nullable HTTPBody body,
boolean hasBodyExample, @Nullable HTTPParameters params, @Nullable List<k6Check> k6Checks,
boolean hasBodyExample, boolean hasCookie, @Nullable HTTPParameters params, @Nullable List<k6Check> k6Checks,
DataExtractSubstituteParameter dataExtract) {
// NOTE: https://k6.io/docs/javascript-api/k6-http/del-url-body-params
this.method = method.equals("delete") ? "del" : method;
@@ -318,6 +321,7 @@ public class K6ClientCodegen extends DefaultCodegen implements CodegenConfig {
this.query = query;
this.body = body;
this.hasBodyExample = hasBodyExample;
this.hasCookie = hasCookie;
this.params = params;
this.k6Checks = k6Checks;
this.dataExtract = dataExtract;
@@ -494,6 +498,29 @@ public class K6ClientCodegen extends DefaultCodegen implements CodegenConfig {
Set<Parameter> extraParameters = new HashSet<>();
Map<String, Set<Parameter>> pathVariables = new HashMap<>();
// get security schema from components
Map<String, SecurityScheme> securitySchemeMap = openAPI != null ?
(openAPI.getComponents() != null ? openAPI.getComponents().getSecuritySchemes() : null) : null;
// get global security requirements
List<SecurityRequirement> securityRequirements = openAPI.getSecurity();
// match global security requirements with security schemes and transform them to global auth methods
// global auth methods is a list of auth methods that are used in all requests
List<CodegenSecurity> globalAuthMethods = new ArrayList<>();
Map<String, SecurityScheme> globalSecurityMap = new HashMap<>();
if (securityRequirements != null) {
for (SecurityRequirement securityRequirement : securityRequirements) {
for (String securityRequirementKey : securityRequirement.keySet()) {
SecurityScheme securityScheme = securitySchemeMap.get(securityRequirementKey);
if (securityScheme != null) {
globalSecurityMap.put(securityRequirementKey, securityScheme);
}
}
}
globalAuthMethods = fromSecurity(globalSecurityMap);
}
for (String path : openAPI.getPaths().keySet()) {
Map<Integer, HTTPRequest> requests = new HashMap<>();
Set<Parameter> variables = new HashSet<>();
@@ -503,6 +530,7 @@ public class K6ClientCodegen extends DefaultCodegen implements CodegenConfig {
for (Map.Entry<PathItem.HttpMethod, Operation> methodOperation : openAPI.getPaths().get(path).
readOperationsMap().entrySet()) {
List<Parameter> httpParams = new ArrayList<>();
List<Parameter> cookieParams = new ArrayList<>();
List<Parameter> queryParams = new ArrayList<>();
List<Parameter> bodyOrFormParams = new ArrayList<>();
List<k6Check> k6Checks = new ArrayList<>();
@@ -638,7 +666,19 @@ public class K6ClientCodegen extends DefaultCodegen implements CodegenConfig {
pathVariables.put(groupName, variables);
final HTTPParameters params = new HTTPParameters(null, null, httpParams, null, null, null, null, null,
// put auth medthods in header or cookie
for (CodegenSecurity globalAuthMethod : globalAuthMethods) {
if (globalAuthMethod.isKeyInHeader) {
httpParams.add(new Parameter(globalAuthMethod.keyParamName, getTemplateString(toVarName(globalAuthMethod.keyParamName))));
extraParameters.add(new Parameter(toVarName(globalAuthMethod.keyParamName), globalAuthMethod.keyParamName.toUpperCase(Locale.ROOT)));
}
if (globalAuthMethod.isKeyInCookie) {
cookieParams.add(new Parameter(globalAuthMethod.keyParamName, getTemplateString(toVarName(globalAuthMethod.keyParamName))));
extraParameters.add(new Parameter(toVarName(globalAuthMethod.keyParamName), globalAuthMethod.keyParamName.toUpperCase(Locale.ROOT)));
}
}
final HTTPParameters params = new HTTPParameters(null, cookieParams, httpParams, null, null, null, null, null,
responseType.length() > 0 ? responseType : null);
assert params.headers != null;
@@ -650,11 +690,18 @@ public class K6ClientCodegen extends DefaultCodegen implements CodegenConfig {
// calculate order for this current request
Integer requestOrder = calculateRequestOrder(operationGroupingOrder, requests.size());
requests.put(requestOrder, new HTTPRequest(operationId, method.toString().toLowerCase(Locale.ROOT), path,
queryParams.size() > 0 ? queryParams : null,
bodyOrFormParams.size() > 0 ? new HTTPBody(bodyOrFormParams) : null, hasRequestBodyExample,
params.headers.size() > 0 ? params : null, k6Checks.size() > 0 ? k6Checks : null,
dataExtract.orElse(null)));
requests.put(requestOrder, new HTTPRequest(
operationId,
method.toString().toLowerCase(Locale.ROOT),
path,
queryParams.size() > 0 ? queryParams : null,
bodyOrFormParams.size() > 0 ? new HTTPBody(bodyOrFormParams) : null,
hasRequestBodyExample,
params.cookies.size() > 0 ? true : false,
params.headers.size() > 0 ? params : null,
k6Checks.size() > 0 ? k6Checks : null,
dataExtract.orElse(null))
);
}
addOrUpdateRequestGroup(requestGroups, groupName, pathVariables.get(groupName), requests);

View File

@@ -331,7 +331,7 @@ public class KotlinClientCodegen extends AbstractKotlinCodegen {
* Sets the serialization engine for Kotlin
*
* @param enumSerializationLibrary The string representation of the serialization library as defined by
* {@link org.openapitools.codegen.languages.AbstractKotlinCodegen.SERIALIZATION_LIBRARY_TYPE}
* {@link org.openapitools.codegen.languages.KotlinClientCodegen.SERIALIZATION_LIBRARY_TYPE}
*/
public void setSerializationLibrary(final String enumSerializationLibrary) {
try {

View File

@@ -32,6 +32,7 @@ import org.openapitools.codegen.CodegenProperty;
import org.openapitools.codegen.CodegenResponse;
import org.openapitools.codegen.CodegenType;
import org.openapitools.codegen.SupportingFile;
import org.openapitools.codegen.VendorExtension;
import org.openapitools.codegen.languages.features.BeanValidationFeatures;
import org.openapitools.codegen.languages.features.DocumentationProviderFeatures;
import org.openapitools.codegen.languages.features.SwaggerUIFeatures;
@@ -93,6 +94,8 @@ public class KotlinSpringServerCodegen extends AbstractKotlinCodegen
public static final String SERVICE_INTERFACE = "serviceInterface";
public static final String SERVICE_IMPLEMENTATION = "serviceImplementation";
public static final String SKIP_DEFAULT_INTERFACE = "skipDefaultInterface";
public static final String SKIP_DEFAULT_API_INTERFACE = "skipDefaultApiInterface";
public static final String SKIP_DEFAULT_DELEGATE_INTERFACE = "skipDefaultDelegateInterface";
public static final String REACTIVE = "reactive";
public static final String INTERFACE_ONLY = "interfaceOnly";
public static final String USE_FEIGN_CLIENT_URL = "useFeignClientUrl";
@@ -134,6 +137,8 @@ public class KotlinSpringServerCodegen extends AbstractKotlinCodegen
private String title = "OpenAPI Kotlin Spring";
private boolean useBeanValidation = true;
@Setter private boolean skipDefaultInterface = false;
@Setter private boolean skipDefaultApiInterface = false;
@Setter private boolean skipDefaultDelegateInterface = false;
@Setter private boolean exceptionHandler = true;
@Setter private boolean gradleBuildFile = true;
private boolean useSwaggerUI = true;
@@ -221,7 +226,7 @@ public class KotlinSpringServerCodegen extends AbstractKotlinCodegen
addSwitch(SERVICE_IMPLEMENTATION, "generate stub service implementations that extends service " +
"interfaces. If this is set to true service interfaces will also be generated", serviceImplementation);
addSwitch(USE_BEANVALIDATION, "Use BeanValidation API annotations to validate data types", useBeanValidation);
addSwitch(SKIP_DEFAULT_INTERFACE, "Whether to skip generation of default implementations for interfaces", skipDefaultInterface);
addSwitch(SKIP_DEFAULT_INTERFACE, "Whether to skip generation of default implementations for interfaces (Api interfaces or Delegate interfaces depending on the delegatePattern option)", skipDefaultInterface);
addSwitch(REACTIVE, "use coroutines for reactive behavior", reactive);
addSwitch(INTERFACE_ONLY, "Whether to generate only API interface stubs without the server files.", interfaceOnly);
addSwitch(USE_FEIGN_CLIENT_URL, "Whether to generate Feign client with url parameter.", useFeignClientUrl);
@@ -561,6 +566,16 @@ public class KotlinSpringServerCodegen extends AbstractKotlinCodegen
this.setDelegatePattern(Boolean.parseBoolean(additionalProperties.get(DELEGATE_PATTERN).toString()));
}
if (skipDefaultInterface) {
if (delegatePattern) {
this.setSkipDefaultDelegateInterface(true);
} else {
this.setSkipDefaultApiInterface(true);
}
}
writePropertyBack(SKIP_DEFAULT_API_INTERFACE, skipDefaultApiInterface);
writePropertyBack(SKIP_DEFAULT_DELEGATE_INTERFACE, skipDefaultDelegateInterface);
if (additionalProperties.containsKey(USE_TAGS)) {
this.setUseTags(Boolean.parseBoolean(additionalProperties.get(USE_TAGS).toString()));
}
@@ -800,6 +815,7 @@ public class KotlinSpringServerCodegen extends AbstractKotlinCodegen
model.imports.add("JsonProperty");
if (Boolean.TRUE.equals(model.hasEnums)) {
model.imports.add("JsonValue");
model.imports.add("JsonCreator");
}
} else {
//Needed imports for Jackson's JsonCreator
@@ -825,10 +841,14 @@ public class KotlinSpringServerCodegen extends AbstractKotlinCodegen
.filter(cm -> Boolean.TRUE.equals(cm.isEnum) && cm.allowableValues != null)
.forEach(cm -> {
cm.imports.add(importMapping.get("JsonValue"));
cm.imports.add(importMapping.get("JsonCreator"));
cm.imports.add(importMapping.get("JsonProperty"));
Map<String, String> itemJsonValue = new HashMap<>();
itemJsonValue.put("import", importMapping.get("JsonValue"));
imports.add(itemJsonValue);
Map<String, String> itemJsonCreator = new HashMap<>();
itemJsonCreator.put("import", importMapping.get("JsonCreator"));
imports.add(itemJsonCreator);
Map<String, String> itemJsonProperty = new HashMap<>();
itemJsonProperty.put("import", importMapping.get("JsonProperty"));
imports.add(itemJsonProperty);
@@ -874,7 +894,7 @@ public class KotlinSpringServerCodegen extends AbstractKotlinCodegen
final List<CodegenParameter> allParams = operation.allParams;
if (allParams != null) {
if (this.isAppendRequestToHandler()) {
allParams.add(new RequestCodegenParameter(true));
allParams.add(new RequestCodegenParameter());
}
allParams.forEach(param ->
// This is necessary in case 'modelMutable' is enabled,
@@ -971,7 +991,16 @@ public class KotlinSpringServerCodegen extends AbstractKotlinCodegen
@Data
@EqualsAndHashCode(callSuper = true)
static class RequestCodegenParameter extends CodegenParameter {
boolean isRequestObject;
boolean isRequestObject = true;
public RequestCodegenParameter() {
this.isOptional = false;
this.required = true;
this.paramName = "serverHttpRequest";
this.dataType = "ServerHttpRequest";
}
}
public RequestMappingMode getRequestMappingMode() {
@@ -982,4 +1011,16 @@ public class KotlinSpringServerCodegen extends AbstractKotlinCodegen
this.requestMappingMode = requestMappingMode;
}
@Override
public List<VendorExtension> getSupportedVendorExtensions() {
List<VendorExtension> extensions = super.getSupportedVendorExtensions();
extensions.add(VendorExtension.X_ACCEPTS);
extensions.add(VendorExtension.X_CLASS_EXTRA_ANNOTATION);
extensions.add(VendorExtension.X_CONTENT_TYPE);
extensions.add(VendorExtension.X_DISCRIMINATOR_VALUE);
extensions.add(VendorExtension.X_FIELD_EXTRA_ANNOTATION);
extensions.add(VendorExtension.X_PATTERN_MESSAGE);
return extensions;
}
}

View File

@@ -62,11 +62,8 @@ public class MysqlSchemaCodegen extends DefaultCodegen implements CodegenConfig
));
/**
* -- GETTER --
* Returns default database name for all MySQL queries
* This value must be used with backticks only, eg. `database_name`
*
* @return default database name
* This value must be used with backticks only, e.g. `database_name`
*/
@Getter protected String defaultDatabaseName = "", databaseNamePrefix = "", databaseNameSuffix = "_db";
protected String tableNamePrefix = "tbl_", tableNameSuffix = "";
@@ -83,10 +80,7 @@ public class MysqlSchemaCodegen extends DefaultCodegen implements CodegenConfig
@Getter @Setter
protected Boolean namedParametersEnabled = false;
/**
* -- GETTER --
* Returns identifier naming convention for table names and column names.
*
* @return identifier naming convention
*/
@Getter protected String identifierNamingConvention = "original";

View File

@@ -54,10 +54,7 @@ public class PhpSlim4ServerCodegen extends AbstractPhpCodegen {
protected String appDirName = "App";
protected String appPackage = "";
/**
* -- GETTER --
* Returns PSR-7 implementation package.
*
* @return PSR-7 implementation package
*/
@Getter protected String psr7Implementation = "slim-psr7";
protected String interfacesDirName = "Interfaces";

View File

@@ -57,6 +57,7 @@ public class RustClientCodegen extends AbstractRustCodegen implements CodegenCon
public static final String PACKAGE_NAME = "packageName";
public static final String PACKAGE_VERSION = "packageVersion";
public static final String HYPER_LIBRARY = "hyper";
public static final String HYPER0X_LIBRARY = "hyper0x";
public static final String REQWEST_LIBRARY = "reqwest";
public static final String SUPPORT_ASYNC = "supportAsync";
public static final String SUPPORT_MIDDLEWARE = "supportMiddleware";
@@ -202,7 +203,8 @@ public class RustClientCodegen extends AbstractRustCodegen implements CodegenCon
cliOptions.add(new CliOption(AVOID_BOXED_MODELS, "If set, `Box<T>` will not be used for models", SchemaTypeUtil.BOOLEAN_TYPE)
.defaultValue(Boolean.FALSE.toString()));
supportedLibraries.put(HYPER_LIBRARY, "HTTP client: Hyper.");
supportedLibraries.put(HYPER_LIBRARY, "HTTP client: Hyper (v1.x).");
supportedLibraries.put(HYPER0X_LIBRARY, "HTTP client: Hyper (v0.x).");
supportedLibraries.put(REQWEST_LIBRARY, "HTTP client: Reqwest.");
CliOption libraryOption = new CliOption(CodegenConstants.LIBRARY, "library template (sub-template) to use.");
@@ -371,6 +373,9 @@ public class RustClientCodegen extends AbstractRustCodegen implements CodegenCon
if (HYPER_LIBRARY.equals(getLibrary())) {
additionalProperties.put(HYPER_LIBRARY, "true");
} else if (HYPER0X_LIBRARY.equals(getLibrary())) {
additionalProperties.put(HYPER_LIBRARY, "true");
additionalProperties.put(HYPER0X_LIBRARY, "true");
} else if (REQWEST_LIBRARY.equals(getLibrary())) {
additionalProperties.put(REQWEST_LIBRARY, "true");
} else {

View File

@@ -294,7 +294,9 @@ public class TypeScriptAngularClientCodegen extends AbstractTypeScriptClientCode
// Set the typescript version compatible to the Angular version
// based on https://angular.io/guide/versions#actively-supported-versions
if (ngVersion.atLeast("18.0.0")) {
if (ngVersion.atLeast("18.1.0")) {
additionalProperties.put("tsVersion", ">=5.4.0 <5.6.0");
} else if (ngVersion.atLeast("18.0.0")) {
additionalProperties.put("tsVersion", ">=5.4.0 <5.5.0");
} else if (ngVersion.atLeast("17.0.0")) {
additionalProperties.put("tsVersion", ">=4.9.3 <5.3.0");
@@ -342,7 +344,11 @@ public class TypeScriptAngularClientCodegen extends AbstractTypeScriptClientCode
supportingFiles.add(new SupportingFile("ng-package.mustache", getIndexDirectory(), "ng-package.json"));
// Specific ng-packagr configuration
if (ngVersion.atLeast("18.0.0")) {
if (ngVersion.atLeast("18.1.0")) {
additionalProperties.put("ngPackagrVersion", "18.1.0");
// tsTickle is not required and there is no available version compatible with
// versions of TypeScript compatible with Angular 18.
} else if (ngVersion.atLeast("18.0.0")) {
additionalProperties.put("ngPackagrVersion", "18.0.0");
// tsTickle is not required and there is no available version compatible with
// versions of TypeScript compatible with Angular 18.

View File

@@ -44,11 +44,16 @@ public class TypeScriptAxiosClientCodegen extends AbstractTypeScriptClientCodege
public static final String STRING_ENUMS = "stringEnums";
public static final String STRING_ENUMS_DESC = "Generate string enums instead of objects for enum values.";
public static final String USE_SQUARE_BRACKETS_IN_ARRAY_NAMES = "useSquareBracketsInArrayNames";
public static final String AXIOS_VERSION = "axiosVersion";
public static final String DEFAULT_AXIOS_VERSION = "^1.6.1";
@Getter @Setter
protected String npmRepository = null;
protected Boolean stringEnums = false;
@Getter @Setter
protected String axiosVersion = DEFAULT_AXIOS_VERSION;
private String tsModelPackage = "";
public TypeScriptAxiosClientCodegen() {
@@ -77,6 +82,7 @@ public class TypeScriptAxiosClientCodegen extends AbstractTypeScriptClientCodege
this.cliOptions.add(new CliOption(WITH_NODE_IMPORTS, "Setting this property to true adds imports for NodeJS", SchemaTypeUtil.BOOLEAN_TYPE).defaultValue(Boolean.FALSE.toString()));
this.cliOptions.add(new CliOption(STRING_ENUMS, STRING_ENUMS_DESC).defaultValue(String.valueOf(this.stringEnums)));
this.cliOptions.add(new CliOption(USE_SQUARE_BRACKETS_IN_ARRAY_NAMES, "Setting this property to true will add brackets to array attribute names, e.g. my_values[].", SchemaTypeUtil.BOOLEAN_TYPE).defaultValue(Boolean.FALSE.toString()));
this.cliOptions.add(new CliOption(AXIOS_VERSION, "Use this property to override the axios version in package.json").defaultValue(DEFAULT_AXIOS_VERSION));
// Templates have no mapping between formatted property names and original base names so use only "original" and remove this option
removeOption(CodegenConstants.MODEL_PROPERTY_NAMING);
}
@@ -148,6 +154,11 @@ public class TypeScriptAxiosClientCodegen extends AbstractTypeScriptClientCodege
addNpmPackageGeneration();
}
if (additionalProperties.containsKey(AXIOS_VERSION)) {
setAxiosVersion(additionalProperties.get(AXIOS_VERSION).toString());
}
additionalProperties.put("axiosVersion", getAxiosVersion());
}
@Override

View File

@@ -75,6 +75,9 @@ public class TypeScriptClientCodegen extends AbstractTypeScriptClientCodegen imp
private static final String USE_OBJECT_PARAMS_SWITCH = "useObjectParameters";
private static final String USE_OBJECT_PARAMS_DESC = "Use aggregate parameter objects as function arguments for api operations instead of passing each parameter as a separate function argument.";
private static final String ENUM_TYPE_SWITCH = "enumType";
private static final String ENUM_TYPE_SWITCH_DESC = "Specify the enum type which should be used in the client code.";
private static final String[][] ENUM_TYPES = {{"stringUnion", "Union of literal string types"}, {"enum", "Typescript's [string enums](https://www.typescriptlang.org/docs/handbook/enums.html#string-enums)"}};
private final Map<String, String> frameworkToHttpLibMap;
@@ -137,6 +140,13 @@ public class TypeScriptClientCodegen extends AbstractTypeScriptClientCodegen imp
cliOptions.add(platformOption);
CliOption enumTypeOption = new CliOption(TypeScriptClientCodegen.ENUM_TYPE_SWITCH, TypeScriptClientCodegen.ENUM_TYPE_SWITCH_DESC);
for (String[] option : TypeScriptClientCodegen.ENUM_TYPES) {
enumTypeOption.addEnum(option[0], option[1]);
}
enumTypeOption.defaultValue(ENUM_TYPES[1][0]);
cliOptions.add(enumTypeOption);
// Set property naming to camelCase
supportModelPropertyNaming(CodegenConstants.MODEL_PROPERTY_NAMING_TYPE.camelCase);
@@ -404,6 +414,15 @@ public class TypeScriptClientCodegen extends AbstractTypeScriptClientCodegen imp
"http", httpLibName + ".ts"
));
additionalProperties.putIfAbsent(ENUM_TYPE_SWITCH, ENUM_TYPES[1][0]);
Object propEnumType = additionalProperties.get(ENUM_TYPE_SWITCH);
Map<String, Boolean> enumTypes = new HashMap<>();
for (String[] option : ENUM_TYPES) {
enumTypes.put(option[0], option[0].equals(propEnumType));
}
additionalProperties.put("enumTypes", enumTypes);
Object propPlatform = additionalProperties.get(PLATFORM_SWITCH);
if (propPlatform == null) {
propPlatform = "browser";
@@ -458,12 +477,8 @@ public class TypeScriptClientCodegen extends AbstractTypeScriptClientCodegen imp
@Override
public String getTypeDeclaration(Schema p) {
Schema inner;
if (ModelUtils.isArraySchema(p)) {
inner = ModelUtils.getSchemaItems(p);
return this.getSchemaType(p) + "<" + this.getTypeDeclaration(unaliasSchema(inner)) + ">";
} else if (ModelUtils.isMapSchema(p)) {
inner = getSchemaAdditionalProperties(p);
if (ModelUtils.isMapSchema(p)) {
Schema<?> inner = getSchemaAdditionalProperties(p);
String postfix = "";
if (Boolean.TRUE.equals(inner.getNullable())) {
postfix = " | null";

View File

@@ -41,6 +41,7 @@ import java.io.File;
import java.util.*;
import java.util.stream.Collectors;
import static java.util.Objects.nonNull;
import static org.openapitools.codegen.utils.CamelizeOption.LOWERCASE_FIRST_LETTER;
import static org.openapitools.codegen.utils.StringUtils.*;
@@ -387,8 +388,32 @@ public class TypeScriptFetchClientCodegen extends AbstractTypeScriptClientCodege
for (ModelsMap entry : result.values()) {
for (ModelMap model : entry.getModels()) {
ExtendedCodegenModel codegenModel = (ExtendedCodegenModel) model.getModel();
model.put("hasImports", codegenModel.imports.size() > 0);
boolean importsPresent = !codegenModel.imports.isEmpty();
// When legacyDiscriminatorBehaviour = false, DefaultCodegen will add the mapped models of the
// discriminator to codegenModel.imports, causing us to duplicate the import if we don't remove them
CodegenDiscriminator discriminator = codegenModel.discriminator;
boolean mappedDiscriminatorModelsPresent = nonNull(discriminator)
&& nonNull(discriminator.getMappedModels());
if (importsPresent && mappedDiscriminatorModelsPresent) {
Set<String> mappedDiscriminatorModelNames = discriminator.getMappedModels()
.stream()
.map(CodegenDiscriminator.MappedModel::getModelName)
.collect(Collectors.toSet());
Set<String> filteredImports = codegenModel.imports
.stream()
.filter(modelImport ->
!mappedDiscriminatorModelNames.contains(modelImport))
.collect(Collectors.toSet());
codegenModel.imports.clear();
codegenModel.imports.addAll(filteredImports);
}
model.put("hasImports", importsPresent);
model.put("tsImports", toTsImports(codegenModel, parseImports(codegenModel)));
allModels.add(codegenModel);
if (codegenModel.isEntity) {
entityModelClassnames.add(codegenModel.classname);
@@ -804,10 +829,6 @@ public class TypeScriptFetchClientCodegen extends AbstractTypeScriptClientCodege
newItemsDataType = "string";
var.dataTypeAlternate = var.dataTypeAlternate.replace("number", newItemsDataType);
}
if (var.itemsAreNullable()) {
var.dataTypeAlternate = var.dataTypeAlternate.replace(newItemsDataType, newItemsDataType + " | null");
}
} else if (var.isEnum) {
var.dataTypeAlternate = var.datatypeWithEnum;
} else if (var.isModel) {
@@ -825,10 +846,6 @@ public class TypeScriptFetchClientCodegen extends AbstractTypeScriptClientCodege
return parentIsEntity;
}
private boolean itemsAreNullable(ExtendedCodegenProperty var) {
return var.items.isNullable || (var.items.items != null && var.items.items.isNullable);
}
private void escapeOperationIds(OperationsMap operations) {
for (CodegenOperation _op : operations.getOperations().getOperation()) {
ExtendedCodegenOperation op = (ExtendedCodegenOperation) _op;
@@ -925,10 +942,6 @@ public class TypeScriptFetchClientCodegen extends AbstractTypeScriptClientCodege
newItemsDataType = "string";
param.dataTypeAlternate = param.dataTypeAlternate.replace("number", newItemsDataType);
}
if (param.itemsAreNullable()) {
param.dataTypeAlternate = param.dataTypeAlternate.replace(newItemsDataType, newItemsDataType + " | null");
}
} else if (param.isEnum) {
param.dataTypeAlternate = param.datatypeWithEnum;
} else if (param.isModel) {
@@ -1022,16 +1035,6 @@ public class TypeScriptFetchClientCodegen extends AbstractTypeScriptClientCodege
return false;
}
private static boolean itemsAreNullable(CodegenProperty items) {
if (items == null) {
return true;
}
if (items.items != null) {
return itemsAreNullable(items.items);
}
return items.isNullable;
}
private static String getItemsDataType(CodegenProperty items) {
if (items == null) {
return null;
@@ -1042,7 +1045,7 @@ public class TypeScriptFetchClientCodegen extends AbstractTypeScriptClientCodege
return items.dataType;
}
class ExtendedCodegenParameter extends CodegenParameter {
public class ExtendedCodegenParameter extends CodegenParameter {
public String dataTypeAlternate;
public boolean isUniqueId; // this parameter represents a unique id (x-isUniqueId: true)
public List<CodegenProperty> readOnlyVars; // a list of read-only properties
@@ -1052,10 +1055,6 @@ public class TypeScriptFetchClientCodegen extends AbstractTypeScriptClientCodege
return TypeScriptFetchClientCodegen.itemsAreUniqueId(this.items);
}
public boolean itemsAreNullable() {
return TypeScriptFetchClientCodegen.itemsAreNullable(this.items);
}
public String getItemsDataType() {
return TypeScriptFetchClientCodegen.getItemsDataType(this.items);
}
@@ -1120,6 +1119,7 @@ public class TypeScriptFetchClientCodegen extends AbstractTypeScriptClientCodege
this.isMap = cp.isMap;
this.isFile = cp.isFile;
this.isEnum = cp.isEnum;
this.isEnumRef = cp.isEnumRef;
this._enum = cp._enum;
this.allowableValues = cp.allowableValues;
this.items = cp.items;
@@ -1194,7 +1194,7 @@ public class TypeScriptFetchClientCodegen extends AbstractTypeScriptClientCodege
}
}
class ExtendedCodegenProperty extends CodegenProperty {
public class ExtendedCodegenProperty extends CodegenProperty {
public String dataTypeAlternate;
public boolean isEntity; //Is a model containing an "id" property marked as isUniqueId and which matches the 'x-entityId' value.
public boolean isUniqueId; // The property represents a unique id (x-isUniqueId: true)
@@ -1205,10 +1205,6 @@ public class TypeScriptFetchClientCodegen extends AbstractTypeScriptClientCodege
return TypeScriptFetchClientCodegen.itemsAreUniqueId(this.items);
}
public boolean itemsAreNullable() {
return TypeScriptFetchClientCodegen.itemsAreNullable(this.items);
}
public String getItemsDataType() {
return TypeScriptFetchClientCodegen.getItemsDataType(this.items);
}
@@ -1280,6 +1276,7 @@ public class TypeScriptFetchClientCodegen extends AbstractTypeScriptClientCodege
this.isArray = cp.isArray;
this.isMap = cp.isMap;
this.isEnum = cp.isEnum;
this.isEnumRef = cp.isEnumRef;
this.isReadOnly = cp.isReadOnly;
this.isWriteOnly = cp.isWriteOnly;
this.isNullable = cp.isNullable;
@@ -1350,7 +1347,7 @@ public class TypeScriptFetchClientCodegen extends AbstractTypeScriptClientCodege
}
}
class ExtendedCodegenOperation extends CodegenOperation {
public class ExtendedCodegenOperation extends CodegenOperation {
boolean hasReturnPassthroughVoid, returnTypeSupportsEntities, returnTypeIsModel, returnTypeIsArray;
String returnTypeAlternate, returnBaseTypeAlternate, returnPassthrough;
@@ -1467,7 +1464,7 @@ public class TypeScriptFetchClientCodegen extends AbstractTypeScriptClientCodege
}
}
class ExtendedCodegenModel extends CodegenModel {
public class ExtendedCodegenModel extends CodegenModel {
@Getter @Setter
public Set<String> modelImports = new TreeSet<String>();
public boolean isEntity; // Is a model containing an "id" property marked as isUniqueId

View File

@@ -7,22 +7,16 @@ import lombok.Getter;
*/
@Getter public class TemplateManagerOptions {
/**
* -- GETTER --
* Determines whether the template should minimally update a target file.
* A minimal update means the template manager is requested to update a file only if it is newer.
* This option avoids "touching" a file and causing the last modification time (mtime) to change.
*
* @return true to prefer updating only changed files, false to disable that suggestion
*/
private final boolean minimalUpdate;
/**
* -- GETTER --
* Determines whether the template manager should avoid overwriting an existing file.
* This differs from requesting
* which evaluates contents, while this option only
* This differs from requesting which evaluates contents, while this option only
* evaluates whether the file exists.
*
* @return true to avoid overwriting existing files (where supported), false to disable that suggestion.
*/
private final boolean skipOverwrite;

View File

@@ -2,8 +2,8 @@ package {{invokerPackage}};
import java.util.Set;
import {{javaxPackage}}.validation.ConstraintViolation;
import {{javaxPackage}}.validation.ValidationException;
import jakarta.validation.ConstraintViolation;
import jakarta.validation.ValidationException;
public class BeanValidationException extends ValidationException {
/**

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