-[Master](https://github.com/OpenAPITools/openapi-generator/tree/master) (`6.4.0`):
-[](https://travis-ci.com/OpenAPITools/openapi-generator)
+[Master](https://github.com/OpenAPITools/openapi-generator/tree/master) (`6.6.0`):
+[](https://app.travis-ci.com/github/OpenAPITools/openapi-generator/builds)
[](https://circleci.com/gh/OpenAPITools/openapi-generator)
[](https://ci.appveyor.com/project/WilliamCheng/openapi-generator)
[](https://app.bitrise.io/app/4a2b10a819d12b67)
[7.0.x](https://github.com/OpenAPITools/openapi-generator/tree/7.0.x) (`7.0.x`):
-[](https://travis-ci.com/OpenAPITools/openapi-generator)
+[](https://app.travis-ci.com/github/OpenAPITools/openapi-generator/builds)
[](https://circleci.com/gh/OpenAPITools/openapi-generator)
[](https://ci.appveyor.com/project/WilliamCheng/openapi-generator)
[](https://app.bitrise.io/app/4a2b10a819d12b67)
@@ -78,7 +78,7 @@ OpenAPI Generator allows generation of API client libraries (SDK generation), se
| | Languages/Frameworks |
| -------------------------------- |-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
-| **API clients** | **ActionScript**, **Ada**, **Apex**, **Bash**, **C**, **C#** (.net 2.0, 3.5 or later, .NET Standard 1.3 - 2.1, .NET Core 3.1, .NET 5.0. Libraries: RestSharp, GenericHost, HttpClient), **C++** (Arduino, cpp-restsdk, Qt5, Tizen, Unreal Engine 4), **Clojure**, **Crystal**, **Dart**, **Elixir**, **Elm**, **Eiffel**, **Erlang**, **Go**, **Groovy**, **Haskell** (http-client, Servant), **Java** (Apache HttpClient 4.x, Apache HttpClient 5.x, Jersey1.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**, **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), **Swift** (2.x, 3.x, 4.x, 5.x), **Typescript** (AngularJS, Angular (2.x - 13.x), Aurelia, Axios, Fetch, Inversify, jQuery, Nestjs, Node, redux-query, Rxjs) |
+| **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, Jersey1.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**, **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), **Swift** (2.x, 3.x, 4.x, 5.x), **Typescript** (AngularJS, Angular (2.x - 15.x), Aurelia, Axios, Fetch, Inversify, jQuery, Nestjs, Node, redux-query, Rxjs) |
| **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, Vertx), **PHP** (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/), Scalatra) |
| **API documentation generators** | **HTML**, **Confluence Wiki**, **Asciidoc**, **Markdown**, **PlantUML** |
| **Configuration files** | [**Apache2**](https://httpd.apache.org/) |
@@ -120,9 +120,9 @@ The OpenAPI Specification has undergone 3 revisions since initial creation in 20
| OpenAPI Generator Version | Release Date | Notes |
| --------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------ | ------------------------------------------------- |
-| 7.0.0 (upcoming major release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/7.0.0-SNAPSHOT/) | Feb/Mar 2023 | Major release with breaking changes (no fallback) |
-| 6.4.0 (upcoming minor release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/6.4.0-SNAPSHOT/) | 05.12.2022 | Minor release with breaking changes (with fallback) |
-| [6.3.0](https://github.com/OpenAPITools/openapi-generator/releases/tag/v6.3.0) (latest stable release) | 01.02.2023 | Minor release with breaking changes (with fallback) |
+| 7.0.0 (upcoming major release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/7.0.0-SNAPSHOT/) | May/Jun 2023 | Major release with breaking changes (no fallback) |
+| 6.6.0 (upcoming minor release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/6.5.0-SNAPSHOT/) | 28.04.2023 | Minor release with breaking changes (with fallback) |
+| [6.5.0](https://github.com/OpenAPITools/openapi-generator/releases/tag/v6.5.0) (latest stable release) | 01.04.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) |
@@ -182,16 +182,16 @@ See the different versions of the [openapi-generator-cli](https://search.maven.o
If you're looking for the latest stable version, you can grab it directly from Maven.org (Java 8 runtime at a minimum):
-JAR location: `https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/6.3.0/openapi-generator-cli-6.3.0.jar`
+JAR location: `https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/6.5.0/openapi-generator-cli-6.5.0.jar`
For **Mac/Linux** users:
```sh
-wget https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/6.3.0/openapi-generator-cli-6.3.0.jar -O openapi-generator-cli.jar
+wget https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/6.5.0/openapi-generator-cli-6.5.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/6.3.0/openapi-generator-cli-6.3.0.jar
+Invoke-WebRequest -OutFile openapi-generator-cli.jar https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/6.5.0/openapi-generator-cli-6.5.0.jar
```
After downloading the JAR, run `java -jar openapi-generator-cli.jar help` to show the usage.
@@ -263,6 +263,20 @@ If you don't have maven installed, you may directly use the included [maven wrap
./mvnw clean install
```
+#### Nix users
+
+If you're a nix user, you can enter OpenAPI Generator shell, by typing:
+```sh
+nix develop
+```
+It will enter a shell with Java 8 and Maven installed.
+
+Direnv supports automatically loading of the nix developer shell, so if you're using direnv too, type:
+```sh
+direnv allow
+```
+and have `java` and `mvn` set up with correct versions each time you enter project directory.
+
The default build contains minimal static analysis (via CheckStyle). To run your build with PMD and Spotbugs, use the `static-analysis` profile:
```sh
@@ -416,7 +430,7 @@ openapi-generator-cli version
To use a specific version of "openapi-generator-cli"
```sh
-openapi-generator-cli version-manager set 6.3.0
+openapi-generator-cli version-manager set 6.5.0
```
Or install it as dev-dependency:
@@ -440,7 +454,7 @@ java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generat
(if you're on Windows, replace the last command with `java -jar modules\openapi-generator-cli\target\openapi-generator-cli.jar generate -i https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g php -o c:\temp\php_api_client`)
-You can also download the JAR (latest release) directly from [maven.org](https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/6.3.0/openapi-generator-cli-6.3.0.jar)
+You can also download the JAR (latest release) directly from [maven.org](https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/6.5.0/openapi-generator-cli-6.5.0.jar)
To get a list of **general** options available, please run `java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar help generate`
@@ -588,8 +602,9 @@ Here are some companies/projects (alphabetical order) using OpenAPI Generator in
- [Angular.Schule](https://angular.schule/)
- [Aqovia](https://aqovia.com/)
- [Australia and New Zealand Banking Group (ANZ)](http://www.anz.com/)
-- [ASKUL](https://www.askul.co.jp)
- [Arduino](https://www.arduino.cc/)
+- [ASKUL](https://www.askul.co.jp)
+- [Amazon Web Services (AWS)](https://aws.amazon.com/)
- [b<>com](https://b-com.com/en)
- [百度营销](https://e.baidu.com)
- [Bandwidth](https://dev.bandwidth.com)
@@ -878,6 +893,7 @@ Here are some companies/projects (alphabetical order) using OpenAPI Generator in
- 2022-04-06 - [Effective Software Development using OpenAPI Generator](https://apexlabs.ai/post/openapi-generator) by Ajil Oommen (Senior Flutter Developer)
- 2022-05-13 - [A Path From an API To Client Libraries](https://www.youtube.com/watch?v=XC8oVn_efTw) by [Filip Srnec](https://www.devoxx.co.uk/talk/?id=11211) at Infobip
- 2022-06-01 - [API First, using OpenAPI and Spring Boot](https://medium.com/xgeeks/api-first-using-openapi-and-spring-boot-2602c04bb0d3) by [Micael Estrázulas Vianna](https://estrazulas.medium.com/)
+- 2022-06-12 - [Mustache templates with OpenAPI specs](https://medium.com/geekculture/mustache-templates-with-openapi-specs-f24711c67dec) by [Beppe Catanese](https://github.com/gcatanese)
- 2022-07-01 - [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/)
- 2022-07-22 - [使用OpenAPI Generator Maven plugin开发api优先的java客户端和服务端代码](https://blog.roccoshi.top/2022/java/openapi-generator%E7%9A%84%E4%BD%BF%E7%94%A8/) by [Lincest](https://github.com/Lincest)
- 2022-08-01 - [Tutorial: Etsy Open API v3 (ruby)](https://blog.tjoyal.dev/etsy-open-api-v3/) by [Thierry Joyal](https://github.com/tjoyal)
@@ -889,6 +905,10 @@ Here are some companies/projects (alphabetical order) using OpenAPI Generator in
- 2022-12-13 - [API-First with Spring WebFlux and OpenAPI Generator](https://boottechnologies-ci.medium.com/api-first-with-spring-webflux-and-openapi-generator-38b7804c4ed4) by [Eric Anicet](https://boottechnologies-ci.medium.com/)
- 2023-01-06 - [Major Improvements with Helidon and OpenAPI](https://medium.com/helidon/major-improvements-with-helidon-and-openapi-f76a0951508e) by [Tim Quinn](https://medium.com/@tquinno600)
- 2023-02-02 - [Replacing Postman with the Jetbrains HTTP Client](https://lengrand.fr/replacing-postman-in-seconds-with-the-jetbrains-http-client/) by [julien Lengrand-Lambert](https://github.com/jlengrand)
+- 2023-03-15 - [OpenAPI Generatorに適したOpenAPIの書き方](https://techblog.zozo.com/entry/how-to-write-openapi-for-openapi-generator) by [ZOZO Tech Blog](https://techblog.zozo.com/)
+- 2023-03-19 - [EXOGEM: Extending OpenAPI Generator for Monitoring of RESTful APIs](https://link.springer.com/chapter/10.1007/978-3-031-26507-5_10) by Daniel Friis Holtebo, Jannik Lucas Sommer, Magnus Mølgaard Lund, Alessandro Tibo, Junior Dongo & Michele Albano at "ICSOC 2022: Service-Oriented Computing – ICSOC 2022 Workshops"
+- 2023-03-28 - [API-First Design with OpenAPI Generator](https://www.linkedin.com/pulse/api-first-design-openapi-generator-jonathan-manera/) by [Jonathan Manera](https://www.linkedin.com/in/manerajona/)
+- 2023-03-28 - [ハンズオンで学ぶサーバーサイド Kotlin(Spring Boot&Arrow&OpenAPI Generator)v1.0.1](https://zenn.dev/msksgm/books/implementing-server-side-kotlin-development) by [msk](https://zenn.dev/msksgm)
## [6 - About Us](#table-of-contents)
@@ -1016,6 +1036,7 @@ Here is a list of template creators:
* Erlang Server: @galaxie
* F# (Giraffe) Server: @nmfisher
* Go Server: @guohuang
+ * Go Server (refactored in 7.0.0): @lwj5
* Go (Echo) Server: @ph4r5h4d
* Go (Gin) Server: @kemokemo
* GraphQL Express Server: @renepardon
@@ -1120,7 +1141,7 @@ If you want to join the committee, please kindly apply by sending an email to te
| Elm | @eriktim (2018/09) |
| Erlang | @tsloughter (2017/11) @jfacorro (2018/10) @robertoaloi (2018/10) |
| F# | @nmfisher (2019/05) |
-| Go | @antihax (2017/11) @grokify (2018/07) @kemokemo (2018/09) @jirikuncar (2021/01) @ph4r5h4d (2021/04) |
+| Go | @antihax (2017/11) @grokify (2018/07) @kemokemo (2018/09) @jirikuncar (2021/01) @ph4r5h4d (2021/04) @lwj5 (2023/04) |
| GraphQL | @renepardon (2018/12) |
| Groovy | |
| Haskell | |
@@ -1230,3 +1251,4 @@ See the License for the specific language governing permissions and
limitations under the License.
---
+
diff --git a/bin/configs/aspnetcore-6.0-useSwashBuckle.yaml b/bin/configs/aspnetcore-6.0-useSwashBuckle.yaml
new file mode 100644
index 00000000000..e0e873e8ec4
--- /dev/null
+++ b/bin/configs/aspnetcore-6.0-useSwashBuckle.yaml
@@ -0,0 +1,11 @@
+generatorName: aspnetcore
+outputDir: samples/server/petstore/aspnetcore-6.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: "6.0"
+ userSecretsGuid: 'cb87e868-8646-48ef-9bb6-344b537d0d37'
+ useSwashBuckle: false
+ buildTarget: library
+ isLibrary: true
diff --git a/bin/configs/csharp-netcore-OpenAPIClient-net47.yaml b/bin/configs/csharp-netcore-OpenAPIClient-net47.yaml
index 35e90e8db71..9ca276977a9 100644
--- a/bin/configs/csharp-netcore-OpenAPIClient-net47.yaml
+++ b/bin/configs/csharp-netcore-OpenAPIClient-net47.yaml
@@ -9,3 +9,4 @@ additionalProperties:
disallowAdditionalPropertiesIfNotPresent: false
useOneOfDiscriminatorLookup: true
targetFramework: net47
+ skipOneOfAnyOfGetter: true
diff --git a/bin/configs/csharp-netcore-OpenAPIClient-unityWebRequest.yaml b/bin/configs/csharp-netcore-OpenAPIClient-unityWebRequest.yaml
new file mode 100644
index 00000000000..b65bdf593f9
--- /dev/null
+++ b/bin/configs/csharp-netcore-OpenAPIClient-unityWebRequest.yaml
@@ -0,0 +1,6 @@
+# for .net Unity
+generatorName: csharp-netcore
+outputDir: samples/client/petstore/csharp-netcore/OpenAPIClient-unityWebRequest
+inputSpec: modules/openapi-generator/src/test/resources/3_0/csharp/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml
+templateDir: modules/openapi-generator/src/main/resources/csharp-netcore
+library: unityWebRequest
\ No newline at end of file
diff --git a/bin/configs/unmaintained/erlang-client.yaml b/bin/configs/erlang-client.yaml
similarity index 100%
rename from bin/configs/unmaintained/erlang-client.yaml
rename to bin/configs/erlang-client.yaml
diff --git a/bin/configs/unmaintained/erlang-proper.yaml b/bin/configs/erlang-proper.yaml
similarity index 100%
rename from bin/configs/unmaintained/erlang-proper.yaml
rename to bin/configs/erlang-proper.yaml
diff --git a/bin/configs/jaxrs-cxf-cdi.yaml b/bin/configs/jaxrs-cxf-cdi.yaml
index 63299c1d4e9..83b548e0e25 100644
--- a/bin/configs/jaxrs-cxf-cdi.yaml
+++ b/bin/configs/jaxrs-cxf-cdi.yaml
@@ -1,6 +1,6 @@
generatorName: jaxrs-cxf-cdi
outputDir: samples/server/petstore/jaxrs-cxf-cdi
-inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml
+inputSpec: modules/openapi-generator/src/test/resources/3_0/jaxrs/petstore.yaml
templateDir: modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-cdi
additionalProperties:
hideGenerationTimestamp: "true"
diff --git a/bin/configs/jaxrs-spec-required-and-readonly-property.yaml b/bin/configs/jaxrs-spec-required-and-readonly-property.yaml
new file mode 100644
index 00000000000..c6a1f257385
--- /dev/null
+++ b/bin/configs/jaxrs-spec-required-and-readonly-property.yaml
@@ -0,0 +1,10 @@
+generatorName: jaxrs-spec
+outputDir: samples/server/petstore/jaxrs-spec-required-and-readonly-property
+inputSpec: modules/openapi-generator/src/test/resources/3_0/required-and-readonly-property.yaml
+templateDir: modules/openapi-generator/src/main/resources/JavaJaxRS/spec
+additionalProperties:
+ artifactId: jaxrs-spec-petstore-server
+ serializableModel: "true"
+ hideGenerationTimestamp: "true"
+ implicitHeadersRegex: (api_key|enum_header_string)
+ generateBuilders: "true"
diff --git a/bin/configs/python-nextgen-aiohttp.yaml b/bin/configs/python-nextgen-aiohttp.yaml
index b211652bf57..991d18a620e 100644
--- a/bin/configs/python-nextgen-aiohttp.yaml
+++ b/bin/configs/python-nextgen-aiohttp.yaml
@@ -5,4 +5,4 @@ templateDir: modules/openapi-generator/src/main/resources/python-nextgen
library: asyncio
additionalProperties:
packageName: petstore_api
- floatStrictType: false
+ mapNumberTo: float
diff --git a/bin/configs/python-nextgen-echo-api.yaml b/bin/configs/python-nextgen-echo-api.yaml
index 47dd5fa3ba5..b9eb1f91416 100644
--- a/bin/configs/python-nextgen-echo-api.yaml
+++ b/bin/configs/python-nextgen-echo-api.yaml
@@ -4,4 +4,3 @@ inputSpec: modules/openapi-generator/src/test/resources/3_0/echo_api.yaml
templateDir: modules/openapi-generator/src/main/resources/python-nextgen
additionalProperties:
hideGenerationTimestamp: "true"
- allowStringInDateTimeParameters: true
diff --git a/bin/configs/python-nextgen.yaml b/bin/configs/python-nextgen.yaml
index c2c09ee0147..c3636e22a5d 100644
--- a/bin/configs/python-nextgen.yaml
+++ b/bin/configs/python-nextgen.yaml
@@ -6,3 +6,4 @@ additionalProperties:
packageName: petstore_api
useOneOfDiscriminatorLookup: "true"
disallowAdditionalPropertiesIfNotPresent: false
+ mapNumberTo: StrictFloat
diff --git a/bin/configs/spring-boot-beanvalidation-no-nullable-oas3.yaml b/bin/configs/spring-boot-beanvalidation-no-nullable-oas3.yaml
deleted file mode 100644
index b1e5245ae85..00000000000
--- a/bin/configs/spring-boot-beanvalidation-no-nullable-oas3.yaml
+++ /dev/null
@@ -1,13 +0,0 @@
-generatorName: spring
-outputDir: samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable
-library: spring-boot
-inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml
-templateDir: modules/openapi-generator/src/main/resources/JavaSpring
-additionalProperties:
- groupId: org.openapitools.openapi3
- documentationProvider: springdoc
- java8: "false"
- useBeanValidation: true
- artifactId: spring-boot-beanvalidation-no-nullable
- hideGenerationTimestamp: "true"
- openApiNullable: "false"
diff --git a/bin/configs/spring-boot-beanvalidation-no-nullable.yaml b/bin/configs/spring-boot-beanvalidation-no-nullable.yaml
index 1457469bc72..718b0a87e9d 100644
--- a/bin/configs/spring-boot-beanvalidation-no-nullable.yaml
+++ b/bin/configs/spring-boot-beanvalidation-no-nullable.yaml
@@ -1,9 +1,10 @@
generatorName: spring
outputDir: samples/server/petstore/springboot-beanvalidation-no-nullable
library: spring-boot
-inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml
+inputSpec: modules/openapi-generator/src/test/resources/3_0/spring/petstore-with-fake-endpoints-models-for-testing.yaml
templateDir: modules/openapi-generator/src/main/resources/JavaSpring
additionalProperties:
+ groupId: org.openapitools.openapi3
documentationProvider: springfox
java8: "false"
useBeanValidation: true
diff --git a/bin/configs/spring-boot-beanvalidation.yaml b/bin/configs/spring-boot-beanvalidation.yaml
index 4a5daef5845..b43f22721a1 100644
--- a/bin/configs/spring-boot-beanvalidation.yaml
+++ b/bin/configs/spring-boot-beanvalidation.yaml
@@ -1,7 +1,7 @@
generatorName: spring
outputDir: samples/server/petstore/springboot-beanvalidation
library: spring-boot
-inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml
+inputSpec: modules/openapi-generator/src/test/resources/3_0/spring/petstore-with-fake-endpoints-models-for-testing.yaml
templateDir: modules/openapi-generator/src/main/resources/JavaSpring
additionalProperties:
documentationProvider: springfox
diff --git a/bin/configs/spring-boot-defaultInterface-unhandledException.yaml b/bin/configs/spring-boot-defaultInterface-unhandledException.yaml
index 3d492c12f76..9e096062883 100644
--- a/bin/configs/spring-boot-defaultInterface-unhandledException.yaml
+++ b/bin/configs/spring-boot-defaultInterface-unhandledException.yaml
@@ -1,6 +1,6 @@
generatorName: spring
outputDir: samples/server/petstore/spring-boot-defaultInterface-unhandledException
-inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml
+inputSpec: modules/openapi-generator/src/test/resources/3_0/spring/petstore-with-fake-endpoints-models-for-testing.yaml
templateDir: modules/openapi-generator/src/main/resources/JavaSpring
additionalProperties:
artifactId: spring-boot-defaultInterface-unhandledException
diff --git a/bin/configs/spring-boot-delegate-j8.yaml b/bin/configs/spring-boot-delegate-j8.yaml
index e1fae5805cd..be11dd0dec0 100644
--- a/bin/configs/spring-boot-delegate-j8.yaml
+++ b/bin/configs/spring-boot-delegate-j8.yaml
@@ -1,6 +1,6 @@
generatorName: spring
outputDir: samples/server/petstore/springboot-delegate-j8
-inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml
+inputSpec: modules/openapi-generator/src/test/resources/3_0/spring/petstore-with-fake-endpoints-models-for-testing.yaml
templateDir: modules/openapi-generator/src/main/resources/JavaSpring
additionalProperties:
documentationProvider: springfox
diff --git a/bin/configs/spring-boot-delegate-no-response-entity.yaml b/bin/configs/spring-boot-delegate-no-response-entity.yaml
new file mode 100644
index 00000000000..f8b5cdd3c35
--- /dev/null
+++ b/bin/configs/spring-boot-delegate-no-response-entity.yaml
@@ -0,0 +1,11 @@
+generatorName: spring
+outputDir: samples/server/petstore/springboot-delegate-no-response-entity
+inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml
+templateDir: modules/openapi-generator/src/main/resources/JavaSpring
+additionalProperties:
+ documentationProvider: springfox
+ artifactId: springboot-delegate-no-response-entity
+ hideGenerationTimestamp: "true"
+ java8: true
+ delegatePattern: "true"
+ useResponseEntity: "false"
diff --git a/bin/configs/spring-boot-delegate-oas3.yaml b/bin/configs/spring-boot-delegate-oas3.yaml
index 8b604d558a9..28ba653ad08 100644
--- a/bin/configs/spring-boot-delegate-oas3.yaml
+++ b/bin/configs/spring-boot-delegate-oas3.yaml
@@ -1,6 +1,6 @@
generatorName: spring
outputDir: samples/openapi3/server/petstore/springboot-delegate
-inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml
+inputSpec: modules/openapi-generator/src/test/resources/3_0/spring/petstore-with-fake-endpoints-models-for-testing.yaml
templateDir: modules/openapi-generator/src/main/resources/JavaSpring
additionalProperties:
groupId: org.openapitools.openapi3
diff --git a/bin/configs/spring-boot-delegate.yaml b/bin/configs/spring-boot-delegate.yaml
index 228b14d823e..56199a182d1 100644
--- a/bin/configs/spring-boot-delegate.yaml
+++ b/bin/configs/spring-boot-delegate.yaml
@@ -1,6 +1,6 @@
generatorName: spring
outputDir: samples/server/petstore/springboot-delegate
-inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml
+inputSpec: modules/openapi-generator/src/test/resources/3_0/spring/petstore-with-fake-endpoints-models-for-testing.yaml
templateDir: modules/openapi-generator/src/main/resources/JavaSpring
additionalProperties:
documentationProvider: springfox
diff --git a/bin/configs/spring-boot-implicitHeaders-oas3.yaml b/bin/configs/spring-boot-implicitHeaders-oas3.yaml
index 3d9423cd326..6d204b53c55 100644
--- a/bin/configs/spring-boot-implicitHeaders-oas3.yaml
+++ b/bin/configs/spring-boot-implicitHeaders-oas3.yaml
@@ -1,6 +1,6 @@
generatorName: spring
outputDir: samples/openapi3/server/petstore/springboot-implicitHeaders
-inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml
+inputSpec: modules/openapi-generator/src/test/resources/3_0/spring/petstore-with-fake-endpoints-models-for-testing.yaml
templateDir: modules/openapi-generator/src/main/resources/JavaSpring
additionalProperties:
groupId: org.openapitools.openapi3
diff --git a/bin/configs/spring-boot-implicitHeaders.yaml b/bin/configs/spring-boot-implicitHeaders.yaml
index d870353a0ff..b9a1a81c146 100644
--- a/bin/configs/spring-boot-implicitHeaders.yaml
+++ b/bin/configs/spring-boot-implicitHeaders.yaml
@@ -1,6 +1,6 @@
generatorName: spring
outputDir: samples/server/petstore/springboot-implicitHeaders
-inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml
+inputSpec: modules/openapi-generator/src/test/resources/3_0/spring/petstore-with-fake-endpoints-models-for-testing.yaml
templateDir: modules/openapi-generator/src/main/resources/JavaSpring
additionalProperties:
artifactId: springboot-implicitHeaders
diff --git a/bin/configs/spring-boot-reactive-oas3.yaml b/bin/configs/spring-boot-reactive-oas3.yaml
deleted file mode 100644
index 3e3fb91657b..00000000000
--- a/bin/configs/spring-boot-reactive-oas3.yaml
+++ /dev/null
@@ -1,11 +0,0 @@
-generatorName: spring
-outputDir: samples/openapi3/server/petstore/springboot-reactive
-inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml
-templateDir: modules/openapi-generator/src/main/resources/JavaSpring
-additionalProperties:
- groupId: org.openapitools.openapi3
- documentationProvider: springdoc
- artifactId: springboot-reactive
- reactive: "true"
- hideGenerationTimestamp: "true"
- delegatePattern: "true"
diff --git a/bin/configs/spring-boot-reactive.yaml b/bin/configs/spring-boot-reactive.yaml
index b3edff7de11..ed5a1e56239 100644
--- a/bin/configs/spring-boot-reactive.yaml
+++ b/bin/configs/spring-boot-reactive.yaml
@@ -1,8 +1,9 @@
generatorName: spring
outputDir: samples/server/petstore/springboot-reactive
-inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml
+inputSpec: modules/openapi-generator/src/test/resources/3_0/spring/petstore-with-fake-endpoints-models-for-testing.yaml
templateDir: modules/openapi-generator/src/main/resources/JavaSpring
additionalProperties:
+ groupId: org.openapitools.openapi3
artifactId: springboot-reactive
documentationProvider: springfox
reactive: "true"
diff --git a/bin/configs/spring-boot-useoptional-oas3.yaml b/bin/configs/spring-boot-useoptional-oas3.yaml
deleted file mode 100644
index ac66d1df148..00000000000
--- a/bin/configs/spring-boot-useoptional-oas3.yaml
+++ /dev/null
@@ -1,10 +0,0 @@
-generatorName: spring
-outputDir: samples/openapi3/server/petstore/springboot-useoptional
-inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml
-templateDir: modules/openapi-generator/src/main/resources/JavaSpring
-additionalProperties:
- groupId: org.openapitools.openapi3
- documentationProvider: springdoc
- useOptional: true
- artifactId: spring-boot-useoptional
- hideGenerationTimestamp: "true"
diff --git a/bin/configs/spring-boot-useoptional.yaml b/bin/configs/spring-boot-useoptional.yaml
index 1e028977898..2b3dbdc1a86 100644
--- a/bin/configs/spring-boot-useoptional.yaml
+++ b/bin/configs/spring-boot-useoptional.yaml
@@ -1,8 +1,9 @@
generatorName: spring
outputDir: samples/server/petstore/springboot-useoptional
-inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml
+inputSpec: modules/openapi-generator/src/test/resources/3_0/spring/petstore-with-fake-endpoints-models-for-testing.yaml
templateDir: modules/openapi-generator/src/main/resources/JavaSpring
additionalProperties:
+ groupId: org.openapitools.openapi3
documentationProvider: springfox
useOptional: true
artifactId: spring-boot-useoptional
diff --git a/bin/configs/spring-boot-virtualan.yaml b/bin/configs/spring-boot-virtualan.yaml
index f1ae90fa859..87a2e30fb91 100644
--- a/bin/configs/spring-boot-virtualan.yaml
+++ b/bin/configs/spring-boot-virtualan.yaml
@@ -1,7 +1,7 @@
generatorName: spring
outputDir: samples/server/petstore/springboot-virtualan
library: spring-boot
-inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml
+inputSpec: modules/openapi-generator/src/test/resources/3_0/spring/petstore-with-fake-endpoints-models-for-testing.yaml
templateDir: modules/openapi-generator/src/main/resources/JavaSpring
additionalProperties:
documentationProvider: springdoc
diff --git a/bin/configs/spring-boot.yaml b/bin/configs/spring-boot.yaml
index 8d3e101cead..3480d1ba174 100644
--- a/bin/configs/spring-boot.yaml
+++ b/bin/configs/spring-boot.yaml
@@ -1,6 +1,6 @@
generatorName: spring
outputDir: samples/server/petstore/springboot
-inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml
+inputSpec: modules/openapi-generator/src/test/resources/3_0/spring/petstore-with-fake-endpoints-models-for-testing.yaml
templateDir: modules/openapi-generator/src/main/resources/JavaSpring
additionalProperties:
documentationProvider: springfox
diff --git a/bin/configs/spring-cloud-async-oas3.yaml b/bin/configs/spring-cloud-async-oas3.yaml
index 59c9d22e695..01e4dc6ce4d 100644
--- a/bin/configs/spring-cloud-async-oas3.yaml
+++ b/bin/configs/spring-cloud-async-oas3.yaml
@@ -1,7 +1,7 @@
generatorName: spring
outputDir: samples/openapi3/client/petstore/spring-cloud-async
library: spring-cloud
-inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml
+inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml
templateDir: modules/openapi-generator/src/main/resources/JavaSpring
additionalProperties:
groupId: org.openapitools.openapi3
diff --git a/bin/configs/spring-cloud-async.yaml b/bin/configs/spring-cloud-async.yaml
deleted file mode 100644
index b14f654366f..00000000000
--- a/bin/configs/spring-cloud-async.yaml
+++ /dev/null
@@ -1,11 +0,0 @@
-generatorName: spring
-outputDir: samples/client/petstore/spring-cloud-async
-library: spring-cloud
-inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml
-templateDir: modules/openapi-generator/src/main/resources/JavaSpring
-additionalProperties:
- documentationProvider: springfox
- async: "true"
- java8: "true"
- artifactId: petstore-spring-cloud
- hideGenerationTimestamp: "true"
diff --git a/bin/configs/spring-cloud-oas3-fakeapi.yaml b/bin/configs/spring-cloud-oas3-fakeapi.yaml
index 3f4e3c8ba3a..810aeff5997 100644
--- a/bin/configs/spring-cloud-oas3-fakeapi.yaml
+++ b/bin/configs/spring-cloud-oas3-fakeapi.yaml
@@ -1,7 +1,7 @@
generatorName: spring
library: spring-cloud
outputDir: samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi
-inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml
+inputSpec: modules/openapi-generator/src/test/resources/3_0/spring/petstore-with-fake-endpoints-models-for-testing.yaml
templateDir: modules/openapi-generator/src/main/resources/JavaSpring
additionalProperties:
groupId: org.openapitools.openapi3
@@ -10,3 +10,4 @@ additionalProperties:
interfaceOnly: "true"
singleContentTypes: "true"
hideGenerationTimestamp: "true"
+ generatedConstructorWithRequiredArgs: "false"
diff --git a/bin/configs/spring-cloud-petstore-feign-spring-pageable-oas3.yaml b/bin/configs/spring-cloud-petstore-feign-spring-pageable-oas3.yaml
index 02c96627b64..b130111f0e0 100644
--- a/bin/configs/spring-cloud-petstore-feign-spring-pageable-oas3.yaml
+++ b/bin/configs/spring-cloud-petstore-feign-spring-pageable-oas3.yaml
@@ -1,7 +1,7 @@
generatorName: spring
outputDir: samples/openapi3/client/petstore/spring-cloud-spring-pageable
library: spring-cloud
-inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-spring-pageable.yaml
+inputSpec: modules/openapi-generator/src/test/resources/3_0/spring/petstore-with-spring-pageable.yaml
templateDir: modules/openapi-generator/src/main/resources/JavaSpring
additionalProperties:
groupId: org.openapitools.openapi3
diff --git a/bin/configs/spring-cloud-petstore-feign-spring-pageable.yaml b/bin/configs/spring-cloud-petstore-feign-spring-pageable.yaml
deleted file mode 100644
index 506a1c53be6..00000000000
--- a/bin/configs/spring-cloud-petstore-feign-spring-pageable.yaml
+++ /dev/null
@@ -1,9 +0,0 @@
-generatorName: spring
-outputDir: samples/client/petstore/spring-cloud-spring-pageable
-library: spring-cloud
-inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-spring-pageable.yaml
-templateDir: modules/openapi-generator/src/main/resources/JavaSpring
-additionalProperties:
- documentationProvider: springfox
- artifactId: spring-cloud-spring-pageable
- hideGenerationTimestamp: 'true'
diff --git a/bin/configs/spring-http-interface-reactive.yaml b/bin/configs/spring-http-interface-reactive.yaml
index 749d6fbf08d..d3cbf25f547 100644
--- a/bin/configs/spring-http-interface-reactive.yaml
+++ b/bin/configs/spring-http-interface-reactive.yaml
@@ -1,7 +1,7 @@
generatorName: spring
library: spring-http-interface
outputDir: samples/client/petstore/spring-http-interface-reactive
-inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml
+inputSpec: modules/openapi-generator/src/test/resources/3_0/spring/petstore-with-fake-endpoints-models-for-testing.yaml
templateDir: modules/openapi-generator/src/main/resources/JavaSpring
additionalProperties:
artifactId: spring-http-interface-reactive
diff --git a/bin/configs/spring-http-interface.yaml b/bin/configs/spring-http-interface.yaml
index a5cf6c2d7cc..39cfec2307f 100644
--- a/bin/configs/spring-http-interface.yaml
+++ b/bin/configs/spring-http-interface.yaml
@@ -1,10 +1,11 @@
generatorName: spring
library: spring-http-interface
outputDir: samples/client/petstore/spring-http-interface
-inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml
+inputSpec: modules/openapi-generator/src/test/resources/3_0/spring/petstore-with-fake-endpoints-models-for-testing.yaml
templateDir: modules/openapi-generator/src/main/resources/JavaSpring
additionalProperties:
artifactId: spring-http-interface
snapshotVersion: "true"
hideGenerationTimestamp: "true"
modelNameSuffix: 'Dto'
+ generatedConstructorWithRequiredArgs: "false"
diff --git a/bin/configs/spring-stubs-oas3.yaml b/bin/configs/spring-stubs-oas3.yaml
index d5149f28adc..c37ba7e3c3c 100644
--- a/bin/configs/spring-stubs-oas3.yaml
+++ b/bin/configs/spring-stubs-oas3.yaml
@@ -1,6 +1,6 @@
generatorName: spring
outputDir: samples/openapi3/client/petstore/spring-stubs
-inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml
+inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml
templateDir: modules/openapi-generator/src/main/resources/JavaSpring
additionalProperties:
groupId: org.openapitools.openapi3
diff --git a/bin/configs/spring-stubs-skip-default-interface.yaml b/bin/configs/spring-stubs-skip-default-interface.yaml
index bb107e0bd2a..43d4dd08089 100644
--- a/bin/configs/spring-stubs-skip-default-interface.yaml
+++ b/bin/configs/spring-stubs-skip-default-interface.yaml
@@ -1,6 +1,6 @@
generatorName: spring
outputDir: samples/openapi3/client/petstore/spring-stubs-skip-default-interface
-inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml
+inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml
templateDir: modules/openapi-generator/src/main/resources/JavaSpring
additionalProperties:
groupId: org.openapitools.openapi3
diff --git a/bin/configs/spring-stubs.yaml b/bin/configs/spring-stubs.yaml
deleted file mode 100644
index 349c5e229c7..00000000000
--- a/bin/configs/spring-stubs.yaml
+++ /dev/null
@@ -1,10 +0,0 @@
-generatorName: spring
-outputDir: samples/server/petstore/spring-stubs
-inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml
-templateDir: modules/openapi-generator/src/main/resources/JavaSpring
-additionalProperties:
- documentationProvider: springfox
- artifactId: spring-stubs
- interfaceOnly: "true"
- singleContentTypes: "true"
- hideGenerationTimestamp: "true"
diff --git a/bin/configs/springboot-petstore-server-spring-pageable-delegatePattern-without-j8.yaml b/bin/configs/springboot-petstore-server-spring-pageable-delegatePattern-without-j8.yaml
index 7d16b4a1e76..7716066d45e 100644
--- a/bin/configs/springboot-petstore-server-spring-pageable-delegatePattern-without-j8.yaml
+++ b/bin/configs/springboot-petstore-server-spring-pageable-delegatePattern-without-j8.yaml
@@ -1,7 +1,7 @@
generatorName: spring
outputDir: samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8
library: spring-boot
-inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing-with-spring-pageable.yaml
+inputSpec: modules/openapi-generator/src/test/resources/3_0/spring/petstore-with-fake-endpoints-models-for-testing-with-spring-pageable.yaml
templateDir: modules/openapi-generator/src/main/resources/JavaSpring
delegatePattern: true
java8: false
diff --git a/bin/configs/springboot-petstore-server-spring-pageable-delegatePattern.yaml b/bin/configs/springboot-petstore-server-spring-pageable-delegatePattern.yaml
index 6cb1ca4b9cc..4060de18878 100644
--- a/bin/configs/springboot-petstore-server-spring-pageable-delegatePattern.yaml
+++ b/bin/configs/springboot-petstore-server-spring-pageable-delegatePattern.yaml
@@ -1,7 +1,7 @@
generatorName: spring
outputDir: samples/server/petstore/springboot-spring-pageable-delegatePattern
library: spring-boot
-inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing-with-spring-pageable.yaml
+inputSpec: modules/openapi-generator/src/test/resources/3_0/spring/petstore-with-fake-endpoints-models-for-testing-with-spring-pageable.yaml
templateDir: modules/openapi-generator/src/main/resources/JavaSpring
delegatePattern: true
additionalProperties:
diff --git a/bin/configs/springboot-petstore-server-spring-pageable-without-j8.yaml b/bin/configs/springboot-petstore-server-spring-pageable-without-j8.yaml
index 87c63968490..bbfb4e85312 100644
--- a/bin/configs/springboot-petstore-server-spring-pageable-without-j8.yaml
+++ b/bin/configs/springboot-petstore-server-spring-pageable-without-j8.yaml
@@ -1,7 +1,7 @@
generatorName: spring
outputDir: samples/server/petstore/springboot-spring-pageable-without-j8
library: spring-boot
-inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing-with-spring-pageable.yaml
+inputSpec: modules/openapi-generator/src/test/resources/3_0/spring/petstore-with-fake-endpoints-models-for-testing-with-spring-pageable.yaml
templateDir: modules/openapi-generator/src/main/resources/JavaSpring
java8: false
additionalProperties:
diff --git a/bin/configs/springboot-petstore-server-spring-pageable.yaml b/bin/configs/springboot-petstore-server-spring-pageable.yaml
index 2f4e88ed812..5ba08260299 100644
--- a/bin/configs/springboot-petstore-server-spring-pageable.yaml
+++ b/bin/configs/springboot-petstore-server-spring-pageable.yaml
@@ -1,7 +1,7 @@
generatorName: spring
outputDir: samples/server/petstore/springboot-spring-pageable
library: spring-boot
-inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing-with-spring-pageable.yaml
+inputSpec: modules/openapi-generator/src/test/resources/3_0/spring/petstore-with-fake-endpoints-models-for-testing-with-spring-pageable.yaml
templateDir: modules/openapi-generator/src/main/resources/JavaSpring
additionalProperties:
documentationProvider: springfox
diff --git a/bin/configs/swift5-any-codable.yaml b/bin/configs/swift5-any-codable.yaml
new file mode 100644
index 00000000000..62031951b9e
--- /dev/null
+++ b/bin/configs/swift5-any-codable.yaml
@@ -0,0 +1,10 @@
+generatorName: swift5
+outputDir: samples/client/petstore/swift5/anycodable
+inputSpec: modules/openapi-generator/src/test/resources/3_0/any_codable.yaml
+modelNamePrefix: Prefix
+modelNameSuffix: Suffix
+additionalProperties:
+ podAuthors: ""
+ podSummary: PetstoreClient
+ projectName: PetstoreClient
+ podHomepage: https://github.com/openapitools/openapi-generator
\ No newline at end of file
diff --git a/bin/configs/unmaintained/csharp-dotnet2-OpenAPIClient.yaml b/bin/configs/unmaintained/csharp-dotnet2-OpenAPIClient.yaml
deleted file mode 100644
index 76c07c772d6..00000000000
--- a/bin/configs/unmaintained/csharp-dotnet2-OpenAPIClient.yaml
+++ /dev/null
@@ -1,6 +0,0 @@
-generatorName: csharp-dotnet2
-outputDir: samples/client/petstore/csharp-dotnet2/OpenAPIClientTest/Lib/OpenAPIClient
-inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml
-templateDir: modules/openapi-generator/src/main/resources/csharp-dotnet2
-additionalProperties:
- hideGenerationTimestamp: "true"
diff --git a/docs/customization.md b/docs/customization.md
index f9be18ff07f..e79cb471e63 100644
--- a/docs/customization.md
+++ b/docs/customization.md
@@ -216,7 +216,7 @@ These options default to true and don't limit the generation of the feature opti
When using selective generation, _only_ the templates needed for the specific generation will be used.
-To skip models defined as the form parameters in "requestBody", please use `skipFormModel` (default to `true`) (this option is introduced at v3.2.2 and `true` by default starting from v5.x).
+To skip models defined as the form parameters in "requestBody", please use `skipFormModel` (default to `true`) (this option is introduced at v3.2.2 and `true` by default starting from v5.0.0).
```sh
--global-property skipFormModel=true
@@ -458,7 +458,6 @@ OpenAPI Normalizer (off by default) transforms the input OpenAPI doc/spec (which
- `REF_AS_PARENT_IN_ALLOF`: when set to `true`, child schemas in `allOf` is considered a parent if it's a `$ref` (instead of inline schema).
-
Example:
```
java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generate -g java -i modules/openapi-generator/src/test/resources/3_0/allOf_extension_parent.yaml -o /tmp/java-okhttp/ --openapi-normalizer REF_AS_PARENT_IN_ALLOF=true
@@ -485,7 +484,7 @@ Example:
java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generate -g java -i modules/openapi-generator/src/test/resources/3_0/simplifyBooleanEnum_test.yaml -o /tmp/java-okhttp/ --openapi-normalizer SIMPLIFY_BOOLEAN_ENUM=true
```
-- `SIMPLIFY_ONEOF_ANYOF`: when set to `true`, simplify oneOf/anyOf by 1) removing null (sub-schema) and setting nullable to true instead, and 2) simplifying oneOf/anyOf with a single sub-schema to just the sub-schema itself.
+- `SIMPLIFY_ONEOF_ANYOF`: when set to `true`, simplify oneOf/anyOf by 1) removing null (sub-schema) or enum of null (sub-schema) and setting nullable to true instead, and 2) simplifying oneOf/anyOf with a single sub-schema to just the sub-schema itself.
Example:
```
@@ -505,3 +504,18 @@ Example:
```
java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generate -g java -i modules/openapi-generator/src/test/resources/3_0/enableKeepOnlyFirstTagInOperation_test.yaml -o /tmp/java-okhttp/ --openapi-normalizer SET_TAGS_FOR_ALL_OPERATIONS=true
```
+
+- `ADD_UNSIGNED_TO_INTEGER_WITH_INVALID_MAX_VALUE`: when set to true, auto fix integer with maximum value 4294967295 (2^32-1) or long with 18446744073709551615 (2^64-1) by adding x-unsigned to the schema
+
+Example:
+```
+java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generate -g java -i modules/openapi-generator/src/test/resources/3_0/addUnsignedToIntegerWithInvalidMaxValue_test.yaml -o /tmp/java-okhttp/ --openapi-normalizer ADD_UNSIGNED_TO_INTEGER_WITH_INVALID_MAX_VALUE=true
+```
+
+- `REFACTOR_ALLOF_WITH_PROPERTIES_ONLY`: When set to true, refactor schema with allOf and properties in the same level to a schema with allOf only and, the allOf contains a new schema containing the properties in the top level.
+
+Example:
+```
+java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generate -g java -i modules/openapi-generator/src/test/resources/3_0/allOf_extension_parent.yaml -o /tmp/java-okhttp/ --openapi-normalizer REFACTOR_ALLOF_WITH_PROPERTIES_ONLY=true
+```
+
diff --git a/docs/generators.md b/docs/generators.md
index a21693e18e0..2596227ea37 100644
--- a/docs/generators.md
+++ b/docs/generators.md
@@ -19,7 +19,6 @@ The following generators are available:
* [cpp-ue4 (beta)](generators/cpp-ue4.md)
* [crystal (beta)](generators/crystal.md)
* [csharp](generators/csharp.md)
-* [csharp-dotnet2 (deprecated)](generators/csharp-dotnet2.md)
* [csharp-netcore](generators/csharp-netcore.md)
* [dart](generators/dart.md)
* [dart-dio](generators/dart-dio.md)
diff --git a/docs/generators/ada-server.md b/docs/generators/ada-server.md
index 4a7ba7d2829..981232aca6d 100644
--- a/docs/generators/ada-server.md
+++ b/docs/generators/ada-server.md
@@ -23,7 +23,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|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.|
**false**
No changes to the enum's are made, this is the default option.
**true**
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.
|false|
|httpSupport|The name of the HTTP support library. Possible values include 'curl' or 'aws'.| |null|
-|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
+|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C# have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
|openApiName|The name of the Ada package which provides support for OpenAPI for the generated client and server code. The default is 'Swagger'.| |null|
|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false|
|projectName|GNAT project name| |defaultProject|
diff --git a/docs/generators/ada.md b/docs/generators/ada.md
index fa9bb262489..a96c449a244 100644
--- a/docs/generators/ada.md
+++ b/docs/generators/ada.md
@@ -23,7 +23,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|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.|
**false**
No changes to the enum's are made, this is the default option.
**true**
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.
|false|
|httpSupport|The name of the HTTP support library. Possible values include 'curl' or 'aws'.| |null|
-|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
+|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C# have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
|openApiName|The name of the Ada package which provides support for OpenAPI for the generated client and server code. The default is 'Swagger'.| |null|
|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false|
|projectName|GNAT project name| |defaultProject|
diff --git a/docs/generators/android.md b/docs/generators/android.md
index 2a5cfe46fe3..5b4bebc408e 100644
--- a/docs/generators/android.md
+++ b/docs/generators/android.md
@@ -30,7 +30,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|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.|
**false**
No changes to the enum's are made, this is the default option.
**true**
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.
|false|
|groupId|groupId for use in the generated build.gradle and pom.xml| |null|
|invokerPackage|root package for generated code| |null|
-|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
+|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C# have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
|library|library template (sub-template) to use|
**volley**
HTTP client: Volley 1.0.19 (default)
**httpclient**
HTTP client: Apache HttpClient 4.3.6. JSON processing: Gson 2.3.1. IMPORTANT: Android client using HttpClient is not actively maintained and will be deprecated in the next major release.
|null|
|modelPackage|package for generated models| |null|
|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false|
diff --git a/docs/generators/apache2.md b/docs/generators/apache2.md
index 40f0a5f3780..46c32f36611 100644
--- a/docs/generators/apache2.md
+++ b/docs/generators/apache2.md
@@ -22,7 +22,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|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.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.
|true|
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|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.|
**false**
No changes to the enum's are made, this is the default option.
**true**
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.
|false|
-|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
+|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C# have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false|
|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true|
|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true|
diff --git a/docs/generators/apex.md b/docs/generators/apex.md
index b1f506ef03a..521e492c35b 100644
--- a/docs/generators/apex.md
+++ b/docs/generators/apex.md
@@ -25,7 +25,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|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.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.
|true|
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|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.|
**false**
No changes to the enum's are made, this is the default option.
**true**
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.
|false|
-|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
+|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C# have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
|namedCredential|The named credential name for the HTTP callouts| |null|
|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false|
|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true|
diff --git a/docs/generators/asciidoc.md b/docs/generators/asciidoc.md
index 6b33e759222..f70a727ca4f 100644
--- a/docs/generators/asciidoc.md
+++ b/docs/generators/asciidoc.md
@@ -31,7 +31,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|infoEmail|an email address to contact for inquiries about the application| |null|
|infoUrl|a URL where users can get more information about the application| |null|
|invokerPackage|root package for generated code| |null|
-|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
+|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C# have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
|licenseInfo|a short description of the license| |null|
|licenseUrl|a URL pointing to the full license| |null|
|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false|
diff --git a/docs/generators/aspnetcore.md b/docs/generators/aspnetcore.md
index ed22b580275..a5792b6757c 100644
--- a/docs/generators/aspnetcore.md
+++ b/docs/generators/aspnetcore.md
@@ -105,6 +105,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl
long
long?
string
+
uint
+
uint?
+
ulong
+
ulong?
## RESERVED WORDS
diff --git a/docs/generators/avro-schema.md b/docs/generators/avro-schema.md
index 4b6691d01e9..57ba424261c 100644
--- a/docs/generators/avro-schema.md
+++ b/docs/generators/avro-schema.md
@@ -22,7 +22,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|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.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.
|true|
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|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.|
**false**
No changes to the enum's are made, this is the default option.
**true**
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.
|false|
-|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
+|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C# have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
|packageName|package for generated classes (where supported)| |null|
|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false|
|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true|
diff --git a/docs/generators/bash.md b/docs/generators/bash.md
index 50bffabc718..c48b6707f83 100644
--- a/docs/generators/bash.md
+++ b/docs/generators/bash.md
@@ -28,7 +28,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|generateBashCompletion|Whether to generate the Bash completion script| |false|
|generateZshCompletion|Whether to generate the Zsh completion script| |false|
|hostEnvironmentVariable|Name of environment variable where host can be defined (e.g. PETSTORE_HOST='http://api.openapitools.org:8080')| |null|
-|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
+|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C# have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false|
|processMarkdown|Convert all Markdown Markup into terminal formatting| |false|
|scriptName|The name of the script that will be generated (e.g. petstore-cli)| |null|
diff --git a/docs/generators/c.md b/docs/generators/c.md
index fa2154d22eb..693f0962774 100644
--- a/docs/generators/c.md
+++ b/docs/generators/c.md
@@ -23,7 +23,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|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.|
**false**
No changes to the enum's are made, this is the default option.
**true**
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.
|false|
|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true|
-|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
+|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C# have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false|
|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true|
|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true|
diff --git a/docs/generators/clojure.md b/docs/generators/clojure.md
index 88f2778755d..98b41478673 100644
--- a/docs/generators/clojure.md
+++ b/docs/generators/clojure.md
@@ -23,7 +23,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|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.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.
|true|
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|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.|
**false**
No changes to the enum's are made, this is the default option.
**true**
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.
|false|
-|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
+|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C# have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false|
|projectDescription|description of the project (Default: using info.description or "Client library of <projectName>")| |null|
|projectLicenseName|name of the license the project uses (Default: using info.license.name or not included in project.clj)| |null|
diff --git a/docs/generators/cpp-qt-client.md b/docs/generators/cpp-qt-client.md
index 09d65c8ea42..273f3e60bbc 100644
--- a/docs/generators/cpp-qt-client.md
+++ b/docs/generators/cpp-qt-client.md
@@ -24,7 +24,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|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.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.
|true|
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|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.|
**false**
No changes to the enum's are made, this is the default option.
**true**
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.
|false|
-|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
+|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C# have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
|modelNamePrefix|Prefix that will be prepended to all model names.| |OAI|
|optionalProjectFile|Generate client.pri.| |true|
|packageName|C++ package (library) name.| |QtOpenAPIClient|
diff --git a/docs/generators/cpp-qt-qhttpengine-server.md b/docs/generators/cpp-qt-qhttpengine-server.md
index 419bf965dfa..5dee3e0a024 100644
--- a/docs/generators/cpp-qt-qhttpengine-server.md
+++ b/docs/generators/cpp-qt-qhttpengine-server.md
@@ -24,7 +24,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|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.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.
|true|
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|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.|
**false**
No changes to the enum's are made, this is the default option.
**true**
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.
|false|
-|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
+|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C# have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
|modelNamePrefix|Prefix that will be prepended to all model names.| |OAI|
|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false|
|reservedWordPrefix|Prefix to prepend to reserved words in order to avoid conflicts| |r_|
diff --git a/docs/generators/cpp-tiny.md b/docs/generators/cpp-tiny.md
index e292cffecc9..35381b175e8 100644
--- a/docs/generators/cpp-tiny.md
+++ b/docs/generators/cpp-tiny.md
@@ -23,7 +23,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|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.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.
|true|
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|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.|
**false**
No changes to the enum's are made, this is the default option.
**true**
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.
|false|
-|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
+|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C# have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false|
|reservedWordPrefix|Prefix to prepend to reserved words in order to avoid conflicts| |r_|
|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true|
diff --git a/docs/generators/cpp-tizen.md b/docs/generators/cpp-tizen.md
index 1759a8e0693..a61e10f3bd5 100644
--- a/docs/generators/cpp-tizen.md
+++ b/docs/generators/cpp-tizen.md
@@ -22,7 +22,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|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.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.
|true|
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|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.|
**false**
No changes to the enum's are made, this is the default option.
**true**
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.
|false|
-|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
+|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C# have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false|
|reservedWordPrefix|Prefix to prepend to reserved words in order to avoid conflicts| |r_|
|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true|
diff --git a/docs/generators/cpp-ue4.md b/docs/generators/cpp-ue4.md
index d80c179ff81..430558ba9e2 100644
--- a/docs/generators/cpp-ue4.md
+++ b/docs/generators/cpp-ue4.md
@@ -23,7 +23,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|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.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.
|true|
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|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.|
**false**
No changes to the enum's are made, this is the default option.
**true**
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.
|false|
-|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
+|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C# have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
|optionalProjectFile|Generate Build.cs| |true|
|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false|
|reservedWordPrefix|Prefix to prepend to reserved words in order to avoid conflicts| |r_|
diff --git a/docs/generators/crystal.md b/docs/generators/crystal.md
index 1f3bc4a655f..9040a07f211 100644
--- a/docs/generators/crystal.md
+++ b/docs/generators/crystal.md
@@ -23,7 +23,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|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.|
**false**
No changes to the enum's are made, this is the default option.
**true**
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.
|false|
|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true|
-|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
+|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C# have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
|moduleName|module name (e.g. TwitterClient| |OpenAPIClient|
|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false|
|shardAuthor|shard author (only one is supported).| |null|
diff --git a/docs/generators/csharp-dotnet2.md b/docs/generators/csharp-dotnet2.md
deleted file mode 100644
index 5e4c904382c..00000000000
--- a/docs/generators/csharp-dotnet2.md
+++ /dev/null
@@ -1,293 +0,0 @@
----
-title: Documentation for the csharp-dotnet2 Generator
----
-
-## METADATA
-
-| Property | Value | Notes |
-| -------- | ----- | ----- |
-| generator name | csharp-dotnet2 | pass this to the generate command after -g |
-| generator stability | DEPRECATED | |
-| generator type | CLIENT | |
-| generator language | C# | |
-| generator default templating engine | mustache | |
-| helpTxt | Generates a C# .Net 2.0 client library (beta). | |
-
-## CONFIG OPTIONS
-These options may be applied as additional-properties (cli) or configOptions (plugins). Refer to [configuration docs](https://openapi-generator.tech/docs/configuration) for more details.
-
-| Option | Description | Values | Default |
-| ------ | ----------- | ------ | ------- |
-|clientPackage|C# client package name (convention: Camel.Case).| |Org.OpenAPITools.Client|
-|packageName|C# package name (convention: Camel.Case).| |Org.OpenAPITools|
-|packageVersion|C# package version.| |1.0.0|
-
-## IMPORT MAPPING
-
-| Type/Alias | Imports |
-| ---------- | ------- |
-
-
-## INSTANTIATION TYPES
-
-| Type/Alias | Instantiated By |
-| ---------- | --------------- |
-|array|List|
-|list|List|
-|map|Dictionary|
-
-
-## LANGUAGE PRIMITIVES
-
-
-
Boolean
-
Collection
-
DateTime
-
DateTime?
-
DateTimeOffset
-
DateTimeOffset?
-
Decimal
-
Dictionary
-
Double
-
Float
-
Guid
-
Guid?
-
ICollection
-
Int32
-
Int64
-
List
-
Object
-
String
-
System.IO.Stream
-
bool
-
bool?
-
byte[]
-
decimal
-
decimal?
-
double
-
double?
-
float
-
float?
-
int
-
int?
-
long
-
long?
-
string
-
-
-## RESERVED WORDS
-
-
-
Client
-
Configuration
-
Version
-
abstract
-
as
-
base
-
bool
-
break
-
byte
-
case
-
catch
-
char
-
checked
-
class
-
client
-
const
-
continue
-
decimal
-
default
-
delegate
-
do
-
double
-
else
-
enum
-
event
-
explicit
-
extern
-
false
-
finally
-
fixed
-
float
-
for
-
foreach
-
goto
-
if
-
implicit
-
in
-
int
-
interface
-
internal
-
is
-
localVarFileParams
-
localVarFormParams
-
localVarHeaderParams
-
localVarHttpContentType
-
localVarHttpContentTypes
-
localVarHttpHeaderAccept
-
localVarHttpHeaderAccepts
-
localVarPath
-
localVarPathParams
-
localVarPostBody
-
localVarQueryParams
-
localVarResponse
-
localVarStatusCode
-
lock
-
long
-
namespace
-
new
-
null
-
object
-
operator
-
out
-
override
-
parameter
-
params
-
private
-
protected
-
public
-
readonly
-
ref
-
return
-
sbyte
-
sealed
-
short
-
sizeof
-
stackalloc
-
static
-
string
-
struct
-
switch
-
this
-
throw
-
true
-
try
-
typeof
-
uint
-
ulong
-
unchecked
-
unsafe
-
ushort
-
using
-
virtual
-
void
-
volatile
-
while
-
-
-## FEATURE SET
-
-
-### Client Modification Feature
-| Name | Supported | Defined By |
-| ---- | --------- | ---------- |
-|BasePath|✗|ToolingExtension
-|Authorizations|✗|ToolingExtension
-|UserAgent|✗|ToolingExtension
-|MockServer|✗|ToolingExtension
-
-### Data Type Feature
-| Name | Supported | Defined By |
-| ---- | --------- | ---------- |
-|Custom|✗|OAS2,OAS3
-|Int32|✓|OAS2,OAS3
-|Int64|✓|OAS2,OAS3
-|Float|✓|OAS2,OAS3
-|Double|✓|OAS2,OAS3
-|Decimal|✓|ToolingExtension
-|String|✓|OAS2,OAS3
-|Byte|✓|OAS2,OAS3
-|Binary|✓|OAS2,OAS3
-|Boolean|✓|OAS2,OAS3
-|Date|✓|OAS2,OAS3
-|DateTime|✓|OAS2,OAS3
-|Password|✓|OAS2,OAS3
-|File|✓|OAS2
-|Uuid|✗|
-|Array|✓|OAS2,OAS3
-|Null|✗|OAS3
-|AnyType|✗|OAS2,OAS3
-|Object|✓|OAS2,OAS3
-|Maps|✓|ToolingExtension
-|CollectionFormat|✓|OAS2
-|CollectionFormatMulti|✓|OAS2
-|Enum|✓|OAS2,OAS3
-|ArrayOfEnum|✓|ToolingExtension
-|ArrayOfModel|✓|ToolingExtension
-|ArrayOfCollectionOfPrimitives|✓|ToolingExtension
-|ArrayOfCollectionOfModel|✓|ToolingExtension
-|ArrayOfCollectionOfEnum|✓|ToolingExtension
-|MapOfEnum|✓|ToolingExtension
-|MapOfModel|✓|ToolingExtension
-|MapOfCollectionOfPrimitives|✓|ToolingExtension
-|MapOfCollectionOfModel|✓|ToolingExtension
-|MapOfCollectionOfEnum|✓|ToolingExtension
-
-### Documentation Feature
-| Name | Supported | Defined By |
-| ---- | --------- | ---------- |
-|Readme|✓|ToolingExtension
-|Model|✓|ToolingExtension
-|Api|✓|ToolingExtension
-
-### Global Feature
-| Name | Supported | Defined By |
-| ---- | --------- | ---------- |
-|Host|✓|OAS2,OAS3
-|BasePath|✓|OAS2,OAS3
-|Info|✓|OAS2,OAS3
-|Schemes|✗|OAS2,OAS3
-|PartialSchemes|✓|OAS2,OAS3
-|Consumes|✓|OAS2
-|Produces|✓|OAS2
-|ExternalDocumentation|✓|OAS2,OAS3
-|Examples|✓|OAS2,OAS3
-|XMLStructureDefinitions|✗|OAS2,OAS3
-|MultiServer|✗|OAS3
-|ParameterizedServer|✗|OAS3
-|ParameterStyling|✗|OAS3
-|Callbacks|✓|OAS3
-|LinkObjects|✗|OAS3
-
-### Parameter Feature
-| Name | Supported | Defined By |
-| ---- | --------- | ---------- |
-|Path|✓|OAS2,OAS3
-|Query|✓|OAS2,OAS3
-|Header|✓|OAS2,OAS3
-|Body|✓|OAS2
-|FormUnencoded|✓|OAS2
-|FormMultipart|✓|OAS2
-|Cookie|✓|OAS3
-
-### Schema Support Feature
-| Name | Supported | Defined By |
-| ---- | --------- | ---------- |
-|Simple|✓|OAS2,OAS3
-|Composite|✓|OAS2,OAS3
-|Polymorphism|✓|OAS2,OAS3
-|Union|✗|OAS3
-|allOf|✗|OAS2,OAS3
-|anyOf|✗|OAS3
-|oneOf|✗|OAS3
-|not|✗|OAS3
-
-### Security Feature
-| Name | Supported | Defined By |
-| ---- | --------- | ---------- |
-|BasicAuth|✓|OAS2,OAS3
-|ApiKey|✓|OAS2,OAS3
-|OpenIDConnect|✗|OAS3
-|BearerToken|✓|OAS3
-|OAuth2_Implicit|✓|OAS2,OAS3
-|OAuth2_Password|✓|OAS2,OAS3
-|OAuth2_ClientCredentials|✓|OAS2,OAS3
-|OAuth2_AuthorizationCode|✓|OAS2,OAS3
-
-### Wire Format Feature
-| Name | Supported | Defined By |
-| ---- | --------- | ---------- |
-|JSON|✓|OAS2,OAS3
-|XML|✓|OAS2,OAS3
-|PROTOBUF|✗|ToolingExtension
-|Custom|✗|OAS2,OAS3
diff --git a/docs/generators/csharp-netcore-functions.md b/docs/generators/csharp-netcore-functions.md
index a5b638c5127..49b53ed219d 100644
--- a/docs/generators/csharp-netcore-functions.md
+++ b/docs/generators/csharp-netcore-functions.md
@@ -98,6 +98,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl
long
long?
string
+
uint
+
uint?
+
ulong
+
ulong?
## RESERVED WORDS
diff --git a/docs/generators/csharp-netcore.md b/docs/generators/csharp-netcore.md
index 8f929b158ea..9a00c412d14 100644
--- a/docs/generators/csharp-netcore.md
+++ b/docs/generators/csharp-netcore.md
@@ -22,10 +22,12 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|apiName|Must be a valid C# class name. Only used in Generic Host library. Default: Api| |Api|
|caseInsensitiveResponseHeaders|Make API response's headers case-insensitive| |false|
|conditionalSerialization|Serialize only those properties which are initialized by user, accepted values are true or false, default value is false.| |false|
+|dateFormat|The default Date format (only `generichost` library supports this option).| |yyyy'-'MM'-'dd|
+|dateTimeFormat|The default DateTime format (only `generichost` library supports this option).| |yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fffffffK|
|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.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.
|true|
|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true|
|interfacePrefix|Prefix interfaces with a community standard or widely accepted prefix.| |I|
-|library|HTTP library template (sub-template) to use|
**generichost**
HttpClient with Generic Host dependency injection (https://docs.microsoft.com/en-us/dotnet/core/extensions/generic-host) (Experimental. Subject to breaking changes without notice.)
**httpclient**
HttpClient (https://docs.microsoft.com/en-us/dotnet/api/system.net.http.httpclient) (Experimental. Subject to breaking changes without notice.)
|restsharp|
+|library|HTTP library template (sub-template) to use|
**generichost**
HttpClient with Generic Host dependency injection (https://docs.microsoft.com/en-us/dotnet/core/extensions/generic-host) (Experimental. Subject to breaking changes without notice.)
**httpclient**
HttpClient (https://docs.microsoft.com/en-us/dotnet/api/system.net.http.httpclient) (Experimental. Subject to breaking changes without notice.)
**unityWebRequest**
UnityWebRequest (...) (Experimental. Subject to breaking changes without notice.)
|restsharp|
|licenseId|The identifier of the license| |null|
|modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name| |PascalCase|
|netCoreProjectFile|Use the new format (.NET Core) for .NET project files (.csproj).| |false|
@@ -41,6 +43,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|packageVersion|C# package version.| |1.0.0|
|releaseNote|Release note, default to 'Minor update'.| |Minor update|
|returnICollection|Return ICollection<T> instead of the concrete type.| |false|
+|skipOneOfAnyOfGetter|Skip the generation of getter for sub-schemas in oneOf/anyOf models.| |false|
|sourceFolder|source folder for generated code| |src|
|targetFramework|The target .NET framework version. To target multiple frameworks, use `;` as the separator, e.g. `netstandard2.1;netcoreapp3.1`|
**netstandard1.3**
.NET Standard 1.3 compatible
**netstandard1.4**
.NET Standard 1.4 compatible
**netstandard1.5**
.NET Standard 1.5 compatible
**netstandard1.6**
.NET Standard 1.6 compatible
**netstandard2.0**
.NET Standard 2.0 compatible
**netstandard2.1**
.NET Standard 2.1 compatible
**netcoreapp3.1**
.NET Core 3.1 compatible (End of Support 13 Dec 2022)
**net47**
.NET Framework 4.7 compatible
**net48**
.NET Framework 4.8 compatible
**net6.0**
.NET 6.0 compatible
**net7.0**
.NET 7.0 compatible
|netstandard2.0|
|useCollection|Deserialize array types to Collection<T> instead of List<T>.| |false|
@@ -99,6 +102,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl
long
long?
string
+
uint
+
uint?
+
ulong
+
ulong?
## RESERVED WORDS
diff --git a/docs/generators/csharp.md b/docs/generators/csharp.md
index 59b874beb44..2dff47951a6 100644
--- a/docs/generators/csharp.md
+++ b/docs/generators/csharp.md
@@ -93,6 +93,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl
long
long?
string
+
uint
+
uint?
+
ulong
+
ulong?
## RESERVED WORDS
diff --git a/docs/generators/cwiki.md b/docs/generators/cwiki.md
index c7be7280e65..01f6ef8d55d 100644
--- a/docs/generators/cwiki.md
+++ b/docs/generators/cwiki.md
@@ -29,7 +29,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|infoEmail|an email address to contact for inquiries about the application| |null|
|infoUrl|a URL where users can get more information about the application| |null|
|invokerPackage|root package for generated code| |null|
-|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
+|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C# have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
|licenseInfo|a short description of the license| |null|
|licenseUrl|a URL pointing to the full license| |null|
|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false|
diff --git a/docs/generators/dart-dio.md b/docs/generators/dart-dio.md
index 486f4d5b782..4dca343c035 100644
--- a/docs/generators/dart-dio.md
+++ b/docs/generators/dart-dio.md
@@ -24,7 +24,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|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.|
**false**
No changes to the enum's are made, this is the default option.
**true**
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.
|false|
|finalProperties|Whether properties are marked as final when using Json Serializable for serialization| |true|
-|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
+|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C# have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false|
|pubAuthor|Author name in generated pubspec| |Author|
|pubAuthorEmail|Email address of the author in generated pubspec| |author@homepage|
diff --git a/docs/generators/dart.md b/docs/generators/dart.md
index cbc19071638..0d9bf111580 100644
--- a/docs/generators/dart.md
+++ b/docs/generators/dart.md
@@ -22,7 +22,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|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.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.
|true|
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|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.|
**false**
No changes to the enum's are made, this is the default option.
**true**
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.
|false|
-|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
+|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C# have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false|
|pubAuthor|Author name in generated pubspec| |Author|
|pubAuthorEmail|Email address of the author in generated pubspec| |author@homepage|
diff --git a/docs/generators/dynamic-html.md b/docs/generators/dynamic-html.md
index cdb4ef80cd7..d8f466eb329 100644
--- a/docs/generators/dynamic-html.md
+++ b/docs/generators/dynamic-html.md
@@ -25,7 +25,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|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.|
**false**
No changes to the enum's are made, this is the default option.
**true**
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.
|false|
|groupId|groupId in generated pom.xml| |null|
|invokerPackage|root package for generated code| |null|
-|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
+|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C# have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false|
|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true|
|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true|
diff --git a/docs/generators/elixir.md b/docs/generators/elixir.md
index e6aae929e43..14209200122 100644
--- a/docs/generators/elixir.md
+++ b/docs/generators/elixir.md
@@ -23,7 +23,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|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.|
**false**
No changes to the enum's are made, this is the default option.
**true**
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.
|false|
|invokerPackage|The main namespace to use for all classes. e.g. Yay.Pets| |null|
-|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
+|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C# have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
|licenseHeader|The license header to prepend to the top of all source files.| |null|
|packageName|Elixir package name (convention: lowercase).| |null|
|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false|
diff --git a/docs/generators/fsharp-functions.md b/docs/generators/fsharp-functions.md
index b2961189bed..9f462fcad80 100644
--- a/docs/generators/fsharp-functions.md
+++ b/docs/generators/fsharp-functions.md
@@ -22,7 +22,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|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.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.
|true|
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|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.|
**false**
No changes to the enum's are made, this is the default option.
**true**
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.
|false|
-|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
+|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C# have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
|licenseName|The name of the license| |NoLicense|
|licenseUrl|The URL of the license| |http://localhost|
|packageAuthors|Specifies Authors property in the .NET Core project file.| |OpenAPI|
diff --git a/docs/generators/go.md b/docs/generators/go.md
index f99ca5e9fbf..3295fc5413f 100644
--- a/docs/generators/go.md
+++ b/docs/generators/go.md
@@ -218,7 +218,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|BasicAuth|✓|OAS2,OAS3
|ApiKey|✓|OAS2,OAS3
|OpenIDConnect|✗|OAS3
-|BearerToken|✗|OAS3
+|BearerToken|✓|OAS3
|OAuth2_Implicit|✓|OAS2,OAS3
|OAuth2_Password|✗|OAS2,OAS3
|OAuth2_ClientCredentials|✗|OAS2,OAS3
diff --git a/docs/generators/groovy.md b/docs/generators/groovy.md
index 6fb7665f64d..96d30afd73c 100644
--- a/docs/generators/groovy.md
+++ b/docs/generators/groovy.md
@@ -46,7 +46,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|implicitHeaders|Skip header parameters in the generated API methods using @ApiImplicitParams annotation.| |false|
|implicitHeadersRegex|Skip header parameters that matches given regex in the generated API methods using @ApiImplicitParams annotation. Note: this parameter is ignored when implicitHeaders=true| |null|
|invokerPackage|root package for generated code| |org.openapitools.api|
-|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
+|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C# have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
|licenseName|The name of the license| |Unlicense|
|licenseUrl|The URL of the license| |http://unlicense.org|
|modelPackage|package for generated models| |org.openapitools.model|
diff --git a/docs/generators/haskell-http-client.md b/docs/generators/haskell-http-client.md
index 08e1738d3d6..8cd97834f6f 100644
--- a/docs/generators/haskell-http-client.md
+++ b/docs/generators/haskell-http-client.md
@@ -39,7 +39,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|generateModelConstructors|Generate smart constructors (only supply required fields) for models| |true|
|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true|
|inlineMimeTypes|Inline (hardcode) the content-type and accept parameters on operations, when there is only 1 option| |true|
-|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
+|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C# have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
|modelDeriving|Additional classes to include in the deriving() clause of Models| |null|
|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false|
|queryExtraUnreserved|Configures additional querystring characters which must not be URI encoded, e.g. '+' or ':'| |null|
diff --git a/docs/generators/haskell-yesod.md b/docs/generators/haskell-yesod.md
index 89540052792..d84dda4cee8 100644
--- a/docs/generators/haskell-yesod.md
+++ b/docs/generators/haskell-yesod.md
@@ -23,7 +23,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|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.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.
|true|
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|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.|
**false**
No changes to the enum's are made, this is the default option.
**true**
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.
|false|
-|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
+|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C# have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false|
|projectName|name of the project (Default: generated from info.title or "openapi-haskell-yesod-server")| |null|
|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true|
diff --git a/docs/generators/haskell.md b/docs/generators/haskell.md
index 59cef6a6bde..a7bc269ed0d 100644
--- a/docs/generators/haskell.md
+++ b/docs/generators/haskell.md
@@ -23,7 +23,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|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.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.
|true|
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|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.|
**false**
No changes to the enum's are made, this is the default option.
**true**
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.
|false|
-|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
+|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C# have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
|modelPackage|package for generated models| |null|
|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false|
|serveStatic|serve will serve files from the directory 'static'.| |true|
diff --git a/docs/generators/html.md b/docs/generators/html.md
index ee3d6caa564..c30e0ece496 100644
--- a/docs/generators/html.md
+++ b/docs/generators/html.md
@@ -29,7 +29,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|infoEmail|an email address to contact for inquiries about the application| |null|
|infoUrl|a URL where users can get more information about the application| |null|
|invokerPackage|root package for generated code| |null|
-|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
+|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C# have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
|licenseInfo|a short description of the license| |null|
|licenseUrl|a URL pointing to the full license| |null|
|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false|
diff --git a/docs/generators/html2.md b/docs/generators/html2.md
index d83c97311d5..3ff67ecd853 100644
--- a/docs/generators/html2.md
+++ b/docs/generators/html2.md
@@ -29,7 +29,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|infoEmail|an email address to contact for inquiries about the application| |null|
|infoUrl|a URL where users can get more information about the application| |null|
|invokerPackage|root package for generated code| |null|
-|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
+|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C# have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
|licenseInfo|a short description of the license| |null|
|licenseUrl|a URL pointing to the full license| |null|
|packageName|C# package name| |null|
diff --git a/docs/generators/java-camel.md b/docs/generators/java-camel.md
index f61b5630e83..e53dd2a92ce 100644
--- a/docs/generators/java-camel.md
+++ b/docs/generators/java-camel.md
@@ -56,6 +56,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|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.|
**false**
No changes to the enum's are made, this is the default option.
**true**
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.
|false|
|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false|
+|generatedConstructorWithRequiredArgs|Whether to generate constructors with required args for models| |true|
|groupId|groupId in generated pom.xml| |org.openapitools|
|hateoas|Use Spring HATEOAS library to allow adding HATEOAS links| |false|
|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false|
@@ -64,7 +65,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|implicitHeadersRegex|Skip header parameters that matches given regex in the generated API methods using @ApiImplicitParams annotation. Note: this parameter is ignored when implicitHeaders=true| |null|
|interfaceOnly|Whether to generate only API interface stubs without the server files.| |false|
|invokerPackage|root package for generated code| |org.openapitools.api|
-|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
+|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C# have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
|library|library template (sub-template)|
**spring-boot**
Spring-boot Server application.
**spring-cloud**
Spring-Cloud-Feign client with Spring-Boot auto-configured settings.
**spring-http-interface**
Spring 6 HTTP interfaces (testing)
|spring-boot|
|licenseName|The name of the license| |Unlicense|
|licenseUrl|The URL of the license| |http://unlicense.org|
@@ -96,6 +97,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|useFeignClientUrl|Whether to generate Feign client with url parameter.| |true|
|useJakartaEe|whether to use Jakarta EE namespace instead of javax| |false|
|useOptional|Use Optional container for optional parameters| |false|
+|useResponseEntity|Use the `ResponseEntity` type to wrap return values of generated API methods. If disabled, method are annotated using a `@ResponseStatus` annotation, which has the status of the first response declared in the Api definition| |true|
|useSpringBoot3|Generate code and provide dependencies for use with Spring Boot 3.x. (Use jakarta instead of javax in imports). Enabling this option will also enable `useJakartaEe`.| |false|
|useSpringController|Annotate the generated API as a Spring Controller| |false|
|useSwaggerUI|Open the OpenApi specification in swagger-ui. Will also import and configure needed dependencies| |true|
diff --git a/docs/generators/java-helidon-client.md b/docs/generators/java-helidon-client.md
index 485eb65eac1..d5a6aeaf3ac 100644
--- a/docs/generators/java-helidon-client.md
+++ b/docs/generators/java-helidon-client.md
@@ -46,7 +46,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|implicitHeaders|Skip header parameters in the generated API methods using @ApiImplicitParams annotation.| |false|
|implicitHeadersRegex|Skip header parameters that matches given regex in the generated API methods using @ApiImplicitParams annotation. Note: this parameter is ignored when implicitHeaders=true| |null|
|invokerPackage|root package for generated code| |org.openapitools.client|
-|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
+|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C# have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
|library|library template (sub-template) to use|
**mp**
Helidon MP Client
**se**
Helidon SE Client
|mp|
|licenseName|The name of the license| |Unlicense|
|licenseUrl|The URL of the license| |http://unlicense.org|
diff --git a/docs/generators/java-helidon-server.md b/docs/generators/java-helidon-server.md
index 276a7ebc863..793fe5ba68f 100644
--- a/docs/generators/java-helidon-server.md
+++ b/docs/generators/java-helidon-server.md
@@ -46,7 +46,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|implicitHeaders|Skip header parameters in the generated API methods using @ApiImplicitParams annotation.| |false|
|implicitHeadersRegex|Skip header parameters that matches given regex in the generated API methods using @ApiImplicitParams annotation. Note: this parameter is ignored when implicitHeaders=true| |null|
|invokerPackage|root package for generated code| |org.openapitools.server|
-|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
+|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C# have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
|library|library template (sub-template) to use|
**mp**
Helidon MP Server
**se**
Helidon SE Server
**nima**
Helidon NIMA Server
**nima-annotations**
Helidon NIMA Annotations Server
|se|
|licenseName|The name of the license| |Unlicense|
|licenseUrl|The URL of the license| |http://unlicense.org|
diff --git a/docs/generators/java-inflector.md b/docs/generators/java-inflector.md
index d1d6d4ae89f..2cd610b6ead 100644
--- a/docs/generators/java-inflector.md
+++ b/docs/generators/java-inflector.md
@@ -48,7 +48,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|implicitHeaders|Skip header parameters in the generated API methods using @ApiImplicitParams annotation.| |false|
|implicitHeadersRegex|Skip header parameters that matches given regex in the generated API methods using @ApiImplicitParams annotation. Note: this parameter is ignored when implicitHeaders=true| |null|
|invokerPackage|root package for generated code| |org.openapitools.controllers|
-|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
+|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C# have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
|licenseName|The name of the license| |Unlicense|
|licenseUrl|The URL of the license| |http://unlicense.org|
|modelPackage|package for generated models| |org.openapitools.model|
diff --git a/docs/generators/java-micronaut-client.md b/docs/generators/java-micronaut-client.md
index 2d5e5585050..8fc1e6f41d7 100644
--- a/docs/generators/java-micronaut-client.md
+++ b/docs/generators/java-micronaut-client.md
@@ -29,10 +29,13 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |openapi-micronaut-client|
|artifactUrl|artifact URL in generated pom.xml| |https://github.com/openapitools/openapi-generator|
|artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0|
+|authorizationFilterPattern|Configure the authorization filter pattern for the client. Generally defined when generating clients from multiple specification files| |null|
+|basePathSeparator|Configure the separator to use between the application name and base path when referencing the property| |-|
|bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false|
|booleanGetterPrefix|Set booleanGetterPrefix| |get|
|build|Specify for which build tool to generate files|
**gradle**
Gradle configuration is generated for the project
**all**
Both Gradle and Maven configurations are generated
**maven**
Maven configuration is generated for the project
|all|
|camelCaseDollarSign|Fix camelCase when starting with $ sign. when true : $Value when false : $value| |false|
+|clientId|Configure the service ID for the Client| |null|
|configureAuth|Configure all the authorization methods as specified in the file| |false|
|containerDefaultToNull|Set containers (array, set, map) default to null| |false|
|dateFormat|Specify the format pattern of date as a string| |null|
@@ -56,7 +59,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|implicitHeaders|Skip header parameters in the generated API methods using @ApiImplicitParams annotation.| |false|
|implicitHeadersRegex|Skip header parameters that matches given regex in the generated API methods using @ApiImplicitParams annotation. Note: this parameter is ignored when implicitHeaders=true| |null|
|invokerPackage|root package for generated code| |org.openapitools|
-|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
+|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C# have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
|licenseName|The name of the license| |Unlicense|
|licenseUrl|The URL of the license| |http://unlicense.org|
|micronautVersion|Micronaut version, only >=3.0.0 versions are supported| |3.4.3|
diff --git a/docs/generators/java-micronaut-server.md b/docs/generators/java-micronaut-server.md
index 5aecff1e6a0..043552d6a98 100644
--- a/docs/generators/java-micronaut-server.md
+++ b/docs/generators/java-micronaut-server.md
@@ -57,7 +57,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|implicitHeaders|Skip header parameters in the generated API methods using @ApiImplicitParams annotation.| |false|
|implicitHeadersRegex|Skip header parameters that matches given regex in the generated API methods using @ApiImplicitParams annotation. Note: this parameter is ignored when implicitHeaders=true| |null|
|invokerPackage|root package for generated code| |org.openapitools|
-|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
+|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C# have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
|licenseName|The name of the license| |Unlicense|
|licenseUrl|The URL of the license| |http://unlicense.org|
|micronautVersion|Micronaut version, only >=3.0.0 versions are supported| |3.4.3|
diff --git a/docs/generators/java-msf4j.md b/docs/generators/java-msf4j.md
index 7d4532cab34..307fb0dbecf 100644
--- a/docs/generators/java-msf4j.md
+++ b/docs/generators/java-msf4j.md
@@ -49,7 +49,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|implicitHeaders|Skip header parameters in the generated API methods using @ApiImplicitParams annotation.| |false|
|implicitHeadersRegex|Skip header parameters that matches given regex in the generated API methods using @ApiImplicitParams annotation. Note: this parameter is ignored when implicitHeaders=true| |null|
|invokerPackage|root package for generated code| |org.openapitools.api|
-|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
+|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C# have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
|library|library template (sub-template)|
**jersey1**
Jersey core 1.x
**jersey2**
Jersey core 2.x
|jersey2|
|licenseName|The name of the license| |Unlicense|
|licenseUrl|The URL of the license| |http://unlicense.org|
diff --git a/docs/generators/java-pkmst.md b/docs/generators/java-pkmst.md
index 0a5ee14c224..9a598a78627 100644
--- a/docs/generators/java-pkmst.md
+++ b/docs/generators/java-pkmst.md
@@ -50,7 +50,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|implicitHeaders|Skip header parameters in the generated API methods using @ApiImplicitParams annotation.| |false|
|implicitHeadersRegex|Skip header parameters that matches given regex in the generated API methods using @ApiImplicitParams annotation. Note: this parameter is ignored when implicitHeaders=true| |null|
|invokerPackage|root package for generated code| |com.prokarma.pkmst.controller|
-|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
+|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C# have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
|licenseName|The name of the license| |Unlicense|
|licenseUrl|The URL of the license| |http://unlicense.org|
|modelPackage|package for generated models| |com.prokarma.pkmst.model|
diff --git a/docs/generators/java-play-framework.md b/docs/generators/java-play-framework.md
index e41abb5b575..8bd602c41cf 100644
--- a/docs/generators/java-play-framework.md
+++ b/docs/generators/java-play-framework.md
@@ -52,7 +52,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|implicitHeaders|Skip header parameters in the generated API methods using @ApiImplicitParams annotation.| |false|
|implicitHeadersRegex|Skip header parameters that matches given regex in the generated API methods using @ApiImplicitParams annotation. Note: this parameter is ignored when implicitHeaders=true| |null|
|invokerPackage|root package for generated code| |org.openapitools.api|
-|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
+|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C# have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
|licenseName|The name of the license| |Unlicense|
|licenseUrl|The URL of the license| |http://unlicense.org|
|modelPackage|package for generated models| |apimodels|
diff --git a/docs/generators/java-undertow-server.md b/docs/generators/java-undertow-server.md
index a4a74abd19a..678b683ec81 100644
--- a/docs/generators/java-undertow-server.md
+++ b/docs/generators/java-undertow-server.md
@@ -48,7 +48,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|implicitHeaders|Skip header parameters in the generated API methods using @ApiImplicitParams annotation.| |false|
|implicitHeadersRegex|Skip header parameters that matches given regex in the generated API methods using @ApiImplicitParams annotation. Note: this parameter is ignored when implicitHeaders=true| |null|
|invokerPackage|root package for generated code| |org.openapitools.handler|
-|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
+|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C# have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
|licenseName|The name of the license| |Unlicense|
|licenseUrl|The URL of the license| |http://unlicense.org|
|modelPackage|package for generated models| |null|
diff --git a/docs/generators/java-vertx-web.md b/docs/generators/java-vertx-web.md
index 93f60ef39ca..99aac21f25b 100644
--- a/docs/generators/java-vertx-web.md
+++ b/docs/generators/java-vertx-web.md
@@ -48,7 +48,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|implicitHeaders|Skip header parameters in the generated API methods using @ApiImplicitParams annotation.| |false|
|implicitHeadersRegex|Skip header parameters that matches given regex in the generated API methods using @ApiImplicitParams annotation. Note: this parameter is ignored when implicitHeaders=true| |null|
|invokerPackage|root package for generated code| |org.openapitools.vertxweb.server|
-|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
+|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C# have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
|licenseName|The name of the license| |Unlicense|
|licenseUrl|The URL of the license| |http://unlicense.org|
|modelPackage|package for generated models| |org.openapitools.vertxweb.server.model|
diff --git a/docs/generators/java-vertx.md b/docs/generators/java-vertx.md
index 063da873d5b..4961536ce7b 100644
--- a/docs/generators/java-vertx.md
+++ b/docs/generators/java-vertx.md
@@ -48,7 +48,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|implicitHeaders|Skip header parameters in the generated API methods using @ApiImplicitParams annotation.| |false|
|implicitHeadersRegex|Skip header parameters that matches given regex in the generated API methods using @ApiImplicitParams annotation. Note: this parameter is ignored when implicitHeaders=true| |null|
|invokerPackage|root package for generated code| |org.openapitools|
-|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
+|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C# have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
|licenseName|The name of the license| |Unlicense|
|licenseUrl|The URL of the license| |http://unlicense.org|
|modelPackage|package for generated models| |org.openapitools.server.api.model|
diff --git a/docs/generators/java.md b/docs/generators/java.md
index 55bc644c86b..4579c86a538 100644
--- a/docs/generators/java.md
+++ b/docs/generators/java.md
@@ -56,7 +56,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|implicitHeaders|Skip header parameters in the generated API methods using @ApiImplicitParams annotation.| |false|
|implicitHeadersRegex|Skip header parameters that matches given regex in the generated API methods using @ApiImplicitParams annotation. Note: this parameter is ignored when implicitHeaders=true| |null|
|invokerPackage|root package for generated code| |org.openapitools.client|
-|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
+|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C# have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
|library|library template (sub-template) to use|
**jersey1**
HTTP client: Jersey client 1.19.x. JSON processing: Jackson 2.9.x. Enable gzip request encoding using '-DuseGzipFeature=true'. IMPORTANT NOTE: jersey 1.x is no longer actively maintained so please upgrade to 'jersey3' or other HTTP libraries instead.
**jersey2**
HTTP client: Jersey client 2.25.1. JSON processing: Jackson 2.9.x
**jersey3**
HTTP client: Jersey client 3.x. JSON processing: Jackson 2.x
**feign**
HTTP client: OpenFeign 10.x. JSON processing: Jackson 2.9.x. or Gson 2.x
**okhttp-gson**
[DEFAULT] HTTP client: OkHttp 3.x. JSON processing: Gson 2.8.x. Enable Parcelable models on Android using '-DparcelableModel=true'. Enable gzip request encoding using '-DuseGzipFeature=true'.
**retrofit2**
HTTP client: OkHttp 3.x. JSON processing: Gson 2.x (Retrofit 2.3.0). Enable the RxJava adapter using '-DuseRxJava[2/3]=true'. (RxJava 1.x or 2.x or 3.x)
**resttemplate**
HTTP client: Spring RestTemplate 4.x. JSON processing: Jackson 2.9.x
**webclient**
HTTP client: Spring WebClient 5.x. JSON processing: Jackson 2.9.x
**resteasy**
HTTP client: Resteasy client 3.x. JSON processing: Jackson 2.9.x
**vertx**
HTTP client: VertX client 3.x. JSON processing: Jackson 2.9.x
**google-api-client**
HTTP client: Google API client 1.x. JSON processing: Jackson 2.9.x
**rest-assured**
HTTP client: rest-assured : 4.x. JSON processing: Gson 2.x or Jackson 2.10.x. Only for Java 8
**native**
HTTP client: Java native HttpClient. JSON processing: Jackson 2.9.x. Only for Java11+
**microprofile**
HTTP client: Microprofile client 1.x. JSON processing: JSON-B or Jackson 2.9.x
**apache-httpclient**
HTTP client: Apache httpclient 5.x
|okhttp-gson|
|licenseName|The name of the license| |Unlicense|
|licenseUrl|The URL of the license| |http://unlicense.org|
diff --git a/docs/generators/javascript-apollo-deprecated.md b/docs/generators/javascript-apollo-deprecated.md
index ffc30f726ab..26948b3b3fa 100644
--- a/docs/generators/javascript-apollo-deprecated.md
+++ b/docs/generators/javascript-apollo-deprecated.md
@@ -27,7 +27,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|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.|
**false**
No changes to the enum's are made, this is the default option.
**true**
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.
|false|
|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true|
|invokerPackage|root package for generated code| |null|
-|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
+|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C# have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
|licenseName|name of the license the project uses (Default: using info.license.name)| |null|
|modelPackage|package for generated models| |null|
|modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name| |camelCase|
diff --git a/docs/generators/javascript-closure-angular.md b/docs/generators/javascript-closure-angular.md
index f85f22cb96d..baf0382872d 100644
--- a/docs/generators/javascript-closure-angular.md
+++ b/docs/generators/javascript-closure-angular.md
@@ -23,7 +23,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|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.|
**false**
No changes to the enum's are made, this is the default option.
**true**
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.
|false|
|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true|
-|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
+|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C# have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false|
|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true|
|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true|
diff --git a/docs/generators/javascript-flowtyped.md b/docs/generators/javascript-flowtyped.md
index 5dc6a58c6d9..d4dfde07653 100644
--- a/docs/generators/javascript-flowtyped.md
+++ b/docs/generators/javascript-flowtyped.md
@@ -24,7 +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|
|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.|
**false**
No changes to the enum's are made, this is the default option.
**true**
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.
|false|
-|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
+|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C# have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
|modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name. Only change it if you provide your own run-time code for (de-)serialization of models| |original|
|npmName|The name under which you want to publish generated npm package. Required to generate a full package| |null|
|npmRepository|Use this property to set an url your private npmRepo in the package.json| |null|
diff --git a/docs/generators/javascript.md b/docs/generators/javascript.md
index b9259f14ab6..3e04e8ee7b7 100644
--- a/docs/generators/javascript.md
+++ b/docs/generators/javascript.md
@@ -27,7 +27,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|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.|
**false**
No changes to the enum's are made, this is the default option.
**true**
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.
|false|
|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true|
|invokerPackage|root package for generated code| |null|
-|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
+|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C# have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
|library|library template (sub-template)|
**javascript**
JavaScript client library
**apollo**
Apollo REST DataSource
|javascript|
|licenseName|name of the license the project uses (Default: using info.license.name)| |null|
|modelPackage|package for generated models| |null|
diff --git a/docs/generators/jaxrs-cxf-cdi.md b/docs/generators/jaxrs-cxf-cdi.md
index aac09068b9b..422852f3ad5 100644
--- a/docs/generators/jaxrs-cxf-cdi.md
+++ b/docs/generators/jaxrs-cxf-cdi.md
@@ -52,7 +52,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|implicitHeadersRegex|Skip header parameters that matches given regex in the generated API methods using @ApiImplicitParams annotation. Note: this parameter is ignored when implicitHeaders=true| |null|
|interfaceOnly|Whether to generate only API interface stubs without the server files.| |false|
|invokerPackage|root package for generated code| |org.openapitools.api|
-|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
+|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C# have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
|library|library template (sub-template)|
**<default>**
JAXRS spec only, to be deployed in an app server (TomEE, JBoss, WLS, ...)
**quarkus**
Server using Quarkus
**thorntail**
Server using Thorntail
**openliberty**
Server using Open Liberty
**helidon**
Server using Helidon
**kumuluzee**
Server using KumuluzEE
|<default>|
|licenseName|The name of the license| |Unlicense|
|licenseUrl|The URL of the license| |http://unlicense.org|
diff --git a/docs/generators/jaxrs-cxf-client.md b/docs/generators/jaxrs-cxf-client.md
index a9f89032ebe..92d8a8adccb 100644
--- a/docs/generators/jaxrs-cxf-client.md
+++ b/docs/generators/jaxrs-cxf-client.md
@@ -48,7 +48,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|implicitHeaders|Skip header parameters in the generated API methods using @ApiImplicitParams annotation.| |false|
|implicitHeadersRegex|Skip header parameters that matches given regex in the generated API methods using @ApiImplicitParams annotation. Note: this parameter is ignored when implicitHeaders=true| |null|
|invokerPackage|root package for generated code| |org.openapitools.api|
-|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
+|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C# have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
|licenseName|The name of the license| |Unlicense|
|licenseUrl|The URL of the license| |http://unlicense.org|
|modelPackage|package for generated models| |org.openapitools.model|
diff --git a/docs/generators/jaxrs-cxf-extended.md b/docs/generators/jaxrs-cxf-extended.md
index dc00f40d577..823e01e26f3 100644
--- a/docs/generators/jaxrs-cxf-extended.md
+++ b/docs/generators/jaxrs-cxf-extended.md
@@ -55,7 +55,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|implicitHeaders|Skip header parameters in the generated API methods using @ApiImplicitParams annotation.| |false|
|implicitHeadersRegex|Skip header parameters that matches given regex in the generated API methods using @ApiImplicitParams annotation. Note: this parameter is ignored when implicitHeaders=true| |null|
|invokerPackage|root package for generated code| |org.openapitools.api|
-|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
+|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C# have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
|licenseName|The name of the license| |Unlicense|
|licenseUrl|The URL of the license| |http://unlicense.org|
|loadTestDataFromFile|Load test data from a generated JSON file| |false|
diff --git a/docs/generators/jaxrs-cxf.md b/docs/generators/jaxrs-cxf.md
index f1b0b294f79..4ea4dc3e41e 100644
--- a/docs/generators/jaxrs-cxf.md
+++ b/docs/generators/jaxrs-cxf.md
@@ -54,7 +54,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|implicitHeaders|Skip header parameters in the generated API methods using @ApiImplicitParams annotation.| |false|
|implicitHeadersRegex|Skip header parameters that matches given regex in the generated API methods using @ApiImplicitParams annotation. Note: this parameter is ignored when implicitHeaders=true| |null|
|invokerPackage|root package for generated code| |org.openapitools.api|
-|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
+|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C# have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
|licenseName|The name of the license| |Unlicense|
|licenseUrl|The URL of the license| |http://unlicense.org|
|modelPackage|package for generated models| |org.openapitools.model|
diff --git a/docs/generators/jaxrs-jersey.md b/docs/generators/jaxrs-jersey.md
index be59dac624b..0c9717146af 100644
--- a/docs/generators/jaxrs-jersey.md
+++ b/docs/generators/jaxrs-jersey.md
@@ -49,7 +49,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|implicitHeaders|Skip header parameters in the generated API methods using @ApiImplicitParams annotation.| |false|
|implicitHeadersRegex|Skip header parameters that matches given regex in the generated API methods using @ApiImplicitParams annotation. Note: this parameter is ignored when implicitHeaders=true| |null|
|invokerPackage|root package for generated code| |org.openapitools.api|
-|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
+|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C# have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
|library|library template (sub-template)|
**jersey1**
Jersey core 1.x
**jersey2**
Jersey core 2.x
|jersey2|
|licenseName|The name of the license| |Unlicense|
|licenseUrl|The URL of the license| |http://unlicense.org|
diff --git a/docs/generators/jaxrs-resteasy-eap.md b/docs/generators/jaxrs-resteasy-eap.md
index 0f5e5eed3d0..531aa13e351 100644
--- a/docs/generators/jaxrs-resteasy-eap.md
+++ b/docs/generators/jaxrs-resteasy-eap.md
@@ -50,7 +50,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|implicitHeaders|Skip header parameters in the generated API methods using @ApiImplicitParams annotation.| |false|
|implicitHeadersRegex|Skip header parameters that matches given regex in the generated API methods using @ApiImplicitParams annotation. Note: this parameter is ignored when implicitHeaders=true| |null|
|invokerPackage|root package for generated code| |org.openapitools.api|
-|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
+|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C# have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
|licenseName|The name of the license| |Unlicense|
|licenseUrl|The URL of the license| |http://unlicense.org|
|modelPackage|package for generated models| |org.openapitools.model|
diff --git a/docs/generators/jaxrs-resteasy.md b/docs/generators/jaxrs-resteasy.md
index ce4320fc60d..6bf76fbd837 100644
--- a/docs/generators/jaxrs-resteasy.md
+++ b/docs/generators/jaxrs-resteasy.md
@@ -50,7 +50,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|implicitHeaders|Skip header parameters in the generated API methods using @ApiImplicitParams annotation.| |false|
|implicitHeadersRegex|Skip header parameters that matches given regex in the generated API methods using @ApiImplicitParams annotation. Note: this parameter is ignored when implicitHeaders=true| |null|
|invokerPackage|root package for generated code| |org.openapitools.api|
-|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
+|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C# have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
|licenseName|The name of the license| |Unlicense|
|licenseUrl|The URL of the license| |http://unlicense.org|
|modelPackage|package for generated models| |org.openapitools.model|
diff --git a/docs/generators/jaxrs-spec.md b/docs/generators/jaxrs-spec.md
index 076c45813a1..314b14c158c 100644
--- a/docs/generators/jaxrs-spec.md
+++ b/docs/generators/jaxrs-spec.md
@@ -52,7 +52,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|implicitHeadersRegex|Skip header parameters that matches given regex in the generated API methods using @ApiImplicitParams annotation. Note: this parameter is ignored when implicitHeaders=true| |null|
|interfaceOnly|Whether to generate only API interface stubs without the server files.| |false|
|invokerPackage|root package for generated code| |org.openapitools.api|
-|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
+|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C# have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
|library|library template (sub-template)|
**<default>**
JAXRS spec only, to be deployed in an app server (TomEE, JBoss, WLS, ...)
**quarkus**
Server using Quarkus
**thorntail**
Server using Thorntail
**openliberty**
Server using Open Liberty
**helidon**
Server using Helidon
**kumuluzee**
Server using KumuluzEE
|<default>|
|licenseName|The name of the license| |Unlicense|
|licenseUrl|The URL of the license| |http://unlicense.org|
diff --git a/docs/generators/jetbrains-http-client.md b/docs/generators/jetbrains-http-client.md
index 44da9dc6631..829686878d1 100644
--- a/docs/generators/jetbrains-http-client.md
+++ b/docs/generators/jetbrains-http-client.md
@@ -22,7 +22,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|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.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.
|true|
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|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.|
**false**
No changes to the enum's are made, this is the default option.
**true**
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.
|false|
-|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
+|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C# have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false|
|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true|
|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true|
diff --git a/docs/generators/jmeter.md b/docs/generators/jmeter.md
index 90ee80172ab..2c7bc25a908 100644
--- a/docs/generators/jmeter.md
+++ b/docs/generators/jmeter.md
@@ -22,7 +22,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|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.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.
|true|
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|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.|
**false**
No changes to the enum's are made, this is the default option.
**true**
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.
|false|
-|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
+|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C# have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false|
|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true|
|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true|
diff --git a/docs/generators/k6.md b/docs/generators/k6.md
index f9de52fa699..e8574baee66 100644
--- a/docs/generators/k6.md
+++ b/docs/generators/k6.md
@@ -22,7 +22,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|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.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.
|true|
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|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.|
**false**
No changes to the enum's are made, this is the default option.
**true**
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.
|false|
-|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
+|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C# have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false|
|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true|
|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true|
diff --git a/docs/generators/kotlin-server.md b/docs/generators/kotlin-server.md
index 1b25cca82d3..691f53c757a 100644
--- a/docs/generators/kotlin-server.md
+++ b/docs/generators/kotlin-server.md
@@ -38,7 +38,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|parcelizeModels|toggle "@Parcelize" for generated models| |null|
|returnResponse|Whether generate API interface should return javax.ws.rs.core.Response instead of a deserialized entity. Only useful if interfaceOnly is true. This option is currently supported only when using jaxrs-spec library.| |false|
|serializableModel|boolean - toggle "implements Serializable" for generated models| |null|
-|serializationLibrary|What serialization library to use: 'moshi' (default), or 'gson' or 'jackson'| |moshi|
+|serializationLibrary|What serialization library to use: 'moshi' (default), or 'gson' or 'jackson or 'kotlinx_serialization'| |moshi|
|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|
diff --git a/docs/generators/kotlin-spring.md b/docs/generators/kotlin-spring.md
index 339497621d1..0bf820d705d 100644
--- a/docs/generators/kotlin-spring.md
+++ b/docs/generators/kotlin-spring.md
@@ -40,10 +40,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|parcelizeModels|toggle "@Parcelize" for generated models| |null|
|reactive|use coroutines for reactive behavior| |false|
|serializableModel|boolean - toggle "implements Serializable" for generated models| |null|
-|serializationLibrary|What serialization library to use: 'moshi' (default), or 'gson' or 'jackson'| |moshi|
+|serializationLibrary|What serialization library to use: 'moshi' (default), or 'gson' or 'jackson or 'kotlinx_serialization'| |moshi|
|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|
|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|
diff --git a/docs/generators/kotlin-vertx.md b/docs/generators/kotlin-vertx.md
index 4bd4958a90a..16adee9e440 100644
--- a/docs/generators/kotlin-vertx.md
+++ b/docs/generators/kotlin-vertx.md
@@ -28,7 +28,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|packageName|Generated artifact package name.| |org.openapitools|
|parcelizeModels|toggle "@Parcelize" for generated models| |null|
|serializableModel|boolean - toggle "implements Serializable" for generated models| |null|
-|serializationLibrary|What serialization library to use: 'moshi' (default), or 'gson' or 'jackson'| |moshi|
+|serializationLibrary|What serialization library to use: 'moshi' (default), or 'gson' or 'jackson or 'kotlinx_serialization'| |moshi|
|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|
diff --git a/docs/generators/kotlin.md b/docs/generators/kotlin.md
index 4c6b25ad394..c9512a849da 100644
--- a/docs/generators/kotlin.md
+++ b/docs/generators/kotlin.md
@@ -37,7 +37,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|parcelizeModels|toggle "@Parcelize" for generated models| |null|
|requestDateConverter|JVM-Option. Defines in how to handle date-time objects that are used for a request (as query or parameter)|
**toJson**
[DEFAULT] Date formatter option using a json converter.
**toString**
Use the 'toString'-method of the date-time object to retrieve the related string representation.
|toJson|
|serializableModel|boolean - toggle "implements Serializable" for generated models| |null|
-|serializationLibrary|What serialization library to use: 'moshi' (default), or 'gson' or 'jackson'| |moshi|
+|serializationLibrary|What serialization library to use: 'moshi' (default), or 'gson' or 'jackson or 'kotlinx_serialization'| |moshi|
|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|
@@ -46,6 +46,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|useRxJava|Whether to use the RxJava adapter with the retrofit2 library. IMPORTANT: this option has been deprecated. Please use `useRxJava3` instead.| |false|
|useRxJava2|Whether to use the RxJava2 adapter with the retrofit2 library. IMPORTANT: this option has been deprecated. Please use `useRxJava3` instead.| |false|
|useRxJava3|Whether to use the RxJava3 adapter with the retrofit2 library.| |false|
+|useSettingsGradle|Whether the project uses settings.gradle.| |false|
## IMPORT MAPPING
diff --git a/docs/generators/markdown.md b/docs/generators/markdown.md
index 75f0538b6bf..e3dbfbaff41 100644
--- a/docs/generators/markdown.md
+++ b/docs/generators/markdown.md
@@ -21,7 +21,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|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.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.
|true|
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|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.|
**false**
No changes to the enum's are made, this is the default option.
**true**
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.
|false|
-|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
+|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C# have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false|
|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true|
|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true|
diff --git a/docs/generators/nim.md b/docs/generators/nim.md
index 5612b294c21..1bff3d78f21 100644
--- a/docs/generators/nim.md
+++ b/docs/generators/nim.md
@@ -22,7 +22,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|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.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.
|true|
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|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.|
**false**
No changes to the enum's are made, this is the default option.
**true**
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.
|false|
-|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
+|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C# have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false|
|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true|
|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true|
diff --git a/docs/generators/nodejs-express-server.md b/docs/generators/nodejs-express-server.md
index 18df0f28853..3cba8860f38 100644
--- a/docs/generators/nodejs-express-server.md
+++ b/docs/generators/nodejs-express-server.md
@@ -22,7 +22,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|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.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.
|true|
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|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.|
**false**
No changes to the enum's are made, this is the default option.
**true**
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.
|false|
-|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
+|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C# have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false|
|serverPort|TCP port to listen on.| |null|
|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true|
diff --git a/docs/generators/ocaml.md b/docs/generators/ocaml.md
index 196059ffba1..25ebea30c1c 100644
--- a/docs/generators/ocaml.md
+++ b/docs/generators/ocaml.md
@@ -22,7 +22,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|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.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.
|true|
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|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.|
**false**
No changes to the enum's are made, this is the default option.
**true**
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.
|false|
-|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
+|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C# have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false|
|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true|
|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true|
diff --git a/docs/generators/openapi-yaml.md b/docs/generators/openapi-yaml.md
index bb9d06115fc..dd4a50965d3 100644
--- a/docs/generators/openapi-yaml.md
+++ b/docs/generators/openapi-yaml.md
@@ -21,7 +21,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|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.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.
|true|
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|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.|
**false**
No changes to the enum's are made, this is the default option.
**true**
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.
|false|
-|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
+|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C# have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
|outputFile|Output filename| |openapi/openapi.yaml|
|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false|
|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true|
diff --git a/docs/generators/openapi.md b/docs/generators/openapi.md
index ed0420aa2bb..bee7b600ae1 100644
--- a/docs/generators/openapi.md
+++ b/docs/generators/openapi.md
@@ -21,7 +21,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|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.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.
|true|
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|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.|
**false**
No changes to the enum's are made, this is the default option.
**true**
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.
|false|
-|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
+|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C# have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
|outputFileName|Output file name| |openapi.json|
|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false|
|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true|
diff --git a/docs/generators/php-dt.md b/docs/generators/php-dt.md
index 7f9d0789bd5..2388f5caabf 100644
--- a/docs/generators/php-dt.md
+++ b/docs/generators/php-dt.md
@@ -25,7 +25,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|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.|
**false**
No changes to the enum's are made, this is the default option.
**true**
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.
|false|
|invokerPackage|The main namespace to use for all classes. e.g. Yay\Pets| |null|
-|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
+|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C# have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
|modelPackage|package for generated models| |null|
|modern|use modern language features (generated code will require PHP 8.0)| |false|
|packageName|The main package name for classes. e.g. GeneratedPetstore| |null|
diff --git a/docs/generators/php-laravel.md b/docs/generators/php-laravel.md
index 9c606506d75..b50da3ce223 100644
--- a/docs/generators/php-laravel.md
+++ b/docs/generators/php-laravel.md
@@ -25,7 +25,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|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.|
**false**
No changes to the enum's are made, this is the default option.
**true**
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.
|false|
|invokerPackage|The main namespace to use for all classes. e.g. Yay\Pets| |null|
-|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
+|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C# have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
|modelPackage|package for generated models| |null|
|packageName|The main package name for classes. e.g. GeneratedPetstore| |null|
|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false|
diff --git a/docs/generators/php-lumen.md b/docs/generators/php-lumen.md
index 28ac527eef4..71879cd494c 100644
--- a/docs/generators/php-lumen.md
+++ b/docs/generators/php-lumen.md
@@ -25,7 +25,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|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.|
**false**
No changes to the enum's are made, this is the default option.
**true**
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.
|false|
|invokerPackage|The main namespace to use for all classes. e.g. Yay\Pets| |null|
-|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
+|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C# have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
|modelPackage|package for generated models| |null|
|packageName|The main package name for classes. e.g. GeneratedPetstore| |null|
|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false|
diff --git a/docs/generators/php-mezzio-ph.md b/docs/generators/php-mezzio-ph.md
index 01cb9eb6ccd..e119ff6148f 100644
--- a/docs/generators/php-mezzio-ph.md
+++ b/docs/generators/php-mezzio-ph.md
@@ -25,7 +25,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|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.|
**false**
No changes to the enum's are made, this is the default option.
**true**
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.
|false|
|invokerPackage|The main namespace to use for all classes. e.g. Yay\Pets| |null|
-|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
+|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C# have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
|modelPackage|package for generated models| |null|
|modern|use modern language features (generated code will require PHP 8.0)| |false|
|packageName|The main package name for classes. e.g. GeneratedPetstore| |null|
diff --git a/docs/generators/php-slim-deprecated.md b/docs/generators/php-slim-deprecated.md
index f5844cd7096..1f30fd54381 100644
--- a/docs/generators/php-slim-deprecated.md
+++ b/docs/generators/php-slim-deprecated.md
@@ -25,7 +25,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|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.|
**false**
No changes to the enum's are made, this is the default option.
**true**
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.
|false|
|invokerPackage|The main namespace to use for all classes. e.g. Yay\Pets| |null|
-|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
+|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C# have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
|modelPackage|package for generated models| |null|
|packageName|The main package name for classes. e.g. GeneratedPetstore| |null|
|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false|
diff --git a/docs/generators/php-slim4.md b/docs/generators/php-slim4.md
index fd30427de47..0b0b47c39cb 100644
--- a/docs/generators/php-slim4.md
+++ b/docs/generators/php-slim4.md
@@ -25,7 +25,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|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.|
**false**
No changes to the enum's are made, this is the default option.
**true**
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.
|false|
|invokerPackage|The main namespace to use for all classes. e.g. Yay\Pets| |null|
-|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
+|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C# have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
|modelPackage|package for generated models| |null|
|packageName|The main package name for classes. e.g. GeneratedPetstore| |null|
|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false|
diff --git a/docs/generators/php-symfony.md b/docs/generators/php-symfony.md
index f818259b0e8..6112f3ae3c2 100644
--- a/docs/generators/php-symfony.md
+++ b/docs/generators/php-symfony.md
@@ -30,7 +30,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|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.|
**false**
No changes to the enum's are made, this is the default option.
**true**
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.
|false|
|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true|
|invokerPackage|The main namespace to use for all classes. e.g. Yay\Pets| |null|
-|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
+|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C# have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
|modelPackage|package for generated models| |null|
|packageName|The main package name for classes. e.g. GeneratedPetstore| |null|
|phpLegacySupport|Should the generated code be compatible with PHP 5.x?| |true|
diff --git a/docs/generators/php.md b/docs/generators/php.md
index 298d059c381..15d5513c024 100644
--- a/docs/generators/php.md
+++ b/docs/generators/php.md
@@ -26,7 +26,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|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.|
**false**
No changes to the enum's are made, this is the default option.
**true**
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.
|false|
|hideGenerationTimestamp|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |true|
|invokerPackage|The main namespace to use for all classes. e.g. Yay\Pets| |null|
-|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
+|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C# have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
|modelPackage|package for generated models| |null|
|packageName|The main package name for classes. e.g. GeneratedPetstore| |null|
|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false|
diff --git a/docs/generators/plantuml.md b/docs/generators/plantuml.md
index 847f0d65463..b1af2d30537 100644
--- a/docs/generators/plantuml.md
+++ b/docs/generators/plantuml.md
@@ -21,7 +21,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|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.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.
|true|
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|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.|
**false**
No changes to the enum's are made, this is the default option.
**true**
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.
|false|
-|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
+|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C# have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false|
|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true|
|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true|
diff --git a/docs/generators/python-aiohttp.md b/docs/generators/python-aiohttp.md
index 2f6f7e4e510..f3c3874a7b0 100644
--- a/docs/generators/python-aiohttp.md
+++ b/docs/generators/python-aiohttp.md
@@ -26,7 +26,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|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.|
**false**
No changes to the enum's are made, this is the default option.
**true**
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.
|false|
|featureCORS|use flask-cors for handling CORS requests| |false|
-|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
+|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C# have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
|packageName|python package name (convention: snake_case).| |openapi_server|
|packageVersion|python package version.| |1.0.0|
|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false|
diff --git a/docs/generators/python-blueplanet.md b/docs/generators/python-blueplanet.md
index ce4b7ae98dd..71fc3cf2e96 100644
--- a/docs/generators/python-blueplanet.md
+++ b/docs/generators/python-blueplanet.md
@@ -26,7 +26,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|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.|
**false**
No changes to the enum's are made, this is the default option.
**true**
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.
|false|
|featureCORS|use flask-cors for handling CORS requests| |false|
-|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
+|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C# have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
|packageName|python package name (convention: snake_case).| |openapi_server|
|packageVersion|python package version.| |1.0.0|
|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false|
diff --git a/docs/generators/python-fastapi.md b/docs/generators/python-fastapi.md
index ecb7fe8f237..20cd0ab9e82 100644
--- a/docs/generators/python-fastapi.md
+++ b/docs/generators/python-fastapi.md
@@ -23,7 +23,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|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.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.
|true|
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|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.|
**false**
No changes to the enum's are made, this is the default option.
**true**
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.
|false|
-|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
+|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C# have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
|packageName|python package name (convention: snake_case).| |openapi_server|
|packageVersion|python package version.| |1.0.0|
|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false|
diff --git a/docs/generators/python-flask.md b/docs/generators/python-flask.md
index 5624ecb8a04..d7f3df3f22f 100644
--- a/docs/generators/python-flask.md
+++ b/docs/generators/python-flask.md
@@ -26,7 +26,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|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.|
**false**
No changes to the enum's are made, this is the default option.
**true**
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.
|false|
|featureCORS|use flask-cors for handling CORS requests| |false|
-|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
+|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C# have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
|packageName|python package name (convention: snake_case).| |openapi_server|
|packageVersion|python package version.| |1.0.0|
|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false|
diff --git a/docs/generators/python-nextgen.md b/docs/generators/python-nextgen.md
index b445f5b2218..5343d442b36 100644
--- a/docs/generators/python-nextgen.md
+++ b/docs/generators/python-nextgen.md
@@ -19,14 +19,13 @@ These options may be applied as additional-properties (cli) or configOptions (pl
| Option | Description | Values | Default |
| ------ | ----------- | ------ | ------- |
-|allowStringInDateTimeParameters|Allow string as input to datetime/date parameters for backward compartibility.| |false|
|dateFormat|date format for query parameters| |%Y-%m-%d|
|datetimeFormat|datetime format for query parameters| |%Y-%m-%dT%H:%M:%S%z|
|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.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.
|true|
-|floatStrictType|Use strict type for float, i.e. StrictFloat or confloat(strict=true, ...)| |true|
|generateSourceCodeOnly|Specifies that only a library source code is to be generated.| |false|
|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true|
|library|library template (sub-template) to use: asyncio, tornado (deprecated), urllib3| |urllib3|
+|mapNumberTo|Map number to Union[StrictFloat, StrictInt], StrictStr or float.| |Union[StrictFloat, StrictInt]|
|packageName|python package name (convention: snake_case).| |openapi_client|
|packageUrl|python package URL.| |null|
|packageVersion|python package version.| |1.0.0|
@@ -51,6 +50,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
Dict
List
bool
+
bytearray
bytes
date
datetime
@@ -59,6 +59,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
float
int
list
+
none_type
object
str
diff --git a/docs/generators/ruby.md b/docs/generators/ruby.md
index 2200cadf241..918c8811374 100644
--- a/docs/generators/ruby.md
+++ b/docs/generators/ruby.md
@@ -32,7 +32,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|gemSummary|gem summary. | |A ruby wrapper for the REST APIs|
|gemVersion|gem version.| |1.0.0|
|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true|
-|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
+|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C# have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
|library|HTTP library template (sub-template) to use|
|typhoeus|
|moduleName|top module name (convention: CamelCase, usually corresponding to gem name).| |OpenAPIClient|
|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false|
diff --git a/docs/generators/scala-akka-http-server.md b/docs/generators/scala-akka-http-server.md
index 322c4ed1e2f..95677bd7270 100644
--- a/docs/generators/scala-akka-http-server.md
+++ b/docs/generators/scala-akka-http-server.md
@@ -30,7 +30,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|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.|
**false**
No changes to the enum's are made, this is the default option.
**true**
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.
|false|
|groupId|groupId in generated pom.xml| |org.openapitools|
|invokerPackage|root package for generated code| |org.openapitools.server|
-|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
+|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C# have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
|modelPackage|package for generated models| |null|
|modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name| |camelCase|
|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false|
diff --git a/docs/generators/scala-akka.md b/docs/generators/scala-akka.md
index e840955e1d5..dd560c4c508 100644
--- a/docs/generators/scala-akka.md
+++ b/docs/generators/scala-akka.md
@@ -24,7 +24,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|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.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.
|true|
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|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.|
**false**
No changes to the enum's are made, this is the default option.
**true**
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.
|false|
-|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
+|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C# have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
|mainPackage|Top-level package name, which defines 'apiPackage', 'modelPackage', 'invokerPackage'| |org.openapitools.client|
|modelPackage|package for generated models| |null|
|modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name| |camelCase|
diff --git a/docs/generators/scala-gatling.md b/docs/generators/scala-gatling.md
index 54c7969f011..b5577af03c0 100644
--- a/docs/generators/scala-gatling.md
+++ b/docs/generators/scala-gatling.md
@@ -24,7 +24,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|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.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.
|true|
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|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.|
**false**
No changes to the enum's are made, this is the default option.
**true**
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.
|false|
-|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
+|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C# have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
|modelPackage|package for generated models| |null|
|modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name| |camelCase|
|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false|
diff --git a/docs/generators/scala-httpclient-deprecated.md b/docs/generators/scala-httpclient-deprecated.md
index 5d9e403e85e..4767f3deb91 100644
--- a/docs/generators/scala-httpclient-deprecated.md
+++ b/docs/generators/scala-httpclient-deprecated.md
@@ -24,7 +24,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|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.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.
|true|
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|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.|
**false**
No changes to the enum's are made, this is the default option.
**true**
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.
|false|
-|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
+|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C# have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
|modelPackage|package for generated models| |null|
|modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name| |camelCase|
|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false|
diff --git a/docs/generators/scala-lagom-server.md b/docs/generators/scala-lagom-server.md
index c2ab2adcf16..5a994270421 100644
--- a/docs/generators/scala-lagom-server.md
+++ b/docs/generators/scala-lagom-server.md
@@ -24,7 +24,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|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.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.
|true|
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|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.|
**false**
No changes to the enum's are made, this is the default option.
**true**
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.
|false|
-|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
+|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C# have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
|modelPackage|package for generated models| |null|
|modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name| |camelCase|
|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false|
diff --git a/docs/generators/scala-play-server.md b/docs/generators/scala-play-server.md
index e0f60f0531c..d769de40550 100644
--- a/docs/generators/scala-play-server.md
+++ b/docs/generators/scala-play-server.md
@@ -25,7 +25,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|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.|
**false**
No changes to the enum's are made, this is the default option.
**true**
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.
|false|
|generateCustomExceptions|If set, generates custom exception types.| |true|
-|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
+|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C# have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
|modelPackage|package for generated models| |null|
|modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name| |camelCase|
|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false|
diff --git a/docs/generators/scala-sttp.md b/docs/generators/scala-sttp.md
index c56f756df9e..0d4040f356b 100644
--- a/docs/generators/scala-sttp.md
+++ b/docs/generators/scala-sttp.md
@@ -27,7 +27,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|jodaTimeVersion|The version of joda-time library| |2.10.13|
|json4sVersion|The version of json4s library| |3.6.11|
|jsonLibrary|Json library to use. Possible values are: json4s and circe.| |json4s|
-|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
+|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C# have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
|mainPackage|Top-level package name, which defines 'apiPackage', 'modelPackage', 'invokerPackage'| |org.openapitools.client|
|modelPackage|package for generated models| |null|
|modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name| |camelCase|
diff --git a/docs/generators/scalatra.md b/docs/generators/scalatra.md
index 25d057cf1c6..a859d74ed3f 100644
--- a/docs/generators/scalatra.md
+++ b/docs/generators/scalatra.md
@@ -24,7 +24,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|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.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.
|true|
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|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.|
**false**
No changes to the enum's are made, this is the default option.
**true**
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.
|false|
-|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
+|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C# have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
|modelPackage|package for generated models| |null|
|modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name| |camelCase|
|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false|
diff --git a/docs/generators/scalaz.md b/docs/generators/scalaz.md
index a986e4bb8f6..e84b0971bab 100644
--- a/docs/generators/scalaz.md
+++ b/docs/generators/scalaz.md
@@ -24,7 +24,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|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.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.
|true|
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|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.|
**false**
No changes to the enum's are made, this is the default option.
**true**
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.
|false|
-|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
+|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C# have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
|modelPackage|package for generated models| |null|
|modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name| |camelCase|
|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false|
diff --git a/docs/generators/spring.md b/docs/generators/spring.md
index c7380546a78..67fe63275f1 100644
--- a/docs/generators/spring.md
+++ b/docs/generators/spring.md
@@ -49,6 +49,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|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.|
**false**
No changes to the enum's are made, this is the default option.
**true**
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.
|false|
|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false|
+|generatedConstructorWithRequiredArgs|Whether to generate constructors with required args for models| |true|
|groupId|groupId in generated pom.xml| |org.openapitools|
|hateoas|Use Spring HATEOAS library to allow adding HATEOAS links| |false|
|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false|
@@ -57,7 +58,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|implicitHeadersRegex|Skip header parameters that matches given regex in the generated API methods using @ApiImplicitParams annotation. Note: this parameter is ignored when implicitHeaders=true| |null|
|interfaceOnly|Whether to generate only API interface stubs without the server files.| |false|
|invokerPackage|root package for generated code| |org.openapitools.api|
-|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
+|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C# have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
|library|library template (sub-template)|
**spring-boot**
Spring-boot Server application.
**spring-cloud**
Spring-Cloud-Feign client with Spring-Boot auto-configured settings.
**spring-http-interface**
Spring 6 HTTP interfaces (testing)
|spring-boot|
|licenseName|The name of the license| |Unlicense|
|licenseUrl|The URL of the license| |http://unlicense.org|
@@ -89,6 +90,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|useFeignClientUrl|Whether to generate Feign client with url parameter.| |true|
|useJakartaEe|whether to use Jakarta EE namespace instead of javax| |false|
|useOptional|Use Optional container for optional parameters| |false|
+|useResponseEntity|Use the `ResponseEntity` type to wrap return values of generated API methods. If disabled, method are annotated using a `@ResponseStatus` annotation, which has the status of the first response declared in the Api definition| |true|
|useSpringBoot3|Generate code and provide dependencies for use with Spring Boot 3.x. (Use jakarta instead of javax in imports). Enabling this option will also enable `useJakartaEe`.| |false|
|useSpringController|Annotate the generated API as a Spring Controller| |false|
|useSwaggerUI|Open the OpenApi specification in swagger-ui. Will also import and configure needed dependencies| |true|
diff --git a/docs/generators/swift5.md b/docs/generators/swift5.md
index baabd043a86..14fdb8cf2f7 100644
--- a/docs/generators/swift5.md
+++ b/docs/generators/swift5.md
@@ -26,7 +26,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|generateModelAdditionalProperties|Generate model additional properties (default: true)| |true|
|hashableModels|Make hashable models (default: true)| |true|
|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true|
-|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
+|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C# have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
|lenientTypeCast|Accept and cast values for simple types (string->bool, string->int, int->string)| |false|
|library|Library template (sub-template) to use|
**urlsession**
[DEFAULT] HTTP client: URLSession
**alamofire**
HTTP client: Alamofire
**vapor**
HTTP client: Vapor
|urlsession|
|mapFileBinaryToData|[WARNING] This option will be removed and enabled by default in the future once we've enhanced the code to work with `Data` in all the different situations. Map File and Binary to Data (default: false)| |false|
@@ -73,6 +73,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
Any
+
AnyCodable
AnyObject
Bool
Character
diff --git a/docs/generators/typescript-angular.md b/docs/generators/typescript-angular.md
index be23681e750..b2846a50170 100644
--- a/docs/generators/typescript-angular.md
+++ b/docs/generators/typescript-angular.md
@@ -27,7 +27,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|enumPropertyNaming|Naming convention for enum properties: 'camelCase', 'PascalCase', 'snake_case', 'UPPERCASE', and 'original'| |PascalCase|
|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.|
**false**
No changes to the enum's are made, this is the default option.
**true**
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.
|false|
|fileNaming|Naming convention for the output files: 'camelCase', 'kebab-case'.| |camelCase|
-|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
+|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C# have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
|modelFileSuffix|The suffix of the file of the generated model (model<suffix>.ts).| |null|
|modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name. Only change it if you provide your own run-time code for (de-)serialization of models| |original|
|modelSuffix|The suffix of the generated model.| |null|
diff --git a/docs/generators/typescript-aurelia.md b/docs/generators/typescript-aurelia.md
index 8d93a174bcc..9ccc318558d 100644
--- a/docs/generators/typescript-aurelia.md
+++ b/docs/generators/typescript-aurelia.md
@@ -24,7 +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|
|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.|
**false**
No changes to the enum's are made, this is the default option.
**true**
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.
|false|
-|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
+|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C# have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
|modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name. Only change it if you provide your own run-time code for (de-)serialization of models| |original|
|npmName|The name under which you want to publish generated npm package. Required to generate a full package| |null|
|npmVersion|The version of your npm package. If not provided, using the version from the OpenAPI specification file.| |1.0.0|
diff --git a/docs/generators/typescript-axios.md b/docs/generators/typescript-axios.md
index 156dab7cd72..1220a97c104 100644
--- a/docs/generators/typescript-axios.md
+++ b/docs/generators/typescript-axios.md
@@ -25,7 +25,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|
|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.|
**false**
No changes to the enum's are made, this is the default option.
**true**
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.
|false|
-|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
+|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C# have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
|modelPackage|package for generated models| |null|
|npmName|The name under which you want to publish generated npm package. Required to generate a full package| |null|
|npmRepository|Use this property to set an url of your private npmRepo in the package.json| |null|
diff --git a/docs/generators/typescript-fetch.md b/docs/generators/typescript-fetch.md
index 4901df93ed8..8edbba72705 100644
--- a/docs/generators/typescript-fetch.md
+++ b/docs/generators/typescript-fetch.md
@@ -24,7 +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|
|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.|
**false**
No changes to the enum's are made, this is the default option.
**true**
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.
|false|
-|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
+|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C# have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
|modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name| |camelCase|
|npmName|The name under which you want to publish generated npm package. Required to generate a full package| |null|
|npmRepository|Use this property to set an url your private npmRepo in the package.json| |null|
diff --git a/docs/generators/typescript-inversify.md b/docs/generators/typescript-inversify.md
index bf1c2f146df..51194066ea0 100644
--- a/docs/generators/typescript-inversify.md
+++ b/docs/generators/typescript-inversify.md
@@ -24,7 +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|
|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.|
**false**
No changes to the enum's are made, this is the default option.
**true**
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.
|false|
-|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
+|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C# have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
|modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name. Only change it if you provide your own run-time code for (de-)serialization of models| |original|
|npmName|The name under which you want to publish generated npm package. Required to generate a full package| |null|
|npmRepository|Use this property to set an url your private npmRepo in the package.json| |null|
diff --git a/docs/generators/typescript-jquery.md b/docs/generators/typescript-jquery.md
index 3e0310ccfbe..2db1621c6a5 100644
--- a/docs/generators/typescript-jquery.md
+++ b/docs/generators/typescript-jquery.md
@@ -25,7 +25,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|enumPropertyNaming|Naming convention for enum properties: 'camelCase', 'PascalCase', 'snake_case', 'UPPERCASE', and 'original'| |PascalCase|
|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.|
**false**
No changes to the enum's are made, this is the default option.
**true**
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.
|false|
|jqueryAlreadyImported|When using this in legacy app using mix of typescript and javascript, this will only declare jquery and not import it| |false|
-|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
+|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C# have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
|modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name. Only change it if you provide your own run-time code for (de-)serialization of models| |original|
|npmName|The name under which you want to publish generated npm package. Required to generate a full package| |null|
|npmRepository|Use this property to set an url your private npmRepo in the package.json| |null|
diff --git a/docs/generators/typescript-nestjs.md b/docs/generators/typescript-nestjs.md
index 38720fb9411..b681019d04f 100644
--- a/docs/generators/typescript-nestjs.md
+++ b/docs/generators/typescript-nestjs.md
@@ -25,7 +25,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|enumPropertyNaming|Naming convention for enum properties: 'camelCase', 'PascalCase', 'snake_case', 'UPPERCASE', and 'original'| |PascalCase|
|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.|
**false**
No changes to the enum's are made, this is the default option.
**true**
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.
|false|
|fileNaming|Naming convention for the output files: 'camelCase', 'kebab-case'.| |camelCase|
-|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
+|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C# have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
|modelFileSuffix|The suffix of the file of the generated model (model<suffix>.ts).| |null|
|modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name. Only change it if you provide your own run-time code for (de-)serialization of models| |original|
|modelSuffix|The suffix of the generated model.| |null|
diff --git a/docs/generators/typescript-node.md b/docs/generators/typescript-node.md
index 28945f81c48..b043554815a 100644
--- a/docs/generators/typescript-node.md
+++ b/docs/generators/typescript-node.md
@@ -24,7 +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|
|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.|
**false**
No changes to the enum's are made, this is the default option.
**true**
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.
|false|
-|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
+|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C# have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
|modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name| |camelCase|
|npmName|The name under which you want to publish generated npm package. Required to generate a full package| |null|
|npmRepository|Use this property to set an url your private npmRepo in the package.json| |null|
diff --git a/docs/generators/typescript-redux-query.md b/docs/generators/typescript-redux-query.md
index 67a6fffcb53..1d589468b6a 100644
--- a/docs/generators/typescript-redux-query.md
+++ b/docs/generators/typescript-redux-query.md
@@ -24,7 +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|
|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.|
**false**
No changes to the enum's are made, this is the default option.
**true**
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.
|false|
-|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
+|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C# have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
|modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name| |camelCase|
|npmName|The name under which you want to publish generated npm package. Required to generate a full package| |null|
|npmRepository|Use this property to set an url your private npmRepo in the package.json| |null|
diff --git a/docs/generators/typescript-rxjs.md b/docs/generators/typescript-rxjs.md
index 24d906d8f23..0b1abc33ea8 100644
--- a/docs/generators/typescript-rxjs.md
+++ b/docs/generators/typescript-rxjs.md
@@ -24,7 +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|
|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.|
**false**
No changes to the enum's are made, this is the default option.
**true**
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.
|false|
-|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
+|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C# have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
|modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name. Only change it if you provide your own run-time code for (de-)serialization of models| |original|
|npmName|The name under which you want to publish generated npm package. Required to generate a full package| |null|
|npmRepository|Use this property to set an url your private npmRepo in the package.json| |null|
diff --git a/docs/generators/typescript.md b/docs/generators/typescript.md
index b0dead39be5..a5ff44cf2b3 100644
--- a/docs/generators/typescript.md
+++ b/docs/generators/typescript.md
@@ -21,15 +21,19 @@ 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|
|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.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.
|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|
+|enumPropertyNaming|Naming convention for enum properties: 'camelCase', 'PascalCase', 'snake_case', 'UPPERCASE', and 'original'| |PascalCase|
|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.|
**false**
No changes to the enum's are made, this is the default option.
**true**
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.
|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.|
**fetch-api**
fetch-api
**jquery**
jquery
|fetch-api|
|importFileExtension|File extension to use with relative imports. Set it to '.js' or '.mjs' when using [ESM](https://nodejs.org/api/esm.html). Defaults to '.ts' when 'platform' is set to 'deno'.| |null|
-|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
+|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C# have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
|modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name| |camelCase|
|npmName|The name under which you want to publish generated npm package. Required to generate a full package| |null|
|npmRepository|Use this property to set an url your private npmRepo in the package.json| |null|
|npmVersion|The version of your npm package. If not provided, using the version from the OpenAPI specification file.| |1.0.0|
+|nullSafeAdditionalProps|Set to make additional properties types declare that their indexer may return undefined| |false|
+|paramNaming|Naming convention for parameters: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name| |camelCase|
|platform|Specifies the platform the code should run on. The default is 'node' for the 'request' framework and 'browser' otherwise.|
**browser**
browser
**node**
node
**deno**
deno
|browser|
|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false|
|snapshot|When setting this property to true, the version will be suffixed with -SNAPSHOT.yyyyMMddHHmm| |false|
@@ -67,11 +71,13 @@ These options may be applied as additional-properties (cli) or configOptions (pl
Long
Map
Object
+
ReadonlyArray
Set
String
any
boolean
number
+
object
string
@@ -156,7 +162,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
### Client Modification Feature
| Name | Supported | Defined By |
| ---- | --------- | ---------- |
-|BasePath|✗|ToolingExtension
+|BasePath|✓|ToolingExtension
|Authorizations|✗|ToolingExtension
|UserAgent|✗|ToolingExtension
|MockServer|✗|ToolingExtension
@@ -201,7 +207,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
### Documentation Feature
| Name | Supported | Defined By |
| ---- | --------- | ---------- |
-|Readme|✗|ToolingExtension
+|Readme|✓|ToolingExtension
|Model|✓|ToolingExtension
|Api|✓|ToolingExtension
@@ -221,7 +227,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|MultiServer|✗|OAS3
|ParameterizedServer|✗|OAS3
|ParameterStyling|✗|OAS3
-|Callbacks|✓|OAS3
+|Callbacks|✗|OAS3
|LinkObjects|✗|OAS3
### Parameter Feature
@@ -250,14 +256,14 @@ These options may be applied as additional-properties (cli) or configOptions (pl
### Security Feature
| Name | Supported | Defined By |
| ---- | --------- | ---------- |
-|BasicAuth|✓|OAS2,OAS3
-|ApiKey|✓|OAS2,OAS3
+|BasicAuth|✗|OAS2,OAS3
+|ApiKey|✗|OAS2,OAS3
|OpenIDConnect|✗|OAS3
-|BearerToken|✓|OAS3
-|OAuth2_Implicit|✓|OAS2,OAS3
-|OAuth2_Password|✓|OAS2,OAS3
-|OAuth2_ClientCredentials|✓|OAS2,OAS3
-|OAuth2_AuthorizationCode|✓|OAS2,OAS3
+|BearerToken|✗|OAS3
+|OAuth2_Implicit|✗|OAS2,OAS3
+|OAuth2_Password|✗|OAS2,OAS3
+|OAuth2_ClientCredentials|✗|OAS2,OAS3
+|OAuth2_AuthorizationCode|✗|OAS2,OAS3
### Wire Format Feature
| Name | Supported | Defined By |
diff --git a/docs/generators/wsdl-schema.md b/docs/generators/wsdl-schema.md
index f9df093aa0c..08ba6899a19 100644
--- a/docs/generators/wsdl-schema.md
+++ b/docs/generators/wsdl-schema.md
@@ -24,7 +24,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|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.|
**false**
No changes to the enum's are made, this is the default option.
**true**
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.
|false|
|hostname|the hostname of the service| |null|
-|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
+|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C# have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false|
|serviceName|service name for the wsdl| |null|
|soapPath|basepath of the soap services| |null|
diff --git a/docs/plugins.md b/docs/plugins.md
index f4586135cdb..dae527d4048 100644
--- a/docs/plugins.md
+++ b/docs/plugins.md
@@ -91,19 +91,19 @@ This gives access to the following tasks:
| ---- | ----------- |
| openApiGenerate | Generate code via Open API Tools Generator for Open API 2.0 or 3.x specification documents. |
| openApiGenerators | Lists generators available via Open API Generators. |
-| openApiMeta | Generates a new generator to be consumed via Open API Generator. |
+| openApiMeta | Generates a new generator to be consumed via Open API Generator. |
| openApiValidate | Validates an Open API 2.0 or 3.x specification document. |
> The plugin implements the above tasks as project extensions of the same name. If you’d like to declare these tasks as dependencies to other tasks (using `dependsOn`), you’ll need a task reference. e.g.:
> ```groovy
-> compileJava.dependsOn tasks.openApiGenerate
+> compileJava.dependsOn tasks.named("openApiGenerate")
> ```
For full details of all options, see the [plugin README](https://github.com/OpenAPITools/openapi-generator/tree/master/modules/openapi-generator-gradle-plugin).
### Example
-An example task for generating a kotlin client:
+An example openApiGenerate task configuration for generating a kotlin client:
```groovy
openApiGenerate {
@@ -113,8 +113,10 @@ openApiGenerate {
apiPackage = "org.openapi.example.api"
invokerPackage = "org.openapi.example.invoker"
modelPackage = "org.openapi.example.model"
- configOptions = [
+ configOptions.putAll([
dateLibrary: "java8"
- ]
+ ])
}
```
+
+*If you want to create separate tasks (for example when you have more than one api spec and require different parameters for each), this is how to do so in Gradle 7+: `tasks.register('taskName', org.openapitools.generator.gradle.plugin.tasks.GenerateTask) { ... }`.*
diff --git a/flake.lock b/flake.lock
new file mode 100644
index 00000000000..da1901930c2
--- /dev/null
+++ b/flake.lock
@@ -0,0 +1,42 @@
+{
+ "nodes": {
+ "flake-utils": {
+ "locked": {
+ "lastModified": 1676283394,
+ "narHash": "sha256-XX2f9c3iySLCw54rJ/CZs+ZK6IQy7GXNY4nSOyu2QG4=",
+ "owner": "numtide",
+ "repo": "flake-utils",
+ "rev": "3db36a8b464d0c4532ba1c7dda728f4576d6d073",
+ "type": "github"
+ },
+ "original": {
+ "owner": "numtide",
+ "repo": "flake-utils",
+ "type": "github"
+ }
+ },
+ "nixpkgs": {
+ "locked": {
+ "lastModified": 1678083093,
+ "narHash": "sha256-eTkS9GcdSAYA3cE9zCAAs9wY3+oM2zT45ydIkAcEFFQ=",
+ "owner": "nixos",
+ "repo": "nixpkgs",
+ "rev": "684306b246d05168e42425a3610df7e2c4d51fcd",
+ "type": "github"
+ },
+ "original": {
+ "owner": "nixos",
+ "repo": "nixpkgs",
+ "type": "github"
+ }
+ },
+ "root": {
+ "inputs": {
+ "flake-utils": "flake-utils",
+ "nixpkgs": "nixpkgs"
+ }
+ }
+ },
+ "root": "root",
+ "version": 7
+}
diff --git a/flake.nix b/flake.nix
new file mode 100644
index 00000000000..ccc7357dbb6
--- /dev/null
+++ b/flake.nix
@@ -0,0 +1,23 @@
+{
+ description = "OpenAPI generator nix flake";
+
+ inputs.nixpkgs.url = "github:nixos/nixpkgs";
+ inputs.flake-utils.url = "github:numtide/flake-utils";
+
+ outputs = { self, nixpkgs, flake-utils, ... }:
+ flake-utils.lib.eachDefaultSystem (system:
+ let
+ pkgs = import nixpkgs { inherit system; };
+ in
+ {
+ devShells.default = pkgs.mkShell
+ {
+ buildInputs = with pkgs;[
+ jdk8
+ maven
+ ];
+ };
+ }
+ );
+}
+
diff --git a/modules/openapi-generator-maven-plugin/examples/java-client.xml b/modules/openapi-generator-maven-plugin/examples/java-client.xml
index 4d6dd0f17c1..199a55e4232 100644
--- a/modules/openapi-generator-maven-plugin/examples/java-client.xml
+++ b/modules/openapi-generator-maven-plugin/examples/java-client.xml
@@ -67,6 +67,7 @@
remote.org.openapitools.client.apiremote.org.openapitools.client.modelremote.org.openapitools.client
+ true
@@ -76,8 +77,8 @@
maven-compiler-plugin3.8.1
- 1.7
- 1.7
+ 1.8
+ 1.8none
diff --git a/modules/openapi-generator-maven-plugin/examples/kotlin.xml b/modules/openapi-generator-maven-plugin/examples/kotlin.xml
index bedb6a19c8a..3a45b3beada 100644
--- a/modules/openapi-generator-maven-plugin/examples/kotlin.xml
+++ b/modules/openapi-generator-maven-plugin/examples/kotlin.xml
@@ -26,6 +26,7 @@
${project.basedir}/swagger.yaml
+ truekotlin
diff --git a/modules/openapi-generator-maven-plugin/examples/multi-module/java-client/pom.xml b/modules/openapi-generator-maven-plugin/examples/multi-module/java-client/pom.xml
index 5c811053cc5..d8980404f5e 100644
--- a/modules/openapi-generator-maven-plugin/examples/multi-module/java-client/pom.xml
+++ b/modules/openapi-generator-maven-plugin/examples/multi-module/java-client/pom.xml
@@ -59,8 +59,8 @@
maven-compiler-plugin3.8.1
- 1.7
- 1.7
+ 1.8
+ 1.8none
diff --git a/modules/openapi-generator-maven-plugin/src/main/java/org/openapitools/codegen/plugin/CodeGenMojo.java b/modules/openapi-generator-maven-plugin/src/main/java/org/openapitools/codegen/plugin/CodeGenMojo.java
index 48f2d6ee07d..a7780239b2c 100644
--- a/modules/openapi-generator-maven-plugin/src/main/java/org/openapitools/codegen/plugin/CodeGenMojo.java
+++ b/modules/openapi-generator-maven-plugin/src/main/java/org/openapitools/codegen/plugin/CodeGenMojo.java
@@ -41,6 +41,7 @@ import java.util.Set;
import com.google.common.io.ByteSource;
import com.google.common.io.CharSource;
import io.swagger.v3.parser.util.ClasspathHelper;
+import org.apache.commons.io.FileUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.maven.plugin.AbstractMojo;
import org.apache.maven.plugin.MojoExecution;
@@ -99,6 +100,9 @@ public class CodeGenMojo extends AbstractMojo {
@Parameter(name = "output", property = "openapi.generator.maven.plugin.output")
private File output;
+ @Parameter(name = "cleanupOutput", property = "openapi.generator.maven.plugin.cleanupOutput", defaultValue = "false")
+ private boolean cleanupOutput;
+
/**
* Location of the OpenAPI spec, as URL or file.
*/
@@ -494,6 +498,16 @@ public class CodeGenMojo extends AbstractMojo {
LifecyclePhase.GENERATE_TEST_SOURCES.id().equals(mojo.getLifecyclePhase()) ?
"generated-test-sources/openapi" : "generated-sources/openapi");
}
+
+ if (cleanupOutput) {
+ try {
+ FileUtils.deleteDirectory(output);
+ LOGGER.info("Previous run output is removed from {}", output);
+ } catch (IOException e) {
+ LOGGER.warn("Failed to clean-up output directory {}", output, e);
+ }
+ }
+
addCompileSourceRootIfConfigured();
try {
diff --git a/modules/openapi-generator/pom.xml b/modules/openapi-generator/pom.xml
index e830e16ee8b..d1eab903cdc 100644
--- a/modules/openapi-generator/pom.xml
+++ b/modules/openapi-generator/pom.xml
@@ -272,6 +272,12 @@
commons-io${commons-io.version}
+
+ ch.qos.logback
+ logback-classic
+ 1.2.11
+ test
+ org.slf4jslf4j-ext
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConstants.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConstants.java
index 2ee0c5474f8..841adbf3b6d 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConstants.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConstants.java
@@ -378,8 +378,11 @@ public class CodegenConstants {
public static final String REMOVE_ENUM_VALUE_PREFIX = "removeEnumValuePrefix";
public static final String REMOVE_ENUM_VALUE_PREFIX_DESC = "Remove the common prefix of enum values";
+ public static final String SKIP_ONEOF_ANYOF_GETTER = "skipOneOfAnyOfGetter";
+ public static final String SKIP_ONEOF_ANYOF_GETTER_DESC = "Skip the generation of getter for sub-schemas in oneOf/anyOf models.";
+
public static final String LEGACY_DISCRIMINATOR_BEHAVIOR = "legacyDiscriminatorBehavior";
- public static final String LEGACY_DISCRIMINATOR_BEHAVIOR_DESC = "Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).";
+ public static final String LEGACY_DISCRIMINATOR_BEHAVIOR_DESC = "Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C# have this enabled by default).";
public static final String USE_SINGLE_REQUEST_PARAMETER = "useSingleRequestParameter";
public static final String USE_SINGLE_REQUEST_PARAMETER_DESC = "Setting this property to true will generate functions with a single argument containing all API endpoint parameters instead of one argument per parameter.";
@@ -388,10 +391,12 @@ public class CodegenConstants {
public static final String DISALLOW_ADDITIONAL_PROPERTIES_IF_NOT_PRESENT_DESC =
"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.";
+
public static final String UNSUPPORTED_V310_SPEC_MSG =
"Generation using 3.1.0 specs is in development and is not officially supported yet. " +
"If you would like to expedite development, please consider woking on the open issues in the 3.1.0 project: https://github.com/orgs/OpenAPITools/projects/4/views/1 " +
"and reach out to our team on Slack at https://join.slack.com/t/openapi-generator/shared_invite/zt-12jxxd7p2-XUeQM~4pzsU9x~eGLQqX2g";
+
public static final String ENUM_UNKNOWN_DEFAULT_CASE = "enumUnknownDefaultCase";
public static final String ENUM_UNKNOWN_DEFAULT_CASE_DESC =
"If the server adds new enum cases, that are unknown by an old spec/client, the client will fail to parse the network response." +
@@ -399,13 +404,13 @@ public class CodegenConstants {
public static final String USE_ONEOF_DISCRIMINATOR_LOOKUP = "useOneOfDiscriminatorLookup";
public static final String USE_ONEOF_DISCRIMINATOR_LOOKUP_DESC = "Use the discriminator's mapping in oneOf to speed up the model lookup. IMPORTANT: Validation (e.g. one and only one match in oneOf's schemas) will be skipped.";
+
public static final String INIT_REQUIRED_VARS = "initRequiredVars";
public static final String INIT_REQUIRED_VARS_DESC = "If set to true then the required variables are included as positional arguments in __init__ and _from_openapi_data methods. Note: this can break some composition use cases. To learn more read PR #8802.";
public static final String ERROR_OBJECT_TYPE = "errorObjectType";
public static final String NON_COMPLIANT_USE_DISCR_IF_COMPOSITION_FAILS = "nonCompliantUseDiscriminatorIfCompositionFails";
-
public static final String NON_COMPLIANT_USE_DISCR_IF_COMPOSITION_FAILS_DESC =
"When true, If the payload fails to validate against composed schemas (allOf/anyOf/oneOf/not) and a " +
"discriminator is present, then ignore the composition validation errors and attempt to use the " +
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenModel.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenModel.java
index 46790a8cad0..988a7eb0367 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenModel.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenModel.java
@@ -1209,10 +1209,25 @@ public class CodegenModel implements IJsonSchemaValidationProperties {
return sb.toString();
}
- public void addDiscriminatorMappedModelsImports() {
+ /*
+ * To clean up mapped models if needed and add mapped models to imports
+ *
+ * @param cleanUpMappedModels Clean up mapped models if set to true
+ */
+ public void addDiscriminatorMappedModelsImports(boolean cleanUpMappedModels) {
if (discriminator == null || discriminator.getMappedModels() == null) {
return;
}
+
+ if (cleanUpMappedModels && !this.hasChildren && // no child
+ (this.oneOf == null || this.oneOf.isEmpty()) && // not oneOf
+ (this.anyOf == null || this.anyOf.isEmpty())) { // not anyOf
+ //clear the mapping
+ discriminator.setMappedModels(null);
+ return;
+ }
+
+ // import child schemas defined in mapped models
for (CodegenDiscriminator.MappedModel mm : discriminator.getMappedModels()) {
if (!"".equals(mm.getModelName())) {
imports.add(mm.getModelName());
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenParameter.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenParameter.java
index ae723856989..53495455009 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenParameter.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenParameter.java
@@ -35,7 +35,7 @@ public class CodegenParameter implements IJsonSchemaValidationProperties {
public String example; // example value (x-example)
public String jsonSchema;
public boolean isString, isNumeric, isInteger, isLong, isNumber, isFloat, isDouble, isDecimal, isByteArray, isBinary,
- isBoolean, isDate, isDateTime, isUuid, isUri, isEmail, isFreeFormObject, isAnyType, isShort, isUnboundedInteger;
+ isBoolean, isDate, isDateTime, isUuid, isUri, isEmail, isPassword, isFreeFormObject, isAnyType, isShort, isUnboundedInteger;
public boolean isArray, isMap;
public boolean isFile;
public boolean isEnum;
@@ -229,6 +229,7 @@ public class CodegenParameter implements IJsonSchemaValidationProperties {
output.isUuid = this.isUuid;
output.isUri = this.isUri;
output.isEmail = this.isEmail;
+ output.isPassword = this.isPassword;
output.isFreeFormObject = this.isFreeFormObject;
output.isAnyType = this.isAnyType;
output.isArray = this.isArray;
@@ -244,7 +245,7 @@ public class CodegenParameter implements IJsonSchemaValidationProperties {
@Override
public int hashCode() {
- return Objects.hash(isFormParam, isQueryParam, isPathParam, isHeaderParam, isCookieParam, isBodyParam, isContainer, isCollectionFormatMulti, isPrimitiveType, isModel, isExplode, baseName, paramName, dataType, datatypeWithEnum, dataFormat, collectionFormat, description, unescapedDescription, baseType, defaultValue, enumDefaultValue, enumName, style, isDeepObject, isAllowEmptyValue, example, jsonSchema, isString, isNumeric, isInteger, isLong, isNumber, isFloat, isDouble, isDecimal, isByteArray, isBinary, isBoolean, isDate, isDateTime, isUuid, isUri, isEmail, isFreeFormObject, isAnyType, isArray, isMap, isFile, isEnum, _enum, allowableValues, items, mostInnerItems, additionalProperties, vars, requiredVars, vendorExtensions, hasValidation, getMaxProperties(), getMinProperties(), isNullable, isDeprecated, required, getMaximum(), getExclusiveMaximum(), getMinimum(), getExclusiveMinimum(), getMaxLength(), getMinLength(), getPattern(), getMaxItems(), getMinItems(), getUniqueItems(), contentType, multipleOf, isNull, additionalPropertiesIsAnyType, hasVars, hasRequired, isShort, isUnboundedInteger, hasDiscriminatorWithNonEmptyMapping, composedSchemas, hasMultipleTypes, schema, content, requiredVarsMap, ref, uniqueItemsBoolean, schemaIsFromAdditionalProperties);
+ return Objects.hash(isFormParam, isQueryParam, isPathParam, isHeaderParam, isCookieParam, isBodyParam, isContainer, isCollectionFormatMulti, isPrimitiveType, isModel, isExplode, baseName, paramName, dataType, datatypeWithEnum, dataFormat, collectionFormat, description, unescapedDescription, baseType, defaultValue, enumDefaultValue, enumName, style, isDeepObject, isAllowEmptyValue, example, jsonSchema, isString, isNumeric, isInteger, isLong, isNumber, isFloat, isDouble, isDecimal, isByteArray, isBinary, isBoolean, isDate, isDateTime, isUuid, isUri, isEmail, isPassword, isFreeFormObject, isAnyType, isArray, isMap, isFile, isEnum, _enum, allowableValues, items, mostInnerItems, additionalProperties, vars, requiredVars, vendorExtensions, hasValidation, getMaxProperties(), getMinProperties(), isNullable, isDeprecated, required, getMaximum(), getExclusiveMaximum(), getMinimum(), getExclusiveMinimum(), getMaxLength(), getMinLength(), getPattern(), getMaxItems(), getMinItems(), getUniqueItems(), contentType, multipleOf, isNull, additionalPropertiesIsAnyType, hasVars, hasRequired, isShort, isUnboundedInteger, hasDiscriminatorWithNonEmptyMapping, composedSchemas, hasMultipleTypes, schema, content, requiredVarsMap, ref, uniqueItemsBoolean, schemaIsFromAdditionalProperties);
}
@Override
@@ -281,6 +282,7 @@ public class CodegenParameter implements IJsonSchemaValidationProperties {
isUuid == that.isUuid &&
isUri == that.isUri &&
isEmail == that.isEmail &&
+ isPassword == that.isPassword &&
isFreeFormObject == that.isFreeFormObject &&
isAnyType == that.isAnyType &&
isArray == that.isArray &&
@@ -394,6 +396,7 @@ public class CodegenParameter implements IJsonSchemaValidationProperties {
sb.append(", isUuid=").append(isUuid);
sb.append(", isUri=").append(isUri);
sb.append(", isEmail=").append(isEmail);
+ sb.append(", isPassword=").append(isPassword);
sb.append(", isFreeFormObject=").append(isFreeFormObject);
sb.append(", isAnyType=").append(isAnyType);
sb.append(", isArray=").append(isArray);
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenProperty.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenProperty.java
index 6362fb93d80..aeb92053388 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenProperty.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenProperty.java
@@ -134,6 +134,7 @@ public class CodegenProperty implements Cloneable, IJsonSchemaValidationProperti
public boolean isUuid;
public boolean isUri;
public boolean isEmail;
+ public boolean isPassword;
public boolean isNull;
/**
* The type is a free-form object, i.e. it is a map of string to values with no declared properties.
@@ -158,6 +159,7 @@ public class CodegenProperty implements Cloneable, IJsonSchemaValidationProperti
public boolean isCircularReference;
public boolean isDiscriminator;
public boolean isNew; // true when this property overrides an inherited property
+ public Boolean isOverridden; // true if the property is a parent property (not defined in child/current schema)
public List _enum;
public Map allowableValues;
// If 'additionalProperties' is not set, items is null.
@@ -1051,6 +1053,7 @@ public class CodegenProperty implements Cloneable, IJsonSchemaValidationProperti
sb.append(", isUuid=").append(isUuid);
sb.append(", isUri=").append(isUri);
sb.append(", isEmail=").append(isEmail);
+ sb.append(", isPassword=").append(isPassword);
sb.append(", isFreeFormObject=").append(isFreeFormObject);
sb.append(", isArray=").append(isArray);
sb.append(", isMap=").append(isMap);
@@ -1065,6 +1068,7 @@ public class CodegenProperty implements Cloneable, IJsonSchemaValidationProperti
sb.append(", isCircularReference=").append(isCircularReference);
sb.append(", isDiscriminator=").append(isDiscriminator);
sb.append(", isNew=").append(isNew);
+ sb.append(", isOverridden=").append(isOverridden);
sb.append(", _enum=").append(_enum);
sb.append(", allowableValues=").append(allowableValues);
sb.append(", items=").append(items);
@@ -1142,6 +1146,7 @@ public class CodegenProperty implements Cloneable, IJsonSchemaValidationProperti
isUuid == that.isUuid &&
isUri == that.isUri &&
isEmail == that.isEmail &&
+ isPassword == that.isPassword &&
isFreeFormObject == that.isFreeFormObject &&
isArray == that.isArray &&
isMap == that.isMap &&
@@ -1156,6 +1161,7 @@ public class CodegenProperty implements Cloneable, IJsonSchemaValidationProperti
isCircularReference == that.isCircularReference &&
isDiscriminator == that.isDiscriminator &&
isNew == that.isNew &&
+ isOverridden == that.isOverridden &&
hasValidation == that.hasValidation &&
isInherited == that.isInherited &&
isXmlAttribute == that.isXmlAttribute &&
@@ -1231,9 +1237,9 @@ public class CodegenProperty implements Cloneable, IJsonSchemaValidationProperti
exclusiveMinimum, exclusiveMaximum, required, deprecated,
hasMoreNonReadOnly, isPrimitiveType, isModel, isContainer, isString, isNumeric,
isInteger, isLong, isNumber, isFloat, isDouble, isDecimal, isByteArray, isBinary, isFile,
- isBoolean, isDate, isDateTime, isUuid, isUri, isEmail, isFreeFormObject,
+ isBoolean, isDate, isDateTime, isUuid, isUri, isEmail, isPassword, isFreeFormObject,
isArray, isMap, isEnum, isInnerEnum, isEnumRef, isAnyType, isReadOnly, isWriteOnly, isNullable, isShort,
- isUnboundedInteger, isSelfReference, isCircularReference, isDiscriminator, isNew, _enum,
+ isUnboundedInteger, isSelfReference, isCircularReference, isDiscriminator, isNew, isOverridden, _enum,
allowableValues, items, mostInnerItems, additionalProperties, vars, requiredVars,
vendorExtensions, hasValidation, isInherited, discriminatorValue, nameInCamelCase,
nameInSnakeCase, enumName, maxItems, minItems, isXmlAttribute, xmlPrefix, xmlName,
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenResponse.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenResponse.java
index aa6b103b77c..edef0c709a3 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenResponse.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenResponse.java
@@ -50,6 +50,7 @@ public class CodegenResponse implements IJsonSchemaValidationProperties {
public boolean isDateTime;
public boolean isUuid;
public boolean isEmail;
+ public boolean isPassword;
public boolean isModel;
public boolean isFreeFormObject;
public boolean isAnyType;
@@ -98,7 +99,7 @@ public class CodegenResponse implements IJsonSchemaValidationProperties {
public int hashCode() {
return Objects.hash(headers, code, message, examples, dataType, baseType, containerType, hasHeaders,
isString, isNumeric, isInteger, isLong, isNumber, isFloat, isDouble, isDecimal, isByteArray, isBoolean, isDate,
- isDateTime, isUuid, isEmail, isModel, isFreeFormObject, isAnyType, isDefault, simpleType, primitiveType,
+ isDateTime, isUuid, isEmail, isPassword, isModel, isFreeFormObject, isAnyType, isDefault, simpleType, primitiveType,
isMap, isArray, isBinary, isFile, schema, jsonSchema, vendorExtensions, items, additionalProperties,
vars, requiredVars, isNull, hasValidation, isShort, isUnboundedInteger,
getMaxProperties(), getMinProperties(), uniqueItems, getMaxItems(), getMinItems(), getMaxLength(),
@@ -130,6 +131,7 @@ public class CodegenResponse implements IJsonSchemaValidationProperties {
isDateTime == that.isDateTime &&
isUuid == that.isUuid &&
isEmail == that.isEmail &&
+ isPassword == that.isPassword &&
isModel == that.isModel &&
isFreeFormObject == that.isFreeFormObject &&
isAnyType == that.isAnyType &&
@@ -568,6 +570,7 @@ public class CodegenResponse implements IJsonSchemaValidationProperties {
sb.append(", isDateTime=").append(isDateTime);
sb.append(", isUuid=").append(isUuid);
sb.append(", isEmail=").append(isEmail);
+ sb.append(", isPassword=").append(isPassword);
sb.append(", isModel=").append(isModel);
sb.append(", isFreeFormObject=").append(isFreeFormObject);
sb.append(", isAnyType=").append(isAnyType);
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java
index 40ff3a93ad7..a3c1bef3db1 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java
@@ -25,15 +25,32 @@ import com.google.common.collect.ImmutableMap;
import com.samskivert.mustache.Mustache;
import com.samskivert.mustache.Mustache.Compiler;
import com.samskivert.mustache.Mustache.Lambda;
-
+import io.swagger.v3.core.util.Json;
+import io.swagger.v3.oas.models.OpenAPI;
+import io.swagger.v3.oas.models.Operation;
+import io.swagger.v3.oas.models.PathItem;
+import io.swagger.v3.oas.models.callbacks.Callback;
+import io.swagger.v3.oas.models.examples.Example;
+import io.swagger.v3.oas.models.headers.Header;
+import io.swagger.v3.oas.models.media.*;
+import io.swagger.v3.oas.models.parameters.*;
+import io.swagger.v3.oas.models.responses.ApiResponse;
+import io.swagger.v3.oas.models.responses.ApiResponses;
+import io.swagger.v3.oas.models.security.OAuthFlow;
+import io.swagger.v3.oas.models.security.OAuthFlows;
+import io.swagger.v3.oas.models.security.SecurityScheme;
+import io.swagger.v3.oas.models.servers.Server;
+import io.swagger.v3.oas.models.servers.ServerVariable;
+import io.swagger.v3.parser.util.SchemaTypeUtil;
import org.apache.commons.lang3.ObjectUtils;
-import org.apache.commons.text.StringEscapeUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.tuple.Pair;
+import org.apache.commons.text.StringEscapeUtils;
import org.openapitools.codegen.CodegenDiscriminator.MappedModel;
import org.openapitools.codegen.api.TemplatingEngineAdapter;
import org.openapitools.codegen.config.GlobalSettings;
import org.openapitools.codegen.examples.ExampleGenerator;
+import org.openapitools.codegen.languages.PythonClientCodegen;
import org.openapitools.codegen.languages.RustServerCodegen;
import org.openapitools.codegen.meta.FeatureSet;
import org.openapitools.codegen.meta.GeneratorMetadata;
@@ -595,6 +612,7 @@ public class DefaultCodegen implements CodegenConfig {
/**
* Loop through all models to update different flags (e.g. isSelfReference), children models, etc
+ * and update mapped models for import.
*
* @param objs Map of models
* @return maps of models with various updates
@@ -634,7 +652,7 @@ public class DefaultCodegen implements CodegenConfig {
parent.hasChildren = true;
Schema parentSchema = this.openAPI.getComponents().getSchemas().get(parent.name);
if (parentSchema == null) {
- throw new NullPointerException(parent.name+" in "+this.openAPI.getComponents().getSchemas());
+ throw new NullPointerException(parent.name + " in " + this.openAPI.getComponents().getSchemas());
}
if (parentSchema.getDiscriminator() == null) {
parent = allModels.get(parent.getParent());
@@ -645,10 +663,17 @@ public class DefaultCodegen implements CodegenConfig {
}
// loop through properties of each model to detect self-reference
+ // and update mapped models for import
for (ModelsMap entry : objs.values()) {
for (ModelMap mo : entry.getModels()) {
CodegenModel cm = mo.getModel();
removeSelfReferenceImports(cm);
+
+ if (!this.getLegacyDiscriminatorBehavior()) {
+ // skip cleaning up mapped models for python client generator
+ // which uses its own logic
+ cm.addDiscriminatorMappedModelsImports(!(this instanceof PythonClientCodegen));
+ }
}
}
setCircularReferences(allModels);
@@ -1728,9 +1753,11 @@ public class DefaultCodegen implements CodegenConfig {
typeMapping.put("DateTime", "Date");
typeMapping.put("long", "Long");
typeMapping.put("short", "Short");
+ typeMapping.put("integer", "Integer");
+ typeMapping.put("UnsignedInteger", "Integer");
+ typeMapping.put("UnsignedLong", "Long");
typeMapping.put("char", "String");
typeMapping.put("object", "Object");
- typeMapping.put("integer", "Integer");
// FIXME: java specific type should be in Java Based Abstract Impl's
typeMapping.put("ByteArray", "byte[]");
typeMapping.put("binary", "File");
@@ -2062,7 +2089,7 @@ public class DefaultCodegen implements CodegenConfig {
if (encoding != null) {
boolean styleGiven = true;
Encoding.StyleEnum style = encoding.getStyle();
- if(style == null || style == Encoding.StyleEnum.FORM) {
+ if (style == null || style == Encoding.StyleEnum.FORM) {
// (Unfortunately, swagger-parser-v3 will always provide 'form'
// when style is not specified, so we can't detect that)
style = Encoding.StyleEnum.FORM;
@@ -2070,12 +2097,12 @@ public class DefaultCodegen implements CodegenConfig {
}
boolean explodeGiven = true;
Boolean explode = encoding.getExplode();
- if(explode == null) {
+ if (explode == null) {
explode = style == Encoding.StyleEnum.FORM; // Default to True when form, False otherwise
explodeGiven = false;
}
- if(!styleGiven && !explodeGiven) {
+ if (!styleGiven && !explodeGiven) {
// Ignore contentType if style or explode are specified.
codegenParameter.contentType = encoding.getContentType();
}
@@ -2083,7 +2110,7 @@ public class DefaultCodegen implements CodegenConfig {
codegenParameter.style = style.toString();
codegenParameter.isDeepObject = Encoding.StyleEnum.DEEP_OBJECT == style;
- if(codegenParameter.isContainer) {
+ if (codegenParameter.isContainer) {
codegenParameter.isExplode = explode;
String collectionFormat = getCollectionFormat(codegenParameter);
codegenParameter.collectionFormat = StringUtils.isEmpty(collectionFormat) ? "csv" : collectionFormat;
@@ -2394,8 +2421,14 @@ public class DefaultCodegen implements CodegenConfig {
return "number";
}
} else if (ModelUtils.isIntegerSchema(schema)) {
- if (ModelUtils.isLongSchema(schema)) {
+ if (ModelUtils.isUnsignedLongSchema(schema)) {
+ return "UnsignedLong";
+ } else if (ModelUtils.isUnsignedIntegerSchema(schema)) {
+ return "UnsignedInteger";
+ } else if (ModelUtils.isLongSchema(schema)) {
return "long";
+ } else if (ModelUtils.isShortSchema(schema)) {// int32
+ return "integer";
} else {
return schema.getType(); // integer
}
@@ -2631,9 +2664,6 @@ public class DefaultCodegen implements CodegenConfig {
if (m.discriminator == null && innerSchema.getDiscriminator() != null) {
LOGGER.debug("discriminator is set to null (not correctly set earlier): {}", m.name);
m.setDiscriminator(createDiscriminator(m.name, innerSchema, this.openAPI));
- if (!this.getLegacyDiscriminatorBehavior()) {
- m.addDiscriminatorMappedModelsImports();
- }
modelDiscriminators++;
}
@@ -2788,6 +2818,7 @@ public class DefaultCodegen implements CodegenConfig {
if (Boolean.TRUE.equals(schema.getNullable())) {
m.isNullable = Boolean.TRUE;
}
+
// end of code block for composed schema
}
@@ -2975,9 +3006,6 @@ public class DefaultCodegen implements CodegenConfig {
m.isAlias = (typeAliases.containsKey(name)
|| isAliasOfSimpleTypes(schema)); // check if the unaliased schema is an alias of simple OAS types
m.setDiscriminator(createDiscriminator(name, schema, this.openAPI));
- if (!this.getLegacyDiscriminatorBehavior()) {
- m.addDiscriminatorMappedModelsImports();
- }
if (schema.getDeprecated() != null) {
m.isDeprecated = schema.getDeprecated();
@@ -3024,7 +3052,6 @@ public class DefaultCodegen implements CodegenConfig {
// referenced models here, component that refs another component which is a model
// if a component references a schema which is not a generated model, the refed schema will be loaded into
// schema by unaliasSchema and one of the above code paths will be taken
- ;
}
if (schema.get$ref() != null) {
m.setRef(schema.get$ref());
@@ -3432,15 +3459,15 @@ public class DefaultCodegen implements CodegenConfig {
break;
}
currentSchemaName = queue.remove(0);
- MappedModel mm = new MappedModel(currentSchemaName, toModelName(currentSchemaName));
- descendentSchemas.add(mm);
Schema cs = schemas.get(currentSchemaName);
Map vendorExtensions = cs.getExtensions();
- if (vendorExtensions != null && !vendorExtensions.isEmpty() && vendorExtensions.containsKey("x-discriminator-value")) {
- String xDiscriminatorValue = (String) vendorExtensions.get("x-discriminator-value");
- mm = new MappedModel(xDiscriminatorValue, toModelName(currentSchemaName));
- descendentSchemas.add(mm);
- }
+ String mappingName =
+ Optional.ofNullable(vendorExtensions)
+ .map(ve -> ve.get("x-discriminator-value"))
+ .map(discriminatorValue -> (String) discriminatorValue)
+ .orElse(currentSchemaName);
+ MappedModel mm = new MappedModel(mappingName, toModelName(currentSchemaName));
+ descendentSchemas.add(mm);
}
return descendentSchemas;
}
@@ -3490,10 +3517,11 @@ public class DefaultCodegen implements CodegenConfig {
// for schemas that allOf inherit from this schema, add those descendants to this discriminator map
List otherDescendants = getAllOfDescendants(schemaName, openAPI);
for (MappedModel otherDescendant : otherDescendants) {
- // add only if the mapping names are not the same
+ // add only if the mapping names are not the same and the model names are not the same
boolean matched = false;
for (MappedModel uniqueDescendant : uniqueDescendants) {
- if (uniqueDescendant.getMappingName().equals(otherDescendant.getMappingName())) {
+ if (uniqueDescendant.getMappingName().equals(otherDescendant.getMappingName())
+ || (uniqueDescendant.getModelName().equals(otherDescendant.getModelName()))) {
matched = true;
break;
}
@@ -3672,6 +3700,8 @@ public class DefaultCodegen implements CodegenConfig {
property.isUri = true;
} else if (ModelUtils.isEmailSchema(p)) {
property.isEmail = true;
+ } else if (ModelUtils.isPasswordSchema(p)) {
+ property.isPassword = true;
} else if (ModelUtils.isDateSchema(p)) { // date format
property.setIsString(false); // for backward compatibility with 2.x
property.isDate = true;
@@ -3764,6 +3794,18 @@ public class DefaultCodegen implements CodegenConfig {
return cpc;
}
+ Schema original = null;
+ // check if it's allOf (only 1 sub schema) with or without default/nullable/etc set in the top level
+ if (ModelUtils.isAllOf(p) && p.getAllOf().size() == 1 && !(this instanceof PythonClientCodegen)) {
+ if (p.getAllOf().get(0) instanceof Schema) {
+ original = p;
+ p = (Schema) p.getAllOf().get(0);
+ } else {
+ LOGGER.error("Unknown type in allOf schema. Please report the issue via openapi-generator's Github issue tracker.");
+ }
+
+ }
+
CodegenProperty property = CodegenModelFactory.newInstance(CodegenModelType.PROPERTY);
if (p.equals(trueSchema)) {
property.setIsBooleanSchemaTrue(true);
@@ -3920,7 +3962,7 @@ public class DefaultCodegen implements CodegenConfig {
}
property.baseType = getSchemaType(p);
if (p.getXml() != null) {
- property.isXmlWrapped = p.getXml().getWrapped() == null ? false : p.getXml().getWrapped();
+ property.isXmlWrapped = p.getXml().getWrapped() != null && p.getXml().getWrapped();
property.xmlPrefix = p.getXml().getPrefix();
property.xmlNamespace = p.getXml().getNamespace();
property.xmlName = p.getXml().getName();
@@ -3957,6 +3999,25 @@ public class DefaultCodegen implements CodegenConfig {
property.isModel = (ModelUtils.isComposedSchema(referencedSchema) || ModelUtils.isObjectSchema(referencedSchema)) && ModelUtils.isModel(referencedSchema);
}
+ // restore original schema with default value, nullable, readonly etc
+ if (original != null) {
+ p = original;
+ // evaluate common attributes if defined in the top level
+ if (p.getNullable() != null) {
+ property.isNullable = p.getNullable();
+ } else if (p.getExtensions() != null && p.getExtensions().containsKey("x-nullable")) {
+ property.isNullable = (Boolean) p.getExtensions().get("x-nullable");
+ }
+
+ if (p.getReadOnly() != null) {
+ property.isReadOnly = p.getReadOnly();
+ }
+
+ if (p.getWriteOnly() != null) {
+ property.isWriteOnly = p.getWriteOnly();
+ }
+ }
+
// set the default value
property.defaultValue = toDefaultValue(property, p);
property.defaultValueWithParam = toDefaultValueWithParam(name, p);
@@ -4699,6 +4760,8 @@ public class DefaultCodegen implements CodegenConfig {
} else if (ModelUtils.isStringSchema(responseSchema)) {
if (ModelUtils.isEmailSchema(responseSchema)) {
r.isEmail = true;
+ } else if (ModelUtils.isPasswordSchema(responseSchema)) {
+ r.isPassword = true;
} else if (ModelUtils.isUUIDSchema(responseSchema)) {
r.isUuid = true;
} else if (ModelUtils.isByteArraySchema(responseSchema)) {
@@ -5009,7 +5072,7 @@ public class DefaultCodegen implements CodegenConfig {
// the default value is false
// https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#user-content-parameterexplode
- codegenParameter.isExplode = parameter.getExplode() == null ? false : parameter.getExplode();
+ codegenParameter.isExplode = parameter.getExplode() != null && parameter.getExplode();
// TODO revise collectionFormat, default collection format in OAS 3 appears to multi at least for query parameters
// https://swagger.io/docs/specification/serialization/
@@ -5038,7 +5101,6 @@ public class DefaultCodegen implements CodegenConfig {
if (ModelUtils.isShortSchema(parameterSchema)) { // int32/short format
codegenParameter.isShort = true;
} else { // unbounded integer
- ;
}
}
} else if (ModelUtils.isTypeObjectSchema(parameterSchema)) {
@@ -5050,7 +5112,6 @@ public class DefaultCodegen implements CodegenConfig {
}
addVarsRequiredVarsAdditionalProps(parameterSchema, codegenParameter);
} else if (ModelUtils.isNullType(parameterSchema)) {
- ;
} else if (ModelUtils.isAnyType(parameterSchema)) {
// any schema with no type set, composed schemas often do this
if (ModelUtils.isMapSchema(parameterSchema)) { // for map parameter
@@ -5078,7 +5139,6 @@ public class DefaultCodegen implements CodegenConfig {
}
} else {
// referenced schemas
- ;
}
CodegenProperty codegenProperty = fromProperty(parameter.getName(), parameterSchema, false);
@@ -5563,6 +5623,10 @@ public class DefaultCodegen implements CodegenConfig {
* @param modelName model name
*/
protected void addImport(ComposedSchema composed, Schema childSchema, CodegenModel model, String modelName ) {
+ if (composed == null || childSchema == null) {
+ return;
+ }
+
// import only if it's not allOf composition schema (without discriminator)
if (!(composed.getAllOf() != null && childSchema.getDiscriminator() == null)) {
addImport(model, modelName);
@@ -5660,6 +5724,7 @@ public class DefaultCodegen implements CodegenConfig {
for (CodegenProperty var : cm.vars) {
// create a map of codegen properties for lookup later
varsMap.put(var.baseName, var);
+ var.isOverridden = false;
}
}
}
@@ -5684,6 +5749,10 @@ public class DefaultCodegen implements CodegenConfig {
cp = fromProperty(key, prop, mandatory.contains(key));
}
+ if (cm != null && cm.allVars == vars && cp.isOverridden == null) { // processing allVars and it's a parent property
+ cp.isOverridden = true;
+ }
+
vars.add(cp);
m.setHasVars(true);
@@ -6247,6 +6316,8 @@ public class DefaultCodegen implements CodegenConfig {
}
if (Boolean.TRUE.equals(property.isEmail) && Boolean.TRUE.equals(property.isString)) {
parameter.isEmail = true;
+ } else if (Boolean.TRUE.equals(property.isPassword) && Boolean.TRUE.equals(property.isString)) {
+ parameter.isPassword = true;
} else if (Boolean.TRUE.equals(property.isUuid) && Boolean.TRUE.equals(property.isString)) {
parameter.isUuid = true;
} else if (Boolean.TRUE.equals(property.isByteArray)) {
@@ -6762,6 +6833,8 @@ public class DefaultCodegen implements CodegenConfig {
} else if (ModelUtils.isStringSchema(ps)) {
if (ModelUtils.isEmailSchema(ps)) {
codegenParameter.isEmail = true;
+ } else if (ModelUtils.isPasswordSchema(ps)) {
+ codegenParameter.isPassword = true;
} else if (ModelUtils.isUUIDSchema(ps)) {
codegenParameter.isUuid = true;
} else if (ModelUtils.isByteArraySchema(ps)) {
@@ -6806,7 +6879,6 @@ public class DefaultCodegen implements CodegenConfig {
if (ModelUtils.isShortSchema(ps)) { // int32/short format
codegenParameter.isShort = true;
} else { // unbounded integer
- ;
}
}
} else if (ModelUtils.isTypeObjectSchema(ps)) {
@@ -6814,10 +6886,8 @@ public class DefaultCodegen implements CodegenConfig {
codegenParameter.isFreeFormObject = true;
}
} else if (ModelUtils.isNullType(ps)) {
- ;
} else if (ModelUtils.isAnyType(ps)) {
// any schema with no type set, composed schemas often do this
- ;
} else if (ModelUtils.isArraySchema(ps)) {
Schema inner = getSchemaItems((ArraySchema) ps);
CodegenProperty arrayInnerProperty = fromProperty("inner", inner, false);
@@ -6858,7 +6928,6 @@ public class DefaultCodegen implements CodegenConfig {
}
} else {
// referenced schemas
- ;
}
if (Boolean.TRUE.equals(codegenProperty.isModel)) {
@@ -7701,9 +7770,7 @@ public class DefaultCodegen implements CodegenConfig {
CodegenModel cm = new CodegenModel();
cm.setDiscriminator(createDiscriminator("", cs, openAPI));
- if (!this.getLegacyDiscriminatorBehavior()) {
- cm.addDiscriminatorMappedModelsImports();
- }
+
for (Schema o : Optional.ofNullable(cs.getOneOf()).orElse(Collections.emptyList())) {
if (o.get$ref() == null) {
if (cm.discriminator != null && o.get$ref() == null) {
@@ -7762,9 +7829,9 @@ public class DefaultCodegen implements CodegenConfig {
return exceptions;
}
- private String name;
- private String removeCharRegEx;
- private List exceptions;
+ private final String name;
+ private final String removeCharRegEx;
+ private final List exceptions;
@Override
public boolean equals(Object o) {
@@ -7936,7 +8003,7 @@ public class DefaultCodegen implements CodegenConfig {
}
private CodegenComposedSchemas getComposedSchemas(Schema schema) {
- if (!(schema instanceof ComposedSchema) && schema.getNot()==null) {
+ if (!(schema instanceof ComposedSchema) && schema.getNot() == null) {
return null;
}
Schema notSchema = schema.getNot();
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultGenerator.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultGenerator.java
index 9646e555663..78d3ac40920 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultGenerator.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultGenerator.java
@@ -820,6 +820,11 @@ public class DefaultGenerator implements Generator {
bundle.put("hasServers", true);
}
+ boolean hasOperationServers = allOperations != null && allOperations.stream()
+ .flatMap(om -> om.getOperations().getOperation().stream())
+ .anyMatch(o -> o.servers != null && !o.servers.isEmpty());
+ bundle.put("hasOperationServers", hasOperationServers);
+
if (openAPI.getExternalDocs() != null) {
bundle.put("externalDocs", openAPI.getExternalDocs());
}
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/IJsonSchemaValidationProperties.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/IJsonSchemaValidationProperties.java
index d5e8f7faa1f..55dbcbac3d5 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/IJsonSchemaValidationProperties.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/IJsonSchemaValidationProperties.java
@@ -247,6 +247,8 @@ public interface IJsonSchemaValidationProperties {
;
} else if (ModelUtils.isEmailSchema(p)) {
;
+ } else if (ModelUtils.isPasswordSchema(p)) {
+ ;
} else if (ModelUtils.isDateSchema(p)) {
;
} else if (ModelUtils.isDateTimeSchema(p)) {
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/InlineModelResolver.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/InlineModelResolver.java
index f8b67f47cd7..1d11972b44d 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/InlineModelResolver.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/InlineModelResolver.java
@@ -224,7 +224,7 @@ public class InlineModelResolver {
}
if (m.getAllOf() != null && !m.getAllOf().isEmpty()) {
- // check to ensure at least of the allOf item is model
+ // check to ensure at least one of the allOf item is model
for (Schema inner : m.getAllOf()) {
if (isModelNeeded(ModelUtils.getReferencedSchema(openAPI, inner), visitedSchemas)) {
return true;
@@ -385,6 +385,7 @@ public class InlineModelResolver {
}
}
m.setAnyOf(newAnyOf);
+
}
if (m.getOneOf() != null) {
List newOneOf = new ArrayList();
@@ -541,15 +542,15 @@ public class InlineModelResolver {
* allOf:
* - $ref: '#/components/schemas/Animal'
* - type: object
- * properties:
- * name:
- * type: string
- * age:
- * type: string
+ * properties:
+ * name:
+ * type: string
+ * age:
+ * type: string
* - type: object
- * properties:
- * breed:
- * type: string
+ * properties:
+ * breed:
+ * type: string
*
* @param key a unique name ofr the composed schema.
* @param children the list of nested schemas within a composed schema (allOf, anyOf, oneOf).
@@ -577,6 +578,8 @@ public class InlineModelResolver {
// instead of inline.
String innerModelName = resolveModelName(component.getTitle(), key);
Schema innerModel = modelFromProperty(openAPI, component, innerModelName);
+ // Recurse to create $refs for inner models
+ gatherInlineModels(innerModel, innerModelName);
String existing = matchGenerated(innerModel);
if (existing == null) {
innerModelName = addSchemas(innerModelName, innerModel);
@@ -604,13 +607,17 @@ public class InlineModelResolver {
List modelNames = new ArrayList(models.keySet());
for (String modelName : modelNames) {
Schema model = models.get(modelName);
- if (ModelUtils.isComposedSchema(model)) {
+ if (ModelUtils.isAnyOf(model)) { // contains anyOf only
+ gatherInlineModels(model, modelName);
+ } else if (ModelUtils.isOneOf(model)) { // contains oneOf only
+ gatherInlineModels(model, modelName);
+ } else if (ModelUtils.isComposedSchema(model)) {
ComposedSchema m = (ComposedSchema) model;
// inline child schemas
flattenComposedChildren(modelName + "_allOf", m.getAllOf());
flattenComposedChildren(modelName + "_anyOf", m.getAnyOf());
flattenComposedChildren(modelName + "_oneOf", m.getOneOf());
- } else if (model instanceof Schema) {
+ } else {
gatherInlineModels(model, modelName);
}
}
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/OpenAPINormalizer.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/OpenAPINormalizer.java
index 3e883e47b18..6b98b0d5e24 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/OpenAPINormalizer.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/OpenAPINormalizer.java
@@ -65,6 +65,7 @@ public class OpenAPINormalizer {
// when set to true, oneOf/anyOf schema with only one sub-schema is simplified to just the sub-schema
// and if sub-schema contains "null", remove it and set nullable to true instead
+ // and if sub-schema contains enum of "null", remove it and set nullable to true instead
final String SIMPLIFY_ONEOF_ANYOF = "SIMPLIFY_ONEOF_ANYOF";
boolean simplifyOneOfAnyOf;
@@ -76,6 +77,16 @@ public class OpenAPINormalizer {
final String SET_TAGS_FOR_ALL_OPERATIONS = "SET_TAGS_FOR_ALL_OPERATIONS";
String setTagsForAllOperations;
+ // when set to true, auto fix integer with maximum value 4294967295 (2^32-1) or long with 18446744073709551615 (2^64-1)
+ // by adding x-unsigned to the schema
+ final String ADD_UNSIGNED_TO_INTEGER_WITH_INVALID_MAX_VALUE = "ADD_UNSIGNED_TO_INTEGER_WITH_INVALID_MAX_VALUE";
+ boolean addUnsignedToIntegerWithInvalidMaxValue;
+
+ // when set to true, refactor schema with allOf and properties in the same level to a schema with allOf only and
+ // the allOf contains a new schema containing the properties in the top level
+ final String REFACTOR_ALLOF_WITH_PROPERTIES_ONLY = "REFACTOR_ALLOF_WITH_PROPERTIES_ONLY";
+ boolean refactorAllOfWithPropertiesOnly;
+
// ============= end of rules =============
/**
@@ -132,6 +143,13 @@ public class OpenAPINormalizer {
setTagsForAllOperations = rules.get(SET_TAGS_FOR_ALL_OPERATIONS);
}
+ if (enableAll || "true".equalsIgnoreCase(rules.get(ADD_UNSIGNED_TO_INTEGER_WITH_INVALID_MAX_VALUE))) {
+ addUnsignedToIntegerWithInvalidMaxValue = true;
+ }
+
+ if (enableAll || "true".equalsIgnoreCase(rules.get(REFACTOR_ALLOF_WITH_PROPERTIES_ONLY))) {
+ refactorAllOfWithPropertiesOnly = true;
+ }
}
/**
@@ -333,6 +351,15 @@ public class OpenAPINormalizer {
normalizeSchema(schema.getItems(), visitedSchemas);
} else if (schema.getAdditionalProperties() instanceof Schema) { // map
normalizeSchema((Schema) schema.getAdditionalProperties(), visitedSchemas);
+ } else if (ModelUtils.isOneOf(schema)) { // oneOf
+ return normalizeOneOf(schema, visitedSchemas);
+ } else if (ModelUtils.isAnyOf(schema)) { // anyOf
+ return normalizeAnyOf(schema, visitedSchemas);
+ } else if (ModelUtils.isAllOfWithProperties(schema)) { // allOf with properties
+ schema = normalizeAllOfWithProperties(schema, visitedSchemas);
+ normalizeSchema(schema, visitedSchemas);
+ } else if (ModelUtils.isAllOf(schema)) { // allOf
+ return normalizeAllOf(schema, visitedSchemas);
} else if (ModelUtils.isComposedSchema(schema)) { // composed schema
ComposedSchema cs = (ComposedSchema) schema;
@@ -361,12 +388,12 @@ public class OpenAPINormalizer {
}
return cs;
- } else if (schema.getNot() != null) {// not schema
- normalizeSchema(schema.getNot(), visitedSchemas);
} else if (schema.getProperties() != null && !schema.getProperties().isEmpty()) {
normalizeProperties(schema.getProperties(), visitedSchemas);
} else if (schema instanceof BooleanSchema) {
normalizeBooleanSchema(schema, visitedSchemas);
+ } else if (schema instanceof IntegerSchema) {
+ normalizeIntegerSchema(schema, visitedSchemas);
} else if (schema instanceof Schema) {
normalizeSchemaWithOnlyProperties(schema, visitedSchemas);
} else {
@@ -380,6 +407,10 @@ public class OpenAPINormalizer {
processSimplifyBooleanEnum(schema);
}
+ private void normalizeIntegerSchema(Schema schema, Set visitedSchemas) {
+ processAddUnsignedToIntegerWithInvalidMaxValue(schema);
+ }
+
private void normalizeSchemaWithOnlyProperties(Schema schema, Set visitedSchemas) {
// normalize non-composed schema (e.g. schema with only properties)
}
@@ -408,6 +439,20 @@ public class OpenAPINormalizer {
return schema;
}
+ private Schema normalizeAllOfWithProperties(Schema schema, Set visitedSchemas) {
+ for (Object item : schema.getAllOf()) {
+ if (!(item instanceof Schema)) {
+ throw new RuntimeException("Error! allOf schema is not of the type Schema: " + item);
+ }
+ // normalize allOf sub schemas one by one
+ normalizeSchema((Schema) item, visitedSchemas);
+ }
+ // process rules here
+ schema = processRefactorAllOfWithPropertiesOnly(schema);
+
+ return schema;
+ }
+
private Schema normalizeOneOf(Schema schema, Set visitedSchemas) {
for (Object item : schema.getOneOf()) {
if (item == null) {
@@ -446,6 +491,10 @@ public class OpenAPINormalizer {
}
private Schema normalizeComplexComposedSchema(Schema schema, Set visitedSchemas) {
+ // loop through properties, if any
+ if (schema.getProperties() != null && !schema.getProperties().isEmpty()) {
+ normalizeProperties(schema.getProperties(), visitedSchemas);
+ }
processRemoveAnyOfOneOfAndKeepPropertiesOnly(schema);
@@ -549,7 +598,7 @@ public class OpenAPINormalizer {
/**
* If the schema is anyOf and the sub-schemas are either string or enum of string,
- * then simplify it to just string as many generators do not yet support anyOf.
+ * then simplify it to just enum of string as many generators do not yet support anyOf.
*
* @param schema Schema
* @return Schema
@@ -564,7 +613,7 @@ public class OpenAPINormalizer {
return schema;
}
- Schema s0 = null, s1 = null;
+ Schema result = null, s0 = null, s1 = null;
if (schema.getAnyOf().size() == 2) {
s0 = ModelUtils.unaliasSchema(openAPI, (Schema) schema.getAnyOf().get(0));
s1 = ModelUtils.unaliasSchema(openAPI, (Schema) schema.getAnyOf().get(1));
@@ -575,18 +624,30 @@ public class OpenAPINormalizer {
s0 = ModelUtils.getReferencedSchema(openAPI, s0);
s1 = ModelUtils.getReferencedSchema(openAPI, s1);
- // find the string schema (not enum)
+ // find the string schema (enum)
if (s0 instanceof StringSchema && s1 instanceof StringSchema) {
if (((StringSchema) s0).getEnum() != null) { // s0 is enum, s1 is string
- return (StringSchema) s1;
+ result = (StringSchema) s0;
} else if (((StringSchema) s1).getEnum() != null) { // s1 is enum, s0 is string
- return (StringSchema) s0;
+ result = (StringSchema) s1;
} else { // both are string
- return schema;
+ result = schema;
}
} else {
- return schema;
+ result = schema;
}
+
+ // set nullable
+ if (schema.getNullable() != null) {
+ result.setNullable(schema.getNullable());
+ }
+
+ // set default
+ if (schema.getDefault() != null) {
+ result.setDefault(schema.getDefault());
+ }
+
+ return result;
}
/**
@@ -602,11 +663,22 @@ public class OpenAPINormalizer {
}
if (schema.getOneOf() != null && !schema.getOneOf().isEmpty()) {
- // convert null sub-schema to `nullable: true`
for (int i = 0; i < schema.getOneOf().size(); i++) {
+ // convert null sub-schema to `nullable: true`
if (schema.getOneOf().get(i) == null || ((Schema) schema.getOneOf().get(i)).getType() == null) {
schema.getOneOf().remove(i);
schema.setNullable(true);
+ continue;
+ }
+
+ // convert enum of null only to `nullable:true`
+ Schema oneOfElement = ModelUtils.getReferencedSchema(openAPI, (Schema) schema.getOneOf().get(i));
+ if (oneOfElement.getEnum() != null && oneOfElement.getEnum().size() == 1) {
+ if ("null".equals(String.valueOf(oneOfElement.getEnum().get(0)))) {
+ schema.setNullable(true);
+ schema.getOneOf().remove(i);
+ continue;
+ }
}
}
@@ -635,17 +707,28 @@ public class OpenAPINormalizer {
}
if (schema.getAnyOf() != null && !schema.getAnyOf().isEmpty()) {
- // convert null sub-schema to `nullable: true`
for (int i = 0; i < schema.getAnyOf().size(); i++) {
+ // convert null sub-schema to `nullable: true`
if (schema.getAnyOf().get(i) == null || ((Schema) schema.getAnyOf().get(i)).getType() == null) {
schema.getAnyOf().remove(i);
schema.setNullable(true);
+ continue;
+ }
+
+ // convert enum of null only to `nullable:true`
+ Schema anyOfElement = ModelUtils.getReferencedSchema(openAPI, (Schema) schema.getAnyOf().get(i));
+ if (anyOfElement.getEnum() != null && anyOfElement.getEnum().size() == 1) {
+ if ("null".equals(String.valueOf(anyOfElement.getEnum().get(0)))) {
+ schema.setNullable(true);
+ schema.getAnyOf().remove(i);
+ continue;
+ }
}
}
// if only one element left, simplify to just the element (schema)
if (schema.getAnyOf().size() == 1) {
- if (schema.getNullable()) { // retain nullable setting
+ if (Boolean.TRUE.equals(schema.getNullable())) { // retain nullable setting
((Schema) schema.getAnyOf().get(0)).setNullable(true);
}
return (Schema) schema.getAnyOf().get(0);
@@ -675,5 +758,73 @@ public class OpenAPINormalizer {
}
}
+ /**
+ * If the schema is integer and the max value is invalid (out of bound)
+ * then add x-unsigned to use unsigned integer/long instead.
+ *
+ * @param schema Schema
+ * @return Schema
+ */
+ private void processAddUnsignedToIntegerWithInvalidMaxValue(Schema schema) {
+ if (!addUnsignedToIntegerWithInvalidMaxValue && !enableAll) {
+ return;
+ }
+
+ if (schema instanceof IntegerSchema) {
+ if (ModelUtils.isLongSchema(schema)) {
+ if ("18446744073709551615".equals(String.valueOf(schema.getMaximum())) &&
+ "0".equals(String.valueOf(schema.getMinimum()))) {
+ schema.addExtension("x-unsigned", true);
+ }
+ } else {
+ if ("4294967295".equals(String.valueOf(schema.getMaximum())) &&
+ "0".equals(String.valueOf(schema.getMinimum()))) {
+ schema.addExtension("x-unsigned", true);
+ }
+ }
+ }
+ }
+
+ /*
+ * When set to true, refactor schema with allOf and properties in the same level to a schema with allOf only and
+ * the allOf contains a new schema containing the properties in the top level.
+ *
+ * @param schema Schema
+ * @return Schema
+ */
+ private Schema processRefactorAllOfWithPropertiesOnly(Schema schema) {
+ if (!refactorAllOfWithPropertiesOnly && !enableAll) {
+ return schema;
+ }
+
+ ObjectSchema os = new ObjectSchema();
+ // set the properties, etc of the new schema to the properties of schema
+ os.setProperties(schema.getProperties());
+ os.setRequired(schema.getRequired());
+ os.setAdditionalProperties(schema.getAdditionalProperties());
+ os.setNullable(schema.getNullable());
+ os.setDescription(schema.getDescription());
+ os.setDeprecated(schema.getDeprecated());
+ os.setExample(schema.getExample());
+ os.setExamples(schema.getExamples());
+ os.setTitle(schema.getTitle());
+ schema.getAllOf().add(os); // move new schema as a child schema of allOf
+ // clean up by removing properties, etc
+ schema.setProperties(null);
+ schema.setRequired(null);
+ schema.setAdditionalProperties(null);
+ schema.setNullable(null);
+ schema.setDescription(null);
+ schema.setDeprecated(null);
+ schema.setExample(null);
+ schema.setExamples(null);
+ schema.setTitle(null);
+
+ // at this point the schema becomes a simple allOf (no properties) with an additional schema containing
+ // the properties
+
+ return schema;
+ }
+
// ===================== end of rules =====================
}
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCSharpCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCSharpCodegen.java
index 33a13db3351..651a015111b 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCSharpCodegen.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCSharpCodegen.java
@@ -70,6 +70,10 @@ public abstract class AbstractCSharpCodegen extends DefaultCodegen implements Co
protected String packageCompany = "OpenAPI";
protected String packageCopyright = "No Copyright";
protected String packageAuthors = "OpenAPI";
+ public static final String DATE_FORMAT = "dateFormat";
+ protected String dateFormat = "yyyy'-'MM'-'dd";
+ public static final String DATETIME_FORMAT = "dateTimeFormat";
+ protected String dateTimeFormat = "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fffffffK";
protected String interfacePrefix = "I";
protected String enumNameSuffix = "Enum";
@@ -160,8 +164,12 @@ public abstract class AbstractCSharpCodegen extends DefaultCodegen implements Co
"decimal",
"int?",
"int",
+ "uint",
+ "uint?",
"long?",
"long",
+ "ulong",
+ "ulong?",
"float?",
"float",
"byte[]",
@@ -197,8 +205,10 @@ public abstract class AbstractCSharpCodegen extends DefaultCodegen implements Co
typeMapping.put("ByteArray", "byte[]");
typeMapping.put("boolean", "bool?");
typeMapping.put("integer", "int?");
- typeMapping.put("float", "float?");
+ typeMapping.put("UnsignedInteger", "uint?");
+ typeMapping.put("UnsignedLong", "ulong?");
typeMapping.put("long", "long?");
+ typeMapping.put("float", "float?");
typeMapping.put("double", "double?");
typeMapping.put("number", "decimal?");
typeMapping.put("BigDecimal", "decimal?");
@@ -215,11 +225,12 @@ public abstract class AbstractCSharpCodegen extends DefaultCodegen implements Co
// nullable type
nullableType = new HashSet<>(
- Arrays.asList("decimal", "bool", "int", "float", "long", "double", "DateTime", "DateTimeOffset", "Guid")
+ Arrays.asList("decimal", "bool", "int", "uint", "long", "ulong", "float", "double",
+ "DateTime", "DateTimeOffset", "Guid")
);
// value Types
valueTypes = new HashSet<>(
- Arrays.asList("decimal", "bool", "int", "float", "long", "double")
+ Arrays.asList("decimal", "bool", "int", "uint", "long", "ulong", "float", "double")
);
this.setSortParamsByRequiredFlag(true);
@@ -326,6 +337,20 @@ public abstract class AbstractCSharpCodegen extends DefaultCodegen implements Co
additionalProperties.put(CodegenConstants.PACKAGE_PRODUCTNAME, packageProductName);
}
+ // {{dateFormat}}
+ if (additionalProperties.containsKey(DATE_FORMAT)) {
+ setDateFormat((String) additionalProperties.get(DATE_FORMAT));
+ } else {
+ additionalProperties.put(DATE_FORMAT, this.dateFormat);
+ }
+
+ // {{dateTimeFormat}}
+ if (additionalProperties.containsKey(DATETIME_FORMAT)) {
+ setDateTimeFormat((String) additionalProperties.get(DATETIME_FORMAT));
+ } else {
+ additionalProperties.put(DATETIME_FORMAT, this.dateTimeFormat);
+ }
+
// {{packageDescription}}
if (additionalProperties.containsKey(CodegenConstants.PACKAGE_DESCRIPTION)) {
setPackageDescription((String) additionalProperties.get(CodegenConstants.PACKAGE_DESCRIPTION));
@@ -527,14 +552,19 @@ public abstract class AbstractCSharpCodegen extends DefaultCodegen implements Co
}
// fix incorrect data types for maps of maps
- if (property.datatypeWithEnum.contains("List>") && property.items != null) {
- property.datatypeWithEnum = property.datatypeWithEnum.replace("List>", property.items.datatypeWithEnum + ">");
+ if (property.datatypeWithEnum.endsWith(", List>") && property.items != null) {
+ property.datatypeWithEnum = property.datatypeWithEnum.replace(", List>", ", " + property.items.datatypeWithEnum + ">");
property.dataType = property.datatypeWithEnum;
}
- if (property.datatypeWithEnum.contains("Dictionary>") && property.items != null) {
- property.datatypeWithEnum = property.datatypeWithEnum.replace("Dictionary>", property.items.datatypeWithEnum + ">");
+ if (property.datatypeWithEnum.endsWith(", Dictionary>") && property.items != null) {
+ property.datatypeWithEnum = property.datatypeWithEnum.replace(", Dictionary>", ", " + property.items.datatypeWithEnum + ">");
property.dataType = property.datatypeWithEnum;
}
+
+ // HOTFIX: https://github.com/OpenAPITools/openapi-generator/issues/14944
+ if (property.datatypeWithEnum.equals("decimal")) {
+ property.isDecimal = true;
+ }
}
/** Mitigates https://github.com/OpenAPITools/openapi-generator/issues/13709 */
@@ -1262,6 +1292,14 @@ public abstract class AbstractCSharpCodegen extends DefaultCodegen implements Co
this.packageProductName = packageProductName;
}
+ public void setDateFormat(String dateFormat) {
+ this.dateFormat = dateFormat;
+ }
+
+ public void setDateTimeFormat(String dateTimeFormat) {
+ this.dateTimeFormat = dateTimeFormat;
+ }
+
public void setPackageDescription(String packageDescription) {
this.packageDescription = packageDescription;
}
@@ -1334,7 +1372,9 @@ public abstract class AbstractCSharpCodegen extends DefaultCodegen implements Co
// Per: https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/enum
// The approved types for an enum are byte, sbyte, short, ushort, int, uint, long, or ulong.
// but we're not supporting unsigned integral types or shorts.
- if (datatype.startsWith("int") || datatype.startsWith("long") || datatype.startsWith("byte")) {
+ if (datatype.startsWith("int") || datatype.startsWith("uint") ||
+ datatype.startsWith("long") || datatype.startsWith("ulong") ||
+ datatype.startsWith("byte")) {
return value;
}
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractDartCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractDartCodegen.java
index 9ddfc6e42c9..e542f21b74f 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractDartCodegen.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractDartCodegen.java
@@ -555,8 +555,8 @@ public abstract class AbstractDartCodegen extends DefaultCodegen {
public CodegenProperty fromProperty(String name, Schema p, boolean required) {
final CodegenProperty property = super.fromProperty(name, p, required);
- // Handle composed properties
- if (ModelUtils.isComposedSchema(p)) {
+ // Handle composed properties and it's NOT allOf with a single ref only
+ if (ModelUtils.isComposedSchema(p) && !(ModelUtils.isAllOf(p) && p.getAllOf().size() == 1)) {
ComposedSchema composed = (ComposedSchema) p;
// Count the occurrences of allOf/anyOf/oneOf with exactly one child element
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractGoCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractGoCodegen.java
index a72ca4a6f35..9e7c78f8db4 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractGoCodegen.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractGoCodegen.java
@@ -145,8 +145,6 @@ public abstract class AbstractGoCodegen extends DefaultCodegen implements Codege
"float32", "float64")
);
- importMapping = new HashMap<>();
-
cliOptions.clear();
cliOptions.add(new CliOption(CodegenConstants.PACKAGE_NAME, "Go package name (convention: lowercase).")
.defaultValue("openapi"));
@@ -225,7 +223,7 @@ public abstract class AbstractGoCodegen extends DefaultCodegen implements Codege
@Override
protected boolean isReservedWord(String word) {
- return word != null && reservedWords.contains(word);
+ return word != null && (reservedWords.contains(word) || reservedWordsMappings().containsKey(word));
}
@Override
@@ -407,7 +405,7 @@ public abstract class AbstractGoCodegen extends DefaultCodegen implements Codege
public String getSchemaType(Schema p) {
String openAPIType = super.getSchemaType(p);
String ref = p.get$ref();
- String type = null;
+ String type;
if (ref != null && !ref.isEmpty()) {
type = toModelName(openAPIType);
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaCodegen.java
index 4a4c1af61de..662a3d68e80 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaCodegen.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaCodegen.java
@@ -1051,7 +1051,8 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code
schema = ModelUtils.getReferencedSchema(this.openAPI, schema);
if (ModelUtils.isArraySchema(schema)) {
if (schema.getDefault() == null) {
- if (cp.isNullable || containerDefaultToNull) { // nullable or containerDefaultToNull set to true
+ // nullable, optional or containerDefaultToNull set to true
+ if (cp.isNullable || !cp.required || containerDefaultToNull) {
return null;
} else {
if (ModelUtils.isSet(schema)) {
@@ -2286,6 +2287,7 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code
operation.allParams.add(p);
}
}
+ operation.hasParams = !operation.allParams.isEmpty();
}
private boolean shouldBeImplicitHeader(CodegenParameter parameter) {
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractKotlinCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractKotlinCodegen.java
index 023a2b412fe..3a06a5b1127 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractKotlinCodegen.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractKotlinCodegen.java
@@ -44,7 +44,7 @@ import static org.openapitools.codegen.utils.StringUtils.*;
public abstract class AbstractKotlinCodegen extends DefaultCodegen implements CodegenConfig {
- public static final String SERIALIZATION_LIBRARY_DESC = "What serialization library to use: 'moshi' (default), or 'gson' or 'jackson'";
+ public static final String SERIALIZATION_LIBRARY_DESC = "What serialization library to use: 'moshi' (default), or 'gson' or 'jackson or 'kotlinx_serialization'";
public enum SERIALIZATION_LIBRARY_TYPE {moshi, gson, jackson, kotlinx_serialization}
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractTypeScriptClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractTypeScriptClientCodegen.java
index 779a71ccf60..89ac30bb52d 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractTypeScriptClientCodegen.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractTypeScriptClientCodegen.java
@@ -25,10 +25,10 @@ import io.swagger.v3.oas.models.parameters.Parameter;
import org.apache.commons.io.FilenameUtils;
import org.apache.commons.lang3.StringUtils;
import org.checkerframework.checker.nullness.qual.Nullable;
+import org.openapitools.codegen.*;
import org.openapitools.codegen.CodegenConstants.ENUM_PROPERTY_NAMING_TYPE;
import org.openapitools.codegen.CodegenConstants.MODEL_PROPERTY_NAMING_TYPE;
import org.openapitools.codegen.CodegenConstants.PARAM_NAMING_TYPE;
-import org.openapitools.codegen.*;
import org.openapitools.codegen.meta.features.*;
import org.openapitools.codegen.model.ModelMap;
import org.openapitools.codegen.model.ModelsMap;
@@ -46,7 +46,8 @@ import java.util.regex.Pattern;
import java.util.stream.Collectors;
import java.util.stream.Stream;
-import static org.openapitools.codegen.languages.AbstractTypeScriptClientCodegen.ParameterExpander.ParamStyle.*;
+import static org.openapitools.codegen.languages.AbstractTypeScriptClientCodegen.ParameterExpander.ParamStyle.form;
+import static org.openapitools.codegen.languages.AbstractTypeScriptClientCodegen.ParameterExpander.ParamStyle.simple;
import static org.openapitools.codegen.utils.CamelizeOption.LOWERCASE_FIRST_LETTER;
import static org.openapitools.codegen.utils.StringUtils.camelize;
import static org.openapitools.codegen.utils.StringUtils.underscore;
@@ -392,10 +393,7 @@ public abstract class AbstractTypeScriptClientCodegen extends DefaultCodegen imp
setParamNaming((String) additionalProperties.get(CodegenConstants.PARAM_NAMING));
}
- if (additionalProperties.containsKey(CodegenConstants.SUPPORTS_ES6)) {
- setSupportsES6(Boolean.valueOf(additionalProperties.get(CodegenConstants.SUPPORTS_ES6).toString()));
- additionalProperties.put("supportsES6", getSupportsES6());
- }
+ setSupportsES6(convertPropertyToBooleanAndWriteBack(CodegenConstants.SUPPORTS_ES6));
if (additionalProperties.containsKey(NULL_SAFE_ADDITIONAL_PROPS)) {
setNullSafeAdditionalProps(Boolean.valueOf(additionalProperties.get(NULL_SAFE_ADDITIONAL_PROPS).toString()));
@@ -839,7 +837,7 @@ public abstract class AbstractTypeScriptClientCodegen extends DefaultCodegen imp
if ("number".equals(datatype) || "boolean".equals(datatype)) {
return value;
} else {
- return "\'" + escapeText(value) + "\'";
+ return "'" + escapeText(value) + "'";
}
}
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpClientCodegen.java
index 153d9b4b471..4960f7b9219 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpClientCodegen.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpClientCodegen.java
@@ -123,8 +123,10 @@ public class CSharpClientCodegen extends AbstractCSharpCodegen {
typeMapping.put("boolean", "bool");
typeMapping.put("integer", "int");
- typeMapping.put("float", "float");
typeMapping.put("long", "long");
+ typeMapping.put("UnsignedInteger", "uint");
+ typeMapping.put("UnsignedLong", "ulong");
+ typeMapping.put("float", "float");
typeMapping.put("double", "double");
typeMapping.put("number", "decimal");
typeMapping.put("decimal", "decimal");
@@ -789,7 +791,8 @@ public class CSharpClientCodegen extends AbstractCSharpCodegen {
}
// number
- if (datatype.startsWith("int") || datatype.startsWith("long") ||
+ if (datatype.startsWith("int") || datatype.startsWith("uint") ||
+ datatype.startsWith("ulong") || datatype.startsWith("long") ||
datatype.startsWith("double") || datatype.startsWith("float")) {
String varName = "NUMBER_" + value;
varName = varName.replaceAll("-", "MINUS_");
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpDotNet2ClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpDotNet2ClientCodegen.java
deleted file mode 100644
index d9b2f5d5c22..00000000000
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpDotNet2ClientCodegen.java
+++ /dev/null
@@ -1,160 +0,0 @@
-/*
- * Copyright 2018 OpenAPI-Generator Contributors (https://openapi-generator.tech)
- * Copyright 2018 SmartBear Software
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.openapitools.codegen.languages;
-
-import org.openapitools.codegen.CliOption;
-import org.openapitools.codegen.CodegenConstants;
-import org.openapitools.codegen.CodegenType;
-import org.openapitools.codegen.SupportingFile;
-
-import org.openapitools.codegen.meta.GeneratorMetadata;
-import org.openapitools.codegen.meta.Stability;
-import org.openapitools.codegen.meta.features.DocumentationFeature;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.io.File;
-
-public class CSharpDotNet2ClientCodegen extends AbstractCSharpCodegen {
- private final Logger LOGGER = LoggerFactory.getLogger(CSharpDotNet2ClientCodegen.class);
-
- public static final String CLIENT_PACKAGE = "clientPackage";
- protected String clientPackage = "Org.OpenAPITools.Client";
- protected String apiDocPath = "docs/";
- protected String modelDocPath = "docs/";
-
- public CSharpDotNet2ClientCodegen() {
- super();
-
- modifyFeatureSet(features -> features.includeDocumentationFeatures(DocumentationFeature.Readme));
-
- generatorMetadata = GeneratorMetadata.newBuilder(generatorMetadata)
- .stability(Stability.DEPRECATED)
- .build();
-
- // clear import mapping (from default generator) as C# (2.0) does not use it
- // at the moment
- importMapping.clear();
-
- modelTemplateFiles.put("model.mustache", ".cs");
- apiTemplateFiles.put("api.mustache", ".cs");
-
- setApiPackage(packageName + ".Api");
- setModelPackage(packageName + ".Model");
- setClientPackage(packageName + ".Client");
- setSourceFolder("src" + File.separator + "main" + File.separator + "CsharpDotNet2");
-
- modelDocTemplateFiles.put("model_doc.mustache", ".md");
- apiDocTemplateFiles.put("api_doc.mustache", ".md");
-
- cliOptions.clear();
- cliOptions.add(new CliOption(CodegenConstants.PACKAGE_NAME,
- "C# package name (convention: Camel.Case).")
- .defaultValue(packageName));
- cliOptions.add(new CliOption(CodegenConstants.PACKAGE_VERSION,
- "C# package version.")
- .defaultValue(packageVersion));
- cliOptions.add(new CliOption(CLIENT_PACKAGE,
- "C# client package name (convention: Camel.Case).")
- .defaultValue(clientPackage));
- }
-
- @Override
- public void processOpts() {
- LOGGER.warn("Per Microsoft Product Lifecycle (https://support.microsoft.com/en-us/lifecycle/search?sort=PN&alpha=.NET%20Framework&Filter=FilterNO), support for .NET Framework 2.0 ended in 2011 so there may be security issues using the auto-generated C# 2.0 source code.");
-
- super.processOpts();
-
- if (additionalProperties.containsKey(CLIENT_PACKAGE)) {
- setClientPackage((String) additionalProperties.get(CLIENT_PACKAGE));
- } else {
- additionalProperties.put(CLIENT_PACKAGE, getClientPackage());
- }
-
- final String clientPackage = getClientPackage();
- final String clientPackagePath = clientPackage.replace(".", java.io.File.separator);
-
- additionalProperties.put("apiDocPath", apiDocPath);
- additionalProperties.put("modelDocPath", modelDocPath);
-
- supportingFiles.add(new SupportingFile("Configuration.mustache",
- sourceFolder + File.separator + clientPackagePath, "Configuration.cs"));
- supportingFiles.add(new SupportingFile("ApiClient.mustache",
- sourceFolder + File.separator + clientPackagePath, "ApiClient.cs"));
- supportingFiles.add(new SupportingFile("ApiException.mustache",
- sourceFolder + File.separator + clientPackagePath, "ApiException.cs"));
- supportingFiles.add(new SupportingFile("packages.config.mustache", "vendor", "packages.config"));
- supportingFiles.add(new SupportingFile("compile-mono.sh.mustache", "", "compile-mono.sh"));
- supportingFiles.add(new SupportingFile("README.mustache", "", "README.md"));
- supportingFiles.add(new SupportingFile("gitignore", "", ".gitignore"));
- }
-
- @Override
- public String apiPackage() {
- return packageName + ".Api";
- }
-
- @Override
- public String modelPackage() {
- return packageName + ".Model";
- }
-
- public String getClientPackage() {
- return clientPackage;
- }
-
- public void setClientPackage(String clientPackage) {
- this.clientPackage = clientPackage;
- }
-
- @Override
- public CodegenType getTag() {
- return CodegenType.CLIENT;
- }
-
- @Override
- public String getName() {
- return "csharp-dotnet2";
- }
-
- @Override
- public String getHelp() {
- return "Generates a C# .Net 2.0 client library (beta).";
- }
-
- @Override
- public String apiFileFolder() {
- return outputFolder + File.separator + sourceFolder + File.separator + apiPackage().replace('.', File.separatorChar);
- }
-
- @Override
- public String modelFileFolder() {
- return outputFolder + File.separator + sourceFolder + File.separator + modelPackage().replace('.', File.separatorChar);
- }
-
- @Override
- public String apiDocFileFolder() {
- return outputFolder + File.separator + apiDocPath.replace('/', File.separatorChar);
- }
-
- @Override
- public String modelDocFileFolder() {
- return outputFolder + File.separator + modelDocPath.replace('/', File.separatorChar);
- }
-
-}
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpNetCoreClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpNetCoreClientCodegen.java
index 184df911737..6f2e45208ef 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpNetCoreClientCodegen.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpNetCoreClientCodegen.java
@@ -61,6 +61,7 @@ public class CSharpNetCoreClientCodegen extends AbstractCSharpCodegen {
protected static final String RESTSHARP = "restsharp";
protected static final String HTTPCLIENT = "httpclient";
protected static final String GENERICHOST = "generichost";
+ protected static final String UNITY_WEB_REQUEST = "unityWebRequest";
// Project Variable, determined from target framework. Not intended to be user-settable.
protected static final String TARGET_FRAMEWORK_IDENTIFIER = "targetFrameworkIdentifier";
@@ -100,6 +101,7 @@ public class CSharpNetCoreClientCodegen extends AbstractCSharpCodegen {
protected boolean supportsRetry = Boolean.TRUE;
protected boolean supportsAsync = Boolean.TRUE;
protected boolean netStandard = Boolean.FALSE;
+ protected boolean supportsFileParameters = Boolean.TRUE;
protected boolean validatable = Boolean.TRUE;
protected Map regexModifiers;
@@ -115,6 +117,10 @@ public class CSharpNetCoreClientCodegen extends AbstractCSharpCodegen {
protected boolean needsCustomHttpMethod = false;
protected boolean needsUriBuilder = false;
+ // skip generation of getter for oneOf/anyOf sub-schemas to avoid duplicate getter
+ // when the subschemas are of the same type but with different constraints (e.g. array of string)
+ protected boolean skipOneOfAnyOfGetter = false;
+
public CSharpNetCoreClientCodegen() {
super();
@@ -151,8 +157,10 @@ public class CSharpNetCoreClientCodegen extends AbstractCSharpCodegen {
typeMapping.put("ByteArray", "byte[]");
typeMapping.put("boolean", "bool");
typeMapping.put("integer", "int");
- typeMapping.put("float", "float");
typeMapping.put("long", "long");
+ typeMapping.put("UnsignedInteger", "uint");
+ typeMapping.put("UnsignedLong", "ulong");
+ typeMapping.put("float", "float");
typeMapping.put("double", "double");
typeMapping.put("number", "decimal");
typeMapping.put("decimal", "decimal");
@@ -215,6 +223,14 @@ public class CSharpNetCoreClientCodegen extends AbstractCSharpCodegen {
CodegenConstants.PACKAGE_TAGS_DESC,
this.packageTags);
+ addOption(DATE_FORMAT,
+ "The default Date format (only `generichost` library supports this option).",
+ this.dateFormat);
+
+ addOption(DATETIME_FORMAT,
+ "The default DateTime format (only `generichost` library supports this option).",
+ this.dateTimeFormat);
+
CliOption framework = new CliOption(
CodegenConstants.DOTNET_FRAMEWORK,
CodegenConstants.DOTNET_FRAMEWORK_DESC
@@ -309,12 +325,16 @@ public class CSharpNetCoreClientCodegen extends AbstractCSharpCodegen {
addSwitch(CodegenConstants.USE_ONEOF_DISCRIMINATOR_LOOKUP,
CodegenConstants.USE_ONEOF_DISCRIMINATOR_LOOKUP_DESC,
- this.caseInsensitiveResponseHeaders);
+ this.useOneOfDiscriminatorLookup);
addSwitch(CodegenConstants.CASE_INSENSITIVE_RESPONSE_HEADERS,
CodegenConstants.CASE_INSENSITIVE_RESPONSE_HEADERS_DESC,
this.caseInsensitiveResponseHeaders);
+ addSwitch(CodegenConstants.SKIP_ONEOF_ANYOF_GETTER,
+ CodegenConstants.SKIP_ONEOF_ANYOF_GETTER_DESC,
+ this.skipOneOfAnyOfGetter);
+
regexModifiers = new HashMap<>();
regexModifiers.put('i', "IgnoreCase");
regexModifiers.put('m', "Multiline");
@@ -325,6 +345,8 @@ public class CSharpNetCoreClientCodegen extends AbstractCSharpCodegen {
+ "(Experimental. Subject to breaking changes without notice.)");
supportedLibraries.put(HTTPCLIENT, "HttpClient (https://docs.microsoft.com/en-us/dotnet/api/system.net.http.httpclient) "
+ "(Experimental. Subject to breaking changes without notice.)");
+ supportedLibraries.put(UNITY_WEB_REQUEST, "UnityWebRequest (...) "
+ + "(Experimental. Subject to breaking changes without notice.)");
supportedLibraries.put(RESTSHARP, "RestSharp (https://github.com/restsharp/RestSharp)");
CliOption libraryOption = new CliOption(CodegenConstants.LIBRARY, "HTTP library template (sub-template) to use");
@@ -701,6 +723,10 @@ public class CSharpNetCoreClientCodegen extends AbstractCSharpCodegen {
setLibrary(HTTPCLIENT);
additionalProperties.put("useHttpClient", true);
needsUriBuilder = true;
+ } else if (UNITY_WEB_REQUEST.equals(getLibrary())) {
+ setLibrary(UNITY_WEB_REQUEST);
+ additionalProperties.put("useUnityWebRequest", true);
+ needsUriBuilder = true;
} else {
throw new RuntimeException("Invalid HTTP library " + getLibrary() + ". Only restsharp, httpclient, and generichost are supported.");
}
@@ -780,6 +806,8 @@ public class CSharpNetCoreClientCodegen extends AbstractCSharpCodegen {
syncBooleanProperty(additionalProperties, CodegenConstants.OPTIONAL_METHOD_ARGUMENT, this::setOptionalMethodArgumentFlag, optionalMethodArgumentFlag);
syncBooleanProperty(additionalProperties, CodegenConstants.NON_PUBLIC_API, this::setNonPublicApi, isNonPublicApi());
syncBooleanProperty(additionalProperties, CodegenConstants.USE_ONEOF_DISCRIMINATOR_LOOKUP, this::setUseOneOfDiscriminatorLookup, this.useOneOfDiscriminatorLookup);
+ syncBooleanProperty(additionalProperties, CodegenConstants.SKIP_ONEOF_ANYOF_GETTER, this::setSkipOneOfAnyOfGetter, this.skipOneOfAnyOfGetter);
+ syncBooleanProperty(additionalProperties, "supportsFileParameters", this::setSupportsFileParameters, this.supportsFileParameters);
final String testPackageName = testPackageName();
String packageFolder = sourceFolder + File.separator + packageName;
@@ -816,6 +844,20 @@ public class CSharpNetCoreClientCodegen extends AbstractCSharpCodegen {
addGenericHostSupportingFiles(clientPackageDir, packageFolder, excludeTests, testPackageFolder, testPackageName, modelPackageDir);
additionalProperties.put("apiDocPath", apiDocPath + File.separatorChar + "apis");
additionalProperties.put("modelDocPath", modelDocPath + File.separatorChar + "models");
+ } else if (UNITY_WEB_REQUEST.equals(getLibrary())) {
+ additionalProperties.put(CodegenConstants.VALIDATABLE, false);
+ setValidatable(false);
+ setSupportsRetry(false);
+ setSupportsAsync(true);
+ // Some consoles and tvOS do not support either Application.persistentDataPath or will refuse to
+ // compile/link if you even reference GetTempPath as well.
+ additionalProperties.put("supportsFileParameters", false);
+ setSupportsFileParameters(false);
+
+ addSupportingFiles(clientPackageDir, packageFolder, excludeTests, testPackageFolder, testPackageName, modelPackageDir, authPackageDir);
+
+ supportingFiles.add(new SupportingFile("ConnectionException.mustache", clientPackageDir, "ConnectionException.cs"));
+ supportingFiles.add(new SupportingFile("UnexpectedResponseException.mustache", clientPackageDir, "UnexpectedResponseException.cs"));
} else { //restsharp
addSupportingFiles(clientPackageDir, packageFolder, excludeTests, testPackageFolder, testPackageName, modelPackageDir, authPackageDir);
additionalProperties.put("apiDocPath", apiDocPath);
@@ -827,6 +869,10 @@ public class CSharpNetCoreClientCodegen extends AbstractCSharpCodegen {
supportingFiles.add(new SupportingFile("auth/OAuthFlow.mustache", authPackageDir, "OAuthFlow.cs"));
}
}
+
+ // include the spec in the output
+ supportingFiles.add(new SupportingFile("openapi.mustache", "api", "openapi.yaml"));
+
}
public void setClientPackage(String clientPackage) {
@@ -911,14 +957,24 @@ public class CSharpNetCoreClientCodegen extends AbstractCSharpCodegen {
supportingFiles.add(new SupportingFile("git_push.sh.mustache", "", "git_push.sh"));
supportingFiles.add(new SupportingFile("gitignore.mustache", "", ".gitignore"));
- supportingFiles.add(new SupportingFile("Solution.mustache", "", packageName + ".sln"));
- supportingFiles.add(new SupportingFile("netcore_project.mustache", packageFolder, packageName + ".csproj"));
-
- if (Boolean.FALSE.equals(excludeTests.get())) {
- supportingFiles.add(new SupportingFile("netcore_testproject.mustache", testPackageFolder, testPackageName + ".csproj"));
+ if (UNITY_WEB_REQUEST.equals(getLibrary())) {
+ supportingFiles.add(new SupportingFile("asmdef.mustache", packageFolder, packageName + ".asmdef"));
+ } else {
+ supportingFiles.add(new SupportingFile("Solution.mustache", "", packageName + ".sln"));
+ supportingFiles.add(new SupportingFile("netcore_project.mustache", packageFolder, packageName + ".csproj"));
}
- supportingFiles.add(new SupportingFile("appveyor.mustache", "", "appveyor.yml"));
+ if (Boolean.FALSE.equals(excludeTests.get())) {
+ if (UNITY_WEB_REQUEST.equals(getLibrary())) {
+ supportingFiles.add(new SupportingFile("asmdef_test.mustache", testPackageFolder, testPackageName + ".asmdef"));
+ } else {
+ supportingFiles.add(new SupportingFile("netcore_testproject.mustache", testPackageFolder, testPackageName + ".csproj"));
+ }
+ }
+
+ if (!UNITY_WEB_REQUEST.equals(getLibrary())) {
+ supportingFiles.add(new SupportingFile("appveyor.mustache", "", "appveyor.yml"));
+ }
supportingFiles.add(new SupportingFile("AbstractOpenAPISchema.mustache", modelPackageDir, "AbstractOpenAPISchema.cs"));
}
@@ -1048,6 +1104,10 @@ public class CSharpNetCoreClientCodegen extends AbstractCSharpCodegen {
this.supportsAsync = supportsAsync;
}
+ public void setSupportsFileParameters(Boolean supportsFileParameters) {
+ this.supportsFileParameters = supportsFileParameters;
+ }
+
public void setSupportsRetry(Boolean supportsRetry) {
this.supportsRetry = supportsRetry;
}
@@ -1127,6 +1187,14 @@ public class CSharpNetCoreClientCodegen extends AbstractCSharpCodegen {
return this.useOneOfDiscriminatorLookup;
}
+ public void setSkipOneOfAnyOfGetter(boolean skipOneOfAnyOfGetter) {
+ this.skipOneOfAnyOfGetter = skipOneOfAnyOfGetter;
+ }
+
+ public boolean getSkipOneOfAnyOfGetter() {
+ return this.skipOneOfAnyOfGetter;
+ }
+
@Override
public String toEnumVarName(String value, String datatype) {
if (value.length() == 0) {
@@ -1139,7 +1207,8 @@ public class CSharpNetCoreClientCodegen extends AbstractCSharpCodegen {
}
// number
- if (datatype.startsWith("int") || datatype.startsWith("long") ||
+ if (datatype.startsWith("int") || datatype.startsWith("uint") ||
+ datatype.startsWith("long") || datatype.startsWith("ulong") ||
datatype.startsWith("double") || datatype.startsWith("float")) {
String varName = "NUMBER_" + value;
varName = varName.replaceAll("-", "MINUS_");
@@ -1593,4 +1662,10 @@ public class CSharpNetCoreClientCodegen extends AbstractCSharpCodegen {
// process 'additionalProperties'
setAddProps(schema, m);
}
+
+ @Override
+ public Map postProcessSupportingFileData(Map objs) {
+ generateYAMLSpecFile(objs);
+ return objs;
+ }
}
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartDioClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartDioClientCodegen.java
index 4cc8fddad64..6d127c990f5 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartDioClientCodegen.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartDioClientCodegen.java
@@ -337,12 +337,6 @@ public class DartDioClientCodegen extends AbstractDartCodegen {
objs = super.postProcessModels(objs);
List models = objs.getModels();
ProcessUtils.addIndexToProperties(models, 1);
-
- for (ModelMap mo : models) {
- CodegenModel cm = mo.getModel();
- cm.imports = rewriteImports(cm.imports, true);
- cm.vendorExtensions.put("x-has-vars", !cm.vars.isEmpty());
- }
return objs;
}
@@ -583,6 +577,16 @@ public class DartDioClientCodegen extends AbstractDartCodegen {
adaptToDartInheritance(objs);
syncRootTypesWithInnerVars(objs);
}
+
+ // loop through models to update the imports
+ for (ModelsMap entry : objs.values()) {
+ for (ModelMap mo : entry.getModels()) {
+ CodegenModel cm = mo.getModel();
+ cm.imports = rewriteImports(cm.imports, true);
+ cm.vendorExtensions.put("x-has-vars", !cm.vars.isEmpty());
+ }
+ }
+
return objs;
}
@@ -730,6 +734,10 @@ public class DartDioClientCodegen extends AbstractDartCodegen {
resultImports.add(i);
} else if (importMapping().containsKey(modelImport)) {
resultImports.add(importMapping().get(modelImport));
+ } else if (modelImport.startsWith("dart:")) { // import dart:* directly
+ resultImports.add(modelImport);
+ } else if (modelImport.startsWith("package:")) { // e.g. package:openapi/src/model/child.dart
+ resultImports.add(modelImport);
} else {
resultImports.add("package:" + pubName + "/" + sourceFolder + "/" + modelPackage() + "/" + underscore(modelImport) + ".dart");
}
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoClientCodegen.java
index c9f45740d3a..ad4aa914a21 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoClientCodegen.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoClientCodegen.java
@@ -71,6 +71,7 @@ public class GoClientCodegen extends AbstractGoCodegen {
.wireFormatFeatures(EnumSet.of(WireFormatFeature.JSON, WireFormatFeature.XML))
.securityFeatures(EnumSet.of(
SecurityFeature.BasicAuth,
+ SecurityFeature.BearerToken,
SecurityFeature.ApiKey,
SecurityFeature.OAuth2_Implicit
))
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaJAXRSCXFCDIServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaJAXRSCXFCDIServerCodegen.java
index 4bb58c88e50..b6dd22cbfd3 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaJAXRSCXFCDIServerCodegen.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaJAXRSCXFCDIServerCodegen.java
@@ -50,6 +50,8 @@ public class JavaJAXRSCXFCDIServerCodegen extends JavaJAXRSSpecServerCodegen imp
// Use standard types
typeMapping.put("DateTime", "java.util.Date");
+ typeMapping.put("binary", "java.io.InputStream");
+ typeMapping.put("file", "java.io.InputStream");
// Updated template directory
embeddedTemplateDir = templateDir = JAXRS_TEMPLATE_DIRECTORY_NAME + File.separator + "cxf-cdi";
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaMicronautClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaMicronautClientCodegen.java
index 9e8d2140fdc..cdf8b8a1fcf 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaMicronautClientCodegen.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaMicronautClientCodegen.java
@@ -13,12 +13,20 @@ import org.openapitools.codegen.meta.Stability;
public class JavaMicronautClientCodegen extends JavaMicronautAbstractCodegen {
public static final String OPT_CONFIGURE_AUTH = "configureAuth";
+ public static final String OPT_CONFIGURE_AUTH_FILTER_PATTERN = "configureAuthFilterPattern";
+ public static final String OPT_CONFIGURE_CLIENT_ID = "configureClientId";
public static final String ADDITIONAL_CLIENT_TYPE_ANNOTATIONS = "additionalClientTypeAnnotations";
+ public static final String AUTHORIZATION_FILTER_PATTERN = "authorizationFilterPattern";
+ public static final String BASE_PATH_SEPARATOR = "basePathSeparator";
+ public static final String CLIENT_ID = "clientId";
public static final String NAME = "java-micronaut-client";
protected boolean configureAuthorization;
protected List additionalClientTypeAnnotations;
+ protected String authorizationFilterPattern;
+ protected String basePathSeparator = "-";
+ protected String clientId;
public JavaMicronautClientCodegen() {
super();
@@ -33,6 +41,9 @@ public class JavaMicronautClientCodegen extends JavaMicronautAbstractCodegen {
cliOptions.add(CliOption.newBoolean(OPT_CONFIGURE_AUTH, "Configure all the authorization methods as specified in the file", configureAuthorization));
cliOptions.add(CliOption.newString(ADDITIONAL_CLIENT_TYPE_ANNOTATIONS, "Additional annotations for client type(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)"));
+ cliOptions.add(CliOption.newString(AUTHORIZATION_FILTER_PATTERN, "Configure the authorization filter pattern for the client. Generally defined when generating clients from multiple specification files"));
+ cliOptions.add(CliOption.newString(BASE_PATH_SEPARATOR, "Configure the separator to use between the application name and base path when referencing the property").defaultValue(basePathSeparator));
+ cliOptions.add(CliOption.newString(CLIENT_ID, "Configure the service ID for the Client"));
}
@Override
@@ -66,6 +77,14 @@ public class JavaMicronautClientCodegen extends JavaMicronautAbstractCodegen {
// Write property that is present in server
writePropertyBack(OPT_USE_AUTH, true);
+ writePropertyBack(OPT_CONFIGURE_AUTH_FILTER_PATTERN, false);
+ writePropertyBack(OPT_CONFIGURE_CLIENT_ID, false);
+
+ if(additionalProperties.containsKey(BASE_PATH_SEPARATOR)) {
+ basePathSeparator = additionalProperties.get(BASE_PATH_SEPARATOR).toString();
+ }
+ writePropertyBack(BASE_PATH_SEPARATOR, basePathSeparator);
+
final String invokerFolder = (sourceFolder + '/' + invokerPackage).replace(".", "/");
// Authorization files
@@ -79,6 +98,12 @@ public class JavaMicronautClientCodegen extends JavaMicronautAbstractCodegen {
supportingFiles.add(new SupportingFile("client/auth/configuration/ApiKeyAuthConfiguration.mustache", authConfigurationFolder, "ApiKeyAuthConfiguration.java"));
supportingFiles.add(new SupportingFile("client/auth/configuration/ConfigurableAuthorization.mustache", authConfigurationFolder, "ConfigurableAuthorization.java"));
supportingFiles.add(new SupportingFile("client/auth/configuration/HttpBasicAuthConfiguration.mustache", authConfigurationFolder, "HttpBasicAuthConfiguration.java"));
+
+ if (additionalProperties.containsKey(AUTHORIZATION_FILTER_PATTERN)) {
+ String pattern = additionalProperties.get(AUTHORIZATION_FILTER_PATTERN).toString();
+ this.setAuthorizationFilterPattern(pattern);
+ additionalProperties.put(AUTHORIZATION_FILTER_PATTERN, authorizationFilterPattern);
+ }
}
if (additionalProperties.containsKey(ADDITIONAL_CLIENT_TYPE_ANNOTATIONS)) {
@@ -87,6 +112,18 @@ public class JavaMicronautClientCodegen extends JavaMicronautAbstractCodegen {
additionalProperties.put(ADDITIONAL_CLIENT_TYPE_ANNOTATIONS, additionalClientTypeAnnotations);
}
+ if (additionalProperties.containsKey(CLIENT_ID)) {
+ String id = additionalProperties.get(CLIENT_ID).toString();
+ this.setClientId(id);
+ additionalProperties.put(CLIENT_ID, clientId);
+ }
+
+ if (additionalProperties.containsKey(BASE_PATH_SEPARATOR)) {
+ String separator = additionalProperties.get(BASE_PATH_SEPARATOR).toString();
+ this.setBasePathSeparator(separator);
+ additionalProperties.put(BASE_PATH_SEPARATOR, basePathSeparator);
+ }
+
// Api file
apiTemplateFiles.clear();
apiTemplateFiles.put("client/api.mustache", ".java");
@@ -109,4 +146,18 @@ public class JavaMicronautClientCodegen extends JavaMicronautAbstractCodegen {
public void setAdditionalClientTypeAnnotations(final List additionalClientTypeAnnotations) {
this.additionalClientTypeAnnotations = additionalClientTypeAnnotations;
}
+
+ public void setAuthorizationFilterPattern(final String pattern) {
+ writePropertyBack(OPT_CONFIGURE_AUTH_FILTER_PATTERN, true);
+ this.authorizationFilterPattern = pattern;
+ }
+
+ public void setClientId(final String id) {
+ writePropertyBack(OPT_CONFIGURE_CLIENT_ID, true);
+ this.clientId = id;
+ }
+
+ public void setBasePathSeparator(final String separator) {
+ this.basePathSeparator = separator;
+ }
}
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinClientCodegen.java
index 994b4b052cc..447e1c1f889 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinClientCodegen.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinClientCodegen.java
@@ -74,6 +74,7 @@ public class KotlinClientCodegen extends AbstractKotlinCodegen {
public static final String ROOM_MODEL_PACKAGE = "roomModelPackage";
public static final String OMIT_GRADLE_PLUGIN_VERSIONS = "omitGradlePluginVersions";
public static final String OMIT_GRADLE_WRAPPER = "omitGradleWrapper";
+ public static final String USE_SETTINGS_GRADLE = "useSettingsGradle";
public static final String IDEA = "idea";
public static final String DATE_LIBRARY = "dateLibrary";
@@ -238,6 +239,7 @@ public class KotlinClientCodegen extends AbstractKotlinCodegen {
cliOptions.add(CliOption.newBoolean(USE_COROUTINES, "Whether to use the Coroutines adapter with the retrofit2 library."));
cliOptions.add(CliOption.newBoolean(OMIT_GRADLE_PLUGIN_VERSIONS, "Whether to declare Gradle plugin versions in build files."));
cliOptions.add(CliOption.newBoolean(OMIT_GRADLE_WRAPPER, "Whether to omit Gradle wrapper for creating a sub project."));
+ cliOptions.add(CliOption.newBoolean(USE_SETTINGS_GRADLE, "Whether the project uses settings.gradle."));
cliOptions.add(CliOption.newBoolean(IDEA, "Add IntellJ Idea plugin and mark Kotlin main and test folders as source folders."));
cliOptions.add(CliOption.newBoolean(MOSHI_CODE_GEN, "Whether to enable codegen with the Moshi library. Refer to the [official Moshi doc](https://github.com/square/moshi#codegen) for more info."));
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinSpringServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinSpringServerCodegen.java
index 266cb6ccbad..2be4589572a 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinSpringServerCodegen.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinSpringServerCodegen.java
@@ -66,6 +66,7 @@ public class KotlinSpringServerCodegen extends AbstractKotlinCodegen
public static final String GRADLE_BUILD_FILE = "gradleBuildFile";
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 REACTIVE = "reactive";
public static final String INTERFACE_ONLY = "interfaceOnly";
public static final String DELEGATE_PATTERN = "delegatePattern";
@@ -79,6 +80,7 @@ public class KotlinSpringServerCodegen extends AbstractKotlinCodegen
private String serverPort = "8080";
private String title = "OpenAPI Kotlin Spring";
private boolean useBeanValidation = true;
+ private boolean skipDefaultInterface = false;
private boolean exceptionHandler = true;
private boolean gradleBuildFile = true;
private boolean useSwaggerUI = true;
@@ -153,6 +155,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(REACTIVE, "use coroutines for reactive behavior", reactive);
addSwitch(INTERFACE_ONLY, "Whether to generate only API interface stubs without the server files.", interfaceOnly);
addSwitch(DELEGATE_PATTERN, "Whether to generate the server files using the delegate pattern", delegatePattern);
@@ -334,6 +337,10 @@ public class KotlinSpringServerCodegen extends AbstractKotlinCodegen
this.useBeanValidation = useBeanValidation;
}
+ public void setSkipDefaultInterface(boolean skipDefaultInterface) {
+ this.skipDefaultInterface = skipDefaultInterface;
+ }
+
public boolean isReactive() {
return reactive;
}
@@ -492,6 +499,11 @@ public class KotlinSpringServerCodegen extends AbstractKotlinCodegen
}
writePropertyBack(USE_BEANVALIDATION, useBeanValidation);
+ if (additionalProperties.containsKey(SKIP_DEFAULT_INTERFACE)) {
+ this.setSkipDefaultInterface(convertPropertyToBoolean(SKIP_DEFAULT_INTERFACE));
+ }
+ writePropertyBack(SKIP_DEFAULT_INTERFACE, skipDefaultInterface);
+
if (additionalProperties.containsKey(REACTIVE) && library.equals(SPRING_BOOT)) {
this.setReactive(convertPropertyToBoolean(REACTIVE));
// spring webflux doesn't support @ControllerAdvice
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientCodegen.java
index 3eecc392a80..d1184714668 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientCodegen.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientCodegen.java
@@ -2438,8 +2438,17 @@ public class PythonClientCodegen extends AbstractPythonCodegen {
if (m.discriminator == null && innerSchema.getDiscriminator() != null) {
LOGGER.debug("discriminator is set to null (not correctly set earlier): {}", m.name);
m.setDiscriminator(createDiscriminator(m.name, innerSchema, this.openAPI));
+ // directly include the function `addDiscriminatorMappedModelsImports` inline below
+ // as the function has been updated
+ //m.addDiscriminatorMappedModelsImports();
if (!this.getLegacyDiscriminatorBehavior()) {
- m.addDiscriminatorMappedModelsImports();
+ if (m.discriminator != null && m.discriminator.getMappedModels() != null) {
+ for (CodegenDiscriminator.MappedModel mm : m.discriminator.getMappedModels()) {
+ if (!"".equals(mm.getModelName())) {
+ m.getImports().add(mm.getModelName());
+ }
+ }
+ }
}
modelDiscriminators++;
}
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonNextgenClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonNextgenClientCodegen.java
index 5f29c5c909a..4c83af570fa 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonNextgenClientCodegen.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonNextgenClientCodegen.java
@@ -47,25 +47,28 @@ public class PythonNextgenClientCodegen extends AbstractPythonCodegen implements
public static final String PACKAGE_URL = "packageUrl";
public static final String DEFAULT_LIBRARY = "urllib3";
public static final String RECURSION_LIMIT = "recursionLimit";
- public static final String ALLOW_STRING_IN_DATETIME_PARAMETERS = "allowStringInDateTimeParameters";
- public static final String FLOAT_STRICT_TYPE = "floatStrictType";
public static final String DATETIME_FORMAT = "datetimeFormat";
public static final String DATE_FORMAT = "dateFormat";
+ public static final String MAP_NUMBER_TO = "mapNumberTo";
protected String packageUrl;
protected String apiDocPath = "docs" + File.separator;
protected String modelDocPath = "docs" + File.separator;
protected boolean hasModelsToImport = Boolean.FALSE;
protected boolean useOneOfDiscriminatorLookup = false; // use oneOf discriminator's mapping for model lookup
- protected boolean allowStringInDateTimeParameters = false; // use StrictStr instead of datetime in parameters
- protected boolean floatStrictType = true;
protected String datetimeFormat = "%Y-%m-%dT%H:%M:%S.%f%z";
protected String dateFormat = "%Y-%m-%d";
+ protected String mapNumberTo = "Union[StrictFloat, StrictInt]";
protected Map regexModifiers;
private String testFolder;
+ // map of set (model imports)
+ private HashMap> circularImports = new HashMap<>();
+ // map of codegen models
+ private HashMap codegenModelMap = new HashMap<>();
+
public PythonNextgenClientCodegen() {
super();
@@ -110,11 +113,15 @@ public class PythonNextgenClientCodegen extends AbstractPythonCodegen implements
typeMapping.put("array", "List");
typeMapping.put("set", "List");
typeMapping.put("map", "Dict");
- typeMapping.put("file", "str");
typeMapping.put("decimal", "decimal.Decimal");
+ typeMapping.put("file", "bytearray");
+ typeMapping.put("binary", "bytearray");
+ typeMapping.put("ByteArray", "bytearray");
languageSpecificPrimitives.remove("file");
languageSpecificPrimitives.add("decimal.Decimal");
+ languageSpecificPrimitives.add("bytearray");
+ languageSpecificPrimitives.add("none_type");
supportsInheritance = true;
modelPackage = "models";
@@ -172,10 +179,8 @@ public class PythonNextgenClientCodegen extends AbstractPythonCodegen implements
cliOptions.add(new CliOption(CodegenConstants.SOURCECODEONLY_GENERATION, CodegenConstants.SOURCECODEONLY_GENERATION_DESC)
.defaultValue(Boolean.FALSE.toString()));
cliOptions.add(new CliOption(RECURSION_LIMIT, "Set the recursion limit. If not set, use the system default value."));
- cliOptions.add(new CliOption(ALLOW_STRING_IN_DATETIME_PARAMETERS, "Allow string as input to datetime/date parameters for backward compartibility.")
- .defaultValue(Boolean.FALSE.toString()));
- cliOptions.add(new CliOption(FLOAT_STRICT_TYPE, "Use strict type for float, i.e. StrictFloat or confloat(strict=true, ...)")
- .defaultValue(Boolean.TRUE.toString()));
+ cliOptions.add(new CliOption(MAP_NUMBER_TO, "Map number to Union[StrictFloat, StrictInt], StrictStr or float.")
+ .defaultValue("Union[StrictFloat, StrictInt]"));
cliOptions.add(new CliOption(DATETIME_FORMAT, "datetime format for query parameters")
.defaultValue("%Y-%m-%dT%H:%M:%S%z"));
cliOptions.add(new CliOption(DATE_FORMAT, "date format for query parameters")
@@ -278,12 +283,8 @@ public class PythonNextgenClientCodegen extends AbstractPythonCodegen implements
additionalProperties.put(CodegenConstants.USE_ONEOF_DISCRIMINATOR_LOOKUP, useOneOfDiscriminatorLookup);
}
- if (additionalProperties.containsKey(ALLOW_STRING_IN_DATETIME_PARAMETERS)) {
- setAllowStringInDateTimeParameters(convertPropertyToBooleanAndWriteBack(ALLOW_STRING_IN_DATETIME_PARAMETERS));
- }
-
- if (additionalProperties.containsKey(FLOAT_STRICT_TYPE)) {
- setFloatStrictType(convertPropertyToBooleanAndWriteBack(FLOAT_STRICT_TYPE));
+ if (additionalProperties.containsKey(MAP_NUMBER_TO)) {
+ setMapNumberTo(String.valueOf(additionalProperties.get(MAP_NUMBER_TO)));
}
if (additionalProperties.containsKey(DATETIME_FORMAT)) {
@@ -321,6 +322,7 @@ public class PythonNextgenClientCodegen extends AbstractPythonCodegen implements
supportingFiles.add(new SupportingFile("github-workflow.mustache", ".github/workflows", "python.yml"));
supportingFiles.add(new SupportingFile("gitlab-ci.mustache", "", ".gitlab-ci.yml"));
supportingFiles.add(new SupportingFile("setup.mustache", "", "setup.py"));
+ supportingFiles.add(new SupportingFile("pyproject.mustache", "", "pyproject.toml"));
}
supportingFiles.add(new SupportingFile("configuration.mustache", packagePath(), "configuration.py"));
supportingFiles.add(new SupportingFile("__init__package.mustache", packagePath(), "__init__.py"));
@@ -411,6 +413,8 @@ public class PythonNextgenClientCodegen extends AbstractPythonCodegen implements
* @param typingImports typing imports
* @param pydantic pydantic imports
* @param datetimeImports datetime imports
+ * @param modelImports model imports
+ * @param classname class name
* @return pydantic type
*
*/
@@ -418,12 +422,13 @@ public class PythonNextgenClientCodegen extends AbstractPythonCodegen implements
Set typingImports,
Set pydanticImports,
Set datetimeImports,
- Set modelImports) {
+ Set modelImports,
+ String classname) {
if (cp == null) {
// if codegen parameter (e.g. map/dict of undefined type) is null, default to string
- LOGGER.warn("Codegen property is null (e.g. map/dict of undefined type). Default to string (StrictStr in Pydantic)");
- pydanticImports.add("StrictStr");
- return "StrictStr";
+ LOGGER.warn("Codegen property is null (e.g. map/dict of undefined type). Default to typing.Any.");
+ typingImports.add("Any");
+ return "Any";
}
if (cp.isArray) {
@@ -439,11 +444,12 @@ public class PythonNextgenClientCodegen extends AbstractPythonCodegen implements
}
pydanticImports.add("conlist");
return String.format(Locale.ROOT, "conlist(%s%s)",
- getPydanticType(cp.items, typingImports, pydanticImports, datetimeImports, modelImports),
+ getPydanticType(cp.items, typingImports, pydanticImports, datetimeImports, modelImports, classname),
constraints);
} else if (cp.isMap) {
typingImports.add("Dict");
- return String.format(Locale.ROOT, "Dict[str, %s]", getPydanticType(cp.items, typingImports, pydanticImports, datetimeImports, modelImports));
+ return String.format(Locale.ROOT, "Dict[str, %s]",
+ getPydanticType(cp.items, typingImports, pydanticImports, datetimeImports, modelImports, classname));
} else if (cp.isString || cp.isBinary || cp.isByteArray) {
if (cp.hasValidation) {
List fieldCustomization = new ArrayList<>();
@@ -474,34 +480,59 @@ public class PythonNextgenClientCodegen extends AbstractPythonCodegen implements
} else if (cp.isNumber || cp.isFloat || cp.isDouble) {
if (cp.hasValidation) {
List fieldCustomization = new ArrayList<>();
+ List intFieldCustomization = new ArrayList<>();
+
// e.g. confloat(ge=10, le=100, strict=True)
if (cp.getMaximum() != null) {
if (cp.getExclusiveMaximum()) {
- fieldCustomization.add("gt=" + cp.getMaximum());
+ fieldCustomization.add("lt=" + cp.getMaximum());
+ intFieldCustomization.add("lt=" + Math.ceil(Double.valueOf(cp.getMaximum()))); // e.g. < 7.59 becomes < 8
} else {
- fieldCustomization.add("ge=" + cp.getMaximum());
+ fieldCustomization.add("le=" + cp.getMaximum());
+ intFieldCustomization.add("le=" + Math.floor(Double.valueOf(cp.getMaximum()))); // e.g. <= 7.59 becomes <= 7
}
}
if (cp.getMinimum() != null) {
if (cp.getExclusiveMinimum()) {
- fieldCustomization.add("lt=" + cp.getMinimum());
+ fieldCustomization.add("gt=" + cp.getMinimum());
+ intFieldCustomization.add("gt=" + Math.floor(Double.valueOf(cp.getMinimum()))); // e.g. > 7.59 becomes > 7
} else {
- fieldCustomization.add("le=" + cp.getMinimum());
+ fieldCustomization.add("ge=" + cp.getMinimum());
+ intFieldCustomization.add("ge=" + Math.ceil(Double.valueOf(cp.getMinimum()))); // e.g. >= 7.59 becomes >= 8
}
}
if (cp.getMultipleOf() != null) {
fieldCustomization.add("multiple_of=" + cp.getMultipleOf());
}
- if (floatStrictType) {
+ if ("Union[StrictFloat, StrictInt]".equals(mapNumberTo)) {
fieldCustomization.add("strict=True");
+ intFieldCustomization.add("strict=True");
+ pydanticImports.add("confloat");
+ pydanticImports.add("conint");
+ typingImports.add("Union");
+ return String.format(Locale.ROOT, "Union[%s(%s), %s(%s)]", "confloat",
+ StringUtils.join(fieldCustomization, ", "),
+ "conint",
+ StringUtils.join(intFieldCustomization, ", ")
+ );
+ } else if ("StrictFloat".equals(mapNumberTo)) {
+ fieldCustomization.add("strict=True");
+ pydanticImports.add("confloat");
+ return String.format(Locale.ROOT, "%s(%s)", "confloat",
+ StringUtils.join(fieldCustomization, ", "));
+ } else { // float
+ pydanticImports.add("confloat");
+ return String.format(Locale.ROOT, "%s(%s)", "confloat",
+ StringUtils.join(fieldCustomization, ", "));
}
-
- pydanticImports.add("confloat");
- return String.format(Locale.ROOT, "%s(%s)", "confloat",
- StringUtils.join(fieldCustomization, ", "));
} else {
- if (floatStrictType) {
+ if ("Union[StrictFloat, StrictInt]".equals(mapNumberTo)) {
+ typingImports.add("Union");
+ pydanticImports.add("StrictFloat");
+ pydanticImports.add("StrictInt");
+ return "Union[StrictFloat, StrictInt]";
+ } else if ("StrictFloat".equals(mapNumberTo)) {
pydanticImports.add("StrictFloat");
return "StrictFloat";
} else {
@@ -601,13 +632,7 @@ public class PythonNextgenClientCodegen extends AbstractPythonCodegen implements
datetimeImports.add("datetime");
}
- if (allowStringInDateTimeParameters) {
- pydanticImports.add("StrictStr");
- typingImports.add("Union");
- return String.format(Locale.ROOT, "Union[StrictStr, %s]", cp.dataType);
- } else {
- return cp.dataType;
- }
+ return cp.dataType;
} else if (cp.isUuid) {
return cp.dataType;
} else if (cp.isFreeFormObject) { // type: object
@@ -625,7 +650,7 @@ public class PythonNextgenClientCodegen extends AbstractPythonCodegen implements
CodegenMediaType cmt = contents.get(key);
// TODO process the first one only at the moment
if (cmt != null)
- return getPydanticType(cmt.getSchema(), typingImports, pydanticImports, datetimeImports, modelImports);
+ return getPydanticType(cmt.getSchema(), typingImports, pydanticImports, datetimeImports, modelImports, classname);
}
throw new RuntimeException("Error! Failed to process getPydanticType when getting the content: " + cp);
} else {
@@ -640,6 +665,8 @@ public class PythonNextgenClientCodegen extends AbstractPythonCodegen implements
* @param typingImports typing imports
* @param pydantic pydantic imports
* @param datetimeImports datetime imports
+ * @param modelImports model imports
+ * @param classname class name
* @return pydantic type
*
*/
@@ -647,12 +674,13 @@ public class PythonNextgenClientCodegen extends AbstractPythonCodegen implements
Set typingImports,
Set pydanticImports,
Set datetimeImports,
- Set modelImports) {
+ Set modelImports,
+ String classname) {
if (cp == null) {
// if codegen property (e.g. map/dict of undefined type) is null, default to string
- LOGGER.warn("Codegen property is null (e.g. map/dict of undefined type). Default to string (StrictStr in Pydantic)");
- pydanticImports.add("StrictStr");
- return "StrictStr";
+ LOGGER.warn("Codegen property is null (e.g. map/dict of undefined type). Default to typing.Any.");
+ typingImports.add("Any");
+ return "Any";
}
if (cp.isEnum) {
@@ -687,11 +715,11 @@ public class PythonNextgenClientCodegen extends AbstractPythonCodegen implements
pydanticImports.add("conlist");
typingImports.add("List"); // for return type
return String.format(Locale.ROOT, "conlist(%s%s)",
- getPydanticType(cp.items, typingImports, pydanticImports, datetimeImports, modelImports),
+ getPydanticType(cp.items, typingImports, pydanticImports, datetimeImports, modelImports, classname),
constraints);
} else if (cp.isMap) {
typingImports.add("Dict");
- return String.format(Locale.ROOT, "Dict[str, %s]", getPydanticType(cp.items, typingImports, pydanticImports, datetimeImports, modelImports));
+ return String.format(Locale.ROOT, "Dict[str, %s]", getPydanticType(cp.items, typingImports, pydanticImports, datetimeImports, modelImports, classname));
} else if (cp.isString) {
if (cp.hasValidation) {
List fieldCustomization = new ArrayList<>();
@@ -722,34 +750,59 @@ public class PythonNextgenClientCodegen extends AbstractPythonCodegen implements
} else if (cp.isNumber || cp.isFloat || cp.isDouble) {
if (cp.hasValidation) {
List fieldCustomization = new ArrayList<>();
+ List intFieldCustomization = new ArrayList<>();
+
// e.g. confloat(ge=10, le=100, strict=True)
if (cp.getMaximum() != null) {
if (cp.getExclusiveMaximum()) {
fieldCustomization.add("lt=" + cp.getMaximum());
+ intFieldCustomization.add("lt=" + (int) Math.ceil(Double.valueOf(cp.getMaximum()))); // e.g. < 7.59 => < 8
} else {
fieldCustomization.add("le=" + cp.getMaximum());
+ intFieldCustomization.add("le=" + (int) Math.floor(Double.valueOf(cp.getMaximum()))); // e.g. <= 7.59 => <= 7
}
}
if (cp.getMinimum() != null) {
if (cp.getExclusiveMinimum()) {
fieldCustomization.add("gt=" + cp.getMinimum());
+ intFieldCustomization.add("gt=" + (int) Math.floor(Double.valueOf(cp.getMinimum()))); // e.g. > 7.59 => > 7
} else {
fieldCustomization.add("ge=" + cp.getMinimum());
+ intFieldCustomization.add("ge=" + (int) Math.ceil(Double.valueOf(cp.getMinimum()))); // e.g. >= 7.59 => >= 8
}
}
if (cp.getMultipleOf() != null) {
fieldCustomization.add("multiple_of=" + cp.getMultipleOf());
}
- if (floatStrictType) {
+ if ("Union[StrictFloat, StrictInt]".equals(mapNumberTo)) {
fieldCustomization.add("strict=True");
+ intFieldCustomization.add("strict=True");
+ pydanticImports.add("confloat");
+ pydanticImports.add("conint");
+ typingImports.add("Union");
+ return String.format(Locale.ROOT, "Union[%s(%s), %s(%s)]", "confloat",
+ StringUtils.join(fieldCustomization, ", "),
+ "conint",
+ StringUtils.join(intFieldCustomization, ", ")
+ );
+ } else if ("StrictFloat".equals(mapNumberTo)) {
+ fieldCustomization.add("strict=True");
+ pydanticImports.add("confloat");
+ return String.format(Locale.ROOT, "%s(%s)", "confloat",
+ StringUtils.join(fieldCustomization, ", "));
+ } else { // float
+ pydanticImports.add("confloat");
+ return String.format(Locale.ROOT, "%s(%s)", "confloat",
+ StringUtils.join(fieldCustomization, ", "));
}
-
- pydanticImports.add("confloat");
- return String.format(Locale.ROOT, "%s(%s)", "confloat",
- StringUtils.join(fieldCustomization, ", "));
} else {
- if (floatStrictType) {
+ if ("Union[StrictFloat, StrictInt]".equals(mapNumberTo)) {
+ typingImports.add("Union");
+ pydanticImports.add("StrictFloat");
+ pydanticImports.add("StrictInt");
+ return "Union[StrictFloat, StrictInt]";
+ } else if ("StrictFloat".equals(mapNumberTo)) {
pydanticImports.add("StrictFloat");
return "StrictFloat";
} else {
@@ -859,10 +912,24 @@ public class PythonNextgenClientCodegen extends AbstractPythonCodegen implements
typingImports.add("Any");
return "Dict[str, Any]";
} else if (!cp.isPrimitiveType || cp.isModel) { // model
- if (!cp.isCircularReference) {
- // skip import if it's a circular reference
+ // skip import if it's a circular reference
+ if (classname == null) {
+ // for parameter model, import directly
hasModelsToImport = true;
modelImports.add(cp.dataType);
+ } else {
+ if (circularImports.containsKey(cp.dataType)) {
+ if (circularImports.get(cp.dataType).contains(classname)) {
+ // cp.dataType import map of set contains this model (classname), don't import
+ LOGGER.debug("Skipped importing {} in {} due to circular import.", cp.dataType, classname);
+ } else {
+ // not circular import, so ok to import it
+ hasModelsToImport = true;
+ modelImports.add(cp.dataType);
+ }
+ } else {
+ LOGGER.error("Failed to look up {} from the imports (map of set) of models.", cp.dataType);
+ }
}
return cp.dataType;
} else {
@@ -884,7 +951,7 @@ public class PythonNextgenClientCodegen extends AbstractPythonCodegen implements
List params = operation.allParams;
for (CodegenParameter param : params) {
- String typing = getPydanticType(param, typingImports, pydanticImports, datetimeImports, modelImports);
+ String typing = getPydanticType(param, typingImports, pydanticImports, datetimeImports, modelImports, null);
List fields = new ArrayList<>();
String firstField = "";
@@ -936,7 +1003,7 @@ public class PythonNextgenClientCodegen extends AbstractPythonCodegen implements
// update typing import for operation return type
if (!StringUtils.isEmpty(operation.returnType)) {
String typing = getPydanticType(operation.returnProperty, typingImports,
- new TreeSet<>() /* skip pydantic import for return type */, datetimeImports, modelImports);
+ new TreeSet<>() /* skip pydantic import for return type */, datetimeImports, modelImports, null);
}
}
@@ -996,6 +1063,18 @@ public class PythonNextgenClientCodegen extends AbstractPythonCodegen implements
@Override
public Map postProcessAllModels(Map objs) {
final Map processed = super.postProcessAllModels(objs);
+
+ for (Map.Entry entry : objs.entrySet()) {
+ // create hash map of codegen model
+ CodegenModel cm = ModelUtils.getModelByName(entry.getKey(), objs);
+ codegenModelMap.put(cm.classname, ModelUtils.getModelByName(entry.getKey(), objs));
+ }
+
+ // create circular import
+ for (String m : codegenModelMap.keySet()) {
+ createImportMapOfSet(m, codegenModelMap);
+ }
+
for (Map.Entry entry : processed.entrySet()) {
entry.setValue(postProcessModelsMap(entry.getValue()));
}
@@ -1003,6 +1082,99 @@ public class PythonNextgenClientCodegen extends AbstractPythonCodegen implements
return processed;
}
+ /**
+ * Update circularImports with the model name (key) and its imports gathered recursively
+ *
+ * @param modelName model name
+ * @param codegenModelMap a map of CodegenModel
+ */
+ void createImportMapOfSet(String modelName, Map codegenModelMap) {
+ HashSet imports = new HashSet<>();
+ circularImports.put(modelName, imports);
+
+ CodegenModel cm = codegenModelMap.get(modelName);
+
+ if (cm == null) {
+ LOGGER.warn("Failed to lookup model in createImportMapOfSet: " + modelName);
+ return;
+ }
+
+ List codegenProperties = null;
+ if (cm.oneOf != null && !cm.oneOf.isEmpty()) { // oneOf
+ codegenProperties = cm.getComposedSchemas().getOneOf();
+ } else if (cm.anyOf != null && !cm.anyOf.isEmpty()) { // anyOF
+ codegenProperties = cm.getComposedSchemas().getAnyOf();
+ } else { // typical model
+ codegenProperties = cm.vars;
+ }
+
+ for (CodegenProperty cp : codegenProperties) {
+ String modelNameFromDataType = getModelNameFromDataType(cp);
+ if (modelNameFromDataType != null) { // model
+ imports.add(modelNameFromDataType); // update import
+ // go through properties or sub-schemas of the model recursively to identify more (model) import if any
+ updateImportsFromCodegenModel(modelNameFromDataType, codegenModelMap.get(modelNameFromDataType), imports);
+ }
+ }
+ }
+
+ /**
+ * Update set of imports from codegen model recursivly
+ *
+ * @param modelName model name
+ * @param cm codegen model
+ * @param imports set of imports
+ */
+ public void updateImportsFromCodegenModel(String modelName, CodegenModel cm, Set imports) {
+ if (cm == null) {
+ LOGGER.warn("Failed to lookup model in createImportMapOfSet " + modelName);
+ return;
+ }
+
+ List codegenProperties = null;
+ if (cm.oneOf != null && !cm.oneOf.isEmpty()) { // oneOfValidationError
+ codegenProperties = cm.getComposedSchemas().getOneOf();
+ } else if (cm.anyOf != null && !cm.anyOf.isEmpty()) { // anyOF
+ codegenProperties = cm.getComposedSchemas().getAnyOf();
+ } else { // typical model
+ codegenProperties = cm.vars;
+ }
+
+ for (CodegenProperty cp : codegenProperties) {
+ String modelNameFromDataType = getModelNameFromDataType(cp);
+ if (modelNameFromDataType != null) { // model
+ if (modelName.equals(modelNameFromDataType)) { // self referencing
+ continue;
+ } else if (imports.contains(modelNameFromDataType)) { // circular import
+ continue;
+ } else {
+ imports.add(modelNameFromDataType); // update import
+ // go through properties of the model recursively to identify more (model) import if any
+ updateImportsFromCodegenModel(modelNameFromDataType, codegenModelMap.get(modelNameFromDataType), imports);
+ }
+ }
+ }
+ }
+
+ /**
+ * Returns the model name (if any) from data type of codegen property.
+ * Returns null if it's not a model.
+ *
+ * @param cp Codegen property
+ * @return model name
+ */
+ private String getModelNameFromDataType(CodegenProperty cp) {
+ if (cp.isArray) {
+ return getModelNameFromDataType(cp.items);
+ } else if (cp.isMap) {
+ return getModelNameFromDataType(cp.items);
+ } else if (!cp.isPrimitiveType || cp.isModel) {
+ return cp.dataType;
+ } else {
+ return null;
+ }
+ }
+
private ModelsMap postProcessModelsMap(ModelsMap objs) {
// process enum in models
objs = postProcessModelsEnum(objs);
@@ -1057,7 +1229,7 @@ public class PythonNextgenClientCodegen extends AbstractPythonCodegen implements
//loop through properties/schemas to set up typing, pydantic
for (CodegenProperty cp : codegenProperties) {
- String typing = getPydanticType(cp, typingImports, pydanticImports, datetimeImports, modelImports);
+ String typing = getPydanticType(cp, typingImports, pydanticImports, datetimeImports, modelImports, model.classname);
List fields = new ArrayList<>();
String firstField = "";
@@ -1214,7 +1386,8 @@ public class PythonNextgenClientCodegen extends AbstractPythonCodegen implements
}
}
- vendorExtensions.put("x-regex", regex);
+ vendorExtensions.put("x-regex", regex.replace("\"", "\\\""));
+ vendorExtensions.put("x-pattern", pattern.replace("\"", "\\\""));
vendorExtensions.put("x-modifiers", modifiers);
}
}
@@ -1408,12 +1581,14 @@ public class PythonNextgenClientCodegen extends AbstractPythonCodegen implements
return "var_" + name;
}
- public void setAllowStringInDateTimeParameters(boolean allowStringInDateTimeParameters) {
- this.allowStringInDateTimeParameters = allowStringInDateTimeParameters;
- }
-
- public void setFloatStrictType(boolean floatStrictType) {
- this.floatStrictType = floatStrictType;
+ public void setMapNumberTo(String mapNumberTo) {
+ if ("Union[StrictFloat, StrictInt]".equals(mapNumberTo)
+ || "StrictFloat".equals(mapNumberTo)
+ || "float".equals(mapNumberTo)) {
+ this.mapNumberTo = mapNumberTo;
+ } else {
+ throw new IllegalArgumentException("mapNumberTo value must be Union[StrictFloat, StrictInt], StrictStr or float");
+ }
}
public void setDatetimeFormat(String datetimeFormat) {
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RustClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RustClientCodegen.java
index 2aeefdbac00..fd7c018a1db 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RustClientCodegen.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RustClientCodegen.java
@@ -241,7 +241,7 @@ public class RustClientCodegen extends AbstractRustCodegen implements CodegenCon
discriminatorVars.add(mas);
}
// TODO: figure out how to properly have the original property type that didn't go through toVarName
- String vendorExtensionTagName = cm.discriminator.getPropertyName().replace("_", "");
+ String vendorExtensionTagName = cm.discriminator.getPropertyName();
cm.vendorExtensions.put("x-tag-name", vendorExtensionTagName);
cm.vendorExtensions.put("x-mapped-models", discriminatorVars);
}
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SpringCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SpringCodegen.java
index 6f4ba5b519e..78546738da1 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SpringCodegen.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SpringCodegen.java
@@ -65,6 +65,7 @@ import org.openapitools.codegen.model.ModelsMap;
import org.openapitools.codegen.model.OperationMap;
import org.openapitools.codegen.model.OperationsMap;
import org.openapitools.codegen.templating.mustache.SplitStringLambda;
+import org.openapitools.codegen.templating.mustache.SpringHttpStatusLambda;
import org.openapitools.codegen.templating.mustache.TrimWhitespaceLambda;
import org.openapitools.codegen.utils.URLPathUtils;
import org.slf4j.Logger;
@@ -96,6 +97,7 @@ public class SpringCodegen extends AbstractJavaCodegen
public static final String SINGLE_CONTENT_TYPES = "singleContentTypes";
public static final String VIRTUAL_SERVICE = "virtualService";
public static final String SKIP_DEFAULT_INTERFACE = "skipDefaultInterface";
+ public static final String GENERATE_CONSTRUCTOR_WITH_REQUIRED_ARGS = "generatedConstructorWithRequiredArgs";
public static final String ASYNC = "async";
public static final String REACTIVE = "reactive";
@@ -109,6 +111,7 @@ public class SpringCodegen extends AbstractJavaCodegen
public static final String HATEOAS = "hateoas";
public static final String RETURN_SUCCESS_CODE = "returnSuccessCode";
public static final String UNHANDLED_EXCEPTION_HANDLING = "unhandledException";
+ public static final String USE_RESPONSE_ENTITY = "useResponseEntity";
public static final String USE_SPRING_BOOT3 = "useSpringBoot3";
public static final String REQUEST_MAPPING_OPTION = "requestMappingMode";
public static final String USE_REQUEST_MAPPING_ON_CONTROLLER = "useRequestMappingOnController";
@@ -156,7 +159,9 @@ public class SpringCodegen extends AbstractJavaCodegen
protected boolean unhandledException = false;
protected boolean useSpringController = false;
protected boolean useSwaggerUI = true;
+ protected boolean useResponseEntity = true;
protected boolean useSpringBoot3 = false;
+ protected boolean generatedConstructorWithRequiredArgs = true;
protected RequestMappingMode requestMappingMode = RequestMappingMode.controller;
public SpringCodegen() {
@@ -245,9 +250,16 @@ public class SpringCodegen extends AbstractJavaCodegen
cliOptions.add(CliOption.newBoolean(USE_SWAGGER_UI,
"Open the OpenApi specification in swagger-ui. Will also import and configure needed dependencies",
useSwaggerUI));
+ cliOptions.add(CliOption.newBoolean(USE_RESPONSE_ENTITY,
+ "Use the `ResponseEntity` type to wrap return values of generated API methods. "
+ + "If disabled, method are annotated using a `@ResponseStatus` annotation, which has the status of the first response declared in the Api definition",
+ useResponseEntity));
cliOptions.add(CliOption.newBoolean(USE_SPRING_BOOT3,
"Generate code and provide dependencies for use with Spring Boot 3.x. (Use jakarta instead of javax in imports). Enabling this option will also enable `useJakartaEe`.",
useSpringBoot3));
+ cliOptions.add(CliOption.newBoolean(GENERATE_CONSTRUCTOR_WITH_REQUIRED_ARGS,
+ "Whether to generate constructors with required args for models",
+ generatedConstructorWithRequiredArgs));
supportedLibraries.put(SPRING_BOOT, "Spring-boot Server application.");
supportedLibraries.put(SPRING_CLOUD_LIBRARY,
@@ -457,6 +469,11 @@ public class SpringCodegen extends AbstractJavaCodegen
}
writePropertyBack(SPRING_CONTROLLER, useSpringController);
+ if (additionalProperties.containsKey(GENERATE_CONSTRUCTOR_WITH_REQUIRED_ARGS)) {
+ this.generatedConstructorWithRequiredArgs = convertPropertyToBoolean(GENERATE_CONSTRUCTOR_WITH_REQUIRED_ARGS);
+ }
+ writePropertyBack(GENERATE_CONSTRUCTOR_WITH_REQUIRED_ARGS, generatedConstructorWithRequiredArgs);
+
if (additionalProperties.containsKey(RETURN_SUCCESS_CODE)) {
this.setReturnSuccessCode(Boolean.parseBoolean(additionalProperties.get(RETURN_SUCCESS_CODE).toString()));
}
@@ -477,6 +494,13 @@ public class SpringCodegen extends AbstractJavaCodegen
}
additionalProperties.put(UNHANDLED_EXCEPTION_HANDLING, this.isUnhandledException());
+ if (additionalProperties.containsKey(USE_RESPONSE_ENTITY)) {
+ this.setUseResponseEntity(
+ Boolean.parseBoolean(additionalProperties.get(USE_RESPONSE_ENTITY).toString()));
+ }
+ writePropertyBack(USE_RESPONSE_ENTITY, useResponseEntity);
+ additionalProperties.put("springHttpStatus", new SpringHttpStatusLambda());
+
if (additionalProperties.containsKey(USE_SPRING_BOOT3)) {
this.setUseSpringBoot3(convertPropertyToBoolean(USE_SPRING_BOOT3));
}
@@ -493,6 +517,7 @@ public class SpringCodegen extends AbstractJavaCodegen
}
writePropertyBack(USE_SPRING_BOOT3, isUseSpringBoot3());
+
typeMapping.put("file", "org.springframework.core.io.Resource");
importMapping.put("org.springframework.core.io.Resource", "org.springframework.core.io.Resource");
importMapping.put("Pageable", "org.springframework.data.domain.Pageable");
@@ -1018,6 +1043,10 @@ public class SpringCodegen extends AbstractJavaCodegen
this.unhandledException = unhandledException;
}
+ public void setUseResponseEntity(boolean useResponseEntity) {
+ this.useResponseEntity = useResponseEntity;
+ }
+
@Override
public void postProcessModelProperty(CodegenModel model, CodegenProperty property) {
super.postProcessModelProperty(model, property);
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift5ClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift5ClientCodegen.java
index d2e050e3162..dbfc9045ec7 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift5ClientCodegen.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift5ClientCodegen.java
@@ -143,7 +143,8 @@ public class Swift5ClientCodegen extends DefaultCodegen implements CodegenConfig
"URL",
"AnyObject",
"Any",
- "Decimal")
+ "Decimal",
+ "AnyCodable") // from AnyCodable dependency
);
defaultIncludes = new HashSet<>(
Arrays.asList(
@@ -721,11 +722,11 @@ public class Swift5ClientCodegen extends DefaultCodegen implements CodegenConfig
// FIXME parameter should not be assigned. Also declare it as "final"
name = sanitizeName(name);
- if (!StringUtils.isEmpty(modelNameSuffix)) { // set model suffix
+ if (!StringUtils.isEmpty(modelNameSuffix) && !isLanguageSpecificType(name)) { // set model suffix
name = name + "_" + modelNameSuffix;
}
- if (!StringUtils.isEmpty(modelNamePrefix)) { // set model prefix
+ if (!StringUtils.isEmpty(modelNamePrefix) && !isLanguageSpecificType(name)) { // set model prefix
name = modelNamePrefix + "_" + name;
}
@@ -1072,6 +1073,10 @@ public class Swift5ClientCodegen extends DefaultCodegen implements CodegenConfig
LOWERCASE_FIRST_LETTER);
}
+ private Boolean isLanguageSpecificType(String name) {
+ return languageSpecificPrimitives.contains(name);
+ }
+
private String replaceSpecialCharacters(String name) {
for (Map.Entry specialCharacters : specialCharReplacements.entrySet()) {
String specialChar = specialCharacters.getKey();
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptClientCodegen.java
index 02cc055c6f4..5db48b7c5a9 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptClientCodegen.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptClientCodegen.java
@@ -17,17 +17,12 @@
package org.openapitools.codegen.languages;
+import com.github.curiousoddman.rgxgen.RgxGen;
import com.google.common.collect.Sets;
-
import io.swagger.v3.core.util.Json;
import io.swagger.v3.oas.models.media.*;
-import io.swagger.v3.oas.models.media.MediaType;
-import io.swagger.v3.oas.models.parameters.RequestBody;
-import io.swagger.v3.oas.models.OpenAPI;
-import io.swagger.v3.oas.models.media.ArraySchema;
-import io.swagger.v3.oas.models.media.ComposedSchema;
-import io.swagger.v3.oas.models.media.Schema;
import io.swagger.v3.oas.models.parameters.Parameter;
+import io.swagger.v3.oas.models.parameters.RequestBody;
import org.apache.commons.lang3.StringUtils;
import org.openapitools.codegen.*;
import org.openapitools.codegen.CodegenConstants.ENUM_PROPERTY_NAMING_TYPE;
@@ -41,19 +36,14 @@ import org.openapitools.codegen.model.OperationsMap;
import org.openapitools.codegen.utils.ModelUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import com.github.curiousoddman.rgxgen.RgxGen;
-import com.github.curiousoddman.rgxgen.config.RgxGenOption;
-import com.github.curiousoddman.rgxgen.config.RgxGenProperties;
import java.io.File;
import java.time.OffsetDateTime;
import java.time.ZoneOffset;
import java.time.format.DateTimeFormatter;
-import java.util.regex.Pattern;
-import java.util.regex.Matcher;
-import java.text.SimpleDateFormat;
import java.util.*;
-import java.util.stream.Collectors;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
import static org.openapitools.codegen.utils.CamelizeOption.LOWERCASE_FIRST_LETTER;
import static org.openapitools.codegen.utils.StringUtils.camelize;
@@ -62,21 +52,18 @@ import static org.openapitools.codegen.utils.StringUtils.underscore;
import static org.openapitools.codegen.utils.OnceLogger.once;
-public class TypeScriptClientCodegen extends DefaultCodegen implements CodegenConfig {
+public class TypeScriptClientCodegen extends AbstractTypeScriptClientCodegen implements CodegenConfig {
private final Logger LOGGER = LoggerFactory.getLogger(TypeScriptClientCodegen.class);
- private static final String X_DISCRIMINATOR_TYPE = "x-discriminator-value";
- private static final String UNDEFINED_VALUE = "undefined";
-
private static final String FRAMEWORK_SWITCH = "framework";
private static final String FRAMEWORK_SWITCH_DESC = "Specify the framework which should be used in the client code.";
- private static final String[] FRAMEWORKS = { "fetch-api", "jquery" };
+ private static final String[] FRAMEWORKS = {"fetch-api", "jquery"};
private static final String PLATFORM_SWITCH = "platform";
private static final String PLATFORM_SWITCH_DESC = "Specifies the platform the code should run on. The default is 'node' for the 'request' framework and 'browser' otherwise.";
- private static final String[] PLATFORMS = { "browser", "node", "deno" };
+ private static final String[] PLATFORMS = {"browser", "node", "deno"};
private static final String IMPORT_FILE_EXTENSION_SWITCH = "importFileExtension";
private static final String IMPORT_FILE_EXTENSION_SWITCH_DESC = "File extension to use with relative imports. Set it to '.js' or '.mjs' when using [ESM](https://nodejs.org/api/esm.html). Defaults to '.ts' when 'platform' is set to 'deno'.";
- private static final String FILE_CONTENT_DATA_TYPE= "fileContentDataType";
+ private static final String FILE_CONTENT_DATA_TYPE = "fileContentDataType";
private static final String FILE_CONTENT_DATA_TYPE_DESC = "Specifies the type to use for the content of a file - i.e. Blob (Browser, Deno) / Buffer (node)";
private static final String USE_RXJS_SWITCH = "useRxJS";
private static final String USE_RXJS_SWITCH_DESC = "Enable this to internally use rxjs observables. If disabled, a stub is used instead. This is required for the 'angular' framework.";
@@ -86,28 +73,18 @@ public class TypeScriptClientCodegen extends DefaultCodegen implements CodegenCo
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 final Map frameworkToHttpLibMap;
// NPM Options
- private static final String SNAPSHOT = "snapshot";
- @SuppressWarnings("squid:S5164")
- protected static final ThreadLocal SNAPSHOT_SUFFIX_FORMAT = ThreadLocal.withInitial(() -> new SimpleDateFormat("yyyyMMddHHmm", Locale.ROOT));
private static final String NPM_REPOSITORY = "npmRepository";
- private static final String NPM_NAME = "npmName";
- private static final String NPM_VERSION = "npmVersion";
// NPM Option Values
protected String npmRepository = null;
protected String snapshot = null;
- protected String npmName = null;
- protected String npmVersion = "1.0.0";
- protected String modelPropertyNaming = "camelCase";
protected ENUM_PROPERTY_NAMING_TYPE enumPropertyNaming = ENUM_PROPERTY_NAMING_TYPE.PascalCase;
- protected HashSet languageGenericTypes;
- private DateTimeFormatter iso8601Date = DateTimeFormatter.ISO_DATE;
- private DateTimeFormatter iso8601DateTime = DateTimeFormatter.ISO_DATE_TIME;
+ private final DateTimeFormatter iso8601Date = DateTimeFormatter.ISO_DATE;
+ private final DateTimeFormatter iso8601DateTime = DateTimeFormatter.ISO_DATE_TIME;
public TypeScriptClientCodegen() {
super();
@@ -116,88 +93,23 @@ public class TypeScriptClientCodegen extends DefaultCodegen implements CodegenCo
this.frameworkToHttpLibMap.put("fetch-api", "isomorphic-fetch");
this.frameworkToHttpLibMap.put("jquery", "jquery");
-
this.generatorMetadata = GeneratorMetadata.newBuilder(generatorMetadata).stability(Stability.EXPERIMENTAL).build();
outputFolder = "generated-code" + File.separator + "typescript";
embeddedTemplateDir = templateDir = "typescript";
- supportsInheritance = true;
-
// NOTE: TypeScript uses camel cased reserved words, while models are title cased. We don't want lowercase comparisons.
reservedWords.addAll(Arrays.asList(
// local variable names used in API methods (endpoints)
- "varLocalPath", "queryParameters", "headerParams", "formParams", "useFormData", "varLocalDeferred",
- "requestOptions", "from",
+ "from",
// Typescript reserved words
- "abstract", "await", "boolean", "break", "byte", "case", "catch", "char", "class", "const", "constructor", "continue", "debugger", "default", "delete", "do", "double", "else", "enum", "export", "extends", "false", "final", "finally", "float", "for", "function", "goto", "if", "implements", "import", "in", "instanceof", "int", "interface", "let", "long", "native", "new", "null", "package", "private", "protected", "public", "return", "short", "static", "super", "switch", "synchronized", "this", "throw", "transient", "true", "try", "typeof", "var", "void", "volatile", "while", "with", "yield"));
+ "constructor"));
- languageSpecificPrimitives = new HashSet<>(Arrays.asList(
- "string",
- "String",
- "boolean",
- "Boolean",
- "Double",
- "Integer",
- "Long",
- "Float",
- "Object",
- "Array",
- "Date",
- "number",
- "any",
- "File",
- "Error",
- "Map",
- "Set"
- ));
-
- languageGenericTypes = new HashSet<>(Arrays.asList(
- "Array"
- ));
-
- instantiationTypes.put("array", "Array");
-
- typeMapping = new HashMap<>();
- typeMapping.put("Array", "Array");
- typeMapping.put("array", "Array");
typeMapping.put("List", "Array");
- typeMapping.put("boolean", "boolean");
- typeMapping.put("string", "string");
- typeMapping.put("int", "number");
- typeMapping.put("float", "number");
- typeMapping.put("number", "number");
- typeMapping.put("long", "number");
- typeMapping.put("short", "number");
- typeMapping.put("char", "string");
- typeMapping.put("double", "number");
typeMapping.put("object", "any");
- typeMapping.put("integer", "number");
- typeMapping.put("Map", "any");
- typeMapping.put("map", "any");
- typeMapping.put("Set", "Set");
- typeMapping.put("set", "Set");
- typeMapping.put("date", "string");
typeMapping.put("DateTime", "Date");
- typeMapping.put("binary", "any");
- typeMapping.put("File", "any");
- typeMapping.put("file", "any");
- typeMapping.put("ByteArray", "string");
- typeMapping.put("UUID", "string");
- typeMapping.put("Error", "Error");
- typeMapping.put("AnyType", "any");
-
- cliOptions.add(new CliOption(NPM_NAME, "The name under which you want to publish generated npm package." +
- " Required to generate a full package"));
- cliOptions.add(new CliOption(NPM_VERSION, "The version of your npm package. If not provided, using the version from the OpenAPI specification file.").defaultValue(this.getNpmVersion()));
cliOptions.add(new CliOption(NPM_REPOSITORY, "Use this property to set an url your private npmRepo in the package.json"));
- cliOptions.add(CliOption.newBoolean(SNAPSHOT,
- "When setting this property to true, the version will be suffixed with -SNAPSHOT." + SNAPSHOT_SUFFIX_FORMAT.get().toPattern(),
- false));
-
- cliOptions.add(new CliOption(CodegenConstants.MODEL_PROPERTY_NAMING, CodegenConstants.MODEL_PROPERTY_NAMING_DESC).defaultValue("camelCase"));
- cliOptions.add(new CliOption(CodegenConstants.SUPPORTS_ES6, CodegenConstants.SUPPORTS_ES6_DESC).defaultValue("false"));
cliOptions.add(new CliOption(TypeScriptClientCodegen.FILE_CONTENT_DATA_TYPE, TypeScriptClientCodegen.FILE_CONTENT_DATA_TYPE_DESC).defaultValue("Buffer"));
cliOptions.add(new CliOption(TypeScriptClientCodegen.USE_RXJS_SWITCH, TypeScriptClientCodegen.USE_RXJS_SWITCH_DESC).defaultValue("false"));
cliOptions.add(new CliOption(TypeScriptClientCodegen.USE_OBJECT_PARAMS_SWITCH, TypeScriptClientCodegen.USE_OBJECT_PARAMS_DESC).defaultValue("false"));
@@ -205,20 +117,23 @@ public class TypeScriptClientCodegen extends DefaultCodegen implements CodegenCo
cliOptions.add(new CliOption(TypeScriptClientCodegen.IMPORT_FILE_EXTENSION_SWITCH, TypeScriptClientCodegen.IMPORT_FILE_EXTENSION_SWITCH_DESC));
CliOption frameworkOption = new CliOption(TypeScriptClientCodegen.FRAMEWORK_SWITCH, TypeScriptClientCodegen.FRAMEWORK_SWITCH_DESC);
- for (String option: TypeScriptClientCodegen.FRAMEWORKS) {
+ for (String option : TypeScriptClientCodegen.FRAMEWORKS) {
frameworkOption.addEnum(option, option);
}
frameworkOption.defaultValue(FRAMEWORKS[0]);
cliOptions.add(frameworkOption);
CliOption platformOption = new CliOption(TypeScriptClientCodegen.PLATFORM_SWITCH, TypeScriptClientCodegen.PLATFORM_SWITCH_DESC);
- for (String option: TypeScriptClientCodegen.PLATFORMS) {
+ for (String option : TypeScriptClientCodegen.PLATFORMS) {
platformOption.addEnum(option, option);
}
platformOption.defaultValue(PLATFORMS[0]);
cliOptions.add(platformOption);
+ // Set property naming to camelCase
+ supportModelPropertyNaming(CodegenConstants.MODEL_PROPERTY_NAMING_TYPE.camelCase);
+
// Git
supportingFiles.add(new SupportingFile(".gitignore.mustache", "", ".gitignore"));
supportingFiles.add(new SupportingFile("git_push.sh.mustache", "", "git_push.sh"));
@@ -276,42 +191,12 @@ public class TypeScriptClientCodegen extends DefaultCodegen implements CodegenCo
this.npmVersion = npmVersion;
}
- @Override
- public CodegenType getTag() {
- return CodegenType.CLIENT;
- }
-
- @Override
- public void preprocessOpenAPI(OpenAPI openAPI) {
-
- if (additionalProperties.containsKey(NPM_NAME)) {
-
- // If no npmVersion is provided in additional properties, version from API specification is used.
- // If none of them is provided then fallbacks to default version
- if (additionalProperties.containsKey(NPM_VERSION)) {
- this.setNpmVersion(additionalProperties.get(NPM_VERSION).toString());
- } else if (openAPI.getInfo() != null && openAPI.getInfo().getVersion() != null) {
- this.setNpmVersion(openAPI.getInfo().getVersion());
- }
-
- if (additionalProperties.containsKey(SNAPSHOT) && Boolean.parseBoolean(additionalProperties.get(SNAPSHOT).toString())) {
- if (npmVersion.toUpperCase(Locale.ROOT).matches("^.*-SNAPSHOT$")) {
- this.setNpmVersion(npmVersion + "." + SNAPSHOT_SUFFIX_FORMAT.get().format(new Date()));
- } else {
- this.setNpmVersion(npmVersion + "-SNAPSHOT." + SNAPSHOT_SUFFIX_FORMAT.get().format(new Date()));
- }
- }
- additionalProperties.put(NPM_VERSION, npmVersion);
-
- }
- }
-
@Override
public Map postProcessSupportingFileData(Map objs) {
final Object propFramework = additionalProperties.get(FRAMEWORK_SWITCH);
Map frameworks = new HashMap<>();
- for (String framework: FRAMEWORKS) {
+ for (String framework : FRAMEWORKS) {
frameworks.put(framework, framework.equals(propFramework));
}
objs.put("framework", propFramework);
@@ -333,7 +218,7 @@ public class TypeScriptClientCodegen extends DefaultCodegen implements CodegenCo
OperationMap operationsMap = operations.getOperations();
List operationList = operationsMap.getOperation();
- for (CodegenOperation operation: operationList) {
+ for (CodegenOperation operation : operationList) {
List responses = operation.responses;
operation.returnType = this.getReturnType(responses);
}
@@ -342,12 +227,13 @@ public class TypeScriptClientCodegen extends DefaultCodegen implements CodegenCo
/**
* Returns the correct return type based on all 2xx HTTP responses defined for an operation.
+ *
* @param responses all CodegenResponses defined for one operation
* @return TypeScript return type
*/
private String getReturnType(List responses) {
Set returnTypes = new HashSet<>();
- for (CodegenResponse response: responses) {
+ for (CodegenResponse response : responses) {
if (response.is2xx) {
if (response.dataType != null) {
returnTypes.add(response.dataType);
@@ -364,18 +250,21 @@ public class TypeScriptClientCodegen extends DefaultCodegen implements CodegenCo
return String.join(" | ", returnTypes);
}
- @Override
- public String escapeReservedWord(String name) {
- if (this.reservedWordsMappings().containsKey(name)) {
- return this.reservedWordsMappings().get(name);
- }
- return "_" + name;
- }
-
@Override
public String toParamName(String name) {
- // should be the same as variable name
- return toVarName(name);
+ // sanitize name
+ name = sanitizeName(name);
+
+ if ("_".equals(name)) {
+ name = "_u";
+ }
+
+ // if it's all upper case, do nothing
+ if (name.matches("^[A-Z_]*$")) {
+ return name;
+ }
+
+ return super.toParamName(name);
}
@Override
@@ -392,22 +281,7 @@ public class TypeScriptClientCodegen extends DefaultCodegen implements CodegenCo
return name;
}
- name = getNameUsingModelPropertyNaming(name);
-
- // for reserved word or word starting with number, append _
- if (isReservedWord(name) || name.matches("^\\d.*")) {
- name = escapeReservedWord(name);
- }
-
- return name;
- }
-
- @Override
- public String toModelName(final String name) {
- String fullModelName = name;
- fullModelName = addPrefix(fullModelName, modelNamePrefix);
- fullModelName = addSuffix(fullModelName, modelNameSuffix);
- return toTypescriptTypeName(fullModelName, "Model");
+ return super.toVarName(name);
}
@Override
@@ -416,224 +290,6 @@ public class TypeScriptClientCodegen extends DefaultCodegen implements CodegenCo
return "../" + modelPackage() + "/" + toModelName(name);
}
- protected String addPrefix(String name, String prefix) {
- if (!StringUtils.isEmpty(prefix)) {
- name = prefix + "_" + name;
- }
- return name;
- }
-
- protected String addSuffix(String name, String suffix) {
- if (!StringUtils.isEmpty(suffix)) {
- name = name + "_" + suffix;
- }
-
- return name;
- }
-
- protected String toTypescriptTypeName(final String name, String safePrefix) {
- ArrayList exceptions = new ArrayList<>(Arrays.asList("\\|", " "));
- String sanName = sanitizeName(name, "(?![| ])\\W", exceptions);
-
- sanName = camelize(sanName);
-
- // model name cannot use reserved keyword, e.g. return
- // this is unlikely to happen, because we have just camelized the name, while reserved words are usually all lowercase
- if (isReservedWord(sanName)) {
- String modelName = safePrefix + sanName;
- LOGGER.warn("{} (reserved word) cannot be used as model name. Renamed to {}", sanName, modelName);
- return modelName;
- }
-
- // model name starts with number
- if (sanName.matches("^\\d.*")) {
- String modelName = safePrefix + sanName; // e.g. 200Response => Model200Response
- LOGGER.warn("{} (model name starts with number) cannot be used as model name. Renamed to {}", sanName,
- modelName);
- return modelName;
- }
-
- if (languageSpecificPrimitives.contains(sanName)) {
- String modelName = safePrefix + sanName;
- LOGGER.warn("{} (model name matches existing language type) cannot be used as a model name. Renamed to {}",
- sanName, modelName);
- return modelName;
- }
-
- return sanName;
- }
-
- @Override
- public String toModelFilename(String name) {
- // should be the same as the model name
- return toModelName(name);
- }
-
- @Override
- protected String getParameterDataType(Parameter parameter, Schema p) {
- // handle enums of various data types
- Schema inner;
- if (ModelUtils.isArraySchema(p)) {
- ArraySchema mp1 = (ArraySchema) p;
- inner = mp1.getItems();
- return this.getSchemaType(p) + "<" + this.getParameterDataType(parameter, inner) + ">";
- } else if (ModelUtils.isMapSchema(p)) {
- inner = (Schema) p.getAdditionalProperties();
- return "{ [key: string]: " + this.getParameterDataType(parameter, inner) + "; }";
- } else if (ModelUtils.isStringSchema(p)) {
- // Handle string enums
- if (p.getEnum() != null) {
- return enumValuesToEnumTypeUnion(p.getEnum(), "string");
- }
- } else if (ModelUtils.isIntegerSchema(p)) {
- // Handle integer enums
- if (p.getEnum() != null) {
- return numericEnumValuesToEnumTypeUnion(new ArrayList(p.getEnum()));
- }
- } else if (ModelUtils.isNumberSchema(p)) {
- // Handle double enums
- if (p.getEnum() != null) {
- return numericEnumValuesToEnumTypeUnion(new ArrayList(p.getEnum()));
- }
- }
- return this.getTypeDeclaration(p);
- }
-
- /**
- * Converts a list of strings to a literal union for representing enum values as a type.
- * Example output: 'available' | 'pending' | 'sold'
- *
- * @param values list of allowed enum values
- * @param dataType either "string" or "number"
- * @return a literal union for representing enum values as a type
- */
- protected String enumValuesToEnumTypeUnion(List values, String dataType) {
- StringBuilder b = new StringBuilder();
- boolean isFirst = true;
- for (String value : values) {
- if (!isFirst) {
- b.append(" | ");
- }
- b.append(toEnumValue(value, dataType));
- isFirst = false;
- }
- return b.toString();
- }
-
- /**
- * Converts a list of numbers to a literal union for representing enum values as a type.
- * Example output: 3 | 9 | 55
- *
- * @param values a list of numbers
- * @return a literal union for representing enum values as a type
- */
- protected String numericEnumValuesToEnumTypeUnion(List values) {
- List stringValues = new ArrayList<>();
- for (Number value : values) {
- stringValues.add(value.toString());
- }
- return enumValuesToEnumTypeUnion(stringValues, "number");
- }
-
- @Override
- public String toDefaultValue(Schema p) {
- if (ModelUtils.isBooleanSchema(p)) {
- return UNDEFINED_VALUE;
- } else if (ModelUtils.isDateSchema(p)) {
- return UNDEFINED_VALUE;
- } else if (ModelUtils.isDateTimeSchema(p)) {
- return UNDEFINED_VALUE;
- } else if (ModelUtils.isNumberSchema(p)) {
- if (p.getDefault() != null) {
- return p.getDefault().toString();
- }
- return UNDEFINED_VALUE;
- } else if (ModelUtils.isIntegerSchema(p)) {
- if (p.getDefault() != null) {
- return p.getDefault().toString();
- }
- return UNDEFINED_VALUE;
- } else if (ModelUtils.isStringSchema(p)) {
- if (p.getDefault() != null) {
- return "'" + (String) p.getDefault() + "'";
- }
- return UNDEFINED_VALUE;
- } else {
- return UNDEFINED_VALUE;
- }
-
- }
-
- @Override
- protected boolean isReservedWord(String word) {
- // NOTE: This differs from super's implementation in that TypeScript does _not_ want case insensitive matching.
- return reservedWords.contains(word);
- }
-
- @Override
- public String getSchemaType(Schema p) {
- String openAPIType = super.getSchemaType(p);
- String type = null;
- if (ModelUtils.isComposedSchema(p)) {
- return openAPIType;
- } else if (typeMapping.containsKey(openAPIType)) {
- type = typeMapping.get(openAPIType);
- if (languageSpecificPrimitives.contains(type))
- return type;
- } else
- type = openAPIType;
- return toModelName(type);
- }
-
- @Override
- public String toOperationId(String operationId) {
- // throw exception if method name is empty
- if (StringUtils.isEmpty(operationId)) {
- throw new RuntimeException("Empty method name (operationId) not allowed");
- }
-
- // method name cannot use reserved keyword, e.g. return
- // append _ at the beginning, e.g. _return
- if (isReservedWord(operationId)) {
- return escapeReservedWord(camelize(sanitizeName(operationId), LOWERCASE_FIRST_LETTER));
- }
-
- return camelize(sanitizeName(operationId), LOWERCASE_FIRST_LETTER);
- }
-
- public void setModelPropertyNaming(String naming) {
- if ("original".equals(naming) || "camelCase".equals(naming) ||
- "PascalCase".equals(naming) || "snake_case".equals(naming)) {
- this.modelPropertyNaming = naming;
- } else {
- throw new IllegalArgumentException("Invalid model property naming '" +
- naming + "'. Must be 'original', 'camelCase', " +
- "'PascalCase' or 'snake_case'");
- }
- }
-
- public String getModelPropertyNaming() {
- return this.modelPropertyNaming;
- }
-
- public String getNameUsingModelPropertyNaming(String name) {
- switch (CodegenConstants.MODEL_PROPERTY_NAMING_TYPE.valueOf(getModelPropertyNaming())) {
- case original:
- return name;
- case camelCase:
- return camelize(name, LOWERCASE_FIRST_LETTER);
- case PascalCase:
- return camelize(name);
- case snake_case:
- return underscore(name);
- default:
- throw new IllegalArgumentException("Invalid model property naming '" +
- name + "'. Must be 'original', 'camelCase', " +
- "'PascalCase' or 'snake_case'");
- }
-
- }
-
@Override
public String toEnumValue(String value, String datatype) {
if ("number".equals(datatype)) {
@@ -643,11 +299,6 @@ public class TypeScriptClientCodegen extends DefaultCodegen implements CodegenCo
}
}
- @Override
- public String toEnumDefaultValue(String value, String datatype) {
- return datatype + "_" + value;
- }
-
@Override
public String toEnumVarName(String name, String datatype) {
if (name.length() == 0) {
@@ -683,10 +334,6 @@ public class TypeScriptClientCodegen extends DefaultCodegen implements CodegenCo
}
}
- protected ENUM_PROPERTY_NAMING_TYPE getEnumPropertyNaming() {
- return enumPropertyNaming;
- }
-
private String getNameUsingEnumPropertyNaming(String name) {
switch (getEnumPropertyNaming()) {
case original:
@@ -704,17 +351,6 @@ public class TypeScriptClientCodegen extends DefaultCodegen implements CodegenCo
}
}
- @Override
- public String toEnumName(CodegenProperty property) {
- String enumName = toModelName(property.name) + "Enum";
-
- if (enumName.matches("\\d.*")) { // starts with number
- return "_" + enumName;
- } else {
- return enumName;
- }
- }
-
@Override
public ModelsMap postProcessModels(ModelsMap objs) {
// process enum in models
@@ -759,53 +395,6 @@ public class TypeScriptClientCodegen extends DefaultCodegen implements CodegenCo
return tsImports;
}
- @Override
- public Map postProcessAllModels(Map objs) {
- Map result = super.postProcessAllModels(objs);
-
- for (ModelsMap entry : result.values()) {
- for (ModelMap mo : entry.getModels()) {
- CodegenModel cm = mo.getModel();
- if (cm.discriminator != null && cm.children != null) {
- for (CodegenModel child : cm.children) {
- this.setDiscriminatorValue(child, cm.discriminator.getPropertyName(), this.getDiscriminatorValue(child));
- }
- }
- }
- }
- return result;
- }
-
- private void setDiscriminatorValue(CodegenModel model, String baseName, String value) {
- for (CodegenProperty prop : model.allVars) {
- if (prop.baseName.equals(baseName)) {
- prop.discriminatorValue = value;
- }
- }
- if (model.children != null) {
- final boolean newDiscriminator = model.discriminator != null;
- for (CodegenModel child : model.children) {
- this.setDiscriminatorValue(child, baseName, newDiscriminator ? value : this.getDiscriminatorValue(child));
- }
- }
- }
-
- private String getDiscriminatorValue(CodegenModel model) {
- return model.vendorExtensions.containsKey(X_DISCRIMINATOR_TYPE) ?
- (String) model.vendorExtensions.get(X_DISCRIMINATOR_TYPE) : model.classname;
- }
-
- @Override
- public String escapeQuotationMark(String input) {
- // remove ', " to avoid code injection
- return input.replace("\"", "").replace("'", "");
- }
-
- @Override
- public String escapeUnsafeCharacters(String input) {
- return input.replace("*/", "*_/").replace("/*", "/_*");
- }
-
@Override
public String getName() {
return "typescript";
@@ -816,17 +405,10 @@ public class TypeScriptClientCodegen extends DefaultCodegen implements CodegenCo
return "Generates a TypeScript client library using Fetch API (beta).";
}
-
@Override
public void processOpts() {
super.processOpts();
- if (additionalProperties.containsKey(CodegenConstants.MODEL_PROPERTY_NAMING)) {
- setModelPropertyNaming((String) additionalProperties.get(CodegenConstants.MODEL_PROPERTY_NAMING));
- }
-
- convertPropertyToBooleanAndWriteBack(CodegenConstants.SUPPORTS_ES6);
-
// change package names
apiPackage = this.apiPackage + ".apis";
testPackage = this.testPackage + ".tests";
@@ -836,8 +418,8 @@ public class TypeScriptClientCodegen extends DefaultCodegen implements CodegenCo
String httpLibName = this.getHttpLibForFramework(additionalProperties.get(FRAMEWORK_SWITCH).toString());
supportingFiles.add(new SupportingFile(
- "http" + File.separator + httpLibName + ".mustache",
- "http", httpLibName + ".ts"
+ "http" + File.separator + httpLibName + ".mustache",
+ "http", httpLibName + ".ts"
));
Object propPlatform = additionalProperties.get(PLATFORM_SWITCH);
@@ -847,7 +429,7 @@ public class TypeScriptClientCodegen extends DefaultCodegen implements CodegenCo
}
Map platforms = new HashMap<>();
- for (String platform: PLATFORMS) {
+ for (String platform : PLATFORMS) {
platforms.put(platform, platform.equals(propPlatform));
}
additionalProperties.put("platforms", platforms);
@@ -882,14 +464,6 @@ public class TypeScriptClientCodegen extends DefaultCodegen implements CodegenCo
}
// NPM Settings
- if (additionalProperties.containsKey(NPM_NAME)) {
- setNpmName(additionalProperties.get(NPM_NAME).toString());
- }
-
- if (additionalProperties.containsKey(NPM_VERSION)) {
- setNpmVersion(additionalProperties.get(NPM_VERSION).toString());
- }
-
if (additionalProperties.containsKey(NPM_REPOSITORY)) {
setNpmRepository(additionalProperties.get(NPM_REPOSITORY).toString());
}
@@ -908,7 +482,11 @@ public class TypeScriptClientCodegen extends DefaultCodegen implements CodegenCo
return this.getSchemaType(p) + "<" + this.getTypeDeclaration(unaliasSchema(inner)) + ">";
} else if (ModelUtils.isMapSchema(p)) {
inner = getSchemaAdditionalProperties(p);
- return "{ [key: string]: " + this.getTypeDeclaration(unaliasSchema(inner)) + "; }";
+ String postfix = "";
+ if (Boolean.TRUE.equals(inner.getNullable())) {
+ postfix = " | null";
+ }
+ return "{ [key: string]: " + this.getTypeDeclaration(unaliasSchema(inner)) + postfix + "; }";
} else if (ModelUtils.isFileSchema(p)) {
return "HttpFile";
} else if (ModelUtils.isBinarySchema(p)) {
@@ -1413,9 +991,7 @@ public class TypeScriptClientCodegen extends DefaultCodegen implements CodegenCo
return example;
}
-
/***
- *
* Set the codegenParameter example value
* We have a custom version of this function so we can invoke toExampleValue
*
@@ -1506,64 +1082,6 @@ public class TypeScriptClientCodegen extends DefaultCodegen implements CodegenCo
return cp;
}
- @Override
- public String toAnyOfName(List names, ComposedSchema composedSchema) {
- List types = getTypesFromSchemas(composedSchema.getAnyOf());
-
- return String.join(" | ", types);
- }
-
- @Override
- public String toOneOfName(List names, ComposedSchema composedSchema) {
- List types = getTypesFromSchemas(composedSchema.getOneOf());
-
- return String.join(" | ", types);
- }
-
- @Override
- public String toAllOfName(List names, ComposedSchema composedSchema) {
- List types = getTypesFromSchemas(composedSchema.getAllOf());
-
- return String.join(" & ", types);
- }
-
- /**
- * Extracts the list of type names from a list of schemas.
- * Excludes `AnyType` if there are other valid types extracted.
- *
- * @param schemas list of schemas
- * @return list of types
- */
- protected List getTypesFromSchemas(List schemas) {
- List filteredSchemas = schemas.size() > 1
- ? schemas.stream().filter(schema -> !"AnyType".equals(super.getSchemaType(schema))).collect(Collectors.toList())
- : schemas;
-
- return filteredSchemas.stream().map(schema -> {
- String schemaType = getSchemaType(schema);
- if (ModelUtils.isArraySchema(schema)) {
- ArraySchema ap = (ArraySchema) schema;
- Schema inner = ap.getItems();
- schemaType = schemaType + "<" + getSchemaType(inner) + ">";
- }
- return schemaType;
- }).distinct().collect(Collectors.toList());
- }
-
- @Override
- protected void addImport(CodegenModel m, String type) {
- if (type == null) {
- return;
- }
-
- String[] parts = splitComposedType(type);
- for (String s : parts) {
- if (needToImport(s)) {
- m.imports.add(s);
- }
- }
- }
-
@Override
protected void addImport(Set importsToBeAddedTo, String type) {
if (type == null) {
@@ -1584,9 +1102,6 @@ public class TypeScriptClientCodegen extends DefaultCodegen implements CodegenCo
* @return list of types
*/
protected String[] splitComposedType(String type) {
- return type.replace(" ","").split("[|&<>]");
+ return type.replace(" ", "").split("[|&<>]");
}
-
- @Override
- public GeneratorLanguage generatorLanguage() { return GeneratorLanguage.TYPESCRIPT; }
}
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/templating/mustache/SpringHttpStatusLambda.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/templating/mustache/SpringHttpStatusLambda.java
new file mode 100644
index 00000000000..3808f78cbb3
--- /dev/null
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/templating/mustache/SpringHttpStatusLambda.java
@@ -0,0 +1,220 @@
+package org.openapitools.codegen.templating.mustache;
+
+import com.samskivert.mustache.Mustache;
+import com.samskivert.mustache.Template;
+
+import java.io.IOException;
+import java.io.Writer;
+
+/**
+ * Returns the Spring {@code org.springframework.http.HttpStatus} enumeration for the given status text.
+ * It throws an IllegalArgumentException if the status text is handled by the Spring framework.
+ *
+ * Register:
+ *
+ * additionalProperties.put("springHttpStatus", new SpringHttpStatusLambda());
+ *