diff --git a/.java-version b/.java-version
index 2cb7d300212..6259340971b 100644
--- a/.java-version
+++ b/.java-version
@@ -1 +1 @@
-oracle64-1.8.0.152
\ No newline at end of file
+1.8
diff --git a/.travis.yml b/.travis.yml
index 5d790284751..f47f448b874 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -131,6 +131,12 @@ script:
# WARN: Travis will timeout after 10 minutes of no stdout/stderr activity, which is problematic with mvn --quiet.
- mvn --quiet --batch-mode --show-version clean install
- mvn --quiet --batch-mode --show-version verify -Psamples
+ # test maven plugin
+ - mvn clean compile -f modules/openapi-generator-maven-plugin/examples/java-client.xml
+ - mvn clean compile -f modules/openapi-generator-maven-plugin/examples/multi-module/pom.xml
+ # test gradle plugin
+ - (cd modules/openapi-generator-gradle-plugin/samples/local-spec && ./gradlew buildGoSdk)
+ - (cd modules/openapi-generator-gradle-plugin/samples/local-spec && ./gradlew openApiGenerate)
after_success:
# push to maven repo
- if [ $SONATYPE_USERNAME ] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
diff --git a/CI/circle_parallel.sh b/CI/circle_parallel.sh
index 9b780d2f195..417f34349f2 100755
--- a/CI/circle_parallel.sh
+++ b/CI/circle_parallel.sh
@@ -12,6 +12,15 @@ if [ "$NODE_INDEX" = "1" ]; then
#cp CI/pom.xml.circleci pom.xml
java -version
mvn --quiet verify -Psamples.circleci
+
+ # generate all petstore samples (client, servers, doc)
+ ./bin/run-all-petstore
+ # generate all petstore samples (openapi3)
+ ./bin/openapi3/run-all-petstore
+ # generate test scripts
+ ./bin/tests/run-all-test
+ # test all generators with fake petstore spec (2.0, 3.0)
+ ./bin/utils/test-fake-petstore-for-all.sh
elif [ "$NODE_INDEX" = "2" ]; then
# run ensure-up-to-date sample script on SNAPSHOT version only
project_version=`mvn org.apache.maven.plugins:maven-help-plugin:3.1.0:evaluate -Dexpression=project.version -q -DforceStdout`
diff --git a/CI/samples.ci/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj b/CI/samples.ci/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj
index e510bba3f59..c7a19d07a9f 100644
--- a/CI/samples.ci/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj
+++ b/CI/samples.ci/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj
@@ -47,16 +47,16 @@ OpenAPI spec version: 1.0.0
- $(SolutionDir)\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll
- ..\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll
- ..\..\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll
- ..\..\vendor\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll
+ $(SolutionDir)\packages\Newtonsoft.Json.12.0.1\lib\net45\Newtonsoft.Json.dll
+ ..\packages\Newtonsoft.Json.12.0.1\lib\net45\Newtonsoft.Json.dll
+ ..\..\packages\Newtonsoft.Json.12.0.1\lib\net45\Newtonsoft.Json.dll
+ ..\..\vendor\Newtonsoft.Json.12.0.1\lib\net45\Newtonsoft.Json.dll
- $(SolutionDir)\packages\JsonSubTypes.1.2.0\lib\net45\JsonSubTypes.dll
- ..\packages\JsonSubTypes.1.2.0\lib\net45\JsonSubTypes.dll
- ..\..\packages\JsonSubTypes.1.2.0\lib\net45\JsonSubTypes.dll
- ..\..\vendor\JsonSubTypes.1.2.0\lib\net45\JsonSubTypes.dll
+ $(SolutionDir)\packages\JsonSubTypes.1.5.2\lib\net45\JsonSubTypes.dll
+ ..\packages\JsonSubTypes.1.5.2\lib\net45\JsonSubTypes.dll
+ ..\..\packages\JsonSubTypes.1.5.2\lib\net45\JsonSubTypes.dll
+ ..\..\vendor\JsonSubTypes.1.5.2\lib\net45\JsonSubTypes.dll$(SolutionDir)\packages\RestSharp.105.1.0\lib\net45\RestSharp.dll
@@ -65,10 +65,10 @@ OpenAPI spec version: 1.0.0
..\..\vendor\RestSharp.105.1.0\lib\net45\RestSharp.dll
- $(SolutionDir)\packages\NUnit.2.6.4\lib\nunit.framework.dll
- ..\packages\NUnit.2.6.4\lib\nunit.framework.dll
- ..\..\packages\NUnit.2.6.4\lib\nunit.framework.dll
- ..\..\vendor\NUnit.2.6.4\lib\nunit.framework.dll
+ $(SolutionDir)\packages\NUnit.3.11.0\lib\net45\nunit.framework.dll
+ ..\packages\NUnit.3.11.0\lib\net45\nunit.framework.dll
+ ..\..\packages\NUnit.3.11.0\lib\net45\nunit.framework.dll
+ ..\..\vendor\NUnit.3.11.0\lib\net45\nunit.framework.dll
diff --git a/README.md b/README.md
index a079e9c6014..8ea13ee6e4e 100644
--- a/README.md
+++ b/README.md
@@ -2,15 +2,15 @@
-[Master](https://github.com/OpenAPITools/openapi-generator/tree/master) (`4.0.1`): [](https://travis-ci.org/OpenAPITools/openapi-generator)
+[Master](https://github.com/OpenAPITools/openapi-generator/tree/master) (`4.0.3`): [](https://travis-ci.org/OpenAPITools/openapi-generator)
[](https://circleci.com/gh/OpenAPITools/openapi-generator)
[](https://app.shippable.com/github/OpenAPITools/openapi-generator)
[](https://ci.appveyor.com/project/WilliamCheng/openapi-generator-wh2wu)
-[`4.1.x`](https://github.com/OpenAPITools/openapi-generator/tree/4.0.x) branch: [](https://travis-ci.org/OpenAPITools/openapi-generator)
-[](https://circleci.com/gh/OpenAPITools/openapi-generator)
-[](https://app.shippable.com/github/OpenAPITools/openapi-generator)
-[](https://ci.appveyor.com/project/WilliamCheng/openapi-generator-wh2wu)
+[`4.1.x`](https://github.com/OpenAPITools/openapi-generator/tree/4.1.x) branch: [](https://travis-ci.org/OpenAPITools/openapi-generator)
+[](https://circleci.com/gh/OpenAPITools/openapi-generator)
+[](https://app.shippable.com/github/OpenAPITools/openapi-generator)
+[](https://ci.appveyor.com/project/WilliamCheng/openapi-generator-wh2wu)
[`5.0.x`](https://github.com/OpenAPITools/openapi-generator/tree/5.0.x) branch: [](https://travis-ci.org/OpenAPITools/openapi-generator)
[](https://circleci.com/gh/OpenAPITools/openapi-generator)
@@ -99,8 +99,8 @@ OpenAPI Generator Version | Release Date | Notes
---------------------------- | ------------ | -----
5.0.0 (upcoming major release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/5.0.0-SNAPSHOT/)| 13.05.2020 | Major release with breaking changes (no fallback)
4.1.0 (upcoming minor release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/4.1.0-SNAPSHOT/)| 15.07.2019 | Minor release (breaking changes with fallbacks)
-4.0.2 (upcoming patch release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/4.0.1-SNAPSHOT/)| 15.06.2019 | Patch release (minor bug fixes, etc)
-[4.0.1](https://github.com/OpenAPITools/openapi-generator/releases/tag/v4.0.1) (latest stable release) | 31.05.2019 | Patch release (bug fixes, minor enhancements, etc)
+4.0.3 (upcoming patch release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/4.0.3-SNAPSHOT/)| 04.07.2019 | Patch release (minor bug fixes, etc)
+[4.0.2](https://github.com/OpenAPITools/openapi-generator/releases/tag/v4.0.2) (latest stable release) | 20.06.2019 | Patch release (bug fixes, minor enhancements, etc)
OpenAPI Spec compatibility: 1.0, 1.1, 1.2, 2.0, 3.0
@@ -153,19 +153,19 @@ See the different versions of the [openapi-generator-cli](https://mvnrepository.
* [Readme](https://github.com/OpenAPITools/openapi-generator/blob/master/modules/openapi-generator-gradle-plugin/README.adoc)
### [1.3 - Download JAR](#table-of-contents)
-
+
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: `http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/4.0.1/openapi-generator-cli-4.0.1.jar`
+JAR location: `http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/4.0.2/openapi-generator-cli-4.0.2.jar`
For **Mac/Linux** users:
```sh
-wget http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/4.0.1/openapi-generator-cli-4.0.1.jar -O openapi-generator-cli.jar
+wget http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/4.0.2/openapi-generator-cli-4.0.2.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 http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/4.0.1/openapi-generator-cli-4.0.1.jar
+Invoke-WebRequest -OutFile openapi-generator-cli.jar http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/4.0.2/openapi-generator-cli-4.0.2.jar
```
After downloading the JAR, run `java -jar openapi-generator-cli.jar help` to show the usage.
@@ -175,7 +175,7 @@ For Mac users, please make sure Java 8 is installed (Tips: run `java -version` t
export JAVA_HOME=`/usr/libexec/java_home -v 1.8`
export PATH=${JAVA_HOME}/bin:$PATH
```
-
+
### Launcher Script
One downside to manual jar downloads is that you don't keep up-to-date with the latest released version. We have a Bash launcher script at [bin/utils/openapi-generator.cli.sh](./bin/utils/openapi-generator-cli.sh) which resolves this issue.
@@ -368,10 +368,11 @@ npm install @openapitools/openapi-generator-cli -g
openapi-generator version
```
-Or install a particualar OpenAPI Generator version (e.g. v4.0.1):
+
+Or install a particular OpenAPI Generator version (e.g. v4.0.2):
```sh
-npm install @openapitools/openapi-generator-cli@cli-4.0.1 -g
+npm install @openapitools/openapi-generator-cli@cli-4.0.2 -g
```
Or install it as dev-dependency:
@@ -379,7 +380,7 @@ Or install it as dev-dependency:
```sh
npm install @openapitools/openapi-generator-cli -D
```
-
+
## [2 - Getting Started](#table-of-contents)
To generate a PHP client for [petstore.yaml](https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/2_0/petstore.yaml), please run the following
@@ -394,7 +395,9 @@ 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/2_0/petstore.yaml -g php -o c:\temp\php_api_client`)
-You can also download the JAR (latest release) directly from [maven.org](http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/4.0.1/openapi-generator-cli-4.0.1.jar)
+
+You can also download the JAR (latest release) directly from [maven.org](http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/4.0.2/openapi-generator-cli-4.0.2.jar)
+
To get a list of **general** options available, please run `java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar help generate`
@@ -536,6 +539,7 @@ Here are some companies/projects (alphabetical order) using OpenAPI Generator in
- [codecentric AG](https://www.codecentric.de/)
- [Cupix](https://www.cupix.com/)
- [FormAPI](https://formapi.io/)
+- [Fuse](https://www.fuse.no/)
- [GenFlow](https://github.com/RepreZen/GenFlow)
- [GMO Pepabo](https://pepabo.com/en/)
- [GoDaddy](https://godaddy.com)
@@ -590,7 +594,8 @@ Here are some companies/projects (alphabetical order) using OpenAPI Generator in
- 2019-05-01 - [Design and generate a REST API from Swagger / OpenAPI in Java, Python, C# and more](https://simply-how.com/design-and-generate-api-code-from-openapi) by [Simply How](https://simply-how.com/)
- 2019-05-17 - [Generate Spring Boot REST API using Swagger/OpenAPI](https://www.47northlabs.com/knowledge-base/generate-spring-boot-rest-api-using-swagger-openapi/) by [Antonie Zafirov](https://www.47northlabs.com/author/antonie-zafirov/)
- 2019-05-22 - [REST APIs代码生成指南(OpenAPI Generator)](https://gum.co/openapi_generator_ebook_gb) by [William Cheng](https://twitter.com/wing328), [Xin Meng](https://github.com/xmeng1)
-- 2019-05/24 - [REST API 代碼生成指南 (OpenAPI Generator)](https://gum.co/openapi_generator_ebook_big5) by [William Cheng](https://twitter.com/wing328)
+- 2019-05-24 - [REST API 代碼生成指南 (OpenAPI Generator)](https://gum.co/openapi_generator_ebook_big5) by [William Cheng](https://twitter.com/wing328)
+- 2019-06-24 - [Kubernetes Clients and OpenAPI Generator](https://speakerdeck.com/wing328/kubernetes-clients-and-openapi-generator) by [William Cheng](https://twitter.com/wing328) at [Kubernetes Contributor Summits Shanghai 2019](https://www.lfasiallc.com/events/contributors-summit-china-2019/)
## [6 - About Us](#table-of-contents)
@@ -603,7 +608,8 @@ OpenAPI Generator core team members are contributors who have been making signif
* [@jimschubert](https://github.com/jimschubert) (2016/05) [:heart:](https://www.patreon.com/jimschubert)
* [@cbornet](https://github.com/cbornet) (2016/05)
* [@ackintosh](https://github.com/ackintosh) (2018/02) [:heart:](https://www.patreon.com/ackintosh/overview)
-* [@jmini](https://github.com/jmini) (2018/04)
+* [@jmini](https://github.com/jmini) (2018/04) [:heart:](https://www.patreon.com/jmini)
+* [@etherealjoy](https://github.com/etherealjoy) (2019/06)
:heart: = Link to support the contributor directly
@@ -774,7 +780,7 @@ If you want to join the committee, please kindly apply by sending an email to te
| Lua | @daurnimator (2017/08) |
| NodeJS/Javascript | @CodeNinjai (2017/07) @frol (2017/07) @cliffano (2017/07) |
| ObjC | |
-| Perl | @wing328 (2017/07) [:heart:](https://www.patreon.com/wing328) |
+| Perl | @wing328 (2017/07) [:heart:](https://www.patreon.com/wing328) @yue9944882 (2019/06) |
| PHP | @jebentier (2017/07), @dkarlovi (2017/07), @mandrean (2017/08), @jfastnacht (2017/09), @ackintosh (2017/09) [:heart:](https://www.patreon.com/ackintosh/overview), @ybelenko (2018/07), @renepardon (2018/12) |
| PowerShell | |
| Python | @taxpon (2017/07) @frol (2017/07) @mbohlool (2017/07) @cbornet (2017/09) @kenjones-cisco (2017/11) @tomplus (2018/10) @Jyhess (2019/01) |
@@ -811,7 +817,7 @@ OpenAPI Generator is a fork of [Swagger Codegen](https://github.com/swagger-api/
- [Jean-François Côté](https://github.com/JFCote)
- [Jim Schubert](https://github.com/jimschubert)
- [Jon Schoning](https://github.com/jonschoning)
-- [Jérémie Bresson](https://github.com/jmini)
+- [Jérémie Bresson](https://github.com/jmini) [:heart:](https://www.patreon.com/jmini)
- [Jörn Ahrens](https://github.com/jayearn)
- [Keni Steward](https://github.com/kenisteward)
- [Marcin Stefaniuk](https://github.com/mstefaniuk)
diff --git a/appveyor.yml b/appveyor.yml
index 4b387578e8f..afafbd2e704 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -50,7 +50,7 @@ build_script:
# install openapi-generator locally
- mvn clean install --quiet
# run the locally installed openapi-generator-gradle-plugin
- - gradle -PopenApiGeneratorVersion=4.0.2-SNAPSHOT -b modules\openapi-generator-gradle-plugin\samples\local-spec\build.gradle buildGoSdk --info
+ - gradle -b modules\openapi-generator-gradle-plugin\samples\local-spec\build.gradle buildGoSdk --info
test_script:
# restore test-related files
- copy /b/v/y CI\samples.ci\client\petstore\csharp\OpenAPIClient\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj samples\client\petstore\csharp\OpenAPIClient\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
@@ -58,9 +58,9 @@ test_script:
- dotnet test samples\client\petstore\csharp-netcore\OpenAPIClient\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp-netcore\OpenAPIClientCore\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
# test c# API client
- - nunit-console samples\client\petstore\csharp\OpenAPIClient\src\Org.OpenAPITools.Test\bin\Debug\Org.OpenAPITools.Test.dll --result=myresults.xml;format=AppVeyor
+ - nunit3-console samples\client\petstore\csharp\OpenAPIClient\src\Org.OpenAPITools.Test\bin\Debug\Org.OpenAPITools.Test.dll --result=myresults.xml;format=AppVeyor
# test c# API client (with PropertyChanged)
- - nunit-console samples\client\petstore\csharp\OpenAPIClientWithPropertyChanged\src\Org.OpenAPITools.Test\bin\Debug\Org.OpenAPITools.Test.dll --result=myresults.xml;format=AppVeyor
+ - nunit3-console samples\client\petstore\csharp\OpenAPIClientWithPropertyChanged\src\Org.OpenAPITools.Test\bin\Debug\Org.OpenAPITools.Test.dll --result=myresults.xml;format=AppVeyor
# generate all petstore clients
- .\bin\windows\run-all-petstore.cmd
diff --git a/bin/ada-petstore.sh b/bin/ada-petstore.sh
index 87005f0ee1b..5441bd13ec3 100755
--- a/bin/ada-petstore.sh
+++ b/bin/ada-petstore.sh
@@ -30,7 +30,7 @@ export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
model="modules/openapi-generator/src/test/resources/2_0/petstore.yaml"
ags="generate --template-dir modules/openapi-generator/src/main/resources/Ada -g ada $@"
ags="$ags -i $model -t modules/openapi-generator/src/main/resources/Ada -o samples/client/petstore/ada"
-ags="$ags -DprojectName=Petstore --model-package Samples.Petstore"
+ags="$ags --additional-properties projectName=Petstore --model-package Samples.Petstore"
java $JAVA_OPTS -jar $executable $ags
rm -rf samples/client/petstore/ada/src/server
diff --git a/bin/android-petstore-httpclient.sh b/bin/android-petstore-httpclient.sh
index c2e03a737fa..d0982cec14f 100755
--- a/bin/android-petstore-httpclient.sh
+++ b/bin/android-petstore-httpclient.sh
@@ -27,6 +27,6 @@ fi
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
-ags="generate -t modules/openapi-generator/src/main/resources/android -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g android -Dlibrary=httpclient -o samples/client/petstore/android/httpclient $@"
+ags="generate -t modules/openapi-generator/src/main/resources/android -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g android --additional-properties library=httpclient -o samples/client/petstore/android/httpclient $@"
java $JAVA_OPTS -jar $executable $ags
diff --git a/bin/cpp-restsdk-petstore.sh b/bin/cpp-restsdk-petstore.sh
index 1c5f0ad54e5..ad9090d0b5c 100755
--- a/bin/cpp-restsdk-petstore.sh
+++ b/bin/cpp-restsdk-petstore.sh
@@ -27,6 +27,6 @@ fi
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
-ags="generate -t modules/openapi-generator/src/main/resources/cpp-rest-sdk-client -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g cpp-restsdk -o samples/client/petstore/cpp-restsdk $@"
+ags="generate -t modules/openapi-generator/src/main/resources/cpp-rest-sdk-client -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g cpp-restsdk -o samples/client/petstore/cpp-restsdk/client $@"
java $JAVA_OPTS -jar $executable $ags
diff --git a/bin/csharp-petstore.sh b/bin/csharp-petstore.sh
index 4185295fa1a..cbfeb6fab0d 100755
--- a/bin/csharp-petstore.sh
+++ b/bin/csharp-petstore.sh
@@ -32,6 +32,6 @@ ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore-with-
java $JAVA_OPTS -jar $executable $ags
# restore csproj file
-echo "restore csproject file: CI/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj"
+echo "restore csproject file: CI/samples.ci/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj"
cp ./CI/samples.ci/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj ./samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/
diff --git a/bin/dart-flutter-petstore.sh b/bin/dart-flutter-petstore.sh
index af7a58af75f..af3aaca2bec 100755
--- a/bin/dart-flutter-petstore.sh
+++ b/bin/dart-flutter-petstore.sh
@@ -28,18 +28,18 @@ fi
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
## Generate non-browserClient
-#ags="generate -t modules/openapi-generator/src/main/resources/dart -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g dart -o samples/client/petstore/dart/swagger -DhideGenerationTimestamp=true -DbrowserClient=false $@"
+#ags="generate -t modules/openapi-generator/src/main/resources/dart -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g dart -o samples/client/petstore/dart/swagger --additional-properties hideGenerationTimestamp=true,browserClient=false $@"
#
## then options to generate the library for vm would be:
-##ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g dart -o samples/client/petstore/dart/swagger_vm -DbrowserClient=false -DpubName=swagger_vm $@"
+##ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g dart -o samples/client/petstore/dart/swagger_vm --additional-properties browserClient=false,pubName=swagger_vm $@"
#java $JAVA_OPTS -jar $executable $ags
#
## Generate browserClient
-#ags="generate -t modules/openapi-generator/src/main/resources/dart -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g dart -o samples/client/petstore/dart/swagger-browser-client -DhideGenerationTimestamp=true -DbrowserClient=true $@"
+#ags="generate -t modules/openapi-generator/src/main/resources/dart -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g dart -o samples/client/petstore/dart/swagger-browser-client --additional-properties hideGenerationTimestamp=true,browserClient=true $@"
#java $JAVA_OPTS -jar $executable $ags
# Generate non-browserClient and put it to the flutter sample app
-ags="generate -t modules/openapi-generator/src/main/resources/dart -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g dart -o samples/client/petstore/dart/flutter_petstore/swagger -DhideGenerationTimestamp=true -DbrowserClient=false $@"
+ags="generate -t modules/openapi-generator/src/main/resources/dart -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g dart -o samples/client/petstore/dart/flutter_petstore/swagger --additional-properties hideGenerationTimestamp=true,browserClient=false $@"
java $JAVA_OPTS -jar $executable $ags
# There is a proposal to allow importing different libraries depending on the environment:
diff --git a/bin/dart-jaguar-petstore.sh b/bin/dart-jaguar-petstore.sh
index ffec056c46e..c5348cd34be 100755
--- a/bin/dart-jaguar-petstore.sh
+++ b/bin/dart-jaguar-petstore.sh
@@ -28,19 +28,19 @@ fi
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
# Generate client
-ags="$@ generate -t modules/openapi-generator/src/main/resources/dart-jaguar -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g dart-jaguar -o samples/client/petstore/dart-jaguar/openapi -DhideGenerationTimestamp=true -DpubName=openapi"
+ags="$@ generate -t modules/openapi-generator/src/main/resources/dart-jaguar -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g dart-jaguar -o samples/client/petstore/dart-jaguar/openapi --additional-properties hideGenerationTimestamp=true,pubName=openapi"
java $JAVA_OPTS -jar $executable $ags
# Generate non-browserClient and put it to the flutter sample app
-ags="$@ generate -t modules/openapi-generator/src/main/resources/dart-jaguar -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g dart-jaguar -o samples/client/petstore/dart-jaguar/flutter_petstore/openapi -DhideGenerationTimestamp=true -DpubName=openapi"
+ags="$@ generate -t modules/openapi-generator/src/main/resources/dart-jaguar -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g dart-jaguar -o samples/client/petstore/dart-jaguar/flutter_petstore/openapi --additional-properties hideGenerationTimestamp=true,pubName=openapi"
java $JAVA_OPTS -jar $executable $ags
# Generate proto and put it to the flutter sample app
-ags="$@ generate -t modules/openapi-generator/src/main/resources/dart-jaguar -i modules/openapi-generator/src/test/resources/2_0/petstore-proto.yaml -g dart-jaguar -o samples/client/petstore/dart-jaguar/flutter_proto_petstore/openapi -Dserialization=proto -DhideGenerationTimestamp=true -DpubName=openapi"
+ags="$@ generate -t modules/openapi-generator/src/main/resources/dart-jaguar -i modules/openapi-generator/src/test/resources/2_0/petstore-proto.yaml -g dart-jaguar -o samples/client/petstore/dart-jaguar/flutter_proto_petstore/openapi --additional-properties serialization=proto,hideGenerationTimestamp=true,pubName=openapi"
java $JAVA_OPTS -jar $executable $ags
# Generate proto and put it to the sample
-ags="$@ generate -t modules/openapi-generator/src/main/resources/dart-jaguar -i modules/openapi-generator/src/test/resources/2_0/petstore-proto.yaml -g dart-jaguar -o samples/client/petstore/dart-jaguar/openapi_proto -Dserialization=proto -DhideGenerationTimestamp=true -DpubName=openapi"
+ags="$@ generate -t modules/openapi-generator/src/main/resources/dart-jaguar -i modules/openapi-generator/src/test/resources/2_0/petstore-proto.yaml -g dart-jaguar -o samples/client/petstore/dart-jaguar/openapi_proto --additional-properties serialization=proto,hideGenerationTimestamp=true,pubName=openapi"
java $JAVA_OPTS -jar $executable $ags
# There is a proposal to allow importing different libraries depending on the environment:
diff --git a/bin/dart-petstore.sh b/bin/dart-petstore.sh
index 669105c6ae5..ee60cb6c4f8 100755
--- a/bin/dart-petstore.sh
+++ b/bin/dart-petstore.sh
@@ -29,18 +29,18 @@ fi
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
# Generate non-browserClient
-ags="generate -t modules/openapi-generator/src/main/resources/dart -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g dart -o samples/client/petstore/dart/openapi -DhideGenerationTimestamp=true -DbrowserClient=false --additional-properties supportDart2=false $@"
+ags="generate -t modules/openapi-generator/src/main/resources/dart -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g dart -o samples/client/petstore/dart/openapi --additional-properties hideGenerationTimestamp=true,browserClient=false,supportDart2=false $@"
# then options to generate the library for vm would be:
-#ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g dart -o samples/client/petstore/dart/openapi_vm -DbrowserClient=false -DpubName=openapi_vm --additional-properties supportDart2=false $@"
+#ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g dart -o samples/client/petstore/dart/openapi_vm --additional-properties browserClient=false,pubName=openapi_vm --additional-properties supportDart2=false $@"
java $JAVA_OPTS -jar $executable $ags
# Generate browserClient
-ags="generate -t modules/openapi-generator/src/main/resources/dart -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g dart -o samples/client/petstore/dart/openapi-browser-client -DhideGenerationTimestamp=true -DbrowserClient=true --additional-properties supportDart2=false $@"
+ags="generate -t modules/openapi-generator/src/main/resources/dart -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g dart -o samples/client/petstore/dart/openapi-browser-client --additional-properties hideGenerationTimestamp=true,browserClient=true,supportDart2=false $@"
java $JAVA_OPTS -jar $executable $ags
# Generate non-browserClient and put it to the flutter sample app
-ags="generate -t modules/openapi-generator/src/main/resources/dart -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g dart -o samples/client/petstore/dart/flutter_petstore/openapi -DhideGenerationTimestamp=true -DbrowserClient=false --additional-properties supportDart2=false $@"
+ags="generate -t modules/openapi-generator/src/main/resources/dart -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g dart -o samples/client/petstore/dart/flutter_petstore/openapi --additional-properties hideGenerationTimestamp=true,browserClient=false,supportDart2=false $@"
java $JAVA_OPTS -jar $executable $ags
# There is a proposal to allow importing different libraries depending on the environment:
diff --git a/bin/dart2-petstore.sh b/bin/dart2-petstore.sh
index 8fa61715ada..e8a57ffca7e 100755
--- a/bin/dart2-petstore.sh
+++ b/bin/dart2-petstore.sh
@@ -29,18 +29,18 @@ fi
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
# Generate non-browserClient
-ags="generate -t modules/openapi-generator/src/main/resources/dart -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g dart -o samples/client/petstore/dart2/openapi -DhideGenerationTimestamp=true -DbrowserClient=false $@"
+ags="generate -t modules/openapi-generator/src/main/resources/dart -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g dart -o samples/client/petstore/dart2/openapi --additional-properties hideGenerationTimestamp=true,browserClient=false $@"
# then options to generate the library for vm would be:
-#ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g dart -o samples/client/petstore/dart2/openapi_vm -DbrowserClient=false -DpubName=openapi_vm $@"
+#ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g dart -o samples/client/petstore/dart2/openapi_vm --additional-properties browserClient=false,pubName=openapi_vm $@"
java $JAVA_OPTS -jar $executable $ags
# Generate browserClient
-ags="generate -t modules/openapi-generator/src/main/resources/dart -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g dart -o samples/client/petstore/dart2/openapi-browser-client -DhideGenerationTimestamp=true -DbrowserClient=true $@"
+ags="generate -t modules/openapi-generator/src/main/resources/dart -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g dart -o samples/client/petstore/dart2/openapi-browser-client --additional-properties hideGenerationTimestamp=true,browserClient=true $@"
java $JAVA_OPTS -jar $executable $ags
# Generate non-browserClient and put it to the flutter sample app
-ags="generate -t modules/openapi-generator/src/main/resources/dart -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g dart -o samples/client/petstore/dart2/flutter_petstore/openapi -DhideGenerationTimestamp=true -DbrowserClient=false $@"
+ags="generate -t modules/openapi-generator/src/main/resources/dart -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g dart -o samples/client/petstore/dart2/flutter_petstore/openapi --additional-properties hideGenerationTimestamp=true,browserClient=false $@"
java $JAVA_OPTS -jar $executable $ags
# There is a proposal to allow importing different libraries depending on the environment:
diff --git a/bin/erlang-petstore-client.sh b/bin/erlang-petstore-client.sh
index 7afeffd2e3f..77ee5acf0ef 100755
--- a/bin/erlang-petstore-client.sh
+++ b/bin/erlang-petstore-client.sh
@@ -27,6 +27,6 @@ fi
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
-ags="generate -t modules/openapi-generator/src/main/resources/erlang-client -DpackageName=petstore -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g erlang-client -o samples/client/petstore/erlang-client $@"
+ags="generate -t modules/openapi-generator/src/main/resources/erlang-client --additional-properties packageName=petstore -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g erlang-client -o samples/client/petstore/erlang-client $@"
java $JAVA_OPTS -jar $executable $ags
diff --git a/bin/erlang-petstore-proper.sh b/bin/erlang-petstore-proper.sh
index 409b5f2eae4..4c19eec46df 100755
--- a/bin/erlang-petstore-proper.sh
+++ b/bin/erlang-petstore-proper.sh
@@ -27,6 +27,6 @@ fi
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
-ags="generate -t modules/openapi-generator/src/main/resources/erlang-proper -DpackageName=petstore -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g erlang-proper -o samples/client/petstore/erlang-proper $@"
+ags="generate -t modules/openapi-generator/src/main/resources/erlang-proper --additional-properties packageName=petstore -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g erlang-proper -o samples/client/petstore/erlang-proper $@"
java $JAVA_OPTS -jar $executable $ags
diff --git a/bin/go-gin-petstore-server.sh b/bin/go-gin-petstore-server.sh
index 1ac7605d791..b18bffcdff7 100755
--- a/bin/go-gin-petstore-server.sh
+++ b/bin/go-gin-petstore-server.sh
@@ -35,7 +35,7 @@ rm -rf $STUB_DIR
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
-ags="generate -t modules/openapi-generator/src/main/resources/go-gin-server -i $SPEC -g $GENERATOR -o $STUB_DIR -DpackageName=petstoreserver --additional-properties hideGenerationTimestamp=true -Dservice $@"
+ags="generate -t modules/openapi-generator/src/main/resources/go-gin-server -i $SPEC -g $GENERATOR -o $STUB_DIR --additional-properties packageName=petstoreserver --additional-properties hideGenerationTimestamp=true $@"
java $JAVA_OPTS -jar $executable $ags
#!/usr/bin/env bash
\ No newline at end of file
diff --git a/bin/go-petstore-server.sh b/bin/go-petstore-server.sh
index 32dfa8e93c4..3e5c19e436b 100755
--- a/bin/go-petstore-server.sh
+++ b/bin/go-petstore-server.sh
@@ -35,6 +35,6 @@ rm -rf $STUB_DIR
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
-ags="generate -t modules/openapi-generator/src/main/resources/go-server -i $SPEC -g $GENERATOR -o $STUB_DIR -DpackageName=petstoreserver --additional-properties hideGenerationTimestamp=true -Dservice $@"
+ags="generate -t modules/openapi-generator/src/main/resources/go-server -i $SPEC -g $GENERATOR -o $STUB_DIR --additional-properties packageName=petstoreserver,hideGenerationTimestamp=true $@"
java $JAVA_OPTS -jar $executable $ags
diff --git a/bin/go-petstore-withxml.sh b/bin/go-petstore-withxml.sh
index 50b8cb27833..4c575497254 100755
--- a/bin/go-petstore-withxml.sh
+++ b/bin/go-petstore-withxml.sh
@@ -34,6 +34,6 @@ rm -rf $STUB_DIR
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
-ags="generate -t modules/openapi-generator/src/main/resources/go -i $SPEC -g $GENERATOR -o $STUB_DIR -DpackageName=petstore,withXml=true,withGoCodegenComment=true $@"
+ags="generate -t modules/openapi-generator/src/main/resources/go -i $SPEC -g $GENERATOR -o $STUB_DIR --additional-properties packageName=petstore,withXml=true,withGoCodegenComment=true $@"
java $JAVA_OPTS -jar $executable $ags
diff --git a/bin/go-petstore.sh b/bin/go-petstore.sh
index 865212c93ba..7dc5fe4907b 100755
--- a/bin/go-petstore.sh
+++ b/bin/go-petstore.sh
@@ -34,6 +34,6 @@ rm -rf $STUB_DIR
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
-ags="generate -t modules/openapi-generator/src/main/resources/go -i $SPEC -g $GENERATOR -o $STUB_DIR -DpackageName=petstore $@"
+ags="generate -t modules/openapi-generator/src/main/resources/go -i $SPEC -g $GENERATOR -o $STUB_DIR --additional-properties packageName=petstore $@"
java $JAVA_OPTS -jar $executable $ags
diff --git a/bin/graphql-nodejs-express-server.sh b/bin/graphql-nodejs-express-server.sh
index b257e529935..69ee4a3bf55 100755
--- a/bin/graphql-nodejs-express-server.sh
+++ b/bin/graphql-nodejs-express-server.sh
@@ -27,6 +27,6 @@ fi
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties $@"
-ags="generate -t modules/openapi-generator/src/main/resources/graphql-nodejs-express-server -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g graphql-nodejs-express-server -o samples/server/petstore/graphql-nodejs-express-server -DpackageName=petstore $@"
+ags="generate -t modules/openapi-generator/src/main/resources/graphql-nodejs-express-server -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g graphql-nodejs-express-server -o samples/server/petstore/graphql-nodejs-express-server --additional-properties packageName=petstore $@"
java $JAVA_OPTS -jar $executable $ags
diff --git a/bin/graphql-schema-petstore.sh b/bin/graphql-schema-petstore.sh
index 10dfb5a5dc9..c6f36de2b5e 100755
--- a/bin/graphql-schema-petstore.sh
+++ b/bin/graphql-schema-petstore.sh
@@ -27,6 +27,6 @@ fi
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties $@"
-ags="generate -t modules/openapi-generator/src/main/resources/graphql-schema -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g graphql-schema -o samples/config/petstore/graphql-schema -DpackageName=petstore $@"
+ags="generate -t modules/openapi-generator/src/main/resources/graphql-schema -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g graphql-schema -o samples/config/petstore/graphql-schema --additional-properties packageName=petstore $@"
java $JAVA_OPTS -jar $executable $ags
diff --git a/bin/groovy-petstore.sh b/bin/groovy-petstore.sh
index 99fa2e940a5..1a9db858a3c 100755
--- a/bin/groovy-petstore.sh
+++ b/bin/groovy-petstore.sh
@@ -27,5 +27,5 @@ fi
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
-ags="generate -t modules/openapi-generator/src/main/resources/Groovy/ -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g groovy -o samples/client/petstore/groovy -DhideGenerationTimestamp=true $@"
+ags="generate -t modules/openapi-generator/src/main/resources/Groovy/ -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g groovy -o samples/client/petstore/groovy --additional-properties hideGenerationTimestamp=true $@"
java $JAVA_OPTS -jar $executable $ags
diff --git a/bin/java-inflector-petstore-server.sh b/bin/java-inflector-petstore-server.sh
index 1456a7457fd..b37e444a923 100755
--- a/bin/java-inflector-petstore-server.sh
+++ b/bin/java-inflector-petstore-server.sh
@@ -27,6 +27,6 @@ fi
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
-ags="generate -t modules/openapi-generator/src/main/resources/JavaInflector -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java-inflector -o samples/server/petstore/java-inflector -DhideGenerationTimestamp=true $@"
+ags="generate -t modules/openapi-generator/src/main/resources/JavaInflector -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java-inflector -o samples/server/petstore/java-inflector --additional-properties hideGenerationTimestamp=true $@"
java $JAVA_OPTS -jar $executable $ags
diff --git a/bin/java-msf4j-petstore-server.sh b/bin/java-msf4j-petstore-server.sh
index 8df820296c2..46ae1caef9a 100755
--- a/bin/java-msf4j-petstore-server.sh
+++ b/bin/java-msf4j-petstore-server.sh
@@ -27,7 +27,7 @@ fi
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
-ags="generate -t modules/openapi-generator/src/main/resources/java-msf4j-server -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java-msf4j -o samples/server/petstore/java-msf4j/ -DhideGenerationTimestamp=true --additional-properties artifactId=java-msf4j-server $@"
+ags="generate -t modules/openapi-generator/src/main/resources/java-msf4j-server -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java-msf4j -o samples/server/petstore/java-msf4j/ --additional-properties hideGenerationTimestamp=true --additional-properties artifactId=java-msf4j-server $@"
echo "Removing files and folders under samples/server/petstore/java-msf4j/src/main"
rm -rf samples/server/petstore/java-msf4j/src/main
diff --git a/bin/java-petstore-feign-10x.sh b/bin/java-petstore-feign-10x.sh
index 3ee6bd937e1..15b1b40e214 100755
--- a/bin/java-petstore-feign-10x.sh
+++ b/bin/java-petstore-feign-10x.sh
@@ -27,7 +27,7 @@ fi
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
-ags="generate -t modules/openapi-generator/src/main/resources/Java/libraries/feign -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin/java-petstore-feign-10x.json -o samples/client/petstore/java/feign10x -DhideGenerationTimestamp=true -DbooleanGetterPrefix=is $@"
+ags="generate -t modules/openapi-generator/src/main/resources/Java/libraries/feign -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin/java-petstore-feign-10x.json -o samples/client/petstore/java/feign10x --additional-properties hideGenerationTimestamp=true,booleanGetterPrefix=is $@"
echo "Removing files and folders under samples/client/petstore/java/feign10x/src/main"
rm -rf samples/client/petstore/java/feign10x/src/main
diff --git a/bin/java-petstore-feign.sh b/bin/java-petstore-feign.sh
index f6ead964ace..abac67deb9d 100755
--- a/bin/java-petstore-feign.sh
+++ b/bin/java-petstore-feign.sh
@@ -27,7 +27,7 @@ fi
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
-ags="generate -t modules/openapi-generator/src/main/resources/Java/libraries/feign -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin/java-petstore-feign-9x.json -o samples/client/petstore/java/feign -DhideGenerationTimestamp=true -DbooleanGetterPrefix=is $@"
+ags="generate -t modules/openapi-generator/src/main/resources/Java/libraries/feign -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin/java-petstore-feign-9x.json -o samples/client/petstore/java/feign --additional-properties hideGenerationTimestamp=true,booleanGetterPrefix=is $@"
echo "Removing files and folders under samples/client/petstore/java/feign/src/main"
rm -rf samples/client/petstore/java/feign/src/main
diff --git a/bin/java-petstore-google-api-client.sh b/bin/java-petstore-google-api-client.sh
index ace4eb43870..20e3577f197 100755
--- a/bin/java-petstore-google-api-client.sh
+++ b/bin/java-petstore-google-api-client.sh
@@ -27,7 +27,7 @@ fi
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
-ags="generate -t modules/openapi-generator/src/main/resources/Java/libraries/google-api-client -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin/java-petstore-google-api-client.json -o samples/client/petstore/java/google-api-client -DhideGenerationTimestamp=true $@"
+ags="generate -t modules/openapi-generator/src/main/resources/Java/libraries/google-api-client -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin/java-petstore-google-api-client.json -o samples/client/petstore/java/google-api-client --additional-properties hideGenerationTimestamp=true $@"
echo "Removing files and folders under samples/client/petstore/java/google-api-client/src/main"
rm -rf samples/client/petstore/java/google-api-client/src/main
diff --git a/bin/java-petstore-jersey1.sh b/bin/java-petstore-jersey1.sh
index 2a6e6ab8f71..cb6e0ea3a6b 100755
--- a/bin/java-petstore-jersey1.sh
+++ b/bin/java-petstore-jersey1.sh
@@ -27,7 +27,7 @@ fi
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
-ags="generate --artifact-id petstore-java-client-jersey1 -t modules/openapi-generator/src/main/resources/Java -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java -o samples/client/petstore/java/jersey1 -DhideGenerationTimestamp=true --library=jersey1 --additional-properties useNullForUnknownEnumValue=true $@"
+ags="generate --artifact-id petstore-java-client-jersey1 -t modules/openapi-generator/src/main/resources/Java -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java -o samples/client/petstore/java/jersey1 --additional-properties hideGenerationTimestamp=true --library=jersey1 --additional-properties useNullForUnknownEnumValue=true $@"
echo "Removing files and folders under samples/client/petstore/java/jersey1/src/main"
rm -rf samples/client/petstore/java/jersey1/src/main
diff --git a/bin/java-petstore-jersey2-java6.sh b/bin/java-petstore-jersey2-java6.sh
index b0d32f84db6..4a5b032d0db 100755
--- a/bin/java-petstore-jersey2-java6.sh
+++ b/bin/java-petstore-jersey2-java6.sh
@@ -27,7 +27,7 @@ fi
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
-ags="generate --artifact-id petstore-jersey2-java6 -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin/java-petstore-jersey2.json -o samples/client/petstore/java/jersey2-java6 -DhideGenerationTimestamp=true,supportJava6=true,booleanGetterPrefix=is $@"
+ags="generate --artifact-id petstore-jersey2-java6 -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin/java-petstore-jersey2.json -o samples/client/petstore/java/jersey2-java6 --additional-properties hideGenerationTimestamp=true,supportJava6=true,booleanGetterPrefix=is $@"
echo "Removing files and folders under samples/client/petstore/java/jersey2-java6/src/main"
rm -rf samples/client/petstore/java/jersey2-java6/src/main
diff --git a/bin/java-petstore-jersey2.sh b/bin/java-petstore-jersey2.sh
index 05fc95fbc9e..e91dba6ff00 100755
--- a/bin/java-petstore-jersey2.sh
+++ b/bin/java-petstore-jersey2.sh
@@ -27,7 +27,7 @@ fi
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
-ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin/java-petstore-jersey2.json -o samples/client/petstore/java/jersey2 -DhideGenerationTimestamp=true $@"
+ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin/java-petstore-jersey2.json -o samples/client/petstore/java/jersey2 --additional-properties hideGenerationTimestamp=true $@"
echo "Removing files and folders under samples/client/petstore/java/jersey2/src/main"
rm -rf samples/client/petstore/java/jersey2/src/main
diff --git a/bin/java-petstore-okhttp-gson-parcelable.sh b/bin/java-petstore-okhttp-gson-parcelable.sh
index 183aa87693a..ae4fbfd8d2b 100755
--- a/bin/java-petstore-okhttp-gson-parcelable.sh
+++ b/bin/java-petstore-okhttp-gson-parcelable.sh
@@ -27,7 +27,7 @@ fi
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
-ags="generate --artifact-id petstore-okhttp-gson-parcelableModel -t modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin/java-petstore-okhttp-gson.json -o samples/client/petstore/java/okhttp-gson-parcelableModel -DhideGenerationTimestamp=true,parcelableModel=true $@"
+ags="generate --artifact-id petstore-okhttp-gson-parcelableModel -t modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin/java-petstore-okhttp-gson.json -o samples/client/petstore/java/okhttp-gson-parcelableModel --additional-properties hideGenerationTimestamp=true,parcelableModel=true $@"
rm -rf samples/client/petstore/java/okhttp-gson-parcelableModel/src/main
find samples/client/petstore/java/okhttp-gson-parcelableModel -maxdepth 1 -type f ! -name "README.md" -exec rm {} +
diff --git a/bin/java-petstore-okhttp-gson.sh b/bin/java-petstore-okhttp-gson.sh
index 3d788766122..8e7e7ac84e4 100755
--- a/bin/java-petstore-okhttp-gson.sh
+++ b/bin/java-petstore-okhttp-gson.sh
@@ -27,7 +27,7 @@ fi
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
-ags="generate -t modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin/java-petstore-okhttp-gson.json -o samples/client/petstore/java/okhttp-gson -DhideGenerationTimestamp=true $@"
+ags="generate -t modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin/java-petstore-okhttp-gson.json -o samples/client/petstore/java/okhttp-gson --additional-properties hideGenerationTimestamp=true $@"
rm -rf samples/client/petstore/java/okhttp-gson/src/main
find samples/client/petstore/java/okhttp-gson -maxdepth 1 -type f ! -name "README.md" -exec rm {} +
diff --git a/bin/java-petstore-rest-assured.sh b/bin/java-petstore-rest-assured.sh
index 012f2dced08..cacc3cf3c27 100755
--- a/bin/java-petstore-rest-assured.sh
+++ b/bin/java-petstore-rest-assured.sh
@@ -27,7 +27,7 @@ fi
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
-ags="generate -t modules/openapi-generator/src/main/resources/Java/libraries/rest-assured -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin/java-petstore-rest-assured.json -o samples/client/petstore/java/rest-assured -DhideGenerationTimestamp=true --additional-properties booleanGetterPrefix=is $@"
+ags="generate -t modules/openapi-generator/src/main/resources/Java/libraries/rest-assured -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin/java-petstore-rest-assured.json -o samples/client/petstore/java/rest-assured --additional-properties hideGenerationTimestamp=true --additional-properties booleanGetterPrefix=is $@"
echo "Removing files and folders under samples/client/petstore/java/rest-assured/src/main"
rm -rf samples/client/petstore/java/rest-assured/src/main
diff --git a/bin/java-petstore-resteasy.sh b/bin/java-petstore-resteasy.sh
index c0a0b0c188c..ae611374131 100755
--- a/bin/java-petstore-resteasy.sh
+++ b/bin/java-petstore-resteasy.sh
@@ -27,7 +27,7 @@ fi
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
-ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin/java-petstore-resteasy.json -o samples/client/petstore/java/resteasy -DhideGenerationTimestamp=true $@"
+ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin/java-petstore-resteasy.json -o samples/client/petstore/java/resteasy --additional-properties hideGenerationTimestamp=true $@"
echo "Removing files and folders under samples/client/petstore/java/resteasy/src/main"
rm -rf samples/client/petstore/java/resteasy/src/main
diff --git a/bin/java-petstore-resttemplate-withxml.sh b/bin/java-petstore-resttemplate-withxml.sh
index fe44afde84d..19c142a2d4f 100755
--- a/bin/java-petstore-resttemplate-withxml.sh
+++ b/bin/java-petstore-resttemplate-withxml.sh
@@ -27,7 +27,7 @@ fi
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
-ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml --artifact-id petstore-resttemplate-withxml -g java -c bin/java-petstore-resttemplate.json -o samples/client/petstore/java/resttemplate-withXml -DhideGenerationTimestamp=true,withXml=true $@"
+ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml --artifact-id petstore-resttemplate-withxml -g java -c bin/java-petstore-resttemplate.json -o samples/client/petstore/java/resttemplate-withXml --additional-properties hideGenerationTimestamp=true,withXml=true $@"
echo "Removing files and folders under samples/client/petstore/java/resttemplate/src/main"
rm -rf samples/client/petstore/java/resttemplate-withXml/src/main
diff --git a/bin/java-petstore-resttemplate.sh b/bin/java-petstore-resttemplate.sh
index e1cf8ac27bc..d37d40059ff 100755
--- a/bin/java-petstore-resttemplate.sh
+++ b/bin/java-petstore-resttemplate.sh
@@ -27,7 +27,7 @@ fi
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
-ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin/java-petstore-resttemplate.json -o samples/client/petstore/java/resttemplate -DhideGenerationTimestamp=true $@"
+ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin/java-petstore-resttemplate.json -o samples/client/petstore/java/resttemplate --additional-properties hideGenerationTimestamp=true $@"
echo "Removing files and folders under samples/client/petstore/java/resttemplate/src/main"
rm -rf samples/client/petstore/java/resttemplate/src/main
diff --git a/bin/java-petstore-retrofit.sh b/bin/java-petstore-retrofit.sh
index e368e1b1b3a..127f16b44eb 100755
--- a/bin/java-petstore-retrofit.sh
+++ b/bin/java-petstore-retrofit.sh
@@ -27,7 +27,7 @@ fi
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
-ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin/java-petstore-retrofit.json -o samples/client/petstore/java/retrofit -DhideGenerationTimestamp=true,dateLibrary=joda $@"
+ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin/java-petstore-retrofit.json -o samples/client/petstore/java/retrofit --additional-properties hideGenerationTimestamp=true,dateLibrary=joda $@"
echo "Removing files and folders under samples/client/petstore/java/retrofit/src/main"
rm -rf samples/client/petstore/java/retrofit/src/main
diff --git a/bin/java-petstore-retrofit2-play24.sh b/bin/java-petstore-retrofit2-play24.sh
index fa37a6f0d4b..4b94855865e 100755
--- a/bin/java-petstore-retrofit2-play24.sh
+++ b/bin/java-petstore-retrofit2-play24.sh
@@ -27,7 +27,7 @@ fi
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
-ags="generate --artifact-id petstore-java-client-retrofit2-play24 -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin/java-petstore-retrofit2-play24.json -o samples/client/petstore/java/retrofit2-play24 -DhideGenerationTimestamp=true $@"
+ags="generate --artifact-id petstore-java-client-retrofit2-play24 -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin/java-petstore-retrofit2-play24.json -o samples/client/petstore/java/retrofit2-play24 --additional-properties hideGenerationTimestamp=true $@"
echo "Removing files and folders under samples/client/petstore/java/retrofit2-play24/src/main"
rm -rf samples/client/petstore/java/retrofit2-play24/src/main
diff --git a/bin/java-petstore-retrofit2-play25.sh b/bin/java-petstore-retrofit2-play25.sh
index f06506493f6..1954c2e045e 100755
--- a/bin/java-petstore-retrofit2-play25.sh
+++ b/bin/java-petstore-retrofit2-play25.sh
@@ -27,7 +27,7 @@ fi
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
-ags="generate --artifact-id petstore-java-client-retrofit2-play25 -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin/java-petstore-retrofit2-play25.json -o samples/client/petstore/java/retrofit2-play25 -DhideGenerationTimestamp=true $@"
+ags="generate --artifact-id petstore-java-client-retrofit2-play25 -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin/java-petstore-retrofit2-play25.json -o samples/client/petstore/java/retrofit2-play25 --additional-properties hideGenerationTimestamp=true $@"
echo "Removing files and folders under samples/client/petstore/java/retrofit2-play25/src/main"
rm -rf samples/client/petstore/java/retrofit2-play25/src/main
diff --git a/bin/java-petstore-retrofit2-play26.sh b/bin/java-petstore-retrofit2-play26.sh
index edec7c1d214..0c582d09af1 100755
--- a/bin/java-petstore-retrofit2-play26.sh
+++ b/bin/java-petstore-retrofit2-play26.sh
@@ -27,7 +27,7 @@ fi
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
-ags="generate --artifact-id petstore-java-client-retrofit2-play26 -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin/java-petstore-retrofit2-play26.json -o samples/client/petstore/java/retrofit2-play26 -DhideGenerationTimestamp=true $@"
+ags="generate --artifact-id petstore-java-client-retrofit2-play26 -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin/java-petstore-retrofit2-play26.json -o samples/client/petstore/java/retrofit2-play26 --additional-properties hideGenerationTimestamp=true $@"
echo "Removing files and folders under samples/client/petstore/java/retrofit2-play26/src/main"
rm -rf samples/client/petstore/java/retrofit2-play26/src/main
diff --git a/bin/java-petstore-retrofit2.sh b/bin/java-petstore-retrofit2.sh
index 18251325cfe..2dce65f2724 100755
--- a/bin/java-petstore-retrofit2.sh
+++ b/bin/java-petstore-retrofit2.sh
@@ -27,7 +27,7 @@ fi
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
-ags="generate -t modules/openapi-generator/src/main/resources/Java/libraries/retrofit2 -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin/java-petstore-retrofit2.json -o samples/client/petstore/java/retrofit2 -DhideGenerationTimestamp=true $@"
+ags="generate -t modules/openapi-generator/src/main/resources/Java/libraries/retrofit2 -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin/java-petstore-retrofit2.json -o samples/client/petstore/java/retrofit2 --additional-properties hideGenerationTimestamp=true $@"
echo "Removing files and folders under samples/client/petstore/java/retrofit2/src/main"
rm -rf samples/client/petstore/java/retrofit2/src/main
diff --git a/bin/java-petstore-retrofit2rx.sh b/bin/java-petstore-retrofit2rx.sh
index fd29f093902..74729919db1 100755
--- a/bin/java-petstore-retrofit2rx.sh
+++ b/bin/java-petstore-retrofit2rx.sh
@@ -27,7 +27,7 @@ fi
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
-ags="generate -t modules/openapi-generator/src/main/resources/Java/libraries/retrofit2 -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin/java-petstore-retrofit2rx.json -o samples/client/petstore/java/retrofit2rx -DuseRxJava=true,hideGenerationTimestamp=true $@"
+ags="generate -t modules/openapi-generator/src/main/resources/Java/libraries/retrofit2 -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin/java-petstore-retrofit2rx.json -o samples/client/petstore/java/retrofit2rx --additional-properties useRxJava=true,hideGenerationTimestamp=true $@"
echo "Removing files and folders under samples/client/petstore/java/retrofit2rx/src/main"
rm -rf samples/client/petstore/java/retrofit2rx/src/main
diff --git a/bin/java-petstore-retrofit2rx2.sh b/bin/java-petstore-retrofit2rx2.sh
index 33c35a9a6d3..05d6acb7bd0 100755
--- a/bin/java-petstore-retrofit2rx2.sh
+++ b/bin/java-petstore-retrofit2rx2.sh
@@ -27,7 +27,7 @@ fi
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
-ags="generate -t modules/openapi-generator/src/main/resources/Java/libraries/retrofit2 -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin/java-petstore-retrofit2rx2.json -o samples/client/petstore/java/retrofit2rx2 -DuseRxJava2=true,hideGenerationTimestamp=true $@"
+ags="generate -t modules/openapi-generator/src/main/resources/Java/libraries/retrofit2 -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin/java-petstore-retrofit2rx2.json -o samples/client/petstore/java/retrofit2rx2 --additional-properties useRxJava2=true,hideGenerationTimestamp=true $@"
echo "Removing files and folders under samples/client/petstore/java/retrofit2rx2/src/main"
rm -rf samples/client/petstore/java/retrofit2rx2/src/main
diff --git a/bin/java-petstore-vertx.sh b/bin/java-petstore-vertx.sh
index badb9eff0f6..8eeb623b278 100755
--- a/bin/java-petstore-vertx.sh
+++ b/bin/java-petstore-vertx.sh
@@ -27,7 +27,7 @@ fi
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
-ags="generate -t modules/openapi-generator/src/main/resources/Java/libraries/vertx -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin/java-petstore-vertx.json -o samples/client/petstore/java/vertx -DhideGenerationTimestamp=true $@"
+ags="generate -t modules/openapi-generator/src/main/resources/Java/libraries/vertx -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin/java-petstore-vertx.json -o samples/client/petstore/java/vertx --additional-properties hideGenerationTimestamp=true $@"
echo "Removing files and folders under samples/client/petstore/java/vertx/src/main"
rm -rf samples/client/petstore/java/vertx/src/main
diff --git a/bin/java-petstore-webclient.sh b/bin/java-petstore-webclient.sh
index 7c737060192..c9402c60c0a 100755
--- a/bin/java-petstore-webclient.sh
+++ b/bin/java-petstore-webclient.sh
@@ -27,7 +27,7 @@ fi
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
-ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin/java-petstore-webclient.json -o samples/client/petstore/java/webclient -DhideGenerationTimestamp=true $@"
+ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin/java-petstore-webclient.json -o samples/client/petstore/java/webclient --additional-properties hideGenerationTimestamp=true $@"
echo "Removing files and folders under samples/client/petstore/java/webclient/src/main"
rm -rf samples/client/petstore/java/webclient/src/main
diff --git a/bin/java-pkmst-petstore-server.sh b/bin/java-pkmst-petstore-server.sh
index 9d98201b688..25d1c953197 100755
--- a/bin/java-pkmst-petstore-server.sh
+++ b/bin/java-pkmst-petstore-server.sh
@@ -27,7 +27,7 @@ fi
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
-ags="generate -t modules/openapi-generator/src/main/resources/java-pkmst -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g java-pkmst -o samples/server/petstore/java-pkmst/ -DhideGenerationTimestamp=true $@"
+ags="generate -t modules/openapi-generator/src/main/resources/java-pkmst -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g java-pkmst -o samples/server/petstore/java-pkmst/ --additional-properties hideGenerationTimestamp=true $@"
echo "Removing files and folders under samples/server/petstore/java-pkmst/src/main"
rm -rf samples/server/petstore/java-pkmst/src/main
diff --git a/bin/java-play-framework-petstore-server-api-package-override.sh b/bin/java-play-framework-petstore-server-api-package-override.sh
index d5069d98257..cba7507689e 100755
--- a/bin/java-play-framework-petstore-server-api-package-override.sh
+++ b/bin/java-play-framework-petstore-server-api-package-override.sh
@@ -27,7 +27,7 @@ fi
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
-ags="generate -t modules/openapi-generator/src/main/resources/JavaPlayFramework -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g java-play-framework -o samples/server/petstore/java-play-framework-api-package-override -DhideGenerationTimestamp=true,apiPackage=com.puppies.store.apis $@"
+ags="generate -t modules/openapi-generator/src/main/resources/JavaPlayFramework -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g java-play-framework -o samples/server/petstore/java-play-framework-api-package-override --additional-properties hideGenerationTimestamp=true,apiPackage=com.puppies.store.apis $@"
java $JAVA_OPTS -jar $executable $ags
diff --git a/bin/java-play-framework-petstore-server-async.sh b/bin/java-play-framework-petstore-server-async.sh
index 86d5baf77f4..c09f9772fa3 100755
--- a/bin/java-play-framework-petstore-server-async.sh
+++ b/bin/java-play-framework-petstore-server-async.sh
@@ -27,6 +27,6 @@ fi
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
-ags="generate -t modules/openapi-generator/src/main/resources/JavaPlayFramework -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g java-play-framework -c bin/java-play-framework-petstore-server-async.json -o samples/server/petstore/java-play-framework-async -DhideGenerationTimestamp=true $@"
+ags="generate -t modules/openapi-generator/src/main/resources/JavaPlayFramework -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g java-play-framework -c bin/java-play-framework-petstore-server-async.json -o samples/server/petstore/java-play-framework-async --additional-properties hideGenerationTimestamp=true $@"
java $JAVA_OPTS -jar $executable $ags
diff --git a/bin/java-play-framework-petstore-server-controller-only.sh b/bin/java-play-framework-petstore-server-controller-only.sh
index 94bf0b72777..85a23261221 100755
--- a/bin/java-play-framework-petstore-server-controller-only.sh
+++ b/bin/java-play-framework-petstore-server-controller-only.sh
@@ -27,7 +27,7 @@ fi
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
-ags="generate -t modules/openapi-generator/src/main/resources/JavaPlayFramework -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g java-play-framework -o samples/server/petstore/java-play-framework-controller-only -DhideGenerationTimestamp=true,controllerOnly=true $@"
+ags="generate -t modules/openapi-generator/src/main/resources/JavaPlayFramework -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g java-play-framework -o samples/server/petstore/java-play-framework-controller-only --additional-properties hideGenerationTimestamp=true,controllerOnly=true $@"
java $JAVA_OPTS -jar $executable $ags
diff --git a/bin/java-play-framework-petstore-server-fake-endpoints.sh b/bin/java-play-framework-petstore-server-fake-endpoints.sh
index d9c45fca07a..0ae05412047 100755
--- a/bin/java-play-framework-petstore-server-fake-endpoints.sh
+++ b/bin/java-play-framework-petstore-server-fake-endpoints.sh
@@ -27,7 +27,7 @@ fi
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
-ags="generate -t modules/openapi-generator/src/main/resources/JavaPlayFramework -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java-play-framework -o samples/server/petstore/java-play-framework-fake-endpoints -DhideGenerationTimestamp=true $@"
+ags="generate -t modules/openapi-generator/src/main/resources/JavaPlayFramework -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java-play-framework -o samples/server/petstore/java-play-framework-fake-endpoints --additional-properties hideGenerationTimestamp=true $@"
java $JAVA_OPTS -jar $executable $ags
diff --git a/bin/java-play-framework-petstore-server-no-bean-validation.sh b/bin/java-play-framework-petstore-server-no-bean-validation.sh
index b824bc82fbd..92b924b73d0 100755
--- a/bin/java-play-framework-petstore-server-no-bean-validation.sh
+++ b/bin/java-play-framework-petstore-server-no-bean-validation.sh
@@ -27,7 +27,7 @@ fi
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
-ags="generate -t modules/openapi-generator/src/main/resources/JavaPlayFramework -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g java-play-framework -o samples/server/petstore/java-play-framework-no-bean-validation -DhideGenerationTimestamp=true,useBeanValidation=false $@"
+ags="generate -t modules/openapi-generator/src/main/resources/JavaPlayFramework -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g java-play-framework -o samples/server/petstore/java-play-framework-no-bean-validation --additional-properties hideGenerationTimestamp=true,useBeanValidation=false $@"
java $JAVA_OPTS -jar $executable $ags
diff --git a/bin/java-play-framework-petstore-server-no-exception-handling.sh b/bin/java-play-framework-petstore-server-no-exception-handling.sh
index c798713aacc..b9fe281c4c1 100755
--- a/bin/java-play-framework-petstore-server-no-exception-handling.sh
+++ b/bin/java-play-framework-petstore-server-no-exception-handling.sh
@@ -27,7 +27,7 @@ fi
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
-ags="generate -t modules/openapi-generator/src/main/resources/JavaPlayFramework -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g java-play-framework -o samples/server/petstore/java-play-framework-no-exception-handling -DhideGenerationTimestamp=true,handleExceptions=false $@"
+ags="generate -t modules/openapi-generator/src/main/resources/JavaPlayFramework -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g java-play-framework -o samples/server/petstore/java-play-framework-no-exception-handling --additional-properties hideGenerationTimestamp=true,handleExceptions=false $@"
java $JAVA_OPTS -jar $executable $ags
diff --git a/bin/java-play-framework-petstore-server-no-interface.sh b/bin/java-play-framework-petstore-server-no-interface.sh
index 42fb56f7a1c..dbc4b8734ab 100755
--- a/bin/java-play-framework-petstore-server-no-interface.sh
+++ b/bin/java-play-framework-petstore-server-no-interface.sh
@@ -27,7 +27,7 @@ fi
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
-ags="generate -t modules/openapi-generator/src/main/resources/JavaPlayFramework -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g java-play-framework -o samples/server/petstore/java-play-framework-no-interface -DhideGenerationTimestamp=true,useInterfaces=false $@"
+ags="generate -t modules/openapi-generator/src/main/resources/JavaPlayFramework -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g java-play-framework -o samples/server/petstore/java-play-framework-no-interface --additional-properties hideGenerationTimestamp=true,useInterfaces=false $@"
java $JAVA_OPTS -jar $executable $ags
diff --git a/bin/java-play-framework-petstore-server-no-swagger-ui.sh b/bin/java-play-framework-petstore-server-no-swagger-ui.sh
index 09e3936bbbb..494a0253161 100755
--- a/bin/java-play-framework-petstore-server-no-swagger-ui.sh
+++ b/bin/java-play-framework-petstore-server-no-swagger-ui.sh
@@ -27,7 +27,7 @@ fi
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
-ags="generate -t modules/openapi-generator/src/main/resources/JavaPlayFramework -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g java-play-framework -o samples/server/petstore/java-play-framework-no-swagger-ui -DhideGenerationTimestamp=true,useSwaggerUI=false $@"
+ags="generate -t modules/openapi-generator/src/main/resources/JavaPlayFramework -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g java-play-framework -o samples/server/petstore/java-play-framework-no-swagger-ui --additional-properties hideGenerationTimestamp=true,useSwaggerUI=false $@"
java $JAVA_OPTS -jar $executable $ags
diff --git a/bin/java-play-framework-petstore-server-no-wrap-calls.sh b/bin/java-play-framework-petstore-server-no-wrap-calls.sh
index 215dcf48ea1..7de56cc566e 100755
--- a/bin/java-play-framework-petstore-server-no-wrap-calls.sh
+++ b/bin/java-play-framework-petstore-server-no-wrap-calls.sh
@@ -27,7 +27,7 @@ fi
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
-ags="generate -t modules/openapi-generator/src/main/resources/JavaPlayFramework -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g java-play-framework -o samples/server/petstore/java-play-framework-no-wrap-calls -DhideGenerationTimestamp=true,wrapCalls=false $@"
+ags="generate -t modules/openapi-generator/src/main/resources/JavaPlayFramework -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g java-play-framework -o samples/server/petstore/java-play-framework-no-wrap-calls --additional-properties hideGenerationTimestamp=true,wrapCalls=false $@"
java $JAVA_OPTS -jar $executable $ags
diff --git a/bin/java-play-framework-petstore-server.sh b/bin/java-play-framework-petstore-server.sh
index cb26c3c0836..b187c2e47b9 100755
--- a/bin/java-play-framework-petstore-server.sh
+++ b/bin/java-play-framework-petstore-server.sh
@@ -27,7 +27,7 @@ fi
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
-ags="generate -t modules/openapi-generator/src/main/resources/JavaPlayFramework -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g java-play-framework -o samples/server/petstore/java-play-framework -DhideGenerationTimestamp=true $@"
+ags="generate -t modules/openapi-generator/src/main/resources/JavaPlayFramework -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g java-play-framework -o samples/server/petstore/java-play-framework --additional-properties hideGenerationTimestamp=true $@"
java $JAVA_OPTS -jar $executable $ags
diff --git a/bin/java-vertx-async-petstore-server.sh b/bin/java-vertx-async-petstore-server.sh
index bdedff11270..519dd79c2b3 100755
--- a/bin/java-vertx-async-petstore-server.sh
+++ b/bin/java-vertx-async-petstore-server.sh
@@ -27,6 +27,6 @@ fi
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
-ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g java-vertx -o samples/server/petstore/java-vertx/async -DvertxSwaggerRouterVersion=1.4.0 -DhideGenerationTimestamp=true $@"
+ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g java-vertx -o samples/server/petstore/java-vertx/async --additional-properties vertxSwaggerRouterVersion=1.4.0,hideGenerationTimestamp=true $@"
java $JAVA_OPTS -jar $executable $ags
diff --git a/bin/java-vertx-rx-petstore-server.sh b/bin/java-vertx-rx-petstore-server.sh
index 051798c8d45..651f03f777d 100755
--- a/bin/java-vertx-rx-petstore-server.sh
+++ b/bin/java-vertx-rx-petstore-server.sh
@@ -27,6 +27,6 @@ fi
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
-ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g java-vertx --artifact-id java-vertx-rx-server -o samples/server/petstore/java-vertx/rx -DvertxSwaggerRouterVersion=1.4.0,rxInterface=true -DhideGenerationTimestamp=true $@"
+ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g java-vertx --artifact-id java-vertx-rx-server -o samples/server/petstore/java-vertx/rx --additional-properties vertxSwaggerRouterVersion=1.4.0,rxInterface=true --additional-properties hideGenerationTimestamp=true $@"
java $JAVA_OPTS -jar $executable $ags
diff --git a/bin/java8-petstore-jersey2.sh b/bin/java8-petstore-jersey2.sh
index 739f75334e6..488fe202f29 100755
--- a/bin/java8-petstore-jersey2.sh
+++ b/bin/java8-petstore-jersey2.sh
@@ -27,7 +27,7 @@ fi
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
-ags="generate --artifact-id petstore-jersey2-java8 -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin/java8-petstore-jersey2.json -o samples/client/petstore/java/jersey2-java8 -DhideGenerationTimestamp=true --additional-properties serverPort=8082 $@"
+ags="generate --artifact-id petstore-jersey2-java8 -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin/java8-petstore-jersey2.json -o samples/client/petstore/java/jersey2-java8 --additional-properties hideGenerationTimestamp=true --additional-properties serverPort=8082 $@"
echo "Removing files and folders under samples/client/petstore/java/jersey2-java8/src/main"
rm -rf samples/client/petstore/java/jersey2-java8/src/main
diff --git a/bin/javascript-es6-petstore.sh b/bin/javascript-es6-petstore.sh
index 8def380b258..7c80155bb15 100755
--- a/bin/javascript-es6-petstore.sh
+++ b/bin/javascript-es6-petstore.sh
@@ -29,6 +29,7 @@ fi
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
ags="generate -t modules/openapi-generator/src/main/resources/Javascript/es6 \
-i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g javascript \
+--additional-properties appName=PetstoreClient \
-o samples/client/petstore/javascript-es6 $@"
-java -DappName=PetstoreClient $JAVA_OPTS -jar $executable $ags
+java $JAVA_OPTS -jar $executable $ags
diff --git a/bin/javascript-flowtyped-petstore.sh b/bin/javascript-flowtyped-petstore.sh
index 92d88319821..061837a6384 100755
--- a/bin/javascript-flowtyped-petstore.sh
+++ b/bin/javascript-flowtyped-petstore.sh
@@ -27,6 +27,6 @@ fi
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
-ags="generate -t modules/openapi-generator/src/main/resources/Javascript-Flowtyped -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g javascript-flowtyped -o samples/client/petstore/javascript-flowtyped -DappName=PetstoreClient $@"
+ags="generate -t modules/openapi-generator/src/main/resources/Javascript-Flowtyped -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g javascript-flowtyped -o samples/client/petstore/javascript-flowtyped --additional-properties appName=PetstoreClient $@"
java $JAVA_OPTS -jar $executable $ags
diff --git a/bin/javascript-petstore.sh b/bin/javascript-petstore.sh
index 3b73aa4be6b..f2313a0c198 100755
--- a/bin/javascript-petstore.sh
+++ b/bin/javascript-petstore.sh
@@ -27,6 +27,6 @@ fi
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
-ags="generate -t modules/openapi-generator/src/main/resources/Javascript -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g javascript -o samples/client/petstore/javascript -DappName=PetstoreClient --additional-properties useES6=false $@"
+ags="generate -t modules/openapi-generator/src/main/resources/Javascript -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g javascript -o samples/client/petstore/javascript --additional-properties appName=PetstoreClient,useES6=false $@"
java $JAVA_OPTS -jar $executable $ags
diff --git a/bin/javascript-promise-es6-petstore.sh b/bin/javascript-promise-es6-petstore.sh
index 3dd0d7a4fca..c953eb99dad 100755
--- a/bin/javascript-promise-es6-petstore.sh
+++ b/bin/javascript-promise-es6-petstore.sh
@@ -30,6 +30,6 @@ export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
ags="generate -t modules/openapi-generator/src/main/resources/Javascript/es6 \
-i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g javascript \
-o samples/client/petstore/javascript-promise-es6 \
---additional-properties usePromises=true,useES6=true $@"
+--additional-properties appName=PetstoreClient,usePromises=true,useES6=true $@"
-java -DappName=PetstoreClient $JAVA_OPTS -jar $executable $ags
+java $JAVA_OPTS -jar $executable $ags
diff --git a/bin/javascript-promise-petstore.sh b/bin/javascript-promise-petstore.sh
index f6eb25b5c43..6702e60b2a3 100755
--- a/bin/javascript-promise-petstore.sh
+++ b/bin/javascript-promise-petstore.sh
@@ -33,6 +33,6 @@ ags="generate \
-g javascript \
-o samples/client/petstore/javascript-promise \
--additional-properties usePromises=true,useES6=false \
--DappName=PetstoreClient $@"
+--additional-properties appName=PetstoreClient $@"
java $JAVA_OPTS -jar $executable $ags
diff --git a/bin/jaxrs-cxf-cdi-petstore-server.sh b/bin/jaxrs-cxf-cdi-petstore-server.sh
index ee5d3d29a26..3d1e538c394 100755
--- a/bin/jaxrs-cxf-cdi-petstore-server.sh
+++ b/bin/jaxrs-cxf-cdi-petstore-server.sh
@@ -27,6 +27,6 @@ fi
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
-ags="generate -t modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-cdi -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g jaxrs-cxf-cdi -o samples/server/petstore/jaxrs-cxf-cdi -DhideGenerationTimestamp=true $@"
+ags="generate -t modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-cdi -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g jaxrs-cxf-cdi -o samples/server/petstore/jaxrs-cxf-cdi --additional-properties hideGenerationTimestamp=true $@"
java $JAVA_OPTS -jar $executable $ags
diff --git a/bin/jaxrs-cxf-petstore-server-annotated-base-path.sh b/bin/jaxrs-cxf-petstore-server-annotated-base-path.sh
index 8eac07795eb..3c8b96a2e64 100755
--- a/bin/jaxrs-cxf-petstore-server-annotated-base-path.sh
+++ b/bin/jaxrs-cxf-petstore-server-annotated-base-path.sh
@@ -27,6 +27,6 @@ fi
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
-ags="generate --artifact-id cxf-annotated-basepath -t modules/openapi-generator/src/main/resources/JavaJaxRS/cxf -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g jaxrs-cxf -o samples/server/petstore/jaxrs-cxf-annotated-base-path -DhideGenerationTimestamp=true,useAnnotatedBasePath=true --additional-properties serverPort=8082 $@"
+ags="generate --artifact-id cxf-annotated-basepath -t modules/openapi-generator/src/main/resources/JavaJaxRS/cxf -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g jaxrs-cxf -o samples/server/petstore/jaxrs-cxf-annotated-base-path --additional-properties hideGenerationTimestamp=true,useAnnotatedBasePath=true --additional-properties serverPort=8082 $@"
java $JAVA_OPTS -jar $executable $ags
diff --git a/bin/jaxrs-cxf-petstore-server-non-spring-application.sh b/bin/jaxrs-cxf-petstore-server-non-spring-application.sh
index 6ed2e5a05fe..6db712b74bb 100755
--- a/bin/jaxrs-cxf-petstore-server-non-spring-application.sh
+++ b/bin/jaxrs-cxf-petstore-server-non-spring-application.sh
@@ -27,6 +27,6 @@ fi
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
-ags="generate --artifact-id cxf-server-non-spring -t modules/openapi-generator/src/main/resources/JavaJaxRS/cxf -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g jaxrs-cxf -o samples/server/petstore/jaxrs-cxf-non-spring-app -DhideGenerationTimestamp=true,generateNonSpringApplication=true --additional-properties serverPort=8082 $@"
+ags="generate --artifact-id cxf-server-non-spring -t modules/openapi-generator/src/main/resources/JavaJaxRS/cxf -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g jaxrs-cxf -o samples/server/petstore/jaxrs-cxf-non-spring-app --additional-properties hideGenerationTimestamp=true,generateNonSpringApplication=true --additional-properties serverPort=8082 $@"
java $JAVA_OPTS -jar $executable $ags
diff --git a/bin/jaxrs-cxf-petstore-server-test-data.sh b/bin/jaxrs-cxf-petstore-server-test-data.sh
index 5b187c65fbf..6844b7bcf84 100755
--- a/bin/jaxrs-cxf-petstore-server-test-data.sh
+++ b/bin/jaxrs-cxf-petstore-server-test-data.sh
@@ -27,6 +27,6 @@ fi
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
-ags="generate --artifact-id cxf-test-data -t modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g jaxrs-cxf-extended -o samples/server/petstore/jaxrs-cxf-test-data -DhideGenerationTimestamp=true -DuseAnnotatedBasePath=true --generate-alias-as-model --additional-properties java8=true,generateSpringApplication=true,generateSpringBootApplication=true,generateOperationBody=true,loadTestDataFromFile=true $@"
+ags="generate --artifact-id cxf-test-data -t modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g jaxrs-cxf-extended -o samples/server/petstore/jaxrs-cxf-test-data --additional-properties hideGenerationTimestamp=true,useAnnotatedBasePath=true --generate-alias-as-model --additional-properties java8=true,generateSpringApplication=true,generateSpringBootApplication=true,generateOperationBody=true,loadTestDataFromFile=true $@"
java $JAVA_OPTS -jar $executable $ags
diff --git a/bin/jaxrs-cxf-petstore-server.sh b/bin/jaxrs-cxf-petstore-server.sh
index 9efff273fa9..4081b01e862 100755
--- a/bin/jaxrs-cxf-petstore-server.sh
+++ b/bin/jaxrs-cxf-petstore-server.sh
@@ -30,6 +30,6 @@ rm -rf samples/server/petstore/jaxrs-cxf
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
-ags="generate -t modules/openapi-generator/src/main/resources/JavaJaxRS/cxf -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g jaxrs-cxf -o samples/server/petstore/jaxrs-cxf -DhideGenerationTimestamp=true --additional-properties serverPort=8082 $@"
+ags="generate -t modules/openapi-generator/src/main/resources/JavaJaxRS/cxf -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g jaxrs-cxf -o samples/server/petstore/jaxrs-cxf --additional-properties hideGenerationTimestamp=true --additional-properties serverPort=8082 $@"
java $JAVA_OPTS -jar $executable $ags
diff --git a/bin/jaxrs-jersey1-petstore-server.sh b/bin/jaxrs-jersey1-petstore-server.sh
index 67576239847..3cc7cc87615 100755
--- a/bin/jaxrs-jersey1-petstore-server.sh
+++ b/bin/jaxrs-jersey1-petstore-server.sh
@@ -27,7 +27,7 @@ fi
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
-ags="generate -t modules/openapi-generator/src/main/resources/JavaJaxRS -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g jaxrs-jersey -o samples/server/petstore/jaxrs/jersey1 -DhideGenerationTimestamp=true,serverPort=8082 --library=jersey1 --artifact-id=jaxrs-jersey1-server $@"
+ags="generate -t modules/openapi-generator/src/main/resources/JavaJaxRS -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g jaxrs-jersey -o samples/server/petstore/jaxrs/jersey1 --additional-properties hideGenerationTimestamp=true,serverPort=8082 --library=jersey1 --artifact-id=jaxrs-jersey1-server $@"
echo "Removing files and folders under samples/server/petstore/jaxrs/jersey1/src/main"
rm -rf samples/server/petstore/jaxrs/jersey1/src/main
diff --git a/bin/jaxrs-jersey1-usetags-petstore-server.sh b/bin/jaxrs-jersey1-usetags-petstore-server.sh
index 3e1c6bf6c06..00746c68db1 100755
--- a/bin/jaxrs-jersey1-usetags-petstore-server.sh
+++ b/bin/jaxrs-jersey1-usetags-petstore-server.sh
@@ -27,7 +27,7 @@ fi
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
-ags="generate -t modules/openapi-generator/src/main/resources/JavaJaxRS -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g jaxrs-jersey -o samples/server/petstore/jaxrs/jersey1-useTags -DhideGenerationTimestamp=true,serverPort=8082 --library=jersey1 --artifact-id=jaxrs-jersey1-useTags --additional-properties useTags=true $@"
+ags="generate -t modules/openapi-generator/src/main/resources/JavaJaxRS -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g jaxrs-jersey -o samples/server/petstore/jaxrs/jersey1-useTags --additional-properties hideGenerationTimestamp=true,serverPort=8082 --library=jersey1 --artifact-id=jaxrs-jersey1-useTags --additional-properties useTags=true $@"
echo "Removing files and folders under samples/server/petstore/jaxrs/jersey1-useTags/src/main"
rm -rf samples/server/petstore/jaxrs/jersey1-useTags/src/main
diff --git a/bin/jaxrs-petstore-server-datelib-j8.sh b/bin/jaxrs-petstore-server-datelib-j8.sh
index ef8e27e98df..64e9caff3bf 100755
--- a/bin/jaxrs-petstore-server-datelib-j8.sh
+++ b/bin/jaxrs-petstore-server-datelib-j8.sh
@@ -27,6 +27,6 @@ fi
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
-ags="generate -t modules/openapi-generator/src/main/resources/JavaJaxRS/ -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g jaxrs-jersey -o samples/server/petstore/jaxrs-datelib-j8/ -c ./bin/jaxrs-datelib-j8.json -DhideGenerationTimestamp=true --additional-properties serverPort=8082 $@"
+ags="generate -t modules/openapi-generator/src/main/resources/JavaJaxRS/ -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g jaxrs-jersey -o samples/server/petstore/jaxrs-datelib-j8/ -c ./bin/jaxrs-datelib-j8.json --additional-properties hideGenerationTimestamp=true --additional-properties serverPort=8082 $@"
java $JAVA_OPTS -jar $executable $ags
diff --git a/bin/jaxrs-petstore-server.sh b/bin/jaxrs-petstore-server.sh
index df248d61288..a75e5d3e55b 100755
--- a/bin/jaxrs-petstore-server.sh
+++ b/bin/jaxrs-petstore-server.sh
@@ -27,7 +27,7 @@ fi
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
-ags="generate --artifact-id jaxrs-jersey-petstore-server -t modules/openapi-generator/src/main/resources/JavaJaxRS -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g jaxrs-jersey -o samples/server/petstore/jaxrs/jersey2 -DhideGenerationTimestamp=true,serverPort=8082 $@"
+ags="generate --artifact-id jaxrs-jersey-petstore-server -t modules/openapi-generator/src/main/resources/JavaJaxRS -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g jaxrs-jersey -o samples/server/petstore/jaxrs/jersey2 --additional-properties hideGenerationTimestamp=true,serverPort=8082 $@"
echo "Removing files and folders under samples/server/petstore/jaxrs/jersey2/src/main"
rm -rf samples/server/petstore/jaxrs/jersey2/src/main
diff --git a/bin/jaxrs-resteasy-eap-java8-petstore-server.sh b/bin/jaxrs-resteasy-eap-java8-petstore-server.sh
index 4a99e7c8851..8b85c903722 100755
--- a/bin/jaxrs-resteasy-eap-java8-petstore-server.sh
+++ b/bin/jaxrs-resteasy-eap-java8-petstore-server.sh
@@ -27,7 +27,7 @@ fi
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
-ags="generate --artifact-id jaxrs-resteasy-eap-java8-server -t modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g jaxrs-resteasy-eap -o samples/server/petstore/jaxrs-resteasy/eap-java8 -DhideGenerationTimestamp=true -c ./bin/jaxrs-resteasy-eap-java8-petstore-server.json $@"
+ags="generate --artifact-id jaxrs-resteasy-eap-java8-server -t modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g jaxrs-resteasy-eap -o samples/server/petstore/jaxrs-resteasy/eap-java8 --additional-properties hideGenerationTimestamp=true -c ./bin/jaxrs-resteasy-eap-java8-petstore-server.json $@"
echo "Removing files and folders under samples/server/petstore/jaxrs-resteasy/eap-java8/src/main"
rm -rf samples/server/petstore/jaxrs-resteasy/eap-java8/src/main
diff --git a/bin/jaxrs-resteasy-eap-joda-petstore-server.sh b/bin/jaxrs-resteasy-eap-joda-petstore-server.sh
index 656774e441f..af9885025d6 100755
--- a/bin/jaxrs-resteasy-eap-joda-petstore-server.sh
+++ b/bin/jaxrs-resteasy-eap-joda-petstore-server.sh
@@ -26,7 +26,7 @@ fi
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
-ags="generate --artifact-id jaxrs-resteasy-eap-joda-server -t modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g jaxrs-resteasy-eap -o samples/server/petstore/jaxrs-resteasy/eap-joda -DhideGenerationTimestamp=true -c ./bin/jaxrs-resteasy-eap-joda-petstore-server.json $@"
+ags="generate --artifact-id jaxrs-resteasy-eap-joda-server -t modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g jaxrs-resteasy-eap -o samples/server/petstore/jaxrs-resteasy/eap-joda --additional-properties hideGenerationTimestamp=true -c ./bin/jaxrs-resteasy-eap-joda-petstore-server.json $@"
echo "Removing files and folders under samples/server/petstore/jaxrs-resteasy/eap-joda/src/main"
rm -rf samples/server/petstore/jaxrs-resteasy/eap-joda/src/main
diff --git a/bin/jaxrs-resteasy-eap-petstore-server.sh b/bin/jaxrs-resteasy-eap-petstore-server.sh
index 39c2bff75d9..7cc23202f48 100755
--- a/bin/jaxrs-resteasy-eap-petstore-server.sh
+++ b/bin/jaxrs-resteasy-eap-petstore-server.sh
@@ -27,7 +27,7 @@ fi
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
-ags="generate -t modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g jaxrs-resteasy-eap -o samples/server/petstore/jaxrs-resteasy/eap -DhideGenerationTimestamp=true $@"
+ags="generate -t modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g jaxrs-resteasy-eap -o samples/server/petstore/jaxrs-resteasy/eap --additional-properties hideGenerationTimestamp=true $@"
echo "Removing files and folders under samples/server/petstore/jaxrs-resteasy/eap/src/main"
rm -rf samples/server/petstore/jaxrs-resteasy/eap/src/main
diff --git a/bin/jaxrs-resteasy-joda-petstore-server.sh b/bin/jaxrs-resteasy-joda-petstore-server.sh
index 086dd81c241..66bb1c3fffa 100755
--- a/bin/jaxrs-resteasy-joda-petstore-server.sh
+++ b/bin/jaxrs-resteasy-joda-petstore-server.sh
@@ -27,6 +27,6 @@ fi
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
-ags="generate --artifact-id jaxrs-resteasy-joda-server -t modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g jaxrs-resteasy -o samples/server/petstore/jaxrs-resteasy/joda -DhideGenerationTimestamp=true -c ./bin/jaxrs-resteasy-joda-petstore-server.json $@"
+ags="generate --artifact-id jaxrs-resteasy-joda-server -t modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g jaxrs-resteasy -o samples/server/petstore/jaxrs-resteasy/joda --additional-properties hideGenerationTimestamp=true -c ./bin/jaxrs-resteasy-joda-petstore-server.json $@"
java $JAVA_OPTS -jar $executable $ags
diff --git a/bin/jaxrs-resteasy-petstore-server.sh b/bin/jaxrs-resteasy-petstore-server.sh
index d6eabb20e75..6b40673aebd 100755
--- a/bin/jaxrs-resteasy-petstore-server.sh
+++ b/bin/jaxrs-resteasy-petstore-server.sh
@@ -27,6 +27,6 @@ fi
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
-ags="generate -t modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g jaxrs-resteasy -o samples/server/petstore/jaxrs-resteasy/default -DhideGenerationTimestamp=true $@"
+ags="generate -t modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g jaxrs-resteasy -o samples/server/petstore/jaxrs-resteasy/default --additional-properties hideGenerationTimestamp=true $@"
java $JAVA_OPTS -jar $executable $ags
diff --git a/bin/jaxrs-spec-petstore-server-interface-returning-response.sh b/bin/jaxrs-spec-petstore-server-interface-returning-response.sh
index d964fa44e59..c4cc314bb4f 100755
--- a/bin/jaxrs-spec-petstore-server-interface-returning-response.sh
+++ b/bin/jaxrs-spec-petstore-server-interface-returning-response.sh
@@ -28,9 +28,9 @@ fi
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
ags="generate --artifact-id jaxrs-spec-interface-response-petstore-server -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g jaxrs-spec -o samples/server/petstore/jaxrs-spec-interface-response
--DhideGenerationTimestamp=true
--DserializableModel=true
--DinterfaceOnly=true
--DreturnResponse=true $@"
+--additional-properties hideGenerationTimestamp=true
+--additional-properties serializableModel=true
+--additional-properties interfaceOnly=true
+--additional-properties returnResponse=true $@"
java $JAVA_OPTS -jar $executable $ags
diff --git a/bin/jaxrs-spec-petstore-server-interface.sh b/bin/jaxrs-spec-petstore-server-interface.sh
index 73c2479977c..570443e26ee 100755
--- a/bin/jaxrs-spec-petstore-server-interface.sh
+++ b/bin/jaxrs-spec-petstore-server-interface.sh
@@ -28,8 +28,8 @@ fi
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
ags="generate --artifact-id jaxrs-spec-interface-petstore-server -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g jaxrs-spec -o samples/server/petstore/jaxrs-spec-interface
--DhideGenerationTimestamp=true
--DserializableModel=true
--DinterfaceOnly=true $@"
+--additional-properties hideGenerationTimestamp=true
+--additional-properties serializableModel=true
+--additional-properties interfaceOnly=true $@"
java $JAVA_OPTS -jar $executable $ags
diff --git a/bin/jaxrs-spec-petstore-server.sh b/bin/jaxrs-spec-petstore-server.sh
index 296b03b4fab..9d0c75513bd 100755
--- a/bin/jaxrs-spec-petstore-server.sh
+++ b/bin/jaxrs-spec-petstore-server.sh
@@ -28,7 +28,7 @@ fi
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
ags="generate --artifact-id jaxrs-spec-petstore-server -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g jaxrs-spec -o samples/server/petstore/jaxrs-spec
--DhideGenerationTimestamp=true
--DserializableModel=true $@"
+--additional-properties hideGenerationTimestamp=true
+--additional-properties serializableModel=true $@"
java $JAVA_OPTS -jar $executable $ags
diff --git a/bin/jaxrs-usetags-petstore-server.sh b/bin/jaxrs-usetags-petstore-server.sh
index bd811f3a7e8..1c84b29a033 100755
--- a/bin/jaxrs-usetags-petstore-server.sh
+++ b/bin/jaxrs-usetags-petstore-server.sh
@@ -27,7 +27,7 @@ fi
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
-ags="generate -t modules/openapi-generator/src/main/resources/JavaJaxRS -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g jaxrs-jersey -o samples/server/petstore/jaxrs/jersey2-useTags -DhideGenerationTimestamp=true,serverPort=8082 --artifact-id=jaxrs-jersey2-useTags --additional-properties useTags=true $@"
+ags="generate -t modules/openapi-generator/src/main/resources/JavaJaxRS -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g jaxrs-jersey -o samples/server/petstore/jaxrs/jersey2-useTags --additional-properties hideGenerationTimestamp=true,serverPort=8082 --artifact-id=jaxrs-jersey2-useTags --additional-properties useTags=true $@"
echo "Removing files and folders under samples/server/petstore/jaxrs/jersey2-useTags/src/main"
rm -rf samples/server/petstore/jaxrs/jersey2-useTags/src/main
diff --git a/bin/kotlin-client-petstore.sh b/bin/kotlin-client-petstore.sh
index fdcdb59b196..cad4be6995e 100755
--- a/bin/kotlin-client-petstore.sh
+++ b/bin/kotlin-client-petstore.sh
@@ -27,6 +27,6 @@ fi
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
-ags="generate -t modules/openapi-generator/src/main/resources/kotlin-client -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g kotlin --artifact-id kotlin-petstore-client -D dateLibrary=java8 -o samples/client/petstore/kotlin $@"
+ags="generate -t modules/openapi-generator/src/main/resources/kotlin-client -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g kotlin --artifact-id kotlin-petstore-client --additional-properties dateLibrary=java8 -o samples/client/petstore/kotlin $@"
java ${JAVA_OPTS} -jar ${executable} ${ags}
diff --git a/bin/kotlin-client-string.sh b/bin/kotlin-client-string.sh
index 2011e52e5e8..410ddbab399 100755
--- a/bin/kotlin-client-string.sh
+++ b/bin/kotlin-client-string.sh
@@ -27,7 +27,7 @@ fi
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
-ags="generate -t modules/openapi-generator/src/main/resources/kotlin-client -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g kotlin --artifact-id kotlin-petstore-string -D dateLibrary=string -o samples/client/petstore/kotlin-string $@"
+ags="generate -t modules/openapi-generator/src/main/resources/kotlin-client -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g kotlin --artifact-id kotlin-petstore-string --additional-properties dateLibrary=string -o samples/client/petstore/kotlin-string $@"
java ${JAVA_OPTS} -jar ${executable} ${ags}
diff --git a/bin/kotlin-client-threetenbp.sh b/bin/kotlin-client-threetenbp.sh
index c207268d8c3..0cb7f27da09 100755
--- a/bin/kotlin-client-threetenbp.sh
+++ b/bin/kotlin-client-threetenbp.sh
@@ -27,7 +27,7 @@ fi
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
-ags="generate -t modules/openapi-generator/src/main/resources/kotlin-client -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g kotlin --artifact-id kotlin-petstore-threetenbp -D dateLibrary=threetenbp -o samples/client/petstore/kotlin-threetenbp $@"
+ags="generate -t modules/openapi-generator/src/main/resources/kotlin-client -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g kotlin --artifact-id kotlin-petstore-threetenbp --additional-properties dateLibrary=threetenbp -o samples/client/petstore/kotlin-threetenbp $@"
java ${JAVA_OPTS} -jar ${executable} ${ags}
diff --git a/bin/kotlin-server-petstore.sh b/bin/kotlin-server-petstore.sh
index 43ab67d264c..dbdf48b2bbd 100755
--- a/bin/kotlin-server-petstore.sh
+++ b/bin/kotlin-server-petstore.sh
@@ -27,7 +27,7 @@ fi
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
-ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -t modules/openapi-generator/src/main/resources/kotlin-server -g kotlin-server --library=ktor -o samples/server/petstore/kotlin-server/ktor -DhideGenerationTimestamp=true $@"
+ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -t modules/openapi-generator/src/main/resources/kotlin-server -g kotlin-server --library=ktor -o samples/server/petstore/kotlin-server/ktor --additional-properties hideGenerationTimestamp=true $@"
java ${JAVA_OPTS} -jar ${executable} ${ags}
diff --git a/bin/kotlin-springboot-petstore-all.sh b/bin/kotlin-springboot-petstore-all.sh
new file mode 100755
index 00000000000..b0ba7a6e825
--- /dev/null
+++ b/bin/kotlin-springboot-petstore-all.sh
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+./bin/kotlin-springboot-petstore-server.sh
+./bin/kotlin-springboot-petstore-server-reactive.sh
\ No newline at end of file
diff --git a/bin/kotlin-springboot-petstore-server-reactive.sh b/bin/kotlin-springboot-petstore-server-reactive.sh
new file mode 100755
index 00000000000..f5e72350b62
--- /dev/null
+++ b/bin/kotlin-springboot-petstore-server-reactive.sh
@@ -0,0 +1,35 @@
+#!/bin/sh
+
+SCRIPT="$0"
+echo "# START SCRIPT: $SCRIPT"
+
+while [ -h "$SCRIPT" ] ; do
+ ls=$(ls -ld "$SCRIPT")
+ link=$(expr "$ls" : '.*-> \(.*\)$')
+ if expr "$link" : '/.*' > /dev/null; then
+ SCRIPT="$link"
+ else
+ SCRIPT=$(dirname "$SCRIPT")/"$link"
+ fi
+done
+
+if [ ! -d "${APP_DIR}" ]; then
+ APP_DIR=$(dirname "$SCRIPT")/..
+ APP_DIR=$(cd "${APP_DIR}"; pwd)
+fi
+
+executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar"
+
+if [ ! -f "$executable" ]
+then
+ mvn clean package
+fi
+
+export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
+ags="$@ generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -t modules/openapi-generator/src/main/resources/kotlin-spring -g kotlin-spring -o samples/server/petstore/kotlin-springboot-reactive --additional-properties=library=spring-boot,beanValidations=true,swaggerAnnotations=true,serviceImplementation=true,reactive=true"
+
+echo "Cleaning previously generated files if any from samples/server/petstore/kotlin-springboot-reactive"
+rm -rf samples/server/petstore/kotlin-springboot-reactive
+
+echo "Generating Kotling Spring Boot reactive server..."
+java $JAVA_OPTS -jar $executable $ags
diff --git a/bin/lua-petstore.sh b/bin/lua-petstore.sh
index b7adaaac460..44b5cc38637 100755
--- a/bin/lua-petstore.sh
+++ b/bin/lua-petstore.sh
@@ -27,6 +27,6 @@ fi
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties $@"
-ags="generate -t modules/openapi-generator/src/main/resources/lua -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g lua -o samples/client/petstore/lua -DpackageName=petstore $@"
+ags="generate -t modules/openapi-generator/src/main/resources/lua -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g lua -o samples/client/petstore/lua --additional-properties packageName=petstore $@"
java $JAVA_OPTS -jar $executable $ags
diff --git a/bin/nodejs-petstore-google-cloud-functions.sh b/bin/nodejs-petstore-google-cloud-functions.sh
index 80e12027058..bfb02d960dc 100755
--- a/bin/nodejs-petstore-google-cloud-functions.sh
+++ b/bin/nodejs-petstore-google-cloud-functions.sh
@@ -27,6 +27,6 @@ fi
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
-ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g nodejs-server --additional-properties=googleCloudFunctions=true -o samples/server/petstore/nodejs-google-cloud-functions -Dservice $@"
+ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g nodejs-server-deprecated --additional-properties=googleCloudFunctions=true -o samples/server/petstore/nodejs-google-cloud-functions -Dservice $@"
java $JAVA_OPTS -jar $executable $ags
diff --git a/bin/nodejs-petstore-server.sh b/bin/nodejs-petstore-server.sh
index 2dfc8f327c7..fbbed3e46f1 100755
--- a/bin/nodejs-petstore-server.sh
+++ b/bin/nodejs-petstore-server.sh
@@ -27,6 +27,6 @@ fi
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
-ags="generate -t modules/openapi-generator/src/main/resources/nodejs -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g nodejs-server -o samples/server/petstore/nodejs -Dservice $@"
+ags="generate -t modules/openapi-generator/src/main/resources/nodejs -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g nodejs-server-deprecated -o samples/server/petstore/nodejs -Dservice $@"
java $JAVA_OPTS -jar $executable $ags
diff --git a/bin/objc-petstore-coredata.sh b/bin/objc-petstore-coredata.sh
index 124f800da21..ffa6d198822 100755
--- a/bin/objc-petstore-coredata.sh
+++ b/bin/objc-petstore-coredata.sh
@@ -26,7 +26,8 @@ then
fi
# if you've executed sbt assembly previously it will use that instead.
-export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
-ags="generate -t modules/openapi-generator/src/main/resources/objc -i modules/openapi-generator/src/test/resources/2_0/petstore.json -g objc -D apiDocs=false -D modelDocs=false -o samples/client/petstore/objc/core-data --additional-properties coreData=true -c bin/objc-petstore.json $@"
+export GENERATOR_GLOBALS="-DapiDocs=false -DmodelDocs=false"
+export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties ${GENERATOR_GLOBALS}"
+ags="generate -t modules/openapi-generator/src/main/resources/objc -i modules/openapi-generator/src/test/resources/2_0/petstore.json -g objc -o samples/client/petstore/objc/core-data --additional-properties coreData=true -c bin/objc-petstore.json $@"
java $JAVA_OPTS -jar $executable $ags
diff --git a/bin/openapi3/android-petstore-httpclient.sh b/bin/openapi3/android-petstore-httpclient.sh
index e1616221492..a16ff89917a 100755
--- a/bin/openapi3/android-petstore-httpclient.sh
+++ b/bin/openapi3/android-petstore-httpclient.sh
@@ -27,6 +27,6 @@ fi
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
-ags="generate -t modules/openapi-generator/src/main/resources/android -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g android -Dlibrary=httpclient -o samples/client/petstore/android/httpclient $@"
+ags="generate -t modules/openapi-generator/src/main/resources/android -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g android --additional-properties library=httpclient -o samples/client/petstore/android/httpclient $@"
java $JAVA_OPTS -jar $executable $ags
diff --git a/bin/openapi3/dart-petstore.sh b/bin/openapi3/dart-petstore.sh
index f9da99019e0..2bab8d1abac 100755
--- a/bin/openapi3/dart-petstore.sh
+++ b/bin/openapi3/dart-petstore.sh
@@ -29,18 +29,18 @@ fi
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
# Generate non-browserClient
-ags="generate -t modules/openapi-generator/src/main/resources/dart -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g dart -o samples/client/petstore/dart/openapi -DhideGenerationTimestamp=true -DbrowserClient=false $@"
+ags="generate -t modules/openapi-generator/src/main/resources/dart -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g dart -o samples/client/petstore/dart/openapi --additional-properties hideGenerationTimestamp=true,browserClient=false $@"
# then options to generate the library for vm would be:
-#ags="generate -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g dart -o samples/client/petstore/dart/openapi_vm -DbrowserClient=false -DpubName=openapi_vm $@"
+#ags="generate -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g dart -o samples/client/petstore/dart/openapi_vm --additional-properties browserClient=false,pubName=openapi_vm $@"
#java $JAVA_OPTS -jar $executable $ags
# Generate browserClient
-ags="generate -t modules/openapi-generator/src/main/resources/dart -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g dart -o samples/client/petstore/dart/openapi-browser-client -DhideGenerationTimestamp=true -DbrowserClient=true $@"
+ags="generate -t modules/openapi-generator/src/main/resources/dart -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g dart -o samples/client/petstore/dart/openapi-browser-client --additional-properties hideGenerationTimestamp=true,browserClient=true $@"
#java $JAVA_OPTS -jar $executable $ags
# Generate non-browserClient and put it to the flutter sample app
-ags="generate -t modules/openapi-generator/src/main/resources/dart -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g dart -o samples/client/petstore/dart/flutter_petstore/openapi -DhideGenerationTimestamp=true -DbrowserClient=false $@"
+ags="generate -t modules/openapi-generator/src/main/resources/dart -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g dart -o samples/client/petstore/dart/flutter_petstore/openapi --additional-properties hideGenerationTimestamp=true,browserClient=false $@"
java $JAVA_OPTS -jar $executable $ags
# There is a proposal to allow importing different libraries depending on the environment:
diff --git a/bin/openapi3/erlang-petstore-client.sh b/bin/openapi3/erlang-petstore-client.sh
index 102cc342d07..fc75014a41e 100755
--- a/bin/openapi3/erlang-petstore-client.sh
+++ b/bin/openapi3/erlang-petstore-client.sh
@@ -27,6 +27,6 @@ fi
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
-ags="generate -t modules/openapi-generator/src/main/resources/erlang-client -DpackageName=petstore -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g erlang-client -o samples/client/petstore/erlang-client $@"
+ags="generate -t modules/openapi-generator/src/main/resources/erlang-client --additional-properties packageName=petstore -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g erlang-client -o samples/client/petstore/erlang-client $@"
java $JAVA_OPTS -jar $executable $ags
diff --git a/bin/openapi3/go-gin-petstore-server.sh b/bin/openapi3/go-gin-petstore-server.sh
index a3f14d4b622..8ab2b8397e0 100755
--- a/bin/openapi3/go-gin-petstore-server.sh
+++ b/bin/openapi3/go-gin-petstore-server.sh
@@ -35,7 +35,7 @@ rm -rf $STUB_DIR
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
-ags="generate -t modules/openapi-generator/src/main/resources/go-gin-server -i $SPEC -g $GENERATOR -o $STUB_DIR -DpackageName=petstoreserver --additional-properties hideGenerationTimestamp=true -Dservice $@"
+ags="generate -t modules/openapi-generator/src/main/resources/go-gin-server -i $SPEC -g $GENERATOR -o $STUB_DIR --additional-properties packageName=petstoreserver --additional-properties hideGenerationTimestamp=true $@"
java $JAVA_OPTS -jar $executable $ags
#!/usr/bin/env bash
\ No newline at end of file
diff --git a/bin/openapi3/go-petstore-server.sh b/bin/openapi3/go-petstore-server.sh
index bbe46e70383..7909ec7d5db 100755
--- a/bin/openapi3/go-petstore-server.sh
+++ b/bin/openapi3/go-petstore-server.sh
@@ -35,6 +35,6 @@ rm -rf $STUB_DIR
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
-ags="generate -t modules/openapi-generator/src/main/resources/go-server -i $SPEC -g $GENERATOR -o $STUB_DIR -DpackageName=petstoreserver --additional-properties hideGenerationTimestamp=true -Dservice $@"
+ags="generate -t modules/openapi-generator/src/main/resources/go-server -i $SPEC -g $GENERATOR -o $STUB_DIR --additional-properties packageName=petstoreserver,hideGenerationTimestamp=true $@"
java $JAVA_OPTS -jar $executable $ags
diff --git a/bin/openapi3/go-petstore.sh b/bin/openapi3/go-petstore.sh
index 872fcb610eb..ad921deae9c 100755
--- a/bin/openapi3/go-petstore.sh
+++ b/bin/openapi3/go-petstore.sh
@@ -34,6 +34,6 @@ rm -rf $STUB_DIR
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
-ags="generate -t modules/openapi-generator/src/main/resources/go -i $SPEC -g $GENERATOR -o $STUB_DIR -DpackageName=petstore $@"
+ags="generate -t modules/openapi-generator/src/main/resources/go -i $SPEC -g $GENERATOR -o $STUB_DIR --additional-properties packageName=petstore $@"
java $JAVA_OPTS -jar $executable $ags
diff --git a/bin/openapi3/graphql-nodejs-express-server.sh b/bin/openapi3/graphql-nodejs-express-server.sh
index 0e1291c8a6d..41a69511601 100755
--- a/bin/openapi3/graphql-nodejs-express-server.sh
+++ b/bin/openapi3/graphql-nodejs-express-server.sh
@@ -27,6 +27,6 @@ fi
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties $@"
-ags="generate -t modules/openapi-generator/src/main/resources/graphql-nodejs-express-server -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g graphql-nodejs-express-server -o samples/server/petstore/graphql-nodejs-express-server -DpackageName=petstore $@"
+ags="generate -t modules/openapi-generator/src/main/resources/graphql-nodejs-express-server -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g graphql-nodejs-express-server -o samples/server/petstore/graphql-nodejs-express-server --additional-properties packageName=petstore $@"
java $JAVA_OPTS -jar $executable $ags
diff --git a/bin/openapi3/groovy-petstore.sh b/bin/openapi3/groovy-petstore.sh
index 1dd1d9c8021..c0c1ddda051 100755
--- a/bin/openapi3/groovy-petstore.sh
+++ b/bin/openapi3/groovy-petstore.sh
@@ -27,5 +27,5 @@ fi
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
-ags="generate -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g groovy -o samples/client/petstore/groovy -DhideGenerationTimestamp=true $@"
+ags="generate -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g groovy -o samples/client/petstore/groovy --additional-properties hideGenerationTimestamp=true $@"
java $JAVA_OPTS -jar $executable $ags
diff --git a/bin/openapi3/javascript-es6-petstore.sh b/bin/openapi3/javascript-es6-petstore.sh
index fac3a9039f6..96e45b4b8e7 100755
--- a/bin/openapi3/javascript-es6-petstore.sh
+++ b/bin/openapi3/javascript-es6-petstore.sh
@@ -29,6 +29,6 @@ fi
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
ags="generate -t modules/openapi-generator/src/main/resources/Javascript/es6 \
-i modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml -g javascript \
--o samples/openapi3/client/petstore/javascript-es6 $@"
+-o samples/openapi3/client/petstore/javascript-es6 --additional-properties appName=PetstoreClient $@"
-java -DappName=PetstoreClient $JAVA_OPTS -jar $executable $ags
+java $JAVA_OPTS -jar $executable $ags
diff --git a/bin/openapi3/jaxrs-jersey-petstore.sh b/bin/openapi3/jaxrs-jersey-petstore.sh
index ddb1968cdb3..2b1e71f73e1 100755
--- a/bin/openapi3/jaxrs-jersey-petstore.sh
+++ b/bin/openapi3/jaxrs-jersey-petstore.sh
@@ -27,6 +27,6 @@ fi
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
-ags="generate --artifact-id "openapiv3-jaxrs-jersey-petstore-server" -t modules/openapi-generator/src/main/resources/JavaJaxRS/ -i modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml -g jaxrs-jersey -o samples/server/petstore/jaxrs-jersey -DhideGenerationTimestamp=true $@"
+ags="generate --artifact-id "openapiv3-jaxrs-jersey-petstore-server" -t modules/openapi-generator/src/main/resources/JavaJaxRS/ -i modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml -g jaxrs-jersey -o samples/server/petstore/jaxrs-jersey --additional-properties hideGenerationTimestamp=true $@"
java $JAVA_OPTS -jar $executable $ags
diff --git a/bin/openapi3/kotlin-client-petstore.sh b/bin/openapi3/kotlin-client-petstore.sh
index cfd443d43e2..5ffd829b05d 100755
--- a/bin/openapi3/kotlin-client-petstore.sh
+++ b/bin/openapi3/kotlin-client-petstore.sh
@@ -26,7 +26,7 @@ then
fi
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
-ags="$@ generate -i modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml -t modules/openapi-generator/src/main/resources/kotlin-client -g kotlin --artifact-id kotlin-petstore-client -D dateLibrary=java8 -o samples/openapi3/client/petstore/kotlin $@"
+ags="$@ generate -i modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml -t modules/openapi-generator/src/main/resources/kotlin-client -g kotlin --artifact-id kotlin-petstore-client --additional-properties dateLibrary=java8 -o samples/openapi3/client/petstore/kotlin $@"
echo "Cleaning previously generated files if any from samples/openapi3/client/petstore/kotlin"
rm -rf samples/openapi3/client/petstore/kotlin
diff --git a/bin/openapi3/kotlin-springboot-petstore-all.sh b/bin/openapi3/kotlin-springboot-petstore-all.sh
new file mode 100755
index 00000000000..7aa4f697bbd
--- /dev/null
+++ b/bin/openapi3/kotlin-springboot-petstore-all.sh
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+./bin/openapi3/kotlin-springboot-petstore-server.sh
+./bin/openapi3/kotlin-springboot-petstore-server-reactive.sh
diff --git a/bin/openapi3/kotlin-springboot-petstore-server-reactive.sh b/bin/openapi3/kotlin-springboot-petstore-server-reactive.sh
new file mode 100755
index 00000000000..8c0d80c4e52
--- /dev/null
+++ b/bin/openapi3/kotlin-springboot-petstore-server-reactive.sh
@@ -0,0 +1,35 @@
+#!/bin/sh
+
+SCRIPT="$0"
+echo "# START SCRIPT: $SCRIPT"
+
+while [ -h "$SCRIPT" ] ; do
+ ls=$(ls -ld "$SCRIPT")
+ link=$(expr "$ls" : '.*-> \(.*\)$')
+ if expr "$link" : '/.*' > /dev/null; then
+ SCRIPT="$link"
+ else
+ SCRIPT=$(dirname "$SCRIPT")/"$link"
+ fi
+done
+
+if [ ! -d "${APP_DIR}" ]; then
+ APP_DIR=$(dirname "$SCRIPT")/..
+ APP_DIR=$(cd "${APP_DIR}"; pwd)
+fi
+
+executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar"
+
+if [ ! -f "$executable" ]
+then
+ mvn clean package
+fi
+
+export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
+ags="$@ generate -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -t modules/openapi-generator/src/main/resources/kotlin-spring -g kotlin-spring -o samples/server/openapi3/petstore/kotlin-springboot-reactive --additional-properties=library=spring-boot,beanValidations=true,swaggerAnnotations=true,serviceImplementation=true,reactive=true"
+
+echo "Cleaning previously generated files if any from samples/server/openapi3/petstore/kotlin-springboot-reactive"
+rm -rf samples/server/openapi3/petstore/kotlin-springboot-reactive
+
+echo "Generating Kotling Spring Boot server..."
+java $JAVA_OPTS -jar $executable $ags
diff --git a/bin/openapi3/lua-petstore.sh b/bin/openapi3/lua-petstore.sh
index aa70c3b0696..f598c67aa02 100755
--- a/bin/openapi3/lua-petstore.sh
+++ b/bin/openapi3/lua-petstore.sh
@@ -27,6 +27,6 @@ fi
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
-ags="generate -t modules/openapi-generator/src/main/resources/lua -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g lua -o samples/client/petstore/lua -DpackageName=petstore $@"
+ags="generate -t modules/openapi-generator/src/main/resources/lua -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g lua -o samples/client/petstore/lua --additional-properties packageName=petstore $@"
java $JAVA_OPTS -jar $executable $ags
diff --git a/bin/openapi3/nodejs-petstore-google-cloud-functions.sh b/bin/openapi3/nodejs-petstore-google-cloud-functions.sh
index a11e8da6c5d..00ab32fb9ab 100755
--- a/bin/openapi3/nodejs-petstore-google-cloud-functions.sh
+++ b/bin/openapi3/nodejs-petstore-google-cloud-functions.sh
@@ -27,6 +27,6 @@ fi
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
-ags="generate -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g nodejs-server --additional-properties=googleCloudFunctions=true -o samples/server/petstore/nodejs-google-cloud-functions -Dservice $@"
+ags="generate -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g nodejs-server-deprecated --additional-properties=googleCloudFunctions=true -o samples/server/petstore/nodejs-google-cloud-functions -Dservice $@"
java $JAVA_OPTS -jar $executable $ags
diff --git a/bin/openapi3/nodejs-petstore-server.sh b/bin/openapi3/nodejs-petstore-server.sh
index df83e4ebfa6..a987aced357 100755
--- a/bin/openapi3/nodejs-petstore-server.sh
+++ b/bin/openapi3/nodejs-petstore-server.sh
@@ -27,6 +27,6 @@ fi
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
-ags="generate -t modules/openapi-generator/src/main/resources/nodejs -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g nodejs-server -o samples/server/petstore/nodejs -Dservice $@"
+ags="generate -t modules/openapi-generator/src/main/resources/nodejs -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g nodejs-server-deprecated -o samples/server/petstore/nodejs -Dservice $@"
java $JAVA_OPTS -jar $executable $ags
diff --git a/bin/openapi3/objc-petstore-coredata.sh b/bin/openapi3/objc-petstore-coredata.sh
index 97fa054794f..ec36e2f510a 100755
--- a/bin/openapi3/objc-petstore-coredata.sh
+++ b/bin/openapi3/objc-petstore-coredata.sh
@@ -26,7 +26,8 @@ then
fi
# if you've executed sbt assembly previously it will use that instead.
-export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
-ags="generate -t modules/openapi-generator/src/main/resources/objc -i modules/openapi-generator/src/test/resources/3_0/petstore.json -g objc -D apiDocs=false -D modelDocs=false -o samples/client/petstore/objc/core-data --additional-properties coreData=true -D appName=PetstoreClient $@"
+export GENERATOR_GLOBALS="-DapiDocs=false -DmodelDocs=false"
+export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties ${GENERATOR_GLOBALS}"
+ags="generate -t modules/openapi-generator/src/main/resources/objc -i modules/openapi-generator/src/test/resources/3_0/petstore.json -g objc -o samples/client/petstore/objc/core-data --additional-properties coreData=true,appName=PetstoreClient $@"
java $JAVA_OPTS -jar $executable $ags
diff --git a/bin/openapi3/objc-petstore.sh b/bin/openapi3/objc-petstore.sh
index 11313e903d4..5840e39a450 100755
--- a/bin/openapi3/objc-petstore.sh
+++ b/bin/openapi3/objc-petstore.sh
@@ -27,6 +27,6 @@ fi
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
-ags="generate -t modules/openapi-generator/src/main/resources/objc -i modules/openapi-generator/src/test/resources/3_0/petstore.json -g objc -o samples/client/petstore/objc/default -D appName=PetstoreClient $@"
+ags="generate -t modules/openapi-generator/src/main/resources/objc -i modules/openapi-generator/src/test/resources/3_0/petstore.json -g objc -o samples/client/petstore/objc/default --additional-properties appName=PetstoreClient $@"
java $JAVA_OPTS -jar $executable $ags
diff --git a/bin/openapi3/perl-petstore.sh b/bin/openapi3/perl-petstore.sh
index 02293ae8b6f..7707591647b 100755
--- a/bin/openapi3/perl-petstore.sh
+++ b/bin/openapi3/perl-petstore.sh
@@ -28,6 +28,6 @@ fi
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
# complex module name used for testing
-ags="generate -t modules/openapi-generator/src/main/resources/perl -i modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml -g perl -o samples/client/petstore/perl -DhideGenerationTimestamp=true $@"
+ags="generate -t modules/openapi-generator/src/main/resources/perl -i modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml -g perl -o samples/client/petstore/perl --additional-properties hideGenerationTimestamp=true $@"
java $JAVA_OPTS -jar $executable $ags
diff --git a/bin/openapi3/python-flask-petstore-python2.sh b/bin/openapi3/python-flask-petstore-python2.sh
index c98569d10c4..2f303a57e3d 100755
--- a/bin/openapi3/python-flask-petstore-python2.sh
+++ b/bin/openapi3/python-flask-petstore-python2.sh
@@ -32,7 +32,7 @@ resources=modules/openapi-generator/src/main/resources/python-flask
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
-ags="generate -t $resources -i $input -g python-flask -o $out_folder -c bin/supportPython2.json -D service $@"
+ags="generate -t $resources -i $input -g python-flask -o $out_folder -c bin/supportPython2.json $@"
rm -rf $out_folder/.openapi*
rm -rf $out_folder/openapi_server
diff --git a/bin/openapi3/python-flask-petstore.sh b/bin/openapi3/python-flask-petstore.sh
index 473c69a7b2c..fda1f6a5743 100755
--- a/bin/openapi3/python-flask-petstore.sh
+++ b/bin/openapi3/python-flask-petstore.sh
@@ -31,8 +31,8 @@ out_folder=samples/server/openapi3/petstore/python-flask
resources=modules/openapi-generator/src/main/resources/python-flask
# if you've executed sbt assembly previously it will use that instead.
-export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
-ags="generate -t $resources -i $input -g python-flask -o $out_folder -Dservice $@"
+export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties -Dservice"
+ags="generate -t $resources -i $input -g python-flask -o $out_folder $@"
rm -rf $out_folder/.openapi*
rm -rf $out_folder/openapi_server
diff --git a/bin/openapi3/python-petstore.sh b/bin/openapi3/python-petstore.sh
index b1c5144bdfa..c1dce94f9c2 100755
--- a/bin/openapi3/python-petstore.sh
+++ b/bin/openapi3/python-petstore.sh
@@ -27,6 +27,6 @@ fi
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
-ags="generate -t modules/openapi-generator/src/main/resources/python -i modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml -g python -o samples/openapi3/client/petstore/python/ -DpackageName=petstore_api $@"
+ags="generate -t modules/openapi-generator/src/main/resources/python -i modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml -g python -o samples/openapi3/client/petstore/python/ --additional-properties packageName=petstore_api $@"
java $JAVA_OPTS -jar $executable $ags
diff --git a/bin/openapi3/r-petstore.sh b/bin/openapi3/r-petstore.sh
index cfc0d262acd..9ca5ed61d00 100755
--- a/bin/openapi3/r-petstore.sh
+++ b/bin/openapi3/r-petstore.sh
@@ -27,6 +27,6 @@ fi
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
-ags="generate -t modules/openapi-generator/src/main/resources/r -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g r -o samples/client/petstore/R -DpackageName=petstore $@"
+ags="generate -t modules/openapi-generator/src/main/resources/r -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g r -o samples/client/petstore/R --additional-properties packageName=petstore $@"
java $JAVA_OPTS -jar $executable $ags
diff --git a/bin/openapi3/ruby-client-petstore.sh b/bin/openapi3/ruby-client-petstore.sh
index 237b8ca6ae9..0be84e7eca8 100755
--- a/bin/openapi3/ruby-client-petstore.sh
+++ b/bin/openapi3/ruby-client-petstore.sh
@@ -38,6 +38,6 @@ find samples/openapi3/client/petstore/ruby/spec -type f -not -name petstore_help
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
-ags="generate -t modules/openapi-generator/src/main/resources/ruby-client -i modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml -g ruby -c bin/ruby-petstore.json -o samples/openapi3/client/petstore/ruby -DskipFormModel=true $@"
+ags="generate -t modules/openapi-generator/src/main/resources/ruby-client -i modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml -g ruby -c bin/ruby-petstore.json -o samples/openapi3/client/petstore/ruby --additional-properties skipFormModel=true $@"
java $JAVA_OPTS -jar $executable $ags
diff --git a/bin/openapi3/rust-petstore.sh b/bin/openapi3/rust-petstore.sh
index c252daaf1e6..a4812fc9093 100755
--- a/bin/openapi3/rust-petstore.sh
+++ b/bin/openapi3/rust-petstore.sh
@@ -27,6 +27,6 @@ fi
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
-ags="generate -t modules/openapi-generator/src/main/resources/rust -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g rust -o samples/client/petstore/rust -DpackageName=petstore_client $@"
+ags="generate -t modules/openapi-generator/src/main/resources/rust -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g rust -o samples/client/petstore/rust --additional-properties packageName=petstore_client $@"
java ${JAVA_OPTS} -jar ${executable} ${ags}
diff --git a/bin/openapi3/typescript-angular-petstore-all.sh b/bin/openapi3/typescript-angular-petstore-all.sh
index cf0116c6b25..bb0d6d2479c 100755
--- a/bin/openapi3/typescript-angular-petstore-all.sh
+++ b/bin/openapi3/typescript-angular-petstore-all.sh
@@ -37,7 +37,7 @@ ags="generate -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml
java $JAVA_OPTS -jar $executable $ags
echo "Typescript Petstore API client (with interfaces generated)"
-ags="generate -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g typescript-angular -o samples/client/petstore/typescript-angular-v2/with-interfaces -D withInterfaces=true --additional-properties ngVersion=2 $@"
+ags="generate -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g typescript-angular -o samples/client/petstore/typescript-angular-v2/with-interfaces --additional-properties ngVersion=2,withInterfaces=true $@"
java $JAVA_OPTS -jar $executable $ags
echo "Typescript Petstore API client (v4 { Adding InjectionToken Over OpaqueToken })"
diff --git a/bin/openapi3/typescript-angular-v2-petstore-interfaces.sh b/bin/openapi3/typescript-angular-v2-petstore-interfaces.sh
index deff9fdba5c..3d74ccc1a95 100755
--- a/bin/openapi3/typescript-angular-v2-petstore-interfaces.sh
+++ b/bin/openapi3/typescript-angular-v2-petstore-interfaces.sh
@@ -27,6 +27,6 @@ fi
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
-ags="generate -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g typescript-angular -o samples/client/petstore/typescript-angular-v2/with-interfaces -D withInterfaces=true --additional-properties ngVersion=2 $@"
+ags="generate -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g typescript-angular -o samples/client/petstore/typescript-angular-v2/with-interfaces --additional-properties ngVersion=2,withInterfaces=true $@"
java $JAVA_OPTS -jar $executable $ags
diff --git a/bin/openapi3/typescript-fetch-petstore-interfaces.sh b/bin/openapi3/typescript-fetch-petstore-interfaces.sh
index bf56d7ba9e4..d1e21dfbca7 100755
--- a/bin/openapi3/typescript-fetch-petstore-interfaces.sh
+++ b/bin/openapi3/typescript-fetch-petstore-interfaces.sh
@@ -27,6 +27,6 @@ fi
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
-ags="generate -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g typescript-fetch -o samples/client/petstore/typescript-fetch/builds/with-interfaces -D withInterfaces=true $@"
+ags="generate -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g typescript-fetch -o samples/client/petstore/typescript-fetch/builds/with-interfaces --additional-properties withInterfaces=true $@"
java $JAVA_OPTS -jar $executable $ags
diff --git a/bin/perl-deep-module-petstore.sh b/bin/perl-deep-module-petstore.sh
index 25837a8fe9d..8e47a7d3b82 100755
--- a/bin/perl-deep-module-petstore.sh
+++ b/bin/perl-deep-module-petstore.sh
@@ -27,6 +27,6 @@ fi
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
# complex module name used for testing
-ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g perl -o samples/client/petstore/perl/deep_module_test -DhideGenerationTimestamp=true $@"
+ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g perl -o samples/client/petstore/perl/deep_module_test --additional-properties hideGenerationTimestamp=true $@"
java $JAVA_OPTS -jar $executable $ags --additional-properties moduleName=Something::Deep -o samples/client/petstore/perl/deep_module_test
diff --git a/bin/perl-petstore.sh b/bin/perl-petstore.sh
index 36ac10a4ddd..48974454b73 100755
--- a/bin/perl-petstore.sh
+++ b/bin/perl-petstore.sh
@@ -28,6 +28,6 @@ fi
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
# complex module name used for testing
-ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g perl -o samples/client/petstore/perl -DhideGenerationTimestamp=true $@"
+ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g perl -o samples/client/petstore/perl --additional-properties hideGenerationTimestamp=true $@"
java $JAVA_OPTS -jar $executable $ags
diff --git a/bin/python-asyncio-petstore.sh b/bin/python-asyncio-petstore.sh
index b551a8d4345..4219e51927e 100755
--- a/bin/python-asyncio-petstore.sh
+++ b/bin/python-asyncio-petstore.sh
@@ -27,6 +27,6 @@ fi
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
-ags="generate -t modules/openapi-generator/src/main/resources/python -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g python -o samples/client/petstore/python-asyncio -DpackageName=petstore_api --library asyncio $@"
+ags="generate -t modules/openapi-generator/src/main/resources/python -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g python -o samples/client/petstore/python-asyncio --additional-properties packageName=petstore_api --library asyncio $@"
java $JAVA_OPTS -jar $executable $ags
diff --git a/bin/python-petstore.sh b/bin/python-petstore.sh
index 96f67e76586..651fda1e721 100755
--- a/bin/python-petstore.sh
+++ b/bin/python-petstore.sh
@@ -27,6 +27,6 @@ fi
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
-ags="generate -t modules/openapi-generator/src/main/resources/python -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g python -o samples/client/petstore/python -DpackageName=petstore_api $@"
+ags="generate -t modules/openapi-generator/src/main/resources/python -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g python -o samples/client/petstore/python --additional-properties packageName=petstore_api $@"
java $JAVA_OPTS -jar $executable $ags
diff --git a/bin/python-server-aiohttp-petstore.sh b/bin/python-server-aiohttp-petstore.sh
index 38aae23d5f3..f5cc9bc711b 100755
--- a/bin/python-server-aiohttp-petstore.sh
+++ b/bin/python-server-aiohttp-petstore.sh
@@ -31,8 +31,8 @@ out_folder=samples/server/petstore/$generator
resources=modules/openapi-generator/src/main/resources/$generator
# if you've executed sbt assembly previously it will use that instead.
-export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
-ags="generate -t $resources -i $input -g $generator -o $out_folder -Dservice $@"
+export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties -Dservice"
+ags="generate -t $resources -i $input -g $generator -o $out_folder $@"
rm -rf $out_folder/.openapi*
rm -rf $out_folder/openapi_server
diff --git a/bin/python-server-blueplanet-petstore.sh b/bin/python-server-blueplanet-petstore.sh
index ece725e1c1b..074c53f8788 100755
--- a/bin/python-server-blueplanet-petstore.sh
+++ b/bin/python-server-blueplanet-petstore.sh
@@ -31,8 +31,8 @@ out_folder=samples/server/petstore/$generator
resources=modules/openapi-generator/src/main/resources/$generator
# if you've executed sbt assembly previously it will use that instead.
-export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
-ags="generate -t $resources -i $input -g $generator -o $out_folder -Dservice $@"
+export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties -Dservice"
+ags="generate -t $resources -i $input -g $generator -o $out_folder $@"
rm -rf $out_folder/.openapi*
rm -rf $out_folder/openapi_server
diff --git a/bin/python-server-flask-petstore-python2.sh b/bin/python-server-flask-petstore-python2.sh
index debbb458a15..f720fd5d4f4 100755
--- a/bin/python-server-flask-petstore-python2.sh
+++ b/bin/python-server-flask-petstore-python2.sh
@@ -30,9 +30,8 @@ input=modules/openapi-generator/src/test/resources/2_0/petstore.yaml
out_folder=samples/server/petstore/$generator-python2
resources=modules/openapi-generator/src/main/resources/$generator
-# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
-ags="generate -t $resources -i $input -g $generator -o $out_folder -c bin/supportPython2.json -D service $@"
+ags="generate -t $resources -i $input -g $generator -o $out_folder -c bin/supportPython2.json $@"
rm -rf $out_folder/.openapi*
rm -rf $out_folder/openapi_server
diff --git a/bin/python-server-flask-petstore.sh b/bin/python-server-flask-petstore.sh
index 915aacd540a..eead0ce0d4f 100755
--- a/bin/python-server-flask-petstore.sh
+++ b/bin/python-server-flask-petstore.sh
@@ -31,8 +31,8 @@ out_folder=samples/server/petstore/$generator
resources=modules/openapi-generator/src/main/resources/$generator
# if you've executed sbt assembly previously it will use that instead.
-export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
-ags="generate -t $resources -i $input -g $generator -o $out_folder -Dservice $@"
+export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties -Dservice"
+ags="generate -t $resources -i $input -g $generator -o $out_folder $@"
rm -rf $out_folder/.openapi*
rm -rf $out_folder/openapi_server
diff --git a/bin/python-tornado-petstore.sh b/bin/python-tornado-petstore.sh
index 5ee9e2cc8bd..1d51e798fe9 100755
--- a/bin/python-tornado-petstore.sh
+++ b/bin/python-tornado-petstore.sh
@@ -27,6 +27,6 @@ fi
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
-ags="generate -t modules/openapi-generator/src/main/resources/python -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g python -o samples/client/petstore/python-tornado -DpackageName=petstore_api --library tornado $@"
+ags="generate -t modules/openapi-generator/src/main/resources/python -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g python -o samples/client/petstore/python-tornado --additional-properties packageName=petstore_api --library tornado $@"
java $JAVA_OPTS -jar $executable $ags
diff --git a/bin/r-petstore.sh b/bin/r-petstore.sh
index ac9d2427b6a..4decf28f72f 100755
--- a/bin/r-petstore.sh
+++ b/bin/r-petstore.sh
@@ -27,6 +27,6 @@ fi
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
-ags="generate -t modules/openapi-generator/src/main/resources/r -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g r -o samples/client/petstore/R -DpackageName=petstore $@"
+ags="generate -t modules/openapi-generator/src/main/resources/r -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g r -o samples/client/petstore/R --additional-properties packageName=petstore $@"
java $JAVA_OPTS -jar $executable $ags
diff --git a/bin/rust-petstore.sh b/bin/rust-petstore.sh
index b58d3de7dd6..f8002951208 100755
--- a/bin/rust-petstore.sh
+++ b/bin/rust-petstore.sh
@@ -27,6 +27,6 @@ fi
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
-ags="generate -t modules/openapi-generator/src/main/resources/rust -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g rust -o samples/client/petstore/rust -DpackageName=petstore_client --library=hyper $@"
+ags="generate -t modules/openapi-generator/src/main/resources/rust -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g rust -o samples/client/petstore/rust --additional-properties packageName=petstore_client --library=hyper $@"
java ${JAVA_OPTS} -jar ${executable} ${ags}
diff --git a/bin/rust-reqwest-petstore.sh b/bin/rust-reqwest-petstore.sh
index 054a757c5fa..7a5fc8d8cdd 100755
--- a/bin/rust-reqwest-petstore.sh
+++ b/bin/rust-reqwest-petstore.sh
@@ -27,6 +27,6 @@ fi
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
-ags="generate -t modules/openapi-generator/src/main/resources/rust -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g rust -o samples/client/petstore/rust-reqwest -DpackageName=petstore_client --library=reqwest $@"
+ags="generate -t modules/openapi-generator/src/main/resources/rust -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g rust -o samples/client/petstore/rust-reqwest --additional-properties packageName=petstore_client --library=reqwest $@"
java ${JAVA_OPTS} -jar ${executable} ${ags}
diff --git a/bin/rust-server-petstore.sh b/bin/rust-server-petstore.sh
index 5aa1344766c..e0a459d59e7 100755
--- a/bin/rust-server-petstore.sh
+++ b/bin/rust-server-petstore.sh
@@ -32,7 +32,7 @@ for spec_path in modules/openapi-generator/src/test/resources/*/rust-server/* ;
--input-spec $spec_path
--generator-name rust-server
--output samples/server/petstore/rust-server/output/$spec
- -DpackageName=$spec
+ --additional-properties packageName=$spec
--additional-properties hideGenerationTimestamp=true
--generate-alias-as-model
$@"
diff --git a/bin/spring-cloud-feign-petstore.sh b/bin/spring-cloud-feign-petstore.sh
index 2c0c758e806..2dfef88064f 100755
--- a/bin/spring-cloud-feign-petstore.sh
+++ b/bin/spring-cloud-feign-petstore.sh
@@ -27,7 +27,7 @@ fi
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
-ags="generate -t modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-cloud -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g spring -c bin/spring-cloud-feign-petstore.json -o samples/client/petstore/spring-cloud -DhideGenerationTimestamp=true,responseWrapper=HystrixCommand $@"
+ags="generate -t modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-cloud -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g spring -c bin/spring-cloud-feign-petstore.json -o samples/client/petstore/spring-cloud --additional-properties hideGenerationTimestamp=true,responseWrapper=HystrixCommand $@"
echo "Removing files and folders under samples/client/petstore/spring-cloud/src/main"
rm -rf samples/client/petstore/spring-cloud/src/main
diff --git a/bin/spring-delegate-j8.sh b/bin/spring-delegate-j8.sh
index 56146e282ba..df75a5d169b 100755
--- a/bin/spring-delegate-j8.sh
+++ b/bin/spring-delegate-j8.sh
@@ -27,7 +27,7 @@ fi
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
-ags="generate --artifact-id springboot-delegate-j8 -t modules/openapi-generator/src/main/resources/JavaSpring -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g spring -o samples/server/petstore/springboot-delegate-j8 -DdelegatePattern=true,hideGenerationTimestamp=true $@"
+ags="generate --artifact-id springboot-delegate-j8 -t modules/openapi-generator/src/main/resources/JavaSpring -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g spring -o samples/server/petstore/springboot-delegate-j8 --additional-properties delegatePattern=true,hideGenerationTimestamp=true $@"
echo "Removing files and folders under samples/server/petstore/springboot-delegate-j8/src/main"
rm -rf samples/server/petstore/springboot-delegate-j8/src/main
diff --git a/bin/spring-delegate.sh b/bin/spring-delegate.sh
index 4cf133072c2..2404c24cedc 100755
--- a/bin/spring-delegate.sh
+++ b/bin/spring-delegate.sh
@@ -27,7 +27,7 @@ fi
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
-ags="generate --artifact-id springboot-delegate -t modules/openapi-generator/src/main/resources/JavaSpring -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g spring -o samples/server/petstore/springboot-delegate -DdelegatePattern=true,hideGenerationTimestamp=true,java8=false $@"
+ags="generate --artifact-id springboot-delegate -t modules/openapi-generator/src/main/resources/JavaSpring -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g spring -o samples/server/petstore/springboot-delegate --additional-properties delegatePattern=true,hideGenerationTimestamp=true,java8=false $@"
echo "Removing files and folders under samples/server/petstore/springboot-delegate/src/main"
rm -rf samples/server/petstore/springboot-delegate/src/main
diff --git a/bin/spring-mvc-petstore-j8-async-server.sh b/bin/spring-mvc-petstore-j8-async-server.sh
index e55cfe647a4..fdbb35d4b41 100755
--- a/bin/spring-mvc-petstore-j8-async-server.sh
+++ b/bin/spring-mvc-petstore-j8-async-server.sh
@@ -27,6 +27,6 @@ fi
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
-ags="generate -t modules/openapi-generator/src/main/resources/JavaSpring -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g spring -o samples/server/petstore/spring-mvc-j8-async -c bin/spring-mvc-petstore-j8-async.json -DhideGenerationTimestamp=true,async=true --additional-properties serverPort=8002 $@"
+ags="generate -t modules/openapi-generator/src/main/resources/JavaSpring -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g spring -o samples/server/petstore/spring-mvc-j8-async -c bin/spring-mvc-petstore-j8-async.json --additional-properties hideGenerationTimestamp=true,async=true --additional-properties serverPort=8002 $@"
java $JAVA_OPTS -jar $executable $ags
diff --git a/bin/spring-mvc-petstore-j8-localdatetime.sh b/bin/spring-mvc-petstore-j8-localdatetime.sh
index e5a32b7dc7a..ae3b16177af 100755
--- a/bin/spring-mvc-petstore-j8-localdatetime.sh
+++ b/bin/spring-mvc-petstore-j8-localdatetime.sh
@@ -27,6 +27,6 @@ fi
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
-ags="generate -t modules/openapi-generator/src/main/resources/JavaSpring -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g spring -c bin/spring-mvc-petstore-j8-localdatetime.json -o samples/server/petstore/spring-mvc-j8-localdatetime -DhideGenerationTimestamp=true -DbooleanGetterPrefix=get --additional-properties serverPort=8002 $@"
+ags="generate -t modules/openapi-generator/src/main/resources/JavaSpring -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g spring -c bin/spring-mvc-petstore-j8-localdatetime.json -o samples/server/petstore/spring-mvc-j8-localdatetime --additional-properties hideGenerationTimestamp=true,booleanGetterPrefix=get,serverPort=8002 $@"
java $JAVA_OPTS -jar $executable $ags
diff --git a/bin/spring-mvc-petstore-server.sh b/bin/spring-mvc-petstore-server.sh
index 71e6d73fac3..ddbb1b4d64f 100755
--- a/bin/spring-mvc-petstore-server.sh
+++ b/bin/spring-mvc-petstore-server.sh
@@ -27,6 +27,6 @@ fi
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
-ags="generate -t modules/openapi-generator/src/main/resources/JavaSpring -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g spring -c bin/spring-mvc-petstore-server.json -o samples/server/petstore/spring-mvc -DhideGenerationTimestamp=true,java8=false --additional-properties serverPort=8002 --additional-properties booleanGetterPrefix=get $@"
+ags="generate -t modules/openapi-generator/src/main/resources/JavaSpring -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g spring -c bin/spring-mvc-petstore-server.json -o samples/server/petstore/spring-mvc --additional-properties hideGenerationTimestamp=true,java8=false --additional-properties serverPort=8002 --additional-properties booleanGetterPrefix=get $@"
java $JAVA_OPTS -jar $executable $ags
diff --git a/bin/spring-stubs.sh b/bin/spring-stubs.sh
index 1586459d3aa..79edfa1820e 100755
--- a/bin/spring-stubs.sh
+++ b/bin/spring-stubs.sh
@@ -27,6 +27,6 @@ fi
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
-ags="generate --artifact-id spring-stubs -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g spring -o samples/client/petstore/spring-stubs -DinterfaceOnly=true,singleContentTypes=true,hideGenerationTimestamp=true $@"
+ags="generate --artifact-id spring-stubs -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g spring -o samples/client/petstore/spring-stubs --additional-properties interfaceOnly=true,singleContentTypes=true,hideGenerationTimestamp=true $@"
java $JAVA_OPTS -jar $executable $ags
diff --git a/bin/springboot-petstore-server-beanvalidation.sh b/bin/springboot-petstore-server-beanvalidation.sh
index 18f232ef6bd..33b1fdce58b 100755
--- a/bin/springboot-petstore-server-beanvalidation.sh
+++ b/bin/springboot-petstore-server-beanvalidation.sh
@@ -27,7 +27,7 @@ fi
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
-ags="generate -t modules/openapi-generator/src/main/resources/JavaSpring -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g spring -o samples/server/petstore/springboot-beanvalidation -c bin/springboot-petstore-server-beanvalidation.json -DhideGenerationTimestamp=true,java8=false $@"
+ags="generate -t modules/openapi-generator/src/main/resources/JavaSpring -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g spring -o samples/server/petstore/springboot-beanvalidation -c bin/springboot-petstore-server-beanvalidation.json --additional-properties hideGenerationTimestamp=true,java8=false $@"
echo "Removing files and folders under samples/server/petstore/springboot-beanvalidation/src/main"
rm -rf samples/server/petstore/springboot-beanvalidation/src/main
diff --git a/bin/springboot-petstore-server-implicitHeaders.sh b/bin/springboot-petstore-server-implicitHeaders.sh
index 8c56ade82ce..277c57fcbdd 100755
--- a/bin/springboot-petstore-server-implicitHeaders.sh
+++ b/bin/springboot-petstore-server-implicitHeaders.sh
@@ -27,7 +27,7 @@ fi
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
-ags="generate --artifact-id springboot-implicitHeaders -t modules/openapi-generator/src/main/resources/JavaSpring -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g spring -c bin/springboot-petstore-server-implicitHeaders.json -o samples/server/petstore/springboot-implicitHeaders -DhideGenerationTimestamp=true $@"
+ags="generate --artifact-id springboot-implicitHeaders -t modules/openapi-generator/src/main/resources/JavaSpring -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g spring -c bin/springboot-petstore-server-implicitHeaders.json -o samples/server/petstore/springboot-implicitHeaders --additional-properties hideGenerationTimestamp=true $@"
echo "Removing files and folders under samples/server/petstore/springboot-implicitHeaders/src/main"
rm -rf samples/server/petstore/springboot-implicitHeaders/src/main
diff --git a/bin/springboot-petstore-server-reactive.sh b/bin/springboot-petstore-server-reactive.sh
index 9938be6aba5..6cc531e66e2 100755
--- a/bin/springboot-petstore-server-reactive.sh
+++ b/bin/springboot-petstore-server-reactive.sh
@@ -26,7 +26,7 @@ fi
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
-ags="generate --artifact-id springboot-reactive -t modules/openapi-generator/src/main/resources/JavaSpring -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g spring -o samples/server/petstore/springboot-reactive -Dreactive=true,delegatePattern=true,hideGenerationTimestamp=true $@"
+ags="generate --artifact-id springboot-reactive -t modules/openapi-generator/src/main/resources/JavaSpring -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g spring -o samples/server/petstore/springboot-reactive --additional-properties reactive=true,delegatePattern=true,hideGenerationTimestamp=true $@"
echo "Removing files and folders under samples/server/petstore/springboot-reactive/src/main"
rm -rf samples/server/petstore/springboot-reactive/src/main
diff --git a/bin/springboot-petstore-server-useOptional.sh b/bin/springboot-petstore-server-useOptional.sh
index 35336dce752..029f923862a 100755
--- a/bin/springboot-petstore-server-useOptional.sh
+++ b/bin/springboot-petstore-server-useOptional.sh
@@ -27,7 +27,7 @@ fi
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
-ags="generate -t modules/openapi-generator/src/main/resources/JavaSpring -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g spring -c bin/springboot-petstore-server-useOptional.json -o samples/server/petstore/springboot-useoptional -DhideGenerationTimestamp=true $@"
+ags="generate -t modules/openapi-generator/src/main/resources/JavaSpring -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g spring -c bin/springboot-petstore-server-useOptional.json -o samples/server/petstore/springboot-useoptional --additional-properties hideGenerationTimestamp=true $@"
echo "Removing files and folders under samples/server/petstore/springboot-useoptional/src/main"
rm -rf samples/server/petstore/springboot-useoptional/src/main
diff --git a/bin/springboot-petstore-server.sh b/bin/springboot-petstore-server.sh
index 725ac389007..9b34934163d 100755
--- a/bin/springboot-petstore-server.sh
+++ b/bin/springboot-petstore-server.sh
@@ -27,7 +27,7 @@ fi
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
-ags="generate --artifact-id springboot -t modules/openapi-generator/src/main/resources/JavaSpring -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g spring -o samples/server/petstore/springboot -DhideGenerationTimestamp=true $@"
+ags="generate --artifact-id springboot -t modules/openapi-generator/src/main/resources/JavaSpring -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g spring -o samples/server/petstore/springboot --additional-properties hideGenerationTimestamp=true $@"
echo "Removing files and folders under samples/server/petstore/springboot/src/main"
rm -rf samples/server/petstore/springboot/src/main
diff --git a/bin/springboot-virtualan-petstore-server.sh b/bin/springboot-virtualan-petstore-server.sh
index a55eea9fafb..a8471cf1998 100755
--- a/bin/springboot-virtualan-petstore-server.sh
+++ b/bin/springboot-virtualan-petstore-server.sh
@@ -27,7 +27,7 @@ fi
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
-ags="generate --artifact-id springboot-virtualan -t modules/openapi-generator/src/main/resources/JavaSpring -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g spring -o samples/server/petstore/springboot-virtualan -c bin/springboot-virtualan-petstore-server.json -DhideGenerationTimestamp=true $@"
+ags="generate --artifact-id springboot-virtualan -t modules/openapi-generator/src/main/resources/JavaSpring -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g spring -o samples/server/petstore/springboot-virtualan -c bin/springboot-virtualan-petstore-server.json --additional-properties hideGenerationTimestamp=true $@"
echo "Removing files and folders under samples/server/petstore/springboot-virtualan/src/main"
rm -rf samples/server/petstore/springboot-virtualan/src/main
diff --git a/bin/tests/test-debug-supporting-files.sh b/bin/tests/test-debug-supporting-files.sh
index 3d6a2e86967..cd130225b4a 100755
--- a/bin/tests/test-debug-supporting-files.sh
+++ b/bin/tests/test-debug-supporting-files.sh
@@ -26,8 +26,8 @@ then
fi
# if you've executed sbt assembly previously it will use that instead.
-export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
-ags="generate -t modules/openapi-generator/src/main/resources/python -i modules/openapi-generator/src/test/resources/3_0/issue_241.yaml -g python -o /tmp/test-debug-supporting-files/ -DpackageName=petstore_api -DdebugSupportingFiles=true $@"
+export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties -DdebugSupportingFiles=true"
+ags="generate -t modules/openapi-generator/src/main/resources/python -i modules/openapi-generator/src/test/resources/3_0/issue_241.yaml -g python -o /tmp/test-debug-supporting-files/ --additional-properties packageName=petstore_api $@"
if [[ $(java $JAVA_OPTS -jar $executable $ags 2>&1 | grep "StackOverflowError") ]]; then
echo "There are StackOverflowError. Please check the result."
diff --git a/bin/typescript-angular-v2-petstore-interfaces.sh b/bin/typescript-angular-v2-petstore-interfaces.sh
index 6db2f6e11d6..18f638f4dfe 100755
--- a/bin/typescript-angular-v2-petstore-interfaces.sh
+++ b/bin/typescript-angular-v2-petstore-interfaces.sh
@@ -27,6 +27,6 @@ fi
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
-ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g typescript-angular -o samples/client/petstore/typescript-angular-v2/with-interfaces -D withInterfaces=true --additional-properties ngVersion=2 $@"
+ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g typescript-angular -o samples/client/petstore/typescript-angular-v2/with-interfaces --additional-properties ngVersion=2,withInterfaces=true $@"
java $JAVA_OPTS -jar $executable $ags
diff --git a/bin/typescript-angular-v6-petstore-not-provided-in-root-with-npm.sh b/bin/typescript-angular-v6-petstore-not-provided-in-root-with-npm.sh
index 082f197a716..981e55dbc28 100755
--- a/bin/typescript-angular-v6-petstore-not-provided-in-root-with-npm.sh
+++ b/bin/typescript-angular-v6-petstore-not-provided-in-root-with-npm.sh
@@ -27,6 +27,6 @@ fi
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
-ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g typescript-angular -c bin/typescript-angular-v6-petstore-not-provided-in-root-with-npm.json -o samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm -D providedInRoot=false --additional-properties ngVersion=6.0.0 $@"
+ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g typescript-angular -c bin/typescript-angular-v6-petstore-not-provided-in-root-with-npm.json -o samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm --additional-properties ngVersion=6.0.0,providedInRoot=false $@"
java $JAVA_OPTS -jar $executable $ags
diff --git a/bin/typescript-angular-v6-petstore-not-provided-in-root.sh b/bin/typescript-angular-v6-petstore-not-provided-in-root.sh
index deddf8d536f..f00826e050f 100755
--- a/bin/typescript-angular-v6-petstore-not-provided-in-root.sh
+++ b/bin/typescript-angular-v6-petstore-not-provided-in-root.sh
@@ -27,6 +27,6 @@ fi
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
-ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g typescript-angular -o samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default -D providedInRoot=false --additional-properties ngVersion=6.0.0 $@"
+ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g typescript-angular -o samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default --additional-properties ngVersion=6.0.0,providedInRoot=false $@"
java $JAVA_OPTS -jar $executable $ags
diff --git a/bin/typescript-angular-v7-petstore-not-provided-in-root-with-npm.sh b/bin/typescript-angular-v7-petstore-not-provided-in-root-with-npm.sh
index 4cb66477ee8..f74cb16b02a 100755
--- a/bin/typescript-angular-v7-petstore-not-provided-in-root-with-npm.sh
+++ b/bin/typescript-angular-v7-petstore-not-provided-in-root-with-npm.sh
@@ -27,6 +27,6 @@ fi
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
-ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g typescript-angular -c bin/typescript-angular-v7-petstore-not-provided-in-root-with-npm.json -o samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm -D providedInRoot=false --additional-properties ngVersion=7.0.0 $@"
+ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g typescript-angular -c bin/typescript-angular-v7-petstore-not-provided-in-root-with-npm.json -o samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm --additional-properties ngVersion=7.0.0,providedInRoot=false $@"
java $JAVA_OPTS -jar $executable $ags
diff --git a/bin/typescript-angular-v7-petstore-not-provided-in-root.sh b/bin/typescript-angular-v7-petstore-not-provided-in-root.sh
index d790a67c67b..46eb22cbc4d 100755
--- a/bin/typescript-angular-v7-petstore-not-provided-in-root.sh
+++ b/bin/typescript-angular-v7-petstore-not-provided-in-root.sh
@@ -27,6 +27,6 @@ fi
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
-ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g typescript-angular -o samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default -D providedInRoot=false --additional-properties ngVersion=7.0.0 $@"
+ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g typescript-angular -o samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default --additional-properties ngVersion=7.0.0,providedInRoot=false $@"
java $JAVA_OPTS -jar $executable $ags
diff --git a/bin/typescript-axios-petstore-interfaces.sh b/bin/typescript-axios-petstore-interfaces.sh
index 6ba5985126a..84a65e0aba3 100755
--- a/bin/typescript-axios-petstore-interfaces.sh
+++ b/bin/typescript-axios-petstore-interfaces.sh
@@ -27,6 +27,6 @@ fi
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
-ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g typescript-axios -o samples/client/petstore/typescript-axios/builds/with-interfaces -D withInterfaces=true $@"
+ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g typescript-axios -o samples/client/petstore/typescript-axios/builds/with-interfaces --additional-properties withInterfaces=true $@"
java $JAVA_OPTS -jar $executable $ags
diff --git a/bin/typescript-fetch-petstore-interfaces.sh b/bin/typescript-fetch-petstore-interfaces.sh
index 58a9137820d..412d778b4f9 100755
--- a/bin/typescript-fetch-petstore-interfaces.sh
+++ b/bin/typescript-fetch-petstore-interfaces.sh
@@ -27,6 +27,6 @@ fi
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
-ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g typescript-fetch -o samples/client/petstore/typescript-fetch/builds/with-interfaces -D withInterfaces=true $@"
+ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g typescript-fetch -o samples/client/petstore/typescript-fetch/builds/with-interfaces --additional-properties withInterfaces=true $@"
java $JAVA_OPTS -jar $executable $ags
diff --git a/bin/typescript-rxjs-petstore-interfaces.sh b/bin/typescript-rxjs-petstore-interfaces.sh
index 92f6e8f328e..c7b52aca526 100755
--- a/bin/typescript-rxjs-petstore-interfaces.sh
+++ b/bin/typescript-rxjs-petstore-interfaces.sh
@@ -27,6 +27,6 @@ fi
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
-ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g typescript-rxjs -o samples/client/petstore/typescript-rxjs/builds/with-interfaces -D withInterfaces=true $@"
+ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g typescript-rxjs -o samples/client/petstore/typescript-rxjs/builds/with-interfaces --additional-properties withInterfaces=true $@"
java $JAVA_OPTS -jar $executable $ags
diff --git a/bin/utils/ensure-up-to-date b/bin/utils/ensure-up-to-date
index 3d5909a88d8..166c8c60bd1 100755
--- a/bin/utils/ensure-up-to-date
+++ b/bin/utils/ensure-up-to-date
@@ -25,6 +25,7 @@ declare -a scripts=(
"./bin/kotlin-client-threetenbp.sh"
"./bin/kotlin-server-petstore.sh"
"./bin/kotlin-springboot-petstore-server.sh"
+"./bin/kotlin-springboot-petstore-server-reactive.sh"
"./bin/mysql-schema-petstore.sh"
"./bin/python-petstore-all.sh"
"./bin/openapi3/python-petstore.sh"
@@ -51,9 +52,11 @@ declare -a scripts=(
"./bin/csharp-netcore-petstore-all.sh"
"./bin/elixir-petstore.sh"
"./bin/go-petstore.sh"
+"./bin/go-petstore-withxml.sh"
"./bin/go-gin-petstore-server.sh"
"./bin/groovy-petstore.sh"
"./bin/apex-petstore.sh"
+"./bin/perl-petstore-all.sh"
#"./bin/elm-petstore-all.sh"
"./bin/meta-codegen.sh"
# OTHERS
diff --git a/bin/utils/release/bump.sh b/bin/utils/release/bump.sh
new file mode 100755
index 00000000000..1afeffde16b
--- /dev/null
+++ b/bin/utils/release/bump.sh
@@ -0,0 +1,221 @@
+#!/usr/bin/env bash
+#
+# This script bumps from one version to another
+#
+# Copyright 2018 OpenAPI-Generator Contributors (https://openapi-generator.tech)
+#
+# 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
+#
+# http://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.
+#
+
+declare -r version_regex="([0-9]+).([0-9]+).([0-9]+)-?(SNAPSHOT){0,1}"
+declare start=""
+declare end=""
+declare from="${version_regex}"
+declare to=""
+declare debug=${debug:-false}
+declare -a from_parts=()
+declare -a to_parts=()
+declare -ar inc=(major minor build snapshot)
+
+USAGE="
+USAGE: $0 OPTIONS input_file
+
+ This script will bump a version number (or other value) between marker tags.
+
+OPTIONS:
+ -f The 'from' version
+ -t The 'to' version
+ -s The start tag regex
+ default: $start
+ -e The end tag regex
+ default: $end
+ -i Increase by one of: ${inc[@]}
+ -h Print this message
+
+EXAMPLES:
+
+Update to next snapshot version:
+ $0 -f 3.0.0 -t 3.0.1-SNAPSHOT pom.xml
+Update build version only (useful for docs)
+ $0 -f 3.0.0 -t 3.0.1 pom.xml
+Update from any version to any other version
+ $0 -f 1.2.3 -t 9.9.9-SNAPSHOT pom.xml
+Customize the start/end tags
+ $0 -f 1.0.0 1.0.1-SNAPSHOT -s \"\" -e \"\" pom.xml
+"
+
+
+## print an error message and exit
+err() {
+ >&2 echo -e "$1"
+ exit 1
+}
+
+## debug log messages. Run with debug=true ./bump.sh
+d() {
+ if [[ true = "${debug}" ]]; then
+ echo "$1"
+ fi
+}
+
+## outputs usage and exits
+usage()
+{
+ err "${USAGE}"
+ exit 1
+}
+
+## usage: version input extracted_array
+## - Checks that 'input' is a valid version
+## - Extracts the version parts into 'extracted_array'
+version()
+{
+ if [[ "$#" -ne 2 ]]; then
+ err "Call function version with two parameters: version string arr"
+ fi
+ local v=$1
+ if [[ "${v}" =~ $version_regex ]]; then
+ local major=${BASH_REMATCH[1]}
+ local minor=${BASH_REMATCH[2]}
+ local build=${BASH_REMATCH[3]}
+ local snapshot=false
+ if [[ "SNAPSHOT" = "${BASH_REMATCH[4]}" ]]; then
+ snapshot=true
+ fi
+
+ d "major=$major minor=$minor build=$build snapshot=$snapshot"
+
+ eval "$2=(${major} ${minor} ${build} ${snapshot})"
+ else
+ err "Invalid version: $v"
+ fi
+}
+
+while getopts "hf:t:s:e:i:" OPTION
+do
+ case ${OPTION} in
+ f)
+ from=${OPTARG}
+ ;;
+ t)
+ to=${OPTARG}
+ ;;
+ s)
+ start=${OPTARG}
+ ;;
+ e)
+ end=${OPTARG}
+ ;;
+ i)
+ increase=${OPTARG}
+ if [[ ! "${inc[@]}" =~ ${increase} ]];then
+ err "Only support increasing by one of: ${inc[@]}"
+ fi
+ ;;
+ h)
+ usage
+ ;;
+ esac
+done
+
+shift $((OPTIND-1))
+file=( "$@" )
+
+if [[ ${#file[@]} -eq 0 ]];then
+ echo "No file specified" >&2
+ usage
+fi
+
+if [[ -z "${from}" ]]; then
+ echo "No 'from' version specified." >&2
+ usage
+fi
+
+# TODO: compare steps in from_parts and to_parts.
+version "${from}" from_parts
+
+if [[ -z "${to}" ]]; then
+ if [[ -z "${increase}" ]]; then
+ err "No 'to' version specified."
+ else
+ case ${increase} in
+ major)
+ to="$(( ${from_parts[0]} + 1 )).0.0"
+ version "$to" to_parts
+ ;;
+ minor)
+ to="${from_parts[0]}.$(( ${from_parts[1]} + 1 )).0"
+ version "$to" to_parts
+ ;;
+ build)
+ to="${from_parts[0]}.${from_parts[1]}.$(( ${from_parts[2]} + 1 ))"
+ version "$to" to_parts
+ ;;
+ snapshot)
+ if [[ true = ${from_parts[3]} ]]; then
+ err "Can't move from SNAPSHOT to SNAPSHOT (from=${from})."
+ else
+ to="${from_parts[0]}.${from_parts[1]}.$(( ${from_parts[2]} + 1 ))-SNAPSHOT"
+ version "$to" to_parts
+ fi
+ ;;
+ esac
+ fi
+else
+ version "${to}" to_parts
+fi
+
+if [[ ${from_parts[3]} = true && ${to_parts[3]} = true ]]; then
+ err "Moving from SNAPSHOT to SNAPSHOT is not supported."
+fi
+
+cat < sedscript.sed
+/${start}/,/${end}/{
+ s/${from}/${to}/g
+}
+EOF
+
+d "Moving from=${from} to=${to}"
+
+trap 'rm -f sedscript.sed' EXIT
+
+sed_cross() {
+ # Cross-platform sed invocation. OSX has no option to show a version number in sed.
+ local target=$1
+ sed --version >/dev/null 2>&1 && sed -e -i '' -f sedscript.sed "$target" || sed -i '' -E -f sedscript.sed "$target"
+}
+
+update_file() {
+ local filename=$1
+ local error_message="ERROR: Failed to update $filename to target version ${to}"
+ local original_hash=$(ruby -r digest -e "p Digest::SHA2.file(\"$filename\").hexdigest")
+ local final_hash=""
+ if ! sed_cross ${filename}; then
+ # occurs if, for example, the file doesn't exist.
+ echo "ERROR: Failed to update $filename to target version ${to}" >&2
+ fi
+
+ local final_hash=$(ruby -r digest -e "p Digest::SHA2.file(\"$filename\").hexdigest")
+
+ if [[ "${original_hash}" = "${final_hash}" ]]; then
+ # occurs if, for example, the file doesn't have expected marker tags for replacement
+ echo "ERROR: $filename was not modified." >&2
+ else
+ echo "Updated $filename successfully!"
+ fi
+}
+
+for filename in "${file[@]}"; do
+ update_file ${filename}
+done
+
diff --git a/bin/utils/release/release_version_update.sh b/bin/utils/release/release_version_update.sh
new file mode 100755
index 00000000000..abc227a2027
--- /dev/null
+++ b/bin/utils/release/release_version_update.sh
@@ -0,0 +1,96 @@
+#!/usr/bin/env bash
+#
+# This script is used to update files to the "latest" version.
+#
+# usage: ./bin/utils/release_version_update.sh
+# example: ./bin/utils/release_version_update.sh 3.0.1-SNAPSHOT 3.0.1
+#
+# Copyright 2018 OpenAPI-Generator Contributors (https://openapi-generator.tech)
+#
+# 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
+#
+# http://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.
+#
+
+declare cwd=$(cd $(dirname "${BASH_SOURCE}") && pwd)
+declare root=$(cd "$cwd" && cd ../../../ && pwd)
+
+USAGE="
+USAGE: $0 target
+
+ This script will convert the current version in target files to the specified 'target'
+ where target is one of:
+
+ major
+ minor
+ build
+ snapshot
+
+EXAMPLES:
+
+Update to new snapshot (1.0.0 -> 1.0.1-SNAPSHOT):
+ $0 snapshot
+Update build version (1.0.0 -> 1.0.1)
+ $0 build
+Update minor version (1.2.3 -> 1.3.0)
+ $0 minor
+Update major version (1.2.3 -> 2.0.0)
+ $0 major
+"
+
+version=$(ruby -r rexml/document -e 'include REXML;
+ p XPath.first(Document.new($stdin), "/project/version/text()")' < ${cwd}/../../../pom.xml | tr -d '"')
+
+if [[ -n "$1" ]]; then
+ case $1 in
+ --help|-h)
+ echo -e "$USAGE" >&2
+ exit 1
+ ;;
+ major|minor|build|snapshot)
+ inc="$1"
+ ;;
+ *)
+ echo "Invalid target.Must be one of: major minor build or snapshot" >&2
+ exit 1
+ ;;
+ esac
+else
+ inc="snapshot"
+fi
+
+echo "Release preparation: Moving from $version to next $inc version."
+
+# These files should wrap target version replacement blocks with and
+# We can include xml and md files here.
+declare -a xml_files=(
+ "${root}/modules/openapi-generator-cli/pom.xml"
+ "${root}/modules/openapi-generator-gradle-plugin/pom.xml"
+ "${root}/modules/openapi-generator-core/pom.xml"
+ "${root}/modules/openapi-generator-maven-plugin/pom.xml"
+ "${root}/modules/openapi-generator-online/pom.xml"
+ "${root}/modules/openapi-generator/pom.xml"
+ "${root}/modules/openapi-generator-maven-plugin/examples/multi-module/java-client/pom.xml"
+ "${root}/modules/openapi-generator-maven-plugin/examples/java-client.xml"
+ "${root}/modules/openapi-generator-maven-plugin/examples/non-java-invalid-spec.xml"
+ "${root}/modules/openapi-generator-maven-plugin/examples/non-java.xml"
+ "${root}/samples/meta-codegen/lib/pom.xml"
+ "${root}/pom.xml"
+)
+
+# These files should wrap target version replacement blocks with # RELEASE_VERSION and # /RELEASE_VERSION
+declare -a properties_files=(
+ "${root}/modules/openapi-generator-gradle-plugin/gradle.properties"
+ "${root}/modules/openapi-generator-gradle-plugin/samples/local-spec/gradle.properties"
+)
+
+${cwd}/bump.sh -f ${version} -i ${inc} ${xml_files[@]}
+${cwd}/bump.sh -f ${version} -t ${inc} -s '# RELEASE_VERSION' -e '# \/RELEASE_VERSION' ${properties_files[@]}
diff --git a/bin/utils/release/release_version_update_docs.sh b/bin/utils/release/release_version_update_docs.sh
new file mode 100755
index 00000000000..287b9a3e7df
--- /dev/null
+++ b/bin/utils/release/release_version_update_docs.sh
@@ -0,0 +1,115 @@
+#!/usr/bin/env bash
+#
+# This script is used to update reference files to the "next" version.
+#
+# usage: ./bin/utils/release_version_update.sh
+# example: ./bin/utils/release_version_update.sh 3.0.1 3.0.2
+#
+# Copyright 2018 OpenAPI-Generator Contributors (https://openapi-generator.tech)
+#
+# 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
+#
+# http://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.
+#
+
+declare cwd=$(cd $(dirname "${BASH_SOURCE}") && pwd)
+declare root=$(cd "$cwd" && cd ../../../ && pwd)
+
+USAGE="
+USAGE: $0 version target
+
+ This script will convert the specified version in DOC target files to the 'target'
+ where target is one of:
+
+ major
+ minor
+ build
+
+ or an explicitly defined version number.
+
+NOTE:
+
+ Files prepped by this script should never target SNAPSHOT, as the docs should refer to release artifacts.
+ If intending to update to/from snapshots, please add target files to release_version_update.sh instead.
+
+EXAMPLES:
+
+Update build version (1.0.0 -> 1.0.1)
+ $0 1.0.0 build
+Update minor version (1.2.3 -> 1.3.0)
+ $0 1.2.3 minor
+Update major version (1.2.3 -> 2.0.0)
+ $0 1.2.3 major
+"
+
+declare version=$(ruby -r rexml/document -e 'include REXML;
+ p XPath.first(Document.new($stdin), "/project/version/text()")' < ${cwd}/../../../pom.xml | tr -d '"')
+
+declare target="${2:-build}"
+declare inc=""
+declare next_version=""
+declare ags=""
+
+if [[ -z "$1" ]]; then
+ echo "Missing argument." >&2
+ echo -e "$USAGE" >&2
+ exit 1
+fi
+
+# Get version number we're changing
+case $1 in
+ --help|-h)
+ echo -e "$USAGE" >&2
+ exit 1
+ ;;
+ *)
+ version="$1"
+ ;;
+esac
+
+# Get the target…
+case ${target} in
+ major|minor|build)
+ inc="$target"
+ ;;
+ snapshot)
+ echo -e "Files prepped by this script should never target SNAPSHOT, as the docs should refer to release artifacts.
+ If intending to update to/from snapshots, please add target files to release_version_update.sh instead.
+ " >&2
+ exit 1
+ ;;
+ *)
+ next_version="$target"
+ ;;
+esac
+
+ags="-f ${version}"
+
+if [[ -n "${next_version}" ]];then
+ echo "Release preparation: Moving from $version to ${next_version}."
+ ags="$ags -t ${next_version}"
+else
+ echo "Release preparation: Moving from $version to next $inc version."
+ ags="$ags -i ${inc}"
+fi
+
+declare -a xml_files=(
+ "${root}/modules/openapi-generator-maven-plugin/README.md"
+ "${root}/modules/openapi-generator-gradle-plugin/samples/local-spec/README.md"
+ "${root}/README.md"
+)
+
+declare -a commented_files=(
+ "${root}/modules/openapi-generator-gradle-plugin/README.adoc"
+)
+
+${cwd}/bump.sh ${ags} ${xml_files[@]}
+${cwd}/bump.sh ${ags} -s '# RELEASE_VERSION' -e '# \/RELEASE_VERSION' ${commented_files[@]}
diff --git a/bin/utils/release/testing.txt b/bin/utils/release/testing.txt
new file mode 100644
index 00000000000..300bdac6f68
--- /dev/null
+++ b/bin/utils/release/testing.txt
@@ -0,0 +1,17 @@
+This is a test simple:
+3.0.1
+
+Testing with other data:
+
+Version 1.2.3
+
+
+Testing with -SNAPSHOT data:
+
+Version 2.3.4-SNAPSHOT
+
+
+Testing with a value not to be replaced:
+
+Version 3.2.2
+
diff --git a/bin/utils/release/testing2.txt b/bin/utils/release/testing2.txt
new file mode 100644
index 00000000000..300bdac6f68
--- /dev/null
+++ b/bin/utils/release/testing2.txt
@@ -0,0 +1,17 @@
+This is a test simple:
+3.0.1
+
+Testing with other data:
+
+Version 1.2.3
+
+
+Testing with -SNAPSHOT data:
+
+Version 2.3.4-SNAPSHOT
+
+
+Testing with a value not to be replaced:
+
+Version 3.2.2
+
diff --git a/bin/utils/release_checkout.rb b/bin/utils/release_checkout.rb
index 720f139c41e..8f82bf4bdc4 100755
--- a/bin/utils/release_checkout.rb
+++ b/bin/utils/release_checkout.rb
@@ -40,7 +40,8 @@ end
def check_openapi_generator_online_docker
print "Checking openapi-generator-online docker ... "
- url = "https://hub.docker.com/r/openapitools/openapi-generator-online/tags/"
+ url = "https://hub.docker.com/v2/repositories/openapitools/openapi-generator-online/tags/?page_size=25&page=1"
+
docker_tag = "v#{$version}"
open(url) do |f|
content = f.read
@@ -56,7 +57,7 @@ end
def check_openapi_generator_cli_docker
print "Checking openapi-generator-cli docker ... "
- url = "https://hub.docker.com/r/openapitools/openapi-generator-cli/tags/"
+ url = "https://hub.docker.com/v2/repositories/openapitools/openapi-generator-cli/tags/?page_size=25&page=1"
docker_tag = "v#{$version}"
open(url) do |f|
content = f.read
@@ -202,6 +203,8 @@ $version = ARGV[0]
puts "Running checkout on OpenAPI Generator release #{$version}"
+check_openapi_generator_online_docker
+check_openapi_generator_cli_docker
check_npmjs
check_homebrew
check_openapi_generator_jar
@@ -211,5 +214,3 @@ check_openapi_generator_gradle_plugin_jar
check_openapi_generator_online_jar
check_openapi_generator_project_pom
check_readme
-check_openapi_generator_online_docker
-check_openapi_generator_cli_docker
diff --git a/bin/utils/release_version_update.sh b/bin/utils/release_version_update.sh
deleted file mode 100755
index c485fc589c9..00000000000
--- a/bin/utils/release_version_update.sh
+++ /dev/null
@@ -1,62 +0,0 @@
-#!/bin/bash
-#
-# usage: ./bin/utils/release_version_update.sh 3.0.1-SNAPSHOT 3.0.1
-#
-# Copyright 2018 OpenAPI-Generator Contributors (https://openapi-generator.tech)
-#
-# 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
-#
-# http://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.
-#
-
-if [[ "$1" != "" ]]; then
- FROM="$1"
-else
- echo "Missing argument. Usage e.g.: ./bin/utils/release_version_update.sh 3.0.1-SNAPSHOT 3.0.1"
- exit 1;
-fi
-
-if [[ "$2" != "" ]]; then
- TO="$2"
-else
- echo "Missing argument. Usage e.g.: ./bin/utils/release_version_update.sh 3.0.1-SNAPSHOT 3.0.1"
- exit 1;
-fi
-
-echo "Release preparation: replacing $FROM with $TO in different files"
-
-# This script assumes the files defined here have a version surrounded by angle brackets within an xml node.
-# For example, >4.0.0< becomes >4.0.1-SNAPSHOT<.
-# Verify the sed command below against a file before adding here.
-declare -a files=("modules/openapi-generator-cli/pom.xml"
- "modules/openapi-generator-gradle-plugin/pom.xml"
- "modules/openapi-generator-core/pom.xml"
- "modules/openapi-generator-maven-plugin/pom.xml"
- "modules/openapi-generator-online/pom.xml"
- "modules/openapi-generator/pom.xml"
- "samples/meta-codegen/lib/pom.xml"
- "pom.xml")
-
-sedi () {
- # Cross-platform version of sed -i that works both on Mac and Linux
- sed --version >/dev/null 2>&1 && sed -i -e "$@" || sed -i "" "$@"
-}
-
-for filename in "${files[@]}"; do
- # e.g. sed -i '' "s/3.0.1-SNAPSHOT/3.0.1/g" CI/pom.xml.bash
- #echo "Running command: sed -i '' "s/$FROM/$TO/g" $filename"
- if sedi "s/>$FROM>$TO
**jersey1**
HTTP client: Jersey client 1.19.x. JSON processing: Jackson 2.8.x. Enable Java6 support using '-DsupportJava6=true'. Enable gzip request encoding using '-DuseGzipFeature=true'. IMPORTANT NOTE: jersey 1.x is no longer actively maintained so please upgrade to 'jersey2' or other HTTP libaries instead.
**jersey2**
HTTP client: Jersey client 2.25.1. JSON processing: Jackson 2.8.x
**feign**
HTTP client: OpenFeign 9.x or 10.x. JSON processing: Jackson 2.8.x. To enable OpenFeign 10.x, set the 'feignVersion' option to '10.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'.
**retrofit**
HTTP client: OkHttp 2.x. JSON processing: Gson 2.x (Retrofit 1.9.0). IMPORTANT NOTE: retrofit1.x is no longer actively maintained so please upgrade to 'retrofit2' instead.
**retrofit2**
HTTP client: OkHttp 3.x. JSON processing: Gson 2.x (Retrofit 2.3.0). Enable the RxJava adapter using '-DuseRxJava[2]=true'. (RxJava 1.x or 2.x)
**resttemplate**
HTTP client: Spring RestTemplate 4.x. JSON processing: Jackson 2.8.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.8.x
**vertx**
HTTP client: VertX client 3.x. JSON processing: Jackson 2.8.x
**google-api-client**
HTTP client: Google API client 1.x. JSON processing: Jackson 2.8.x
**rest-assured**
HTTP client: rest-assured : 3.x. JSON processing: Gson 2.x. Only for Java8
|okhttp-gson|
diff --git a/docs/generators/kotlin-spring.md b/docs/generators/kotlin-spring.md
index 29f53a6c1ed..0c4898f8015 100644
--- a/docs/generators/kotlin-spring.md
+++ b/docs/generators/kotlin-spring.md
@@ -20,10 +20,11 @@ sidebar_label: kotlin-spring
|serverPort|configuration the port in which the sever is to run on| |8080|
|modelPackage|model package for generated code| |org.openapitools.model|
|apiPackage|api package for generated code| |org.openapitools.api|
-|exceptionHandler|generate default global exception handlers| |true|
+|exceptionHandler|generate default global exception handlers (not compatible with reactive. enabling reactive will disable exceptionHandler )| |true|
|gradleBuildFile|generate a gradle build file using the Kotlin DSL| |true|
|swaggerAnnotations|generate swagger annotations to go alongside controllers and models| |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|
|serviceImplementation|generate stub service implementations that extends service interfaces. If this is set to true service interfaces will also be generated| |false|
|useBeanValidation|Use BeanValidation API annotations to validate data types| |true|
+|reactive|use coroutines for reactive behavior| |false|
|library|library template (sub-template)|
**spring-boot**
Spring-boot Server application.
|spring-boot|
diff --git a/docs/generators/nodejs-server-deprecated.md b/docs/generators/nodejs-server-deprecated.md
new file mode 100644
index 00000000000..c8741e58f4c
--- /dev/null
+++ b/docs/generators/nodejs-server-deprecated.md
@@ -0,0 +1,16 @@
+
+---
+id: generator-opts-server-nodejs-server-deprecated
+title: Config Options for nodejs-server-deprecated
+sidebar_label: nodejs-server-deprecated
+---
+
+| Option | Description | Values | Default |
+| ------ | ----------- | ------ | ------- |
+|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true|
+|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
+|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false|
+|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false|
+|googleCloudFunctions|When specified, it will generate the code which runs within Google Cloud Functions instead of standalone Node.JS server. See https://cloud.google.com/functions/docs/quickstart for the details of how to deploy the generated code.| |false|
+|exportedName|When the generated code will be deployed to Google Cloud Functions, this option can be used to update the name of the exported function. By default, it refers to the basePath. This does not affect normal standalone nodejs server code.| |null|
+|serverPort|TCP port to listen on.| |null|
diff --git a/docs/generators/spring.md b/docs/generators/spring.md
index 93bff4469ad..eed7875d227 100644
--- a/docs/generators/spring.md
+++ b/docs/generators/spring.md
@@ -35,7 +35,7 @@ sidebar_label: spring
|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false|
|withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false|
|dateLibrary|Option. Date library to use|
**joda**
Joda (for legacy app only)
**legacy**
Legacy java.util.Date (if you really have a good reason not to use threetenbp
**java8-localdatetime**
Java 8 using LocalDateTime (for legacy app only)
**java8**
Java 8 native JSR310 (preferred for jdk 1.8+) - note: this also sets "java8" to true
**threetenbp**
Backport of JSR310 (preferred for jdk < 1.8)
|threetenbp|
-|java8|Option. Use Java8 classes instead of third party equivalents|
**true**
Use Java 8 classes such as Base64
**false**
Various third party libraries as needed
|false|
+|java8|Option. Use Java8 classes instead of third party equivalents|
**true**
Use Java 8 classes such as Base64. Use java8 default interface when a responseWrapper is used
**false**
Various third party libraries as needed
|false|
|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false|
|booleanGetterPrefix|Set booleanGetterPrefix| |get|
|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
@@ -48,7 +48,6 @@ sidebar_label: spring
|interfaceOnly|Whether to generate only API interface stubs without the server files.| |false|
|delegatePattern|Whether to generate the server files using the delegate pattern| |false|
|singleContentTypes|Whether to select only one produces/consumes content-type by operation.| |false|
-|java8|use java8 default interface| |true|
|async|use async Callable controllers| |false|
|reactive|wrap responses in Mono/Flux Reactor types (spring-boot only)| |false|
|responseWrapper|wrap the responses in given type (Future,Callable,CompletableFuture,ListenableFuture,DeferredResult,HystrixCommand,RxObservable,RxSingle or fully qualified type)| |null|
diff --git a/modules/openapi-generator-cli/pom.xml b/modules/openapi-generator-cli/pom.xml
index 269786d2750..cc3c861f1e5 100644
--- a/modules/openapi-generator-cli/pom.xml
+++ b/modules/openapi-generator-cli/pom.xml
@@ -3,7 +3,9 @@
org.openapitoolsopenapi-generator-project
+
5.0.0-SNAPSHOT
+
../..4.0.0
diff --git a/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/Generate.java b/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/Generate.java
index 62924e2b6ab..00a7f533486 100644
--- a/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/Generate.java
+++ b/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/Generate.java
@@ -140,7 +140,7 @@ public class Generate implements Runnable {
private List typeMappings = new ArrayList<>();
@Option(
- name = {"--additional-properties"},
+ name = {"-p", "--additional-properties"},
title = "additional properties",
description = "sets additional properties that can be referenced by the mustache templates in the format of name=value,name=value."
+ " You can also have multiple occurrences of this option.")
@@ -383,7 +383,10 @@ public class Generate implements Runnable {
configurator.setStrictSpecBehavior(strictSpecBehavior);
}
- applySystemPropertiesKvpList(systemProperties, configurator);
+ if (systemProperties != null && !systemProperties.isEmpty()) {
+ System.err.println("[DEPRECATED] -D arguments after 'generate' are application arguments and not Java System Properties, please consider changing to -p, or apply your options to JAVA_OPTS, or move the -D arguments before the jar option.");
+ applySystemPropertiesKvpList(systemProperties, configurator);
+ }
applyInstantiationTypesKvpList(instantiationTypes, configurator);
applyImportMappingsKvpList(importMappings, configurator);
applyTypeMappingsKvpList(typeMappings, configurator);
diff --git a/modules/openapi-generator-cli/src/test/java/org/openapitools/codegen/cmd/GenerateTest.java b/modules/openapi-generator-cli/src/test/java/org/openapitools/codegen/cmd/GenerateTest.java
index d8812b5c8d1..a2304283d68 100644
--- a/modules/openapi-generator-cli/src/test/java/org/openapitools/codegen/cmd/GenerateTest.java
+++ b/modules/openapi-generator-cli/src/test/java/org/openapitools/codegen/cmd/GenerateTest.java
@@ -64,9 +64,11 @@ public class GenerateTest {
@Test
public void testRequiredArgs_ShortArgs() throws Exception {
- setupAndRunTest("-i", "src/test/resources/swagger.yaml", "-g", "java", "-o", "src/main/java", false, null);
+ setupAndRunTest("-i", "src/test/resources/swagger.yaml", "-g", "java", "-o", "src/main/java", false, null, "-p", "foo=bar");
new FullVerifications() {
{
+ configurator.addAdditionalProperty("foo", "bar");
+ times = 1;
}
};
}
@@ -138,85 +140,6 @@ public class GenerateTest {
};
}
- @Test
- public void testSystemProperties() throws Exception {
-
- setupAndRunGenericTest("-D", "hello=world,foo=bar");
-
- new FullVerifications() {
- {
- configurator.addSystemProperty("hello", "world");
- times = 1;
- configurator.addSystemProperty("foo", "bar");
- times = 1;
- }
- };
-
- setupAndRunGenericTest("-Dhello=world,foo=bar");
-
- new FullVerifications() {
- {
- configurator.addSystemProperty("hello", "world");
- times = 1;
- configurator.addSystemProperty("foo", "bar");
- times = 1;
- }
- };
-
- setupAndRunGenericTest("-D", "hello=world,key=,foo=bar");
-
- new FullVerifications() {
- {
- configurator.addSystemProperty("hello", "world");
- times = 1;
- configurator.addSystemProperty("foo", "bar");
- times = 1;
- configurator.addSystemProperty("key", "");
- times = 1;
- }
- };
-
- setupAndRunGenericTest("-D", "hello=world,key,foo=bar");
-
- new FullVerifications() {
- {
- configurator.addSystemProperty("hello", "world");
- times = 1;
- configurator.addSystemProperty("foo", "bar");
- times = 1;
- configurator.addSystemProperty("key", "");
- times = 1;
- }
- };
-
- setupAndRunGenericTest("-D", "hello=world", "-D", "key", "-D", "foo=bar");
-
- new FullVerifications() {
- {
- configurator.addSystemProperty("hello", "world");
- times = 1;
- configurator.addSystemProperty("foo", "bar");
- times = 1;
- configurator.addSystemProperty("key", "");
- times = 1;
- }
- };
-
- setupAndRunGenericTest("-Dhello=world", "-Dkey", "-Dfoo=bar");
-
- new FullVerifications() {
- {
- configurator.addSystemProperty("hello", "world");
- times = 1;
- configurator.addSystemProperty("foo", "bar");
- times = 1;
- configurator.addSystemProperty("key", "");
- times = 1;
- }
- };
- }
-
-
@Test
public void testConfigJson() throws Exception {
diff --git a/modules/openapi-generator-core/pom.xml b/modules/openapi-generator-core/pom.xml
index 0353508d252..a8d3b3e7bee 100644
--- a/modules/openapi-generator-core/pom.xml
+++ b/modules/openapi-generator-core/pom.xml
@@ -5,7 +5,9 @@
openapi-generator-projectorg.openapitools
+
5.0.0-SNAPSHOT
+
../..4.0.0
@@ -13,4 +15,27 @@
openapi-generator-coreopenapi-generator-corehttps://github.com/openapitools/openapi-generator
+
+
+
+ com.google.guava
+ guava
+ ${guava-version}
+
+
+ org.slf4j
+ slf4j-api
+ ${slf4j-version}
+
+
+ org.testng
+ testng
+ test
+
+
+
+
+ 1.7.12
+ 26.0-jre
+
diff --git a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/config/Context.java b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/config/Context.java
new file mode 100644
index 00000000000..6bd2588ae19
--- /dev/null
+++ b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/config/Context.java
@@ -0,0 +1,68 @@
+/*
+ * Copyright 2019 OpenAPI-Generator Contributors (https://openapi-generator.tech)
+ *
+ * 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
+ *
+ * http://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.config;
+
+/**
+ * The Context used for generation.
+ *
+ * @param the type of the input spec document.
+ */
+public class Context {
+ private TSpecDocument specDocument;
+ private GeneratorSettings generatorSettings;
+ private WorkflowSettings workflowSettings;
+
+ /**
+ * Instantiates a new Context.
+ *
+ * @param specDocument the spec document
+ * @param generatorSettings the generator settings
+ * @param workflowSettings the workflow settings
+ */
+ public Context(TSpecDocument specDocument, GeneratorSettings generatorSettings, WorkflowSettings workflowSettings) {
+ this.specDocument = specDocument;
+ this.generatorSettings = generatorSettings;
+ this.workflowSettings = workflowSettings;
+ }
+
+ /**
+ * Gets the generator settings. These options are specific to "what" gets generated (language, framework).
+ *
+ * @return the generator settings
+ */
+ public GeneratorSettings getGeneratorSettings() {
+ return generatorSettings;
+ }
+
+ /**
+ * Gets the spec document.
+ *
+ * @return the spec document
+ */
+ public TSpecDocument getSpecDocument() {
+ return specDocument;
+ }
+
+ /**
+ * Gets the workflow settings. These options are specific to "how" code gets generated (input, output directory, ignore files, template engine, etc).
+ *
+ * @return the workflow settings
+ */
+ public WorkflowSettings getWorkflowSettings() {
+ return workflowSettings;
+ }
+}
diff --git a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/config/GeneratorSettings.java b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/config/GeneratorSettings.java
new file mode 100644
index 00000000000..565539c7ca3
--- /dev/null
+++ b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/config/GeneratorSettings.java
@@ -0,0 +1,872 @@
+/*
+ * Copyright 2019 OpenAPI-Generator Contributors (https://openapi-generator.tech)
+ *
+ * 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
+ *
+ * http://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.config;
+
+import com.google.common.collect.ImmutableMap;
+import com.google.common.collect.ImmutableSet;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.Serializable;
+import java.util.*;
+
+/**
+ * Represents those settings applied to a generator.
+ */
+public final class GeneratorSettings implements Serializable {
+
+ private static final Logger LOGGER = LoggerFactory.getLogger(GeneratorSettings.class);
+ private static String DEFAULT_GIT_USER_ID = "GIT_USER_ID";
+ private static String DEFAULT_GIT_REPO_ID = "GIT_REPO_ID";
+ private static String DEFAULT_RELEASE_NOTE = "Minor update";
+
+ private String generatorName;
+ private String apiPackage;
+ private String modelPackage;
+ private String invokerPackage;
+ private String packageName;
+ private String modelNamePrefix;
+ private String modelNameSuffix;
+ private String groupId;
+ private String artifactId;
+ private String artifactVersion;
+ private String library;
+
+ private ImmutableMap instantiationTypes;
+ private ImmutableMap typeMappings;
+ private ImmutableMap additionalProperties;
+ private ImmutableMap importMappings;
+ private ImmutableSet languageSpecificPrimitives;
+ private ImmutableMap reservedWordMappings;
+
+ private String gitUserId;
+ private String gitRepoId;
+ private String releaseNote;
+ private String httpUserAgent;
+
+ /**
+ * Gets the name of the generator to use.
+ *
+ * @return the generator name
+ */
+ public String getGeneratorName() {
+ return generatorName;
+ }
+
+ /**
+ * Gets the api package name for generated sources.
+ *
+ * @return the api package
+ */
+ public String getApiPackage() {
+ return apiPackage;
+ }
+
+ /**
+ * Gets the model package name for generated sources
+ *
+ * @return the model package
+ */
+ public String getModelPackage() {
+ return modelPackage;
+ }
+
+ /**
+ * Gets the invoker package name for generated sources.
+ *
+ * @return the invoker package
+ */
+ public String getInvokerPackage() {
+ return invokerPackage;
+ }
+
+ /**
+ * Gets the overall package name for generated sources.
+ *
+ * @return the package name
+ */
+ public String getPackageName() {
+ return packageName;
+ }
+
+ /**
+ * Gets a model name prefix for generated models. This name will be prefixed to a model name.
+ *
+ * This option is often used to circumvent compilation issues where models match keywords.
+ *
+ * Example:
+ *
+ * Prefix My applied to Object results in a generated class named MyObject.
+ *
+ * @return the model name prefix
+ */
+ public String getModelNamePrefix() {
+ return modelNamePrefix;
+ }
+
+ /**
+ * Gets a model name suffix for generated models. This name will be appended to a model name.
+ *
+ * This option is often used to circumvent compilation issues where models match keywords.
+ *
+ * Example:
+ *
+ * Suffix Gen applied to Object results in a generated class named ObjectGen.
+ *
+ * @return the model name suffix
+ */
+ public String getModelNameSuffix() {
+ return modelNameSuffix;
+ }
+
+ /**
+ * Gets the group id for generated sources which support this concept (e.g. Java and pom.xml, Scala and SBT/Gradle/pom).
+ *
+ * @return the group id
+ */
+ public String getGroupId() {
+ return groupId;
+ }
+
+ /**
+ * Gets artifact id for generated sources which support this concept (e.g. Java and pom.xml, Scala and SBT/Gradle/pom).
+ *
+ * @return the artifact id
+ */
+ public String getArtifactId() {
+ return artifactId;
+ }
+
+ /**
+ * Gets artifact version for generated sources which support this concept (e.g. Java and pom.xml, Scala and SBT/Gradle/pom).
+ *
+ * @return the artifact version
+ */
+ public String getArtifactVersion() {
+ return artifactVersion;
+ }
+
+ /**
+ * Gets library (sub-template) for the target generated.
+ *
+ * @return the library
+ */
+ public String getLibrary() {
+ return library;
+ }
+
+
+ /**
+ * Gets instantiation types mappings. These allow for customizing the defaults provided by a built-in generator.
+ *
+ * For example, "array" to "ArrayList" applied to the Java generator will cause all array properties to be instantiated as ArrayList.
+ *
+ * This option differs from {@link GeneratorSettings#getTypeMappings()} in that values provided here are generally used for type construction (what is applied to "new").
+ *
+ * @return the instantiation types
+ */
+ public Map getInstantiationTypes() {
+ return instantiationTypes;
+ }
+
+ /**
+ * Gets type mappings. These allow for customizing type definitions.
+ *
+ * For example, "array" to "List" applied to the Java generator will cause all variable assignments for array properties to be of type List.
+ *
+ * This option differs from {@link GeneratorSettings#getInstantiationTypes()} in that values provided here are variable reference types rather than concrete instantiation types.
+ *
+ * @return the type mappings
+ */
+ public Map getTypeMappings() {
+ return typeMappings;
+ }
+
+ /**
+ * Gets additional properties which will be passed to template as dynamic properties.
+ *
+ * @return the additional properties
+ */
+ public Map getAdditionalProperties() {
+ return additionalProperties;
+ }
+
+ /**
+ * Gets import mappings between a given class and the import that should be used for that class.
+ *
+ * Use import mappings, for example, when you want to "bring your own models" from another location.
+ *
+ * @return the import mappings
+ * @see Bringing your own models
+ */
+ public Map getImportMappings() {
+ return importMappings;
+ }
+
+ /**
+ * Gets language specific primitives. These are in addition to the "base" primitives defined in a generator.
+ *
+ * In general, a primitive defined here will indicate to the generator:
+ *
+ * - models with these types don't require an import
+ * - model names not included here require imports and likely indicate a model reference
+ *
+ * There may be generator-specific implementation details which differ slightly.
+ *
+ * @return the language specific primitives
+ */
+ public Set getLanguageSpecificPrimitives() {
+ return languageSpecificPrimitives;
+ }
+
+ /**
+ * Gets reserved word mappings. Values defined here define how a reserved word should be escaped.
+ *
+ * If no mapping is present, the mapping is generally automatically applied to a default with prefixed underscore (_name). Note that
+ * some languages don't support identifiers beginning with a prefix, in which case the generator applies a more appropriate prefix.
+ *
+ * @return the reserved word mappings
+ */
+ public Map getReservedWordMappings() {
+ return reservedWordMappings;
+ }
+
+ /**
+ * Gets git user id. e.g. openapitools.
+ *
+ * Generally used by git_push.sh in generated sources which support it.
+ * This value may also be used by templates in maven style references, READMEs, or other documentation.
+ *
+ * @return the git user id
+ */
+ public String getGitUserId() {
+ return gitUserId;
+ }
+
+ /**
+ * Gets git repo id. e.g. openapi-generator.
+ *
+ * Generally used by git_push.sh in generated sources which support it.
+ * This value may also be used by templates in maven style references, READMEs, or other documentation.
+ *
+ * @return the git repo id
+ */
+ public String getGitRepoId() {
+ return gitRepoId;
+ }
+
+ /**
+ * Gets release note for the generated instance.
+ *
+ * Generally used by git_push.sh in generated sources which support it.
+ * This value may also be used by templates in maven style references, READMEs, or other documentation.
+ *
+ * @return the release note
+ */
+ public String getReleaseNote() {
+ return releaseNote;
+ }
+
+ /**
+ * Gets the http user agent to be used by client generators which support setting this value.
+ *
+ * e.g. codegen_csharp_api_client, defaults to 'OpenAPI-Generator/{packageVersion}}/{language}'
+ *
+ * @return the http user agent
+ */
+ public String getHttpUserAgent() {
+ return httpUserAgent;
+ }
+
+ private GeneratorSettings(Builder builder) {
+ setDefaults();
+
+ generatorName = builder.generatorName;
+ apiPackage = builder.apiPackage;
+ modelPackage = builder.modelPackage;
+ invokerPackage = builder.invokerPackage;
+ packageName = builder.packageName;
+ modelNamePrefix = builder.modelNamePrefix;
+ modelNameSuffix = builder.modelNameSuffix;
+ groupId = builder.groupId;
+ artifactId = builder.artifactId;
+ artifactVersion = builder.artifactVersion;
+ library = builder.library;
+ instantiationTypes = ImmutableMap.copyOf(builder.instantiationTypes);
+ typeMappings = ImmutableMap.copyOf(builder.typeMappings);
+ importMappings = ImmutableMap.copyOf(builder.importMappings);
+ languageSpecificPrimitives = ImmutableSet.copyOf(builder.languageSpecificPrimitives);
+ reservedWordMappings = ImmutableMap.copyOf(builder.reservedWordMappings);
+ gitUserId = builder.gitUserId;
+ gitRepoId = builder.gitRepoId;
+ releaseNote = builder.releaseNote;
+ httpUserAgent = builder.httpUserAgent;
+
+ Map additional = new HashMap<>(builder.additionalProperties);
+
+ if (isNotEmpty(apiPackage)) {
+ additional.put("apiPackage", apiPackage);
+ }
+ if (isNotEmpty(modelPackage)) {
+ additional.put("modelPackage", modelPackage);
+ }
+ if (isNotEmpty(invokerPackage)) {
+ additional.put("invokerPackage", invokerPackage);
+ }
+ if (isNotEmpty(packageName)) {
+ additional.put("packageName", packageName);
+ }
+ if (isNotEmpty(groupId)) {
+ additional.put("groupId", groupId);
+ }
+ if (isNotEmpty(artifactId)) {
+ additional.put("artifactId", artifactId);
+ }
+ if (isNotEmpty(artifactVersion)) {
+ additional.put("artifactVersion", artifactVersion);
+ }
+ if (isNotEmpty(modelNamePrefix)) {
+ additional.put("modelNamePrefix", modelNamePrefix);
+ }
+ if (isNotEmpty(modelNameSuffix)) {
+ additional.put("modelNameSuffix", modelNameSuffix);
+ }
+ if (isNotEmpty(gitUserId)) {
+ additional.put("gitUserId", gitUserId);
+ }
+ if (isNotEmpty(gitRepoId)) {
+ additional.put("gitRepoId", gitRepoId);
+ }
+ if (isNotEmpty(releaseNote)) {
+ additional.put("releaseNote", releaseNote);
+ }
+ if (isNotEmpty(httpUserAgent)) {
+ additional.put("httpUserAgent", httpUserAgent);
+ }
+
+ additionalProperties = ImmutableMap.copyOf(additional);
+ }
+
+ /**
+ * Instantiates a new Generator settings.
+ */
+ @SuppressWarnings("unused")
+ public GeneratorSettings() {
+ setDefaults();
+ instantiationTypes = ImmutableMap.of();
+ typeMappings = ImmutableMap.of();
+ additionalProperties = ImmutableMap.of();
+ importMappings = ImmutableMap.of();
+ languageSpecificPrimitives = ImmutableSet.of();
+ reservedWordMappings = ImmutableMap.of();
+ }
+
+ private void setDefaults() {
+ gitUserId = DEFAULT_GIT_USER_ID;
+ gitRepoId = DEFAULT_GIT_REPO_ID;
+ releaseNote = DEFAULT_RELEASE_NOTE;
+ }
+
+ private boolean isNotEmpty(String value) {
+ return value != null && value.length() > 0;
+ }
+
+ /**
+ * New builder builder.
+ *
+ * @return the builder
+ */
+ public static Builder newBuilder() {
+ return new Builder();
+ }
+
+ /**
+ * New builder builder.
+ *
+ * @param copy the copy
+ * @return the builder
+ */
+ public static Builder newBuilder(GeneratorSettings copy) {
+ Builder builder = new Builder();
+ builder.generatorName = copy.getGeneratorName();
+ builder.apiPackage = copy.getApiPackage();
+ builder.modelPackage = copy.getModelPackage();
+ builder.invokerPackage = copy.getInvokerPackage();
+ builder.packageName = copy.getPackageName();
+ builder.modelNamePrefix = copy.getModelNamePrefix();
+ builder.modelNameSuffix = copy.getModelNameSuffix();
+ builder.groupId = copy.getGroupId();
+ builder.artifactId = copy.getArtifactId();
+ builder.artifactVersion = copy.getArtifactVersion();
+ builder.library = copy.getLibrary();
+ builder.instantiationTypes = new HashMap<>(copy.getInstantiationTypes());
+ builder.typeMappings = new HashMap<>(copy.getTypeMappings());
+ builder.additionalProperties = new HashMap<>(copy.getAdditionalProperties());
+ builder.importMappings = new HashMap<>(copy.getImportMappings());
+ builder.languageSpecificPrimitives = new HashSet<>(copy.getLanguageSpecificPrimitives());
+ builder.reservedWordMappings = new HashMap<>(copy.getReservedWordMappings());
+ builder.gitUserId = copy.getGitUserId();
+ builder.gitRepoId = copy.getGitRepoId();
+ builder.releaseNote = copy.getReleaseNote();
+ builder.httpUserAgent = copy.getHttpUserAgent();
+
+ return builder;
+ }
+
+ /**
+ * {@code GeneratorSettings} builder static inner class.
+ */
+ @SuppressWarnings("UnusedReturnValue")
+ public static final class Builder {
+ private String generatorName;
+ private String apiPackage;
+ private String modelPackage;
+ private String invokerPackage;
+ private String packageName;
+ private String modelNamePrefix;
+ private String modelNameSuffix;
+ private String groupId;
+ private String artifactId;
+ private String artifactVersion;
+ private String library;
+ private Map instantiationTypes;
+ private Map typeMappings;
+ private Map additionalProperties;
+ private Map importMappings;
+ private Set languageSpecificPrimitives;
+ private Map reservedWordMappings;
+ private String gitUserId;
+ private String gitRepoId;
+ private String releaseNote;
+ private String httpUserAgent;
+
+ /**
+ * Instantiates a new Builder.
+ */
+ public Builder() {
+ instantiationTypes = new HashMap<>();
+ typeMappings = new HashMap<>();
+ additionalProperties = new HashMap<>();
+ importMappings = new HashMap<>();
+ languageSpecificPrimitives = new HashSet<>();
+ reservedWordMappings = new HashMap<>();
+
+ gitUserId = DEFAULT_GIT_USER_ID;
+ gitRepoId = DEFAULT_GIT_REPO_ID;
+ releaseNote = DEFAULT_RELEASE_NOTE;
+ }
+
+ /**
+ * Sets the {@code generatorName} and returns a reference to this Builder so that the methods can be chained together.
+ *
+ * @param generatorName the {@code generatorName} to set
+ * @return a reference to this Builder
+ */
+ public Builder withGeneratorName(String generatorName) {
+ this.generatorName = generatorName;
+ return this;
+ }
+
+ /**
+ * Sets the {@code apiPackage} and returns a reference to this Builder so that the methods can be chained together.
+ *
+ * @param apiPackage the {@code apiPackage} to set
+ * @return a reference to this Builder
+ */
+ public Builder withApiPackage(String apiPackage) {
+ this.apiPackage = apiPackage;
+ return this;
+ }
+
+ /**
+ * Sets the {@code modelPackage} and returns a reference to this Builder so that the methods can be chained together.
+ *
+ * @param modelPackage the {@code modelPackage} to set
+ * @return a reference to this Builder
+ */
+ public Builder withModelPackage(String modelPackage) {
+ this.modelPackage = modelPackage;
+ return this;
+ }
+
+ /**
+ * Sets the {@code invokerPackage} and returns a reference to this Builder so that the methods can be chained together.
+ *
+ * @param invokerPackage the {@code invokerPackage} to set
+ * @return a reference to this Builder
+ */
+ public Builder withInvokerPackage(String invokerPackage) {
+ this.invokerPackage = invokerPackage;
+ return this;
+ }
+
+ /**
+ * Sets the {@code packageName} and returns a reference to this Builder so that the methods can be chained together.
+ *
+ * @param packageName the {@code packageName} to set
+ * @return a reference to this Builder
+ */
+ public Builder withPackageName(String packageName) {
+ this.packageName = packageName;
+ return this;
+ }
+
+ /**
+ * Sets the {@code modelNamePrefix} and returns a reference to this Builder so that the methods can be chained together.
+ *
+ * @param modelNamePrefix the {@code modelNamePrefix} to set
+ * @return a reference to this Builder
+ */
+ public Builder withModelNamePrefix(String modelNamePrefix) {
+ this.modelNamePrefix = modelNamePrefix;
+ return this;
+ }
+
+ /**
+ * Sets the {@code modelNameSuffix} and returns a reference to this Builder so that the methods can be chained together.
+ *
+ * @param modelNameSuffix the {@code modelNameSuffix} to set
+ * @return a reference to this Builder
+ */
+ public Builder withModelNameSuffix(String modelNameSuffix) {
+ this.modelNameSuffix = modelNameSuffix;
+ return this;
+ }
+
+ /**
+ * Sets the {@code groupId} and returns a reference to this Builder so that the methods can be chained together.
+ *
+ * @param groupId the {@code groupId} to set
+ * @return a reference to this Builder
+ */
+ public Builder withGroupId(String groupId) {
+ this.groupId = groupId;
+ return this;
+ }
+
+ /**
+ * Sets the {@code artifactId} and returns a reference to this Builder so that the methods can be chained together.
+ *
+ * @param artifactId the {@code artifactId} to set
+ * @return a reference to this Builder
+ */
+ public Builder withArtifactId(String artifactId) {
+ this.artifactId = artifactId;
+ return this;
+ }
+
+ /**
+ * Sets the {@code artifactVersion} and returns a reference to this Builder so that the methods can be chained together.
+ *
+ * @param artifactVersion the {@code artifactVersion} to set
+ * @return a reference to this Builder
+ */
+ public Builder withArtifactVersion(String artifactVersion) {
+ this.artifactVersion = artifactVersion;
+ return this;
+ }
+
+ /**
+ * Sets the {@code library} and returns a reference to this Builder so that the methods can be chained together.
+ *
+ * @param library the {@code library} to set
+ * @return a reference to this Builder
+ */
+ public Builder withLibrary(String library) {
+ this.library = library;
+ return this;
+ }
+
+ /**
+ * Sets the {@code instantiationTypes} and returns a reference to this Builder so that the methods can be chained together.
+ *
+ * @param instantiationTypes the {@code instantiationTypes} to set
+ * @return a reference to this Builder
+ */
+ public Builder withInstantiationTypes(Map instantiationTypes) {
+ this.instantiationTypes = instantiationTypes;
+ return this;
+ }
+
+ /**
+ * Sets a single {@code instantiationTypes} and returns a reference to this Builder so that the methods can be chained together.
+ *
+ * @param key A key for some instantiation type
+ * @param value The value of some instantiation type
+ * @return a reference to this Builder
+ */
+ public Builder withInstantiationType(String key, String value) {
+ if (this.instantiationTypes == null) {
+ this.instantiationTypes = new HashMap<>();
+ }
+ this.instantiationTypes.put(key, value);
+ return this;
+ }
+
+ /**
+ * Sets the {@code typeMappings} and returns a reference to this Builder so that the methods can be chained together.
+ *
+ * @param typeMappings the {@code typeMappings} to set
+ * @return a reference to this Builder
+ */
+ public Builder withTypeMappings(Map typeMappings) {
+ this.typeMappings = typeMappings;
+ return this;
+ }
+
+ /**
+ * Sets the {@code additionalProperties} and returns a reference to this Builder so that the methods can be chained together.
+ *
+ * @param additionalProperties the {@code additionalProperties} to set
+ * @return a reference to this Builder
+ */
+ public Builder withAdditionalProperties(Map additionalProperties) {
+ this.additionalProperties = additionalProperties;
+ return this;
+ }
+
+ /**
+ * Sets the {@code additionalProperties} and returns a reference to this Builder so that the methods can be chained together.
+ *
+ * @param key A key for some additional property
+ * @param value The value of some additional property
+ * @return a reference to this Builder
+ */
+ public Builder withAdditionalProperty(String key, Object value) {
+ if (this.additionalProperties == null) {
+ this.additionalProperties = new HashMap<>();
+ }
+ this.additionalProperties.put(key, value);
+ return this;
+ }
+
+ /**
+ * Sets the {@code importMappings} and returns a reference to this Builder so that the methods can be chained together.
+ *
+ * @param importMappings the {@code importMappings} to set
+ * @return a reference to this Builder
+ */
+ public Builder withImportMappings(Map importMappings) {
+ this.importMappings = importMappings;
+ return this;
+ }
+
+ /**
+ * Sets a single {@code importMappings} and returns a reference to this Builder so that the methods can be chained together.
+ *
+ * @param key A key for some import mapping
+ * @param value The value of some import mapping
+ * @return a reference to this Builder
+ */
+ public Builder withImportMapping(String key, String value) {
+ if (this.importMappings == null) {
+ this.importMappings = new HashMap<>();
+ }
+ this.importMappings.put(key, value);
+ return this;
+ }
+
+ /**
+ * Sets the {@code languageSpecificPrimitives} and returns a reference to this Builder so that the methods can be chained together.
+ *
+ * @param languageSpecificPrimitives the {@code languageSpecificPrimitives} to set
+ * @return a reference to this Builder
+ */
+ public Builder withLanguageSpecificPrimitives(Set languageSpecificPrimitives) {
+ this.languageSpecificPrimitives = languageSpecificPrimitives;
+ return this;
+ }
+
+ /**
+ * Sets a single {@code languageSpecificPrimitives} and returns a reference to this Builder so that the methods can be chained together.
+ *
+ * @param value The value of some primitive to set
+ * @return a reference to this Builder
+ */
+ public Builder withLanguageSpecificPrimitive(String value) {
+ if (this.languageSpecificPrimitives == null) {
+ this.languageSpecificPrimitives = new HashSet<>();
+ }
+ this.languageSpecificPrimitives.add(value);
+ return this;
+ }
+
+ /**
+ * Sets the {@code reservedWordMappings} and returns a reference to this Builder so that the methods can be chained together.
+ *
+ * @param reservedWordMappings the {@code reservedWordMappings} to set
+ * @return a reference to this Builder
+ */
+ public Builder withReservedWordMappings(Map reservedWordMappings) {
+ this.reservedWordMappings = reservedWordMappings;
+ return this;
+ }
+
+ /**
+ * Sets a single {@code reservedWordMappings} and returns a reference to this Builder so that the methods can be chained together.
+ *
+ * @param key A key for some reserved word mapping
+ * @param value The value of some reserved word mapping
+ * @return a reference to this Builder
+ */
+ public Builder withReservedWordMapping(String key, String value) {
+ if (this.reservedWordMappings == null) {
+ this.reservedWordMappings = new HashMap<>();
+ }
+ this.reservedWordMappings.put(key, value);
+ return this;
+ }
+
+ /**
+ * Sets the {@code gitUserId} and returns a reference to this Builder so that the methods can be chained together.
+ *
+ * @param gitUserId the {@code gitUserId} to set
+ * @return a reference to this Builder
+ */
+ public Builder withGitUserId(String gitUserId) {
+ this.gitUserId = gitUserId;
+ return this;
+ }
+
+ /**
+ * Sets the {@code gitRepoId} and returns a reference to this Builder so that the methods can be chained together.
+ *
+ * @param gitRepoId the {@code gitRepoId} to set
+ * @return a reference to this Builder
+ */
+ public Builder withGitRepoId(String gitRepoId) {
+ this.gitRepoId = gitRepoId;
+ return this;
+ }
+
+ /**
+ * Sets the {@code releaseNote} and returns a reference to this Builder so that the methods can be chained together.
+ *
+ * @param releaseNote the {@code releaseNote} to set
+ * @return a reference to this Builder
+ */
+ public Builder withReleaseNote(String releaseNote) {
+ this.releaseNote = releaseNote;
+ return this;
+ }
+
+ /**
+ * Sets the {@code httpUserAgent} and returns a reference to this Builder so that the methods can be chained together.
+ *
+ * @param httpUserAgent the {@code httpUserAgent} to set
+ * @return a reference to this Builder
+ */
+ public Builder withHttpUserAgent(String httpUserAgent) {
+ this.httpUserAgent = httpUserAgent;
+ return this;
+ }
+
+ /**
+ * Returns a {@code GeneratorSettings} built from the parameters previously set.
+ *
+ * @return a {@code GeneratorSettings} built with parameters of this {@code GeneratorSettings.Builder}
+ */
+ public GeneratorSettings build() {
+ GeneratorSettings instance = new GeneratorSettings(this);
+ //noinspection PlaceholderCountMatchesArgumentCount
+ LOGGER.debug("GeneratorSettings#build: %s", instance.toString());
+ return instance;
+ }
+ }
+
+ @Override
+ public String toString() {
+ return "GeneratorSettings{" +
+ "generatorName='" + generatorName + '\'' +
+ ", apiPackage='" + apiPackage + '\'' +
+ ", modelPackage='" + modelPackage + '\'' +
+ ", invokerPackage='" + invokerPackage + '\'' +
+ ", packageName='" + packageName + '\'' +
+ ", modelNamePrefix='" + modelNamePrefix + '\'' +
+ ", modelNameSuffix='" + modelNameSuffix + '\'' +
+ ", groupId='" + groupId + '\'' +
+ ", artifactId='" + artifactId + '\'' +
+ ", artifactVersion='" + artifactVersion + '\'' +
+ ", library='" + library + '\'' +
+ ", instantiationTypes=" + instantiationTypes +
+ ", typeMappings=" + typeMappings +
+ ", additionalProperties=" + additionalProperties +
+ ", importMappings=" + importMappings +
+ ", languageSpecificPrimitives=" + languageSpecificPrimitives +
+ ", reservedWordMappings=" + reservedWordMappings +
+ ", gitUserId='" + gitUserId + '\'' +
+ ", gitRepoId='" + gitRepoId + '\'' +
+ ", releaseNote='" + releaseNote + '\'' +
+ ", httpUserAgent='" + httpUserAgent + '\'' +
+ '}';
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) return true;
+ if (!(o instanceof GeneratorSettings)) return false;
+ GeneratorSettings that = (GeneratorSettings) o;
+ return Objects.equals(getGeneratorName(), that.getGeneratorName()) &&
+ Objects.equals(getApiPackage(), that.getApiPackage()) &&
+ Objects.equals(getModelPackage(), that.getModelPackage()) &&
+ Objects.equals(getInvokerPackage(), that.getInvokerPackage()) &&
+ Objects.equals(getPackageName(), that.getPackageName()) &&
+ Objects.equals(getModelNamePrefix(), that.getModelNamePrefix()) &&
+ Objects.equals(getModelNameSuffix(), that.getModelNameSuffix()) &&
+ Objects.equals(getGroupId(), that.getGroupId()) &&
+ Objects.equals(getArtifactId(), that.getArtifactId()) &&
+ Objects.equals(getArtifactVersion(), that.getArtifactVersion()) &&
+ Objects.equals(getLibrary(), that.getLibrary()) &&
+ Objects.equals(getInstantiationTypes(), that.getInstantiationTypes()) &&
+ Objects.equals(getTypeMappings(), that.getTypeMappings()) &&
+ Objects.equals(getAdditionalProperties(), that.getAdditionalProperties()) &&
+ Objects.equals(getImportMappings(), that.getImportMappings()) &&
+ Objects.equals(getLanguageSpecificPrimitives(), that.getLanguageSpecificPrimitives()) &&
+ Objects.equals(getReservedWordMappings(), that.getReservedWordMappings()) &&
+ Objects.equals(getGitUserId(), that.getGitUserId()) &&
+ Objects.equals(getGitRepoId(), that.getGitRepoId()) &&
+ Objects.equals(getReleaseNote(), that.getReleaseNote()) &&
+ Objects.equals(getHttpUserAgent(), that.getHttpUserAgent());
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(
+ getGeneratorName(),
+ getApiPackage(),
+ getModelPackage(),
+ getInvokerPackage(),
+ getPackageName(),
+ getModelNamePrefix(),
+ getModelNameSuffix(),
+ getGroupId(),
+ getArtifactId(),
+ getArtifactVersion(),
+ getLibrary(),
+ getInstantiationTypes(),
+ getTypeMappings(),
+ getAdditionalProperties(),
+ getImportMappings(),
+ getLanguageSpecificPrimitives(),
+ getReservedWordMappings(),
+ getGitUserId(),
+ getGitRepoId(),
+ getReleaseNote(),
+ getHttpUserAgent()
+ );
+ }
+}
diff --git a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/config/WorkflowSettings.java b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/config/WorkflowSettings.java
new file mode 100644
index 00000000000..2f506ac15ff
--- /dev/null
+++ b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/config/WorkflowSettings.java
@@ -0,0 +1,534 @@
+/*
+ * Copyright 2019 OpenAPI-Generator Contributors (https://openapi-generator.tech)
+ *
+ * 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
+ *
+ * http://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.config;
+
+import com.google.common.collect.ImmutableMap;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.File;
+import java.nio.file.Paths;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Objects;
+
+/**
+ * Represents those settings applied to a generation workflow.
+ */
+@SuppressWarnings("WeakerAccess")
+public class WorkflowSettings {
+
+ private static final Logger LOGGER = LoggerFactory.getLogger(WorkflowSettings.class);
+
+ private String inputSpec;
+ private String outputDir;
+ private boolean verbose;
+ private boolean skipOverwrite;
+ private boolean removeOperationIdPrefix;
+ private boolean logToStderr;
+ private boolean validateSpec;
+ private boolean enablePostProcessFile;
+ private boolean enableMinimalUpdate;
+ private boolean strictSpecBehavior;
+ private String templateDir;
+ private String templatingEngineName;
+ private String ignoreFileOverride;
+ private ImmutableMap systemProperties;
+
+ private WorkflowSettings(Builder builder) {
+ setDefaults();
+ inputSpec = builder.inputSpec;
+ outputDir = builder.outputDir;
+ verbose = builder.verbose;
+ skipOverwrite = builder.skipOverwrite;
+ removeOperationIdPrefix = builder.removeOperationIdPrefix;
+ logToStderr = builder.logToStderr;
+ validateSpec = builder.validateSpec;
+ enablePostProcessFile = builder.enablePostProcessFile;
+ enableMinimalUpdate = builder.enableMinimalUpdate;
+ strictSpecBehavior = builder.strictSpecBehavior;
+ templateDir = builder.templateDir;
+ templatingEngineName = builder.templatingEngineName;
+ ignoreFileOverride = builder.ignoreFileOverride;
+ systemProperties = ImmutableMap.copyOf(builder.systemProperties);
+ }
+
+ /**
+ * Instantiates a new workflow settings.
+ */
+ @SuppressWarnings("unused")
+ public WorkflowSettings() {
+ setDefaults();
+ systemProperties = ImmutableMap.of();
+ }
+
+ private void setDefaults(){
+ validateSpec = true;
+ strictSpecBehavior = true;
+ outputDir = ".";
+ }
+
+ public static Builder newBuilder() {
+ return new Builder();
+ }
+
+ public static Builder newBuilder(WorkflowSettings copy) {
+ Builder builder = new Builder();
+ builder.inputSpec = copy.getInputSpec();
+ builder.outputDir = copy.getOutputDir();
+ builder.verbose = copy.isVerbose();
+ builder.skipOverwrite = copy.isSkipOverwrite();
+ builder.removeOperationIdPrefix = copy.isRemoveOperationIdPrefix();
+ builder.logToStderr = copy.isLogToStderr();
+ builder.validateSpec = copy.isValidateSpec();
+ builder.enablePostProcessFile = copy.isEnablePostProcessFile();
+ builder.enableMinimalUpdate = copy.isEnableMinimalUpdate();
+ builder.strictSpecBehavior = copy.isStrictSpecBehavior();
+ builder.templatingEngineName = copy.getTemplatingEngineName();
+ builder.ignoreFileOverride = copy.getIgnoreFileOverride();
+ builder.systemProperties = ImmutableMap.copyOf(copy.getSystemProperties());
+
+ // force builder "with" methods to invoke side effects
+ builder.withTemplateDir(copy.getTemplateDir());
+
+ return builder;
+ }
+
+ /**
+ * Gets input spec's location, as URL or file
+ *
+ * @return the input spec
+ */
+ public String getInputSpec() {
+ return inputSpec;
+ }
+
+ /**
+ * Gets the output dir (where we write generated files). Defaults to the current directory.
+ *
+ * @return the output dir
+ */
+ public String getOutputDir() {
+ return outputDir;
+ }
+
+ /**
+ * Configures verbosity of generation. When true, more messages will be printed during generation.
+ *
+ * @return true if verbose mode, false otherwise.
+ */
+ public boolean isVerbose() {
+ return verbose;
+ }
+
+ /**
+ * Indicates whether or not the existing files should be overwritten during the generation. This option is more rudimentary than
+ * defining patterns in .openapi-generator-ignore or {@link WorkflowSettings#isEnableMinimalUpdate()}.
+ *
+ * @return true if defaulting to overwriting files, false otherwise.
+ * @see Ignore File Format
+ */
+ public boolean isSkipOverwrite() {
+ return skipOverwrite;
+ }
+
+ /**
+ * Indicates whether or not to remove the prefix of operationId, e.g. config_getId to getId.
+ *
+ * @return true if the operation id prefix should be removed during generation, false otherwise.
+ */
+ public boolean isRemoveOperationIdPrefix() {
+ return removeOperationIdPrefix;
+ }
+
+ /**
+ * Indicates whether or not the generator's executor will write all log messages (not just errors) to STDOUT. Useful for
+ * piping the JSON output of debug options (e.g. -DdebugOperations) to an external parser directly while testing a generator.
+ *
+ * @return true if the executor should attempt to write all messages to stderr,
+ * false otherwise (which defaults to logging configuration, not necessarily stdout).
+ */
+ public boolean isLogToStderr() {
+ return logToStderr;
+ }
+
+ /**
+ * Indicates whether or not generation should also validate an input specification.
+ *
+ * NOTE: Invalid specs may result in a generation error, disabling may cause unexpected results.
+ *
+ * @return true if spec document validation is enabled, otherwise false. Default: true.
+ */
+ public boolean isValidateSpec() {
+ return validateSpec;
+ }
+
+ /**
+ * Indicates whether or not file post-processing is enabled for generators which support it. Refer to individual generator documentation for details.
+ *
+ * In general, once enabled, a generator will evaluate a command stored in LANG_POST_PROCESS_FILE.
+ *
+ * Here, a Scala generator which supports file post-processing will run scalafmt for each generated file.
+ *
+ * @return true if file post-processing is enabled, otherwise false.
+ */
+ public boolean isEnablePostProcessFile() {
+ return enablePostProcessFile;
+ }
+
+ /**
+ * Indicates whether or not the generation should update only those files which have changed.
+ *
+ * @return true if minimal updates are enabled, otherwise false.
+ */
+ public boolean isEnableMinimalUpdate() {
+ return enableMinimalUpdate;
+ }
+
+ /**
+ * Indicates whether or not 'MUST' and 'SHALL' wording in the api specification is strictly adhered to.
+ * For example, when false, no automatic 'fixes' will be applied to documents which pass validation but don't follow the spec.
+ *
+ * @return true if the generator should attempt to strictly follow rules in the specification, otherwise false.
+ */
+ public boolean isStrictSpecBehavior() {
+ return strictSpecBehavior;
+ }
+
+ /**
+ * Gets the directory holding templates used in generation. This option allows users to extend or modify built-in templates, or to write their own.
+ *
+ * @return the template dir
+ */
+ public String getTemplateDir() {
+ return templateDir;
+ }
+
+ /**
+ * Gets the name of the templating engine to target. This option allows a user to target an engine which differs from the generator default, or to
+ * refer to their own fully qualified type name of a custom template engine adapter.
+ *
+ * @return the templating engine name
+ * @see Custom Engines
+ */
+ public String getTemplatingEngineName() {
+ return templatingEngineName;
+ }
+
+ /**
+ * Gets the override location for the .openapi-generator-ignore file. Most useful on initial generation.
+ *
+ * @return the ignore file override
+ */
+ public String getIgnoreFileOverride() {
+ return ignoreFileOverride;
+ }
+
+ /**
+ * Gets system properties applied to the generator.
+ *
+ * @return the system properties
+ */
+ public Map getSystemProperties() {
+ return systemProperties;
+ }
+
+ /**
+ * {@code WorkflowSettings} builder static inner class.
+ */
+ @SuppressWarnings("unused")
+ public static final class Builder {
+ private String inputSpec;
+ private String outputDir;
+ private boolean verbose;
+ private boolean skipOverwrite;
+ private boolean removeOperationIdPrefix;
+ private boolean logToStderr;
+ private boolean validateSpec;
+ private boolean enablePostProcessFile;
+ private boolean enableMinimalUpdate;
+ private boolean strictSpecBehavior;
+ private String templateDir;
+ private String templatingEngineName;
+ private String ignoreFileOverride;
+ private Map systemProperties;
+
+ private Builder() {
+ systemProperties = new HashMap<>();
+ }
+
+ /**
+ * Sets the {@code inputSpec} and returns a reference to this Builder so that the methods can be chained together.
+ *
+ * @param inputSpec the {@code inputSpec} to set
+ * @return a reference to this Builder
+ */
+ public Builder withInputSpec(String inputSpec) {
+ this.inputSpec = inputSpec;
+ return this;
+ }
+
+ /**
+ * Sets the {@code outputDir} and returns a reference to this Builder so that the methods can be chained together.
+ *
+ * @param outputDir the {@code outputDir} to set
+ * @return a reference to this Builder
+ */
+ public Builder withOutputDir(String outputDir) {
+ this.outputDir = Paths.get(outputDir).toAbsolutePath().toString();;
+ return this;
+ }
+
+ /**
+ * Sets the {@code verbose} and returns a reference to this Builder so that the methods can be chained together.
+ *
+ * @param verbose the {@code verbose} to set
+ * @return a reference to this Builder
+ */
+ public Builder withVerbose(boolean verbose) {
+ this.verbose = verbose;
+ return this;
+ }
+
+ /**
+ * Sets the {@code skipOverwrite} and returns a reference to this Builder so that the methods can be chained together.
+ *
+ * @param skipOverwrite the {@code skipOverwrite} to set
+ * @return a reference to this Builder
+ */
+ public Builder withSkipOverwrite(boolean skipOverwrite) {
+ this.skipOverwrite = skipOverwrite;
+ return this;
+ }
+
+ /**
+ * Sets the {@code removeOperationIdPrefix} and returns a reference to this Builder so that the methods can be chained together.
+ *
+ * @param removeOperationIdPrefix the {@code removeOperationIdPrefix} to set
+ * @return a reference to this Builder
+ */
+ public Builder withRemoveOperationIdPrefix(boolean removeOperationIdPrefix) {
+ this.removeOperationIdPrefix = removeOperationIdPrefix;
+ return this;
+ }
+
+ /**
+ * Sets the {@code logToStderr} and returns a reference to this Builder so that the methods can be chained together.
+ *
+ * @param logToStderr the {@code logToStderr} to set
+ * @return a reference to this Builder
+ */
+ public Builder withLogToStderr(boolean logToStderr) {
+ this.logToStderr = logToStderr;
+ return this;
+ }
+
+ /**
+ * Sets the {@code validateSpec} and returns a reference to this Builder so that the methods can be chained together.
+ *
+ * @param validateSpec the {@code validateSpec} to set
+ * @return a reference to this Builder
+ */
+ public Builder withValidateSpec(boolean validateSpec) {
+ this.validateSpec = validateSpec;
+ return this;
+ }
+
+ /**
+ * Sets the {@code enablePostProcessFile} and returns a reference to this Builder so that the methods can be chained together.
+ *
+ * @param enablePostProcessFile the {@code enablePostProcessFile} to set
+ * @return a reference to this Builder
+ */
+ public Builder withEnablePostProcessFile(boolean enablePostProcessFile) {
+ this.enablePostProcessFile = enablePostProcessFile;
+ return this;
+ }
+
+ /**
+ * Sets the {@code enableMinimalUpdate} and returns a reference to this Builder so that the methods can be chained together.
+ *
+ * @param enableMinimalUpdate the {@code enableMinimalUpdate} to set
+ * @return a reference to this Builder
+ */
+ public Builder withEnableMinimalUpdate(boolean enableMinimalUpdate) {
+ this.enableMinimalUpdate = enableMinimalUpdate;
+ return this;
+ }
+
+ /**
+ * Sets the {@code strictSpecBehavior} and returns a reference to this Builder so that the methods can be chained together.
+ *
+ * @param strictSpecBehavior the {@code strictSpecBehavior} to set
+ * @return a reference to this Builder
+ */
+ public Builder withStrictSpecBehavior(boolean strictSpecBehavior) {
+ this.strictSpecBehavior = strictSpecBehavior;
+ return this;
+ }
+
+ /**
+ * Sets the {@code templateDir} and returns a reference to this Builder so that the methods can be chained together.
+ *
+ * @param templateDir the {@code templateDir} to set
+ * @return a reference to this Builder
+ */
+ public Builder withTemplateDir(String templateDir) {
+ if (templateDir == null) {
+ this.templateDir = null;
+ } else {
+ File f = new File(templateDir);
+
+ // check to see if the folder exists
+ if (!(f.exists() && f.isDirectory())) {
+ throw new IllegalArgumentException(
+ "Template directory " + templateDir + " does not exist.");
+ }
+
+ this.templateDir = Paths.get(f.toURI()).toAbsolutePath().toString();
+ }
+
+ return this;
+ }
+
+ /**
+ * Sets the {@code templatingEngineName} and returns a reference to this Builder so that the methods can be chained together.
+ *
+ * @param templatingEngineName the {@code templatingEngineName} to set
+ * @return a reference to this Builder
+ */
+ public Builder withTemplatingEngineName(String templatingEngineName) {
+ this.templatingEngineName = templatingEngineName;
+ return this;
+ }
+
+ /**
+ * Sets the {@code ignoreFileOverride} and returns a reference to this Builder so that the methods can be chained together.
+ *
+ * @param ignoreFileOverride the {@code ignoreFileOverride} to set
+ * @return a reference to this Builder
+ */
+ public Builder withIgnoreFileOverride(String ignoreFileOverride) {
+ this.ignoreFileOverride = ignoreFileOverride;
+ return this;
+ }
+
+ /**
+ * Sets the {@code systemProperties} and returns a reference to this Builder so that the methods can be chained together.
+ *
+ * @param systemProperties the {@code systemProperties} to set
+ * @return a reference to this Builder
+ */
+ public Builder withSystemProperties(Map systemProperties) {
+ this.systemProperties = systemProperties;
+ return this;
+ }
+
+ /**
+ * Sets the {@code systemProperties} and returns a reference to this Builder so that the methods can be chained together.
+ *
+ * @param key The key of a system (global) property to set
+ * @param value The value of a system (global) property to set
+ * @return a reference to this Builder
+ */
+ public Builder withSystemProperty(String key, String value) {
+ if (this.systemProperties == null) {
+ this.systemProperties = new HashMap<>();
+ }
+ this.systemProperties.put(key, value);
+ return this;
+ }
+
+ /**
+ * Returns a {@code WorkflowSettings} built from the parameters previously set.
+ *
+ * @return a {@code WorkflowSettings} built with parameters of this {@code WorkflowSettings.Builder}
+ */
+ public WorkflowSettings build() {
+ WorkflowSettings instance = new WorkflowSettings(this);
+ //noinspection PlaceholderCountMatchesArgumentCount
+ LOGGER.debug("WorkflowSettings#build: %s", instance.toString());
+ return instance;
+ }
+ }
+
+
+ @Override
+ public String toString() {
+ return "WorkflowSettings{" +
+ "inputSpec='" + inputSpec + '\'' +
+ ", outputDir='" + outputDir + '\'' +
+ ", verbose=" + verbose +
+ ", skipOverwrite=" + skipOverwrite +
+ ", removeOperationIdPrefix=" + removeOperationIdPrefix +
+ ", logToStderr=" + logToStderr +
+ ", validateSpec=" + validateSpec +
+ ", enablePostProcessFile=" + enablePostProcessFile +
+ ", enableMinimalUpdate=" + enableMinimalUpdate +
+ ", strictSpecBehavior=" + strictSpecBehavior +
+ ", templateDir='" + templateDir + '\'' +
+ ", templatingEngineName='" + templatingEngineName + '\'' +
+ ", ignoreFileOverride='" + ignoreFileOverride + '\'' +
+ ", systemProperties=" + systemProperties +
+ '}';
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) return true;
+ if (!(o instanceof WorkflowSettings)) return false;
+ WorkflowSettings that = (WorkflowSettings) o;
+ return isVerbose() == that.isVerbose() &&
+ isSkipOverwrite() == that.isSkipOverwrite() &&
+ isRemoveOperationIdPrefix() == that.isRemoveOperationIdPrefix() &&
+ isLogToStderr() == that.isLogToStderr() &&
+ isValidateSpec() == that.isValidateSpec() &&
+ isEnablePostProcessFile() == that.isEnablePostProcessFile() &&
+ isEnableMinimalUpdate() == that.isEnableMinimalUpdate() &&
+ isStrictSpecBehavior() == that.isStrictSpecBehavior() &&
+ Objects.equals(getInputSpec(), that.getInputSpec()) &&
+ Objects.equals(getOutputDir(), that.getOutputDir()) &&
+ Objects.equals(getTemplateDir(), that.getTemplateDir()) &&
+ Objects.equals(getTemplatingEngineName(), that.getTemplatingEngineName()) &&
+ Objects.equals(getIgnoreFileOverride(), that.getIgnoreFileOverride()) &&
+ Objects.equals(getSystemProperties(), that.getSystemProperties());
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(
+ getInputSpec(),
+ getOutputDir(),
+ isVerbose(),
+ isSkipOverwrite(),
+ isRemoveOperationIdPrefix(),
+ isLogToStderr(),
+ isValidateSpec(),
+ isEnablePostProcessFile(),
+ isEnableMinimalUpdate(),
+ isStrictSpecBehavior(),
+ getTemplateDir(),
+ getTemplatingEngineName(),
+ getIgnoreFileOverride(),
+ getSystemProperties()
+ );
+ }
+}
diff --git a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/GeneratorMetadata.java b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/GeneratorMetadata.java
index 0c87104c7b5..4bd538a231d 100644
--- a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/GeneratorMetadata.java
+++ b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/GeneratorMetadata.java
@@ -1,3 +1,19 @@
+/*
+ * Copyright 2019 OpenAPI-Generator Contributors (https://openapi-generator.tech)
+ *
+ * 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
+ *
+ * http://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.meta;
/**
diff --git a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/Stability.java b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/Stability.java
index 6e12c64f7d1..8547ea9b10d 100644
--- a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/Stability.java
+++ b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/Stability.java
@@ -1,3 +1,19 @@
+/*
+ * Copyright 2019 OpenAPI-Generator Contributors (https://openapi-generator.tech)
+ *
+ * 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
+ *
+ * http://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.meta;
/**
diff --git a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/GenericValidator.java b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/GenericValidator.java
new file mode 100644
index 00000000000..2cac0876053
--- /dev/null
+++ b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/GenericValidator.java
@@ -0,0 +1,61 @@
+/*
+ * Copyright 2019 OpenAPI-Generator Contributors (https://openapi-generator.tech)
+ *
+ * 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
+ *
+ * http://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.validation;
+
+import java.util.List;
+
+/**
+ * A generic implementation of a validator instance which simply applies rules to an input instance.
+ *
+ * @param The type of object being evaluated.
+ */
+@SuppressWarnings({"WeakerAccess"})
+public class GenericValidator implements Validator {
+ private List rules;
+
+ /**
+ * Constructs a new instance of {@link GenericValidator}.
+ *
+ * @param rules The rules to be evaluated during validation.
+ */
+ public GenericValidator(List rules) {
+ this.rules = rules;
+ }
+
+ /**
+ * Validates input, resulting in a instance of {@link ValidationResult} which provides details on all validations performed (success, error, warning).
+ *
+ * @param input The object instance to be validated.
+ *
+ * @return A {@link ValidationResult} which details the success, error, and warning validation results.
+ */
+ @Override
+ public ValidationResult validate(TInput input) {
+ ValidationResult result = new ValidationResult();
+ if (rules != null) {
+ rules.forEach(it -> {
+ boolean passes = it.evaluate(input);
+ if (passes) {
+ result.addResult(Validated.valid(it));
+ } else {
+ result.addResult(Validated.invalid(it, it.getFailureMessage()));
+ }
+ });
+ }
+ return result;
+ }
+}
diff --git a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/Invalid.java b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/Invalid.java
new file mode 100644
index 00000000000..2f3745ebf01
--- /dev/null
+++ b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/Invalid.java
@@ -0,0 +1,57 @@
+/*
+ * Copyright 2019 OpenAPI-Generator Contributors (https://openapi-generator.tech)
+ *
+ * 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
+ *
+ * http://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.validation;
+
+/**
+ * Represents a {@link Validated} state which is "Invalid" to some degree of {@link Severity}.
+ */
+@SuppressWarnings({"WeakerAccess"})
+public final class Invalid extends Validated {
+ private String message;
+ private ValidationRule rule;
+
+ /**
+ * Constructs a new {@link Invalid} instance.
+ *
+ * @param rule The rule which was evaluated and resulted in this state.
+ * @param message The message to be displayed for this invalid state.
+ */
+ Invalid(ValidationRule rule, String message) {
+ this.rule = rule;
+ this.message = message;
+ }
+
+ @Override
+ String getMessage() {
+ return message;
+ }
+
+ @Override
+ ValidationRule getRule() {
+ return rule;
+ }
+
+ /**
+ * Get details about the severity of this invalid state.
+ * For instance, is this an {@link Severity#ERROR} or simply a {@link Severity#WARNING}.
+ *
+ * @return The {@link Severity} enum detailing this state's severity.
+ */
+ public Severity getSeverity() {
+ return rule.getSeverity();
+ }
+}
diff --git a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/Severity.java b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/Severity.java
new file mode 100644
index 00000000000..7818dfd620a
--- /dev/null
+++ b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/Severity.java
@@ -0,0 +1,33 @@
+/*
+ * Copyright 2019 OpenAPI-Generator Contributors (https://openapi-generator.tech)
+ *
+ * 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
+ *
+ * http://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.validation;
+
+/**
+ * Defines different levels of severity to be used during validation.
+ */
+public enum Severity {
+ /**
+ * Lower severity indicating that the target state may be unpredictable, no longer supported, or known to have issues.
+ * Marking a type with this value should not result in application exceptions under normal operating circumstances.
+ */
+ WARNING,
+ /**
+ * Higher severity indicating that the target state is not supported, or is known to cause problems with the application.
+ * Marking a type with this value should result in an application exception or error exit code under normal operating circumstances.
+ */
+ ERROR
+}
\ No newline at end of file
diff --git a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/Valid.java b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/Valid.java
new file mode 100644
index 00000000000..d31443dca23
--- /dev/null
+++ b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/Valid.java
@@ -0,0 +1,53 @@
+/*
+ * Copyright 2019 OpenAPI-Generator Contributors (https://openapi-generator.tech)
+ *
+ * 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
+ *
+ * http://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.validation;
+
+/**
+ * Represents a {@link Validated} state which is "valid" according to the defined rule.
+ */
+public final class Valid extends Validated {
+ private ValidationRule rule;
+
+ /**
+ * Defines whether or not the validation resulted in a "valid" condition.
+ *
+ * @return true if the instance passed validation of the rule returned by {@link Validated#getRule()}.
+ */
+ @Override
+ boolean isValid() {
+ return true;
+ }
+
+ /**
+ * Constructs a new {@link Valid} instance.
+ *
+ * @param rule The rule which was evaluated and resulted in this state.
+ */
+ Valid(ValidationRule rule) {
+ this.rule = rule;
+ }
+
+ @Override
+ public String getMessage() {
+ return null;
+ }
+
+ @Override
+ public ValidationRule getRule() {
+ return rule;
+ }
+}
diff --git a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/Validated.java b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/Validated.java
new file mode 100644
index 00000000000..4800cd9ce75
--- /dev/null
+++ b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/Validated.java
@@ -0,0 +1,68 @@
+/*
+ * Copyright 2019 OpenAPI-Generator Contributors (https://openapi-generator.tech)
+ *
+ * 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
+ *
+ * http://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.validation;
+
+/**
+ * Provides details about the state of a completed validation.
+ */
+public abstract class Validated {
+ /**
+ * Defines whether or not the validation resulted in a "valid" condition.
+ *
+ * @return true if the instance passed validation of the rule returned by {@link Validated#getRule()}.
+ */
+ boolean isValid() {
+ return false;
+ }
+
+ /**
+ * Gets the rule which was evaluated and resulted in this state.
+ *
+ * @return The instance of {@link ValidationRule} which was evaluated.
+ */
+ abstract ValidationRule getRule();
+
+ /**
+ * Gets the message with details about this validated state.
+ *
+ * @return A string intended to be displayed to a user.
+ */
+ abstract String getMessage();
+
+ /**
+ * Creates an instance of an {@link Invalid} validation state.
+ *
+ * @param rule The rule which was evaluated.
+ * @param message The message to display to a user.
+ *
+ * @return A {@link Validated} instance representing an invalid state according to the rule.
+ */
+ public static Validated invalid(ValidationRule rule, String message) {
+ return new Invalid(rule, message);
+ }
+
+ /**
+ * Creates an instance of an {@link Valid} validation state.
+ *
+ * @param rule The rule which was evaluated.
+ *
+ * @return A {@link Validated} instance representing a valid state according to the rule.
+ */
+ public static Validated valid(ValidationRule rule) {
+ return new Valid(rule);
+ }
+}
diff --git a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/ValidationResult.java b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/ValidationResult.java
new file mode 100644
index 00000000000..166ce2b2dff
--- /dev/null
+++ b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/ValidationResult.java
@@ -0,0 +1,104 @@
+/*
+ * Copyright 2019 OpenAPI-Generator Contributors (https://openapi-generator.tech)
+ *
+ * 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
+ *
+ * http://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.validation;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.stream.Collectors;
+
+/**
+ * Encapsulates details about the result of a validation test.
+ */
+@SuppressWarnings("WeakerAccess")
+public final class ValidationResult {
+ private final List validations;
+
+ /**
+ * Constructs a new {@link ValidationResult} instance, backed by the provided validations (useful for testing).
+ *
+ * @param validations A pre-defined set of validations to begin with.
+ */
+ private ValidationResult(List validations) {
+ this.validations = Collections.synchronizedList(validations);
+ }
+
+ /**
+ * Constructs a new {@link ValidationResult} instance.
+ */
+ public ValidationResult() {
+ this(new ArrayList<>());
+ }
+
+ /**
+ * Gets all the validated states resulting from the evaluation. This includes all {@link Valid} and {@link Invalid} instances.
+ *
+ * @return All validated results.
+ */
+ public List getAll() {
+ return validations;
+ }
+
+ /**
+ * Gets a filtered list of {@link Valid} states.
+ *
+ * @return A list containing only {@link Valid} states.
+ */
+ public List getValid(){
+ return validations.stream().filter(Validated::isValid).map(it -> (Valid)it).collect(Collectors.toList());
+ }
+
+ /**
+ * Gets a filters list of {@link Invalid} states with the level of {@link Severity#ERROR}
+ *
+ * @return A list of all validation errors.
+ */
+ public List getErrors(){
+ return validations.stream()
+ .filter(it -> !it.isValid())
+ .map(it -> (Invalid)it)
+ .filter(it -> it.getSeverity().equals(Severity.ERROR))
+ .collect(Collectors.toList());
+ }
+
+ /**
+ * Gets a filtered list of {@link Invalid} states with the level of {@link Severity#WARNING}
+ *
+ * @return A list of all validation warnings.
+ */
+ public List getWarnings(){
+ return validations.stream()
+ .filter(it -> !it.isValid())
+ .map(it -> (Invalid)it)
+ .filter(it -> it.getSeverity().equals(Severity.WARNING))
+ .collect(Collectors.toList());
+ }
+
+ /**
+ * Adds a validation state to the final results.
+ *
+ * @param validated The {@link Valid} or {@link Invalid} instance to add to validations.
+ */
+ public void addResult(Validated validated) {
+ synchronized (validations) {
+ ValidationRule rule = validated.getRule();
+ if (rule != null && !rule.equals(ValidationRule.empty())) {
+ validations.add(validated);
+ }
+ }
+ }
+}
diff --git a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/ValidationRule.java b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/ValidationRule.java
new file mode 100644
index 00000000000..b774e8653d4
--- /dev/null
+++ b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/ValidationRule.java
@@ -0,0 +1,152 @@
+/*
+ * Copyright 2019 OpenAPI-Generator Contributors (https://openapi-generator.tech)
+ *
+ * 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
+ *
+ * http://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.validation;
+
+import java.util.function.Function;
+
+/**
+ * Defines a rule to be evaluated against some target object.
+ */
+@SuppressWarnings("WeakerAccess")
+public class ValidationRule {
+ private Severity severity;
+ private String description;
+ private String failureMessage;
+ private Function