diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index f2a2cd59b7e1..e93ef7163643 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -2,7 +2,7 @@ - [ ] Read the [contribution guidelines](https://github.com/openapitools/openapi-generator/blob/master/CONTRIBUTING.md). - [ ] Ran the shell script under `./bin/` to update Petstore sample so that CIs can verify the change. (For instance, only need to run `./bin/{LANG}-petstore.sh` and `./bin/security/{LANG}-petstore.sh` if updating the {LANG} (e.g. php, ruby, python, etc) code generator or {LANG} client's mustache templates). Windows batch files can be found in `.\bin\windows\`. -- [ ] Filed the PR against the [correct branch](https://github.com/OpenAPITools/openapi-generator/wiki/Git-Branches): `master`, `4.0.x`. Default: `master`. +- [ ] Filed the PR against the [correct branch](https://github.com/OpenAPITools/openapi-generator/wiki/Git-Branches): `master`, `3.3.x`, `4.0.x`. Default: `master`. - [ ] Copied the [technical committee](https://github.com/openapitools/openapi-generator/#62---openapi-generator-technical-committee) to review the pull request if your PR is targeting a particular programming language. ### Description of the PR diff --git a/.gitignore b/.gitignore index 58819fc69df9..fd191d361953 100644 --- a/.gitignore +++ b/.gitignore @@ -59,6 +59,12 @@ samples/client/petstore/qt5cpp/PetStore/PetStore samples/client/petstore/qt5cpp/PetStore/Makefile samples/client/petstore/qt5cpp/PetStore/PetStore.pro.user +# cpprestsdk +samples/client/petstore/cpp-restsdk/CMakeCache.txt +samples/client/petstore/cpp-restsdk/CMakeFiles/ +samples/client/petstore/cpp-restsdk/Makefile +samples/client/petstore/cpp-restsdk/cmake_install.cmake + #Java/Android **/.gradle samples/client/petstore/java/hello.txt diff --git a/CI/pom.xml.circleci b/CI/pom.xml.circleci index 5b668d08919a..c6bf0841c35a 100644 --- a/CI/pom.xml.circleci +++ b/CI/pom.xml.circleci @@ -607,6 +607,55 @@ samples/server/petstore/jaxrs/jersey1 + + + jaxrs-jersey + + + env + java + + + + samples/server/petstore/jaxrs-jersey + + + + jaxrs-spec + + + env + java + + + + samples/server/petstore/jaxrs-spec + + + + jaxrs-spec-interface + + + env + java + + + + samples/server/petstore/jaxrs-spec-interface + + + + jaxrs-spec-interface-response + + + env + java + + + + samples/server/petstore/jaxrs-spec-interface-response + + typescript-fetch-client-tests-default @@ -862,6 +911,10 @@ samples/client/petstore/kotlin-threetenbp/ samples/client/petstore/kotlin-string/ + samples/server/petstore/jaxrs-jersey + samples/server/petstore/jaxrs-spec + samples/server/petstore/jaxrs-spec-interface + samples/server/petstore/jaxrs-spec-interface-response samples/server/petstore/java-vertx/rx samples/server/petstore/java-vertx/async samples/server/petstore/java-inflector @@ -901,7 +954,6 @@ samples/server/petstore/jaxrs-cxf-cdi samples/server/petstore/jaxrs-cxf-non-spring-app samples/server/petstore/java-msf4j - samples/server/petstore/jaxrs-spec-interface samples/server/petstore/scala-lagom-server samples/server/petstore/scalatra samples/server/petstore/finch diff --git a/CI/pom.xml.circleci.java7 b/CI/pom.xml.circleci.java7 index e66fe6f5111a..6e6227bc9376 100644 --- a/CI/pom.xml.circleci.java7 +++ b/CI/pom.xml.circleci.java7 @@ -607,6 +607,55 @@ samples/server/petstore/jaxrs/jersey1 + + + jaxrs-jersey + + + env + java + + + + samples/server/petstore/jaxrs-jersey + + + + jaxrs-spec + + + env + java + + + + samples/server/petstore/jaxrs-spec + + + + jaxrs-spec-interface + + + env + java + + + + samples/server/petstore/jaxrs-spec-interface + + + + jaxrs-spec-interface-response + + + env + java + + + + samples/server/petstore/jaxrs-spec-interface-response + + typescript-fetch-client-tests-default @@ -852,6 +901,10 @@ samples/client/petstore/java/google-api-client samples/client/petstore/kotlin/ + samples/server/petstore/jaxrs-jersey + samples/server/petstore/jaxrs-spec + samples/server/petstore/jaxrs-spec-interface + samples/server/petstore/jaxrs-spec-interface-response samples/server/petstore/java-vertx/rx samples/server/petstore/java-vertx/async samples/server/petstore/java-inflector @@ -875,7 +928,6 @@ samples/server/petstore/jaxrs-cxf-cdi samples/server/petstore/jaxrs-cxf-non-spring-app samples/server/petstore/java-msf4j - samples/server/petstore/jaxrs-spec-interface diff --git a/CI/samples/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 similarity index 100% rename from CI/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj rename to CI/samples.ci/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj diff --git a/README.md b/README.md index 09ceabc2ecce..45f98af85527 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@
-[Master](https://github.com/OpenAPITools/openapi-generator/tree/master) (`3.2.1`): [![Build Status](https://img.shields.io/travis/OpenAPITools/openapi-generator/master.svg?label=Integration%20Test)](https://travis-ci.org/OpenAPITools/openapi-generator) +[Master](https://github.com/OpenAPITools/openapi-generator/tree/master) (`3.2.2`): [![Build Status](https://img.shields.io/travis/OpenAPITools/openapi-generator/master.svg?label=Integration%20Test)](https://travis-ci.org/OpenAPITools/openapi-generator) [![Integration Test2](https://circleci.com/gh/OpenAPITools/openapi-generator.svg?style=shield)](https://circleci.com/gh/OpenAPITools/openapi-generator) [![Run Status](https://api.shippable.com/projects/5af6bf74e790f4070084a115/badge?branch=master)](https://app.shippable.com/github/OpenAPITools/openapi-generator) [![Windows Test](https://ci.appveyor.com/api/projects/status/github/openapitools/openapi-generator?branch=master&svg=true&passingText=Windows%20Test%20-%20OK&failingText=Windows%20Test%20-%20Fails)](https://ci.appveyor.com/project/WilliamCheng/openapi-generator-wh2wu) @@ -80,21 +80,18 @@ OpenAPI Generator allows generation of API client libraries (SDK generation), se The OpenAPI Specification has undergone 3 revisions since initial creation in 2010. The openapi-generator project has the following compatibilities with the OpenAPI Specification: -OpenAPI Generator Version | Release Date | OpenAPI Spec compatibility | Notes ----------------------------- | ------------ | -------------------------- | ----- -4.0.0 (upcoming major release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/4.0.0-SNAPSHOT/)| TBD | 1.0, 1.1, 1.2, 2.0, 3.0 | Major release with breaking changes (no fallback) -3.3.0 (upcoming minor release)| TBD | 1.0, 1.1, 1.2, 2.0, 3.0 | Minor release (breaking changes with fallbacks) -3.2.1 (current master, upcoming patch release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/3.2.1-SNAPSHOT/)| TBD | 1.0, 1.1, 1.2, 2.0, 3.0 | Bugfix release -[3.2.0](https://github.com/OpenAPITools/openapi-generator/releases/tag/v3.2.0) | 06.08.2018 | 1.0, 1.1, 1.2, 2.0, 3.0 | Bugfix release -[3.1.2](https://github.com/OpenAPITools/openapi-generator/releases/tag/v3.1.2) | 25.07.2018 | 1.0, 1.1, 1.2, 2.0, 3.0 | Bugfix release -[3.1.1](https://github.com/OpenAPITools/openapi-generator/releases/tag/v3.1.1) | 18.07.2018 | 1.0, 1.1, 1.2, 2.0, 3.0 | Bugfix release -[3.1.0](https://github.com/OpenAPITools/openapi-generator/releases/tag/v3.1.0) | 06.07.2018 | 1.0, 1.1, 1.2, 2.0, 3.0 | Minor release (breaking changes with fallbacks) -[3.0.3](https://github.com/OpenAPITools/openapi-generator/releases/tag/v3.0.3) | 27.06.2018 | 1.0, 1.1, 1.2, 2.0, 3.0 | Bugfix release -[3.0.2](https://github.com/OpenAPITools/openapi-generator/releases/tag/v3.0.2) | 18.06.2018 | 1.0, 1.1, 1.2, 2.0, 3.0 | Bugfix release -[3.0.1](https://github.com/OpenAPITools/openapi-generator/releases/tag/v3.0.1) | 11.06.2018 | 1.0, 1.1, 1.2, 2.0, 3.0 | Bugfix release -[3.0.0](https://github.com/OpenAPITools/openapi-generator/releases/tag/v3.0.0) | 01.06.2018 | 1.0, 1.1, 1.2, 2.0, 3.0 | First release with breaking changes +OpenAPI Generator Version | Release Date | Notes +---------------------------- | ------------ | ----- +4.0.0 (upcoming major release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/4.0.0-SNAPSHOT/)| TBD | Major release with breaking changes (no fallback) +3.3.0 (upcoming minor release)| TBD | Minor release (breaking changes with fallbacks) +3.2.2 (current master, upcoming patch release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/3.2.2-SNAPSHOT/)| TBD | Bugfix release +[3.2.1](https://github.com/OpenAPITools/openapi-generator/releases/tag/v3.2.1) (latest stable release) | 14.08.2018 | Bugfix release -### [1.2 - Artifacts on Maven Central](#table-of-contents) +OpenAPI Spec compatibility: 1.0, 1.1, 1.2, 2.0, 3.0 + +For old releases, please refer to the [**Release**](https://github.com/OpenAPITools/openapi-generator/releases) page. + +## [1.2 - Artifacts on Maven Central](#table-of-contents) You can find our released artefacts on maven central: @@ -144,16 +141,16 @@ See the different versions of the [openapi-generator-cli](https://mvnrepository. 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/3.2.0/openapi-generator-cli-3.2.0.jar` +JAR location: `http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/3.2.1/openapi-generator-cli-3.2.1.jar` For **Mac/Linux** users: ```sh -wget http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/3.2.0/openapi-generator-cli-3.2.0.jar -O openapi-generator-cli.jar +wget http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/3.2.1/openapi-generator-cli-3.2.1.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/3.2.0/openapi-generator-cli-3.2.0.jar +Invoke-WebRequest -OutFile openapi-generator-cli.jar http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/3.2.1/openapi-generator-cli-3.2.1.jar ``` After downloading the JAR, run `java -jar openapi-generator-cli.jar help` to show the usage. @@ -174,7 +171,7 @@ An example of setting this up (NOTE: Always evaluate scripts curled from externa ``` mkdir -p ~/bin/openapitools -curl https://raw.githubusercontent.com/OpenAPITools/openapi-generator/master/bin/utils/openapi-generator.cli.sh > ~/bin/openapitools/openapi-generator-cli +curl https://raw.githubusercontent.com/OpenAPITools/openapi-generator/master/bin/utils/openapi-generator-cli.sh > ~/bin/openapitools/openapi-generator-cli chmod u+x ~/bin/openapitools/openapi-generator-cli export PATH=$PATH:~/bin/openapitools/ ``` diff --git a/appveyor.yml b/appveyor.yml index 9113aaa1bdae..9b6042162b79 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -35,6 +35,8 @@ build_script: # install openapi-generator locally - mvn clean install --quiet 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 # 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 # test c# API client (with PropertyChanged) @@ -42,6 +44,10 @@ test_script: # generate all petstore clients - .\bin\windows\run-all-petstore.cmd + + # generate all petstore clients (openapi3) + - .\bin\openapi3\windows\run-all-petstore.cmd + cache: - C:\maven\ - C:\Users\appveyor\.m2 diff --git a/bin/csharp-petstore.sh b/bin/csharp-petstore.sh index 0502a8fba8c0..b7c90b5a1038 100755 --- a/bin/csharp-petstore.sh +++ b/bin/csharp-petstore.sh @@ -29,8 +29,9 @@ fi export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -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 csharp -o samples/client/petstore/csharp/OpenAPIClient --additional-properties packageGuid={321C8C3F-0156-40C1-AE42-D59761FB9B6C} $@" +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" -cp ./CI/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj ./samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/ +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/ -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/dynamic-html.sh b/bin/dynamic-html.sh index 7fc4f6a6ba7a..c98948913433 100755 --- a/bin/dynamic-html.sh +++ b/bin/dynamic-html.sh @@ -27,6 +27,6 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g dynamic-html -o samples/dynamic-html $@" +ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g dynamic-html -o samples/documentation/dynamic-html $@" java $JAVA_OPTS -jar $executable $ags diff --git a/bin/html-markdown.sh b/bin/html-markdown.sh index 7808fe8c09df..391e549f2acc 100755 --- a/bin/html-markdown.sh +++ b/bin/html-markdown.sh @@ -27,6 +27,6 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -i modules/openapi-generator/src/test/resources/2_0/markdown.yaml -g html -o samples/html.md $@" +ags="generate -i modules/openapi-generator/src/test/resources/2_0/markdown.yaml -g html -o samples/documentation/html.md $@" java $JAVA_OPTS -jar $executable $ags diff --git a/bin/html-petstore.sh b/bin/html-petstore.sh index 29743d6059aa..1b8fadbac987 100755 --- a/bin/html-petstore.sh +++ b/bin/html-petstore.sh @@ -27,6 +27,6 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g html -o samples/html $@" +ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g html -o samples/documentation/html $@" java $JAVA_OPTS -jar $executable $ags diff --git a/bin/html2-petstore.sh b/bin/html2-petstore.sh index 5939463d6c1d..70f6b71c0e5d 100755 --- a/bin/html2-petstore.sh +++ b/bin/html2-petstore.sh @@ -27,6 +27,6 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g html2 -o samples/html2 --additional-properties hideGenerationTimestamp=true $@" +ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g html2 -o samples/documentation/html2 --additional-properties hideGenerationTimestamp=true $@" java $JAVA_OPTS -jar $executable $ags diff --git a/bin/openapi3/csharp-petstore.sh b/bin/openapi3/csharp-petstore.sh index 9a094a0c6521..e8a5e7bb78a3 100755 --- a/bin/openapi3/csharp-petstore.sh +++ b/bin/openapi3/csharp-petstore.sh @@ -27,6 +27,6 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate $@ -i modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml -g csharp -o samples/client/petstore/csharp/OpenAPIClient --additional-properties packageGuid={321C8C3F-0156-40C1-AE42-D59761FB9B6C}" +ags="generate $@ -i modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml -g csharp -o samples/openapi3/client/petstore/csharp/OpenAPIClient --additional-properties packageGuid={321C8C3F-0156-40C1-AE42-D59761FB9B6C}" java $JAVA_OPTS -jar $executable $ags diff --git a/bin/openapi3/jaxrs-jersey-petstore.sh b/bin/openapi3/jaxrs-jersey-petstore.sh new file mode 100644 index 000000000000..86487d172cca --- /dev/null +++ b/bin/openapi3/jaxrs-jersey-petstore.sh @@ -0,0 +1,32 @@ +#!/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 + +# if you've executed sbt assembly previously it will use that instead. +export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -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.yaml -g jaxrs-jersey -o samples/server/petstore/jaxrs-jersey $@" + +java $JAVA_OPTS -jar $executable $ags diff --git a/bin/openapi3/run-all-petstore b/bin/openapi3/run-all-petstore new file mode 100755 index 000000000000..ece3a1a14be9 --- /dev/null +++ b/bin/openapi3/run-all-petstore @@ -0,0 +1,33 @@ +#!/bin/bash +# this bash script will loop through all the .sh files under bin +# execute the script and check the result (exit code) to see if +# there's any error + +echo "IMPORTANT: this script should be run by the CI (e.g. Shippable) only. There's no need to run this script to update Petstore samples for all generators." +echo "Please press CTRL+C to stop or the script will continue in 10 seconds." + +sleep 10 + +successes=0 +failures=0 +for SCRIPT in $(ls -l ./bin/openapi3/*.sh | grep -v all) +do + if [ -f ${SCRIPT} -a -x ${SCRIPT} ]; then + echo "Running $SCRIPT (output to /dev/null)" + ${SCRIPT} 2>&1 > /dev/null + rc=$? + if [[ ${rc} != 0 ]]; then + >&2 echo "ERROR!! FAILED TO RUN ${SCRIPT}" + ((failures+=1)) + else + ((successes+=1)) + fi + fi +done + +if (( failures > 0 )); then + >&2 echo "[ERROR] ${failures} out of $((failures+successes)) scripts failed." + exit 1 +else + echo "[SUCCESS] ${successes} generators finished." +fi diff --git a/bin/openapi3/windows/csharp-petstore.bat b/bin/openapi3/windows/csharp-petstore.bat new file mode 100755 index 000000000000..5e8de764dc27 --- /dev/null +++ b/bin/openapi3/windows/csharp-petstore.bat @@ -0,0 +1,14 @@ +set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar + +If Not Exist %executable% ( + mvn clean package +) + +REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M +set ags=generate -i modules\openapi-generator\src\test/resources\2_0\petstore-with-fake-endpoints-models-for-testing.yaml -g csharp -o samples\openapi3\client\petstore\csharp\SwaggerClient --additional-properties packageGuid={321C8C3F-0156-40C1-AE42-D59761FB9B6C} + +java %JAVA_OPTS% -jar %executable% %ags% + +REM restore csproj file +echo "restore csproject file: CI\samples.ci\client\petstore\csharp\OpenAPIClient\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj" +copy /b/v/y CI\samples.ci\client\petstore\csharp\OpenAPIClient\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj samples\openapi3\client\petstore\csharp\OpenAPIClient\src\Org.OpenAPITools.Test\ diff --git a/bin/openapi3/windows/run-all-petstore.cmd b/bin/openapi3/windows/run-all-petstore.cmd new file mode 100644 index 000000000000..1e5c0fb4ed8f --- /dev/null +++ b/bin/openapi3/windows/run-all-petstore.cmd @@ -0,0 +1,15 @@ +REM this batch file will loop through all the .bat files under bin\openapi3\windows\ +REM execute the script and check the error level to see if there's any error + +echo IMPORTANT: this script should be run by the CI (e.g. appveyor) only. There's no need to run this script to update Petstore samples for all generators. +echo Please press CTRL+C to stop or the script will continue in 10 seconds. + +timeout 10 + +for /f "delims=" %%i in ('dir /b ".\bin\openapi3\windows\*.bat"') do ( + + CALL .\bin\openapi3\windows\%%i + + IF ERRORLEVEL 1 IF NOT ERRORLEVEL 2 exit /b 1 + +) diff --git a/bin/run-all-petstore b/bin/run-all-petstore index 4092352ab4d4..b709a303b476 100755 --- a/bin/run-all-petstore +++ b/bin/run-all-petstore @@ -13,8 +13,8 @@ failures=0 for SCRIPT in $(ls -l ./bin/*.sh | grep -v all) do if [ -f ${SCRIPT} -a -x ${SCRIPT} ]; then - echo "Running $SCRIPT" - ${SCRIPT} + echo "Running $SCRIPT (output to /dev/null)" + ${SCRIPT} 2>&1 > /dev/null rc=$? if [[ ${rc} != 0 ]]; then >&2 echo "ERROR!! FAILED TO RUN ${SCRIPT}" @@ -30,4 +30,4 @@ if (( failures > 0 )); then exit 1 else echo "[SUCCESS] ${successes} generators finished." -fi \ No newline at end of file +fi diff --git a/bin/utils/ensure-up-to-date b/bin/utils/ensure-up-to-date index e5fc703d5712..d6b719257696 100755 --- a/bin/utils/ensure-up-to-date +++ b/bin/utils/ensure-up-to-date @@ -31,6 +31,7 @@ sleep 5 ./bin/typescript-inversify-petstore.sh > /dev/null 2>&1 ./bin/rust-server-petstore.sh > /dev/null 2>&1 ./bin/openapi3/haskell-http-client-petstore.sh > /dev/null 2>&1 +./bin/csharp-petstore.sh > /dev/null 2>&1 # Check: if [ -n "$(git status --porcelain)" ]; then diff --git a/bin/windows/csharp-petstore-net-40.bat b/bin/windows/csharp-petstore-net-40.bat index a80ba284587b..f7722c8205ce 100644 --- a/bin/windows/csharp-petstore-net-40.bat +++ b/bin/windows/csharp-petstore-net-40.bat @@ -5,6 +5,6 @@ If Not Exist %executable% ( ) REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -set ags=generate -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g csharp -o samples/client/petstore/csharp/SwaggerClientNet40 --additional-properties packageGuid={321C8C3F-0156-40C1-AE42-D59761FB9B6C} -c ./bin/csharp-petstore-net-40.json +set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore-with-fake-endpoints-models-for-testing.yaml -g csharp -o samples\client\petstore\csharp\SwaggerClientNet40 --additional-properties packageGuid={321C8C3F-0156-40C1-AE42-D59761FB9B6C} -c .\bin\csharp-petstore-net-40.json java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/csharp-petstore-netstandard.bat b/bin/windows/csharp-petstore-netstandard.bat index de8abe1a099e..236071868c72 100644 --- a/bin/windows/csharp-petstore-netstandard.bat +++ b/bin/windows/csharp-petstore-netstandard.bat @@ -5,6 +5,6 @@ If Not Exist %executable% ( ) REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -set ags=generate -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g csharp -o samples\client\petstore\csharp\SwaggerClientNetStandard --additional-properties targetFramework=v5.0,packageGuid={3AB1F259-1769-484B-9411-84505FCCBD55} +set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore-with-fake-endpoints-models-for-testing.yaml -g csharp -o samples\client\petstore\csharp\SwaggerClientNetStandard --additional-properties targetFramework=v5.0,packageGuid={3AB1F259-1769-484B-9411-84505FCCBD55} java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/csharp-petstore.bat b/bin/windows/csharp-petstore.bat index a838f877f845..b64fd2cabf2c 100755 --- a/bin/windows/csharp-petstore.bat +++ b/bin/windows/csharp-petstore.bat @@ -9,7 +9,7 @@ set ags=generate -i modules\openapi-generator\src\test/resources\2_0\petstore-wi 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" -copy .\CI\samples\client\petstore\csharp\OpenAPIClient\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj .\samples\client\petstore\csharp\OpenAPIClient\src\Org.OpenAPITools.Test\ +REM restore csproj file +echo "restore csproject file: CI\samples.ci\client\petstore\csharp\OpenAPIClient\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj" +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\ diff --git a/bin/windows/html-petstore.bat b/bin/windows/html-petstore.bat index 178890387eff..5a4802d2963a 100755 --- a/bin/windows/html-petstore.bat +++ b/bin/windows/html-petstore.bat @@ -5,6 +5,6 @@ If Not Exist %executable% ( ) REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -DloggerPath=conf/log4j.properties -set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g html -o samples\client\petstore\html +set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g html -o samples\documentation\html java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/html2-petstore.bat b/bin/windows/html2-petstore.bat index 01330cdceea7..a6386d2efae2 100644 --- a/bin/windows/html2-petstore.bat +++ b/bin/windows/html2-petstore.bat @@ -5,6 +5,6 @@ If Not Exist %executable% ( ) REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -DloggerPath=conf/log4j.properties -set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g html2 -o samples\html2 +set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g html2 -o samples\documentation\html2 java %JAVA_OPTS% -jar %executable% %ags% diff --git a/modules/openapi-generator-gradle-plugin/README.adoc b/modules/openapi-generator-gradle-plugin/README.adoc index b379a9f61309..ba0eb6dab25e 100644 --- a/modules/openapi-generator-gradle-plugin/README.adoc +++ b/modules/openapi-generator-gradle-plugin/README.adoc @@ -34,7 +34,7 @@ buildscript { mavenCentral() } dependencies { - classpath "org.openapitools:openapi-generator-gradle-plugin:3.1.2" + classpath "org.openapitools:openapi-generator-gradle-plugin:3.2.1" } } diff --git a/modules/openapi-generator-gradle-plugin/samples/local-spec/README.md b/modules/openapi-generator-gradle-plugin/samples/local-spec/README.md index ec7af537cc36..81987ca31683 100644 --- a/modules/openapi-generator-gradle-plugin/samples/local-spec/README.md +++ b/modules/openapi-generator-gradle-plugin/samples/local-spec/README.md @@ -17,5 +17,5 @@ gradle generateGoWithInvalidSpec The samples can be tested against other versions of the plugin using the `openApiGeneratorVersion` property. For example: ```bash -gradle -PopenApiGeneratorVersion=3.2.0 openApiValidate +gradle -PopenApiGeneratorVersion=3.2.1 openApiValidate ``` diff --git a/modules/openapi-generator-gradle-plugin/samples/local-spec/build.gradle b/modules/openapi-generator-gradle-plugin/samples/local-spec/build.gradle index e9a5bb42e0ea..e5cde4680324 100644 --- a/modules/openapi-generator-gradle-plugin/samples/local-spec/build.gradle +++ b/modules/openapi-generator-gradle-plugin/samples/local-spec/build.gradle @@ -41,6 +41,9 @@ openApiGenerate { configOptions = [ dateLibrary: "java8" ] + systemProperties = [ + modelDocs: "false" + ] } task buildGoSdk(type: org.openapitools.generator.gradle.plugin.tasks.GenerateTask){ diff --git a/modules/openapi-generator-gradle-plugin/samples/local-spec/gradle.properties b/modules/openapi-generator-gradle-plugin/samples/local-spec/gradle.properties index d5831f0dedb9..48df3c91578a 100644 --- a/modules/openapi-generator-gradle-plugin/samples/local-spec/gradle.properties +++ b/modules/openapi-generator-gradle-plugin/samples/local-spec/gradle.properties @@ -1 +1 @@ -openApiGeneratorVersion=3.2.0 +openApiGeneratorVersion=3.2.1 diff --git a/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/tasks/GenerateTask.kt b/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/tasks/GenerateTask.kt index db901f021c76..7c6ecd099da6 100644 --- a/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/tasks/GenerateTask.kt +++ b/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/tasks/GenerateTask.kt @@ -323,7 +323,7 @@ open class GenerateTask : DefaultTask() { @get:Internal val configOptions = project.objects.property>() - private val originalEnvironmentVariables = mutableMapOf() + private val originalEnvironmentVariables = mutableMapOf() private fun Property.ifNotEmpty(block: Property.(T) -> Unit) { if (isPresent) { @@ -352,8 +352,9 @@ open class GenerateTask : DefaultTask() { try { if (systemProperties.isPresent) { systemProperties.get().forEach { (key, value) -> - originalEnvironmentVariables[key] = System.getProperty(key) - System.setProperty(key, value) + // System.setProperty returns the original value for a key, or null. + // Cache the original value or null…we will late put the properties back in their original state. + originalEnvironmentVariables[key] = System.setProperty(key, value) configurator.addSystemProperty(key, value) } } @@ -540,8 +541,12 @@ open class GenerateTask : DefaultTask() { throw GradleException("Code generation failed.", e) } } finally { - originalEnvironmentVariables.forEach { entry -> - System.setProperty(entry.key, entry.value) + // Reset all modified system properties back to their original state + originalEnvironmentVariables.forEach { + when { + it.value == null -> System.clearProperty(it.key) + else -> System.setProperty(it.key, it.value) + } } originalEnvironmentVariables.clear() } diff --git a/modules/openapi-generator-maven-plugin/README.md b/modules/openapi-generator-maven-plugin/README.md index ddd40d81bf61..bbef0ba27e51 100644 --- a/modules/openapi-generator-maven-plugin/README.md +++ b/modules/openapi-generator-maven-plugin/README.md @@ -11,7 +11,7 @@ Add to your `build->plugins` section (default phase is `generate-sources` phase) org.openapitools openapi-generator-maven-plugin - 3.2.0 + 3.2.1 @@ -37,6 +37,8 @@ mvn clean compile ### General Configuration parameters +:bulb: These **general** configurations should be in the same level + - `inputSpec` - OpenAPI Spec file path - `validateSpec` - Whether or not to validate the input spec prior to generation. Invalid specifications will result in an error. - `language` - target generation language (deprecated, replaced by `generatorName` as values here don't represent only 'language' any longer) @@ -49,7 +51,7 @@ mvn clean compile - `invokerPackage` - the package to use for the generated invoker objects - `modelNamePrefix` and `modelNameSuffix` - Sets the pre- or suffix for model classes and enums - `withXml` - enable XML annotations inside the generated models and API (only works with Java `language` and libraries that provide support for JSON and XML) -- `configOptions` - a map of language-specific parameters (see below) +- `configOptions` - a map of language-specific parameters. To show a full list of generator-specified parameters (options), please use `configHelp` (explained below) - `configHelp` - dumps the configuration help for the specified library (generates no sources) - `ignoreFileOverride` - specifies the full path to a `.openapi-generator-ignore` used for pattern based overrides of generated outputs - `generateApis` - generate the apis (`true` by default) diff --git a/modules/openapi-generator-maven-plugin/examples/java-client.xml b/modules/openapi-generator-maven-plugin/examples/java-client.xml index 0c460241fa7f..30051bff0d2a 100644 --- a/modules/openapi-generator-maven-plugin/examples/java-client.xml +++ b/modules/openapi-generator-maven-plugin/examples/java-client.xml @@ -12,7 +12,7 @@ org.openapitools openapi-generator-maven-plugin - 3.1.2 + 3.2.1 diff --git a/modules/openapi-generator-maven-plugin/examples/non-java-invalid-spec.xml b/modules/openapi-generator-maven-plugin/examples/non-java-invalid-spec.xml index f21abd376454..a4f1d89aaf58 100644 --- a/modules/openapi-generator-maven-plugin/examples/non-java-invalid-spec.xml +++ b/modules/openapi-generator-maven-plugin/examples/non-java-invalid-spec.xml @@ -12,7 +12,7 @@ org.openapitools openapi-generator-maven-plugin - 3.1.2 + 3.2.1 diff --git a/modules/openapi-generator-maven-plugin/examples/non-java.xml b/modules/openapi-generator-maven-plugin/examples/non-java.xml index 4124bd25ef43..9b5adfee0be2 100644 --- a/modules/openapi-generator-maven-plugin/examples/non-java.xml +++ b/modules/openapi-generator-maven-plugin/examples/non-java.xml @@ -12,7 +12,7 @@ org.openapitools openapi-generator-maven-plugin - 3.1.2 + 3.2.1 diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java index 0747ade52245..46790890a855 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java @@ -4577,6 +4577,14 @@ public class DefaultCodegen implements CodegenConfig { } } + /** + * checks if the data should be classified as "string" in enum + * e.g. double in C# needs to be double-quoted (e.g. "2.8") by treating it as a string + * In the future, we may rename this function to "isEnumString" + * + * @param dataType data type + * @return true if it's a enum string + */ public boolean isDataTypeString(String dataType) { return "String".equals(dataType); } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultGenerator.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultGenerator.java index 54455f49c897..1ba9611cfd36 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultGenerator.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultGenerator.java @@ -169,14 +169,15 @@ public class DefaultGenerator extends AbstractGenerator implements Generator { if (!generateApiTests && !generateModelTests) { config.additionalProperties().put(CodegenConstants.EXCLUDE_TESTS, true); } - // for backward compatibility - if (System.getProperty("debugSwagger") != null) { - LOGGER.info("Please use system property 'debugOpenAPI' instead of 'debugSwagger'."); - Json.prettyPrint(openAPI); - } + if (System.getProperty("debugOpenAPI") != null) { Json.prettyPrint(openAPI); + } else if (System.getProperty("debugSwagger") != null) { + // This exists for backward compatibility + // We fall to this block only if debugOpenAPI is null. No need to dump this twice. + LOGGER.info("Please use system property 'debugOpenAPI' instead of 'debugSwagger'."); + Json.prettyPrint(openAPI); } config.processOpts(); @@ -787,8 +788,8 @@ public class DefaultGenerator extends AbstractGenerator implements Generator { configureOpenAPIInfo(); // resolve inline models - //InlineModelResolver inlineModelResolver = new InlineModelResolver(); - //inlineModelResolver.flatten(openAPI); + InlineModelResolver inlineModelResolver = new InlineModelResolver(); + inlineModelResolver.flatten(openAPI); List files = new ArrayList(); // models diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/InlineModelResolver.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/InlineModelResolver.java new file mode 100644 index 000000000000..742942e4967f --- /dev/null +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/InlineModelResolver.java @@ -0,0 +1,560 @@ +/* + * Copyright 2018 OpenAPI-Generator Contributors (https://openapi-generator.tech) + * Copyright 2018 SmartBear Software + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * 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; + +import io.swagger.v3.oas.models.OpenAPI; +import io.swagger.v3.oas.models.media.Schema; +import io.swagger.v3.oas.models.media.ArraySchema; +import io.swagger.v3.oas.models.media.ObjectSchema; +import io.swagger.v3.oas.models.media.*; +import io.swagger.v3.oas.models.responses.ApiResponse; +import io.swagger.v3.oas.models.Operation; +import io.swagger.v3.oas.models.PathItem; +import io.swagger.v3.oas.models.parameters.Parameter; +import io.swagger.v3.oas.models.parameters.RequestBody; +import io.swagger.v3.oas.models.Paths; +import io.swagger.v3.core.util.Json; +import org.openapitools.codegen.utils.ModelUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import io.swagger.v3.oas.models.media.Content; +import io.swagger.v3.oas.models.media.MediaType; + +import java.util.*; + +import io.swagger.v3.oas.models.media.XML; + +public class InlineModelResolver { + private OpenAPI openapi; + private boolean skipMatches; + static Logger LOGGER = LoggerFactory.getLogger(InlineModelResolver.class); + Map addedModels = new HashMap(); + Map generatedSignature = new HashMap(); + + public void flatten(OpenAPI openapi) { + this.openapi = openapi; + + if (openapi.getComponents() == null) { + return; // There's nothing here + } + + if (openapi.getComponents().getSchemas() == null) { + openapi.getComponents().setSchemas(new HashMap()); + } + // operations + Map paths = openapi.getPaths(); + Map models = openapi.getComponents().getSchemas(); + if (paths != null) { + for (String pathname : paths.keySet()) { + PathItem path = paths.get(pathname); + for (Operation operation : path.readOperations()) { + RequestBody requestBody = operation.getRequestBody(); + if (requestBody != null) { + Schema model = ModelUtils.getSchemaFromRequestBody(requestBody); + if (model instanceof ObjectSchema) { + Schema obj = (Schema) model; + if (obj.getType() == null || "object".equals(obj.getType())) { + if (obj.getProperties() != null && obj.getProperties().size() > 0) { + flattenProperties(obj.getProperties(), pathname); + // for model name, use "title" if defined, otherwise default to 'inline_object' + String modelName = resolveModelName(obj.getTitle(), "inline_object"); + addGenerated(modelName, model); + openapi.getComponents().addSchemas(modelName, model); + + // create request body + RequestBody rb = new RequestBody(); + Content content = new Content(); + MediaType mt = new MediaType(); + Schema schema = new Schema(); + schema.set$ref(modelName); + mt.setSchema(schema); + + // get "consumes", e.g. application/xml, application/json + Set consumes; + if (requestBody == null || requestBody.getContent() == null || requestBody.getContent().isEmpty()) { + consumes = new HashSet<>(); + consumes.add("application/json"); // default to application/json + LOGGER.info("Default to application/json for inline body schema"); + } else { + consumes = requestBody.getContent().keySet(); + } + + for (String consume : consumes) { + content.addMediaType(consume, mt); + } + + rb.setContent(content); + + // add to openapi "components" + if (openapi.getComponents().getRequestBodies() == null) { + Map requestBodies = new HashMap(); + requestBodies.put(modelName, rb); + openapi.getComponents().setRequestBodies(requestBodies); + } else { + openapi.getComponents().getRequestBodies().put(modelName, rb); + } + + // update requestBody to use $ref instead of inline def + requestBody.set$ref(modelName); + + } + } + } else if (model instanceof ArraySchema) { + ArraySchema am = (ArraySchema) model; + Schema inner = am.getItems(); + if (inner instanceof ObjectSchema) { + ObjectSchema op = (ObjectSchema) inner; + if (op.getProperties() != null && op.getProperties().size() > 0) { + flattenProperties(op.getProperties(), pathname); + String modelName = resolveModelName(op.getTitle(), null); + Schema innerModel = modelFromProperty(op, modelName); + String existing = matchGenerated(innerModel); + if (existing != null) { + Schema schema = new Schema().$ref(existing); + schema.setRequired(op.getRequired()); + am.setItems(schema); + } else { + Schema schema = new Schema().$ref(modelName); + schema.setRequired(op.getRequired()); + am.setItems(schema); + addGenerated(modelName, innerModel); + openapi.getComponents().addSchemas(modelName, innerModel); + } + } + } + } + } + + List parameters = operation.getParameters(); + if (parameters != null) { + for (Parameter parameter : parameters) { + if (parameter.getSchema() != null) { + Schema model = parameter.getSchema(); + if (model instanceof ObjectSchema) { + Schema obj = (Schema) model; + if (obj.getType() == null || "object".equals(obj.getType())) { + if (obj.getProperties() != null && obj.getProperties().size() > 0) { + flattenProperties(obj.getProperties(), pathname); + String modelName = resolveModelName(obj.getTitle(), parameter.getName()); + + parameter.$ref(modelName); + addGenerated(modelName, model); + openapi.getComponents().addSchemas(modelName, model); + } + } + } else if (model instanceof ArraySchema) { + ArraySchema am = (ArraySchema) model; + Schema inner = am.getItems(); + if (inner instanceof ObjectSchema) { + ObjectSchema op = (ObjectSchema) inner; + if (op.getProperties() != null && op.getProperties().size() > 0) { + flattenProperties(op.getProperties(), pathname); + String modelName = resolveModelName(op.getTitle(), parameter.getName()); + Schema innerModel = modelFromProperty(op, modelName); + String existing = matchGenerated(innerModel); + if (existing != null) { + Schema schema = new Schema().$ref(existing); + schema.setRequired(op.getRequired()); + am.setItems(schema); + } else { + Schema schema = new Schema().$ref(modelName); + schema.setRequired(op.getRequired()); + am.setItems(schema); + addGenerated(modelName, innerModel); + openapi.getComponents().addSchemas(modelName, innerModel); + } + } + } + } + } + } + } + Map responses = operation.getResponses(); + if (responses != null) { + for (String key : responses.keySet()) { + ApiResponse response = responses.get(key); + if (ModelUtils.getSchemaFromResponse(response) != null) { + Schema property = ModelUtils.getSchemaFromResponse(response); + if (property instanceof ObjectSchema) { + ObjectSchema op = (ObjectSchema) property; + if (op.getProperties() != null && op.getProperties().size() > 0) { + String modelName = resolveModelName(op.getTitle(), "inline_response_" + key); + Schema model = modelFromProperty(op, modelName); + String existing = matchGenerated(model); + Content content = response.getContent(); + for (MediaType mediaType : content.values()) { + if (existing != null) { + Schema schema = this.makeSchema(existing, property); + schema.setRequired(op.getRequired()); + mediaType.setSchema(schema); + } else { + Schema schema = this.makeSchema(modelName, property); + schema.setRequired(op.getRequired()); + mediaType.setSchema(schema); + addGenerated(modelName, model); + openapi.getComponents().addSchemas(modelName, model); + } + } + } + } else if (property instanceof ArraySchema) { + ArraySchema ap = (ArraySchema) property; + Schema inner = ap.getItems(); + if (inner instanceof ObjectSchema) { + ObjectSchema op = (ObjectSchema) inner; + if (op.getProperties() != null && op.getProperties().size() > 0) { + flattenProperties(op.getProperties(), pathname); + String modelName = resolveModelName(op.getTitle(), + "inline_response_" + key); + Schema innerModel = modelFromProperty(op, modelName); + String existing = matchGenerated(innerModel); + if (existing != null) { + Schema schema = this.makeSchema(existing, op); + schema.setRequired(op.getRequired()); + ap.setItems(schema); + } else { + Schema schema = this.makeSchema(modelName, op); + schema.setRequired(op.getRequired()); + ap.setItems(schema); + addGenerated(modelName, innerModel); + openapi.getComponents().addSchemas(modelName, innerModel); + } + } + } + } else if (property instanceof MapSchema) { + MapSchema mp = (MapSchema) property; + Schema innerProperty = (Schema) mp.getAdditionalProperties(); + if (innerProperty instanceof ObjectSchema) { + ObjectSchema op = (ObjectSchema) innerProperty; + if (op.getProperties() != null && op.getProperties().size() > 0) { + flattenProperties(op.getProperties(), pathname); + String modelName = resolveModelName(op.getTitle(), + "inline_response_" + key); + Schema innerModel = modelFromProperty(op, modelName); + String existing = matchGenerated(innerModel); + if (existing != null) { + Schema schema = new Schema().$ref(existing); + schema.setRequired(op.getRequired()); + mp.setAdditionalProperties(schema); + } else { + Schema schema = new Schema().$ref(modelName); + schema.setRequired(op.getRequired()); + mp.setAdditionalProperties(schema); + addGenerated(modelName, innerModel); + openapi.getComponents().addSchemas(modelName, innerModel); + } + } + } + } + } + } + } + } + } + } + // definitions + if (models != null) { + List modelNames = new ArrayList(models.keySet()); + for (String modelName : modelNames) { + Schema model = models.get(modelName); + if (model instanceof Schema) { + Schema m = (Schema) model; + Map properties = m.getProperties(); + flattenProperties(properties, modelName); + fixStringModel(m); + } else if (ModelUtils.isArraySchema(model)) { + ArraySchema m = (ArraySchema) model; + Schema inner = m.getItems(); + if (inner instanceof ObjectSchema) { + ObjectSchema op = (ObjectSchema) inner; + if (op.getProperties() != null && op.getProperties().size() > 0) { + String innerModelName = resolveModelName(op.getTitle(), modelName + "_inner"); + Schema innerModel = modelFromProperty(op, innerModelName); + String existing = matchGenerated(innerModel); + if (existing == null) { + openapi.getComponents().addSchemas(innerModelName, innerModel); + addGenerated(innerModelName, innerModel); + Schema schema = new Schema().$ref(innerModelName); + schema.setRequired(op.getRequired()); + m.setItems(schema); + } else { + Schema schema = new Schema().$ref(existing); + schema.setRequired(op.getRequired()); + m.setItems(schema); + } + } + } + } else if (ModelUtils.isComposedSchema(model)) { + ComposedSchema m = (ComposedSchema) model; + if (m.getAllOf() != null && !m.getAllOf().isEmpty()) { + Schema child = null; + for (Schema component : m.getAllOf()) { + if (component.get$ref() == null) { + child = component; + } + } + if (child != null) { + Map properties = child.getProperties(); + flattenProperties(properties, modelName); + } + } + } + } + } + } + + /** + * This function fix models that are string (mostly enum). Before this fix, the + * example would look something like that in the doc: "\"example from def\"" + * + * @param m Schema implementation + */ + private void fixStringModel(Schema m) { + if (m.getType() != null && m.getType().equals("string") && m.getExample() != null) { + String example = m.getExample().toString(); + if (example.substring(0, 1).equals("\"") && example.substring(example.length() - 1).equals("\"")) { + m.setExample(example.substring(1, example.length() - 1)); + } + } + } + + private String resolveModelName(String title, String key) { + if (title == null) { + return uniqueName(key); + } else { + return uniqueName(title); + } + } + + public String matchGenerated(Schema model) { + if (this.skipMatches) { + return null; + } + String json = Json.pretty(model); + if (generatedSignature.containsKey(json)) { + return generatedSignature.get(json); + } + return null; + } + + public void addGenerated(String name, Schema model) { + generatedSignature.put(Json.pretty(model), name); + } + + public String uniqueName(String key) { + if (key == null) { + key = "NULL_UNIQUE_NAME"; + LOGGER.warn("null key found. Default to NULL_UNIQUE_NAME"); + } + int count = 0; + boolean done = false; + key = key.replaceAll("[^a-z_\\.A-Z0-9 ]", ""); // FIXME: a parameter + // should not be assigned. Also declare the methods parameters as 'final'. + while (!done) { + String name = key; + if (count > 0) { + name = key + "_" + count; + } + if (openapi.getComponents().getSchemas() == null) { + return name; + } else if (!openapi.getComponents().getSchemas().containsKey(name)) { + return name; + } + count += 1; + } + return key; + } + + public void flattenProperties(Map properties, String path) { + if (properties == null) { + return; + } + Map propsToUpdate = new HashMap(); + Map modelsToAdd = new HashMap(); + for (String key : properties.keySet()) { + Schema property = properties.get(key); + if (property instanceof ObjectSchema && ((ObjectSchema) property).getProperties() != null + && ((ObjectSchema) property).getProperties().size() > 0) { + ObjectSchema op = (ObjectSchema) property; + String modelName = resolveModelName(op.getTitle(), path + "_" + key); + Schema model = modelFromProperty(op, modelName); + String existing = matchGenerated(model); + if (existing != null) { + Schema schema = new Schema().$ref(existing); + schema.setRequired(op.getRequired()); + propsToUpdate.put(key, schema); + } else { + Schema schema = new Schema().$ref(modelName); + schema.setRequired(op.getRequired()); + propsToUpdate.put(key, schema); + modelsToAdd.put(modelName, model); + addGenerated(modelName, model); + openapi.getComponents().addSchemas(modelName, model); + } + } else if (property instanceof ArraySchema) { + ArraySchema ap = (ArraySchema) property; + Schema inner = ap.getItems(); + if (inner instanceof ObjectSchema) { + ObjectSchema op = (ObjectSchema) inner; + if (op.getProperties() != null && op.getProperties().size() > 0) { + flattenProperties(op.getProperties(), path); + String modelName = resolveModelName(op.getTitle(), path + "_" + key); + Schema innerModel = modelFromProperty(op, modelName); + String existing = matchGenerated(innerModel); + if (existing != null) { + Schema schema = new Schema().$ref(existing); + schema.setRequired(op.getRequired()); + ap.setItems(schema); + } else { + Schema schema = new Schema().$ref(modelName); + schema.setRequired(op.getRequired()); + ap.setItems(schema); + addGenerated(modelName, innerModel); + openapi.getComponents().addSchemas(modelName, innerModel); + } + } + } + } + if (ModelUtils.isMapSchema(property)) { + Schema inner = (Schema) property.getAdditionalProperties(); + if (inner instanceof ObjectSchema) { + ObjectSchema op = (ObjectSchema) inner; + if (op.getProperties() != null && op.getProperties().size() > 0) { + flattenProperties(op.getProperties(), path); + String modelName = resolveModelName(op.getTitle(), path + "_" + key); + Schema innerModel = modelFromProperty(op, modelName); + String existing = matchGenerated(innerModel); + if (existing != null) { + Schema schema = new Schema().$ref(existing); + schema.setRequired(op.getRequired()); + property.setAdditionalProperties(schema); + } else { + Schema schema = new Schema().$ref(modelName); + schema.setRequired(op.getRequired()); + property.setAdditionalProperties(schema); + addGenerated(modelName, innerModel); + openapi.getComponents().addSchemas(modelName, innerModel); + } + } + } + } + } + if (propsToUpdate.size() > 0) { + for (String key : propsToUpdate.keySet()) { + properties.put(key, propsToUpdate.get(key)); + } + } + for (String key : modelsToAdd.keySet()) { + openapi.getComponents().addSchemas(key, modelsToAdd.get(key)); + this.addedModels.put(key, modelsToAdd.get(key)); + } + } + + @SuppressWarnings("static-method") + public Schema modelFromProperty(ArraySchema object, @SuppressWarnings("unused") String path) { + String description = object.getDescription(); + String example = null; + Object obj = object.getExample(); + + if (obj != null) { + example = obj.toString(); + } + Schema inner = object.getItems(); + if (inner instanceof ObjectSchema) { + ArraySchema model = new ArraySchema(); + model.setDescription(description); + model.setExample(example); + model.setItems(object.getItems()); + model.setName(object.getName()); + return model; + } + return null; + } + + public Schema modelFromProperty(ObjectSchema object, String path) { + String description = object.getDescription(); + String example = null; + Object obj = object.getExample(); + if (obj != null) { + example = obj.toString(); + } + XML xml = object.getXml(); + Map properties = object.getProperties(); + Schema model = new Schema(); + model.setDescription(description); + model.setExample(example); + model.setName(object.getName()); + model.setXml(xml); + if (properties != null) { + flattenProperties(properties, path); + model.setProperties(properties); + } + return model; + } + + @SuppressWarnings("static-method") + public Schema modelFromProperty(MapSchema object, @SuppressWarnings("unused") String path) { + String description = object.getDescription(); + String example = null; + Object obj = object.getExample(); + if (obj != null) { + example = obj.toString(); + } + ArraySchema model = new ArraySchema(); + model.setDescription(description); + model.setName(object.getName()); + model.setExample(example); + model.setItems((Schema) object.getAdditionalProperties()); + return model; + } + + /** + * Make a Schema + * + * @param ref new property name + * @param property Schema + * @return {@link Schema} A constructed OpenAPI property + */ + public Schema makeSchema(String ref, Schema property) { + Schema newProperty = new Schema().$ref(ref); + this.copyVendorExtensions(property, newProperty); + return newProperty; + } + + /** + * Copy vendor extensions from Model to another Model + * + * @param source source property + * @param target target property + */ + + public void copyVendorExtensions(Schema source, Schema target) { + Map vendorExtensions = source.getExtensions(); + for (String extName : vendorExtensions.keySet()) { + target.addExtension(extName, vendorExtensions.get(extName)); + } + } + + public boolean isSkipMatches() { + return skipMatches; + } + + public void setSkipMatches(boolean skipMatches) { + this.skipMatches = skipMatches; + } +} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/config/CodegenConfigurator.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/config/CodegenConfigurator.java index e787821cdd9c..8ec858f2bfb6 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/config/CodegenConfigurator.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/config/CodegenConfigurator.java @@ -596,12 +596,12 @@ public class CodegenConfigurator implements Serializable { return; } LOGGER.info("\nVERBOSE MODE: ON. Additional debug options are injected" + - "\n - [debugSwagger] prints the openapi specification as interpreted by the codegen" + + "\n - [debugOpenAPI] prints the OpenAPI specification as interpreted by the codegen" + "\n - [debugModels] prints models passed to the template engine" + "\n - [debugOperations] prints operations passed to the template engine" + "\n - [debugSupportingFiles] prints additional data passed to the template engine"); - System.setProperty("debugSwagger", ""); + System.setProperty("debugOpenAPI", ""); System.setProperty("debugModels", ""); System.setProperty("debugOperations", ""); System.setProperty("debugSupportingFiles", ""); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCSharpCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCSharpCodegen.java index c56f2c9423c8..023f6f51e12e 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCSharpCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCSharpCodegen.java @@ -19,6 +19,7 @@ package org.openapitools.codegen.languages; import com.google.common.collect.ImmutableMap; import com.samskivert.mustache.Mustache; +import io.swagger.v3.core.util.Json; import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.*; import org.openapitools.codegen.utils.*; @@ -713,12 +714,22 @@ public abstract class AbstractCSharpCodegen extends DefaultCodegen implements Co return p.getDefault().toString(); } } else if (ModelUtils.isDateSchema(p)) { - // TODO + if (p.getDefault() != null) { + return "\"" + p.getDefault().toString() + "\""; + } } else if (ModelUtils.isDateTimeSchema(p)) { - // TODO + if (p.getDefault() != null) { + return "\"" + p.getDefault().toString() + "\""; + } } else if (ModelUtils.isNumberSchema(p)) { if (p.getDefault() != null) { - return p.getDefault().toString(); + if (ModelUtils.isFloatSchema(p)) { // float + return p.getDefault().toString() + "F"; + } else if (ModelUtils.isDoubleSchema(p)) { // double + return p.getDefault().toString() + "D"; + } else { + return p.getDefault().toString(); + } } } else if (ModelUtils.isIntegerSchema(p)) { if (p.getDefault() != null) { @@ -961,4 +972,48 @@ public abstract class AbstractCSharpCodegen extends DefaultCodegen implements Co public String escapeUnsafeCharacters(String input) { return input.replace("*/", "*_/").replace("/*", "/_*").replace("--", "- -"); } + + @Override + public boolean isDataTypeString(String dataType) { + // also treat double/decimal/float as "string" in enum so that the values (e.g. 2.8) get double-quoted + return "String".equalsIgnoreCase(dataType) || "double?".equals(dataType) || "decimal?".equals(dataType) || "float?".equals(dataType); + } + + @Override + public void setParameterExampleValue(CodegenParameter codegenParameter) { + + // set the example value + // if not specified in x-example, generate a default value + // TODO need to revise how to obtain the example value + if (codegenParameter.vendorExtensions != null && codegenParameter.vendorExtensions.containsKey("x-example")) { + codegenParameter.example = Json.pretty(codegenParameter.vendorExtensions.get("x-example")); + } else if (Boolean.TRUE.equals(codegenParameter.isBoolean)) { + codegenParameter.example = "true"; + } else if (Boolean.TRUE.equals(codegenParameter.isLong)) { + codegenParameter.example = "789"; + } else if (Boolean.TRUE.equals(codegenParameter.isInteger)) { + codegenParameter.example = "56"; + } else if (Boolean.TRUE.equals(codegenParameter.isFloat)) { + codegenParameter.example = "3.4F"; + } else if (Boolean.TRUE.equals(codegenParameter.isDouble)) { + codegenParameter.example = "1.2D"; + } else if (Boolean.TRUE.equals(codegenParameter.isNumber)) { + codegenParameter.example = "8.14"; + } else if (Boolean.TRUE.equals(codegenParameter.isBinary)) { + codegenParameter.example = "BINARY_DATA_HERE"; + } else if (Boolean.TRUE.equals(codegenParameter.isByteArray)) { + codegenParameter.example = "BYTE_ARRAY_DATA_HERE"; + } else if (Boolean.TRUE.equals(codegenParameter.isFile)) { + codegenParameter.example = "/path/to/file.txt"; + } else if (Boolean.TRUE.equals(codegenParameter.isDate)) { + codegenParameter.example = "2013-10-20"; + } else if (Boolean.TRUE.equals(codegenParameter.isDateTime)) { + codegenParameter.example = "2013-10-20T19:20:30+01:00"; + } else if (Boolean.TRUE.equals(codegenParameter.isUuid)) { + codegenParameter.example = "38400000-8cf0-11bd-b23e-10b96e4ef00d"; + } else if (Boolean.TRUE.equals(codegenParameter.isString)) { + codegenParameter.example = codegenParameter.paramName + "_example"; + } + + } } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCppCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCppCodegen.java index c53021a7534b..22f49a37e143 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCppCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCppCodegen.java @@ -19,13 +19,17 @@ package org.openapitools.codegen.languages; import io.swagger.v3.oas.models.media.Schema; +import com.google.common.collect.ImmutableMap; +import com.samskivert.mustache.Mustache; import org.openapitools.codegen.CodegenConfig; import org.openapitools.codegen.CodegenProperty; import org.openapitools.codegen.DefaultCodegen; +import org.openapitools.codegen.mustache.IndentedLambda; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.util.Arrays; +import java.util.Map; abstract public class AbstractCppCodegen extends DefaultCodegen implements CodegenConfig { private static final Logger LOGGER = LoggerFactory.getLogger(AbstractCppCodegen.class); @@ -242,4 +246,23 @@ abstract public class AbstractCppCodegen extends DefaultCodegen implements Codeg public String getTypeDeclaration(String str) { return "std::shared_ptr<" + toModelName(str) + ">"; } + + public void processOpts() { + super.processOpts(); + addMustacheLambdas(additionalProperties); + } + + private void addMustacheLambdas(Map objs) { + + Map lambdas = new ImmutableMap.Builder() + .put("multiline_comment_4", new IndentedLambda(4, " ", "///")) + .build(); + + if (objs.containsKey("lambda")) { + LOGGER.warn("A property named 'lambda' already exists. Mustache lambdas renamed from 'lambda' to '_lambda'."); + objs.put("_lambda", lambdas); + } else { + objs.put("lambda", lambdas); + } + } } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpClientCodegen.java index 5420fdf6b620..0e493b932861 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpClientCodegen.java @@ -603,11 +603,11 @@ public class CSharpClientCodegen extends AbstractCSharpCodegen { } /* - * The pattern spec follows the Perl convention and style of modifiers. .NET - * does not support this syntax directly so we need to convert the pattern to a .NET compatible - * format and apply modifiers in a compatible way. - * See https://msdn.microsoft.com/en-us/library/yd1hzczs(v=vs.110).aspx for .NET options. - */ + * The pattern spec follows the Perl convention and style of modifiers. .NET + * does not support this syntax directly so we need to convert the pattern to a .NET compatible + * format and apply modifiers in a compatible way. + * See https://msdn.microsoft.com/en-us/library/yd1hzczs(v=vs.110).aspx for .NET options. + */ public void postProcessPattern(String pattern, Map vendorExtensions) { if (pattern != null) { int i = pattern.lastIndexOf('/'); @@ -707,7 +707,7 @@ public class CSharpClientCodegen extends AbstractCSharpCodegen { } // number - if(datatype.startsWith("int") || datatype.startsWith("long") || + if (datatype.startsWith("int") || datatype.startsWith("long") || datatype.startsWith("double") || datatype.startsWith("float")) { String varName = "NUMBER_" + value; varName = varName.replaceAll("-", "MINUS_"); @@ -751,13 +751,18 @@ public class CSharpClientCodegen extends AbstractCSharpCodegen { public String getNameUsingModelPropertyNaming(String name) { switch (CodegenConstants.MODEL_PROPERTY_NAMING_TYPE.valueOf(getModelPropertyNaming())) { - case original: return name; - case camelCase: return camelize(name, true); - case PascalCase: return camelize(name); - case snake_case: return underscore(name); - default: throw new IllegalArgumentException("Invalid model property naming '" + - name + "'. Must be 'original', 'camelCase', " + - "'PascalCase' or 'snake_case'"); + case original: + return name; + case camelCase: + return camelize(name, true); + case PascalCase: + return camelize(name); + case snake_case: + return underscore(name); + default: + throw new IllegalArgumentException("Invalid model property naming '" + + name + "'. Must be 'original', 'camelCase', " + + "'PascalCase' or 'snake_case'"); } } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ConfluenceWikiCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ConfluenceWikiCodegen.java index 965d7b70207c..b9243aaa2600 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ConfluenceWikiCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ConfluenceWikiCodegen.java @@ -60,9 +60,9 @@ public class ConfluenceWikiCodegen extends DefaultCodegen implements CodegenConf cliOptions.add(new CliOption(CodegenConstants.ARTIFACT_VERSION, CodegenConstants.ARTIFACT_VERSION_DESC)); additionalProperties.put("appName", "OpenAPI Sample"); - additionalProperties.put("appDescription", "A sample openapi server"); - additionalProperties.put("infoUrl", "https://helloreverb.com"); - additionalProperties.put("infoEmail", "hello@helloreverb.com"); + additionalProperties.put("appDescription", "A sample OpenAPI server"); + additionalProperties.put("infoUrl", "https://openapi-generator.tech"); + additionalProperties.put("infoEmail", "team@openapitools.org"); additionalProperties.put("licenseInfo", "All rights reserved"); additionalProperties.put("licenseUrl", "http://apache.org/licenses/LICENSE-2.0.html"); additionalProperties.put(CodegenConstants.INVOKER_PACKAGE, invokerPackage); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppRestSdkClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppRestSdkClientCodegen.java index e631fed98927..df0e6722863d 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppRestSdkClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppRestSdkClientCodegen.java @@ -139,6 +139,7 @@ public class CppRestSdkClientCodegen extends AbstractCppCodegen { supportingFiles.add(new SupportingFile("gitignore.mustache", "", ".gitignore")); supportingFiles.add(new SupportingFile("git_push.sh.mustache", "", "git_push.sh")); supportingFiles.add(new SupportingFile("cmake-lists.mustache", "", "CMakeLists.txt")); + supportingFiles.add(new SupportingFile("README.mustache", "", "README.md")); languageSpecificPrimitives = new HashSet( Arrays.asList("int", "char", "bool", "long", "float", "double", "int32_t", "int64_t")); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaJAXRSSpecServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaJAXRSSpecServerCodegen.java index 07f38793d039..3a7cb617d13e 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaJAXRSSpecServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaJAXRSSpecServerCodegen.java @@ -18,13 +18,12 @@ package org.openapitools.codegen.languages; import io.swagger.v3.oas.models.Operation; - +import io.swagger.v3.oas.models.media.Schema; import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.CliOption; import org.openapitools.codegen.CodegenConstants; import org.openapitools.codegen.CodegenModel; import org.openapitools.codegen.CodegenOperation; -import org.openapitools.codegen.CodegenProperty; import org.openapitools.codegen.SupportingFile; import java.io.File; @@ -38,10 +37,16 @@ public class JavaJAXRSSpecServerCodegen extends AbstractJavaJAXRSServerCodegen { public static final String INTERFACE_ONLY = "interfaceOnly"; public static final String RETURN_RESPONSE = "returnResponse"; public static final String GENERATE_POM = "generatePom"; + public static final String USE_SWAGGER_ANNOTATIONS = "useSwaggerAnnotations"; + public static final String JACKSON = "jackson"; private boolean interfaceOnly = false; private boolean returnResponse = false; private boolean generatePom = true; + private boolean useSwaggerAnnotations = true; + private boolean useJackson = false; + + private String primaryResourceName; public JavaJAXRSSpecServerCodegen() { super(); @@ -90,6 +95,7 @@ public class JavaJAXRSSpecServerCodegen extends AbstractJavaJAXRSServerCodegen { cliOptions.add(CliOption.newBoolean(GENERATE_POM, "Whether to generate pom.xml if the file does not already exist.").defaultValue(String.valueOf(generatePom))); cliOptions.add(CliOption.newBoolean(INTERFACE_ONLY, "Whether to generate only API interface stubs without the server files.").defaultValue(String.valueOf(interfaceOnly))); cliOptions.add(CliOption.newBoolean(RETURN_RESPONSE, "Whether generate API interface should return javax.ws.rs.core.Response instead of a deserialized entity. Only useful if interfaceOnly is true.").defaultValue(String.valueOf(returnResponse))); + cliOptions.add(CliOption.newBoolean(USE_SWAGGER_ANNOTATIONS, "Whether to generate Swagger annotations.", useSwaggerAnnotations)); } @Override @@ -109,6 +115,13 @@ public class JavaJAXRSSpecServerCodegen extends AbstractJavaJAXRSServerCodegen { additionalProperties.remove(RETURN_RESPONSE); } } + if (additionalProperties.containsKey(USE_SWAGGER_ANNOTATIONS)) { + useSwaggerAnnotations = Boolean.valueOf(additionalProperties.get(USE_SWAGGER_ANNOTATIONS).toString()); + } + writePropertyBack(USE_SWAGGER_ANNOTATIONS, useSwaggerAnnotations); + + useJackson = convertPropertyToBoolean(JACKSON); + if (interfaceOnly) { // Change default artifactId if genereating interfaces only, before command line options are applied in base class. artifactId = "openapi-jaxrs-client"; @@ -148,32 +161,44 @@ public class JavaJAXRSSpecServerCodegen extends AbstractJavaJAXRSServerCodegen { basePath = basePath.substring(0, pos); } + String operationKey = basePath; if (StringUtils.isEmpty(basePath)) { - basePath = "default"; + basePath = tag; + operationKey = ""; + primaryResourceName = tag; + } else if (basePath.matches("\\{.*\\}")) { + basePath = tag; + operationKey = ""; + co.subresourceOperation = true; } else { if (co.path.startsWith("/" + basePath)) { co.path = co.path.substring(("/" + basePath).length()); } co.subresourceOperation = !co.path.isEmpty(); } - List opList = operations.get(basePath); + List opList = operations.get(operationKey); if (opList == null || opList.isEmpty()) { opList = new ArrayList(); - operations.put(basePath, opList); + operations.put(operationKey, opList); } opList.add(co); co.baseName = basePath; } @Override - public void postProcessModelProperty(CodegenModel model, CodegenProperty property) { - super.postProcessModelProperty(model, property); - model.imports.remove("ApiModelProperty"); - model.imports.remove("ApiModel"); - model.imports.remove("JsonSerialize"); - model.imports.remove("ToStringSerializer"); - model.imports.remove("JsonValue"); - model.imports.remove("JsonProperty"); + public CodegenModel fromModel(String name, Schema model, Map allDefinitions) { + CodegenModel codegenModel = super.fromModel(name, model, allDefinitions); + if (!useSwaggerAnnotations) { + codegenModel.imports.remove("ApiModelProperty"); + codegenModel.imports.remove("ApiModel"); + } + if (!useJackson) { + codegenModel.imports.remove("JsonSerialize"); + codegenModel.imports.remove("ToStringSerializer"); + codegenModel.imports.remove("JsonValue"); + codegenModel.imports.remove("JsonProperty"); + } + return codegenModel; } @Override @@ -186,4 +211,14 @@ public class JavaJAXRSSpecServerCodegen extends AbstractJavaJAXRSServerCodegen { public String getHelp() { return "Generates a Java JAXRS Server according to JAXRS 2.0 specification."; } + + @Override + public String toApiName(final String name) { + String computed = name; + if (computed.length() == 0) { + return primaryResourceName + "Api"; + } + computed = sanitizeName(computed); + return camelize(computed) + "Api"; + } } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptClientCodegen.java index ca6433b5ca92..0bbefee3bed3 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptClientCodegen.java @@ -837,6 +837,13 @@ public class JavascriptClientCodegen extends DefaultCodegen implements CodegenCo return newOperationId; } + // operationId starts with a number + if (operationId.matches("^\\d.*")) { + String newOperationId = camelize("call_" + operationId, true); + LOGGER.warn(operationId + " (starting with a number) cannot be used as method name. Renamed to " + newOperationId); + return newOperationId; + } + return operationId; } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpLaravelServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpLaravelServerCodegen.java index 0d4f91181de6..ed9215d40101 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpLaravelServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpLaravelServerCodegen.java @@ -17,31 +17,13 @@ package org.openapitools.codegen.languages; -import io.swagger.models.properties.*; -import io.swagger.v3.oas.models.*; -import io.swagger.v3.oas.models.media.*; -import io.swagger.v3.oas.models.parameters.*; import org.openapitools.codegen.*; import java.io.File; import java.util.*; -import io.swagger.v3.oas.models.media.*; -import io.swagger.v3.oas.models.PathItem; -import io.swagger.v3.oas.models.PathItem.HttpMethod; -import io.swagger.v3.oas.models.*; -import io.swagger.v3.oas.models.parameters.*; -import io.swagger.v3.core.util.Yaml; - -import org.apache.commons.lang3.StringUtils; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - - public class PhpLaravelServerCodegen extends AbstractPhpCodegen { - @SuppressWarnings("hiding") protected String apiVersion = "1.0.0"; - protected String variableNamingConvention = "camelCase"; /** * Configures the type of generator. @@ -80,6 +62,7 @@ public class PhpLaravelServerCodegen extends AbstractPhpCodegen { super(); embeddedTemplateDir = templateDir = "php-laravel"; + variableNamingConvention = "camelCase"; /* * packPath diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientCodegen.java index 0789d6260d57..eed683f061c4 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientCodegen.java @@ -165,7 +165,7 @@ public class PythonClientCodegen extends DefaultCodegen implements CodegenConfig supportedLibraries.put("urllib3", "urllib3-based client"); supportedLibraries.put("asyncio", "Asyncio-based client (python 3.5+)"); supportedLibraries.put("tornado", "tornado-based client"); - CliOption libraryOption = new CliOption(CodegenConstants.LIBRARY, "library template (sub-template) to use"); + CliOption libraryOption = new CliOption(CodegenConstants.LIBRARY, "library template (sub-template) to use: asyncio, tornado, urllib3"); libraryOption.setDefault(DEFAULT_LIBRARY); cliOptions.add(libraryOption); setLibrary(DEFAULT_LIBRARY); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/StaticDocCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/StaticDocCodegen.java index 5067f039a9ab..56ff29d0f8e2 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/StaticDocCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/StaticDocCodegen.java @@ -43,7 +43,7 @@ public class StaticDocCodegen extends DefaultCodegen implements CodegenConfig { outputFolder = "docs"; modelTemplateFiles.put("model.mustache", ".html"); apiTemplateFiles.put("operation.mustache", ".html"); - embeddedTemplateDir = templateDir = "swagger-static"; + embeddedTemplateDir = templateDir = "openapi-static"; cliOptions.add(new CliOption(CodegenConstants.INVOKER_PACKAGE, CodegenConstants.INVOKER_PACKAGE_DESC)); cliOptions.add(new CliOption(CodegenConstants.GROUP_ID, CodegenConstants.GROUP_ID_DESC)); @@ -94,8 +94,8 @@ public class StaticDocCodegen extends DefaultCodegen implements CodegenConfig { } @Override - public String escapeReservedWord(String name) { - if(this.reservedWordsMappings().containsKey(name)) { + public String escapeReservedWord(String name) { + if (this.reservedWordsMappings().containsKey(name)) { return this.reservedWordsMappings().get(name); } return "_" + name; @@ -121,5 +121,5 @@ public class StaticDocCodegen extends DefaultCodegen implements CodegenConfig { public String escapeUnsafeCharacters(String input) { // just return the original string return input; - } + } } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/StaticHtml2Generator.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/StaticHtml2Generator.java index 37fda7e0b9b2..32e198a16529 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/StaticHtml2Generator.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/StaticHtml2Generator.java @@ -82,9 +82,9 @@ public class StaticHtml2Generator extends DefaultCodegen implements CodegenConfi cliOptions.add(new CliOption(CodegenConstants.ARTIFACT_VERSION, CodegenConstants.ARTIFACT_VERSION_DESC)); additionalProperties.put("appName", "OpenAPI Sample"); - additionalProperties.put("appDescription", "A sample openapi server"); + additionalProperties.put("appDescription", "A sample OpenAPI server"); additionalProperties.put("infoUrl", "https://openapi-generator.tech"); - additionalProperties.put("infoEmail", "contributors@openapitools.org"); + additionalProperties.put("infoEmail", "team@openapitools.org"); additionalProperties.put("licenseInfo", "All rights reserved"); additionalProperties.put("licenseUrl", "http://apache.org/licenses/LICENSE-2.0.html"); additionalProperties.put(CodegenConstants.INVOKER_PACKAGE, invokerPackage); @@ -180,7 +180,7 @@ public class StaticHtml2Generator extends DefaultCodegen implements CodegenConfi Map vendorExtensions = openAPI.getExtensions(); if (vendorExtensions != null) { - for(Map.Entry vendorExtension: vendorExtensions.entrySet()) { + for (Map.Entry vendorExtension : vendorExtensions.entrySet()) { // Vendor extensions could be Maps (objects). If we wanted to iterate through them in our template files // without knowing the keys beforehand, the default `toString` method renders them unusable. Instead, we // convert them to JSON strings now, which means we can easily use them later. diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/StaticHtmlGenerator.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/StaticHtmlGenerator.java index eb37f69b4538..feaac9dbc5db 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/StaticHtmlGenerator.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/StaticHtmlGenerator.java @@ -69,9 +69,9 @@ public class StaticHtmlGenerator extends DefaultCodegen implements CodegenConfig cliOptions.add(new CliOption(CodegenConstants.ARTIFACT_VERSION, CodegenConstants.ARTIFACT_VERSION_DESC)); additionalProperties.put("appName", "OpenAPI Sample"); - additionalProperties.put("appDescription", "A sample openapi server"); - additionalProperties.put("infoUrl", "https://helloreverb.com"); - additionalProperties.put("infoEmail", "hello@helloreverb.com"); + additionalProperties.put("appDescription", "A sample OpenAPI server"); + additionalProperties.put("infoUrl", "https//openapi-generator.tech"); + additionalProperties.put("infoEmail", "team@openapitools.org"); additionalProperties.put("licenseInfo", "All rights reserved"); additionalProperties.put("licenseUrl", "http://apache.org/licenses/LICENSE-2.0.html"); additionalProperties.put(CodegenConstants.INVOKER_PACKAGE, invokerPackage); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/mustache/IndentedLambda.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/mustache/IndentedLambda.java index d1b0b38266f5..66873c311c1b 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/mustache/IndentedLambda.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/mustache/IndentedLambda.java @@ -43,13 +43,14 @@ import java.io.Writer; */ public class IndentedLambda implements Mustache.Lambda { private final int prefixSpaceCount; + private final String prefix; private int spaceCode; /** * Constructs a new instance of {@link IndentedLambda}, with an indent count of 4 spaces */ public IndentedLambda() { - this(4, " "); + this(4, " ", null); } /** @@ -59,15 +60,38 @@ public class IndentedLambda implements Mustache.Lambda { * @param indentionCharacter String representation of the character used in the indent (e.g. " ", "\t", "."). */ public IndentedLambda(int prefixSpaceCount, String indentionCharacter) { - this(prefixSpaceCount, Character.codePointAt(indentionCharacter, 0)); + this(prefixSpaceCount, Character.codePointAt(indentionCharacter, 0), null); + } + + /** + * Constructs a new instance of {@link IndentedLambda}, with customized indent count and intention character + * + * @param prefixSpaceCount The number of indented characters to apply as a prefix to a fragment. + * @param indentionCharacter String representation of the character used in the indent (e.g. " ", "\t", "."). + * @param prefix An optional prefix to prepend before the line (useful for multi-line comments). + */ + public IndentedLambda(int prefixSpaceCount, String indentionCharacter, String prefix) { + this(prefixSpaceCount, Character.codePointAt(indentionCharacter, 0), prefix); } /** * Constructs a new instance of {@link IndentedLambda} * * @param prefixSpaceCount The number of indented characters to apply as a prefix to a fragment. + * @param indentionCodePoint Code point of the single character used for indentation. */ private IndentedLambda(int prefixSpaceCount, int indentionCodePoint) { + this(prefixSpaceCount, indentionCodePoint, null); + } + + /** + * Constructs a new instance of {@link IndentedLambda} + * + * @param prefixSpaceCount The number of indented characters to apply as a prefix to a fragment. + * @param indentionCodePoint Code point of the single character used for indentation. + * @param prefix An optional prefix to prepend before the line (useful for multi-line comments). + */ + private IndentedLambda(int prefixSpaceCount, int indentionCodePoint, String prefix) { if (prefixSpaceCount <= 0) { throw new IllegalArgumentException("prefixSpaceCount must be greater than 0"); } @@ -78,6 +102,7 @@ public class IndentedLambda implements Mustache.Lambda { this.prefixSpaceCount = prefixSpaceCount; this.spaceCode = indentionCodePoint; + this.prefix = prefix; } @Override @@ -96,6 +121,7 @@ public class IndentedLambda implements Mustache.Lambda { // So, we want to skip the first line. if (i > 0) { sb.append(prefixedIndention); + if (prefix != null) sb.append(prefix); } sb.append(line); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/ModelUtils.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/ModelUtils.java index 2bb6481c49cb..c5afa2dd8b18 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/ModelUtils.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/ModelUtils.java @@ -648,7 +648,7 @@ public class ModelUtils { } else if (isStringSchema(ref) && (ref.getEnum() != null && !ref.getEnum().isEmpty())) { // top-level enum class return schema; - } else if (isMapSchema(ref) || isArraySchema(ref)) { // map/array def should be created as models + } else if (isMapSchema(ref) || isArraySchema(ref) || isComposedSchema(ref)) { // map/array def should be created as models return schema; } else { return unaliasSchema(allSchemas, allSchemas.get(ModelUtils.getSimpleRef(schema.get$ref()))); diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/rest-assured/ApiClient.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/rest-assured/ApiClient.mustache index 184dc13e05c0..cf8d5c45ba24 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/rest-assured/ApiClient.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/rest-assured/ApiClient.mustache @@ -6,22 +6,20 @@ import {{apiPackage}}.*; {{#imports}}import {{import}}; {{/imports}} - {{^fullJavaUtil}} -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import io.restassured.RestAssured; import io.restassured.builder.RequestSpecBuilder; -import io.restassured.builder.ResponseSpecBuilder; -import io.restassured.response.Response; import java.util.function.Consumer; -import java.util.function.Function; import java.util.function.Supplier; + +import static io.restassured.config.ObjectMapperConfig.objectMapperConfig; +import static io.restassured.config.RestAssuredConfig.config; +import static org.openapitools.client.GsonObjectMapper.gson; {{/fullJavaUtil}} public class ApiClient { + {{#basePath}} + public static final String BASE_URI = "{{basePath}}"; + {{/basePath}} private final Config config; @@ -42,7 +40,9 @@ public class ApiClient { {{/apiInfo}} public static class Config { - private Supplier baseReqSpec; + private Supplier baseReqSpec = () -> new RequestSpecBuilder() + {{#basePath}}.setBaseUri(BASE_URI){{/basePath}} + .setConfig(config().objectMapperConfig(objectMapperConfig().defaultObjectMapper(gson()))); /** * Use common specification for all operations diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/rest-assured/api.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/rest-assured/api.mustache index 3a0d2c78d9fc..1f400d0efa19 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/rest-assured/api.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/rest-assured/api.mustache @@ -15,7 +15,9 @@ import java.util.Map; import io.restassured.RestAssured; import io.restassured.builder.RequestSpecBuilder; import io.restassured.builder.ResponseSpecBuilder; +import io.restassured.http.Method; import io.restassured.response.Response; +import io.swagger.annotations.*; import java.lang.reflect.Type; import java.util.function.Consumer; @@ -41,6 +43,15 @@ public class {{classname}} { {{#operations}} {{#operation}} + @ApiOperation(value = "{{{summary}}}", notes = "{{{notes}}}"{{#hasAuthMethods}}, authorizations = { + {{#authMethods}}@Authorization(value = "{{name}}"{{#isOAuth}}, scopes = { + {{#scopes}}@AuthorizationScope(scope = "{{scope}}", description = "{{description}}"){{#hasMore}}, + {{/hasMore}}{{/scopes}} + }{{/isOAuth}}){{#hasMore}}, + {{/hasMore}}{{/authMethods}} + }{{/hasAuthMethods}}, tags={ {{#tags}}{{#name}}"{{{name}}}"{{/name}}{{^-last}}, {{/-last}}{{/tags}} }) + @ApiResponses(value = { {{#responses}} + @ApiResponse(code = {{{code}}}, message = "{{{message}}}") {{#hasMore}},{{/hasMore}}{{/responses}} }) {{#isDeprecated}} @Deprecated {{/isDeprecated}} @@ -83,29 +94,14 @@ public class {{classname}} { {{#isDeprecated}} @Deprecated {{/isDeprecated}} - public class {{operationIdCamelCase}}Oper { + public static class {{operationIdCamelCase}}Oper { - public static final String REQ_METHOD = "{{httpMethod}}"; + public static final Method REQ_METHOD = {{httpMethod}}; public static final String REQ_URI = "{{path}}"; - public static final String SUMMARY = "{{{summary}}}"; private RequestSpecBuilder reqSpec; - private ResponseSpecBuilder respSpec; - public {{operationIdCamelCase}}Oper() { - this.reqSpec = new RequestSpecBuilder(); - {{#vendorExtensions}} - {{#x-contentType}} - reqSpec.setContentType("{{x-contentType}}"); - {{/x-contentType}} - {{#x-accepts}} - reqSpec.setAccept("{{x-accepts}}"); - {{/x-accepts}} - {{/vendorExtensions}} - this.respSpec = new ResponseSpecBuilder(); - } - public {{operationIdCamelCase}}Oper(RequestSpecBuilder reqSpec) { this.reqSpec = reqSpec; {{#vendorExtensions}} @@ -126,7 +122,7 @@ public class {{classname}} { * @return type */ public T execute(Function handler) { - return handler.apply(RestAssured.given().spec(reqSpec.build()).expect().spec(respSpec.build()).when().request({{httpMethod}}, REQ_URI)); + return handler.apply(RestAssured.given().spec(reqSpec.build()).expect().spec(respSpec.build()).when().request(REQ_METHOD, REQ_URI)); } {{#returnType}} diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/api.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/api.mustache index f05b0a4073f3..8e52be4099b1 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/api.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/api.mustache @@ -6,7 +6,9 @@ package {{package}}; import javax.ws.rs.*; import javax.ws.rs.core.Response; +{{#useSwaggerAnnotations}} import io.swagger.annotations.*; +{{/useSwaggerAnnotations}} import java.io.InputStream; import java.util.Map; @@ -14,8 +16,8 @@ import java.util.List; {{#useBeanValidation}}import javax.validation.constraints.*; import javax.validation.Valid;{{/useBeanValidation}} -@Path("/{{{baseName}}}") -@Api(description = "the {{{baseName}}} API"){{#hasConsumes}} +@Path("/{{{baseName}}}"){{#useSwaggerAnnotations}} +@Api(description = "the {{{baseName}}} API"){{/useSwaggerAnnotations}}{{#hasConsumes}} @Consumes({ {{#consumes}}"{{{mediaType}}}"{{#hasMore}}, {{/hasMore}}{{/consumes}} }){{/hasConsumes}}{{#hasProduces}} @Produces({ {{#produces}}"{{{mediaType}}}"{{#hasMore}}, {{/hasMore}}{{/produces}} }){{/hasProduces}} {{>generatedAnnotation}}public {{#interfaceOnly}}interface{{/interfaceOnly}}{{^interfaceOnly}}class{{/interfaceOnly}} {{classname}} { diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/apiInterface.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/apiInterface.mustache index 0463921182e2..35ecd8e9476a 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/apiInterface.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/apiInterface.mustache @@ -1,7 +1,7 @@ @{{httpMethod}}{{#subresourceOperation}} @Path("{{{path}}}"){{/subresourceOperation}}{{#hasConsumes}} @Consumes({ {{#consumes}}"{{{mediaType}}}"{{#hasMore}}, {{/hasMore}}{{/consumes}} }){{/hasConsumes}}{{#hasProduces}} - @Produces({ {{#produces}}"{{{mediaType}}}"{{#hasMore}}, {{/hasMore}}{{/produces}} }){{/hasProduces}} + @Produces({ {{#produces}}"{{{mediaType}}}"{{#hasMore}}, {{/hasMore}}{{/produces}} }){{/hasProduces}}{{#useSwaggerAnnotations}} @ApiOperation(value = "{{{summary}}}", notes = "{{{notes}}}"{{#hasAuthMethods}}, authorizations = { {{#authMethods}}@Authorization(value = "{{name}}"{{#isOAuth}}, scopes = { {{#scopes}}@AuthorizationScope(scope = "{{scope}}", description = "{{description}}"){{#hasMore}}, @@ -10,5 +10,5 @@ {{/hasMore}}{{/authMethods}} }{{/hasAuthMethods}}, tags={ {{#vendorExtensions.x-tags}}"{{tag}}"{{#hasMore}}, {{/hasMore}}{{/vendorExtensions.x-tags}} }) @ApiResponses(value = { {{#responses}} - @ApiResponse(code = {{{code}}}, message = "{{{message}}}", response = {{{baseType}}}.class{{#returnContainer}}, responseContainer = "{{{returnContainer}}}"{{/returnContainer}}){{#hasMore}},{{/hasMore}}{{/responses}} }) + @ApiResponse(code = {{{code}}}, message = "{{{message}}}", response = {{{baseType}}}.class{{#returnContainer}}, responseContainer = "{{{returnContainer}}}"{{/returnContainer}}){{#hasMore}},{{/hasMore}}{{/responses}} }){{/useSwaggerAnnotations}} {{#returnResponse}}Response{{/returnResponse}}{{^returnResponse}}{{>returnTypeInterface}}{{/returnResponse}} {{nickname}}({{#allParams}}{{>queryParams}}{{>pathParams}}{{>headerParams}}{{>bodyParams}}{{>formParams}}{{#hasMore}},{{/hasMore}}{{/allParams}}); \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/apiMethod.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/apiMethod.mustache index 01ac3fc907d1..28d674fdd4f2 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/apiMethod.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/apiMethod.mustache @@ -1,7 +1,7 @@ @{{httpMethod}}{{#subresourceOperation}} @Path("{{{path}}}"){{/subresourceOperation}}{{#hasConsumes}} @Consumes({ {{#consumes}}"{{{mediaType}}}"{{#hasMore}}, {{/hasMore}}{{/consumes}} }){{/hasConsumes}}{{#hasProduces}} - @Produces({ {{#produces}}"{{{mediaType}}}"{{#hasMore}}, {{/hasMore}}{{/produces}} }){{/hasProduces}} + @Produces({ {{#produces}}"{{{mediaType}}}"{{#hasMore}}, {{/hasMore}}{{/produces}} }){{/hasProduces}}{{#useSwaggerAnnotations}} @ApiOperation(value = "{{{summary}}}", notes = "{{{notes}}}", response = {{{returnBaseType}}}.class{{#returnContainer}}, responseContainer = "{{{returnContainer}}}"{{/returnContainer}}{{#hasAuthMethods}}, authorizations = { {{#authMethods}}@Authorization(value = "{{name}}"{{#isOAuth}}, scopes = { {{#scopes}}@AuthorizationScope(scope = "{{scope}}", description = "{{description}}"){{#hasMore}}, @@ -11,7 +11,7 @@ }{{/hasAuthMethods}}, tags={ {{#vendorExtensions.x-tags}}"{{tag}}"{{#hasMore}}, {{/hasMore}}{{/vendorExtensions.x-tags}} }) @ApiResponses(value = { {{#responses}} @ApiResponse(code = {{{code}}}, message = "{{{message}}}", response = {{{baseType}}}.class{{#containerType}}, responseContainer = "{{{containerType}}}"{{/containerType}}){{#hasMore}},{{/hasMore}}{{/responses}} - }) + }){{/useSwaggerAnnotations}} public Response {{nickname}}({{#allParams}}{{>queryParams}}{{>pathParams}}{{>headerParams}}{{>bodyParams}}{{>formParams}}{{#hasMore}},{{/hasMore}}{{/allParams}}) { return Response.ok().entity("magic!").build(); } \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/headerParams.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/headerParams.mustache index bf377adbd4d8..63c1772c3c06 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/headerParams.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/headerParams.mustache @@ -1 +1 @@ -{{#isHeaderParam}}@HeaderParam("{{baseName}}"){{#useBeanValidation}}{{>beanValidationQueryParams}}{{/useBeanValidation}}{{#defaultValue}} @DefaultValue("{{{defaultValue}}}"){{/defaultValue}} {{#description}} @ApiParam("{{description}}"){{/description}} {{{dataType}}} {{paramName}}{{/isHeaderParam}} \ No newline at end of file +{{#isHeaderParam}}@HeaderParam("{{baseName}}"){{#useBeanValidation}}{{>beanValidationQueryParams}}{{/useBeanValidation}}{{#defaultValue}} @DefaultValue("{{{defaultValue}}}"){{/defaultValue}} {{#useSwaggerAnnotations}}{{#description}} @ApiParam("{{description}}"){{/description}}{{/useSwaggerAnnotations}} {{{dataType}}} {{paramName}}{{/isHeaderParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/pathParams.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/pathParams.mustache index f01e18d3523a..5c3d731f8388 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/pathParams.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/pathParams.mustache @@ -1 +1 @@ -{{#isPathParam}}@PathParam("{{baseName}}"){{#useBeanValidation}}{{>beanValidationPathParams}}{{/useBeanValidation}}{{#description}} @ApiParam("{{description}}"){{/description}} {{{dataType}}} {{paramName}}{{/isPathParam}} \ No newline at end of file +{{#isPathParam}}@PathParam("{{baseName}}"){{#useBeanValidation}}{{>beanValidationPathParams}}{{/useBeanValidation}}{{#useSwaggerAnnotations}}{{#description}} @ApiParam("{{description}}"){{/description}}{{/useSwaggerAnnotations}} {{{dataType}}} {{paramName}}{{/isPathParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/pojo.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/pojo.mustache index 0dc89597ca1c..ec8264cf8f3b 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/pojo.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/pojo.mustache @@ -1,4 +1,6 @@ +{{#useSwaggerAnnotations}} import io.swagger.annotations.*; +{{/useSwaggerAnnotations}} import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -7,8 +9,8 @@ import com.fasterxml.jackson.annotation.JsonValue; {{#description}} /** * {{description}} - **/{{/description}} -{{#description}}@ApiModel(description = "{{{description}}}"){{/description}} + **/{{/description}}{{#useSwaggerAnnotations}} +{{#description}}@ApiModel(description = "{{{description}}}"){{/description}}{{/useSwaggerAnnotations}} public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} {{#serializableModel}}implements Serializable{{/serializableModel}} { {{#vars}}{{#isEnum}}{{^isContainer}} @@ -34,8 +36,8 @@ public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} {{#seriali return this; } - {{#vendorExtensions.extraAnnotation}}{{{vendorExtensions.extraAnnotation}}}{{/vendorExtensions.extraAnnotation}} - @ApiModelProperty({{#example}}example = "{{{example}}}", {{/example}}{{#required}}required = {{required}}, {{/required}}value = "{{{description}}}") + {{#vendorExtensions.extraAnnotation}}{{{vendorExtensions.extraAnnotation}}}{{/vendorExtensions.extraAnnotation}}{{#useSwaggerAnnotations}} + @ApiModelProperty({{#example}}example = "{{{example}}}", {{/example}}{{#required}}required = {{required}}, {{/required}}value = "{{{description}}}"){{/useSwaggerAnnotations}} @JsonProperty("{{baseName}}") {{#useBeanValidation}}{{>beanValidation}}{{/useBeanValidation}} public {{{datatypeWithEnum}}} {{getter}}() { return {{name}}; diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/pom.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/pom.mustache index b0316d58730d..c12b6a719e0e 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/pom.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/pom.mustache @@ -42,12 +42,14 @@ 2.0 provided + {{#useSwaggerAnnotations}} io.swagger swagger-annotations provided 1.5.3 + {{/useSwaggerAnnotations}} junit junit diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/queryParams.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/queryParams.mustache index b931cfea9c9f..4434783a4611 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/queryParams.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/queryParams.mustache @@ -1 +1 @@ -{{#isQueryParam}}@QueryParam("{{baseName}}"){{#useBeanValidation}}{{>beanValidationQueryParams}}{{/useBeanValidation}}{{#defaultValue}} @DefaultValue("{{{defaultValue}}}"){{/defaultValue}} {{#description}} @ApiParam("{{description}}"){{/description}} {{{dataType}}} {{paramName}}{{/isQueryParam}} \ No newline at end of file +{{#isQueryParam}}@QueryParam("{{baseName}}"){{#useBeanValidation}}{{>beanValidationQueryParams}}{{/useBeanValidation}}{{#defaultValue}} @DefaultValue("{{{defaultValue}}}"){{/defaultValue}} {{#useSwaggerAnnotations}}{{#description}} @ApiParam("{{description}}"){{/description}}{{/useSwaggerAnnotations}} {{{dataType}}} {{paramName}}{{/isQueryParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/Javascript/es6/package.mustache b/modules/openapi-generator/src/main/resources/Javascript/es6/package.mustache index 997c5e240558..56376a1eede0 100644 --- a/modules/openapi-generator/src/main/resources/Javascript/es6/package.mustache +++ b/modules/openapi-generator/src/main/resources/Javascript/es6/package.mustache @@ -13,7 +13,7 @@ "dependencies": { "babel": "^6.23.0", "babel-cli": "^6.26.0", - "superagent": "3.5.2" + "superagent": "3.7.0" }, "devDependencies": { "babel-core": "6.26.0", diff --git a/modules/openapi-generator/src/main/resources/Javascript/package.mustache b/modules/openapi-generator/src/main/resources/Javascript/package.mustache index 79d0d8f67214..b40c7cc8fb82 100644 --- a/modules/openapi-generator/src/main/resources/Javascript/package.mustache +++ b/modules/openapi-generator/src/main/resources/Javascript/package.mustache @@ -11,7 +11,7 @@ "fs": false }, "dependencies": { - "superagent": "3.5.2" + "superagent": "3.7.0" }, "devDependencies": { "mocha": "~2.3.4", diff --git a/modules/openapi-generator/src/main/resources/codegen/README.mustache b/modules/openapi-generator/src/main/resources/codegen/README.mustache index 2b575c6b1360..d8c6ab3ca32a 100644 --- a/modules/openapi-generator/src/main/resources/codegen/README.mustache +++ b/modules/openapi-generator/src/main/resources/codegen/README.mustache @@ -62,7 +62,7 @@ the object you have available during client generation: ``` # The following additional debug options are available for all codegen targets: -# -DdebugSwagger prints the OpenAPI Specification as interpreted by the codegen +# -DdebugOpenAPI prints the OpenAPI Specification as interpreted by the codegen # -DdebugModels prints models passed to the template engine # -DdebugOperations prints operations passed to the template engine # -DdebugSupportingFiles prints additional data passed to the template engine diff --git a/modules/openapi-generator/src/main/resources/cpp-rest-sdk-client/README.mustache b/modules/openapi-generator/src/main/resources/cpp-rest-sdk-client/README.mustache new file mode 100644 index 000000000000..c5681ca20de8 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/cpp-rest-sdk-client/README.mustache @@ -0,0 +1,43 @@ +# C++ API client + +{{#appDescription}} +{{{appDescription}}} +{{/appDescription}} + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [OpenAPI spec](https://openapis.org) from a remote server, you can easily generate an API client. + +- API version: {{appVersion}} +- Package version: {{packageVersion}} +{{^hideGenerationTimestamp}} +- Build date: {{generatedDate}} +{{/hideGenerationTimestamp}} +- Build package: {{generatorClass}} +{{#infoUrl}} +For more information, please visit [{{{infoUrl}}}]({{{infoUrl}}}) +{{/infoUrl}} + +- API namespace: {{{apiPackage}}} +- Model namespace: {{{modelPackage}}} + +## Installation + +### Prerequisites + +Install [cpprestsdk](https://github.com/Microsoft/cpprestsdk). + +- Windows: `vcpkg install cpprestsdk cpprestsdk:x64-windows` +- Mac: `brew install cpprestsdk` +- Linux: `sudo apt-get install libcpprest-dev` + +### Build + +```sh +cmake -DCPPREST_ROOT=/usr -DCMAKE_CXX_FLAGS="-I/usr/local/opt/openssl/include" -DCMAKE_MODULE_LINKER_FLAGS="-L/usr/local/opt/openssl/lib" +make +``` + +## Author + +{{#apiInfo}}{{#apis}}{{^hasMore}}{{infoEmail}} +{{/hasMore}}{{/apis}}{{/apiInfo}} diff --git a/modules/openapi-generator/src/main/resources/cpp-rest-sdk-client/api-header.mustache b/modules/openapi-generator/src/main/resources/cpp-rest-sdk-client/api-header.mustache index ec97511314fc..fbf515deb156 100644 --- a/modules/openapi-generator/src/main/resources/cpp-rest-sdk-client/api-header.mustache +++ b/modules/openapi-generator/src/main/resources/cpp-rest-sdk-client/api-header.mustache @@ -51,7 +51,7 @@ public: ~{{classname}}() override; {{/gmockApis}} {{^gmockApis}} - virtual ~{{classname}}() = default; + virtual ~{{classname}}(); {{/gmockApis}} {{#operation}} @@ -62,7 +62,7 @@ public: /// {{notes}} /// {{#allParams}} - /// {{description}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}} + /// {{#lambda.multiline_comment_4}}{{description}}{{/lambda.multiline_comment_4}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}} {{/allParams}} pplx::task<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/returnType}}> {{operationId}}( {{#allParams}} diff --git a/modules/openapi-generator/src/main/resources/cpp-rest-sdk-client/cmake-lists.mustache b/modules/openapi-generator/src/main/resources/cpp-rest-sdk-client/cmake-lists.mustache index 1020ee0a3ac1..80bc39635c07 100644 --- a/modules/openapi-generator/src/main/resources/cpp-rest-sdk-client/cmake-lists.mustache +++ b/modules/openapi-generator/src/main/resources/cpp-rest-sdk-client/cmake-lists.mustache @@ -31,14 +31,10 @@ message("A ${CMAKE_BUILD_TYPE} build configuration is detected") #find_package(Boost 1.45.0 REQUIRED COMPONENTS ${Boost_THREAD_LIBRARY} ${Boost_SYSTEM_LIBRARY} ${Boost_REGEX_LIBRARY} ${Boost_DATE_TIME_LIBRARY} ${Boost_PROGRAM_OPTIONS_LIBRARY} ${Boost_FILESYSTEM_LIBRARY}) # build and set path to cpp rest sdk -#set(CPPREST_ROOT ${PROJECT_SOURCE_DIR}/../../../developmentTools/3rdParty/cpprest) +set(CPPREST_ROOT ${PROJECT_SOURCE_DIR}/3rdParty/cpprest) set(CPPREST_INCLUDE_DIR ${CPPREST_ROOT}/include) set(CPPREST_LIBRARY_DIR ${CPPREST_ROOT}/lib) -if( NOT DEFINED CPPREST_ROOT ) - message( FATAL_ERROR "Failed to find cpprest SDK (or missing components). Double check that \"CPPREST_ROOT\" is properly set") -endif( NOT DEFINED CPPREST_ROOT ) - include_directories(${PROJECT_SOURCE_DIR} api model ${CPPREST_INCLUDE_DIR}) #SUPPORTING FILES diff --git a/modules/openapi-generator/src/main/resources/csharp/enumClass.mustache b/modules/openapi-generator/src/main/resources/csharp/enumClass.mustache index 015e7142dbc5..de8c602a14dc 100644 --- a/modules/openapi-generator/src/main/resources/csharp/enumClass.mustache +++ b/modules/openapi-generator/src/main/resources/csharp/enumClass.mustache @@ -7,11 +7,14 @@ [JsonConverter(typeof(StringEnumConverter))] {{>visibility}} enum {{#datatypeWithEnum}}{{.}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}} { - {{#allowableValues}}{{#enumVars}} + {{#allowableValues}} + {{#enumVars}} /// /// Enum {{name}} for {{{value}}} /// [EnumMember(Value = {{#isLong}}"{{/isLong}}{{#isInteger}}"{{/isInteger}}{{#isFloat}}"{{/isFloat}}{{#isDouble}}"{{/isDouble}}{{{value}}}{{#isLong}}"{{/isLong}}{{#isInteger}}"{{/isInteger}}{{#isDouble}}"{{/isDouble}}{{#isFloat}}"{{/isFloat}})] - {{name}}{{#isLong}} = {{{value}}}{{/isLong}}{{#isInteger}} = {{{value}}}{{/isInteger}}{{^isInteger}} = {{-index}}{{/isInteger}}{{^-last}}, - {{/-last}}{{/enumVars}}{{/allowableValues}} + {{name}}{{#isLong}} = {{{value}}}{{/isLong}}{{#isInteger}} = {{{value}}}{{/isInteger}}{{^isInteger}} = {{-index}}{{/isInteger}}{{^-last}},{{/-last}} + + {{/enumVars}} + {{/allowableValues}} } diff --git a/modules/openapi-generator/src/main/resources/csharp/modelEnum.mustache b/modules/openapi-generator/src/main/resources/csharp/modelEnum.mustache index a7cf4473385f..c1a70a37f2dd 100644 --- a/modules/openapi-generator/src/main/resources/csharp/modelEnum.mustache +++ b/modules/openapi-generator/src/main/resources/csharp/modelEnum.mustache @@ -9,11 +9,16 @@ {{/isString}}{{/-first}}{{/enumVars}}{{/allowableValues}} {{>visibility}} enum {{#datatypeWithEnum}}{{.}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}{{#vendorExtensions.x-enum-byte}}: byte{{/vendorExtensions.x-enum-byte}} { - {{#allowableValues}}{{#enumVars}} + {{#allowableValues}} + {{#enumVars}} /// /// Enum {{name}} for value: {{{value}}} /// - {{#isString}}[EnumMember(Value = "{{{value}}}")]{{/isString}} - {{name}}{{^isString}} = {{{value}}}{{/isString}}{{#isString}} = {{-index}}{{/isString}}{{^-last}}, - {{/-last}}{{/enumVars}}{{/allowableValues}} + {{#isString}} + [EnumMember(Value = "{{{value}}}")] + {{/isString}} + {{name}}{{^isString}} = {{{value}}}{{/isString}}{{#isString}} = {{-index}}{{/isString}}{{^-last}},{{/-last}} + + {{/enumVars}} + {{/allowableValues}} }{{! NOTE: This model's enumVars is modified to look like CodegenProperty}} diff --git a/modules/openapi-generator/src/main/resources/csharp/modelGeneric.mustache b/modules/openapi-generator/src/main/resources/csharp/modelGeneric.mustache index 3659e7db0bba..89d35b73ec09 100644 --- a/modules/openapi-generator/src/main/resources/csharp/modelGeneric.mustache +++ b/modules/openapi-generator/src/main/resources/csharp/modelGeneric.mustache @@ -133,7 +133,7 @@ this.{{name}} = {{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}}; /// Returns the JSON string presentation of the object /// /// JSON string presentation of the object - public {{#parent}}{{^isArrayModel}}override {{/isArrayModel}}{{/parent}}{{^parent}}virtual {{/parent}}string ToJson() + public {{#parent}}{{^isArrayModel}}{{^isMapModel}}override {{/isMapModel}}{{/isArrayModel}}{{/parent}}{{^parent}}virtual {{/parent}}string ToJson() { return JsonConvert.SerializeObject(this, Formatting.Indented); } @@ -247,7 +247,9 @@ this.{{name}} = {{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}}; {{/discriminator}} {{#parent}} {{^isArrayModel}} + {{^isMapModel}} foreach(var x in BaseValidate(validationContext)) yield return x; + {{/isMapModel}} {{/isArrayModel}} {{/parent}} {{#vars}} diff --git a/modules/openapi-generator/src/main/resources/csharp/modelInnerEnum.mustache b/modules/openapi-generator/src/main/resources/csharp/modelInnerEnum.mustache index bede8a16b5e9..d9e96dccdb3c 100644 --- a/modules/openapi-generator/src/main/resources/csharp/modelInnerEnum.mustache +++ b/modules/openapi-generator/src/main/resources/csharp/modelInnerEnum.mustache @@ -10,12 +10,17 @@ {{/isString}} {{>visibility}} enum {{#datatypeWithEnum}}{{.}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}{{#vendorExtensions.x-enum-byte}}: byte{{/vendorExtensions.x-enum-byte}} { - {{#allowableValues}}{{#enumVars}} + {{#allowableValues}} + {{#enumVars}} /// /// Enum {{name}} for value: {{{value}}} /// - {{#isString}}[EnumMember(Value = "{{{value}}}")]{{/isString}} - {{name}}{{^isString}} = {{{value}}}{{/isString}}{{#isString}} = {{-index}}{{/isString}}{{^-last}}, - {{/-last}}{{/enumVars}}{{/allowableValues}} + {{#isString}} + [EnumMember(Value = "{{{value}}}")] + {{/isString}} + {{name}}{{^isString}} = {{{value}}}{{/isString}}{{#isString}} = {{-index}}{{/isString}}{{^-last}},{{/-last}} + + {{/enumVars}} + {{/allowableValues}} } {{/isContainer}} diff --git a/modules/openapi-generator/src/main/resources/swagger-static/assets/css/bootstrap-responsive.css b/modules/openapi-generator/src/main/resources/openapi-static/assets/css/bootstrap-responsive.css similarity index 100% rename from modules/openapi-generator/src/main/resources/swagger-static/assets/css/bootstrap-responsive.css rename to modules/openapi-generator/src/main/resources/openapi-static/assets/css/bootstrap-responsive.css diff --git a/modules/openapi-generator/src/main/resources/swagger-static/assets/css/bootstrap.css b/modules/openapi-generator/src/main/resources/openapi-static/assets/css/bootstrap.css similarity index 100% rename from modules/openapi-generator/src/main/resources/swagger-static/assets/css/bootstrap.css rename to modules/openapi-generator/src/main/resources/openapi-static/assets/css/bootstrap.css diff --git a/modules/openapi-generator/src/main/resources/swagger-static/assets/css/site.css b/modules/openapi-generator/src/main/resources/openapi-static/assets/css/site.css similarity index 100% rename from modules/openapi-generator/src/main/resources/swagger-static/assets/css/site.css rename to modules/openapi-generator/src/main/resources/openapi-static/assets/css/site.css diff --git a/modules/openapi-generator/src/main/resources/swagger-static/assets/css/style.css b/modules/openapi-generator/src/main/resources/openapi-static/assets/css/style.css similarity index 100% rename from modules/openapi-generator/src/main/resources/swagger-static/assets/css/style.css rename to modules/openapi-generator/src/main/resources/openapi-static/assets/css/style.css diff --git a/modules/openapi-generator/src/main/resources/swagger-static/assets/images/logo.png b/modules/openapi-generator/src/main/resources/openapi-static/assets/images/logo.png similarity index 100% rename from modules/openapi-generator/src/main/resources/swagger-static/assets/images/logo.png rename to modules/openapi-generator/src/main/resources/openapi-static/assets/images/logo.png diff --git a/modules/openapi-generator/src/main/resources/swagger-static/assets/js/bootstrap.js b/modules/openapi-generator/src/main/resources/openapi-static/assets/js/bootstrap.js similarity index 100% rename from modules/openapi-generator/src/main/resources/swagger-static/assets/js/bootstrap.js rename to modules/openapi-generator/src/main/resources/openapi-static/assets/js/bootstrap.js diff --git a/modules/openapi-generator/src/main/resources/swagger-static/assets/js/jquery-1.8.3.min.js b/modules/openapi-generator/src/main/resources/openapi-static/assets/js/jquery-1.8.3.min.js similarity index 100% rename from modules/openapi-generator/src/main/resources/swagger-static/assets/js/jquery-1.8.3.min.js rename to modules/openapi-generator/src/main/resources/openapi-static/assets/js/jquery-1.8.3.min.js diff --git a/modules/openapi-generator/src/main/resources/swagger-static/assets/js/main.js b/modules/openapi-generator/src/main/resources/openapi-static/assets/js/main.js similarity index 100% rename from modules/openapi-generator/src/main/resources/swagger-static/assets/js/main.js rename to modules/openapi-generator/src/main/resources/openapi-static/assets/js/main.js diff --git a/modules/openapi-generator/src/main/resources/swagger-static/index.mustache b/modules/openapi-generator/src/main/resources/openapi-static/index.mustache similarity index 100% rename from modules/openapi-generator/src/main/resources/swagger-static/index.mustache rename to modules/openapi-generator/src/main/resources/openapi-static/index.mustache diff --git a/modules/openapi-generator/src/main/resources/swagger-static/main.mustache b/modules/openapi-generator/src/main/resources/openapi-static/main.mustache similarity index 100% rename from modules/openapi-generator/src/main/resources/swagger-static/main.mustache rename to modules/openapi-generator/src/main/resources/openapi-static/main.mustache diff --git a/modules/openapi-generator/src/main/resources/swagger-static/model.mustache b/modules/openapi-generator/src/main/resources/openapi-static/model.mustache similarity index 100% rename from modules/openapi-generator/src/main/resources/swagger-static/model.mustache rename to modules/openapi-generator/src/main/resources/openapi-static/model.mustache diff --git a/modules/openapi-generator/src/main/resources/swagger-static/operation.mustache b/modules/openapi-generator/src/main/resources/openapi-static/operation.mustache similarity index 100% rename from modules/openapi-generator/src/main/resources/swagger-static/operation.mustache rename to modules/openapi-generator/src/main/resources/openapi-static/operation.mustache diff --git a/modules/openapi-generator/src/main/resources/swagger-static/package.mustache b/modules/openapi-generator/src/main/resources/openapi-static/package.mustache similarity index 100% rename from modules/openapi-generator/src/main/resources/swagger-static/package.mustache rename to modules/openapi-generator/src/main/resources/openapi-static/package.mustache diff --git a/modules/openapi-generator/src/main/resources/swagger-static/pom.xml b/modules/openapi-generator/src/main/resources/openapi-static/pom.xml similarity index 100% rename from modules/openapi-generator/src/main/resources/swagger-static/pom.xml rename to modules/openapi-generator/src/main/resources/openapi-static/pom.xml diff --git a/modules/openapi-generator/src/main/resources/ruby-client/api.mustache b/modules/openapi-generator/src/main/resources/ruby-client/api.mustache index aef0fbb24c99..b65c0578a175 100644 --- a/modules/openapi-generator/src/main/resources/ruby-client/api.mustache +++ b/modules/openapi-generator/src/main/resources/ruby-client/api.mustache @@ -186,6 +186,7 @@ module {{moduleName}} end return data, status_code, headers end + {{/operation}} end {{/operations}} diff --git a/modules/openapi-generator/src/main/resources/typescript-node/models.mustache b/modules/openapi-generator/src/main/resources/typescript-node/models.mustache index 279340121611..b4d7d78dfea7 100644 --- a/modules/openapi-generator/src/main/resources/typescript-node/models.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-node/models.mustache @@ -97,7 +97,7 @@ export class ObjectSerializer { } return transformedData; } else if (type === "Date") { - return data.toString(); + return data.toISOString(); } else { if (enumsMap[type]) { return data; diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/InlineModelResolverTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/InlineModelResolverTest.java new file mode 100644 index 000000000000..48d840bcaad0 --- /dev/null +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/InlineModelResolverTest.java @@ -0,0 +1,1039 @@ +/* + * Copyright 2018 OpenAPI-Generator Contributors (https://openapi-generator.tech) + * Copyright 2018 SmartBear Software + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * 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; + +import io.swagger.v3.oas.models.*; +import io.swagger.v3.oas.models.media.*; +import io.swagger.v3.oas.models.parameters.Parameter; +import io.swagger.v3.core.util.Json; +import io.swagger.v3.oas.models.responses.ApiResponse; +import io.swagger.v3.oas.models.responses.ApiResponses; +import org.apache.commons.lang3.StringUtils; +import org.testng.Assert; +import org.testng.annotations.Test; + +import java.util.HashMap; +import java.util.Map; + +import static org.testng.AssertJUnit.*; + +@SuppressWarnings("static-method") +public class InlineModelResolverTest { + @Test + public void resolveInlineModelTestWithoutTitle() throws Exception { + OpenAPI openapi = new OpenAPI(); + openapi.setComponents(new Components()); + openapi.getComponents().addSchemas("User", new ObjectSchema() + .name("user") + .description("a common user") + .addProperties("name", new StringSchema()) + .addProperties("address", new ObjectSchema() + .description("description") + //._default("default") + //.access("access") + .readOnly(false) + .description("description") + .name("name") + .addProperties("street", new StringSchema()) + .addProperties("city", new StringSchema()))); + + assertNotNull(((Schema) openapi.getComponents().getSchemas().get("User")).getProperties().get("address")); + + new InlineModelResolver().flatten(openapi); + + Schema user = (Schema) openapi.getComponents().getSchemas().get("User"); + + assertNotNull(user); + assertNotNull(user.getProperties().get("address")); + assertNotNull(((Schema) user.getProperties().get("address")).get$ref()); + assertEquals(((Schema) user.getProperties().get("address")).get$ref(), "#/components/schemas/User_address"); + + Schema address = (Schema) openapi.getComponents().getSchemas().get("User_address"); + assertNotNull(address); + assertNotNull(address.getProperties().get("city")); + assertNotNull(address.getProperties().get("street")); + } + + @Test + public void resolveInlineModelTestWithTitle() throws Exception { + OpenAPI openapi = new OpenAPI(); + openapi.setComponents(new Components()); + openapi.getComponents().addSchemas("User", new ObjectSchema() + .name("user") + .description("a common user") + .addProperties("name", new StringSchema()) + .addProperties("address", new ObjectSchema() + .title("UserAddressTitle") + .readOnly(false) + .description("description") + .name("name") + .addProperties("street", new StringSchema()) + .addProperties("city", new StringSchema()))); + + new InlineModelResolver().flatten(openapi); + + Schema user = (Schema) openapi.getComponents().getSchemas().get("User"); + + assertNotNull(user); + assertTrue(user.getProperties().get("address") instanceof Schema); + + Schema address = (Schema) openapi.getComponents().getSchemas().get("UserAddressTitle"); + assertNotNull(address); + assertNotNull(address.getProperties().get("city")); + assertNotNull(address.getProperties().get("street")); + } + + @Test + public void resolveInlineModel2EqualInnerModels() throws Exception { + OpenAPI openapi = new OpenAPI(); + openapi.setComponents(new Components()); + openapi.getComponents().addSchemas("User", new ObjectSchema() + .name("user") + .description("a common user") + .addProperties("name", new StringSchema()) + .addProperties("address", new ObjectSchema() + .title("UserAddressTitle") + .readOnly(false) + .description("description") + .name("name") + .addProperties("street", new StringSchema()) + .addProperties("city", new StringSchema()))); + + openapi.getComponents().addSchemas("AnotherUser", new ObjectSchema() + .name("user") + .description("a common user") + .addProperties("name", new StringSchema()) + .addProperties("lastName", new StringSchema()) + .addProperties("address", new ObjectSchema() + .title("UserAddressTitle") + .readOnly(false) + .description("description") + .name("name") + .addProperties("street", new StringSchema()) + .addProperties("city", new StringSchema()))); + + new InlineModelResolver().flatten(openapi); + + ObjectSchema user = (ObjectSchema) openapi.getComponents().getSchemas().get("User"); + + assertNotNull(user); + assertTrue(user.getProperties().get("address") instanceof Schema); + + Schema address = (Schema) openapi.getComponents().getSchemas().get("UserAddressTitle"); + assertNotNull(address); + assertNotNull(address.getProperties().get("city")); + assertNotNull(address.getProperties().get("street")); + Schema duplicateAddress = (Schema) openapi.getComponents().getSchemas().get("UserAddressTitle_0"); + assertNull(duplicateAddress); + } + + @Test + public void resolveInlineModel2DifferentInnerModelsWIthSameTitle() throws Exception { + OpenAPI openapi = new OpenAPI(); + openapi.setComponents(new Components()); + openapi.getComponents().addSchemas("User", new ObjectSchema() + .name("user") + .description("a common user") + .addProperties("name", new StringSchema()) + .addProperties("address", new ObjectSchema() + .title("UserAddressTitle") + .readOnly(false) + .description("description") + .name("name") + .addProperties("street", new StringSchema()) + .addProperties("city", new StringSchema()))); + + openapi.getComponents().addSchemas("AnotherUser", new ObjectSchema() + .name("AnotherUser") + .description("a common user") + .addProperties("name", new StringSchema()) + .addProperties("lastName", new StringSchema()) + .addProperties("address", new ObjectSchema() + .title("UserAddressTitle") + .readOnly(false) + .description("description") + .name("name") + .addProperties("street", new StringSchema()) + .addProperties("city", new StringSchema()) + .addProperties("apartment", new StringSchema()))); + + new InlineModelResolver().flatten(openapi); + + Schema user = (Schema) openapi.getComponents().getSchemas().get("User"); + + assertNotNull(user); + assertTrue(user.getProperties().get("address") instanceof Schema); + + Schema address = (Schema) openapi.getComponents().getSchemas().get("UserAddressTitle"); + assertNotNull(address); + assertNotNull(address.getProperties().get("city")); + assertNotNull(address.getProperties().get("street")); + Schema duplicateAddress = (Schema) openapi.getComponents().getSchemas().get("UserAddressTitle_1"); + assertNotNull(duplicateAddress); + assertNotNull(duplicateAddress.getProperties().get("city")); + assertNotNull(duplicateAddress.getProperties().get("street")); + assertNotNull(duplicateAddress.getProperties().get("apartment")); + } + + @Test + public void testInlineResponseModel() throws Exception { + OpenAPI openapi = new OpenAPI(); + openapi.setComponents(new Components()); + + Map propExt = new HashMap<>(); + propExt.put("x-ext", "ext-prop"); + + Map responseExt = new HashMap<>(); + responseExt.put("x-foo", "bar"); + + openapi.path("/foo/bar", new PathItem() + .get(new Operation().responses(new ApiResponses().addApiResponse("200", new ApiResponse() + .description("it works!") + .content(new Content().addMediaType("application/json", + new MediaType().schema(new ObjectSchema().title("inline_response_200") + .addProperties("name", new StringSchema()).extensions(propExt)))))))) + .path("/foo/baz", new PathItem() + .get(new Operation().responses(new ApiResponses().addApiResponse("200", new ApiResponse() + .description("it works!") + .extensions(responseExt) + .content(new Content().addMediaType("application/json", + new MediaType().schema(new ObjectSchema() + .addProperties("name", new StringSchema()).extensions(propExt)))))))); + + new InlineModelResolver().flatten(openapi); + + Map responses = openapi.getPaths().get("/foo/bar").getGet().getResponses(); + + ApiResponse response = responses.get("200"); + assertNotNull(response); + Schema schema = response.getContent().get("application/json").getSchema(); + assertTrue(schema instanceof Schema); + assertEquals(1, schema.getExtensions().size()); + assertEquals("ext-prop", schema.getExtensions().get("x-ext")); + + Schema model = (Schema) openapi.getComponents().getSchemas().get("inline_response_200"); + assertTrue(model.getProperties().size() == 1); + assertNotNull(model.getProperties().get("name")); + assertTrue(model.getProperties().get("name") instanceof StringSchema); + } + + @Test + public void testInlineResponseModelWithTitle() throws Exception { + OpenAPI openapi = new OpenAPI(); + openapi.setComponents(new Components()); + + Map propExt = new HashMap<>(); + propExt.put("x-ext", "ext-prop"); + + Map responseExt = new HashMap<>(); + responseExt.put("x-foo", "bar"); + + openapi.path("/foo/bar", new PathItem() + .get(new Operation().responses(new ApiResponses().addApiResponse("200", new ApiResponse() + .description("it works!") + .content(new Content().addMediaType("application/json", + new MediaType().schema(new ObjectSchema().title("GetBarResponse") + .addProperties("name", new StringSchema()).extensions(propExt)))))))) + .path("/foo/baz", new PathItem() + .get(new Operation().responses(new ApiResponses().addApiResponse("200", new ApiResponse() + .description("it works!") + .extensions(responseExt) + .content(new Content().addMediaType("application/json", + new MediaType().schema(new ObjectSchema() + .addProperties("name", new StringSchema()).extensions(propExt)))))))); + + new InlineModelResolver().flatten(openapi); + + Map responses = openapi.getPaths().get("/foo/bar").getGet().getResponses(); + + ApiResponse response = responses.get("200"); + assertNotNull(response); + Schema schema = response.getContent().get("application/json").getSchema(); + assertTrue(schema instanceof Schema); + assertEquals(1, schema.getExtensions().size()); + assertEquals("ext-prop", schema.getExtensions().get("x-ext")); + + Schema model = (Schema) openapi.getComponents().getSchemas().get("GetBarResponse"); + assertTrue(model.getProperties().size() == 1); + assertNotNull(model.getProperties().get("name")); + assertTrue(model.getProperties().get("name") instanceof StringSchema); + } + + + + /* + @Test + public void resolveInlineArraySchemaWithTitle() throws Exception { + OpenAPI openapi = new OpenAPI(); + + openapi.getComponents().addSchemas("User", new ArraySchema() + .items(new ObjectSchema() + .title("InnerUserTitle") + .access("access") + .readOnly(false) + .required(true) + .description("description") + .name("name") + .addProperties("street", new StringSchema()) + .addProperties("city", new StringSchema()))); + + new InlineModelResolver().flatten(openapi); + + Schema model = openapi.getComponents().getSchemas().get("User"); + assertTrue(model instanceof ArraySchema); + + Schema user = openapi.getComponents().getSchemas().get("InnerUserTitle"); + assertNotNull(user); + assertEquals("description", user.getDescription()); + } +/* + @Test + public void resolveInlineArraySchemaWithoutTitle() throws Exception { + OpenAPI openapi = new OpenAPI(); + + openapi.getComponents().addSchemas("User", new ArraySchema() + .items(new ObjectSchema() + ._default("default") + .access("access") + .readOnly(false) + .required(true) + .description("description") + .name("name") + .addProperties("street", new StringSchema()) + .addProperties("city", new StringSchema()))); + + new InlineModelResolver().flatten(openapi); + + Schema model = openapi.getComponents().getSchemas().get("User"); + assertTrue(model instanceof ArraySchema); + + Model user = openapi.getComponents().getSchemas().get("User_inner"); + assertNotNull(user); + assertEquals("description", user.getDescription()); + } + + + + + @Test + public void resolveInlineBodyParameter() throws Exception { + OpenAPI openapi = new OpenAPI(); + + openapi.path("/hello", new Path() + .get(new Operation() + .parameter(new BodyParameter() + .name("body") + .schema(new ObjectSchema() + .addProperties("address", new ObjectSchema() + .addProperties("street", new StringSchema())) + .addProperties("name", new StringSchema()))))); + + new InlineModelResolver().flatten(openapi); + + Operation operation = openapi.getPaths().get("/hello").getGet(); + BodyParameter bp = (BodyParameter)operation.getParameters().get(0); + assertTrue(bp.getSchema() instanceof RefModel); + + Model body = openapi.getComponents().getSchemas().get("body"); + assertTrue(body instanceof ObjectSchema); + + ObjectSchema impl = (ObjectSchema) body; + assertNotNull(impl.getProperties().get("address")); + } + + @Test + public void resolveInlineBodyParameterWithRequired() throws Exception { + OpenAPI openapi = new OpenAPI(); + + openapi.path("/hello", new Path() + .get(new Operation() + .parameter(new BodyParameter() + .name("body") + .schema(new ObjectSchema() + .addProperties("address", new ObjectSchema() + .addProperties("street", new StringSchema() + .required(true)) + .required(true)) + .addProperties("name", new StringSchema()))))); + + new InlineModelResolver().flatten(openapi); + + Operation operation = openapi.getPaths().get("/hello").getGet(); + BodyParameter bp = (BodyParameter)operation.getParameters().get(0); + assertTrue(bp.getSchema() instanceof RefModel); + + Model body = openapi.getComponents().getSchemas().get("body"); + assertTrue(body instanceof ObjectSchema); + + ObjectSchema impl = (ObjectSchema) body; + assertNotNull(impl.getProperties().get("address")); + + Property addressProperty = impl.getProperties().get("address"); + assertTrue(addressProperty instanceof Schema); + assertTrue(addressProperty.getRequired()); + + Model helloAddress = openapi.getComponents().getSchemas().get("hello_address"); + assertTrue(helloAddress instanceof ObjectSchema); + + ObjectSchema addressImpl = (ObjectSchema) helloAddress; + assertNotNull(addressImpl); + + Property streetProperty = addressImpl.getProperties().get("street"); + assertTrue(streetProperty instanceof StringSchema); + assertTrue(streetProperty.getRequired()); + } + + @Test + public void resolveInlineBodyParameterWithTitle() throws Exception { + OpenAPI openapi = new OpenAPI(); + + ObjectSchema addressModelItem = new ObjectSchema(); + String addressModelName = "DetailedAddress"; + addressModelItem.setTitle(addressModelName); + openapi.path("/hello", new Path() + .get(new Operation() + .parameter(new BodyParameter() + .name("body") + .schema(addressModelItem + .addProperties("address", new ObjectSchema() + .addProperties("street", new StringSchema())) + .addProperties("name", new StringSchema()))))); + + new InlineModelResolver().flatten(openapi); + + Operation operation = openapi.getPaths().get("/hello").getGet(); + BodyParameter bp = (BodyParameter)operation.getParameters().get(0); + assertTrue(bp.getSchema() instanceof RefModel); + + Model body = openapi.getComponents().getSchemas().get(addressModelName); + assertTrue(body instanceof ObjectSchema); + + ObjectSchema impl = (ObjectSchema) body; + assertNotNull(impl.getProperties().get("address")); + } + + @Test + public void notResolveNonModelBodyParameter() throws Exception { + OpenAPI openapi = new OpenAPI(); + + openapi.path("/hello", new Path() + .get(new Operation() + .parameter(new BodyParameter() + .name("body") + .schema(new ObjectSchema() + .type("string") + .format("binary"))))); + + new InlineModelResolver().flatten(openapi); + + Operation operation = openapi.getPaths().get("/hello").getGet(); + BodyParameter bp = (BodyParameter)operation.getParameters().get(0); + assertTrue(bp.getSchema() instanceof ObjectSchema); + ObjectSchema m = (ObjectSchema) bp.getSchema(); + assertEquals("string", m.getType()); + assertEquals("binary", m.getFormat()); + } + + @Test + public void resolveInlineArrayBodyParameter() throws Exception { + OpenAPI openapi = new OpenAPI(); + + openapi.path("/hello", new Path() + .get(new Operation() + .parameter(new BodyParameter() + .name("body") + .schema(new ArraySchema() + .items(new ObjectSchema() + .addProperties("address", new ObjectSchema() + .addProperties("street", new StringSchema()))))))); + + new InlineModelResolver().flatten(openapi); + + Parameter param = openapi.getPaths().get("/hello").getGet().getParameters().get(0); + assertTrue(param instanceof BodyParameter); + + BodyParameter bp = (BodyParameter) param; + Model schema = bp.getSchema(); + + assertTrue(schema instanceof ArraySchema); + + ArraySchema am = (ArraySchema) schema; + Property inner = am.getItems(); + assertTrue(inner instanceof Schema); + + Schema rp = (Schema) inner; + + assertEquals(rp.getType(), "ref"); + assertEquals(rp.get$ref(), "#/definitions/body"); + assertEquals(rp.getSimpleRef(), "body"); + + Model inline = openapi.getComponents().getSchemas().get("body"); + assertNotNull(inline); + assertTrue(inline instanceof ObjectSchema); + ObjectSchema impl = (ObjectSchema) inline; + Schema rpAddress = (Schema) impl.getProperties().get("address"); + assertNotNull(rpAddress); + assertEquals(rpAddress.getType(), "ref"); + assertEquals(rpAddress.get$ref(), "#/definitions/hello_address"); + assertEquals(rpAddress.getSimpleRef(), "hello_address"); + + Model inlineProp = openapi.getComponents().getSchemas().get("hello_address"); + assertNotNull(inlineProp); + assertTrue(inlineProp instanceof ObjectSchema); + ObjectSchema implProp = (ObjectSchema) inlineProp; + assertNotNull(implProp.getProperties().get("street")); + assertTrue(implProp.getProperties().get("street") instanceof StringSchema); + } + + @Test + public void resolveInlineArrayResponse() throws Exception { + OpenAPI openapi = new OpenAPI(); + + ArrayProperty schema = new ArrayProperty() + .items(new ObjectSchema() + .addProperties("name", new StringSchema()) + .vendorExtension("x-ext", "ext-items")) + .vendorExtension("x-ext", "ext-prop"); + openapi.path("/foo/baz", new Path() + .get(new Operation() + .response(200, new Response() + .vendorExtension("x-foo", "bar") + .description("it works!") + .schema(schema)))); + + new InlineModelResolver().flatten(openapi); + + Response response = openapi.getPaths().get("/foo/baz").getGet().getResponses().get("200"); + assertNotNull(response); + + assertNotNull(response.getSchema()); + Property responseProperty = response.getSchema(); + + // no need to flatten more + assertTrue(responseProperty instanceof ArrayProperty); + + ArrayProperty ap = (ArrayProperty) responseProperty; + assertEquals(1, ap.getVendorExtensions().size()); + assertEquals("ext-prop", ap.getVendorExtensions().get("x-ext")); + + Property p = ap.getItems(); + + assertNotNull(p); + + Schema rp = (Schema) p; + assertEquals(rp.getType(), "ref"); + assertEquals(rp.get$ref(), "#/definitions/inline_response_200"); + assertEquals(rp.getSimpleRef(), "inline_response_200"); + assertEquals(1, rp.getVendorExtensions().size()); + assertEquals("ext-items", rp.getVendorExtensions().get("x-ext")); + + Model inline = openapi.getComponents().getSchemas().get("inline_response_200"); + assertNotNull(inline); + assertTrue(inline instanceof ObjectSchema); + ObjectSchema impl = (ObjectSchema) inline; + assertNotNull(impl.getProperties().get("name")); + assertTrue(impl.getProperties().get("name") instanceof StringSchema); + } + + @Test + public void resolveInlineArrayResponseWithTitle() throws Exception { + OpenAPI openapi = new OpenAPI(); + + openapi.path("/foo/baz", new Path() + .get(new Operation() + .response(200, new Response() + .vendorExtension("x-foo", "bar") + .description("it works!") + .schema(new ArrayProperty() + .items(new ObjectSchema() + .title("FooBar") + .addProperties("name", new StringSchema())))))); + + new InlineModelResolver().flatten(openapi); + + Response response = openapi.getPaths().get("/foo/baz").getGet().getResponses().get("200"); + assertNotNull(response); + + assertNotNull(response.getSchema()); + Property responseProperty = response.getSchema(); + + // no need to flatten more + assertTrue(responseProperty instanceof ArrayProperty); + + ArrayProperty ap = (ArrayProperty) responseProperty; + Property p = ap.getItems(); + + assertNotNull(p); + + Schema rp = (Schema) p; + assertEquals(rp.getType(), "ref"); + assertEquals(rp.get$ref(), "#/definitions/"+ "FooBar"); + assertEquals(rp.getSimpleRef(), "FooBar"); + + Model inline = openapi.getComponents().getSchemas().get("FooBar"); + assertNotNull(inline); + assertTrue(inline instanceof ObjectSchema); + ObjectSchema impl = (ObjectSchema) inline; + assertNotNull(impl.getProperties().get("name")); + assertTrue(impl.getProperties().get("name") instanceof StringSchema); + } + + @Test + public void testInlineMapResponse() throws Exception { + OpenAPI openapi = new OpenAPI(); + + MapProperty schema = new MapProperty(); + schema.setAdditionalProperties(new StringSchema()); + schema.setVendorExtension("x-ext", "ext-prop"); + + openapi.path("/foo/baz", new Path() + .get(new Operation() + .response(200, new Response() + .vendorExtension("x-foo", "bar") + .description("it works!") + .schema(schema)))); + new InlineModelResolver().flatten(openapi); + Json.prettyPrint(openapi); + + Response response = openapi.getPaths().get("/foo/baz").getGet().getResponses().get("200"); + + Property property = response.getSchema(); + assertTrue(property instanceof MapProperty); + assertTrue(openapi.getComponents().getSchemas().size() == 0); + assertEquals(1, property.getVendorExtensions().size()); + assertEquals("ext-prop", property.getVendorExtensions().get("x-ext")); + } + + @Test + public void testInlineMapResponseWithObjectSchema() throws Exception { + OpenAPI openapi = new OpenAPI(); + + MapProperty schema = new MapProperty(); + schema.setAdditionalProperties(new ObjectSchema() + .addProperties("name", new StringSchema())); + schema.setVendorExtension("x-ext", "ext-prop"); + + openapi.path("/foo/baz", new Path() + .get(new Operation() + .response(200, new Response() + .vendorExtension("x-foo", "bar") + .description("it works!") + .schema(schema)))); + new InlineModelResolver().flatten(openapi); + + Response response = openapi.getPaths().get("/foo/baz").getGet().getResponses().get("200"); + Property property = response.getSchema(); + assertTrue(property instanceof MapProperty); + assertEquals(1, property.getVendorExtensions().size()); + assertEquals("ext-prop", property.getVendorExtensions().get("x-ext")); + assertTrue(openapi.getComponents().getSchemas().size() == 1); + + Model inline = openapi.getComponents().getSchemas().get("inline_response_200"); + assertTrue(inline instanceof ObjectSchema); + ObjectSchema impl = (ObjectSchema) inline; + assertNotNull(impl.getProperties().get("name")); + assertTrue(impl.getProperties().get("name") instanceof StringSchema); + } + + @Test + public void testArrayResponse() { + OpenAPI openapi = new OpenAPI(); + + ArrayProperty schema = new ArrayProperty(); + schema.setItems(new ObjectSchema() + .addProperties("name", new StringSchema())); + + openapi.path("/foo/baz", new Path() + .get(new Operation() + .response(200, new Response() + .vendorExtension("x-foo", "bar") + .description("it works!") + .schema(schema)))); + new InlineModelResolver().flatten(openapi); + + Response response = openapi.getPaths().get("/foo/baz").getGet().getResponses().get("200"); + assertTrue(response.getSchema() instanceof ArrayProperty); + + ArrayProperty am = (ArrayProperty) response.getSchema(); + Property items = am.getItems(); + assertTrue(items instanceof Schema); + Schema rp = (Schema) items; + assertEquals(rp.getType(), "ref"); + assertEquals(rp.get$ref(), "#/definitions/inline_response_200"); + assertEquals(rp.getSimpleRef(), "inline_response_200"); + + Model inline = openapi.getComponents().getSchemas().get("inline_response_200"); + assertTrue(inline instanceof ObjectSchema); + ObjectSchema impl = (ObjectSchema) inline; + assertNotNull(impl.getProperties().get("name")); + assertTrue(impl.getProperties().get("name") instanceof StringSchema); + } + + @Test + public void testBasicInput() { + OpenAPI openapi = new OpenAPI(); + + ObjectSchema user = new ObjectSchema() + .addProperties("name", new StringSchema()); + + openapi.path("/foo/baz", new Path() + .post(new Operation() + .parameter(new BodyParameter() + .name("myBody") + .schema(new RefModel("User"))))); + + openapi.getComponents().addSchemas("User", user); + + new InlineModelResolver().flatten(openapi); + + Json.prettyPrint(openapi); + } + + @Test + public void testArbitraryObjectBodyParam() { + OpenAPI openapi = new OpenAPI(); + + openapi.path("/hello", new Path() + .get(new Operation() + .parameter(new BodyParameter() + .name("body") + .schema(new ObjectSchema())))); + + new InlineModelResolver().flatten(openapi); + + Operation operation = openapi.getPaths().get("/hello").getGet(); + BodyParameter bp = (BodyParameter)operation.getParameters().get(0); + assertTrue(bp.getSchema() instanceof ObjectSchema); + ObjectSchema m = (ObjectSchema) bp.getSchema(); + assertNull(m.getType()); + } + + @Test + public void testArbitraryObjectBodyParamInline() { + OpenAPI openapi = new OpenAPI(); + + openapi.path("/hello", new Path() + .get(new Operation() + .parameter(new BodyParameter() + .name("body") + .schema(new ObjectSchema() + .addProperties("arbitrary", new ObjectSchema()))))); + + new InlineModelResolver().flatten(openapi); + + Operation operation = openapi.getPaths().get("/hello").getGet(); + BodyParameter bp = (BodyParameter)operation.getParameters().get(0); + assertTrue(bp.getSchema() instanceof RefModel); + + Model body = openapi.getComponents().getSchemas().get("body"); + assertTrue(body instanceof ObjectSchema); + + ObjectSchema impl = (ObjectSchema) body; + Property p = impl.getProperties().get("arbitrary"); + assertNotNull(p); + assertTrue(p instanceof ObjectSchema); + } + + @Test + public void testArbitraryObjectBodyParamWithArray() { + OpenAPI openapi = new OpenAPI(); + + openapi.path("/hello", new Path() + .get(new Operation() + .parameter(new BodyParameter() + .name("body") + .schema(new ArraySchema() + .items(new ObjectSchema()))))); + + new InlineModelResolver().flatten(openapi); + + Parameter param = openapi.getPaths().get("/hello").getGet().getParameters().get(0); + assertTrue(param instanceof BodyParameter); + + BodyParameter bp = (BodyParameter) param; + Model schema = bp.getSchema(); + + assertTrue(schema instanceof ArraySchema); + + ArraySchema am = (ArraySchema) schema; + Property inner = am.getItems(); + assertTrue(inner instanceof ObjectSchema); + + ObjectSchema op = (ObjectSchema) inner; + assertNotNull(op); + assertNull(op.getProperties()); + } + + @Test + public void testArbitraryObjectBodyParamArrayInline() { + OpenAPI openapi = new OpenAPI(); + + openapi.path("/hello", new Path() + .get(new Operation() + .parameter(new BodyParameter() + .name("body") + .schema(new ArraySchema() + .items(new ObjectSchema() + .addProperties("arbitrary", new ObjectSchema())))))); + + new InlineModelResolver().flatten(openapi); + + Parameter param = openapi.getPaths().get("/hello").getGet().getParameters().get(0); + assertTrue(param instanceof BodyParameter); + + BodyParameter bp = (BodyParameter) param; + Model schema = bp.getSchema(); + + assertTrue(schema instanceof ArraySchema); + + ArraySchema am = (ArraySchema) schema; + Property inner = am.getItems(); + assertTrue(inner instanceof Schema); + + Schema rp = (Schema) inner; + + assertEquals(rp.getType(), "ref"); + assertEquals(rp.get$ref(), "#/definitions/body"); + assertEquals(rp.getSimpleRef(), "body"); + + Model inline = openapi.getComponents().getSchemas().get("body"); + assertNotNull(inline); + assertTrue(inline instanceof ObjectSchema); + ObjectSchema impl = (ObjectSchema) inline; + Property p = impl.getProperties().get("arbitrary"); + assertNotNull(p); + assertTrue(p instanceof ObjectSchema); + } + + @Test + public void testArbitraryObjectResponse() { + OpenAPI openapi = new OpenAPI(); + + openapi.path("/foo/bar", new Path() + .get(new Operation() + .response(200, new Response() + .description("it works!") + .schema(new ObjectSchema())))); + new InlineModelResolver().flatten(openapi); + + Map responses = openapi.getPaths().get("/foo/bar").getGet().getResponses(); + + Response response = responses.get("200"); + assertNotNull(response); + assertTrue(response.getSchema() instanceof ObjectSchema); + ObjectSchema op = (ObjectSchema) response.getSchema(); + assertNull(op.getProperties()); + } + + @Test + public void testArbitraryObjectResponseArray() { + OpenAPI openapi = new OpenAPI(); + + openapi.path("/foo/baz", new Path() + .get(new Operation() + .response(200, new Response() + .description("it works!") + .schema(new ArrayProperty() + .items(new ObjectSchema()))))); + new InlineModelResolver().flatten(openapi); + + Response response = openapi.getPaths().get("/foo/baz").getGet().getResponses().get("200"); + assertTrue(response.getSchema() instanceof ArrayProperty); + + ArrayProperty am = (ArrayProperty) response.getSchema(); + Property items = am.getItems(); + assertTrue(items instanceof ObjectSchema); + ObjectSchema op = (ObjectSchema) items; + assertNull(op.getProperties()); + } + + @Test + public void testArbitraryObjectResponseArrayInline() { + OpenAPI openapi = new OpenAPI(); + + openapi.path("/foo/baz", new Path() + .get(new Operation() + .response(200, new Response() + .vendorExtension("x-foo", "bar") + .description("it works!") + .schema(new ArrayProperty() + .items(new ObjectSchema() + .addProperties("arbitrary", new ObjectSchema())))))); + + new InlineModelResolver().flatten(openapi); + + Response response = openapi.getPaths().get("/foo/baz").getGet().getResponses().get("200"); + assertNotNull(response); + + assertNotNull(response.getSchema()); + Property responseProperty = response.getSchema(); + assertTrue(responseProperty instanceof ArrayProperty); + + ArrayProperty ap = (ArrayProperty) responseProperty; + Property p = ap.getItems(); + assertNotNull(p); + + Schema rp = (Schema) p; + assertEquals(rp.getType(), "ref"); + assertEquals(rp.get$ref(), "#/definitions/inline_response_200"); + assertEquals(rp.getSimpleRef(), "inline_response_200"); + + Model inline = openapi.getComponents().getSchemas().get("inline_response_200"); + assertNotNull(inline); + assertTrue(inline instanceof ObjectSchema); + ObjectSchema impl = (ObjectSchema) inline; + Property inlineProp = impl.getProperties().get("arbitrary"); + assertNotNull(inlineProp); + assertTrue(inlineProp instanceof ObjectSchema); + ObjectSchema op = (ObjectSchema) inlineProp; + assertNull(op.getProperties()); + } + + @Test + public void testArbitraryObjectResponseMapInline() { + OpenAPI openapi = new OpenAPI(); + + MapProperty schema = new MapProperty(); + schema.setAdditionalProperties(new ObjectSchema()); + + openapi.path("/foo/baz", new Path() + .get(new Operation() + .response(200, new Response() + .description("it works!") + .schema(schema)))); + new InlineModelResolver().flatten(openapi); + + Response response = openapi.getPaths().get("/foo/baz").getGet().getResponses().get("200"); + + Property property = response.getSchema(); + assertTrue(property instanceof MapProperty); + assertTrue(openapi.getComponents().getSchemas().size() == 0); + Property inlineProp = ((MapProperty) property).getAdditionalProperties(); + assertTrue(inlineProp instanceof ObjectSchema); + ObjectSchema op = (ObjectSchema) inlineProp; + assertNull(op.getProperties()); + } + + @Test + public void testArbitraryObjectModelInline() { + OpenAPI openapi = new OpenAPI(); + + openapi.getComponents().addSchemas("User", new ObjectSchema() + .name("user") + .description("a common user") + .addProperties("name", new StringSchema()) + .addProperties("arbitrary", new ObjectSchema() + .title("title") + ._default("default") + .access("access") + .readOnly(false) + .required(true) + .description("description") + .name("name"))); + + new InlineModelResolver().flatten(openapi); + + ObjectSchema user = (ObjectSchema)openapi.getComponents().getSchemas().get("User"); + assertNotNull(user); + Property inlineProp = user.getProperties().get("arbitrary"); + assertTrue(inlineProp instanceof ObjectSchema); + ObjectSchema op = (ObjectSchema) inlineProp; + assertNull(op.getProperties()); + } + + @Test + public void testArbitraryObjectModelWithArrayInlineWithoutTitle() { + OpenAPI openapi = new OpenAPI(); + + openapi.getComponents().addSchemas("User", new ArraySchema() + .items(new ObjectSchema() + ._default("default") + .access("access") + .readOnly(false) + .required(true) + .description("description") + .name("name") + .addProperties("arbitrary", new ObjectSchema()))); + + new InlineModelResolver().flatten(openapi); + + Schema model = openapi.getComponents().getSchemas().get("User"); + assertTrue(model instanceof ArraySchema); + ArraySchema am = (ArraySchema) model; + Property inner = am.getItems(); + assertTrue(inner instanceof Schema); + + ObjectSchema userInner = (ObjectSchema)openapi.getComponents().getSchemas().get("User_inner"); + assertNotNull(userInner); + Property inlineProp = userInner.getProperties().get("arbitrary"); + assertTrue(inlineProp instanceof ObjectSchema); + ObjectSchema op = (ObjectSchema) inlineProp; + assertNull(op.getProperties()); + } + + @Test + public void testArbitraryObjectModelWithArrayInlineWithTitle() { + OpenAPI openapi = new OpenAPI(); + + openapi.getComponents().addSchemas("User", new ArraySchema() + .items(new ObjectSchema() + .title("InnerUserTitle") + ._default("default") + .access("access") + .readOnly(false) + .required(true) + .description("description") + .name("name") + .addProperties("arbitrary", new ObjectSchema()))); + + new InlineModelResolver().flatten(openapi); + + Schema model = openapi.getComponents().getSchemas().get("User"); + assertTrue(model instanceof ArraySchema); + ArraySchema am = (ArraySchema) model; + Property inner = am.getItems(); + assertTrue(inner instanceof Schema); + + ObjectSchema userInner = (ObjectSchema)openapi.getComponents().getSchemas().get("InnerUserTitle"); + assertNotNull(userInner); + Property inlineProp = userInner.getProperties().get("arbitrary"); + assertTrue(inlineProp instanceof ObjectSchema); + ObjectSchema op = (ObjectSchema) inlineProp; + assertNull(op.getProperties()); + } + + @Test + public void testEmptyExampleOnStrinngTypeModels() { + OpenAPI openapi = new OpenAPI(); + + Schema Schema = new Schema(); + Schema.set$ref("#/definitions/Test"); + + openapi.path("/hello", new Path() + .get(new Operation() + .response(200, new Response() + .schema(new ArrayProperty() + .items(Schema))))); + + openapi.getComponents().addSchemas("Test", new ObjectSchema() + .example(StringUtils.EMPTY) + .type("string")); + new InlineModelResolver().flatten(openapi); + } +*/ +} \ No newline at end of file diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/jaxrs/JavaJAXRSSpecServerCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/jaxrs/JavaJAXRSSpecServerCodegenTest.java new file mode 100644 index 000000000000..1ccafa1e48fe --- /dev/null +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/jaxrs/JavaJAXRSSpecServerCodegenTest.java @@ -0,0 +1,108 @@ +package org.openapitools.codegen.java.jaxrs; + +import io.swagger.v3.oas.models.Operation; +import org.junit.Before; +import org.junit.Test; +import org.openapitools.codegen.CodegenOperation; +import org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import static org.hamcrest.CoreMatchers.is; +import static org.junit.Assert.assertThat; + +/** + * Unit-Test for {@link org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen}. + * + * @author attrobit + */ +public class JavaJAXRSSpecServerCodegenTest { + + private JavaJAXRSSpecServerCodegen instance; + + @Before + public void before() { + instance = new JavaJAXRSSpecServerCodegen(); + } + + /** + * Test + * {@link JavaJAXRSSpecServerCodegen#addOperationToGroup(String, String, Operation, CodegenOperation, Map)} for Resource with path "/" and set tag. + */ + @Test + public void testAddOperationToGroupForRootResource() { + CodegenOperation codegenOperation = new CodegenOperation(); + codegenOperation.operationId = "findPrimaryresource"; + Operation operation = new Operation(); + Map> operationList = new HashMap<>(); + + instance.addOperationToGroup("Primaryresource", "/", operation, codegenOperation, operationList); + + assertThat(operationList.size(), is(1)); + assertThat(operationList.containsKey(""), is(true)); + assertThat(codegenOperation.baseName, is("Primaryresource")); + } + + /** + * Test + * {@link JavaJAXRSSpecServerCodegen#addOperationToGroup(String, String, Operation, CodegenOperation, Map)} for Resource with path param. + */ + @Test + public void testAddOperationToGroupForRootResourcePathParam() { + CodegenOperation codegenOperation = new CodegenOperation(); + codegenOperation.operationId = "getPrimaryresource"; + Operation operation = new Operation(); + Map> operationList = new HashMap<>(); + + instance.addOperationToGroup("Primaryresource", "/{uuid}", operation, codegenOperation, operationList); + + assertThat(operationList.size(), is(1)); + assertThat(operationList.containsKey(""), is(true)); + assertThat(codegenOperation.baseName, is("Primaryresource")); + } + + /** + * Test + * {@link JavaJAXRSSpecServerCodegen#addOperationToGroup(String, String, + * Operation, CodegenOperation, Map)} for Resource with path "/subresource". + */ + @Test + public void testAddOperationToGroupForSubresource() { + CodegenOperation codegenOperation = new CodegenOperation(); + codegenOperation.path = "/subresource"; + Operation operation = new Operation(); + Map> operationList = new HashMap<>(); + + instance.addOperationToGroup("Default", "/subresource", operation, codegenOperation, operationList); + + assertThat(codegenOperation.baseName, is("subresource")); + assertThat(operationList.size(), is(1)); + assertThat(operationList.containsKey("subresource"), is(true)); + } + + /** + * Test {@link JavaJAXRSSpecServerCodegen#toApiName(String)} with subresource. + */ + @Test + public void testToApiNameForSubresource() { + final String subresource = instance.toApiName("subresource"); + assertThat(subresource, is("SubresourceApi")); + } + + /** + * Test {@link JavaJAXRSSpecServerCodegen#toApiName(String)} with primary resource. + */ + @Test + public void testToApiNameForPrimaryResource() { + CodegenOperation codegenOperation = new CodegenOperation(); + codegenOperation.operationId = "findPrimaryresource"; + Operation operation = new Operation(); + Map> operationList = new HashMap<>(); + instance.addOperationToGroup("Primaryresource", "/", operation, codegenOperation, operationList); + + final String subresource = instance.toApiName(""); + assertThat(subresource, is("PrimaryresourceApi")); + } +} diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/utils/ModelUtilsTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/utils/ModelUtilsTest.java index ac9648e0243e..e09d27dbb950 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/utils/ModelUtilsTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/utils/ModelUtilsTest.java @@ -19,10 +19,7 @@ package org.openapitools.codegen.utils; import io.swagger.parser.OpenAPIParser; import io.swagger.v3.oas.models.OpenAPI; -import io.swagger.v3.oas.models.media.IntegerSchema; -import io.swagger.v3.oas.models.media.ObjectSchema; -import io.swagger.v3.oas.models.media.Schema; -import io.swagger.v3.oas.models.media.StringSchema; +import io.swagger.v3.oas.models.media.*; import io.swagger.v3.oas.models.parameters.Parameter; import io.swagger.v3.oas.models.parameters.RequestBody; import io.swagger.v3.oas.models.responses.ApiResponse; @@ -32,7 +29,10 @@ import org.openapitools.codegen.TestUtils; import org.testng.Assert; import org.testng.annotations.Test; +import java.util.Arrays; +import java.util.HashMap; import java.util.List; +import java.util.Map; public class ModelUtilsTest { @@ -173,4 +173,24 @@ public class ModelUtilsTest { Parameter result2 = ModelUtils.getReferencedParameter(openAPI, new Parameter().$ref("#/components/parameters/OtherParameter")); Assert.assertEquals(result2, otherParameter); } + + /** + * Issue https://github.com/OpenAPITools/openapi-generator/issues/582. + * Composed schemas should not get unaliased when generating model properties, in order to properly + * generate the property data type name. + */ + @Test + public void testComposedSchemasAreNotUnaliased() { + ComposedSchema composedSchema = new ComposedSchema().allOf(Arrays.asList( + new Schema<>().$ref("#/components/schemas/SomeSchema"), + new ObjectSchema() + )); + Schema refToComposedSchema = new Schema().$ref("#/components/schemas/SomeComposedSchema"); + + + Map allSchemas = new HashMap<>(); + allSchemas.put("SomeComposedSchema", composedSchema); + + Assert.assertEquals(refToComposedSchema, ModelUtils.unaliasSchema(allSchemas, refToComposedSchema)); + } } diff --git a/pom.xml b/pom.xml index 5789c48fb3ad..9abed800c6ba 100644 --- a/pom.xml +++ b/pom.xml @@ -715,6 +715,19 @@ samples/server/petstore/jaxrs/jersey1 + + + jaxrs-jersey + + + env + java + + + + samples/server/petstore/jaxrs-jersey + + jaxrs-spec diff --git a/samples/client/petstore-security-test/javascript/.openapi-generator/VERSION b/samples/client/petstore-security-test/javascript/.openapi-generator/VERSION index f9f7450d1359..4395ff592326 100644 --- a/samples/client/petstore-security-test/javascript/.openapi-generator/VERSION +++ b/samples/client/petstore-security-test/javascript/.openapi-generator/VERSION @@ -1 +1 @@ -2.3.0-SNAPSHOT \ No newline at end of file +3.2.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore-security-test/javascript/README.md b/samples/client/petstore-security-test/javascript/README.md index 4a9bd7e80db9..648467de2371 100644 --- a/samples/client/petstore-security-test/javascript/README.md +++ b/samples/client/petstore-security-test/javascript/README.md @@ -1,12 +1,12 @@ -# swagger_petstore____end____rn_n_r +# open_api_petstore____end____rn_n_r -SwaggerPetstoreEndRnNR - JavaScript client for swagger_petstore____end____rn_n_r +OpenApiPetstoreEndRnNR - JavaScript client for open_api_petstore____end____rn_n_r This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ *_/ ' \" =end -- -This SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project: +This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - API version: 1.0.0 *_/ ' \" =end -- \\r\\n \\n \\r - Package version: 1.0.0 *_/ =end -- \r\n \n \r -- Build package: io.swagger.codegen.languages.JavascriptClientCodegen +- Build package: org.openapitools.codegen.languages.JavascriptClientCodegen ## Installation @@ -20,7 +20,7 @@ please follow the procedure in ["Publishing npm packages"](https://docs.npmjs.co Then install it via: ```shell -npm install swagger_petstore____end____rn_n_r --save +npm install open_api_petstore____end____rn_n_r --save ``` ##### Local development @@ -38,13 +38,13 @@ Next, [link](https://docs.npmjs.com/cli/link) it globally in npm with the follow npm link ``` -Finally, switch to the directory you want to use your swagger_petstore____end____rn_n_r from, and run: +Finally, switch to the directory you want to use your open_api_petstore____end____rn_n_r from, and run: ```shell npm link /path/to/ ``` -You should now be able to `require('swagger_petstore____end____rn_n_r')` in javascript files from the directory you ran the last +You should now be able to `require('open_api_petstore____end____rn_n_r')` in javascript files from the directory you ran the last command above from. #### git @@ -93,12 +93,11 @@ module: { Please follow the [installation](#installation) instruction and execute the following JS code: ```javascript -var SwaggerPetstoreEndRnNR = require('swagger_petstore____end____rn_n_r'); +var OpenApiPetstoreEndRnNR = require('open_api_petstore____end____rn_n_r'); -var api = new SwaggerPetstoreEndRnNR.FakeApi() - -var opts = { - 'testCodeInjectEndRnNR': "testCodeInjectEndRnNR_example" // {String} To test code injection *_/ ' \" =end -- \\r\\n \\n \\r +var api = new OpenApiPetstoreEndRnNR.FakeApi() +var opts = { + 'UNKNOWN_BASE_TYPE': new OpenApiPetstoreEndRnNR.UNKNOWN_BASE_TYPE() // {UNKNOWN_BASE_TYPE} }; var callback = function(error, data, response) { @@ -114,16 +113,16 @@ api.testCodeInjectEndRnNR(opts, callback); ## Documentation for API Endpoints -All URIs are relative to *https://petstore.swagger.io *_/ ' \" =end -- \\r\\n \\n \\r/v2 *_/ ' \" =end -- \\r\\n \\n \\r* +All URIs are relative to *http://petstore.swagger.io *_/ ' \" =end -- \\r\\n \\n \\r/v2 *_/ ' \" =end -- \\r\\n \\n \\r* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- -*SwaggerPetstoreEndRnNR.FakeApi* | [**testCodeInjectEndRnNR**](docs/FakeApi.md#testCodeInjectEndRnNR) | **PUT** /fake | To test code injection *_/ ' \" =end -- \\r\\n \\n \\r +*OpenApiPetstoreEndRnNR.FakeApi* | [**testCodeInjectEndRnNR**](docs/FakeApi.md#testCodeInjectEndRnNR) | **PUT** /fake | To test code injection *_/ ' \" =end -- \\r\\n \\n \\r ## Documentation for Models - - [SwaggerPetstoreEndRnNR.ModelReturn](docs/ModelReturn.md) + - [OpenApiPetstoreEndRnNR.ModelReturn](docs/ModelReturn.md) ## Documentation for Authorization diff --git a/samples/client/petstore-security-test/javascript/docs/FakeApi.md b/samples/client/petstore-security-test/javascript/docs/FakeApi.md index 61b58cf72a97..de667cca9624 100644 --- a/samples/client/petstore-security-test/javascript/docs/FakeApi.md +++ b/samples/client/petstore-security-test/javascript/docs/FakeApi.md @@ -1,6 +1,6 @@ -# SwaggerPetstoreEndRnNR.FakeApi +# OpenApiPetstoreEndRnNR.FakeApi -All URIs are relative to *https://petstore.swagger.io *_/ ' \" =end -- \\r\\n \\n \\r/v2 *_/ ' \" =end -- \\r\\n \\n \\r* +All URIs are relative to *http://petstore.swagger.io *_/ ' \" =end -- \\r\\n \\n \\r/v2 *_/ ' \" =end -- \\r\\n \\n \\r* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -13,16 +13,16 @@ Method | HTTP request | Description To test code injection *_/ ' \" =end -- \\r\\n \\n \\r +To test code injection *_/ ' \" =end -- \\r\\n \\n \\r + ### Example ```javascript -var SwaggerPetstoreEndRnNR = require('swagger_petstore____end____rn_n_r'); +var OpenApiPetstoreEndRnNR = require('open_api_petstore____end____rn_n_r'); -var apiInstance = new SwaggerPetstoreEndRnNR.FakeApi(); - -var opts = { - 'testCodeInjectEndRnNR': "testCodeInjectEndRnNR_example" // String | To test code injection *_/ ' \" =end -- \\r\\n \\n \\r +var apiInstance = new OpenApiPetstoreEndRnNR.FakeApi(); +var opts = { + 'UNKNOWN_BASE_TYPE': new OpenApiPetstoreEndRnNR.UNKNOWN_BASE_TYPE() // UNKNOWN_BASE_TYPE | }; - var callback = function(error, data, response) { if (error) { console.error(error); @@ -37,7 +37,7 @@ apiInstance.testCodeInjectEndRnNR(opts, callback); Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **testCodeInjectEndRnNR** | **String**| To test code injection *_/ ' \" =end -- \\r\\n \\n \\r | [optional] + **UNKNOWN_BASE_TYPE** | [**UNKNOWN_BASE_TYPE**](UNKNOWN_BASE_TYPE.md)| | [optional] ### Return type @@ -50,5 +50,5 @@ No authorization required ### HTTP request headers - **Content-Type**: application/json, *_/ =end -- - - **Accept**: application/json, *_/ =end -- + - **Accept**: Not defined diff --git a/samples/client/petstore-security-test/javascript/docs/ModelReturn.md b/samples/client/petstore-security-test/javascript/docs/ModelReturn.md index e542020a95c8..1ccf256e4e7d 100644 --- a/samples/client/petstore-security-test/javascript/docs/ModelReturn.md +++ b/samples/client/petstore-security-test/javascript/docs/ModelReturn.md @@ -1,4 +1,4 @@ -# SwaggerPetstoreEndRnNR.ModelReturn +# OpenApiPetstoreEndRnNR.ModelReturn ## Properties Name | Type | Description | Notes diff --git a/samples/client/petstore-security-test/javascript/git_push.sh b/samples/client/petstore-security-test/javascript/git_push.sh index 0d041ad0ba49..04dd5df38e83 100644 --- a/samples/client/petstore-security-test/javascript/git_push.sh +++ b/samples/client/petstore-security-test/javascript/git_push.sh @@ -1,7 +1,7 @@ #!/bin/sh # ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ # -# Usage example: /bin/sh ./git_push.sh wing328 swagger-petstore-perl "minor update" +# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" git_user_id=$1 git_repo_id=$2 diff --git a/samples/client/petstore-security-test/javascript/package.json b/samples/client/petstore-security-test/javascript/package.json index 9fae64eb6469..d045d120e0ec 100644 --- a/samples/client/petstore-security-test/javascript/package.json +++ b/samples/client/petstore-security-test/javascript/package.json @@ -1,5 +1,5 @@ { - "name": "swagger_petstore____end____rn_n_r", + "name": "open_api_petstore____end____rn_n_r", "version": "1.0.0 *_/ =end -- \r\n \n \r", "description": "This_spec_is_mainly_for_testing_Petstore_server_and_contains_fake_endpoints_models__Please_do_not_use_this_for_any_other_purpose__Special_characters_______end______", "license": "Apache-2.0 */ ' " =end -- \r\n \n \r", @@ -11,7 +11,7 @@ "fs": false }, "dependencies": { - "superagent": "3.5.2" + "superagent": "3.7.0" }, "devDependencies": { "mocha": "~2.3.4", diff --git a/samples/client/petstore-security-test/javascript/src/ApiClient.js b/samples/client/petstore-security-test/javascript/src/ApiClient.js index 193dcfa683b1..cbcd2ce4c391 100644 --- a/samples/client/petstore-security-test/javascript/src/ApiClient.js +++ b/samples/client/petstore-security-test/javascript/src/ApiClient.js @@ -1,14 +1,14 @@ /** - * Swagger Petstore *_/ ' \" =end -- \\r\\n \\n \\r + * OpenAPI Petstore *_/ ' \" =end -- \\r\\n \\n \\r * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ *_/ ' \" =end -- * * OpenAPI spec version: 1.0.0 *_/ ' \" =end -- \\r\\n \\n \\r - * Contact: apiteam@swagger.io *_/ ' \" =end -- \\r\\n \\n \\r + * Contact: something@something.abc *_/ ' \" =end -- \\r\\n \\n \\r * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech * - * Swagger Codegen version: 2.3.0-SNAPSHOT + * OpenAPI Generator version: 3.2.0-SNAPSHOT * * Do not edit the class manually. * @@ -23,10 +23,10 @@ module.exports = factory(require('superagent'), require('querystring')); } else { // Browser globals (root is window) - if (!root.SwaggerPetstoreEndRnNR) { - root.SwaggerPetstoreEndRnNR = {}; + if (!root.OpenApiPetstoreEndRnNR) { + root.OpenApiPetstoreEndRnNR = {}; } - root.SwaggerPetstoreEndRnNR.ApiClient = factory(root.superagent, root.querystring); + root.OpenApiPetstoreEndRnNR.ApiClient = factory(root.superagent, root.querystring); } }(this, function(superagent, querystring) { 'use strict'; @@ -47,9 +47,9 @@ /** * The base URL against which to resolve every API call's (relative) path. * @type {String} - * @default https://petstore.swagger.io *_/ ' \" =end -- \\r\\n \\n \\r/v2 *_/ ' \" =end -- \\r\\n \\n \\r + * @default http://petstore.swagger.io *_/ ' \" =end -- \\r\\n \\n \\r/v2 *_/ ' \" =end -- \\r\\n \\n \\r */ - this.basePath = 'https://petstore.swagger.io *_/ ' \" =end -- \\r\\n \\n \\r/v2 *_/ ' \" =end -- \\r\\n \\n \\r'.replace(/\/+$/, ''); + this.basePath = 'http://petstore.swagger.io *_/ ' \" =end -- \\r\\n \\n \\r/v2 *_/ ' \" =end -- \\r\\n \\n \\r'.replace(/\/+$/, ''); /** * The authentication methods to be included for all API calls. @@ -96,6 +96,10 @@ this.agent = new superagent.agent(); } + /* + * Allow user to override superagent agent + */ + this.requestAgent = null; }; /** @@ -413,6 +417,12 @@ // set header parameters request.set(this.defaultHeaders).set(this.normalizeParams(headerParams)); + + // set requestAgent if it is set by user + if (this.requestAgent) { + request.agent(this.requestAgent); + } + // set request timeout request.timeout(this.timeout); diff --git a/samples/client/petstore-security-test/javascript/src/api/FakeApi.js b/samples/client/petstore-security-test/javascript/src/api/FakeApi.js index 32e2c7ea1ec7..e7fdb205e7ef 100644 --- a/samples/client/petstore-security-test/javascript/src/api/FakeApi.js +++ b/samples/client/petstore-security-test/javascript/src/api/FakeApi.js @@ -1,14 +1,14 @@ /** - * Swagger Petstore *_/ ' \" =end -- \\r\\n \\n \\r + * OpenAPI Petstore *_/ ' \" =end -- \\r\\n \\n \\r * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ *_/ ' \" =end -- * * OpenAPI spec version: 1.0.0 *_/ ' \" =end -- \\r\\n \\n \\r - * Contact: apiteam@swagger.io *_/ ' \" =end -- \\r\\n \\n \\r + * Contact: something@something.abc *_/ ' \" =end -- \\r\\n \\n \\r * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech * - * Swagger Codegen version: 2.3.0-SNAPSHOT + * OpenAPI Generator version: 3.2.0-SNAPSHOT * * Do not edit the class manually. * @@ -17,18 +17,18 @@ (function(root, factory) { if (typeof define === 'function' && define.amd) { // AMD. Register as an anonymous module. - define(['ApiClient'], factory); + define(['ApiClient', 'model/UNKNOWN_BASE_TYPE'], factory); } else if (typeof module === 'object' && module.exports) { // CommonJS-like environments that support module.exports, like Node. - module.exports = factory(require('../ApiClient')); + module.exports = factory(require('../ApiClient'), require('../model/UNKNOWN_BASE_TYPE')); } else { // Browser globals (root is window) - if (!root.SwaggerPetstoreEndRnNR) { - root.SwaggerPetstoreEndRnNR = {}; + if (!root.OpenApiPetstoreEndRnNR) { + root.OpenApiPetstoreEndRnNR = {}; } - root.SwaggerPetstoreEndRnNR.FakeApi = factory(root.SwaggerPetstoreEndRnNR.ApiClient); + root.OpenApiPetstoreEndRnNR.FakeApi = factory(root.OpenApiPetstoreEndRnNR.ApiClient, root.OpenApiPetstoreEndRnNR.UNKNOWN_BASE_TYPE); } -}(this, function(ApiClient) { +}(this, function(ApiClient, UNKNOWN_BASE_TYPE) { 'use strict'; /** @@ -57,14 +57,15 @@ */ /** + * To test code injection *_/ ' \" =end -- \\r\\n \\n \\r * To test code injection *_/ ' \" =end -- \\r\\n \\n \\r * @param {Object} opts Optional parameters - * @param {String} opts.testCodeInjectEndRnNR To test code injection *_/ ' \" =end -- \\r\\n \\n \\r + * @param {module:model/UNKNOWN_BASE_TYPE} opts.UNKNOWN_BASE_TYPE * @param {module:api/FakeApi~testCodeInjectEndRnNRCallback} callback The callback function, accepting three arguments: error, data, response */ this.testCodeInjectEndRnNR = function(opts, callback) { opts = opts || {}; - var postBody = null; + var postBody = opts['UNKNOWN_BASE_TYPE']; var pathParams = { @@ -76,12 +77,11 @@ var headerParams = { }; var formParams = { - 'test code inject */ ' " =end -- \r\n \n \r': opts['testCodeInjectEndRnNR'] }; var authNames = []; var contentTypes = ['application/json', '*_/ =end -- ']; - var accepts = ['application/json', '*_/ =end -- ']; + var accepts = []; var returnType = null; return this.apiClient.callApi( diff --git a/samples/client/petstore-security-test/javascript/src/index.js b/samples/client/petstore-security-test/javascript/src/index.js index 4da0fef98eac..8006be061a2a 100644 --- a/samples/client/petstore-security-test/javascript/src/index.js +++ b/samples/client/petstore-security-test/javascript/src/index.js @@ -1,14 +1,14 @@ /** - * Swagger Petstore *_/ ' \" =end -- \\r\\n \\n \\r + * OpenAPI Petstore *_/ ' \" =end -- \\r\\n \\n \\r * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ *_/ ' \" =end -- * * OpenAPI spec version: 1.0.0 *_/ ' \" =end -- \\r\\n \\n \\r - * Contact: apiteam@swagger.io *_/ ' \" =end -- \\r\\n \\n \\r + * Contact: something@something.abc *_/ ' \" =end -- \\r\\n \\n \\r * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech * - * Swagger Codegen version: 2.3.0-SNAPSHOT + * OpenAPI Generator version: 3.2.0-SNAPSHOT * * Do not edit the class manually. * @@ -31,9 +31,9 @@ *

* An AMD (recommended!) or CommonJS application will generally do something equivalent to the following: *

-   * var SwaggerPetstoreEndRnNR = require('index'); // See note below*.
-   * var xxxSvc = new SwaggerPetstoreEndRnNR.XxxApi(); // Allocate the API class we're going to use.
-   * var yyyModel = new SwaggerPetstoreEndRnNR.Yyy(); // Construct a model instance.
+   * var OpenApiPetstoreEndRnNR = require('index'); // See note below*.
+   * var xxxSvc = new OpenApiPetstoreEndRnNR.XxxApi(); // Allocate the API class we're going to use.
+   * var yyyModel = new OpenApiPetstoreEndRnNR.Yyy(); // Construct a model instance.
    * yyyModel.someProperty = 'someValue';
    * ...
    * var zzz = xxxSvc.doSomething(yyyModel); // Invoke the service.
@@ -45,8 +45,8 @@
    * 

* A non-AMD browser application (discouraged) might do something like this: *

-   * var xxxSvc = new SwaggerPetstoreEndRnNR.XxxApi(); // Allocate the API class we're going to use.
-   * var yyy = new SwaggerPetstoreEndRnNR.Yyy(); // Construct a model instance.
+   * var xxxSvc = new OpenApiPetstoreEndRnNR.XxxApi(); // Allocate the API class we're going to use.
+   * var yyy = new OpenApiPetstoreEndRnNR.Yyy(); // Construct a model instance.
    * yyyModel.someProperty = 'someValue';
    * ...
    * var zzz = xxxSvc.doSomething(yyyModel); // Invoke the service.
diff --git a/samples/client/petstore-security-test/javascript/src/model/ModelReturn.js b/samples/client/petstore-security-test/javascript/src/model/ModelReturn.js
index 6e9c1fd3c72a..a8865e7e0df9 100644
--- a/samples/client/petstore-security-test/javascript/src/model/ModelReturn.js
+++ b/samples/client/petstore-security-test/javascript/src/model/ModelReturn.js
@@ -1,14 +1,14 @@
 /**
- * Swagger Petstore *_/ ' \" =end -- \\r\\n \\n \\r
+ * OpenAPI Petstore *_/ ' \" =end -- \\r\\n \\n \\r
  * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\  *_/ ' \" =end --       
  *
  * OpenAPI spec version: 1.0.0 *_/ ' \" =end -- \\r\\n \\n \\r
- * Contact: apiteam@swagger.io *_/ ' \" =end -- \\r\\n \\n \\r
+ * Contact: something@something.abc *_/ ' \" =end -- \\r\\n \\n \\r
  *
- * NOTE: This class is auto generated by the swagger code generator program.
- * https://github.com/swagger-api/swagger-codegen.git
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
  *
- * Swagger Codegen version: 2.3.0-SNAPSHOT
+ * OpenAPI Generator version: 3.2.0-SNAPSHOT
  *
  * Do not edit the class manually.
  *
@@ -23,10 +23,10 @@
     module.exports = factory(require('../ApiClient'));
   } else {
     // Browser globals (root is window)
-    if (!root.SwaggerPetstoreEndRnNR) {
-      root.SwaggerPetstoreEndRnNR = {};
+    if (!root.OpenApiPetstoreEndRnNR) {
+      root.OpenApiPetstoreEndRnNR = {};
     }
-    root.SwaggerPetstoreEndRnNR.ModelReturn = factory(root.SwaggerPetstoreEndRnNR.ApiClient);
+    root.OpenApiPetstoreEndRnNR.ModelReturn = factory(root.OpenApiPetstoreEndRnNR.ApiClient);
   }
 }(this, function(ApiClient) {
   'use strict';
diff --git a/samples/client/petstore/cpp-restsdk/.openapi-generator/VERSION b/samples/client/petstore/cpp-restsdk/.openapi-generator/VERSION
index 0f58aa041419..105bb87d77b3 100644
--- a/samples/client/petstore/cpp-restsdk/.openapi-generator/VERSION
+++ b/samples/client/petstore/cpp-restsdk/.openapi-generator/VERSION
@@ -1 +1 @@
-3.1.2-SNAPSHOT
\ No newline at end of file
+3.2.2-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/cpp-restsdk/ApiClient.cpp b/samples/client/petstore/cpp-restsdk/ApiClient.cpp
index dab66e0e6e1c..32a7e44548c5 100644
--- a/samples/client/petstore/cpp-restsdk/ApiClient.cpp
+++ b/samples/client/petstore/cpp-restsdk/ApiClient.cpp
@@ -4,7 +4,7 @@
  *
  * OpenAPI spec version: 1.0.0
  *
- * NOTE: This class is auto generated by OpenAPI-Generator 3.1.2-SNAPSHOT.
+ * NOTE: This class is auto generated by OpenAPI-Generator 3.2.2-SNAPSHOT.
  * https://openapi-generator.tech
  * Do not edit the class manually.
  */
diff --git a/samples/client/petstore/cpp-restsdk/ApiClient.h b/samples/client/petstore/cpp-restsdk/ApiClient.h
index 58d8e78ac07d..2381ce335a38 100644
--- a/samples/client/petstore/cpp-restsdk/ApiClient.h
+++ b/samples/client/petstore/cpp-restsdk/ApiClient.h
@@ -4,7 +4,7 @@
  *
  * OpenAPI spec version: 1.0.0
  *
- * NOTE: This class is auto generated by OpenAPI-Generator 3.1.2-SNAPSHOT.
+ * NOTE: This class is auto generated by OpenAPI-Generator 3.2.2-SNAPSHOT.
  * https://openapi-generator.tech
  * Do not edit the class manually.
  */
diff --git a/samples/client/petstore/cpp-restsdk/ApiConfiguration.cpp b/samples/client/petstore/cpp-restsdk/ApiConfiguration.cpp
index 0f91d7c2cba8..292054f38e69 100644
--- a/samples/client/petstore/cpp-restsdk/ApiConfiguration.cpp
+++ b/samples/client/petstore/cpp-restsdk/ApiConfiguration.cpp
@@ -4,7 +4,7 @@
  *
  * OpenAPI spec version: 1.0.0
  *
- * NOTE: This class is auto generated by OpenAPI-Generator 3.1.2-SNAPSHOT.
+ * NOTE: This class is auto generated by OpenAPI-Generator 3.2.2-SNAPSHOT.
  * https://openapi-generator.tech
  * Do not edit the class manually.
  */
diff --git a/samples/client/petstore/cpp-restsdk/ApiConfiguration.h b/samples/client/petstore/cpp-restsdk/ApiConfiguration.h
index 54dc39c26cfa..c6dde17bc8c6 100644
--- a/samples/client/petstore/cpp-restsdk/ApiConfiguration.h
+++ b/samples/client/petstore/cpp-restsdk/ApiConfiguration.h
@@ -4,7 +4,7 @@
  *
  * OpenAPI spec version: 1.0.0
  *
- * NOTE: This class is auto generated by OpenAPI-Generator 3.1.2-SNAPSHOT.
+ * NOTE: This class is auto generated by OpenAPI-Generator 3.2.2-SNAPSHOT.
  * https://openapi-generator.tech
  * Do not edit the class manually.
  */
diff --git a/samples/client/petstore/cpp-restsdk/ApiException.cpp b/samples/client/petstore/cpp-restsdk/ApiException.cpp
index 1cceca2e6de5..150d30bbd2ce 100644
--- a/samples/client/petstore/cpp-restsdk/ApiException.cpp
+++ b/samples/client/petstore/cpp-restsdk/ApiException.cpp
@@ -4,7 +4,7 @@
  *
  * OpenAPI spec version: 1.0.0
  *
- * NOTE: This class is auto generated by OpenAPI-Generator 3.1.2-SNAPSHOT.
+ * NOTE: This class is auto generated by OpenAPI-Generator 3.2.2-SNAPSHOT.
  * https://openapi-generator.tech
  * Do not edit the class manually.
  */
diff --git a/samples/client/petstore/cpp-restsdk/ApiException.h b/samples/client/petstore/cpp-restsdk/ApiException.h
index ffd7877f3a5f..517313c47f51 100644
--- a/samples/client/petstore/cpp-restsdk/ApiException.h
+++ b/samples/client/petstore/cpp-restsdk/ApiException.h
@@ -4,7 +4,7 @@
  *
  * OpenAPI spec version: 1.0.0
  *
- * NOTE: This class is auto generated by OpenAPI-Generator 3.1.2-SNAPSHOT.
+ * NOTE: This class is auto generated by OpenAPI-Generator 3.2.2-SNAPSHOT.
  * https://openapi-generator.tech
  * Do not edit the class manually.
  */
diff --git a/samples/client/petstore/cpp-restsdk/CMakeLists.txt b/samples/client/petstore/cpp-restsdk/CMakeLists.txt
index 9b5635f905a4..5e7e1cd95a0d 100644
--- a/samples/client/petstore/cpp-restsdk/CMakeLists.txt
+++ b/samples/client/petstore/cpp-restsdk/CMakeLists.txt
@@ -31,14 +31,10 @@ message("A ${CMAKE_BUILD_TYPE} build configuration is detected")
 #find_package(Boost 1.45.0 REQUIRED COMPONENTS ${Boost_THREAD_LIBRARY} ${Boost_SYSTEM_LIBRARY} ${Boost_REGEX_LIBRARY} ${Boost_DATE_TIME_LIBRARY} ${Boost_PROGRAM_OPTIONS_LIBRARY} ${Boost_FILESYSTEM_LIBRARY})
 
 # build and set path to cpp rest sdk
-#set(CPPREST_ROOT ${PROJECT_SOURCE_DIR}/../../../developmentTools/3rdParty/cpprest)
+set(CPPREST_ROOT ${PROJECT_SOURCE_DIR}/3rdParty/cpprest)
 set(CPPREST_INCLUDE_DIR ${CPPREST_ROOT}/include)
 set(CPPREST_LIBRARY_DIR ${CPPREST_ROOT}/lib)
 
-if( NOT DEFINED CPPREST_ROOT )
-    message( FATAL_ERROR "Failed to find cpprest SDK (or missing components). Double check that \"CPPREST_ROOT\" is properly set")
-endif( NOT DEFINED CPPREST_ROOT )
-
 include_directories(${PROJECT_SOURCE_DIR} api model ${CPPREST_INCLUDE_DIR})
 
 #SUPPORTING FILES
diff --git a/samples/client/petstore/cpp-restsdk/HttpContent.cpp b/samples/client/petstore/cpp-restsdk/HttpContent.cpp
index a5823e01eff4..7c7ac5840ba6 100644
--- a/samples/client/petstore/cpp-restsdk/HttpContent.cpp
+++ b/samples/client/petstore/cpp-restsdk/HttpContent.cpp
@@ -4,7 +4,7 @@
  *
  * OpenAPI spec version: 1.0.0
  *
- * NOTE: This class is auto generated by OpenAPI-Generator 3.1.2-SNAPSHOT.
+ * NOTE: This class is auto generated by OpenAPI-Generator 3.2.2-SNAPSHOT.
  * https://openapi-generator.tech
  * Do not edit the class manually.
  */
diff --git a/samples/client/petstore/cpp-restsdk/HttpContent.h b/samples/client/petstore/cpp-restsdk/HttpContent.h
index d3950dbd7835..864ec2075e63 100644
--- a/samples/client/petstore/cpp-restsdk/HttpContent.h
+++ b/samples/client/petstore/cpp-restsdk/HttpContent.h
@@ -4,7 +4,7 @@
  *
  * OpenAPI spec version: 1.0.0
  *
- * NOTE: This class is auto generated by OpenAPI-Generator 3.1.2-SNAPSHOT.
+ * NOTE: This class is auto generated by OpenAPI-Generator 3.2.2-SNAPSHOT.
  * https://openapi-generator.tech
  * Do not edit the class manually.
  */
diff --git a/samples/client/petstore/cpp-restsdk/IHttpBody.h b/samples/client/petstore/cpp-restsdk/IHttpBody.h
index 26a846e5f75c..dc9bc6f089c2 100644
--- a/samples/client/petstore/cpp-restsdk/IHttpBody.h
+++ b/samples/client/petstore/cpp-restsdk/IHttpBody.h
@@ -4,7 +4,7 @@
  *
  * OpenAPI spec version: 1.0.0
  *
- * NOTE: This class is auto generated by OpenAPI-Generator 3.1.2-SNAPSHOT.
+ * NOTE: This class is auto generated by OpenAPI-Generator 3.2.2-SNAPSHOT.
  * https://openapi-generator.tech
  * Do not edit the class manually.
  */
diff --git a/samples/client/petstore/cpp-restsdk/JsonBody.cpp b/samples/client/petstore/cpp-restsdk/JsonBody.cpp
index 1958337d03de..c2f9c451061f 100644
--- a/samples/client/petstore/cpp-restsdk/JsonBody.cpp
+++ b/samples/client/petstore/cpp-restsdk/JsonBody.cpp
@@ -4,7 +4,7 @@
  *
  * OpenAPI spec version: 1.0.0
  *
- * NOTE: This class is auto generated by OpenAPI-Generator 3.1.2-SNAPSHOT.
+ * NOTE: This class is auto generated by OpenAPI-Generator 3.2.2-SNAPSHOT.
  * https://openapi-generator.tech
  * Do not edit the class manually.
  */
diff --git a/samples/client/petstore/cpp-restsdk/JsonBody.h b/samples/client/petstore/cpp-restsdk/JsonBody.h
index 3159dfa94d00..3f5702dfb882 100644
--- a/samples/client/petstore/cpp-restsdk/JsonBody.h
+++ b/samples/client/petstore/cpp-restsdk/JsonBody.h
@@ -4,7 +4,7 @@
  *
  * OpenAPI spec version: 1.0.0
  *
- * NOTE: This class is auto generated by OpenAPI-Generator 3.1.2-SNAPSHOT.
+ * NOTE: This class is auto generated by OpenAPI-Generator 3.2.2-SNAPSHOT.
  * https://openapi-generator.tech
  * Do not edit the class manually.
  */
diff --git a/samples/client/petstore/cpp-restsdk/ModelBase.cpp b/samples/client/petstore/cpp-restsdk/ModelBase.cpp
index a4dc77d750c9..c0ef13e4ac24 100644
--- a/samples/client/petstore/cpp-restsdk/ModelBase.cpp
+++ b/samples/client/petstore/cpp-restsdk/ModelBase.cpp
@@ -4,7 +4,7 @@
  *
  * OpenAPI spec version: 1.0.0
  *
- * NOTE: This class is auto generated by OpenAPI-Generator 3.1.2-SNAPSHOT.
+ * NOTE: This class is auto generated by OpenAPI-Generator 3.2.2-SNAPSHOT.
  * https://openapi-generator.tech
  * Do not edit the class manually.
  */
diff --git a/samples/client/petstore/cpp-restsdk/ModelBase.h b/samples/client/petstore/cpp-restsdk/ModelBase.h
index 4d804a460137..8c2a0d80a002 100644
--- a/samples/client/petstore/cpp-restsdk/ModelBase.h
+++ b/samples/client/petstore/cpp-restsdk/ModelBase.h
@@ -4,7 +4,7 @@
  *
  * OpenAPI spec version: 1.0.0
  *
- * NOTE: This class is auto generated by OpenAPI-Generator 3.1.2-SNAPSHOT.
+ * NOTE: This class is auto generated by OpenAPI-Generator 3.2.2-SNAPSHOT.
  * https://openapi-generator.tech
  * Do not edit the class manually.
  */
diff --git a/samples/client/petstore/cpp-restsdk/MultipartFormData.cpp b/samples/client/petstore/cpp-restsdk/MultipartFormData.cpp
index 7879d7afe441..b1cd75ded0e4 100644
--- a/samples/client/petstore/cpp-restsdk/MultipartFormData.cpp
+++ b/samples/client/petstore/cpp-restsdk/MultipartFormData.cpp
@@ -4,7 +4,7 @@
  *
  * OpenAPI spec version: 1.0.0
  *
- * NOTE: This class is auto generated by OpenAPI-Generator 3.1.2-SNAPSHOT.
+ * NOTE: This class is auto generated by OpenAPI-Generator 3.2.2-SNAPSHOT.
  * https://openapi-generator.tech
  * Do not edit the class manually.
  */
diff --git a/samples/client/petstore/cpp-restsdk/MultipartFormData.h b/samples/client/petstore/cpp-restsdk/MultipartFormData.h
index 8f03432efa8a..6542845bcc19 100644
--- a/samples/client/petstore/cpp-restsdk/MultipartFormData.h
+++ b/samples/client/petstore/cpp-restsdk/MultipartFormData.h
@@ -4,7 +4,7 @@
  *
  * OpenAPI spec version: 1.0.0
  *
- * NOTE: This class is auto generated by OpenAPI-Generator 3.1.2-SNAPSHOT.
+ * NOTE: This class is auto generated by OpenAPI-Generator 3.2.2-SNAPSHOT.
  * https://openapi-generator.tech
  * Do not edit the class manually.
  */
diff --git a/samples/client/petstore/cpp-restsdk/Object.cpp b/samples/client/petstore/cpp-restsdk/Object.cpp
index a0d392f89951..42694b488ed4 100644
--- a/samples/client/petstore/cpp-restsdk/Object.cpp
+++ b/samples/client/petstore/cpp-restsdk/Object.cpp
@@ -4,7 +4,7 @@
  *
  * OpenAPI spec version: 1.0.0
  *
- * NOTE: This class is auto generated by OpenAPI-Generator 3.1.2-SNAPSHOT.
+ * NOTE: This class is auto generated by OpenAPI-Generator 3.2.2-SNAPSHOT.
  * https://openapi-generator.tech
  * Do not edit the class manually.
  */
diff --git a/samples/client/petstore/cpp-restsdk/Object.h b/samples/client/petstore/cpp-restsdk/Object.h
index a6ce69a13ad8..a8f58b43a972 100644
--- a/samples/client/petstore/cpp-restsdk/Object.h
+++ b/samples/client/petstore/cpp-restsdk/Object.h
@@ -4,7 +4,7 @@
  *
  * OpenAPI spec version: 1.0.0
  *
- * NOTE: This class is auto generated by OpenAPI-Generator 3.1.2-SNAPSHOT.
+ * NOTE: This class is auto generated by OpenAPI-Generator 3.2.2-SNAPSHOT.
  * https://openapi-generator.tech
  * Do not edit the class manually.
  */
diff --git a/samples/client/petstore/cpp-restsdk/README.md b/samples/client/petstore/cpp-restsdk/README.md
new file mode 100644
index 000000000000..92981e519c4d
--- /dev/null
+++ b/samples/client/petstore/cpp-restsdk/README.md
@@ -0,0 +1,35 @@
+# C++ API client
+
+This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
+
+## Overview
+This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [OpenAPI spec](https://openapis.org) from a remote server, you can easily generate an API client.
+
+- API version: 1.0.0
+- Package version: 
+- Build package: org.openapitools.codegen.languages.CppRestSdkClientCodegen
+
+- API namespace: org.openapitools.client.api
+- Model namespace: org.openapitools.client.model
+
+## Installation
+
+### Prerequisites
+
+Install [cpprestsdk](https://github.com/Microsoft/cpprestsdk).
+
+- Windows: `vcpkg install cpprestsdk cpprestsdk:x64-windows`
+- Mac: `brew install cpprestsdk`
+- Linux: `sudo apt-get install libcpprest-dev`
+
+### Build
+
+```sh
+cmake -DCPPREST_ROOT=/usr -DCMAKE_CXX_FLAGS="-I/usr/local/opt/openssl/include" -DCMAKE_MODULE_LINKER_FLAGS="-L/usr/local/opt/openssl/lib"
+make
+```
+
+## Author
+
+
+
diff --git a/samples/client/petstore/cpp-restsdk/api/PetApi.cpp b/samples/client/petstore/cpp-restsdk/api/PetApi.cpp
index 1e3f68f82291..c2f9a7f99f73 100644
--- a/samples/client/petstore/cpp-restsdk/api/PetApi.cpp
+++ b/samples/client/petstore/cpp-restsdk/api/PetApi.cpp
@@ -4,7 +4,7 @@
  *
  * OpenAPI spec version: 1.0.0
  *
- * NOTE: This class is auto generated by OpenAPI-Generator 3.1.2-SNAPSHOT.
+ * NOTE: This class is auto generated by OpenAPI-Generator 3.2.2-SNAPSHOT.
  * https://openapi-generator.tech
  * Do not edit the class manually.
  */
diff --git a/samples/client/petstore/cpp-restsdk/api/PetApi.h b/samples/client/petstore/cpp-restsdk/api/PetApi.h
index 477738c30b2e..e63710124ca7 100644
--- a/samples/client/petstore/cpp-restsdk/api/PetApi.h
+++ b/samples/client/petstore/cpp-restsdk/api/PetApi.h
@@ -4,7 +4,7 @@
  *
  * OpenAPI spec version: 1.0.0
  *
- * NOTE: This class is auto generated by OpenAPI-Generator 3.1.2-SNAPSHOT.
+ * NOTE: This class is auto generated by OpenAPI-Generator 3.2.2-SNAPSHOT.
  * https://openapi-generator.tech
  * Do not edit the class manually.
  */
@@ -43,7 +43,7 @@ public:
 
     explicit PetApi( std::shared_ptr apiClient );
 
-    virtual ~PetApi() = default;
+    virtual ~PetApi();
 
     /// 
     /// Add a new pet to the store
diff --git a/samples/client/petstore/cpp-restsdk/api/StoreApi.cpp b/samples/client/petstore/cpp-restsdk/api/StoreApi.cpp
index c73c34e395c0..ca188d173289 100644
--- a/samples/client/petstore/cpp-restsdk/api/StoreApi.cpp
+++ b/samples/client/petstore/cpp-restsdk/api/StoreApi.cpp
@@ -4,7 +4,7 @@
  *
  * OpenAPI spec version: 1.0.0
  *
- * NOTE: This class is auto generated by OpenAPI-Generator 3.1.2-SNAPSHOT.
+ * NOTE: This class is auto generated by OpenAPI-Generator 3.2.2-SNAPSHOT.
  * https://openapi-generator.tech
  * Do not edit the class manually.
  */
diff --git a/samples/client/petstore/cpp-restsdk/api/StoreApi.h b/samples/client/petstore/cpp-restsdk/api/StoreApi.h
index 0f3e53e3d3bc..f952506a16dc 100644
--- a/samples/client/petstore/cpp-restsdk/api/StoreApi.h
+++ b/samples/client/petstore/cpp-restsdk/api/StoreApi.h
@@ -4,7 +4,7 @@
  *
  * OpenAPI spec version: 1.0.0
  *
- * NOTE: This class is auto generated by OpenAPI-Generator 3.1.2-SNAPSHOT.
+ * NOTE: This class is auto generated by OpenAPI-Generator 3.2.2-SNAPSHOT.
  * https://openapi-generator.tech
  * Do not edit the class manually.
  */
@@ -42,7 +42,7 @@ public:
 
     explicit StoreApi( std::shared_ptr apiClient );
 
-    virtual ~StoreApi() = default;
+    virtual ~StoreApi();
 
     /// 
     /// Delete purchase order by ID
diff --git a/samples/client/petstore/cpp-restsdk/api/UserApi.cpp b/samples/client/petstore/cpp-restsdk/api/UserApi.cpp
index 9f97981f9284..9a466b26c153 100644
--- a/samples/client/petstore/cpp-restsdk/api/UserApi.cpp
+++ b/samples/client/petstore/cpp-restsdk/api/UserApi.cpp
@@ -4,7 +4,7 @@
  *
  * OpenAPI spec version: 1.0.0
  *
- * NOTE: This class is auto generated by OpenAPI-Generator 3.1.2-SNAPSHOT.
+ * NOTE: This class is auto generated by OpenAPI-Generator 3.2.2-SNAPSHOT.
  * https://openapi-generator.tech
  * Do not edit the class manually.
  */
diff --git a/samples/client/petstore/cpp-restsdk/api/UserApi.h b/samples/client/petstore/cpp-restsdk/api/UserApi.h
index e02bc2df54bb..d74deecb3d08 100644
--- a/samples/client/petstore/cpp-restsdk/api/UserApi.h
+++ b/samples/client/petstore/cpp-restsdk/api/UserApi.h
@@ -4,7 +4,7 @@
  *
  * OpenAPI spec version: 1.0.0
  *
- * NOTE: This class is auto generated by OpenAPI-Generator 3.1.2-SNAPSHOT.
+ * NOTE: This class is auto generated by OpenAPI-Generator 3.2.2-SNAPSHOT.
  * https://openapi-generator.tech
  * Do not edit the class manually.
  */
@@ -42,7 +42,7 @@ public:
 
     explicit UserApi( std::shared_ptr apiClient );
 
-    virtual ~UserApi() = default;
+    virtual ~UserApi();
 
     /// 
     /// Create user
diff --git a/samples/client/petstore/cpp-restsdk/model/ApiResponse.cpp b/samples/client/petstore/cpp-restsdk/model/ApiResponse.cpp
index b8a7e58a3b71..b93cbb85328c 100644
--- a/samples/client/petstore/cpp-restsdk/model/ApiResponse.cpp
+++ b/samples/client/petstore/cpp-restsdk/model/ApiResponse.cpp
@@ -4,7 +4,7 @@
  *
  * OpenAPI spec version: 1.0.0
  *
- * NOTE: This class is auto generated by OpenAPI-Generator 3.1.2-SNAPSHOT.
+ * NOTE: This class is auto generated by OpenAPI-Generator 3.2.2-SNAPSHOT.
  * https://openapi-generator.tech
  * Do not edit the class manually.
  */
diff --git a/samples/client/petstore/cpp-restsdk/model/ApiResponse.h b/samples/client/petstore/cpp-restsdk/model/ApiResponse.h
index bad104156764..fc1bf4e61092 100644
--- a/samples/client/petstore/cpp-restsdk/model/ApiResponse.h
+++ b/samples/client/petstore/cpp-restsdk/model/ApiResponse.h
@@ -4,7 +4,7 @@
  *
  * OpenAPI spec version: 1.0.0
  *
- * NOTE: This class is auto generated by OpenAPI-Generator 3.1.2-SNAPSHOT.
+ * NOTE: This class is auto generated by OpenAPI-Generator 3.2.2-SNAPSHOT.
  * https://openapi-generator.tech
  * Do not edit the class manually.
  */
diff --git a/samples/client/petstore/cpp-restsdk/model/Category.cpp b/samples/client/petstore/cpp-restsdk/model/Category.cpp
index e765cdccd081..534940108008 100644
--- a/samples/client/petstore/cpp-restsdk/model/Category.cpp
+++ b/samples/client/petstore/cpp-restsdk/model/Category.cpp
@@ -4,7 +4,7 @@
  *
  * OpenAPI spec version: 1.0.0
  *
- * NOTE: This class is auto generated by OpenAPI-Generator 3.1.2-SNAPSHOT.
+ * NOTE: This class is auto generated by OpenAPI-Generator 3.2.2-SNAPSHOT.
  * https://openapi-generator.tech
  * Do not edit the class manually.
  */
diff --git a/samples/client/petstore/cpp-restsdk/model/Category.h b/samples/client/petstore/cpp-restsdk/model/Category.h
index 93c2e24a51f3..ab370a4bb03c 100644
--- a/samples/client/petstore/cpp-restsdk/model/Category.h
+++ b/samples/client/petstore/cpp-restsdk/model/Category.h
@@ -4,7 +4,7 @@
  *
  * OpenAPI spec version: 1.0.0
  *
- * NOTE: This class is auto generated by OpenAPI-Generator 3.1.2-SNAPSHOT.
+ * NOTE: This class is auto generated by OpenAPI-Generator 3.2.2-SNAPSHOT.
  * https://openapi-generator.tech
  * Do not edit the class manually.
  */
diff --git a/samples/client/petstore/cpp-restsdk/model/Order.cpp b/samples/client/petstore/cpp-restsdk/model/Order.cpp
index fdad2a0ef4ea..7f5b5464d5f1 100644
--- a/samples/client/petstore/cpp-restsdk/model/Order.cpp
+++ b/samples/client/petstore/cpp-restsdk/model/Order.cpp
@@ -4,7 +4,7 @@
  *
  * OpenAPI spec version: 1.0.0
  *
- * NOTE: This class is auto generated by OpenAPI-Generator 3.1.2-SNAPSHOT.
+ * NOTE: This class is auto generated by OpenAPI-Generator 3.2.2-SNAPSHOT.
  * https://openapi-generator.tech
  * Do not edit the class manually.
  */
diff --git a/samples/client/petstore/cpp-restsdk/model/Order.h b/samples/client/petstore/cpp-restsdk/model/Order.h
index b83944fc7e25..b2d4410d6436 100644
--- a/samples/client/petstore/cpp-restsdk/model/Order.h
+++ b/samples/client/petstore/cpp-restsdk/model/Order.h
@@ -4,7 +4,7 @@
  *
  * OpenAPI spec version: 1.0.0
  *
- * NOTE: This class is auto generated by OpenAPI-Generator 3.1.2-SNAPSHOT.
+ * NOTE: This class is auto generated by OpenAPI-Generator 3.2.2-SNAPSHOT.
  * https://openapi-generator.tech
  * Do not edit the class manually.
  */
diff --git a/samples/client/petstore/cpp-restsdk/model/Pet.cpp b/samples/client/petstore/cpp-restsdk/model/Pet.cpp
index 23b929497215..78fed60be7d5 100644
--- a/samples/client/petstore/cpp-restsdk/model/Pet.cpp
+++ b/samples/client/petstore/cpp-restsdk/model/Pet.cpp
@@ -4,7 +4,7 @@
  *
  * OpenAPI spec version: 1.0.0
  *
- * NOTE: This class is auto generated by OpenAPI-Generator 3.1.2-SNAPSHOT.
+ * NOTE: This class is auto generated by OpenAPI-Generator 3.2.2-SNAPSHOT.
  * https://openapi-generator.tech
  * Do not edit the class manually.
  */
diff --git a/samples/client/petstore/cpp-restsdk/model/Pet.h b/samples/client/petstore/cpp-restsdk/model/Pet.h
index 6746c826ca81..c4e0d0b49787 100644
--- a/samples/client/petstore/cpp-restsdk/model/Pet.h
+++ b/samples/client/petstore/cpp-restsdk/model/Pet.h
@@ -4,7 +4,7 @@
  *
  * OpenAPI spec version: 1.0.0
  *
- * NOTE: This class is auto generated by OpenAPI-Generator 3.1.2-SNAPSHOT.
+ * NOTE: This class is auto generated by OpenAPI-Generator 3.2.2-SNAPSHOT.
  * https://openapi-generator.tech
  * Do not edit the class manually.
  */
diff --git a/samples/client/petstore/cpp-restsdk/model/Tag.cpp b/samples/client/petstore/cpp-restsdk/model/Tag.cpp
index 91e608bec9e2..8c0c537cf260 100644
--- a/samples/client/petstore/cpp-restsdk/model/Tag.cpp
+++ b/samples/client/petstore/cpp-restsdk/model/Tag.cpp
@@ -4,7 +4,7 @@
  *
  * OpenAPI spec version: 1.0.0
  *
- * NOTE: This class is auto generated by OpenAPI-Generator 3.1.2-SNAPSHOT.
+ * NOTE: This class is auto generated by OpenAPI-Generator 3.2.2-SNAPSHOT.
  * https://openapi-generator.tech
  * Do not edit the class manually.
  */
diff --git a/samples/client/petstore/cpp-restsdk/model/Tag.h b/samples/client/petstore/cpp-restsdk/model/Tag.h
index 11c00f1bfe27..b2b49f58c433 100644
--- a/samples/client/petstore/cpp-restsdk/model/Tag.h
+++ b/samples/client/petstore/cpp-restsdk/model/Tag.h
@@ -4,7 +4,7 @@
  *
  * OpenAPI spec version: 1.0.0
  *
- * NOTE: This class is auto generated by OpenAPI-Generator 3.1.2-SNAPSHOT.
+ * NOTE: This class is auto generated by OpenAPI-Generator 3.2.2-SNAPSHOT.
  * https://openapi-generator.tech
  * Do not edit the class manually.
  */
diff --git a/samples/client/petstore/cpp-restsdk/model/User.cpp b/samples/client/petstore/cpp-restsdk/model/User.cpp
index 8484091ae8c3..511811b9f087 100644
--- a/samples/client/petstore/cpp-restsdk/model/User.cpp
+++ b/samples/client/petstore/cpp-restsdk/model/User.cpp
@@ -4,7 +4,7 @@
  *
  * OpenAPI spec version: 1.0.0
  *
- * NOTE: This class is auto generated by OpenAPI-Generator 3.1.2-SNAPSHOT.
+ * NOTE: This class is auto generated by OpenAPI-Generator 3.2.2-SNAPSHOT.
  * https://openapi-generator.tech
  * Do not edit the class manually.
  */
diff --git a/samples/client/petstore/cpp-restsdk/model/User.h b/samples/client/petstore/cpp-restsdk/model/User.h
index 1a8271f26e62..aca144de9334 100644
--- a/samples/client/petstore/cpp-restsdk/model/User.h
+++ b/samples/client/petstore/cpp-restsdk/model/User.h
@@ -4,7 +4,7 @@
  *
  * OpenAPI spec version: 1.0.0
  *
- * NOTE: This class is auto generated by OpenAPI-Generator 3.1.2-SNAPSHOT.
+ * NOTE: This class is auto generated by OpenAPI-Generator 3.2.2-SNAPSHOT.
  * https://openapi-generator.tech
  * Do not edit the class manually.
  */
diff --git a/samples/client/petstore/cpp-restsdk/pom.xml b/samples/client/petstore/cpp-restsdk/pom.xml
new file mode 100644
index 000000000000..f127ec6ede34
--- /dev/null
+++ b/samples/client/petstore/cpp-restsdk/pom.xml
@@ -0,0 +1,57 @@
+
+    4.0.0
+    org.openapitools
+    CppRestPetstoreClientTests
+    pom
+    1.0-SNAPSHOT
+    CppRest Petstore Client
+    
+        
+            
+                maven-dependency-plugin
+                
+                    
+                        package
+                        
+                            copy-dependencies
+                        
+                        
+                            ${project.build.directory}
+                        
+                    
+                
+            
+            
+                org.codehaus.mojo
+                exec-maven-plugin
+                1.2.1
+                
+                    
+                        cmake
+                        pre-integration-test
+                        
+                            exec
+                        
+                        
+                            cmake
+                            
+                                -DCMAKE_CXX_FLAGS="-I/usr/local/opt/openssl/include"
+                                -DCMAKE_MODULE_LINKER_FLAGS="-L/usr/local/opt/openssl/lib"
+                            
+                        
+                    
+                    
+                        make
+                        integration-test
+                        
+                            exec
+                        
+                        
+                            make
+                        
+                    
+                
+            
+        
+    
+
diff --git a/samples/client/petstore/csharp/OpenAPIClient/.openapi-generator/VERSION b/samples/client/petstore/csharp/OpenAPIClient/.openapi-generator/VERSION
index 096bf47efe31..afa636560641 100644
--- a/samples/client/petstore/csharp/OpenAPIClient/.openapi-generator/VERSION
+++ b/samples/client/petstore/csharp/OpenAPIClient/.openapi-generator/VERSION
@@ -1 +1 @@
-3.0.0-SNAPSHOT
\ No newline at end of file
+4.0.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/csharp/OpenAPIClient/README.md b/samples/client/petstore/csharp/OpenAPIClient/README.md
index 441abc408817..a2b8a9b17a0f 100644
--- a/samples/client/petstore/csharp/OpenAPIClient/README.md
+++ b/samples/client/petstore/csharp/OpenAPIClient/README.md
@@ -76,12 +76,12 @@ namespace Example
             try
             {
                 // To test special tags
-                ModelClient result = apiInstance.TestSpecialTags(modelClient);
+                ModelClient result = apiInstance.Call123TestSpecialTags(modelClient);
                 Debug.WriteLine(result);
             }
             catch (Exception e)
             {
-                Debug.Print("Exception when calling AnotherFakeApi.TestSpecialTags: " + e.Message );
+                Debug.Print("Exception when calling AnotherFakeApi.Call123TestSpecialTags: " + e.Message );
             }
 
         }
@@ -96,11 +96,12 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
 
 Class | Method | HTTP request | Description
 ------------ | ------------- | ------------- | -------------
-*AnotherFakeApi* | [**TestSpecialTags**](docs/AnotherFakeApi.md#testspecialtags) | **PATCH** /another-fake/dummy | To test special tags
+*AnotherFakeApi* | [**Call123TestSpecialTags**](docs/AnotherFakeApi.md#call123testspecialtags) | **PATCH** /another-fake/dummy | To test special tags
 *FakeApi* | [**FakeOuterBooleanSerialize**](docs/FakeApi.md#fakeouterbooleanserialize) | **POST** /fake/outer/boolean | 
 *FakeApi* | [**FakeOuterCompositeSerialize**](docs/FakeApi.md#fakeoutercompositeserialize) | **POST** /fake/outer/composite | 
 *FakeApi* | [**FakeOuterNumberSerialize**](docs/FakeApi.md#fakeouternumberserialize) | **POST** /fake/outer/number | 
 *FakeApi* | [**FakeOuterStringSerialize**](docs/FakeApi.md#fakeouterstringserialize) | **POST** /fake/outer/string | 
+*FakeApi* | [**TestBodyWithFileSchema**](docs/FakeApi.md#testbodywithfileschema) | **PUT** /fake/body-with-file-schema | 
 *FakeApi* | [**TestBodyWithQueryParams**](docs/FakeApi.md#testbodywithqueryparams) | **PUT** /fake/body-with-query-params | 
 *FakeApi* | [**TestClientModel**](docs/FakeApi.md#testclientmodel) | **PATCH** /fake | To test \"client\" model
 *FakeApi* | [**TestEndpointParameters**](docs/FakeApi.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 
@@ -116,6 +117,7 @@ Class | Method | HTTP request | Description
 *PetApi* | [**UpdatePet**](docs/PetApi.md#updatepet) | **PUT** /pet | Update an existing pet
 *PetApi* | [**UpdatePetWithForm**](docs/PetApi.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data
 *PetApi* | [**UploadFile**](docs/PetApi.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image
+*PetApi* | [**UploadFileWithRequiredFile**](docs/PetApi.md#uploadfilewithrequiredfile) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required)
 *StoreApi* | [**DeleteOrder**](docs/StoreApi.md#deleteorder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID
 *StoreApi* | [**GetInventory**](docs/StoreApi.md#getinventory) | **GET** /store/inventory | Returns pet inventories by status
 *StoreApi* | [**GetOrderById**](docs/StoreApi.md#getorderbyid) | **GET** /store/order/{order_id} | Find purchase order by ID
@@ -148,6 +150,8 @@ Class | Method | HTTP request | Description
  - [Model.EnumArrays](docs/EnumArrays.md)
  - [Model.EnumClass](docs/EnumClass.md)
  - [Model.EnumTest](docs/EnumTest.md)
+ - [Model.File](docs/File.md)
+ - [Model.FileSchemaTestClass](docs/FileSchemaTestClass.md)
  - [Model.FormatTest](docs/FormatTest.md)
  - [Model.HasOnlyReadOnly](docs/HasOnlyReadOnly.md)
  - [Model.List](docs/List.md)
@@ -164,6 +168,7 @@ Class | Method | HTTP request | Description
  - [Model.ReadOnlyFirst](docs/ReadOnlyFirst.md)
  - [Model.Return](docs/Return.md)
  - [Model.SpecialModelName](docs/SpecialModelName.md)
+ - [Model.StringBooleanMap](docs/StringBooleanMap.md)
  - [Model.Tag](docs/Tag.md)
  - [Model.User](docs/User.md)
 
diff --git a/samples/client/petstore/csharp/OpenAPIClient/docs/AnotherFakeApi.md b/samples/client/petstore/csharp/OpenAPIClient/docs/AnotherFakeApi.md
index 2dca444f2768..81cc3106d64f 100644
--- a/samples/client/petstore/csharp/OpenAPIClient/docs/AnotherFakeApi.md
+++ b/samples/client/petstore/csharp/OpenAPIClient/docs/AnotherFakeApi.md
@@ -4,16 +4,16 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
 
 Method | HTTP request | Description
 ------------- | ------------- | -------------
-[**TestSpecialTags**](AnotherFakeApi.md#testspecialtags) | **PATCH** /another-fake/dummy | To test special tags
+[**Call123TestSpecialTags**](AnotherFakeApi.md#call123testspecialtags) | **PATCH** /another-fake/dummy | To test special tags
 
 
-
-# **TestSpecialTags**
-> ModelClient TestSpecialTags (ModelClient modelClient)
+
+# **Call123TestSpecialTags**
+> ModelClient Call123TestSpecialTags (ModelClient modelClient)
 
 To test special tags
 
-To test special tags
+To test special tags and operation ID starting with number
 
 ### Example
 ```csharp
@@ -25,7 +25,7 @@ using Org.OpenAPITools.Model;
 
 namespace Example
 {
-    public class TestSpecialTagsExample
+    public class Call123TestSpecialTagsExample
     {
         public void main()
         {
@@ -35,12 +35,12 @@ namespace Example
             try
             {
                 // To test special tags
-                ModelClient result = apiInstance.TestSpecialTags(modelClient);
+                ModelClient result = apiInstance.Call123TestSpecialTags(modelClient);
                 Debug.WriteLine(result);
             }
             catch (Exception e)
             {
-                Debug.Print("Exception when calling AnotherFakeApi.TestSpecialTags: " + e.Message );
+                Debug.Print("Exception when calling AnotherFakeApi.Call123TestSpecialTags: " + e.Message );
             }
         }
     }
diff --git a/samples/client/petstore/csharp/OpenAPIClient/docs/FakeApi.md b/samples/client/petstore/csharp/OpenAPIClient/docs/FakeApi.md
index 2a4fb6094ae0..d51d29c09a6b 100644
--- a/samples/client/petstore/csharp/OpenAPIClient/docs/FakeApi.md
+++ b/samples/client/petstore/csharp/OpenAPIClient/docs/FakeApi.md
@@ -8,6 +8,7 @@ Method | HTTP request | Description
 [**FakeOuterCompositeSerialize**](FakeApi.md#fakeoutercompositeserialize) | **POST** /fake/outer/composite | 
 [**FakeOuterNumberSerialize**](FakeApi.md#fakeouternumberserialize) | **POST** /fake/outer/number | 
 [**FakeOuterStringSerialize**](FakeApi.md#fakeouterstringserialize) | **POST** /fake/outer/string | 
+[**TestBodyWithFileSchema**](FakeApi.md#testbodywithfileschema) | **PUT** /fake/body-with-file-schema | 
 [**TestBodyWithQueryParams**](FakeApi.md#testbodywithqueryparams) | **PUT** /fake/body-with-query-params | 
 [**TestClientModel**](FakeApi.md#testclientmodel) | **PATCH** /fake | To test \"client\" model
 [**TestEndpointParameters**](FakeApi.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 
@@ -159,7 +160,7 @@ namespace Example
         public void main()
         {
             var apiInstance = new FakeApi();
-            var body = 1.2;  // decimal? | Input number as post body (optional) 
+            var body = 1.2D;  // decimal? | Input number as post body (optional) 
 
             try
             {
@@ -256,6 +257,65 @@ No authorization required
 
 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
 
+
+# **TestBodyWithFileSchema**
+> void TestBodyWithFileSchema (FileSchemaTestClass fileSchemaTestClass)
+
+
+
+For this test, the body for this request much reference a schema named `File`.
+
+### Example
+```csharp
+using System;
+using System.Diagnostics;
+using Org.OpenAPITools.Api;
+using Org.OpenAPITools.Client;
+using Org.OpenAPITools.Model;
+
+namespace Example
+{
+    public class TestBodyWithFileSchemaExample
+    {
+        public void main()
+        {
+            var apiInstance = new FakeApi();
+            var fileSchemaTestClass = new FileSchemaTestClass(); // FileSchemaTestClass | 
+
+            try
+            {
+                apiInstance.TestBodyWithFileSchema(fileSchemaTestClass);
+            }
+            catch (Exception e)
+            {
+                Debug.Print("Exception when calling FakeApi.TestBodyWithFileSchema: " + e.Message );
+            }
+        }
+    }
+}
+```
+
+### Parameters
+
+Name | Type | Description  | Notes
+------------- | ------------- | ------------- | -------------
+ **fileSchemaTestClass** | [**FileSchemaTestClass**](FileSchemaTestClass.md)|  | 
+
+### Return type
+
+void (empty response body)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: Not defined
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
 
 # **TestBodyWithQueryParams**
 > void TestBodyWithQueryParams (string query, User user)
@@ -404,13 +464,13 @@ namespace Example
 
             var apiInstance = new FakeApi();
             var number = 8.14;  // decimal? | None
-            var _double = 1.2;  // double? | None
+            var _double = 1.2D;  // double? | None
             var patternWithoutDelimiter = patternWithoutDelimiter_example;  // string | None
             var _byte = BYTE_ARRAY_DATA_HERE;  // byte[] | None
             var integer = 56;  // int? | None (optional) 
             var int32 = 56;  // int? | None (optional) 
             var int64 = 789;  // long? | None (optional) 
-            var _float = 3.4;  // float? | None (optional) 
+            var _float = 3.4F;  // float? | None (optional) 
             var _string = _string_example;  // string | None (optional) 
             var binary = BINARY_DATA_HERE;  // System.IO.Stream | None (optional) 
             var date = 2013-10-20;  // DateTime? | None (optional) 
@@ -494,8 +554,8 @@ namespace Example
             var enumQueryStringArray = enumQueryStringArray_example;  // List | Query parameter enum test (string array) (optional) 
             var enumQueryString = enumQueryString_example;  // string | Query parameter enum test (string) (optional)  (default to -efg)
             var enumQueryInteger = 56;  // int? | Query parameter enum test (double) (optional) 
-            var enumQueryDouble = 1.2;  // double? | Query parameter enum test (double) (optional) 
-            var enumFormStringArray = enumFormStringArray_example;  // List | Form parameter enum test (string array) (optional)  (default to $)
+            var enumQueryDouble = 1.2D;  // double? | Query parameter enum test (double) (optional) 
+            var enumFormStringArray = new List(); // List | Form parameter enum test (string array) (optional)  (default to $)
             var enumFormString = enumFormString_example;  // string | Form parameter enum test (string) (optional)  (default to -efg)
 
             try
@@ -522,7 +582,7 @@ Name | Type | Description  | Notes
  **enumQueryString** | **string**| Query parameter enum test (string) | [optional] [default to -efg]
  **enumQueryInteger** | **int?**| Query parameter enum test (double) | [optional] 
  **enumQueryDouble** | **double?**| Query parameter enum test (double) | [optional] 
- **enumFormStringArray** | **List<string>**| Form parameter enum test (string array) | [optional] [default to $]
+ **enumFormStringArray** | [**List<string>**](string.md)| Form parameter enum test (string array) | [optional] [default to $]
  **enumFormString** | **string**| Form parameter enum test (string) | [optional] [default to -efg]
 
 ### Return type
diff --git a/samples/client/petstore/csharp/OpenAPIClient/docs/File.md b/samples/client/petstore/csharp/OpenAPIClient/docs/File.md
new file mode 100644
index 000000000000..acf85a4c001a
--- /dev/null
+++ b/samples/client/petstore/csharp/OpenAPIClient/docs/File.md
@@ -0,0 +1,9 @@
+# Org.OpenAPITools.Model.File
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**SourceURI** | **string** | Test capitalization | [optional] 
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
diff --git a/samples/client/petstore/csharp/OpenAPIClient/docs/FileSchemaTestClass.md b/samples/client/petstore/csharp/OpenAPIClient/docs/FileSchemaTestClass.md
new file mode 100644
index 000000000000..e0820fa4e650
--- /dev/null
+++ b/samples/client/petstore/csharp/OpenAPIClient/docs/FileSchemaTestClass.md
@@ -0,0 +1,10 @@
+# Org.OpenAPITools.Model.FileSchemaTestClass
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**File** | **System.IO.Stream** |  | [optional] 
+**Files** | **List<System.IO.Stream>** |  | [optional] 
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
diff --git a/samples/client/petstore/csharp/OpenAPIClient/docs/MapTest.md b/samples/client/petstore/csharp/OpenAPIClient/docs/MapTest.md
index 2baba08d8552..ee62dbf135fa 100644
--- a/samples/client/petstore/csharp/OpenAPIClient/docs/MapTest.md
+++ b/samples/client/petstore/csharp/OpenAPIClient/docs/MapTest.md
@@ -5,6 +5,8 @@ Name | Type | Description | Notes
 ------------ | ------------- | ------------- | -------------
 **MapMapOfString** | **Dictionary<string, Dictionary<string, string>>** |  | [optional] 
 **MapOfEnumString** | **Dictionary<string, string>** |  | [optional] 
+**DirectMap** | **Dictionary<string, bool?>** |  | [optional] 
+**IndirectMap** | [**StringBooleanMap**](StringBooleanMap.md) |  | [optional] 
 
 [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
 
diff --git a/samples/client/petstore/csharp/OpenAPIClient/docs/PetApi.md b/samples/client/petstore/csharp/OpenAPIClient/docs/PetApi.md
index 244ece53a318..dd23df9b3683 100644
--- a/samples/client/petstore/csharp/OpenAPIClient/docs/PetApi.md
+++ b/samples/client/petstore/csharp/OpenAPIClient/docs/PetApi.md
@@ -12,6 +12,7 @@ Method | HTTP request | Description
 [**UpdatePet**](PetApi.md#updatepet) | **PUT** /pet | Update an existing pet
 [**UpdatePetWithForm**](PetApi.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data
 [**UploadFile**](PetApi.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image
+[**UploadFileWithRequiredFile**](PetApi.md#uploadfilewithrequiredfile) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required)
 
 
 
@@ -524,3 +525,69 @@ Name | Type | Description  | Notes
 
 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
 
+
+# **UploadFileWithRequiredFile**
+> ApiResponse UploadFileWithRequiredFile (long? petId, System.IO.Stream requiredFile, string additionalMetadata = null)
+
+uploads an image (required)
+
+### Example
+```csharp
+using System;
+using System.Diagnostics;
+using Org.OpenAPITools.Api;
+using Org.OpenAPITools.Client;
+using Org.OpenAPITools.Model;
+
+namespace Example
+{
+    public class UploadFileWithRequiredFileExample
+    {
+        public void main()
+        {
+            // Configure OAuth2 access token for authorization: petstore_auth
+            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
+
+            var apiInstance = new PetApi();
+            var petId = 789;  // long? | ID of pet to update
+            var requiredFile = BINARY_DATA_HERE;  // System.IO.Stream | file to upload
+            var additionalMetadata = additionalMetadata_example;  // string | Additional data to pass to server (optional) 
+
+            try
+            {
+                // uploads an image (required)
+                ApiResponse result = apiInstance.UploadFileWithRequiredFile(petId, requiredFile, additionalMetadata);
+                Debug.WriteLine(result);
+            }
+            catch (Exception e)
+            {
+                Debug.Print("Exception when calling PetApi.UploadFileWithRequiredFile: " + e.Message );
+            }
+        }
+    }
+}
+```
+
+### Parameters
+
+Name | Type | Description  | Notes
+------------- | ------------- | ------------- | -------------
+ **petId** | **long?**| ID of pet to update | 
+ **requiredFile** | **System.IO.Stream**| file to upload | 
+ **additionalMetadata** | **string**| Additional data to pass to server | [optional] 
+
+### Return type
+
+[**ApiResponse**](ApiResponse.md)
+
+### Authorization
+
+[petstore_auth](../README.md#petstore_auth)
+
+### HTTP request headers
+
+ - **Content-Type**: multipart/form-data
+ - **Accept**: application/json
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
diff --git a/samples/client/petstore/csharp/OpenAPIClient/docs/StringBooleanMap.md b/samples/client/petstore/csharp/OpenAPIClient/docs/StringBooleanMap.md
new file mode 100644
index 000000000000..6e7a71368df7
--- /dev/null
+++ b/samples/client/petstore/csharp/OpenAPIClient/docs/StringBooleanMap.md
@@ -0,0 +1,8 @@
+# Org.OpenAPITools.Model.StringBooleanMap
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/FileSchemaTestClassTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/FileSchemaTestClassTests.cs
new file mode 100644
index 000000000000..bb47c43dc7a1
--- /dev/null
+++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/FileSchemaTestClassTests.cs
@@ -0,0 +1,88 @@
+/* 
+ * OpenAPI Petstore
+ *
+ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
+ *
+ * OpenAPI spec version: 1.0.0
+ * 
+ * Generated by: https://github.com/openapitools/openapi-generator.git
+ */
+
+
+using NUnit.Framework;
+
+using System;
+using System.Linq;
+using System.IO;
+using System.Collections.Generic;
+using Org.OpenAPITools.Api;
+using Org.OpenAPITools.Model;
+using Org.OpenAPITools.Client;
+using System.Reflection;
+using Newtonsoft.Json;
+
+namespace Org.OpenAPITools.Test
+{
+    /// 
+    ///  Class for testing FileSchemaTestClass
+    /// 
+    /// 
+    /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
+    /// Please update the test case below to test the model.
+    /// 
+    [TestFixture]
+    public class FileSchemaTestClassTests
+    {
+        // TODO uncomment below to declare an instance variable for FileSchemaTestClass
+        //private FileSchemaTestClass instance;
+
+        /// 
+        /// Setup before each test
+        /// 
+        [SetUp]
+        public void Init()
+        {
+            // TODO uncomment below to create an instance of FileSchemaTestClass
+            //instance = new FileSchemaTestClass();
+        }
+
+        /// 
+        /// Clean up after each test
+        /// 
+        [TearDown]
+        public void Cleanup()
+        {
+
+        }
+
+        /// 
+        /// Test an instance of FileSchemaTestClass
+        /// 
+        [Test]
+        public void FileSchemaTestClassInstanceTest()
+        {
+            // TODO uncomment below to test "IsInstanceOfType" FileSchemaTestClass
+            //Assert.IsInstanceOfType (instance, "variable 'instance' is a FileSchemaTestClass");
+        }
+
+
+        /// 
+        /// Test the property 'File'
+        /// 
+        [Test]
+        public void FileTest()
+        {
+            // TODO unit test for the property 'File'
+        }
+        /// 
+        /// Test the property 'Files'
+        /// 
+        [Test]
+        public void FilesTest()
+        {
+            // TODO unit test for the property 'Files'
+        }
+
+    }
+
+}
diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/FileTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/FileTests.cs
new file mode 100644
index 000000000000..f1cf54c22e4d
--- /dev/null
+++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/FileTests.cs
@@ -0,0 +1,80 @@
+/* 
+ * OpenAPI Petstore
+ *
+ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
+ *
+ * OpenAPI spec version: 1.0.0
+ * 
+ * Generated by: https://github.com/openapitools/openapi-generator.git
+ */
+
+
+using NUnit.Framework;
+
+using System;
+using System.Linq;
+using System.IO;
+using System.Collections.Generic;
+using Org.OpenAPITools.Api;
+using Org.OpenAPITools.Model;
+using Org.OpenAPITools.Client;
+using System.Reflection;
+using Newtonsoft.Json;
+
+namespace Org.OpenAPITools.Test
+{
+    /// 
+    ///  Class for testing File
+    /// 
+    /// 
+    /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
+    /// Please update the test case below to test the model.
+    /// 
+    [TestFixture]
+    public class FileTests
+    {
+        // TODO uncomment below to declare an instance variable for File
+        //private File instance;
+
+        /// 
+        /// Setup before each test
+        /// 
+        [SetUp]
+        public void Init()
+        {
+            // TODO uncomment below to create an instance of File
+            //instance = new File();
+        }
+
+        /// 
+        /// Clean up after each test
+        /// 
+        [TearDown]
+        public void Cleanup()
+        {
+
+        }
+
+        /// 
+        /// Test an instance of File
+        /// 
+        [Test]
+        public void FileInstanceTest()
+        {
+            // TODO uncomment below to test "IsInstanceOfType" File
+            //Assert.IsInstanceOfType (instance, "variable 'instance' is a File");
+        }
+
+
+        /// 
+        /// Test the property 'SourceURI'
+        /// 
+        [Test]
+        public void SourceURITest()
+        {
+            // TODO unit test for the property 'SourceURI'
+        }
+
+    }
+
+}
diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/StringBooleanMapTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/StringBooleanMapTests.cs
new file mode 100644
index 000000000000..efc4cd907733
--- /dev/null
+++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/StringBooleanMapTests.cs
@@ -0,0 +1,72 @@
+/* 
+ * OpenAPI Petstore
+ *
+ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
+ *
+ * OpenAPI spec version: 1.0.0
+ * 
+ * Generated by: https://github.com/openapitools/openapi-generator.git
+ */
+
+
+using NUnit.Framework;
+
+using System;
+using System.Linq;
+using System.IO;
+using System.Collections.Generic;
+using Org.OpenAPITools.Api;
+using Org.OpenAPITools.Model;
+using Org.OpenAPITools.Client;
+using System.Reflection;
+using Newtonsoft.Json;
+
+namespace Org.OpenAPITools.Test
+{
+    /// 
+    ///  Class for testing StringBooleanMap
+    /// 
+    /// 
+    /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
+    /// Please update the test case below to test the model.
+    /// 
+    [TestFixture]
+    public class StringBooleanMapTests
+    {
+        // TODO uncomment below to declare an instance variable for StringBooleanMap
+        //private StringBooleanMap instance;
+
+        /// 
+        /// Setup before each test
+        /// 
+        [SetUp]
+        public void Init()
+        {
+            // TODO uncomment below to create an instance of StringBooleanMap
+            //instance = new StringBooleanMap();
+        }
+
+        /// 
+        /// Clean up after each test
+        /// 
+        [TearDown]
+        public void Cleanup()
+        {
+
+        }
+
+        /// 
+        /// Test an instance of StringBooleanMap
+        /// 
+        [Test]
+        public void StringBooleanMapInstanceTest()
+        {
+            // TODO uncomment below to test "IsInstanceOfType" StringBooleanMap
+            //Assert.IsInstanceOfType (instance, "variable 'instance' is a StringBooleanMap");
+        }
+
+
+
+    }
+
+}
diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Api/AnotherFakeApi.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Api/AnotherFakeApi.cs
index a636d07b7219..aacccf92ca50 100644
--- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Api/AnotherFakeApi.cs
+++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Api/AnotherFakeApi.cs
@@ -28,46 +28,46 @@ namespace Org.OpenAPITools.Api
         /// To test special tags
         /// 
         /// 
-        /// To test special tags
+        /// To test special tags and operation ID starting with number
         /// 
         /// Thrown when fails to make API call
         /// client model
         /// ModelClient
-        ModelClient TestSpecialTags (ModelClient modelClient);
+        ModelClient Call123TestSpecialTags (ModelClient modelClient);
 
         /// 
         /// To test special tags
         /// 
         /// 
-        /// To test special tags
+        /// To test special tags and operation ID starting with number
         /// 
         /// Thrown when fails to make API call
         /// client model
         /// ApiResponse of ModelClient
-        ApiResponse TestSpecialTagsWithHttpInfo (ModelClient modelClient);
+        ApiResponse Call123TestSpecialTagsWithHttpInfo (ModelClient modelClient);
         #endregion Synchronous Operations
         #region Asynchronous Operations
         /// 
         /// To test special tags
         /// 
         /// 
-        /// To test special tags
+        /// To test special tags and operation ID starting with number
         /// 
         /// Thrown when fails to make API call
         /// client model
         /// Task of ModelClient
-        System.Threading.Tasks.Task TestSpecialTagsAsync (ModelClient modelClient);
+        System.Threading.Tasks.Task Call123TestSpecialTagsAsync (ModelClient modelClient);
 
         /// 
         /// To test special tags
         /// 
         /// 
-        /// To test special tags
+        /// To test special tags and operation ID starting with number
         /// 
         /// Thrown when fails to make API call
         /// client model
         /// Task of ApiResponse (ModelClient)
-        System.Threading.Tasks.Task> TestSpecialTagsAsyncWithHttpInfo (ModelClient modelClient);
+        System.Threading.Tasks.Task> Call123TestSpecialTagsAsyncWithHttpInfo (ModelClient modelClient);
         #endregion Asynchronous Operations
     }
 
@@ -169,28 +169,28 @@ namespace Org.OpenAPITools.Api
         }
 
         /// 
-        /// To test special tags To test special tags
+        /// To test special tags To test special tags and operation ID starting with number
         /// 
         /// Thrown when fails to make API call
         /// client model
         /// ModelClient
-        public ModelClient TestSpecialTags (ModelClient modelClient)
+        public ModelClient Call123TestSpecialTags (ModelClient modelClient)
         {
-             ApiResponse localVarResponse = TestSpecialTagsWithHttpInfo(modelClient);
+             ApiResponse localVarResponse = Call123TestSpecialTagsWithHttpInfo(modelClient);
              return localVarResponse.Data;
         }
 
         /// 
-        /// To test special tags To test special tags
+        /// To test special tags To test special tags and operation ID starting with number
         /// 
         /// Thrown when fails to make API call
         /// client model
         /// ApiResponse of ModelClient
-        public ApiResponse< ModelClient > TestSpecialTagsWithHttpInfo (ModelClient modelClient)
+        public ApiResponse< ModelClient > Call123TestSpecialTagsWithHttpInfo (ModelClient modelClient)
         {
             // verify the required parameter 'modelClient' is set
             if (modelClient == null)
-                throw new ApiException(400, "Missing required parameter 'modelClient' when calling AnotherFakeApi->TestSpecialTags");
+                throw new ApiException(400, "Missing required parameter 'modelClient' when calling AnotherFakeApi->Call123TestSpecialTags");
 
             var localVarPath = "/another-fake/dummy";
             var localVarPathParams = new Dictionary();
@@ -233,7 +233,7 @@ namespace Org.OpenAPITools.Api
 
             if (ExceptionFactory != null)
             {
-                Exception exception = ExceptionFactory("TestSpecialTags", localVarResponse);
+                Exception exception = ExceptionFactory("Call123TestSpecialTags", localVarResponse);
                 if (exception != null) throw exception;
             }
 
@@ -243,29 +243,29 @@ namespace Org.OpenAPITools.Api
         }
 
         /// 
-        /// To test special tags To test special tags
+        /// To test special tags To test special tags and operation ID starting with number
         /// 
         /// Thrown when fails to make API call
         /// client model
         /// Task of ModelClient
-        public async System.Threading.Tasks.Task TestSpecialTagsAsync (ModelClient modelClient)
+        public async System.Threading.Tasks.Task Call123TestSpecialTagsAsync (ModelClient modelClient)
         {
-             ApiResponse localVarResponse = await TestSpecialTagsAsyncWithHttpInfo(modelClient);
+             ApiResponse localVarResponse = await Call123TestSpecialTagsAsyncWithHttpInfo(modelClient);
              return localVarResponse.Data;
 
         }
 
         /// 
-        /// To test special tags To test special tags
+        /// To test special tags To test special tags and operation ID starting with number
         /// 
         /// Thrown when fails to make API call
         /// client model
         /// Task of ApiResponse (ModelClient)
-        public async System.Threading.Tasks.Task> TestSpecialTagsAsyncWithHttpInfo (ModelClient modelClient)
+        public async System.Threading.Tasks.Task> Call123TestSpecialTagsAsyncWithHttpInfo (ModelClient modelClient)
         {
             // verify the required parameter 'modelClient' is set
             if (modelClient == null)
-                throw new ApiException(400, "Missing required parameter 'modelClient' when calling AnotherFakeApi->TestSpecialTags");
+                throw new ApiException(400, "Missing required parameter 'modelClient' when calling AnotherFakeApi->Call123TestSpecialTags");
 
             var localVarPath = "/another-fake/dummy";
             var localVarPathParams = new Dictionary();
@@ -308,7 +308,7 @@ namespace Org.OpenAPITools.Api
 
             if (ExceptionFactory != null)
             {
-                Exception exception = ExceptionFactory("TestSpecialTags", localVarResponse);
+                Exception exception = ExceptionFactory("Call123TestSpecialTags", localVarResponse);
                 if (exception != null) throw exception;
             }
 
diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Api/FakeApi.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Api/FakeApi.cs
index 8974ba425708..60e219ead9d0 100644
--- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Api/FakeApi.cs
+++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Api/FakeApi.cs
@@ -112,6 +112,27 @@ namespace Org.OpenAPITools.Api
         /// 
         /// 
         /// 
+        /// For this test, the body for this request much reference a schema named `File`.
+        /// 
+        /// Thrown when fails to make API call
+        /// 
+        /// 
+        void TestBodyWithFileSchema (FileSchemaTestClass fileSchemaTestClass);
+
+        /// 
+        /// 
+        /// 
+        /// 
+        /// For this test, the body for this request much reference a schema named `File`.
+        /// 
+        /// Thrown when fails to make API call
+        /// 
+        /// ApiResponse of Object(void)
+        ApiResponse TestBodyWithFileSchemaWithHttpInfo (FileSchemaTestClass fileSchemaTestClass);
+        /// 
+        /// 
+        /// 
+        /// 
         /// 
         /// 
         /// Thrown when fails to make API call
@@ -368,6 +389,27 @@ namespace Org.OpenAPITools.Api
         /// 
         /// 
         /// 
+        /// For this test, the body for this request much reference a schema named `File`.
+        /// 
+        /// Thrown when fails to make API call
+        /// 
+        /// Task of void
+        System.Threading.Tasks.Task TestBodyWithFileSchemaAsync (FileSchemaTestClass fileSchemaTestClass);
+
+        /// 
+        /// 
+        /// 
+        /// 
+        /// For this test, the body for this request much reference a schema named `File`.
+        /// 
+        /// Thrown when fails to make API call
+        /// 
+        /// Task of ApiResponse
+        System.Threading.Tasks.Task> TestBodyWithFileSchemaAsyncWithHttpInfo (FileSchemaTestClass fileSchemaTestClass);
+        /// 
+        /// 
+        /// 
+        /// 
         /// 
         /// 
         /// Thrown when fails to make API call
@@ -1198,6 +1240,151 @@ namespace Org.OpenAPITools.Api
                 (string) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(string)));
         }
 
+        /// 
+        ///  For this test, the body for this request much reference a schema named `File`.
+        /// 
+        /// Thrown when fails to make API call
+        /// 
+        /// 
+        public void TestBodyWithFileSchema (FileSchemaTestClass fileSchemaTestClass)
+        {
+             TestBodyWithFileSchemaWithHttpInfo(fileSchemaTestClass);
+        }
+
+        /// 
+        ///  For this test, the body for this request much reference a schema named `File`.
+        /// 
+        /// Thrown when fails to make API call
+        /// 
+        /// ApiResponse of Object(void)
+        public ApiResponse TestBodyWithFileSchemaWithHttpInfo (FileSchemaTestClass fileSchemaTestClass)
+        {
+            // verify the required parameter 'fileSchemaTestClass' is set
+            if (fileSchemaTestClass == null)
+                throw new ApiException(400, "Missing required parameter 'fileSchemaTestClass' when calling FakeApi->TestBodyWithFileSchema");
+
+            var localVarPath = "/fake/body-with-file-schema";
+            var localVarPathParams = new Dictionary();
+            var localVarQueryParams = new List>();
+            var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader);
+            var localVarFormParams = new Dictionary();
+            var localVarFileParams = new Dictionary();
+            Object localVarPostBody = null;
+
+            // to determine the Content-Type header
+            String[] localVarHttpContentTypes = new String[] {
+                "application/json"
+            };
+            String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
+
+            // to determine the Accept header
+            String[] localVarHttpHeaderAccepts = new String[] {
+            };
+            String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
+            if (localVarHttpHeaderAccept != null)
+                localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
+
+            if (fileSchemaTestClass != null && fileSchemaTestClass.GetType() != typeof(byte[]))
+            {
+                localVarPostBody = this.Configuration.ApiClient.Serialize(fileSchemaTestClass); // http body (model) parameter
+            }
+            else
+            {
+                localVarPostBody = fileSchemaTestClass; // byte array
+            }
+
+
+            // make the HTTP request
+            IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath,
+                Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
+                localVarPathParams, localVarHttpContentType);
+
+            int localVarStatusCode = (int) localVarResponse.StatusCode;
+
+            if (ExceptionFactory != null)
+            {
+                Exception exception = ExceptionFactory("TestBodyWithFileSchema", localVarResponse);
+                if (exception != null) throw exception;
+            }
+
+            return new ApiResponse(localVarStatusCode,
+                localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
+                null);
+        }
+
+        /// 
+        ///  For this test, the body for this request much reference a schema named `File`.
+        /// 
+        /// Thrown when fails to make API call
+        /// 
+        /// Task of void
+        public async System.Threading.Tasks.Task TestBodyWithFileSchemaAsync (FileSchemaTestClass fileSchemaTestClass)
+        {
+             await TestBodyWithFileSchemaAsyncWithHttpInfo(fileSchemaTestClass);
+
+        }
+
+        /// 
+        ///  For this test, the body for this request much reference a schema named `File`.
+        /// 
+        /// Thrown when fails to make API call
+        /// 
+        /// Task of ApiResponse
+        public async System.Threading.Tasks.Task> TestBodyWithFileSchemaAsyncWithHttpInfo (FileSchemaTestClass fileSchemaTestClass)
+        {
+            // verify the required parameter 'fileSchemaTestClass' is set
+            if (fileSchemaTestClass == null)
+                throw new ApiException(400, "Missing required parameter 'fileSchemaTestClass' when calling FakeApi->TestBodyWithFileSchema");
+
+            var localVarPath = "/fake/body-with-file-schema";
+            var localVarPathParams = new Dictionary();
+            var localVarQueryParams = new List>();
+            var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader);
+            var localVarFormParams = new Dictionary();
+            var localVarFileParams = new Dictionary();
+            Object localVarPostBody = null;
+
+            // to determine the Content-Type header
+            String[] localVarHttpContentTypes = new String[] {
+                "application/json"
+            };
+            String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
+
+            // to determine the Accept header
+            String[] localVarHttpHeaderAccepts = new String[] {
+            };
+            String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
+            if (localVarHttpHeaderAccept != null)
+                localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
+
+            if (fileSchemaTestClass != null && fileSchemaTestClass.GetType() != typeof(byte[]))
+            {
+                localVarPostBody = this.Configuration.ApiClient.Serialize(fileSchemaTestClass); // http body (model) parameter
+            }
+            else
+            {
+                localVarPostBody = fileSchemaTestClass; // byte array
+            }
+
+
+            // make the HTTP request
+            IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath,
+                Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
+                localVarPathParams, localVarHttpContentType);
+
+            int localVarStatusCode = (int) localVarResponse.StatusCode;
+
+            if (ExceptionFactory != null)
+            {
+                Exception exception = ExceptionFactory("TestBodyWithFileSchema", localVarResponse);
+                if (exception != null) throw exception;
+            }
+
+            return new ApiResponse(localVarStatusCode,
+                localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
+                null);
+        }
+
         /// 
         ///  
         /// 
diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Api/PetApi.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Api/PetApi.cs
index 9bfb712fd455..2fb6528b32e2 100644
--- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Api/PetApi.cs
+++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Api/PetApi.cs
@@ -202,6 +202,31 @@ namespace Org.OpenAPITools.Api
         /// file to upload (optional)
         /// ApiResponse of ApiResponse
         ApiResponse UploadFileWithHttpInfo (long? petId, string additionalMetadata = null, System.IO.Stream file = null);
+        /// 
+        /// uploads an image (required)
+        /// 
+        /// 
+        /// 
+        /// 
+        /// Thrown when fails to make API call
+        /// ID of pet to update
+        /// file to upload
+        /// Additional data to pass to server (optional)
+        /// ApiResponse
+        ApiResponse UploadFileWithRequiredFile (long? petId, System.IO.Stream requiredFile, string additionalMetadata = null);
+
+        /// 
+        /// uploads an image (required)
+        /// 
+        /// 
+        /// 
+        /// 
+        /// Thrown when fails to make API call
+        /// ID of pet to update
+        /// file to upload
+        /// Additional data to pass to server (optional)
+        /// ApiResponse of ApiResponse
+        ApiResponse UploadFileWithRequiredFileWithHttpInfo (long? petId, System.IO.Stream requiredFile, string additionalMetadata = null);
         #endregion Synchronous Operations
         #region Asynchronous Operations
         /// 
@@ -382,6 +407,31 @@ namespace Org.OpenAPITools.Api
         /// file to upload (optional)
         /// Task of ApiResponse (ApiResponse)
         System.Threading.Tasks.Task> UploadFileAsyncWithHttpInfo (long? petId, string additionalMetadata = null, System.IO.Stream file = null);
+        /// 
+        /// uploads an image (required)
+        /// 
+        /// 
+        /// 
+        /// 
+        /// Thrown when fails to make API call
+        /// ID of pet to update
+        /// file to upload
+        /// Additional data to pass to server (optional)
+        /// Task of ApiResponse
+        System.Threading.Tasks.Task UploadFileWithRequiredFileAsync (long? petId, System.IO.Stream requiredFile, string additionalMetadata = null);
+
+        /// 
+        /// uploads an image (required)
+        /// 
+        /// 
+        /// 
+        /// 
+        /// Thrown when fails to make API call
+        /// ID of pet to update
+        /// file to upload
+        /// Additional data to pass to server (optional)
+        /// Task of ApiResponse (ApiResponse)
+        System.Threading.Tasks.Task> UploadFileWithRequiredFileAsyncWithHttpInfo (long? petId, System.IO.Stream requiredFile, string additionalMetadata = null);
         #endregion Asynchronous Operations
     }
 
@@ -1700,5 +1750,170 @@ namespace Org.OpenAPITools.Api
                 (ApiResponse) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ApiResponse)));
         }
 
+        /// 
+        /// uploads an image (required) 
+        /// 
+        /// Thrown when fails to make API call
+        /// ID of pet to update
+        /// file to upload
+        /// Additional data to pass to server (optional)
+        /// ApiResponse
+        public ApiResponse UploadFileWithRequiredFile (long? petId, System.IO.Stream requiredFile, string additionalMetadata = null)
+        {
+             ApiResponse localVarResponse = UploadFileWithRequiredFileWithHttpInfo(petId, requiredFile, additionalMetadata);
+             return localVarResponse.Data;
+        }
+
+        /// 
+        /// uploads an image (required) 
+        /// 
+        /// Thrown when fails to make API call
+        /// ID of pet to update
+        /// file to upload
+        /// Additional data to pass to server (optional)
+        /// ApiResponse of ApiResponse
+        public ApiResponse< ApiResponse > UploadFileWithRequiredFileWithHttpInfo (long? petId, System.IO.Stream requiredFile, string additionalMetadata = null)
+        {
+            // verify the required parameter 'petId' is set
+            if (petId == null)
+                throw new ApiException(400, "Missing required parameter 'petId' when calling PetApi->UploadFileWithRequiredFile");
+            // verify the required parameter 'requiredFile' is set
+            if (requiredFile == null)
+                throw new ApiException(400, "Missing required parameter 'requiredFile' when calling PetApi->UploadFileWithRequiredFile");
+
+            var localVarPath = "/fake/{petId}/uploadImageWithRequiredFile";
+            var localVarPathParams = new Dictionary();
+            var localVarQueryParams = new List>();
+            var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader);
+            var localVarFormParams = new Dictionary();
+            var localVarFileParams = new Dictionary();
+            Object localVarPostBody = null;
+
+            // to determine the Content-Type header
+            String[] localVarHttpContentTypes = new String[] {
+                "multipart/form-data"
+            };
+            String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
+
+            // to determine the Accept header
+            String[] localVarHttpHeaderAccepts = new String[] {
+                "application/json"
+            };
+            String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
+            if (localVarHttpHeaderAccept != null)
+                localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
+
+            if (petId != null) localVarPathParams.Add("petId", this.Configuration.ApiClient.ParameterToString(petId)); // path parameter
+            if (additionalMetadata != null) localVarFormParams.Add("additionalMetadata", this.Configuration.ApiClient.ParameterToString(additionalMetadata)); // form parameter
+            if (requiredFile != null) localVarFileParams.Add("requiredFile", this.Configuration.ApiClient.ParameterToFile("requiredFile", requiredFile));
+
+            // authentication (petstore_auth) required
+            // oauth required
+            if (!String.IsNullOrEmpty(this.Configuration.AccessToken))
+            {
+                localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken;
+            }
+
+            // make the HTTP request
+            IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath,
+                Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
+                localVarPathParams, localVarHttpContentType);
+
+            int localVarStatusCode = (int) localVarResponse.StatusCode;
+
+            if (ExceptionFactory != null)
+            {
+                Exception exception = ExceptionFactory("UploadFileWithRequiredFile", localVarResponse);
+                if (exception != null) throw exception;
+            }
+
+            return new ApiResponse(localVarStatusCode,
+                localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
+                (ApiResponse) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ApiResponse)));
+        }
+
+        /// 
+        /// uploads an image (required) 
+        /// 
+        /// Thrown when fails to make API call
+        /// ID of pet to update
+        /// file to upload
+        /// Additional data to pass to server (optional)
+        /// Task of ApiResponse
+        public async System.Threading.Tasks.Task UploadFileWithRequiredFileAsync (long? petId, System.IO.Stream requiredFile, string additionalMetadata = null)
+        {
+             ApiResponse localVarResponse = await UploadFileWithRequiredFileAsyncWithHttpInfo(petId, requiredFile, additionalMetadata);
+             return localVarResponse.Data;
+
+        }
+
+        /// 
+        /// uploads an image (required) 
+        /// 
+        /// Thrown when fails to make API call
+        /// ID of pet to update
+        /// file to upload
+        /// Additional data to pass to server (optional)
+        /// Task of ApiResponse (ApiResponse)
+        public async System.Threading.Tasks.Task> UploadFileWithRequiredFileAsyncWithHttpInfo (long? petId, System.IO.Stream requiredFile, string additionalMetadata = null)
+        {
+            // verify the required parameter 'petId' is set
+            if (petId == null)
+                throw new ApiException(400, "Missing required parameter 'petId' when calling PetApi->UploadFileWithRequiredFile");
+            // verify the required parameter 'requiredFile' is set
+            if (requiredFile == null)
+                throw new ApiException(400, "Missing required parameter 'requiredFile' when calling PetApi->UploadFileWithRequiredFile");
+
+            var localVarPath = "/fake/{petId}/uploadImageWithRequiredFile";
+            var localVarPathParams = new Dictionary();
+            var localVarQueryParams = new List>();
+            var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader);
+            var localVarFormParams = new Dictionary();
+            var localVarFileParams = new Dictionary();
+            Object localVarPostBody = null;
+
+            // to determine the Content-Type header
+            String[] localVarHttpContentTypes = new String[] {
+                "multipart/form-data"
+            };
+            String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
+
+            // to determine the Accept header
+            String[] localVarHttpHeaderAccepts = new String[] {
+                "application/json"
+            };
+            String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
+            if (localVarHttpHeaderAccept != null)
+                localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
+
+            if (petId != null) localVarPathParams.Add("petId", this.Configuration.ApiClient.ParameterToString(petId)); // path parameter
+            if (additionalMetadata != null) localVarFormParams.Add("additionalMetadata", this.Configuration.ApiClient.ParameterToString(additionalMetadata)); // form parameter
+            if (requiredFile != null) localVarFileParams.Add("requiredFile", this.Configuration.ApiClient.ParameterToFile("requiredFile", requiredFile));
+
+            // authentication (petstore_auth) required
+            // oauth required
+            if (!String.IsNullOrEmpty(this.Configuration.AccessToken))
+            {
+                localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken;
+            }
+
+            // make the HTTP request
+            IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath,
+                Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
+                localVarPathParams, localVarHttpContentType);
+
+            int localVarStatusCode = (int) localVarResponse.StatusCode;
+
+            if (ExceptionFactory != null)
+            {
+                Exception exception = ExceptionFactory("UploadFileWithRequiredFile", localVarResponse);
+                if (exception != null) throw exception;
+            }
+
+            return new ApiResponse(localVarStatusCode,
+                localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
+                (ApiResponse) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ApiResponse)));
+        }
+
     }
 }
diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/EnumArrays.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/EnumArrays.cs
index ba25e7775635..567a207068c2 100644
--- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/EnumArrays.cs
+++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/EnumArrays.cs
@@ -36,18 +36,18 @@ namespace Org.OpenAPITools.Model
         [JsonConverter(typeof(StringEnumConverter))]
         public enum JustSymbolEnum
         {
-            
             /// 
             /// Enum GreaterThanOrEqualTo for value: >=
             /// 
             [EnumMember(Value = ">=")]
             GreaterThanOrEqualTo = 1,
-            
+
             /// 
             /// Enum Dollar for value: $
             /// 
             [EnumMember(Value = "$")]
             Dollar = 2
+
         }
 
         /// 
@@ -61,18 +61,18 @@ namespace Org.OpenAPITools.Model
         [JsonConverter(typeof(StringEnumConverter))]
         public enum ArrayEnumEnum
         {
-            
             /// 
             /// Enum Fish for value: fish
             /// 
             [EnumMember(Value = "fish")]
             Fish = 1,
-            
+
             /// 
             /// Enum Crab for value: crab
             /// 
             [EnumMember(Value = "crab")]
             Crab = 2
+
         }
 
 
diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/EnumClass.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/EnumClass.cs
index 3da1bee1360c..33643e475f51 100644
--- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/EnumClass.cs
+++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/EnumClass.cs
@@ -32,24 +32,24 @@ namespace Org.OpenAPITools.Model
     
     public enum EnumClass
     {
-        
         /// 
         /// Enum Abc for value: _abc
         /// 
         [EnumMember(Value = "_abc")]
         Abc = 1,
-        
+
         /// 
         /// Enum Efg for value: -efg
         /// 
         [EnumMember(Value = "-efg")]
         Efg = 2,
-        
+
         /// 
         /// Enum Xyz for value: (xyz)
         /// 
         [EnumMember(Value = "(xyz)")]
         Xyz = 3
+
     }
 
 }
diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/EnumTest.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/EnumTest.cs
index 663d01a2b23a..7099a980016f 100644
--- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/EnumTest.cs
+++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/EnumTest.cs
@@ -36,24 +36,24 @@ namespace Org.OpenAPITools.Model
         [JsonConverter(typeof(StringEnumConverter))]
         public enum EnumStringEnum
         {
-            
             /// 
             /// Enum UPPER for value: UPPER
             /// 
             [EnumMember(Value = "UPPER")]
             UPPER = 1,
-            
+
             /// 
             /// Enum Lower for value: lower
             /// 
             [EnumMember(Value = "lower")]
             Lower = 2,
-            
+
             /// 
             /// Enum Empty for value: 
             /// 
             [EnumMember(Value = "")]
             Empty = 3
+
         }
 
         /// 
@@ -67,24 +67,24 @@ namespace Org.OpenAPITools.Model
         [JsonConverter(typeof(StringEnumConverter))]
         public enum EnumStringRequiredEnum
         {
-            
             /// 
             /// Enum UPPER for value: UPPER
             /// 
             [EnumMember(Value = "UPPER")]
             UPPER = 1,
-            
+
             /// 
             /// Enum Lower for value: lower
             /// 
             [EnumMember(Value = "lower")]
             Lower = 2,
-            
+
             /// 
             /// Enum Empty for value: 
             /// 
             [EnumMember(Value = "")]
             Empty = 3
+
         }
 
         /// 
@@ -97,18 +97,16 @@ namespace Org.OpenAPITools.Model
         /// 
         public enum EnumIntegerEnum
         {
-            
             /// 
             /// Enum NUMBER_1 for value: 1
             /// 
-            
             NUMBER_1 = 1,
-            
+
             /// 
             /// Enum NUMBER_MINUS_1 for value: -1
             /// 
-            
             NUMBER_MINUS_1 = -1
+
         }
 
         /// 
@@ -122,18 +120,18 @@ namespace Org.OpenAPITools.Model
         [JsonConverter(typeof(StringEnumConverter))]
         public enum EnumNumberEnum
         {
-            
             /// 
             /// Enum NUMBER_1_DOT_1 for value: 1.1
             /// 
             [EnumMember(Value = "1.1")]
             NUMBER_1_DOT_1 = 1,
-            
+
             /// 
             /// Enum NUMBER_MINUS_1_DOT_2 for value: -1.2
             /// 
             [EnumMember(Value = "-1.2")]
             NUMBER_MINUS_1_DOT_2 = 2
+
         }
 
         /// 
diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/File.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/File.cs
new file mode 100644
index 000000000000..68d564d17e72
--- /dev/null
+++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/File.cs
@@ -0,0 +1,125 @@
+/* 
+ * OpenAPI Petstore
+ *
+ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
+ *
+ * OpenAPI spec version: 1.0.0
+ * 
+ * Generated by: https://github.com/openapitools/openapi-generator.git
+ */
+
+using System;
+using System.Linq;
+using System.IO;
+using System.Text;
+using System.Text.RegularExpressions;
+using System.Collections;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Runtime.Serialization;
+using Newtonsoft.Json;
+using Newtonsoft.Json.Converters;
+using System.ComponentModel.DataAnnotations;
+using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter;
+
+namespace Org.OpenAPITools.Model
+{
+    /// 
+    /// Must be named `File` for test.
+    /// 
+    [DataContract]
+    public partial class File :  IEquatable, IValidatableObject
+    {
+        /// 
+        /// Initializes a new instance of the  class.
+        /// 
+        /// Test capitalization.
+        public File(string sourceURI = default(string))
+        {
+            this.SourceURI = sourceURI;
+        }
+        
+        /// 
+        /// Test capitalization
+        /// 
+        /// Test capitalization
+        [DataMember(Name="sourceURI", EmitDefaultValue=false)]
+        public string SourceURI { get; set; }
+
+        /// 
+        /// Returns the string presentation of the object
+        /// 
+        /// String presentation of the object
+        public override string ToString()
+        {
+            var sb = new StringBuilder();
+            sb.Append("class File {\n");
+            sb.Append("  SourceURI: ").Append(SourceURI).Append("\n");
+            sb.Append("}\n");
+            return sb.ToString();
+        }
+  
+        /// 
+        /// Returns the JSON string presentation of the object
+        /// 
+        /// JSON string presentation of the object
+        public virtual string ToJson()
+        {
+            return JsonConvert.SerializeObject(this, Formatting.Indented);
+        }
+
+        /// 
+        /// Returns true if objects are equal
+        /// 
+        /// Object to be compared
+        /// Boolean
+        public override bool Equals(object input)
+        {
+            return this.Equals(input as File);
+        }
+
+        /// 
+        /// Returns true if File instances are equal
+        /// 
+        /// Instance of File to be compared
+        /// Boolean
+        public bool Equals(File input)
+        {
+            if (input == null)
+                return false;
+
+            return 
+                (
+                    this.SourceURI == input.SourceURI ||
+                    (this.SourceURI != null &&
+                    this.SourceURI.Equals(input.SourceURI))
+                );
+        }
+
+        /// 
+        /// Gets the hash code
+        /// 
+        /// Hash code
+        public override int GetHashCode()
+        {
+            unchecked // Overflow is fine, just wrap
+            {
+                int hashCode = 41;
+                if (this.SourceURI != null)
+                    hashCode = hashCode * 59 + this.SourceURI.GetHashCode();
+                return hashCode;
+            }
+        }
+
+        /// 
+        /// To validate all properties of the instance
+        /// 
+        /// Validation context
+        /// Validation Result
+        IEnumerable IValidatableObject.Validate(ValidationContext validationContext)
+        {
+            yield break;
+        }
+    }
+
+}
diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs
new file mode 100644
index 000000000000..1505ab9c4b1c
--- /dev/null
+++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs
@@ -0,0 +1,140 @@
+/* 
+ * OpenAPI Petstore
+ *
+ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
+ *
+ * OpenAPI spec version: 1.0.0
+ * 
+ * Generated by: https://github.com/openapitools/openapi-generator.git
+ */
+
+using System;
+using System.Linq;
+using System.IO;
+using System.Text;
+using System.Text.RegularExpressions;
+using System.Collections;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Runtime.Serialization;
+using Newtonsoft.Json;
+using Newtonsoft.Json.Converters;
+using System.ComponentModel.DataAnnotations;
+using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter;
+
+namespace Org.OpenAPITools.Model
+{
+    /// 
+    /// FileSchemaTestClass
+    /// 
+    [DataContract]
+    public partial class FileSchemaTestClass :  IEquatable, IValidatableObject
+    {
+        /// 
+        /// Initializes a new instance of the  class.
+        /// 
+        /// file.
+        /// files.
+        public FileSchemaTestClass(System.IO.Stream file = default(System.IO.Stream), List files = default(List))
+        {
+            this.File = file;
+            this.Files = files;
+        }
+        
+        /// 
+        /// Gets or Sets File
+        /// 
+        [DataMember(Name="file", EmitDefaultValue=false)]
+        public System.IO.Stream File { get; set; }
+
+        /// 
+        /// Gets or Sets Files
+        /// 
+        [DataMember(Name="files", EmitDefaultValue=false)]
+        public List Files { get; set; }
+
+        /// 
+        /// Returns the string presentation of the object
+        /// 
+        /// String presentation of the object
+        public override string ToString()
+        {
+            var sb = new StringBuilder();
+            sb.Append("class FileSchemaTestClass {\n");
+            sb.Append("  File: ").Append(File).Append("\n");
+            sb.Append("  Files: ").Append(Files).Append("\n");
+            sb.Append("}\n");
+            return sb.ToString();
+        }
+  
+        /// 
+        /// Returns the JSON string presentation of the object
+        /// 
+        /// JSON string presentation of the object
+        public virtual string ToJson()
+        {
+            return JsonConvert.SerializeObject(this, Formatting.Indented);
+        }
+
+        /// 
+        /// Returns true if objects are equal
+        /// 
+        /// Object to be compared
+        /// Boolean
+        public override bool Equals(object input)
+        {
+            return this.Equals(input as FileSchemaTestClass);
+        }
+
+        /// 
+        /// Returns true if FileSchemaTestClass instances are equal
+        /// 
+        /// Instance of FileSchemaTestClass to be compared
+        /// Boolean
+        public bool Equals(FileSchemaTestClass input)
+        {
+            if (input == null)
+                return false;
+
+            return 
+                (
+                    this.File == input.File ||
+                    (this.File != null &&
+                    this.File.Equals(input.File))
+                ) && 
+                (
+                    this.Files == input.Files ||
+                    this.Files != null &&
+                    this.Files.SequenceEqual(input.Files)
+                );
+        }
+
+        /// 
+        /// Gets the hash code
+        /// 
+        /// Hash code
+        public override int GetHashCode()
+        {
+            unchecked // Overflow is fine, just wrap
+            {
+                int hashCode = 41;
+                if (this.File != null)
+                    hashCode = hashCode * 59 + this.File.GetHashCode();
+                if (this.Files != null)
+                    hashCode = hashCode * 59 + this.Files.GetHashCode();
+                return hashCode;
+            }
+        }
+
+        /// 
+        /// To validate all properties of the instance
+        /// 
+        /// Validation context
+        /// Validation Result
+        IEnumerable IValidatableObject.Validate(ValidationContext validationContext)
+        {
+            yield break;
+        }
+    }
+
+}
diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/MapTest.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/MapTest.cs
index 25c030067064..1c5bfa70198a 100644
--- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/MapTest.cs
+++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/MapTest.cs
@@ -36,18 +36,18 @@ namespace Org.OpenAPITools.Model
         [JsonConverter(typeof(StringEnumConverter))]
         public enum InnerEnum
         {
-            
             /// 
             /// Enum UPPER for value: UPPER
             /// 
             [EnumMember(Value = "UPPER")]
             UPPER = 1,
-            
+
             /// 
             /// Enum Lower for value: lower
             /// 
             [EnumMember(Value = "lower")]
             Lower = 2
+
         }
 
 
@@ -61,10 +61,14 @@ namespace Org.OpenAPITools.Model
         /// 
         /// mapMapOfString.
         /// mapOfEnumString.
-        public MapTest(Dictionary> mapMapOfString = default(Dictionary>), Dictionary mapOfEnumString = default(Dictionary))
+        /// directMap.
+        /// indirectMap.
+        public MapTest(Dictionary> mapMapOfString = default(Dictionary>), Dictionary mapOfEnumString = default(Dictionary), Dictionary directMap = default(Dictionary), StringBooleanMap indirectMap = default(StringBooleanMap))
         {
             this.MapMapOfString = mapMapOfString;
             this.MapOfEnumString = mapOfEnumString;
+            this.DirectMap = directMap;
+            this.IndirectMap = indirectMap;
         }
         
         /// 
@@ -74,6 +78,18 @@ namespace Org.OpenAPITools.Model
         public Dictionary> MapMapOfString { get; set; }
 
 
+        /// 
+        /// Gets or Sets DirectMap
+        /// 
+        [DataMember(Name="direct_map", EmitDefaultValue=false)]
+        public Dictionary DirectMap { get; set; }
+
+        /// 
+        /// Gets or Sets IndirectMap
+        /// 
+        [DataMember(Name="indirect_map", EmitDefaultValue=false)]
+        public StringBooleanMap IndirectMap { get; set; }
+
         /// 
         /// Returns the string presentation of the object
         /// 
@@ -84,6 +100,8 @@ namespace Org.OpenAPITools.Model
             sb.Append("class MapTest {\n");
             sb.Append("  MapMapOfString: ").Append(MapMapOfString).Append("\n");
             sb.Append("  MapOfEnumString: ").Append(MapOfEnumString).Append("\n");
+            sb.Append("  DirectMap: ").Append(DirectMap).Append("\n");
+            sb.Append("  IndirectMap: ").Append(IndirectMap).Append("\n");
             sb.Append("}\n");
             return sb.ToString();
         }
@@ -127,6 +145,16 @@ namespace Org.OpenAPITools.Model
                     this.MapOfEnumString == input.MapOfEnumString ||
                     this.MapOfEnumString != null &&
                     this.MapOfEnumString.SequenceEqual(input.MapOfEnumString)
+                ) && 
+                (
+                    this.DirectMap == input.DirectMap ||
+                    this.DirectMap != null &&
+                    this.DirectMap.SequenceEqual(input.DirectMap)
+                ) && 
+                (
+                    this.IndirectMap == input.IndirectMap ||
+                    (this.IndirectMap != null &&
+                    this.IndirectMap.Equals(input.IndirectMap))
                 );
         }
 
@@ -143,6 +171,10 @@ namespace Org.OpenAPITools.Model
                     hashCode = hashCode * 59 + this.MapMapOfString.GetHashCode();
                 if (this.MapOfEnumString != null)
                     hashCode = hashCode * 59 + this.MapOfEnumString.GetHashCode();
+                if (this.DirectMap != null)
+                    hashCode = hashCode * 59 + this.DirectMap.GetHashCode();
+                if (this.IndirectMap != null)
+                    hashCode = hashCode * 59 + this.IndirectMap.GetHashCode();
                 return hashCode;
             }
         }
diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/Order.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/Order.cs
index 27863dccbae7..f895f035192b 100644
--- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/Order.cs
+++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/Order.cs
@@ -37,24 +37,24 @@ namespace Org.OpenAPITools.Model
         [JsonConverter(typeof(StringEnumConverter))]
         public enum StatusEnum
         {
-            
             /// 
             /// Enum Placed for value: placed
             /// 
             [EnumMember(Value = "placed")]
             Placed = 1,
-            
+
             /// 
             /// Enum Approved for value: approved
             /// 
             [EnumMember(Value = "approved")]
             Approved = 2,
-            
+
             /// 
             /// Enum Delivered for value: delivered
             /// 
             [EnumMember(Value = "delivered")]
             Delivered = 3
+
         }
 
         /// 
diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/OuterEnum.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/OuterEnum.cs
index 2716692ee0ec..be116aff60ab 100644
--- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/OuterEnum.cs
+++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/OuterEnum.cs
@@ -32,24 +32,24 @@ namespace Org.OpenAPITools.Model
     
     public enum OuterEnum
     {
-        
         /// 
         /// Enum Placed for value: placed
         /// 
         [EnumMember(Value = "placed")]
         Placed = 1,
-        
+
         /// 
         /// Enum Approved for value: approved
         /// 
         [EnumMember(Value = "approved")]
         Approved = 2,
-        
+
         /// 
         /// Enum Delivered for value: delivered
         /// 
         [EnumMember(Value = "delivered")]
         Delivered = 3
+
     }
 
 }
diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/Pet.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/Pet.cs
index 02628fcf1240..1e213e5006ad 100644
--- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/Pet.cs
+++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/Pet.cs
@@ -37,24 +37,24 @@ namespace Org.OpenAPITools.Model
         [JsonConverter(typeof(StringEnumConverter))]
         public enum StatusEnum
         {
-            
             /// 
             /// Enum Available for value: available
             /// 
             [EnumMember(Value = "available")]
             Available = 1,
-            
+
             /// 
             /// Enum Pending for value: pending
             /// 
             [EnumMember(Value = "pending")]
             Pending = 2,
-            
+
             /// 
             /// Enum Sold for value: sold
             /// 
             [EnumMember(Value = "sold")]
             Sold = 3
+
         }
 
         /// 
diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/StringBooleanMap.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/StringBooleanMap.cs
new file mode 100644
index 000000000000..df4dc6e486dc
--- /dev/null
+++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/StringBooleanMap.cs
@@ -0,0 +1,110 @@
+/* 
+ * OpenAPI Petstore
+ *
+ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
+ *
+ * OpenAPI spec version: 1.0.0
+ * 
+ * Generated by: https://github.com/openapitools/openapi-generator.git
+ */
+
+using System;
+using System.Linq;
+using System.IO;
+using System.Text;
+using System.Text.RegularExpressions;
+using System.Collections;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Runtime.Serialization;
+using Newtonsoft.Json;
+using Newtonsoft.Json.Converters;
+using System.ComponentModel.DataAnnotations;
+using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter;
+
+namespace Org.OpenAPITools.Model
+{
+    /// 
+    /// StringBooleanMap
+    /// 
+    [DataContract]
+    public partial class StringBooleanMap : Dictionary,  IEquatable, IValidatableObject
+    {
+        /// 
+        /// Initializes a new instance of the  class.
+        /// 
+        [JsonConstructorAttribute]
+        public StringBooleanMap() : base()
+        {
+        }
+        
+        /// 
+        /// Returns the string presentation of the object
+        /// 
+        /// String presentation of the object
+        public override string ToString()
+        {
+            var sb = new StringBuilder();
+            sb.Append("class StringBooleanMap {\n");
+            sb.Append("  ").Append(base.ToString().Replace("\n", "\n  ")).Append("\n");
+            sb.Append("}\n");
+            return sb.ToString();
+        }
+  
+        /// 
+        /// Returns the JSON string presentation of the object
+        /// 
+        /// JSON string presentation of the object
+        public string ToJson()
+        {
+            return JsonConvert.SerializeObject(this, Formatting.Indented);
+        }
+
+        /// 
+        /// Returns true if objects are equal
+        /// 
+        /// Object to be compared
+        /// Boolean
+        public override bool Equals(object input)
+        {
+            return this.Equals(input as StringBooleanMap);
+        }
+
+        /// 
+        /// Returns true if StringBooleanMap instances are equal
+        /// 
+        /// Instance of StringBooleanMap to be compared
+        /// Boolean
+        public bool Equals(StringBooleanMap input)
+        {
+            if (input == null)
+                return false;
+
+            return base.Equals(input);
+        }
+
+        /// 
+        /// Gets the hash code
+        /// 
+        /// Hash code
+        public override int GetHashCode()
+        {
+            unchecked // Overflow is fine, just wrap
+            {
+                int hashCode = base.GetHashCode();
+                return hashCode;
+            }
+        }
+
+        /// 
+        /// To validate all properties of the instance
+        /// 
+        /// Validation context
+        /// Validation Result
+        IEnumerable IValidatableObject.Validate(ValidationContext validationContext)
+        {
+            yield break;
+        }
+    }
+
+}
diff --git a/samples/client/petstore/go/pom.xml b/samples/client/petstore/go/pom.xml
index 9350f9881d92..082720066314 100644
--- a/samples/client/petstore/go/pom.xml
+++ b/samples/client/petstore/go/pom.xml
@@ -1,6 +1,6 @@
 
     4.0.0
-    com.wordnik
+    org.openapitools
     Goswagger
     pom
     1.0.0
diff --git a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/ApiClient.java b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/ApiClient.java
index 97f6b2c61c07..b39d7e40cd4b 100644
--- a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/ApiClient.java
+++ b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/ApiClient.java
@@ -15,20 +15,16 @@ package org.openapitools.client;
 
 import org.openapitools.client.api.*;
 
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import io.restassured.RestAssured;
 import io.restassured.builder.RequestSpecBuilder;
-import io.restassured.builder.ResponseSpecBuilder;
-import io.restassured.response.Response;
 import java.util.function.Consumer;
-import java.util.function.Function;
 import java.util.function.Supplier;
 
+import static io.restassured.config.ObjectMapperConfig.objectMapperConfig;
+import static io.restassured.config.RestAssuredConfig.config;
+import static org.openapitools.client.GsonObjectMapper.gson;
+
 public class ApiClient {
+    public static final String BASE_URI = "http://petstore.swagger.io:80/v2";
 
     private final Config config;
 
@@ -60,7 +56,9 @@ public class ApiClient {
     }
 
     public static class Config {
-        private Supplier baseReqSpec;
+        private Supplier baseReqSpec = () -> new RequestSpecBuilder()
+                .setBaseUri(BASE_URI)
+                .setConfig(config().objectMapperConfig(objectMapperConfig().defaultObjectMapper(gson())));
 
         /**
          * Use common specification for all operations
diff --git a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/api/AnotherFakeApi.java b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/api/AnotherFakeApi.java
index 2cb316a26ee0..58ab8015d06e 100644
--- a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/api/AnotherFakeApi.java
+++ b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/api/AnotherFakeApi.java
@@ -24,7 +24,9 @@ import java.util.Map;
 import io.restassured.RestAssured;
 import io.restassured.builder.RequestSpecBuilder;
 import io.restassured.builder.ResponseSpecBuilder;
+import io.restassured.http.Method;
 import io.restassured.response.Response;
+import io.swagger.annotations.*;
 
 import java.lang.reflect.Type;
 import java.util.function.Consumer;
@@ -47,6 +49,9 @@ public class AnotherFakeApi {
     }
 
 
+    @ApiOperation(value = "To test special tags", notes = "To test special tags and operation ID starting with number", tags={ "$another-fake?" })
+    @ApiResponses(value = { 
+        @ApiResponse(code = 200, message = "successful operation")  })
     public Call123testSpecialTagsOper call123testSpecialTags() {
         return new Call123testSpecialTagsOper(reqSpec);
     }
@@ -68,23 +73,14 @@ public class AnotherFakeApi {
      * @see #body client model (required)
      * return Client
      */
-    public class Call123testSpecialTagsOper {
+    public static class Call123testSpecialTagsOper {
 
-        public static final String REQ_METHOD = "PATCH";
+        public static final Method REQ_METHOD = PATCH;
         public static final String REQ_URI = "/another-fake/dummy";
-        public static final String SUMMARY = "To test special tags";
 
         private RequestSpecBuilder reqSpec;
-
         private ResponseSpecBuilder respSpec;
 
-        public Call123testSpecialTagsOper() {
-            this.reqSpec = new RequestSpecBuilder();
-            reqSpec.setContentType("application/json");
-            reqSpec.setAccept("application/json");
-            this.respSpec = new ResponseSpecBuilder();
-        }
-
         public Call123testSpecialTagsOper(RequestSpecBuilder reqSpec) {
             this.reqSpec = reqSpec;
             reqSpec.setContentType("application/json");
@@ -99,7 +95,7 @@ public class AnotherFakeApi {
          * @return type
          */
         public  T execute(Function handler) {
-            return handler.apply(RestAssured.given().spec(reqSpec.build()).expect().spec(respSpec.build()).when().request(PATCH, REQ_URI));
+            return handler.apply(RestAssured.given().spec(reqSpec.build()).expect().spec(respSpec.build()).when().request(REQ_METHOD, REQ_URI));
         }
 
         /**
diff --git a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/api/FakeApi.java
index a56250e1cad3..e39e207f36e1 100644
--- a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/api/FakeApi.java
+++ b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/api/FakeApi.java
@@ -31,7 +31,9 @@ import java.util.Map;
 import io.restassured.RestAssured;
 import io.restassured.builder.RequestSpecBuilder;
 import io.restassured.builder.ResponseSpecBuilder;
+import io.restassured.http.Method;
 import io.restassured.response.Response;
+import io.swagger.annotations.*;
 
 import java.lang.reflect.Type;
 import java.util.function.Consumer;
@@ -54,46 +56,83 @@ public class FakeApi {
     }
 
 
+    @ApiOperation(value = "", notes = "Test serialization of outer boolean types", tags={ "fake" })
+    @ApiResponses(value = { 
+        @ApiResponse(code = 200, message = "Output boolean")  })
     public FakeOuterBooleanSerializeOper fakeOuterBooleanSerialize() {
         return new FakeOuterBooleanSerializeOper(reqSpec);
     }
 
+    @ApiOperation(value = "", notes = "Test serialization of object with outer number type", tags={ "fake" })
+    @ApiResponses(value = { 
+        @ApiResponse(code = 200, message = "Output composite")  })
     public FakeOuterCompositeSerializeOper fakeOuterCompositeSerialize() {
         return new FakeOuterCompositeSerializeOper(reqSpec);
     }
 
+    @ApiOperation(value = "", notes = "Test serialization of outer number types", tags={ "fake" })
+    @ApiResponses(value = { 
+        @ApiResponse(code = 200, message = "Output number")  })
     public FakeOuterNumberSerializeOper fakeOuterNumberSerialize() {
         return new FakeOuterNumberSerializeOper(reqSpec);
     }
 
+    @ApiOperation(value = "", notes = "Test serialization of outer string types", tags={ "fake" })
+    @ApiResponses(value = { 
+        @ApiResponse(code = 200, message = "Output string")  })
     public FakeOuterStringSerializeOper fakeOuterStringSerialize() {
         return new FakeOuterStringSerializeOper(reqSpec);
     }
 
+    @ApiOperation(value = "", notes = "For this test, the body for this request much reference a schema named `File`.", tags={ "fake" })
+    @ApiResponses(value = { 
+        @ApiResponse(code = 200, message = "Success")  })
     public TestBodyWithFileSchemaOper testBodyWithFileSchema() {
         return new TestBodyWithFileSchemaOper(reqSpec);
     }
 
+    @ApiOperation(value = "", notes = "", tags={ "fake" })
+    @ApiResponses(value = { 
+        @ApiResponse(code = 200, message = "Success")  })
     public TestBodyWithQueryParamsOper testBodyWithQueryParams() {
         return new TestBodyWithQueryParamsOper(reqSpec);
     }
 
+    @ApiOperation(value = "To test \"client\" model", notes = "To test \"client\" model", tags={ "fake" })
+    @ApiResponses(value = { 
+        @ApiResponse(code = 200, message = "successful operation")  })
     public TestClientModelOper testClientModel() {
         return new TestClientModelOper(reqSpec);
     }
 
+    @ApiOperation(value = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ", notes = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ", authorizations = {
+        @Authorization(value = "http_basic_test")
+    }, tags={ "fake" })
+    @ApiResponses(value = { 
+        @ApiResponse(code = 400, message = "Invalid username supplied") ,
+        @ApiResponse(code = 404, message = "User not found")  })
     public TestEndpointParametersOper testEndpointParameters() {
         return new TestEndpointParametersOper(reqSpec);
     }
 
+    @ApiOperation(value = "To test enum parameters", notes = "To test enum parameters", tags={ "fake" })
+    @ApiResponses(value = { 
+        @ApiResponse(code = 400, message = "Invalid request") ,
+        @ApiResponse(code = 404, message = "Not found")  })
     public TestEnumParametersOper testEnumParameters() {
         return new TestEnumParametersOper(reqSpec);
     }
 
+    @ApiOperation(value = "test inline additionalProperties", notes = "", tags={ "fake" })
+    @ApiResponses(value = { 
+        @ApiResponse(code = 200, message = "successful operation")  })
     public TestInlineAdditionalPropertiesOper testInlineAdditionalProperties() {
         return new TestInlineAdditionalPropertiesOper(reqSpec);
     }
 
+    @ApiOperation(value = "test json serialization of form data", notes = "", tags={ "fake" })
+    @ApiResponses(value = { 
+        @ApiResponse(code = 200, message = "successful operation")  })
     public TestJsonFormDataOper testJsonFormData() {
         return new TestJsonFormDataOper(reqSpec);
     }
@@ -115,23 +154,14 @@ public class FakeApi {
      * @see #body Input boolean as post body (optional)
      * return Boolean
      */
-    public class FakeOuterBooleanSerializeOper {
+    public static class FakeOuterBooleanSerializeOper {
 
-        public static final String REQ_METHOD = "POST";
+        public static final Method REQ_METHOD = POST;
         public static final String REQ_URI = "/fake/outer/boolean";
-        public static final String SUMMARY = "";
 
         private RequestSpecBuilder reqSpec;
-
         private ResponseSpecBuilder respSpec;
 
-        public FakeOuterBooleanSerializeOper() {
-            this.reqSpec = new RequestSpecBuilder();
-            reqSpec.setContentType("*/*");
-            reqSpec.setAccept("*/*");
-            this.respSpec = new ResponseSpecBuilder();
-        }
-
         public FakeOuterBooleanSerializeOper(RequestSpecBuilder reqSpec) {
             this.reqSpec = reqSpec;
             reqSpec.setContentType("*/*");
@@ -146,7 +176,7 @@ public class FakeApi {
          * @return type
          */
         public  T execute(Function handler) {
-            return handler.apply(RestAssured.given().spec(reqSpec.build()).expect().spec(respSpec.build()).when().request(POST, REQ_URI));
+            return handler.apply(RestAssured.given().spec(reqSpec.build()).expect().spec(respSpec.build()).when().request(REQ_METHOD, REQ_URI));
         }
 
         /**
@@ -195,23 +225,14 @@ public class FakeApi {
      * @see #body Input composite as post body (optional)
      * return OuterComposite
      */
-    public class FakeOuterCompositeSerializeOper {
+    public static class FakeOuterCompositeSerializeOper {
 
-        public static final String REQ_METHOD = "POST";
+        public static final Method REQ_METHOD = POST;
         public static final String REQ_URI = "/fake/outer/composite";
-        public static final String SUMMARY = "";
 
         private RequestSpecBuilder reqSpec;
-
         private ResponseSpecBuilder respSpec;
 
-        public FakeOuterCompositeSerializeOper() {
-            this.reqSpec = new RequestSpecBuilder();
-            reqSpec.setContentType("*/*");
-            reqSpec.setAccept("*/*");
-            this.respSpec = new ResponseSpecBuilder();
-        }
-
         public FakeOuterCompositeSerializeOper(RequestSpecBuilder reqSpec) {
             this.reqSpec = reqSpec;
             reqSpec.setContentType("*/*");
@@ -226,7 +247,7 @@ public class FakeApi {
          * @return type
          */
         public  T execute(Function handler) {
-            return handler.apply(RestAssured.given().spec(reqSpec.build()).expect().spec(respSpec.build()).when().request(POST, REQ_URI));
+            return handler.apply(RestAssured.given().spec(reqSpec.build()).expect().spec(respSpec.build()).when().request(REQ_METHOD, REQ_URI));
         }
 
         /**
@@ -275,23 +296,14 @@ public class FakeApi {
      * @see #body Input number as post body (optional)
      * return BigDecimal
      */
-    public class FakeOuterNumberSerializeOper {
+    public static class FakeOuterNumberSerializeOper {
 
-        public static final String REQ_METHOD = "POST";
+        public static final Method REQ_METHOD = POST;
         public static final String REQ_URI = "/fake/outer/number";
-        public static final String SUMMARY = "";
 
         private RequestSpecBuilder reqSpec;
-
         private ResponseSpecBuilder respSpec;
 
-        public FakeOuterNumberSerializeOper() {
-            this.reqSpec = new RequestSpecBuilder();
-            reqSpec.setContentType("*/*");
-            reqSpec.setAccept("*/*");
-            this.respSpec = new ResponseSpecBuilder();
-        }
-
         public FakeOuterNumberSerializeOper(RequestSpecBuilder reqSpec) {
             this.reqSpec = reqSpec;
             reqSpec.setContentType("*/*");
@@ -306,7 +318,7 @@ public class FakeApi {
          * @return type
          */
         public  T execute(Function handler) {
-            return handler.apply(RestAssured.given().spec(reqSpec.build()).expect().spec(respSpec.build()).when().request(POST, REQ_URI));
+            return handler.apply(RestAssured.given().spec(reqSpec.build()).expect().spec(respSpec.build()).when().request(REQ_METHOD, REQ_URI));
         }
 
         /**
@@ -355,23 +367,14 @@ public class FakeApi {
      * @see #body Input string as post body (optional)
      * return String
      */
-    public class FakeOuterStringSerializeOper {
+    public static class FakeOuterStringSerializeOper {
 
-        public static final String REQ_METHOD = "POST";
+        public static final Method REQ_METHOD = POST;
         public static final String REQ_URI = "/fake/outer/string";
-        public static final String SUMMARY = "";
 
         private RequestSpecBuilder reqSpec;
-
         private ResponseSpecBuilder respSpec;
 
-        public FakeOuterStringSerializeOper() {
-            this.reqSpec = new RequestSpecBuilder();
-            reqSpec.setContentType("*/*");
-            reqSpec.setAccept("*/*");
-            this.respSpec = new ResponseSpecBuilder();
-        }
-
         public FakeOuterStringSerializeOper(RequestSpecBuilder reqSpec) {
             this.reqSpec = reqSpec;
             reqSpec.setContentType("*/*");
@@ -386,7 +389,7 @@ public class FakeApi {
          * @return type
          */
         public  T execute(Function handler) {
-            return handler.apply(RestAssured.given().spec(reqSpec.build()).expect().spec(respSpec.build()).when().request(POST, REQ_URI));
+            return handler.apply(RestAssured.given().spec(reqSpec.build()).expect().spec(respSpec.build()).when().request(REQ_METHOD, REQ_URI));
         }
 
         /**
@@ -434,23 +437,14 @@ public class FakeApi {
      *
      * @see #body  (required)
      */
-    public class TestBodyWithFileSchemaOper {
+    public static class TestBodyWithFileSchemaOper {
 
-        public static final String REQ_METHOD = "PUT";
+        public static final Method REQ_METHOD = PUT;
         public static final String REQ_URI = "/fake/body-with-file-schema";
-        public static final String SUMMARY = "";
 
         private RequestSpecBuilder reqSpec;
-
         private ResponseSpecBuilder respSpec;
 
-        public TestBodyWithFileSchemaOper() {
-            this.reqSpec = new RequestSpecBuilder();
-            reqSpec.setContentType("application/json");
-            reqSpec.setAccept("application/json");
-            this.respSpec = new ResponseSpecBuilder();
-        }
-
         public TestBodyWithFileSchemaOper(RequestSpecBuilder reqSpec) {
             this.reqSpec = reqSpec;
             reqSpec.setContentType("application/json");
@@ -465,7 +459,7 @@ public class FakeApi {
          * @return type
          */
         public  T execute(Function handler) {
-            return handler.apply(RestAssured.given().spec(reqSpec.build()).expect().spec(respSpec.build()).when().request(PUT, REQ_URI));
+            return handler.apply(RestAssured.given().spec(reqSpec.build()).expect().spec(respSpec.build()).when().request(REQ_METHOD, REQ_URI));
         }
 
          /**
@@ -504,23 +498,14 @@ public class FakeApi {
      * @see #queryQuery  (required)
      * @see #body  (required)
      */
-    public class TestBodyWithQueryParamsOper {
+    public static class TestBodyWithQueryParamsOper {
 
-        public static final String REQ_METHOD = "PUT";
+        public static final Method REQ_METHOD = PUT;
         public static final String REQ_URI = "/fake/body-with-query-params";
-        public static final String SUMMARY = "";
 
         private RequestSpecBuilder reqSpec;
-
         private ResponseSpecBuilder respSpec;
 
-        public TestBodyWithQueryParamsOper() {
-            this.reqSpec = new RequestSpecBuilder();
-            reqSpec.setContentType("application/json");
-            reqSpec.setAccept("application/json");
-            this.respSpec = new ResponseSpecBuilder();
-        }
-
         public TestBodyWithQueryParamsOper(RequestSpecBuilder reqSpec) {
             this.reqSpec = reqSpec;
             reqSpec.setContentType("application/json");
@@ -535,7 +520,7 @@ public class FakeApi {
          * @return type
          */
         public  T execute(Function handler) {
-            return handler.apply(RestAssured.given().spec(reqSpec.build()).expect().spec(respSpec.build()).when().request(PUT, REQ_URI));
+            return handler.apply(RestAssured.given().spec(reqSpec.build()).expect().spec(respSpec.build()).when().request(REQ_METHOD, REQ_URI));
         }
 
          /**
@@ -585,23 +570,14 @@ public class FakeApi {
      * @see #body client model (required)
      * return Client
      */
-    public class TestClientModelOper {
+    public static class TestClientModelOper {
 
-        public static final String REQ_METHOD = "PATCH";
+        public static final Method REQ_METHOD = PATCH;
         public static final String REQ_URI = "/fake";
-        public static final String SUMMARY = "To test \"client\" model";
 
         private RequestSpecBuilder reqSpec;
-
         private ResponseSpecBuilder respSpec;
 
-        public TestClientModelOper() {
-            this.reqSpec = new RequestSpecBuilder();
-            reqSpec.setContentType("application/json");
-            reqSpec.setAccept("application/json");
-            this.respSpec = new ResponseSpecBuilder();
-        }
-
         public TestClientModelOper(RequestSpecBuilder reqSpec) {
             this.reqSpec = reqSpec;
             reqSpec.setContentType("application/json");
@@ -616,7 +592,7 @@ public class FakeApi {
          * @return type
          */
         public  T execute(Function handler) {
-            return handler.apply(RestAssured.given().spec(reqSpec.build()).expect().spec(respSpec.build()).when().request(PATCH, REQ_URI));
+            return handler.apply(RestAssured.given().spec(reqSpec.build()).expect().spec(respSpec.build()).when().request(REQ_METHOD, REQ_URI));
         }
 
         /**
@@ -677,23 +653,14 @@ public class FakeApi {
      * @see #passwordForm None (optional, default to null)
      * @see #paramCallbackForm None (optional, default to null)
      */
-    public class TestEndpointParametersOper {
+    public static class TestEndpointParametersOper {
 
-        public static final String REQ_METHOD = "POST";
+        public static final Method REQ_METHOD = POST;
         public static final String REQ_URI = "/fake";
-        public static final String SUMMARY = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ";
 
         private RequestSpecBuilder reqSpec;
-
         private ResponseSpecBuilder respSpec;
 
-        public TestEndpointParametersOper() {
-            this.reqSpec = new RequestSpecBuilder();
-            reqSpec.setContentType("application/x-www-form-urlencoded");
-            reqSpec.setAccept("application/json");
-            this.respSpec = new ResponseSpecBuilder();
-        }
-
         public TestEndpointParametersOper(RequestSpecBuilder reqSpec) {
             this.reqSpec = reqSpec;
             reqSpec.setContentType("application/x-www-form-urlencoded");
@@ -708,7 +675,7 @@ public class FakeApi {
          * @return type
          */
         public  T execute(Function handler) {
-            return handler.apply(RestAssured.given().spec(reqSpec.build()).expect().spec(respSpec.build()).when().request(POST, REQ_URI));
+            return handler.apply(RestAssured.given().spec(reqSpec.build()).expect().spec(respSpec.build()).when().request(REQ_METHOD, REQ_URI));
         }
 
          public static final String INTEGER_FORM = "integer";
@@ -898,23 +865,14 @@ public class FakeApi {
      * @see #enumFormStringArrayForm Form parameter enum test (string array) (optional, default to $)
      * @see #enumFormStringForm Form parameter enum test (string) (optional, default to -efg)
      */
-    public class TestEnumParametersOper {
+    public static class TestEnumParametersOper {
 
-        public static final String REQ_METHOD = "GET";
+        public static final Method REQ_METHOD = GET;
         public static final String REQ_URI = "/fake";
-        public static final String SUMMARY = "To test enum parameters";
 
         private RequestSpecBuilder reqSpec;
-
         private ResponseSpecBuilder respSpec;
 
-        public TestEnumParametersOper() {
-            this.reqSpec = new RequestSpecBuilder();
-            reqSpec.setContentType("application/x-www-form-urlencoded");
-            reqSpec.setAccept("application/json");
-            this.respSpec = new ResponseSpecBuilder();
-        }
-
         public TestEnumParametersOper(RequestSpecBuilder reqSpec) {
             this.reqSpec = reqSpec;
             reqSpec.setContentType("application/x-www-form-urlencoded");
@@ -929,7 +887,7 @@ public class FakeApi {
          * @return type
          */
         public  T execute(Function handler) {
-            return handler.apply(RestAssured.given().spec(reqSpec.build()).expect().spec(respSpec.build()).when().request(GET, REQ_URI));
+            return handler.apply(RestAssured.given().spec(reqSpec.build()).expect().spec(respSpec.build()).when().request(REQ_METHOD, REQ_URI));
         }
 
         public static final String ENUM_HEADER_STRING_ARRAY_HEADER = "enum_header_string_array";
@@ -1046,23 +1004,14 @@ public class FakeApi {
      *
      * @see #body request body (required)
      */
-    public class TestInlineAdditionalPropertiesOper {
+    public static class TestInlineAdditionalPropertiesOper {
 
-        public static final String REQ_METHOD = "POST";
+        public static final Method REQ_METHOD = POST;
         public static final String REQ_URI = "/fake/inline-additionalProperties";
-        public static final String SUMMARY = "test inline additionalProperties";
 
         private RequestSpecBuilder reqSpec;
-
         private ResponseSpecBuilder respSpec;
 
-        public TestInlineAdditionalPropertiesOper() {
-            this.reqSpec = new RequestSpecBuilder();
-            reqSpec.setContentType("application/json");
-            reqSpec.setAccept("application/json");
-            this.respSpec = new ResponseSpecBuilder();
-        }
-
         public TestInlineAdditionalPropertiesOper(RequestSpecBuilder reqSpec) {
             this.reqSpec = reqSpec;
             reqSpec.setContentType("application/json");
@@ -1077,7 +1026,7 @@ public class FakeApi {
          * @return type
          */
         public  T execute(Function handler) {
-            return handler.apply(RestAssured.given().spec(reqSpec.build()).expect().spec(respSpec.build()).when().request(POST, REQ_URI));
+            return handler.apply(RestAssured.given().spec(reqSpec.build()).expect().spec(respSpec.build()).when().request(REQ_METHOD, REQ_URI));
         }
 
          /**
@@ -1116,23 +1065,14 @@ public class FakeApi {
      * @see #paramForm field1 (required)
      * @see #param2Form field2 (required)
      */
-    public class TestJsonFormDataOper {
+    public static class TestJsonFormDataOper {
 
-        public static final String REQ_METHOD = "GET";
+        public static final Method REQ_METHOD = GET;
         public static final String REQ_URI = "/fake/jsonFormData";
-        public static final String SUMMARY = "test json serialization of form data";
 
         private RequestSpecBuilder reqSpec;
-
         private ResponseSpecBuilder respSpec;
 
-        public TestJsonFormDataOper() {
-            this.reqSpec = new RequestSpecBuilder();
-            reqSpec.setContentType("application/x-www-form-urlencoded");
-            reqSpec.setAccept("application/json");
-            this.respSpec = new ResponseSpecBuilder();
-        }
-
         public TestJsonFormDataOper(RequestSpecBuilder reqSpec) {
             this.reqSpec = reqSpec;
             reqSpec.setContentType("application/x-www-form-urlencoded");
@@ -1147,7 +1087,7 @@ public class FakeApi {
          * @return type
          */
         public  T execute(Function handler) {
-            return handler.apply(RestAssured.given().spec(reqSpec.build()).expect().spec(respSpec.build()).when().request(GET, REQ_URI));
+            return handler.apply(RestAssured.given().spec(reqSpec.build()).expect().spec(respSpec.build()).when().request(REQ_METHOD, REQ_URI));
         }
 
          public static final String PARAM_FORM = "param";
diff --git a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java
index dab88d0ef9fe..a68d20457480 100644
--- a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java
+++ b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java
@@ -24,7 +24,9 @@ import java.util.Map;
 import io.restassured.RestAssured;
 import io.restassured.builder.RequestSpecBuilder;
 import io.restassured.builder.ResponseSpecBuilder;
+import io.restassured.http.Method;
 import io.restassured.response.Response;
+import io.swagger.annotations.*;
 
 import java.lang.reflect.Type;
 import java.util.function.Consumer;
@@ -47,6 +49,11 @@ public class FakeClassnameTags123Api {
     }
 
 
+    @ApiOperation(value = "To test class name in snake case", notes = "To test class name in snake case", authorizations = {
+        @Authorization(value = "api_key_query")
+    }, tags={ "fake_classname_tags 123#$%^" })
+    @ApiResponses(value = { 
+        @ApiResponse(code = 200, message = "successful operation")  })
     public TestClassnameOper testClassname() {
         return new TestClassnameOper(reqSpec);
     }
@@ -68,23 +75,14 @@ public class FakeClassnameTags123Api {
      * @see #body client model (required)
      * return Client
      */
-    public class TestClassnameOper {
+    public static class TestClassnameOper {
 
-        public static final String REQ_METHOD = "PATCH";
+        public static final Method REQ_METHOD = PATCH;
         public static final String REQ_URI = "/fake_classname_test";
-        public static final String SUMMARY = "To test class name in snake case";
 
         private RequestSpecBuilder reqSpec;
-
         private ResponseSpecBuilder respSpec;
 
-        public TestClassnameOper() {
-            this.reqSpec = new RequestSpecBuilder();
-            reqSpec.setContentType("application/json");
-            reqSpec.setAccept("application/json");
-            this.respSpec = new ResponseSpecBuilder();
-        }
-
         public TestClassnameOper(RequestSpecBuilder reqSpec) {
             this.reqSpec = reqSpec;
             reqSpec.setContentType("application/json");
@@ -99,7 +97,7 @@ public class FakeClassnameTags123Api {
          * @return type
          */
         public  T execute(Function handler) {
-            return handler.apply(RestAssured.given().spec(reqSpec.build()).expect().spec(respSpec.build()).when().request(PATCH, REQ_URI));
+            return handler.apply(RestAssured.given().spec(reqSpec.build()).expect().spec(respSpec.build()).when().request(REQ_METHOD, REQ_URI));
         }
 
         /**
diff --git a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/api/PetApi.java
index 508a67777f5a..d99a9dbc1d38 100644
--- a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/api/PetApi.java
+++ b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/api/PetApi.java
@@ -26,7 +26,9 @@ import java.util.Map;
 import io.restassured.RestAssured;
 import io.restassured.builder.RequestSpecBuilder;
 import io.restassured.builder.ResponseSpecBuilder;
+import io.restassured.http.Method;
 import io.restassured.response.Response;
+import io.swagger.annotations.*;
 
 import java.lang.reflect.Type;
 import java.util.function.Consumer;
@@ -49,39 +51,114 @@ public class PetApi {
     }
 
 
+    @ApiOperation(value = "Add a new pet to the store", notes = "", authorizations = {
+        @Authorization(value = "petstore_auth", scopes = {
+            @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
+            @AuthorizationScope(scope = "read:pets", description = "read your pets")
+            })
+    }, tags={ "pet" })
+    @ApiResponses(value = { 
+        @ApiResponse(code = 405, message = "Invalid input")  })
     public AddPetOper addPet() {
         return new AddPetOper(reqSpec);
     }
 
+    @ApiOperation(value = "Deletes a pet", notes = "", authorizations = {
+        @Authorization(value = "petstore_auth", scopes = {
+            @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
+            @AuthorizationScope(scope = "read:pets", description = "read your pets")
+            })
+    }, tags={ "pet" })
+    @ApiResponses(value = { 
+        @ApiResponse(code = 400, message = "Invalid pet value")  })
     public DeletePetOper deletePet() {
         return new DeletePetOper(reqSpec);
     }
 
+    @ApiOperation(value = "Finds Pets by status", notes = "Multiple status values can be provided with comma separated strings", authorizations = {
+        @Authorization(value = "petstore_auth", scopes = {
+            @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
+            @AuthorizationScope(scope = "read:pets", description = "read your pets")
+            })
+    }, tags={ "pet" })
+    @ApiResponses(value = { 
+        @ApiResponse(code = 200, message = "successful operation") ,
+        @ApiResponse(code = 400, message = "Invalid status value")  })
     public FindPetsByStatusOper findPetsByStatus() {
         return new FindPetsByStatusOper(reqSpec);
     }
 
+    @ApiOperation(value = "Finds Pets by tags", notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", authorizations = {
+        @Authorization(value = "petstore_auth", scopes = {
+            @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
+            @AuthorizationScope(scope = "read:pets", description = "read your pets")
+            })
+    }, tags={ "pet" })
+    @ApiResponses(value = { 
+        @ApiResponse(code = 200, message = "successful operation") ,
+        @ApiResponse(code = 400, message = "Invalid tag value")  })
     @Deprecated
     public FindPetsByTagsOper findPetsByTags() {
         return new FindPetsByTagsOper(reqSpec);
     }
 
+    @ApiOperation(value = "Find pet by ID", notes = "Returns a single pet", authorizations = {
+        @Authorization(value = "api_key")
+    }, tags={ "pet" })
+    @ApiResponses(value = { 
+        @ApiResponse(code = 200, message = "successful operation") ,
+        @ApiResponse(code = 400, message = "Invalid ID supplied") ,
+        @ApiResponse(code = 404, message = "Pet not found")  })
     public GetPetByIdOper getPetById() {
         return new GetPetByIdOper(reqSpec);
     }
 
+    @ApiOperation(value = "Update an existing pet", notes = "", authorizations = {
+        @Authorization(value = "petstore_auth", scopes = {
+            @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
+            @AuthorizationScope(scope = "read:pets", description = "read your pets")
+            })
+    }, tags={ "pet" })
+    @ApiResponses(value = { 
+        @ApiResponse(code = 400, message = "Invalid ID supplied") ,
+        @ApiResponse(code = 404, message = "Pet not found") ,
+        @ApiResponse(code = 405, message = "Validation exception")  })
     public UpdatePetOper updatePet() {
         return new UpdatePetOper(reqSpec);
     }
 
+    @ApiOperation(value = "Updates a pet in the store with form data", notes = "", authorizations = {
+        @Authorization(value = "petstore_auth", scopes = {
+            @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
+            @AuthorizationScope(scope = "read:pets", description = "read your pets")
+            })
+    }, tags={ "pet" })
+    @ApiResponses(value = { 
+        @ApiResponse(code = 405, message = "Invalid input")  })
     public UpdatePetWithFormOper updatePetWithForm() {
         return new UpdatePetWithFormOper(reqSpec);
     }
 
+    @ApiOperation(value = "uploads an image", notes = "", authorizations = {
+        @Authorization(value = "petstore_auth", scopes = {
+            @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
+            @AuthorizationScope(scope = "read:pets", description = "read your pets")
+            })
+    }, tags={ "pet" })
+    @ApiResponses(value = { 
+        @ApiResponse(code = 200, message = "successful operation")  })
     public UploadFileOper uploadFile() {
         return new UploadFileOper(reqSpec);
     }
 
+    @ApiOperation(value = "uploads an image (required)", notes = "", authorizations = {
+        @Authorization(value = "petstore_auth", scopes = {
+            @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
+            @AuthorizationScope(scope = "read:pets", description = "read your pets")
+            })
+    }, tags={ "pet" })
+    @ApiResponses(value = { 
+        @ApiResponse(code = 200, message = "successful operation")  })
     public UploadFileWithRequiredFileOper uploadFileWithRequiredFile() {
         return new UploadFileWithRequiredFileOper(reqSpec);
     }
@@ -102,23 +179,14 @@ public class PetApi {
      *
      * @see #body Pet object that needs to be added to the store (required)
      */
-    public class AddPetOper {
+    public static class AddPetOper {
 
-        public static final String REQ_METHOD = "POST";
+        public static final Method REQ_METHOD = POST;
         public static final String REQ_URI = "/pet";
-        public static final String SUMMARY = "Add a new pet to the store";
 
         private RequestSpecBuilder reqSpec;
-
         private ResponseSpecBuilder respSpec;
 
-        public AddPetOper() {
-            this.reqSpec = new RequestSpecBuilder();
-            reqSpec.setContentType("application/json");
-            reqSpec.setAccept("application/json");
-            this.respSpec = new ResponseSpecBuilder();
-        }
-
         public AddPetOper(RequestSpecBuilder reqSpec) {
             this.reqSpec = reqSpec;
             reqSpec.setContentType("application/json");
@@ -133,7 +201,7 @@ public class PetApi {
          * @return type
          */
         public  T execute(Function handler) {
-            return handler.apply(RestAssured.given().spec(reqSpec.build()).expect().spec(respSpec.build()).when().request(POST, REQ_URI));
+            return handler.apply(RestAssured.given().spec(reqSpec.build()).expect().spec(respSpec.build()).when().request(REQ_METHOD, REQ_URI));
         }
 
          /**
@@ -172,22 +240,14 @@ public class PetApi {
      * @see #petIdPath Pet id to delete (required)
      * @see #apiKeyHeader  (optional)
      */
-    public class DeletePetOper {
+    public static class DeletePetOper {
 
-        public static final String REQ_METHOD = "DELETE";
+        public static final Method REQ_METHOD = DELETE;
         public static final String REQ_URI = "/pet/{petId}";
-        public static final String SUMMARY = "Deletes a pet";
 
         private RequestSpecBuilder reqSpec;
-
         private ResponseSpecBuilder respSpec;
 
-        public DeletePetOper() {
-            this.reqSpec = new RequestSpecBuilder();
-            reqSpec.setAccept("application/json");
-            this.respSpec = new ResponseSpecBuilder();
-        }
-
         public DeletePetOper(RequestSpecBuilder reqSpec) {
             this.reqSpec = reqSpec;
             reqSpec.setAccept("application/json");
@@ -201,7 +261,7 @@ public class PetApi {
          * @return type
          */
         public  T execute(Function handler) {
-            return handler.apply(RestAssured.given().spec(reqSpec.build()).expect().spec(respSpec.build()).when().request(DELETE, REQ_URI));
+            return handler.apply(RestAssured.given().spec(reqSpec.build()).expect().spec(respSpec.build()).when().request(REQ_METHOD, REQ_URI));
         }
 
         public static final String API_KEY_HEADER = "api_key";
@@ -253,22 +313,14 @@ public class PetApi {
      * @see #statusQuery Status values that need to be considered for filter (required)
      * return List<Pet>
      */
-    public class FindPetsByStatusOper {
+    public static class FindPetsByStatusOper {
 
-        public static final String REQ_METHOD = "GET";
+        public static final Method REQ_METHOD = GET;
         public static final String REQ_URI = "/pet/findByStatus";
-        public static final String SUMMARY = "Finds Pets by status";
 
         private RequestSpecBuilder reqSpec;
-
         private ResponseSpecBuilder respSpec;
 
-        public FindPetsByStatusOper() {
-            this.reqSpec = new RequestSpecBuilder();
-            reqSpec.setAccept("application/json");
-            this.respSpec = new ResponseSpecBuilder();
-        }
-
         public FindPetsByStatusOper(RequestSpecBuilder reqSpec) {
             this.reqSpec = reqSpec;
             reqSpec.setAccept("application/json");
@@ -282,7 +334,7 @@ public class PetApi {
          * @return type
          */
         public  T execute(Function handler) {
-            return handler.apply(RestAssured.given().spec(reqSpec.build()).expect().spec(respSpec.build()).when().request(GET, REQ_URI));
+            return handler.apply(RestAssured.given().spec(reqSpec.build()).expect().spec(respSpec.build()).when().request(REQ_METHOD, REQ_URI));
         }
 
         /**
@@ -335,22 +387,14 @@ public class PetApi {
      * @deprecated
      */
     @Deprecated
-    public class FindPetsByTagsOper {
+    public static class FindPetsByTagsOper {
 
-        public static final String REQ_METHOD = "GET";
+        public static final Method REQ_METHOD = GET;
         public static final String REQ_URI = "/pet/findByTags";
-        public static final String SUMMARY = "Finds Pets by tags";
 
         private RequestSpecBuilder reqSpec;
-
         private ResponseSpecBuilder respSpec;
 
-        public FindPetsByTagsOper() {
-            this.reqSpec = new RequestSpecBuilder();
-            reqSpec.setAccept("application/json");
-            this.respSpec = new ResponseSpecBuilder();
-        }
-
         public FindPetsByTagsOper(RequestSpecBuilder reqSpec) {
             this.reqSpec = reqSpec;
             reqSpec.setAccept("application/json");
@@ -364,7 +408,7 @@ public class PetApi {
          * @return type
          */
         public  T execute(Function handler) {
-            return handler.apply(RestAssured.given().spec(reqSpec.build()).expect().spec(respSpec.build()).when().request(GET, REQ_URI));
+            return handler.apply(RestAssured.given().spec(reqSpec.build()).expect().spec(respSpec.build()).when().request(REQ_METHOD, REQ_URI));
         }
 
         /**
@@ -415,22 +459,14 @@ public class PetApi {
      * @see #petIdPath ID of pet to return (required)
      * return Pet
      */
-    public class GetPetByIdOper {
+    public static class GetPetByIdOper {
 
-        public static final String REQ_METHOD = "GET";
+        public static final Method REQ_METHOD = GET;
         public static final String REQ_URI = "/pet/{petId}";
-        public static final String SUMMARY = "Find pet by ID";
 
         private RequestSpecBuilder reqSpec;
-
         private ResponseSpecBuilder respSpec;
 
-        public GetPetByIdOper() {
-            this.reqSpec = new RequestSpecBuilder();
-            reqSpec.setAccept("application/json");
-            this.respSpec = new ResponseSpecBuilder();
-        }
-
         public GetPetByIdOper(RequestSpecBuilder reqSpec) {
             this.reqSpec = reqSpec;
             reqSpec.setAccept("application/json");
@@ -444,7 +480,7 @@ public class PetApi {
          * @return type
          */
         public  T execute(Function handler) {
-            return handler.apply(RestAssured.given().spec(reqSpec.build()).expect().spec(respSpec.build()).when().request(GET, REQ_URI));
+            return handler.apply(RestAssured.given().spec(reqSpec.build()).expect().spec(respSpec.build()).when().request(REQ_METHOD, REQ_URI));
         }
 
         /**
@@ -494,23 +530,14 @@ public class PetApi {
      *
      * @see #body Pet object that needs to be added to the store (required)
      */
-    public class UpdatePetOper {
+    public static class UpdatePetOper {
 
-        public static final String REQ_METHOD = "PUT";
+        public static final Method REQ_METHOD = PUT;
         public static final String REQ_URI = "/pet";
-        public static final String SUMMARY = "Update an existing pet";
 
         private RequestSpecBuilder reqSpec;
-
         private ResponseSpecBuilder respSpec;
 
-        public UpdatePetOper() {
-            this.reqSpec = new RequestSpecBuilder();
-            reqSpec.setContentType("application/json");
-            reqSpec.setAccept("application/json");
-            this.respSpec = new ResponseSpecBuilder();
-        }
-
         public UpdatePetOper(RequestSpecBuilder reqSpec) {
             this.reqSpec = reqSpec;
             reqSpec.setContentType("application/json");
@@ -525,7 +552,7 @@ public class PetApi {
          * @return type
          */
         public  T execute(Function handler) {
-            return handler.apply(RestAssured.given().spec(reqSpec.build()).expect().spec(respSpec.build()).when().request(PUT, REQ_URI));
+            return handler.apply(RestAssured.given().spec(reqSpec.build()).expect().spec(respSpec.build()).when().request(REQ_METHOD, REQ_URI));
         }
 
          /**
@@ -565,23 +592,14 @@ public class PetApi {
      * @see #nameForm Updated name of the pet (optional, default to null)
      * @see #statusForm Updated status of the pet (optional, default to null)
      */
-    public class UpdatePetWithFormOper {
+    public static class UpdatePetWithFormOper {
 
-        public static final String REQ_METHOD = "POST";
+        public static final Method REQ_METHOD = POST;
         public static final String REQ_URI = "/pet/{petId}";
-        public static final String SUMMARY = "Updates a pet in the store with form data";
 
         private RequestSpecBuilder reqSpec;
-
         private ResponseSpecBuilder respSpec;
 
-        public UpdatePetWithFormOper() {
-            this.reqSpec = new RequestSpecBuilder();
-            reqSpec.setContentType("application/x-www-form-urlencoded");
-            reqSpec.setAccept("application/json");
-            this.respSpec = new ResponseSpecBuilder();
-        }
-
         public UpdatePetWithFormOper(RequestSpecBuilder reqSpec) {
             this.reqSpec = reqSpec;
             reqSpec.setContentType("application/x-www-form-urlencoded");
@@ -596,7 +614,7 @@ public class PetApi {
          * @return type
          */
         public  T execute(Function handler) {
-            return handler.apply(RestAssured.given().spec(reqSpec.build()).expect().spec(respSpec.build()).when().request(POST, REQ_URI));
+            return handler.apply(RestAssured.given().spec(reqSpec.build()).expect().spec(respSpec.build()).when().request(REQ_METHOD, REQ_URI));
         }
 
         public static final String PET_ID_PATH = "petId";
@@ -661,23 +679,14 @@ public class PetApi {
      * @see #fileMultiPart file to upload (optional, default to null)
      * return ModelApiResponse
      */
-    public class UploadFileOper {
+    public static class UploadFileOper {
 
-        public static final String REQ_METHOD = "POST";
+        public static final Method REQ_METHOD = POST;
         public static final String REQ_URI = "/pet/{petId}/uploadImage";
-        public static final String SUMMARY = "uploads an image";
 
         private RequestSpecBuilder reqSpec;
-
         private ResponseSpecBuilder respSpec;
 
-        public UploadFileOper() {
-            this.reqSpec = new RequestSpecBuilder();
-            reqSpec.setContentType("multipart/form-data");
-            reqSpec.setAccept("application/json");
-            this.respSpec = new ResponseSpecBuilder();
-        }
-
         public UploadFileOper(RequestSpecBuilder reqSpec) {
             this.reqSpec = reqSpec;
             reqSpec.setContentType("multipart/form-data");
@@ -692,7 +701,7 @@ public class PetApi {
          * @return type
          */
         public  T execute(Function handler) {
-            return handler.apply(RestAssured.given().spec(reqSpec.build()).expect().spec(respSpec.build()).when().request(POST, REQ_URI));
+            return handler.apply(RestAssured.given().spec(reqSpec.build()).expect().spec(respSpec.build()).when().request(REQ_METHOD, REQ_URI));
         }
 
         /**
@@ -767,23 +776,14 @@ public class PetApi {
      * @see #additionalMetadataForm Additional data to pass to server (optional, default to null)
      * return ModelApiResponse
      */
-    public class UploadFileWithRequiredFileOper {
+    public static class UploadFileWithRequiredFileOper {
 
-        public static final String REQ_METHOD = "POST";
+        public static final Method REQ_METHOD = POST;
         public static final String REQ_URI = "/fake/{petId}/uploadImageWithRequiredFile";
-        public static final String SUMMARY = "uploads an image (required)";
 
         private RequestSpecBuilder reqSpec;
-
         private ResponseSpecBuilder respSpec;
 
-        public UploadFileWithRequiredFileOper() {
-            this.reqSpec = new RequestSpecBuilder();
-            reqSpec.setContentType("multipart/form-data");
-            reqSpec.setAccept("application/json");
-            this.respSpec = new ResponseSpecBuilder();
-        }
-
         public UploadFileWithRequiredFileOper(RequestSpecBuilder reqSpec) {
             this.reqSpec = reqSpec;
             reqSpec.setContentType("multipart/form-data");
@@ -798,7 +798,7 @@ public class PetApi {
          * @return type
          */
         public  T execute(Function handler) {
-            return handler.apply(RestAssured.given().spec(reqSpec.build()).expect().spec(respSpec.build()).when().request(POST, REQ_URI));
+            return handler.apply(RestAssured.given().spec(reqSpec.build()).expect().spec(respSpec.build()).when().request(REQ_METHOD, REQ_URI));
         }
 
         /**
diff --git a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/api/StoreApi.java b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/api/StoreApi.java
index 85d22c9cc2a3..a796a6776dc8 100644
--- a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/api/StoreApi.java
+++ b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/api/StoreApi.java
@@ -24,7 +24,9 @@ import java.util.Map;
 import io.restassured.RestAssured;
 import io.restassured.builder.RequestSpecBuilder;
 import io.restassured.builder.ResponseSpecBuilder;
+import io.restassured.http.Method;
 import io.restassured.response.Response;
+import io.swagger.annotations.*;
 
 import java.lang.reflect.Type;
 import java.util.function.Consumer;
@@ -47,18 +49,36 @@ public class StoreApi {
     }
 
 
+    @ApiOperation(value = "Delete purchase order by ID", notes = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", tags={ "store" })
+    @ApiResponses(value = { 
+        @ApiResponse(code = 400, message = "Invalid ID supplied") ,
+        @ApiResponse(code = 404, message = "Order not found")  })
     public DeleteOrderOper deleteOrder() {
         return new DeleteOrderOper(reqSpec);
     }
 
+    @ApiOperation(value = "Returns pet inventories by status", notes = "Returns a map of status codes to quantities", authorizations = {
+        @Authorization(value = "api_key")
+    }, tags={ "store" })
+    @ApiResponses(value = { 
+        @ApiResponse(code = 200, message = "successful operation")  })
     public GetInventoryOper getInventory() {
         return new GetInventoryOper(reqSpec);
     }
 
+    @ApiOperation(value = "Find purchase order by ID", notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", tags={ "store" })
+    @ApiResponses(value = { 
+        @ApiResponse(code = 200, message = "successful operation") ,
+        @ApiResponse(code = 400, message = "Invalid ID supplied") ,
+        @ApiResponse(code = 404, message = "Order not found")  })
     public GetOrderByIdOper getOrderById() {
         return new GetOrderByIdOper(reqSpec);
     }
 
+    @ApiOperation(value = "Place an order for a pet", notes = "", tags={ "store" })
+    @ApiResponses(value = { 
+        @ApiResponse(code = 200, message = "successful operation") ,
+        @ApiResponse(code = 400, message = "Invalid Order")  })
     public PlaceOrderOper placeOrder() {
         return new PlaceOrderOper(reqSpec);
     }
@@ -79,22 +99,14 @@ public class StoreApi {
      *
      * @see #orderIdPath ID of the order that needs to be deleted (required)
      */
-    public class DeleteOrderOper {
+    public static class DeleteOrderOper {
 
-        public static final String REQ_METHOD = "DELETE";
+        public static final Method REQ_METHOD = DELETE;
         public static final String REQ_URI = "/store/order/{order_id}";
-        public static final String SUMMARY = "Delete purchase order by ID";
 
         private RequestSpecBuilder reqSpec;
-
         private ResponseSpecBuilder respSpec;
 
-        public DeleteOrderOper() {
-            this.reqSpec = new RequestSpecBuilder();
-            reqSpec.setAccept("application/json");
-            this.respSpec = new ResponseSpecBuilder();
-        }
-
         public DeleteOrderOper(RequestSpecBuilder reqSpec) {
             this.reqSpec = reqSpec;
             reqSpec.setAccept("application/json");
@@ -108,7 +120,7 @@ public class StoreApi {
          * @return type
          */
         public  T execute(Function handler) {
-            return handler.apply(RestAssured.given().spec(reqSpec.build()).expect().spec(respSpec.build()).when().request(DELETE, REQ_URI));
+            return handler.apply(RestAssured.given().spec(reqSpec.build()).expect().spec(respSpec.build()).when().request(REQ_METHOD, REQ_URI));
         }
 
         public static final String ORDER_ID_PATH = "order_id";
@@ -148,22 +160,14 @@ public class StoreApi {
      *
      * return Map<String, Integer>
      */
-    public class GetInventoryOper {
+    public static class GetInventoryOper {
 
-        public static final String REQ_METHOD = "GET";
+        public static final Method REQ_METHOD = GET;
         public static final String REQ_URI = "/store/inventory";
-        public static final String SUMMARY = "Returns pet inventories by status";
 
         private RequestSpecBuilder reqSpec;
-
         private ResponseSpecBuilder respSpec;
 
-        public GetInventoryOper() {
-            this.reqSpec = new RequestSpecBuilder();
-            reqSpec.setAccept("application/json");
-            this.respSpec = new ResponseSpecBuilder();
-        }
-
         public GetInventoryOper(RequestSpecBuilder reqSpec) {
             this.reqSpec = reqSpec;
             reqSpec.setAccept("application/json");
@@ -177,7 +181,7 @@ public class StoreApi {
          * @return type
          */
         public  T execute(Function handler) {
-            return handler.apply(RestAssured.given().spec(reqSpec.build()).expect().spec(respSpec.build()).when().request(GET, REQ_URI));
+            return handler.apply(RestAssured.given().spec(reqSpec.build()).expect().spec(respSpec.build()).when().request(REQ_METHOD, REQ_URI));
         }
 
         /**
@@ -217,22 +221,14 @@ public class StoreApi {
      * @see #orderIdPath ID of pet that needs to be fetched (required)
      * return Order
      */
-    public class GetOrderByIdOper {
+    public static class GetOrderByIdOper {
 
-        public static final String REQ_METHOD = "GET";
+        public static final Method REQ_METHOD = GET;
         public static final String REQ_URI = "/store/order/{order_id}";
-        public static final String SUMMARY = "Find purchase order by ID";
 
         private RequestSpecBuilder reqSpec;
-
         private ResponseSpecBuilder respSpec;
 
-        public GetOrderByIdOper() {
-            this.reqSpec = new RequestSpecBuilder();
-            reqSpec.setAccept("application/json");
-            this.respSpec = new ResponseSpecBuilder();
-        }
-
         public GetOrderByIdOper(RequestSpecBuilder reqSpec) {
             this.reqSpec = reqSpec;
             reqSpec.setAccept("application/json");
@@ -246,7 +242,7 @@ public class StoreApi {
          * @return type
          */
         public  T execute(Function handler) {
-            return handler.apply(RestAssured.given().spec(reqSpec.build()).expect().spec(respSpec.build()).when().request(GET, REQ_URI));
+            return handler.apply(RestAssured.given().spec(reqSpec.build()).expect().spec(respSpec.build()).when().request(REQ_METHOD, REQ_URI));
         }
 
         /**
@@ -297,23 +293,14 @@ public class StoreApi {
      * @see #body order placed for purchasing the pet (required)
      * return Order
      */
-    public class PlaceOrderOper {
+    public static class PlaceOrderOper {
 
-        public static final String REQ_METHOD = "POST";
+        public static final Method REQ_METHOD = POST;
         public static final String REQ_URI = "/store/order";
-        public static final String SUMMARY = "Place an order for a pet";
 
         private RequestSpecBuilder reqSpec;
-
         private ResponseSpecBuilder respSpec;
 
-        public PlaceOrderOper() {
-            this.reqSpec = new RequestSpecBuilder();
-            reqSpec.setContentType("*/*");
-            reqSpec.setAccept("application/json");
-            this.respSpec = new ResponseSpecBuilder();
-        }
-
         public PlaceOrderOper(RequestSpecBuilder reqSpec) {
             this.reqSpec = reqSpec;
             reqSpec.setContentType("*/*");
@@ -328,7 +315,7 @@ public class StoreApi {
          * @return type
          */
         public  T execute(Function handler) {
-            return handler.apply(RestAssured.given().spec(reqSpec.build()).expect().spec(respSpec.build()).when().request(POST, REQ_URI));
+            return handler.apply(RestAssured.given().spec(reqSpec.build()).expect().spec(respSpec.build()).when().request(REQ_METHOD, REQ_URI));
         }
 
         /**
diff --git a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/api/UserApi.java b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/api/UserApi.java
index 4ed9d74750f4..37c4bc747eac 100644
--- a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/api/UserApi.java
+++ b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/api/UserApi.java
@@ -24,7 +24,9 @@ import java.util.Map;
 import io.restassured.RestAssured;
 import io.restassured.builder.RequestSpecBuilder;
 import io.restassured.builder.ResponseSpecBuilder;
+import io.restassured.http.Method;
 import io.restassured.response.Response;
+import io.swagger.annotations.*;
 
 import java.lang.reflect.Type;
 import java.util.function.Consumer;
@@ -47,34 +49,63 @@ public class UserApi {
     }
 
 
+    @ApiOperation(value = "Create user", notes = "This can only be done by the logged in user.", tags={ "user" })
+    @ApiResponses(value = { 
+        @ApiResponse(code = 0, message = "successful operation")  })
     public CreateUserOper createUser() {
         return new CreateUserOper(reqSpec);
     }
 
+    @ApiOperation(value = "Creates list of users with given input array", notes = "", tags={ "user" })
+    @ApiResponses(value = { 
+        @ApiResponse(code = 0, message = "successful operation")  })
     public CreateUsersWithArrayInputOper createUsersWithArrayInput() {
         return new CreateUsersWithArrayInputOper(reqSpec);
     }
 
+    @ApiOperation(value = "Creates list of users with given input array", notes = "", tags={ "user" })
+    @ApiResponses(value = { 
+        @ApiResponse(code = 0, message = "successful operation")  })
     public CreateUsersWithListInputOper createUsersWithListInput() {
         return new CreateUsersWithListInputOper(reqSpec);
     }
 
+    @ApiOperation(value = "Delete user", notes = "This can only be done by the logged in user.", tags={ "user" })
+    @ApiResponses(value = { 
+        @ApiResponse(code = 400, message = "Invalid username supplied") ,
+        @ApiResponse(code = 404, message = "User not found")  })
     public DeleteUserOper deleteUser() {
         return new DeleteUserOper(reqSpec);
     }
 
+    @ApiOperation(value = "Get user by user name", notes = "", tags={ "user" })
+    @ApiResponses(value = { 
+        @ApiResponse(code = 200, message = "successful operation") ,
+        @ApiResponse(code = 400, message = "Invalid username supplied") ,
+        @ApiResponse(code = 404, message = "User not found")  })
     public GetUserByNameOper getUserByName() {
         return new GetUserByNameOper(reqSpec);
     }
 
+    @ApiOperation(value = "Logs user into the system", notes = "", tags={ "user" })
+    @ApiResponses(value = { 
+        @ApiResponse(code = 200, message = "successful operation") ,
+        @ApiResponse(code = 400, message = "Invalid username/password supplied")  })
     public LoginUserOper loginUser() {
         return new LoginUserOper(reqSpec);
     }
 
+    @ApiOperation(value = "Logs out current logged in user session", notes = "", tags={ "user" })
+    @ApiResponses(value = { 
+        @ApiResponse(code = 0, message = "successful operation")  })
     public LogoutUserOper logoutUser() {
         return new LogoutUserOper(reqSpec);
     }
 
+    @ApiOperation(value = "Updated user", notes = "This can only be done by the logged in user.", tags={ "user" })
+    @ApiResponses(value = { 
+        @ApiResponse(code = 400, message = "Invalid user supplied") ,
+        @ApiResponse(code = 404, message = "User not found")  })
     public UpdateUserOper updateUser() {
         return new UpdateUserOper(reqSpec);
     }
@@ -95,23 +126,14 @@ public class UserApi {
      *
      * @see #body Created user object (required)
      */
-    public class CreateUserOper {
+    public static class CreateUserOper {
 
-        public static final String REQ_METHOD = "POST";
+        public static final Method REQ_METHOD = POST;
         public static final String REQ_URI = "/user";
-        public static final String SUMMARY = "Create user";
 
         private RequestSpecBuilder reqSpec;
-
         private ResponseSpecBuilder respSpec;
 
-        public CreateUserOper() {
-            this.reqSpec = new RequestSpecBuilder();
-            reqSpec.setContentType("*/*");
-            reqSpec.setAccept("application/json");
-            this.respSpec = new ResponseSpecBuilder();
-        }
-
         public CreateUserOper(RequestSpecBuilder reqSpec) {
             this.reqSpec = reqSpec;
             reqSpec.setContentType("*/*");
@@ -126,7 +148,7 @@ public class UserApi {
          * @return type
          */
         public  T execute(Function handler) {
-            return handler.apply(RestAssured.given().spec(reqSpec.build()).expect().spec(respSpec.build()).when().request(POST, REQ_URI));
+            return handler.apply(RestAssured.given().spec(reqSpec.build()).expect().spec(respSpec.build()).when().request(REQ_METHOD, REQ_URI));
         }
 
          /**
@@ -164,23 +186,14 @@ public class UserApi {
      *
      * @see #body List of user object (required)
      */
-    public class CreateUsersWithArrayInputOper {
+    public static class CreateUsersWithArrayInputOper {
 
-        public static final String REQ_METHOD = "POST";
+        public static final Method REQ_METHOD = POST;
         public static final String REQ_URI = "/user/createWithArray";
-        public static final String SUMMARY = "Creates list of users with given input array";
 
         private RequestSpecBuilder reqSpec;
-
         private ResponseSpecBuilder respSpec;
 
-        public CreateUsersWithArrayInputOper() {
-            this.reqSpec = new RequestSpecBuilder();
-            reqSpec.setContentType("*/*");
-            reqSpec.setAccept("application/json");
-            this.respSpec = new ResponseSpecBuilder();
-        }
-
         public CreateUsersWithArrayInputOper(RequestSpecBuilder reqSpec) {
             this.reqSpec = reqSpec;
             reqSpec.setContentType("*/*");
@@ -195,7 +208,7 @@ public class UserApi {
          * @return type
          */
         public  T execute(Function handler) {
-            return handler.apply(RestAssured.given().spec(reqSpec.build()).expect().spec(respSpec.build()).when().request(POST, REQ_URI));
+            return handler.apply(RestAssured.given().spec(reqSpec.build()).expect().spec(respSpec.build()).when().request(REQ_METHOD, REQ_URI));
         }
 
          /**
@@ -233,23 +246,14 @@ public class UserApi {
      *
      * @see #body List of user object (required)
      */
-    public class CreateUsersWithListInputOper {
+    public static class CreateUsersWithListInputOper {
 
-        public static final String REQ_METHOD = "POST";
+        public static final Method REQ_METHOD = POST;
         public static final String REQ_URI = "/user/createWithList";
-        public static final String SUMMARY = "Creates list of users with given input array";
 
         private RequestSpecBuilder reqSpec;
-
         private ResponseSpecBuilder respSpec;
 
-        public CreateUsersWithListInputOper() {
-            this.reqSpec = new RequestSpecBuilder();
-            reqSpec.setContentType("*/*");
-            reqSpec.setAccept("application/json");
-            this.respSpec = new ResponseSpecBuilder();
-        }
-
         public CreateUsersWithListInputOper(RequestSpecBuilder reqSpec) {
             this.reqSpec = reqSpec;
             reqSpec.setContentType("*/*");
@@ -264,7 +268,7 @@ public class UserApi {
          * @return type
          */
         public  T execute(Function handler) {
-            return handler.apply(RestAssured.given().spec(reqSpec.build()).expect().spec(respSpec.build()).when().request(POST, REQ_URI));
+            return handler.apply(RestAssured.given().spec(reqSpec.build()).expect().spec(respSpec.build()).when().request(REQ_METHOD, REQ_URI));
         }
 
          /**
@@ -302,22 +306,14 @@ public class UserApi {
      *
      * @see #usernamePath The name that needs to be deleted (required)
      */
-    public class DeleteUserOper {
+    public static class DeleteUserOper {
 
-        public static final String REQ_METHOD = "DELETE";
+        public static final Method REQ_METHOD = DELETE;
         public static final String REQ_URI = "/user/{username}";
-        public static final String SUMMARY = "Delete user";
 
         private RequestSpecBuilder reqSpec;
-
         private ResponseSpecBuilder respSpec;
 
-        public DeleteUserOper() {
-            this.reqSpec = new RequestSpecBuilder();
-            reqSpec.setAccept("application/json");
-            this.respSpec = new ResponseSpecBuilder();
-        }
-
         public DeleteUserOper(RequestSpecBuilder reqSpec) {
             this.reqSpec = reqSpec;
             reqSpec.setAccept("application/json");
@@ -331,7 +327,7 @@ public class UserApi {
          * @return type
          */
         public  T execute(Function handler) {
-            return handler.apply(RestAssured.given().spec(reqSpec.build()).expect().spec(respSpec.build()).when().request(DELETE, REQ_URI));
+            return handler.apply(RestAssured.given().spec(reqSpec.build()).expect().spec(respSpec.build()).when().request(REQ_METHOD, REQ_URI));
         }
 
         public static final String USERNAME_PATH = "username";
@@ -372,22 +368,14 @@ public class UserApi {
      * @see #usernamePath The name that needs to be fetched. Use user1 for testing. (required)
      * return User
      */
-    public class GetUserByNameOper {
+    public static class GetUserByNameOper {
 
-        public static final String REQ_METHOD = "GET";
+        public static final Method REQ_METHOD = GET;
         public static final String REQ_URI = "/user/{username}";
-        public static final String SUMMARY = "Get user by user name";
 
         private RequestSpecBuilder reqSpec;
-
         private ResponseSpecBuilder respSpec;
 
-        public GetUserByNameOper() {
-            this.reqSpec = new RequestSpecBuilder();
-            reqSpec.setAccept("application/json");
-            this.respSpec = new ResponseSpecBuilder();
-        }
-
         public GetUserByNameOper(RequestSpecBuilder reqSpec) {
             this.reqSpec = reqSpec;
             reqSpec.setAccept("application/json");
@@ -401,7 +389,7 @@ public class UserApi {
          * @return type
          */
         public  T execute(Function handler) {
-            return handler.apply(RestAssured.given().spec(reqSpec.build()).expect().spec(respSpec.build()).when().request(GET, REQ_URI));
+            return handler.apply(RestAssured.given().spec(reqSpec.build()).expect().spec(respSpec.build()).when().request(REQ_METHOD, REQ_URI));
         }
 
         /**
@@ -453,22 +441,14 @@ public class UserApi {
      * @see #passwordQuery The password for login in clear text (required)
      * return String
      */
-    public class LoginUserOper {
+    public static class LoginUserOper {
 
-        public static final String REQ_METHOD = "GET";
+        public static final Method REQ_METHOD = GET;
         public static final String REQ_URI = "/user/login";
-        public static final String SUMMARY = "Logs user into the system";
 
         private RequestSpecBuilder reqSpec;
-
         private ResponseSpecBuilder respSpec;
 
-        public LoginUserOper() {
-            this.reqSpec = new RequestSpecBuilder();
-            reqSpec.setAccept("application/json");
-            this.respSpec = new ResponseSpecBuilder();
-        }
-
         public LoginUserOper(RequestSpecBuilder reqSpec) {
             this.reqSpec = reqSpec;
             reqSpec.setAccept("application/json");
@@ -482,7 +462,7 @@ public class UserApi {
          * @return type
          */
         public  T execute(Function handler) {
-            return handler.apply(RestAssured.given().spec(reqSpec.build()).expect().spec(respSpec.build()).when().request(GET, REQ_URI));
+            return handler.apply(RestAssured.given().spec(reqSpec.build()).expect().spec(respSpec.build()).when().request(REQ_METHOD, REQ_URI));
         }
 
         /**
@@ -542,22 +522,14 @@ public class UserApi {
      * 
      *
      */
-    public class LogoutUserOper {
+    public static class LogoutUserOper {
 
-        public static final String REQ_METHOD = "GET";
+        public static final Method REQ_METHOD = GET;
         public static final String REQ_URI = "/user/logout";
-        public static final String SUMMARY = "Logs out current logged in user session";
 
         private RequestSpecBuilder reqSpec;
-
         private ResponseSpecBuilder respSpec;
 
-        public LogoutUserOper() {
-            this.reqSpec = new RequestSpecBuilder();
-            reqSpec.setAccept("application/json");
-            this.respSpec = new ResponseSpecBuilder();
-        }
-
         public LogoutUserOper(RequestSpecBuilder reqSpec) {
             this.reqSpec = reqSpec;
             reqSpec.setAccept("application/json");
@@ -571,7 +543,7 @@ public class UserApi {
          * @return type
          */
         public  T execute(Function handler) {
-            return handler.apply(RestAssured.given().spec(reqSpec.build()).expect().spec(respSpec.build()).when().request(GET, REQ_URI));
+            return handler.apply(RestAssured.given().spec(reqSpec.build()).expect().spec(respSpec.build()).when().request(REQ_METHOD, REQ_URI));
         }
 
         /**
@@ -601,23 +573,14 @@ public class UserApi {
      * @see #usernamePath name that need to be deleted (required)
      * @see #body Updated user object (required)
      */
-    public class UpdateUserOper {
+    public static class UpdateUserOper {
 
-        public static final String REQ_METHOD = "PUT";
+        public static final Method REQ_METHOD = PUT;
         public static final String REQ_URI = "/user/{username}";
-        public static final String SUMMARY = "Updated user";
 
         private RequestSpecBuilder reqSpec;
-
         private ResponseSpecBuilder respSpec;
 
-        public UpdateUserOper() {
-            this.reqSpec = new RequestSpecBuilder();
-            reqSpec.setContentType("*/*");
-            reqSpec.setAccept("application/json");
-            this.respSpec = new ResponseSpecBuilder();
-        }
-
         public UpdateUserOper(RequestSpecBuilder reqSpec) {
             this.reqSpec = reqSpec;
             reqSpec.setContentType("*/*");
@@ -632,7 +595,7 @@ public class UserApi {
          * @return type
          */
         public  T execute(Function handler) {
-            return handler.apply(RestAssured.given().spec(reqSpec.build()).expect().spec(respSpec.build()).when().request(PUT, REQ_URI));
+            return handler.apply(RestAssured.given().spec(reqSpec.build()).expect().spec(respSpec.build()).when().request(REQ_METHOD, REQ_URI));
         }
 
          /**
diff --git a/samples/client/petstore/javascript-es6/.openapi-generator/VERSION b/samples/client/petstore/javascript-es6/.openapi-generator/VERSION
index 1c00c5181548..14900cee60e8 100644
--- a/samples/client/petstore/javascript-es6/.openapi-generator/VERSION
+++ b/samples/client/petstore/javascript-es6/.openapi-generator/VERSION
@@ -1 +1 @@
-3.0.2-SNAPSHOT
\ No newline at end of file
+3.2.1-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/javascript-es6/README.md b/samples/client/petstore/javascript-es6/README.md
index 9503c4fd15ae..7674da7bb398 100644
--- a/samples/client/petstore/javascript-es6/README.md
+++ b/samples/client/petstore/javascript-es6/README.md
@@ -80,7 +80,7 @@ var callback = function(error, data, response) {
     console.log('API called successfully. Returned data: ' + data);
   }
 };
-api.testSpecialTags(client, callback);
+api.call123testSpecialTags(client, callback);
 
 ```
 
@@ -90,11 +90,12 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
 
 Class | Method | HTTP request | Description
 ------------ | ------------- | ------------- | -------------
-*OpenApiPetstore.AnotherFakeApi* | [**testSpecialTags**](docs/AnotherFakeApi.md#testSpecialTags) | **PATCH** /another-fake/dummy | To test special tags
+*OpenApiPetstore.AnotherFakeApi* | [**call123testSpecialTags**](docs/AnotherFakeApi.md#call123testSpecialTags) | **PATCH** /another-fake/dummy | To test special tags
 *OpenApiPetstore.FakeApi* | [**fakeOuterBooleanSerialize**](docs/FakeApi.md#fakeOuterBooleanSerialize) | **POST** /fake/outer/boolean | 
 *OpenApiPetstore.FakeApi* | [**fakeOuterCompositeSerialize**](docs/FakeApi.md#fakeOuterCompositeSerialize) | **POST** /fake/outer/composite | 
 *OpenApiPetstore.FakeApi* | [**fakeOuterNumberSerialize**](docs/FakeApi.md#fakeOuterNumberSerialize) | **POST** /fake/outer/number | 
 *OpenApiPetstore.FakeApi* | [**fakeOuterStringSerialize**](docs/FakeApi.md#fakeOuterStringSerialize) | **POST** /fake/outer/string | 
+*OpenApiPetstore.FakeApi* | [**testBodyWithFileSchema**](docs/FakeApi.md#testBodyWithFileSchema) | **PUT** /fake/body-with-file-schema | 
 *OpenApiPetstore.FakeApi* | [**testBodyWithQueryParams**](docs/FakeApi.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params | 
 *OpenApiPetstore.FakeApi* | [**testClientModel**](docs/FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model
 *OpenApiPetstore.FakeApi* | [**testEndpointParameters**](docs/FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 
@@ -110,6 +111,7 @@ Class | Method | HTTP request | Description
 *OpenApiPetstore.PetApi* | [**updatePet**](docs/PetApi.md#updatePet) | **PUT** /pet | Update an existing pet
 *OpenApiPetstore.PetApi* | [**updatePetWithForm**](docs/PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data
 *OpenApiPetstore.PetApi* | [**uploadFile**](docs/PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image
+*OpenApiPetstore.PetApi* | [**uploadFileWithRequiredFile**](docs/PetApi.md#uploadFileWithRequiredFile) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required)
 *OpenApiPetstore.StoreApi* | [**deleteOrder**](docs/StoreApi.md#deleteOrder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID
 *OpenApiPetstore.StoreApi* | [**getInventory**](docs/StoreApi.md#getInventory) | **GET** /store/inventory | Returns pet inventories by status
 *OpenApiPetstore.StoreApi* | [**getOrderById**](docs/StoreApi.md#getOrderById) | **GET** /store/order/{order_id} | Find purchase order by ID
@@ -142,6 +144,8 @@ Class | Method | HTTP request | Description
  - [OpenApiPetstore.EnumArrays](docs/EnumArrays.md)
  - [OpenApiPetstore.EnumClass](docs/EnumClass.md)
  - [OpenApiPetstore.EnumTest](docs/EnumTest.md)
+ - [OpenApiPetstore.File](docs/File.md)
+ - [OpenApiPetstore.FileSchemaTestClass](docs/FileSchemaTestClass.md)
  - [OpenApiPetstore.FormatTest](docs/FormatTest.md)
  - [OpenApiPetstore.HasOnlyReadOnly](docs/HasOnlyReadOnly.md)
  - [OpenApiPetstore.List](docs/List.md)
@@ -157,6 +161,7 @@ Class | Method | HTTP request | Description
  - [OpenApiPetstore.Pet](docs/Pet.md)
  - [OpenApiPetstore.ReadOnlyFirst](docs/ReadOnlyFirst.md)
  - [OpenApiPetstore.SpecialModelName](docs/SpecialModelName.md)
+ - [OpenApiPetstore.StringBooleanMap](docs/StringBooleanMap.md)
  - [OpenApiPetstore.Tag](docs/Tag.md)
  - [OpenApiPetstore.User](docs/User.md)
 
diff --git a/samples/client/petstore/javascript-es6/docs/AnotherFakeApi.md b/samples/client/petstore/javascript-es6/docs/AnotherFakeApi.md
index c70f1769bf62..efd102e1ab31 100644
--- a/samples/client/petstore/javascript-es6/docs/AnotherFakeApi.md
+++ b/samples/client/petstore/javascript-es6/docs/AnotherFakeApi.md
@@ -4,16 +4,16 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
 
 Method | HTTP request | Description
 ------------- | ------------- | -------------
-[**testSpecialTags**](AnotherFakeApi.md#testSpecialTags) | **PATCH** /another-fake/dummy | To test special tags
+[**call123testSpecialTags**](AnotherFakeApi.md#call123testSpecialTags) | **PATCH** /another-fake/dummy | To test special tags
 
 
-
-# **testSpecialTags**
-> Client testSpecialTags(client)
+
+# **call123testSpecialTags**
+> Client call123testSpecialTags(client)
 
 To test special tags
 
-To test special tags
+To test special tags and operation ID starting with number
 
 ### Example
 ```javascript
@@ -21,7 +21,7 @@ import OpenApiPetstore from 'open_api_petstore';
 
 let apiInstance = new OpenApiPetstore.AnotherFakeApi();
 let client = new OpenApiPetstore.Client(); // Client | client model
-apiInstance.testSpecialTags(client, (error, data, response) => {
+apiInstance.call123testSpecialTags(client, (error, data, response) => {
   if (error) {
     console.error(error);
   } else {
diff --git a/samples/client/petstore/javascript-es6/docs/FakeApi.md b/samples/client/petstore/javascript-es6/docs/FakeApi.md
index 3327bfce4e6f..b51de14ceaa5 100644
--- a/samples/client/petstore/javascript-es6/docs/FakeApi.md
+++ b/samples/client/petstore/javascript-es6/docs/FakeApi.md
@@ -8,6 +8,7 @@ Method | HTTP request | Description
 [**fakeOuterCompositeSerialize**](FakeApi.md#fakeOuterCompositeSerialize) | **POST** /fake/outer/composite | 
 [**fakeOuterNumberSerialize**](FakeApi.md#fakeOuterNumberSerialize) | **POST** /fake/outer/number | 
 [**fakeOuterStringSerialize**](FakeApi.md#fakeOuterStringSerialize) | **POST** /fake/outer/string | 
+[**testBodyWithFileSchema**](FakeApi.md#testBodyWithFileSchema) | **PUT** /fake/body-with-file-schema | 
 [**testBodyWithQueryParams**](FakeApi.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params | 
 [**testClientModel**](FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model
 [**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 
@@ -192,6 +193,48 @@ No authorization required
  - **Content-Type**: Not defined
  - **Accept**: */*
 
+
+# **testBodyWithFileSchema**
+> testBodyWithFileSchema(fileSchemaTestClass)
+
+
+
+For this test, the body for this request much reference a schema named `File`.
+
+### Example
+```javascript
+import OpenApiPetstore from 'open_api_petstore';
+
+let apiInstance = new OpenApiPetstore.FakeApi();
+let fileSchemaTestClass = new OpenApiPetstore.FileSchemaTestClass(); // FileSchemaTestClass | 
+apiInstance.testBodyWithFileSchema(fileSchemaTestClass, (error, data, response) => {
+  if (error) {
+    console.error(error);
+  } else {
+    console.log('API called successfully.');
+  }
+});
+```
+
+### Parameters
+
+Name | Type | Description  | Notes
+------------- | ------------- | ------------- | -------------
+ **fileSchemaTestClass** | [**FileSchemaTestClass**](FileSchemaTestClass.md)|  | 
+
+### Return type
+
+null (empty response body)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: Not defined
+
 
 # **testBodyWithQueryParams**
 > testBodyWithQueryParams(query, user)
diff --git a/samples/client/petstore/javascript-es6/docs/File.md b/samples/client/petstore/javascript-es6/docs/File.md
new file mode 100644
index 000000000000..a34d76a3e46e
--- /dev/null
+++ b/samples/client/petstore/javascript-es6/docs/File.md
@@ -0,0 +1,8 @@
+# OpenApiPetstore.File
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**sourceURI** | **String** | Test capitalization | [optional] 
+
+
diff --git a/samples/client/petstore/javascript-es6/docs/FileSchemaTestClass.md b/samples/client/petstore/javascript-es6/docs/FileSchemaTestClass.md
new file mode 100644
index 000000000000..3ccb4162dcc1
--- /dev/null
+++ b/samples/client/petstore/javascript-es6/docs/FileSchemaTestClass.md
@@ -0,0 +1,9 @@
+# OpenApiPetstore.FileSchemaTestClass
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**file** | **File** |  | [optional] 
+**files** | **[File]** |  | [optional] 
+
+
diff --git a/samples/client/petstore/javascript-es6/docs/MapTest.md b/samples/client/petstore/javascript-es6/docs/MapTest.md
index 4a128da00fd0..f1075bf0681f 100644
--- a/samples/client/petstore/javascript-es6/docs/MapTest.md
+++ b/samples/client/petstore/javascript-es6/docs/MapTest.md
@@ -5,6 +5,8 @@ Name | Type | Description | Notes
 ------------ | ------------- | ------------- | -------------
 **mapMapOfString** | **{String: {String: String}}** |  | [optional] 
 **mapOfEnumString** | **{String: String}** |  | [optional] 
+**directMap** | **{String: Boolean}** |  | [optional] 
+**indirectMap** | [**StringBooleanMap**](StringBooleanMap.md) |  | [optional] 
 
 
 
diff --git a/samples/client/petstore/javascript-es6/docs/PetApi.md b/samples/client/petstore/javascript-es6/docs/PetApi.md
index 324ecfbe867a..76dabe26aed6 100644
--- a/samples/client/petstore/javascript-es6/docs/PetApi.md
+++ b/samples/client/petstore/javascript-es6/docs/PetApi.md
@@ -12,6 +12,7 @@ Method | HTTP request | Description
 [**updatePet**](PetApi.md#updatePet) | **PUT** /pet | Update an existing pet
 [**updatePetWithForm**](PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data
 [**uploadFile**](PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image
+[**uploadFileWithRequiredFile**](PetApi.md#uploadFileWithRequiredFile) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required)
 
 
 
@@ -398,3 +399,54 @@ Name | Type | Description  | Notes
  - **Content-Type**: multipart/form-data
  - **Accept**: application/json
 
+
+# **uploadFileWithRequiredFile**
+> ApiResponse uploadFileWithRequiredFile(petId, requiredFile, opts)
+
+uploads an image (required)
+
+### Example
+```javascript
+import OpenApiPetstore from 'open_api_petstore';
+let defaultClient = OpenApiPetstore.ApiClient.instance;
+
+// Configure OAuth2 access token for authorization: petstore_auth
+let petstore_auth = defaultClient.authentications['petstore_auth'];
+petstore_auth.accessToken = 'YOUR ACCESS TOKEN';
+
+let apiInstance = new OpenApiPetstore.PetApi();
+let petId = 789; // Number | ID of pet to update
+let requiredFile = "/path/to/file"; // File | file to upload
+let opts = {
+  'additionalMetadata': "additionalMetadata_example" // String | Additional data to pass to server
+};
+apiInstance.uploadFileWithRequiredFile(petId, requiredFile, opts, (error, data, response) => {
+  if (error) {
+    console.error(error);
+  } else {
+    console.log('API called successfully. Returned data: ' + data);
+  }
+});
+```
+
+### Parameters
+
+Name | Type | Description  | Notes
+------------- | ------------- | ------------- | -------------
+ **petId** | **Number**| ID of pet to update | 
+ **requiredFile** | **File**| file to upload | 
+ **additionalMetadata** | **String**| Additional data to pass to server | [optional] 
+
+### Return type
+
+[**ApiResponse**](ApiResponse.md)
+
+### Authorization
+
+[petstore_auth](../README.md#petstore_auth)
+
+### HTTP request headers
+
+ - **Content-Type**: multipart/form-data
+ - **Accept**: application/json
+
diff --git a/samples/client/petstore/javascript-es6/docs/StringBooleanMap.md b/samples/client/petstore/javascript-es6/docs/StringBooleanMap.md
new file mode 100644
index 000000000000..195a7d57677f
--- /dev/null
+++ b/samples/client/petstore/javascript-es6/docs/StringBooleanMap.md
@@ -0,0 +1,7 @@
+# OpenApiPetstore.StringBooleanMap
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+
+
diff --git a/samples/client/petstore/javascript-es6/package.json b/samples/client/petstore/javascript-es6/package.json
index df2fea63d600..b10b73e80a3f 100644
--- a/samples/client/petstore/javascript-es6/package.json
+++ b/samples/client/petstore/javascript-es6/package.json
@@ -13,7 +13,7 @@
   "dependencies": {
     "babel": "^6.23.0",
     "babel-cli": "^6.26.0",
-    "superagent": "3.5.2"
+    "superagent": "3.7.0"
   },
   "devDependencies": {
     "babel-core": "6.26.0",
diff --git a/samples/client/petstore/javascript-es6/src/api/AnotherFakeApi.js b/samples/client/petstore/javascript-es6/src/api/AnotherFakeApi.js
index 601a54725e33..6b7e708a5682 100644
--- a/samples/client/petstore/javascript-es6/src/api/AnotherFakeApi.js
+++ b/samples/client/petstore/javascript-es6/src/api/AnotherFakeApi.js
@@ -35,8 +35,8 @@ export default class AnotherFakeApi {
 
 
     /**
-     * Callback function to receive the result of the testSpecialTags operation.
-     * @callback module:api/AnotherFakeApi~testSpecialTagsCallback
+     * Callback function to receive the result of the call123testSpecialTags operation.
+     * @callback module:api/AnotherFakeApi~call123testSpecialTagsCallback
      * @param {String} error Error message, if any.
      * @param {module:model/Client} data The data returned by the service call.
      * @param {String} response The complete HTTP response.
@@ -44,17 +44,17 @@ export default class AnotherFakeApi {
 
     /**
      * To test special tags
-     * To test special tags
+     * To test special tags and operation ID starting with number
      * @param {module:model/Client} client client model
-     * @param {module:api/AnotherFakeApi~testSpecialTagsCallback} callback The callback function, accepting three arguments: error, data, response
+     * @param {module:api/AnotherFakeApi~call123testSpecialTagsCallback} callback The callback function, accepting three arguments: error, data, response
      * data is of type: {@link module:model/Client}
      */
-    testSpecialTags(client, callback) {
+    call123testSpecialTags(client, callback) {
       let postBody = client;
 
       // verify the required parameter 'client' is set
       if (client === undefined || client === null) {
-        throw new Error("Missing the required parameter 'client' when calling testSpecialTags");
+        throw new Error("Missing the required parameter 'client' when calling call123testSpecialTags");
       }
 
 
diff --git a/samples/client/petstore/javascript-es6/src/api/FakeApi.js b/samples/client/petstore/javascript-es6/src/api/FakeApi.js
index 725872e09963..b559f3607816 100644
--- a/samples/client/petstore/javascript-es6/src/api/FakeApi.js
+++ b/samples/client/petstore/javascript-es6/src/api/FakeApi.js
@@ -14,6 +14,7 @@
 
 import ApiClient from "../ApiClient";
 import Client from '../model/Client';
+import FileSchemaTestClass from '../model/FileSchemaTestClass';
 import OuterComposite from '../model/OuterComposite';
 import User from '../model/User';
 
@@ -200,6 +201,49 @@ export default class FakeApi {
       );
     }
 
+    /**
+     * Callback function to receive the result of the testBodyWithFileSchema operation.
+     * @callback module:api/FakeApi~testBodyWithFileSchemaCallback
+     * @param {String} error Error message, if any.
+     * @param data This operation does not return a value.
+     * @param {String} response The complete HTTP response.
+     */
+
+    /**
+     * For this test, the body for this request much reference a schema named `File`.
+     * @param {module:model/FileSchemaTestClass} fileSchemaTestClass 
+     * @param {module:api/FakeApi~testBodyWithFileSchemaCallback} callback The callback function, accepting three arguments: error, data, response
+     */
+    testBodyWithFileSchema(fileSchemaTestClass, callback) {
+      let postBody = fileSchemaTestClass;
+
+      // verify the required parameter 'fileSchemaTestClass' is set
+      if (fileSchemaTestClass === undefined || fileSchemaTestClass === null) {
+        throw new Error("Missing the required parameter 'fileSchemaTestClass' when calling testBodyWithFileSchema");
+      }
+
+
+      let pathParams = {
+      };
+      let queryParams = {
+      };
+      let headerParams = {
+      };
+      let formParams = {
+      };
+
+      let authNames = [];
+      let contentTypes = ['application/json'];
+      let accepts = [];
+      let returnType = null;
+
+      return this.apiClient.callApi(
+        '/fake/body-with-file-schema', 'PUT',
+        pathParams, queryParams, headerParams, formParams, postBody,
+        authNames, contentTypes, accepts, returnType, callback
+      );
+    }
+
     /**
      * Callback function to receive the result of the testBodyWithQueryParams operation.
      * @callback module:api/FakeApi~testBodyWithQueryParamsCallback
diff --git a/samples/client/petstore/javascript-es6/src/api/PetApi.js b/samples/client/petstore/javascript-es6/src/api/PetApi.js
index d6b39c8671b8..e55f6d26020a 100644
--- a/samples/client/petstore/javascript-es6/src/api/PetApi.js
+++ b/samples/client/petstore/javascript-es6/src/api/PetApi.js
@@ -408,5 +408,61 @@ export default class PetApi {
       );
     }
 
+    /**
+     * Callback function to receive the result of the uploadFileWithRequiredFile operation.
+     * @callback module:api/PetApi~uploadFileWithRequiredFileCallback
+     * @param {String} error Error message, if any.
+     * @param {module:model/ApiResponse} data The data returned by the service call.
+     * @param {String} response The complete HTTP response.
+     */
+
+    /**
+     * uploads an image (required)
+     * @param {Number} petId ID of pet to update
+     * @param {File} requiredFile file to upload
+     * @param {Object} opts Optional parameters
+     * @param {String} opts.additionalMetadata Additional data to pass to server
+     * @param {module:api/PetApi~uploadFileWithRequiredFileCallback} callback The callback function, accepting three arguments: error, data, response
+     * data is of type: {@link module:model/ApiResponse}
+     */
+    uploadFileWithRequiredFile(petId, requiredFile, opts, callback) {
+      opts = opts || {};
+      let postBody = null;
+
+      // verify the required parameter 'petId' is set
+      if (petId === undefined || petId === null) {
+        throw new Error("Missing the required parameter 'petId' when calling uploadFileWithRequiredFile");
+      }
+
+      // verify the required parameter 'requiredFile' is set
+      if (requiredFile === undefined || requiredFile === null) {
+        throw new Error("Missing the required parameter 'requiredFile' when calling uploadFileWithRequiredFile");
+      }
+
+
+      let pathParams = {
+        'petId': petId
+      };
+      let queryParams = {
+      };
+      let headerParams = {
+      };
+      let formParams = {
+        'additionalMetadata': opts['additionalMetadata'],
+        'requiredFile': requiredFile
+      };
+
+      let authNames = ['petstore_auth'];
+      let contentTypes = ['multipart/form-data'];
+      let accepts = ['application/json'];
+      let returnType = ApiResponse;
+
+      return this.apiClient.callApi(
+        '/fake/{petId}/uploadImageWithRequiredFile', 'POST',
+        pathParams, queryParams, headerParams, formParams, postBody,
+        authNames, contentTypes, accepts, returnType, callback
+      );
+    }
+
 
 }
diff --git a/samples/client/petstore/javascript-es6/src/index.js b/samples/client/petstore/javascript-es6/src/index.js
index 95bcba6b5d54..c3ca07e4c4c7 100644
--- a/samples/client/petstore/javascript-es6/src/index.js
+++ b/samples/client/petstore/javascript-es6/src/index.js
@@ -29,6 +29,8 @@ import Dog from './model/Dog';
 import EnumArrays from './model/EnumArrays';
 import EnumClass from './model/EnumClass';
 import EnumTest from './model/EnumTest';
+import File from './model/File';
+import FileSchemaTestClass from './model/FileSchemaTestClass';
 import FormatTest from './model/FormatTest';
 import HasOnlyReadOnly from './model/HasOnlyReadOnly';
 import List from './model/List';
@@ -44,6 +46,7 @@ import OuterEnum from './model/OuterEnum';
 import Pet from './model/Pet';
 import ReadOnlyFirst from './model/ReadOnlyFirst';
 import SpecialModelName from './model/SpecialModelName';
+import StringBooleanMap from './model/StringBooleanMap';
 import Tag from './model/Tag';
 import User from './model/User';
 import AnotherFakeApi from './api/AnotherFakeApi';
@@ -188,6 +191,18 @@ export {
      */
     EnumTest,
 
+    /**
+     * The File model constructor.
+     * @property {module:model/File}
+     */
+    File,
+
+    /**
+     * The FileSchemaTestClass model constructor.
+     * @property {module:model/FileSchemaTestClass}
+     */
+    FileSchemaTestClass,
+
     /**
      * The FormatTest model constructor.
      * @property {module:model/FormatTest}
@@ -278,6 +293,12 @@ export {
      */
     SpecialModelName,
 
+    /**
+     * The StringBooleanMap model constructor.
+     * @property {module:model/StringBooleanMap}
+     */
+    StringBooleanMap,
+
     /**
      * The Tag model constructor.
      * @property {module:model/Tag}
diff --git a/samples/client/petstore/javascript-es6/src/model/File.js b/samples/client/petstore/javascript-es6/src/model/File.js
new file mode 100644
index 000000000000..e29e1a0309f1
--- /dev/null
+++ b/samples/client/petstore/javascript-es6/src/model/File.js
@@ -0,0 +1,73 @@
+/**
+ * OpenAPI Petstore
+ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
+ *
+ * OpenAPI spec version: 1.0.0
+ * 
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ *
+ */
+
+import ApiClient from '../ApiClient';
+
+/**
+ * The File model module.
+ * @module model/File
+ * @version 1.0.0
+ */
+class File {
+    /**
+     * Constructs a new File.
+     * Must be named `File` for test.
+     * @alias module:model/File
+     */
+    constructor() { 
+        
+        File.initialize(this);
+    }
+
+    /**
+     * Initializes the fields of this object.
+     * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
+     * Only for internal use.
+     */
+    static initialize(obj) { 
+    }
+
+    /**
+     * Constructs a File from a plain JavaScript object, optionally creating a new instance.
+     * Copies all relevant properties from data to obj if supplied or a new instance if not.
+     * @param {Object} data The plain JavaScript object bearing properties of interest.
+     * @param {module:model/File} obj Optional instance to populate.
+     * @return {module:model/File} The populated File instance.
+     */
+    static constructFromObject(data, obj) {
+        if (data) {
+            obj = obj || new File();
+
+            if (data.hasOwnProperty('sourceURI')) {
+                obj['sourceURI'] = ApiClient.convertToType(data['sourceURI'], 'String');
+            }
+        }
+        return obj;
+    }
+
+
+}
+
+/**
+ * Test capitalization
+ * @member {String} sourceURI
+ */
+File.prototype['sourceURI'] = undefined;
+
+
+
+
+
+
+export default File;
+
diff --git a/samples/client/petstore/javascript-es6/src/model/FileSchemaTestClass.js b/samples/client/petstore/javascript-es6/src/model/FileSchemaTestClass.js
new file mode 100644
index 000000000000..b4be63df0e68
--- /dev/null
+++ b/samples/client/petstore/javascript-es6/src/model/FileSchemaTestClass.js
@@ -0,0 +1,79 @@
+/**
+ * OpenAPI Petstore
+ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
+ *
+ * OpenAPI spec version: 1.0.0
+ * 
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ *
+ */
+
+import ApiClient from '../ApiClient';
+
+/**
+ * The FileSchemaTestClass model module.
+ * @module model/FileSchemaTestClass
+ * @version 1.0.0
+ */
+class FileSchemaTestClass {
+    /**
+     * Constructs a new FileSchemaTestClass.
+     * @alias module:model/FileSchemaTestClass
+     */
+    constructor() { 
+        
+        FileSchemaTestClass.initialize(this);
+    }
+
+    /**
+     * Initializes the fields of this object.
+     * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
+     * Only for internal use.
+     */
+    static initialize(obj) { 
+    }
+
+    /**
+     * Constructs a FileSchemaTestClass from a plain JavaScript object, optionally creating a new instance.
+     * Copies all relevant properties from data to obj if supplied or a new instance if not.
+     * @param {Object} data The plain JavaScript object bearing properties of interest.
+     * @param {module:model/FileSchemaTestClass} obj Optional instance to populate.
+     * @return {module:model/FileSchemaTestClass} The populated FileSchemaTestClass instance.
+     */
+    static constructFromObject(data, obj) {
+        if (data) {
+            obj = obj || new FileSchemaTestClass();
+
+            if (data.hasOwnProperty('file')) {
+                obj['file'] = File.constructFromObject(data['file']);
+            }
+            if (data.hasOwnProperty('files')) {
+                obj['files'] = ApiClient.convertToType(data['files'], [File]);
+            }
+        }
+        return obj;
+    }
+
+
+}
+
+/**
+ * @member {File} file
+ */
+FileSchemaTestClass.prototype['file'] = undefined;
+
+/**
+ * @member {Array.} files
+ */
+FileSchemaTestClass.prototype['files'] = undefined;
+
+
+
+
+
+
+export default FileSchemaTestClass;
+
diff --git a/samples/client/petstore/javascript-es6/src/model/MapTest.js b/samples/client/petstore/javascript-es6/src/model/MapTest.js
index 8cc6640c9d4f..31c37d601cec 100644
--- a/samples/client/petstore/javascript-es6/src/model/MapTest.js
+++ b/samples/client/petstore/javascript-es6/src/model/MapTest.js
@@ -12,6 +12,7 @@
  */
 
 import ApiClient from '../ApiClient';
+import StringBooleanMap from './StringBooleanMap';
 
 /**
  * The MapTest model module.
@@ -53,6 +54,12 @@ class MapTest {
             if (data.hasOwnProperty('map_of_enum_string')) {
                 obj['map_of_enum_string'] = ApiClient.convertToType(data['map_of_enum_string'], {'String': 'String'});
             }
+            if (data.hasOwnProperty('direct_map')) {
+                obj['direct_map'] = ApiClient.convertToType(data['direct_map'], {'String': 'Boolean'});
+            }
+            if (data.hasOwnProperty('indirect_map')) {
+                obj['indirect_map'] = StringBooleanMap.constructFromObject(data['indirect_map']);
+            }
         }
         return obj;
     }
@@ -70,6 +77,16 @@ MapTest.prototype['map_map_of_string'] = undefined;
  */
 MapTest.prototype['map_of_enum_string'] = undefined;
 
+/**
+ * @member {Object.} direct_map
+ */
+MapTest.prototype['direct_map'] = undefined;
+
+/**
+ * @member {module:model/StringBooleanMap} indirect_map
+ */
+MapTest.prototype['indirect_map'] = undefined;
+
 
 
 
diff --git a/samples/client/petstore/javascript-es6/src/model/OuterComposite.js b/samples/client/petstore/javascript-es6/src/model/OuterComposite.js
index 8b61cb8f654b..ba597462eec6 100644
--- a/samples/client/petstore/javascript-es6/src/model/OuterComposite.js
+++ b/samples/client/petstore/javascript-es6/src/model/OuterComposite.js
@@ -48,13 +48,13 @@ class OuterComposite {
             obj = obj || new OuterComposite();
 
             if (data.hasOwnProperty('my_number')) {
-                obj['my_number'] = 'Number'.constructFromObject(data['my_number']);
+                obj['my_number'] = ApiClient.convertToType(data['my_number'], 'Number');
             }
             if (data.hasOwnProperty('my_string')) {
-                obj['my_string'] = 'String'.constructFromObject(data['my_string']);
+                obj['my_string'] = ApiClient.convertToType(data['my_string'], 'String');
             }
             if (data.hasOwnProperty('my_boolean')) {
-                obj['my_boolean'] = 'Boolean'.constructFromObject(data['my_boolean']);
+                obj['my_boolean'] = ApiClient.convertToType(data['my_boolean'], 'Boolean');
             }
         }
         return obj;
diff --git a/samples/client/petstore/javascript-es6/src/model/StringBooleanMap.js b/samples/client/petstore/javascript-es6/src/model/StringBooleanMap.js
new file mode 100644
index 000000000000..30172b33f7b9
--- /dev/null
+++ b/samples/client/petstore/javascript-es6/src/model/StringBooleanMap.js
@@ -0,0 +1,67 @@
+/**
+ * OpenAPI Petstore
+ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
+ *
+ * OpenAPI spec version: 1.0.0
+ * 
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ *
+ */
+
+import ApiClient from '../ApiClient';
+
+/**
+ * The StringBooleanMap model module.
+ * @module model/StringBooleanMap
+ * @version 1.0.0
+ */
+class StringBooleanMap {
+    /**
+     * Constructs a new StringBooleanMap.
+     * @alias module:model/StringBooleanMap
+     * @extends Object
+     */
+    constructor() { 
+        
+        StringBooleanMap.initialize(this);
+    }
+
+    /**
+     * Initializes the fields of this object.
+     * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
+     * Only for internal use.
+     */
+    static initialize(obj) { 
+    }
+
+    /**
+     * Constructs a StringBooleanMap from a plain JavaScript object, optionally creating a new instance.
+     * Copies all relevant properties from data to obj if supplied or a new instance if not.
+     * @param {Object} data The plain JavaScript object bearing properties of interest.
+     * @param {module:model/StringBooleanMap} obj Optional instance to populate.
+     * @return {module:model/StringBooleanMap} The populated StringBooleanMap instance.
+     */
+    static constructFromObject(data, obj) {
+        if (data) {
+            obj = obj || new StringBooleanMap();
+
+            ApiClient.constructFromObject(data, obj, 'Boolean');
+            
+
+        }
+        return obj;
+    }
+
+
+}
+
+
+
+
+
+
+export default StringBooleanMap;
+
diff --git a/samples/client/petstore/javascript-es6/test/model/File.spec.js b/samples/client/petstore/javascript-es6/test/model/File.spec.js
new file mode 100644
index 000000000000..10666dc53c7c
--- /dev/null
+++ b/samples/client/petstore/javascript-es6/test/model/File.spec.js
@@ -0,0 +1,65 @@
+/**
+ * OpenAPI Petstore
+ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
+ *
+ * OpenAPI spec version: 1.0.0
+ * 
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ *
+ */
+
+(function(root, factory) {
+  if (typeof define === 'function' && define.amd) {
+    // AMD.
+    define(['expect.js', '../../src/index'], factory);
+  } else if (typeof module === 'object' && module.exports) {
+    // CommonJS-like environments that support module.exports, like Node.
+    factory(require('expect.js'), require('../../src/index'));
+  } else {
+    // Browser globals (root is window)
+    factory(root.expect, root.OpenApiPetstore);
+  }
+}(this, function(expect, OpenApiPetstore) {
+  'use strict';
+
+  var instance;
+
+  beforeEach(function() {
+    instance = new OpenApiPetstore.File();
+  });
+
+  var getProperty = function(object, getter, property) {
+    // Use getter method if present; otherwise, get the property directly.
+    if (typeof object[getter] === 'function')
+      return object[getter]();
+    else
+      return object[property];
+  }
+
+  var setProperty = function(object, setter, property, value) {
+    // Use setter method if present; otherwise, set the property directly.
+    if (typeof object[setter] === 'function')
+      object[setter](value);
+    else
+      object[property] = value;
+  }
+
+  describe('File', function() {
+    it('should create an instance of File', function() {
+      // uncomment below and update the code to test File
+      //var instane = new OpenApiPetstore.File();
+      //expect(instance).to.be.a(OpenApiPetstore.File);
+    });
+
+    it('should have the property sourceURI (base name: "sourceURI")', function() {
+      // uncomment below and update the code to test the property sourceURI
+      //var instane = new OpenApiPetstore.File();
+      //expect(instance).to.be();
+    });
+
+  });
+
+}));
diff --git a/samples/client/petstore/javascript-es6/test/model/FileSchemaTestClass.spec.js b/samples/client/petstore/javascript-es6/test/model/FileSchemaTestClass.spec.js
new file mode 100644
index 000000000000..d6e49689d232
--- /dev/null
+++ b/samples/client/petstore/javascript-es6/test/model/FileSchemaTestClass.spec.js
@@ -0,0 +1,71 @@
+/**
+ * OpenAPI Petstore
+ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
+ *
+ * OpenAPI spec version: 1.0.0
+ * 
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ *
+ */
+
+(function(root, factory) {
+  if (typeof define === 'function' && define.amd) {
+    // AMD.
+    define(['expect.js', '../../src/index'], factory);
+  } else if (typeof module === 'object' && module.exports) {
+    // CommonJS-like environments that support module.exports, like Node.
+    factory(require('expect.js'), require('../../src/index'));
+  } else {
+    // Browser globals (root is window)
+    factory(root.expect, root.OpenApiPetstore);
+  }
+}(this, function(expect, OpenApiPetstore) {
+  'use strict';
+
+  var instance;
+
+  beforeEach(function() {
+    instance = new OpenApiPetstore.FileSchemaTestClass();
+  });
+
+  var getProperty = function(object, getter, property) {
+    // Use getter method if present; otherwise, get the property directly.
+    if (typeof object[getter] === 'function')
+      return object[getter]();
+    else
+      return object[property];
+  }
+
+  var setProperty = function(object, setter, property, value) {
+    // Use setter method if present; otherwise, set the property directly.
+    if (typeof object[setter] === 'function')
+      object[setter](value);
+    else
+      object[property] = value;
+  }
+
+  describe('FileSchemaTestClass', function() {
+    it('should create an instance of FileSchemaTestClass', function() {
+      // uncomment below and update the code to test FileSchemaTestClass
+      //var instane = new OpenApiPetstore.FileSchemaTestClass();
+      //expect(instance).to.be.a(OpenApiPetstore.FileSchemaTestClass);
+    });
+
+    it('should have the property file (base name: "file")', function() {
+      // uncomment below and update the code to test the property file
+      //var instane = new OpenApiPetstore.FileSchemaTestClass();
+      //expect(instance).to.be();
+    });
+
+    it('should have the property files (base name: "files")', function() {
+      // uncomment below and update the code to test the property files
+      //var instane = new OpenApiPetstore.FileSchemaTestClass();
+      //expect(instance).to.be();
+    });
+
+  });
+
+}));
diff --git a/samples/client/petstore/javascript-es6/test/model/StringBooleanMap.spec.js b/samples/client/petstore/javascript-es6/test/model/StringBooleanMap.spec.js
new file mode 100644
index 000000000000..0fd499cc819e
--- /dev/null
+++ b/samples/client/petstore/javascript-es6/test/model/StringBooleanMap.spec.js
@@ -0,0 +1,59 @@
+/**
+ * OpenAPI Petstore
+ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
+ *
+ * OpenAPI spec version: 1.0.0
+ * 
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ *
+ */
+
+(function(root, factory) {
+  if (typeof define === 'function' && define.amd) {
+    // AMD.
+    define(['expect.js', '../../src/index'], factory);
+  } else if (typeof module === 'object' && module.exports) {
+    // CommonJS-like environments that support module.exports, like Node.
+    factory(require('expect.js'), require('../../src/index'));
+  } else {
+    // Browser globals (root is window)
+    factory(root.expect, root.OpenApiPetstore);
+  }
+}(this, function(expect, OpenApiPetstore) {
+  'use strict';
+
+  var instance;
+
+  beforeEach(function() {
+    instance = new OpenApiPetstore.StringBooleanMap();
+  });
+
+  var getProperty = function(object, getter, property) {
+    // Use getter method if present; otherwise, get the property directly.
+    if (typeof object[getter] === 'function')
+      return object[getter]();
+    else
+      return object[property];
+  }
+
+  var setProperty = function(object, setter, property, value) {
+    // Use setter method if present; otherwise, set the property directly.
+    if (typeof object[setter] === 'function')
+      object[setter](value);
+    else
+      object[property] = value;
+  }
+
+  describe('StringBooleanMap', function() {
+    it('should create an instance of StringBooleanMap', function() {
+      // uncomment below and update the code to test StringBooleanMap
+      //var instane = new OpenApiPetstore.StringBooleanMap();
+      //expect(instance).to.be.a(OpenApiPetstore.StringBooleanMap);
+    });
+
+  });
+
+}));
diff --git a/samples/client/petstore/javascript-promise-es6/.openapi-generator/VERSION b/samples/client/petstore/javascript-promise-es6/.openapi-generator/VERSION
index 1c00c5181548..14900cee60e8 100644
--- a/samples/client/petstore/javascript-promise-es6/.openapi-generator/VERSION
+++ b/samples/client/petstore/javascript-promise-es6/.openapi-generator/VERSION
@@ -1 +1 @@
-3.0.2-SNAPSHOT
\ No newline at end of file
+3.2.1-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/javascript-promise-es6/README.md b/samples/client/petstore/javascript-promise-es6/README.md
index fa41841dab26..46b329b1bc4c 100644
--- a/samples/client/petstore/javascript-promise-es6/README.md
+++ b/samples/client/petstore/javascript-promise-es6/README.md
@@ -73,7 +73,7 @@ var OpenApiPetstore = require('open_api_petstore');
 
 var api = new OpenApiPetstore.AnotherFakeApi()
 var client = new OpenApiPetstore.Client(); // {Client} client model
-api.testSpecialTags(client).then(function(data) {
+api.call123testSpecialTags(client).then(function(data) {
   console.log('API called successfully. Returned data: ' + data);
 }, function(error) {
   console.error(error);
@@ -88,11 +88,12 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
 
 Class | Method | HTTP request | Description
 ------------ | ------------- | ------------- | -------------
-*OpenApiPetstore.AnotherFakeApi* | [**testSpecialTags**](docs/AnotherFakeApi.md#testSpecialTags) | **PATCH** /another-fake/dummy | To test special tags
+*OpenApiPetstore.AnotherFakeApi* | [**call123testSpecialTags**](docs/AnotherFakeApi.md#call123testSpecialTags) | **PATCH** /another-fake/dummy | To test special tags
 *OpenApiPetstore.FakeApi* | [**fakeOuterBooleanSerialize**](docs/FakeApi.md#fakeOuterBooleanSerialize) | **POST** /fake/outer/boolean | 
 *OpenApiPetstore.FakeApi* | [**fakeOuterCompositeSerialize**](docs/FakeApi.md#fakeOuterCompositeSerialize) | **POST** /fake/outer/composite | 
 *OpenApiPetstore.FakeApi* | [**fakeOuterNumberSerialize**](docs/FakeApi.md#fakeOuterNumberSerialize) | **POST** /fake/outer/number | 
 *OpenApiPetstore.FakeApi* | [**fakeOuterStringSerialize**](docs/FakeApi.md#fakeOuterStringSerialize) | **POST** /fake/outer/string | 
+*OpenApiPetstore.FakeApi* | [**testBodyWithFileSchema**](docs/FakeApi.md#testBodyWithFileSchema) | **PUT** /fake/body-with-file-schema | 
 *OpenApiPetstore.FakeApi* | [**testBodyWithQueryParams**](docs/FakeApi.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params | 
 *OpenApiPetstore.FakeApi* | [**testClientModel**](docs/FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model
 *OpenApiPetstore.FakeApi* | [**testEndpointParameters**](docs/FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 
@@ -108,6 +109,7 @@ Class | Method | HTTP request | Description
 *OpenApiPetstore.PetApi* | [**updatePet**](docs/PetApi.md#updatePet) | **PUT** /pet | Update an existing pet
 *OpenApiPetstore.PetApi* | [**updatePetWithForm**](docs/PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data
 *OpenApiPetstore.PetApi* | [**uploadFile**](docs/PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image
+*OpenApiPetstore.PetApi* | [**uploadFileWithRequiredFile**](docs/PetApi.md#uploadFileWithRequiredFile) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required)
 *OpenApiPetstore.StoreApi* | [**deleteOrder**](docs/StoreApi.md#deleteOrder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID
 *OpenApiPetstore.StoreApi* | [**getInventory**](docs/StoreApi.md#getInventory) | **GET** /store/inventory | Returns pet inventories by status
 *OpenApiPetstore.StoreApi* | [**getOrderById**](docs/StoreApi.md#getOrderById) | **GET** /store/order/{order_id} | Find purchase order by ID
@@ -140,6 +142,8 @@ Class | Method | HTTP request | Description
  - [OpenApiPetstore.EnumArrays](docs/EnumArrays.md)
  - [OpenApiPetstore.EnumClass](docs/EnumClass.md)
  - [OpenApiPetstore.EnumTest](docs/EnumTest.md)
+ - [OpenApiPetstore.File](docs/File.md)
+ - [OpenApiPetstore.FileSchemaTestClass](docs/FileSchemaTestClass.md)
  - [OpenApiPetstore.FormatTest](docs/FormatTest.md)
  - [OpenApiPetstore.HasOnlyReadOnly](docs/HasOnlyReadOnly.md)
  - [OpenApiPetstore.List](docs/List.md)
@@ -155,6 +159,7 @@ Class | Method | HTTP request | Description
  - [OpenApiPetstore.Pet](docs/Pet.md)
  - [OpenApiPetstore.ReadOnlyFirst](docs/ReadOnlyFirst.md)
  - [OpenApiPetstore.SpecialModelName](docs/SpecialModelName.md)
+ - [OpenApiPetstore.StringBooleanMap](docs/StringBooleanMap.md)
  - [OpenApiPetstore.Tag](docs/Tag.md)
  - [OpenApiPetstore.User](docs/User.md)
 
diff --git a/samples/client/petstore/javascript-promise-es6/docs/AnotherFakeApi.md b/samples/client/petstore/javascript-promise-es6/docs/AnotherFakeApi.md
index 2eccfe5f4798..74ad8b2f00c2 100644
--- a/samples/client/petstore/javascript-promise-es6/docs/AnotherFakeApi.md
+++ b/samples/client/petstore/javascript-promise-es6/docs/AnotherFakeApi.md
@@ -4,16 +4,16 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
 
 Method | HTTP request | Description
 ------------- | ------------- | -------------
-[**testSpecialTags**](AnotherFakeApi.md#testSpecialTags) | **PATCH** /another-fake/dummy | To test special tags
+[**call123testSpecialTags**](AnotherFakeApi.md#call123testSpecialTags) | **PATCH** /another-fake/dummy | To test special tags
 
 
-
-# **testSpecialTags**
-> Client testSpecialTags(client)
+
+# **call123testSpecialTags**
+> Client call123testSpecialTags(client)
 
 To test special tags
 
-To test special tags
+To test special tags and operation ID starting with number
 
 ### Example
 ```javascript
@@ -21,7 +21,7 @@ import OpenApiPetstore from 'open_api_petstore';
 
 let apiInstance = new OpenApiPetstore.AnotherFakeApi();
 let client = new OpenApiPetstore.Client(); // Client | client model
-apiInstance.testSpecialTags(client).then((data) => {
+apiInstance.call123testSpecialTags(client).then((data) => {
   console.log('API called successfully. Returned data: ' + data);
 }, (error) => {
   console.error(error);
diff --git a/samples/client/petstore/javascript-promise-es6/docs/FakeApi.md b/samples/client/petstore/javascript-promise-es6/docs/FakeApi.md
index 8a2a57c8b669..bb62b487674a 100644
--- a/samples/client/petstore/javascript-promise-es6/docs/FakeApi.md
+++ b/samples/client/petstore/javascript-promise-es6/docs/FakeApi.md
@@ -8,6 +8,7 @@ Method | HTTP request | Description
 [**fakeOuterCompositeSerialize**](FakeApi.md#fakeOuterCompositeSerialize) | **POST** /fake/outer/composite | 
 [**fakeOuterNumberSerialize**](FakeApi.md#fakeOuterNumberSerialize) | **POST** /fake/outer/number | 
 [**fakeOuterStringSerialize**](FakeApi.md#fakeOuterStringSerialize) | **POST** /fake/outer/string | 
+[**testBodyWithFileSchema**](FakeApi.md#testBodyWithFileSchema) | **PUT** /fake/body-with-file-schema | 
 [**testBodyWithQueryParams**](FakeApi.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params | 
 [**testClientModel**](FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model
 [**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 
@@ -188,6 +189,47 @@ No authorization required
  - **Content-Type**: Not defined
  - **Accept**: */*
 
+
+# **testBodyWithFileSchema**
+> testBodyWithFileSchema(fileSchemaTestClass)
+
+
+
+For this test, the body for this request much reference a schema named `File`.
+
+### Example
+```javascript
+import OpenApiPetstore from 'open_api_petstore';
+
+let apiInstance = new OpenApiPetstore.FakeApi();
+let fileSchemaTestClass = new OpenApiPetstore.FileSchemaTestClass(); // FileSchemaTestClass | 
+apiInstance.testBodyWithFileSchema(fileSchemaTestClass).then(() => {
+  console.log('API called successfully.');
+}, (error) => {
+  console.error(error);
+});
+
+```
+
+### Parameters
+
+Name | Type | Description  | Notes
+------------- | ------------- | ------------- | -------------
+ **fileSchemaTestClass** | [**FileSchemaTestClass**](FileSchemaTestClass.md)|  | 
+
+### Return type
+
+null (empty response body)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: Not defined
+
 
 # **testBodyWithQueryParams**
 > testBodyWithQueryParams(query, user)
diff --git a/samples/client/petstore/javascript-promise-es6/docs/File.md b/samples/client/petstore/javascript-promise-es6/docs/File.md
new file mode 100644
index 000000000000..a34d76a3e46e
--- /dev/null
+++ b/samples/client/petstore/javascript-promise-es6/docs/File.md
@@ -0,0 +1,8 @@
+# OpenApiPetstore.File
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**sourceURI** | **String** | Test capitalization | [optional] 
+
+
diff --git a/samples/client/petstore/javascript-promise-es6/docs/FileSchemaTestClass.md b/samples/client/petstore/javascript-promise-es6/docs/FileSchemaTestClass.md
new file mode 100644
index 000000000000..3ccb4162dcc1
--- /dev/null
+++ b/samples/client/petstore/javascript-promise-es6/docs/FileSchemaTestClass.md
@@ -0,0 +1,9 @@
+# OpenApiPetstore.FileSchemaTestClass
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**file** | **File** |  | [optional] 
+**files** | **[File]** |  | [optional] 
+
+
diff --git a/samples/client/petstore/javascript-promise-es6/docs/MapTest.md b/samples/client/petstore/javascript-promise-es6/docs/MapTest.md
index 4a128da00fd0..f1075bf0681f 100644
--- a/samples/client/petstore/javascript-promise-es6/docs/MapTest.md
+++ b/samples/client/petstore/javascript-promise-es6/docs/MapTest.md
@@ -5,6 +5,8 @@ Name | Type | Description | Notes
 ------------ | ------------- | ------------- | -------------
 **mapMapOfString** | **{String: {String: String}}** |  | [optional] 
 **mapOfEnumString** | **{String: String}** |  | [optional] 
+**directMap** | **{String: Boolean}** |  | [optional] 
+**indirectMap** | [**StringBooleanMap**](StringBooleanMap.md) |  | [optional] 
 
 
 
diff --git a/samples/client/petstore/javascript-promise-es6/docs/PetApi.md b/samples/client/petstore/javascript-promise-es6/docs/PetApi.md
index 3a402233a9ec..1978431440fe 100644
--- a/samples/client/petstore/javascript-promise-es6/docs/PetApi.md
+++ b/samples/client/petstore/javascript-promise-es6/docs/PetApi.md
@@ -12,6 +12,7 @@ Method | HTTP request | Description
 [**updatePet**](PetApi.md#updatePet) | **PUT** /pet | Update an existing pet
 [**updatePetWithForm**](PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data
 [**uploadFile**](PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image
+[**uploadFileWithRequiredFile**](PetApi.md#uploadFileWithRequiredFile) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required)
 
 
 
@@ -390,3 +391,53 @@ Name | Type | Description  | Notes
  - **Content-Type**: multipart/form-data
  - **Accept**: application/json
 
+
+# **uploadFileWithRequiredFile**
+> ApiResponse uploadFileWithRequiredFile(petId, requiredFile, opts)
+
+uploads an image (required)
+
+### Example
+```javascript
+import OpenApiPetstore from 'open_api_petstore';
+let defaultClient = OpenApiPetstore.ApiClient.instance;
+
+// Configure OAuth2 access token for authorization: petstore_auth
+let petstore_auth = defaultClient.authentications['petstore_auth'];
+petstore_auth.accessToken = 'YOUR ACCESS TOKEN';
+
+let apiInstance = new OpenApiPetstore.PetApi();
+let petId = 789; // Number | ID of pet to update
+let requiredFile = "/path/to/file"; // File | file to upload
+let opts = {
+  'additionalMetadata': "additionalMetadata_example" // String | Additional data to pass to server
+};
+apiInstance.uploadFileWithRequiredFile(petId, requiredFile, opts).then((data) => {
+  console.log('API called successfully. Returned data: ' + data);
+}, (error) => {
+  console.error(error);
+});
+
+```
+
+### Parameters
+
+Name | Type | Description  | Notes
+------------- | ------------- | ------------- | -------------
+ **petId** | **Number**| ID of pet to update | 
+ **requiredFile** | **File**| file to upload | 
+ **additionalMetadata** | **String**| Additional data to pass to server | [optional] 
+
+### Return type
+
+[**ApiResponse**](ApiResponse.md)
+
+### Authorization
+
+[petstore_auth](../README.md#petstore_auth)
+
+### HTTP request headers
+
+ - **Content-Type**: multipart/form-data
+ - **Accept**: application/json
+
diff --git a/samples/client/petstore/javascript-promise-es6/docs/StringBooleanMap.md b/samples/client/petstore/javascript-promise-es6/docs/StringBooleanMap.md
new file mode 100644
index 000000000000..195a7d57677f
--- /dev/null
+++ b/samples/client/petstore/javascript-promise-es6/docs/StringBooleanMap.md
@@ -0,0 +1,7 @@
+# OpenApiPetstore.StringBooleanMap
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+
+
diff --git a/samples/client/petstore/javascript-promise-es6/package.json b/samples/client/petstore/javascript-promise-es6/package.json
index df2fea63d600..b10b73e80a3f 100644
--- a/samples/client/petstore/javascript-promise-es6/package.json
+++ b/samples/client/petstore/javascript-promise-es6/package.json
@@ -13,7 +13,7 @@
   "dependencies": {
     "babel": "^6.23.0",
     "babel-cli": "^6.26.0",
-    "superagent": "3.5.2"
+    "superagent": "3.7.0"
   },
   "devDependencies": {
     "babel-core": "6.26.0",
diff --git a/samples/client/petstore/javascript-promise-es6/src/api/AnotherFakeApi.js b/samples/client/petstore/javascript-promise-es6/src/api/AnotherFakeApi.js
index a9a409d6336a..17dc83517bbb 100644
--- a/samples/client/petstore/javascript-promise-es6/src/api/AnotherFakeApi.js
+++ b/samples/client/petstore/javascript-promise-es6/src/api/AnotherFakeApi.js
@@ -37,16 +37,16 @@ export default class AnotherFakeApi {
 
     /**
      * To test special tags
-     * To test special tags
+     * To test special tags and operation ID starting with number
      * @param {module:model/Client} client client model
      * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Client} and HTTP response
      */
-    testSpecialTagsWithHttpInfo(client) {
+    call123testSpecialTagsWithHttpInfo(client) {
       let postBody = client;
 
       // verify the required parameter 'client' is set
       if (client === undefined || client === null) {
-        throw new Error("Missing the required parameter 'client' when calling testSpecialTags");
+        throw new Error("Missing the required parameter 'client' when calling call123testSpecialTags");
       }
 
 
@@ -73,12 +73,12 @@ export default class AnotherFakeApi {
 
     /**
      * To test special tags
-     * To test special tags
+     * To test special tags and operation ID starting with number
      * @param {module:model/Client} client client model
      * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Client}
      */
-    testSpecialTags(client) {
-      return this.testSpecialTagsWithHttpInfo(client)
+    call123testSpecialTags(client) {
+      return this.call123testSpecialTagsWithHttpInfo(client)
         .then(function(response_and_data) {
           return response_and_data.data;
         });
diff --git a/samples/client/petstore/javascript-promise-es6/src/api/FakeApi.js b/samples/client/petstore/javascript-promise-es6/src/api/FakeApi.js
index 87cfae006597..63650ef631b1 100644
--- a/samples/client/petstore/javascript-promise-es6/src/api/FakeApi.js
+++ b/samples/client/petstore/javascript-promise-es6/src/api/FakeApi.js
@@ -14,6 +14,7 @@
 
 import ApiClient from "../ApiClient";
 import Client from '../model/Client';
+import FileSchemaTestClass from '../model/FileSchemaTestClass';
 import OuterComposite from '../model/OuterComposite';
 import User from '../model/User';
 
@@ -221,6 +222,54 @@ export default class FakeApi {
     }
 
 
+    /**
+     * For this test, the body for this request much reference a schema named `File`.
+     * @param {module:model/FileSchemaTestClass} fileSchemaTestClass 
+     * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
+     */
+    testBodyWithFileSchemaWithHttpInfo(fileSchemaTestClass) {
+      let postBody = fileSchemaTestClass;
+
+      // verify the required parameter 'fileSchemaTestClass' is set
+      if (fileSchemaTestClass === undefined || fileSchemaTestClass === null) {
+        throw new Error("Missing the required parameter 'fileSchemaTestClass' when calling testBodyWithFileSchema");
+      }
+
+
+      let pathParams = {
+      };
+      let queryParams = {
+      };
+      let headerParams = {
+      };
+      let formParams = {
+      };
+
+      let authNames = [];
+      let contentTypes = ['application/json'];
+      let accepts = [];
+      let returnType = null;
+
+      return this.apiClient.callApi(
+        '/fake/body-with-file-schema', 'PUT',
+        pathParams, queryParams, headerParams, formParams, postBody,
+        authNames, contentTypes, accepts, returnType
+      );
+    }
+
+    /**
+     * For this test, the body for this request much reference a schema named `File`.
+     * @param {module:model/FileSchemaTestClass} fileSchemaTestClass 
+     * @return {Promise} a {@link https://www.promisejs.org/|Promise}
+     */
+    testBodyWithFileSchema(fileSchemaTestClass) {
+      return this.testBodyWithFileSchemaWithHttpInfo(fileSchemaTestClass)
+        .then(function(response_and_data) {
+          return response_and_data.data;
+        });
+    }
+
+
     /**
      * @param {String} query 
      * @param {module:model/User} user 
diff --git a/samples/client/petstore/javascript-promise-es6/src/api/PetApi.js b/samples/client/petstore/javascript-promise-es6/src/api/PetApi.js
index a8a8d91c9502..cd180e898eb8 100644
--- a/samples/client/petstore/javascript-promise-es6/src/api/PetApi.js
+++ b/samples/client/petstore/javascript-promise-es6/src/api/PetApi.js
@@ -456,4 +456,67 @@ export default class PetApi {
     }
 
 
+    /**
+     * uploads an image (required)
+     * @param {Number} petId ID of pet to update
+     * @param {File} requiredFile file to upload
+     * @param {Object} opts Optional parameters
+     * @param {String} opts.additionalMetadata Additional data to pass to server
+     * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ApiResponse} and HTTP response
+     */
+    uploadFileWithRequiredFileWithHttpInfo(petId, requiredFile, opts) {
+      opts = opts || {};
+      let postBody = null;
+
+      // verify the required parameter 'petId' is set
+      if (petId === undefined || petId === null) {
+        throw new Error("Missing the required parameter 'petId' when calling uploadFileWithRequiredFile");
+      }
+
+      // verify the required parameter 'requiredFile' is set
+      if (requiredFile === undefined || requiredFile === null) {
+        throw new Error("Missing the required parameter 'requiredFile' when calling uploadFileWithRequiredFile");
+      }
+
+
+      let pathParams = {
+        'petId': petId
+      };
+      let queryParams = {
+      };
+      let headerParams = {
+      };
+      let formParams = {
+        'additionalMetadata': opts['additionalMetadata'],
+        'requiredFile': requiredFile
+      };
+
+      let authNames = ['petstore_auth'];
+      let contentTypes = ['multipart/form-data'];
+      let accepts = ['application/json'];
+      let returnType = ApiResponse;
+
+      return this.apiClient.callApi(
+        '/fake/{petId}/uploadImageWithRequiredFile', 'POST',
+        pathParams, queryParams, headerParams, formParams, postBody,
+        authNames, contentTypes, accepts, returnType
+      );
+    }
+
+    /**
+     * uploads an image (required)
+     * @param {Number} petId ID of pet to update
+     * @param {File} requiredFile file to upload
+     * @param {Object} opts Optional parameters
+     * @param {String} opts.additionalMetadata Additional data to pass to server
+     * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ApiResponse}
+     */
+    uploadFileWithRequiredFile(petId, requiredFile, opts) {
+      return this.uploadFileWithRequiredFileWithHttpInfo(petId, requiredFile, opts)
+        .then(function(response_and_data) {
+          return response_and_data.data;
+        });
+    }
+
+
 }
diff --git a/samples/client/petstore/javascript-promise-es6/src/index.js b/samples/client/petstore/javascript-promise-es6/src/index.js
index 95bcba6b5d54..c3ca07e4c4c7 100644
--- a/samples/client/petstore/javascript-promise-es6/src/index.js
+++ b/samples/client/petstore/javascript-promise-es6/src/index.js
@@ -29,6 +29,8 @@ import Dog from './model/Dog';
 import EnumArrays from './model/EnumArrays';
 import EnumClass from './model/EnumClass';
 import EnumTest from './model/EnumTest';
+import File from './model/File';
+import FileSchemaTestClass from './model/FileSchemaTestClass';
 import FormatTest from './model/FormatTest';
 import HasOnlyReadOnly from './model/HasOnlyReadOnly';
 import List from './model/List';
@@ -44,6 +46,7 @@ import OuterEnum from './model/OuterEnum';
 import Pet from './model/Pet';
 import ReadOnlyFirst from './model/ReadOnlyFirst';
 import SpecialModelName from './model/SpecialModelName';
+import StringBooleanMap from './model/StringBooleanMap';
 import Tag from './model/Tag';
 import User from './model/User';
 import AnotherFakeApi from './api/AnotherFakeApi';
@@ -188,6 +191,18 @@ export {
      */
     EnumTest,
 
+    /**
+     * The File model constructor.
+     * @property {module:model/File}
+     */
+    File,
+
+    /**
+     * The FileSchemaTestClass model constructor.
+     * @property {module:model/FileSchemaTestClass}
+     */
+    FileSchemaTestClass,
+
     /**
      * The FormatTest model constructor.
      * @property {module:model/FormatTest}
@@ -278,6 +293,12 @@ export {
      */
     SpecialModelName,
 
+    /**
+     * The StringBooleanMap model constructor.
+     * @property {module:model/StringBooleanMap}
+     */
+    StringBooleanMap,
+
     /**
      * The Tag model constructor.
      * @property {module:model/Tag}
diff --git a/samples/client/petstore/javascript-promise-es6/src/model/File.js b/samples/client/petstore/javascript-promise-es6/src/model/File.js
new file mode 100644
index 000000000000..e29e1a0309f1
--- /dev/null
+++ b/samples/client/petstore/javascript-promise-es6/src/model/File.js
@@ -0,0 +1,73 @@
+/**
+ * OpenAPI Petstore
+ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
+ *
+ * OpenAPI spec version: 1.0.0
+ * 
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ *
+ */
+
+import ApiClient from '../ApiClient';
+
+/**
+ * The File model module.
+ * @module model/File
+ * @version 1.0.0
+ */
+class File {
+    /**
+     * Constructs a new File.
+     * Must be named `File` for test.
+     * @alias module:model/File
+     */
+    constructor() { 
+        
+        File.initialize(this);
+    }
+
+    /**
+     * Initializes the fields of this object.
+     * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
+     * Only for internal use.
+     */
+    static initialize(obj) { 
+    }
+
+    /**
+     * Constructs a File from a plain JavaScript object, optionally creating a new instance.
+     * Copies all relevant properties from data to obj if supplied or a new instance if not.
+     * @param {Object} data The plain JavaScript object bearing properties of interest.
+     * @param {module:model/File} obj Optional instance to populate.
+     * @return {module:model/File} The populated File instance.
+     */
+    static constructFromObject(data, obj) {
+        if (data) {
+            obj = obj || new File();
+
+            if (data.hasOwnProperty('sourceURI')) {
+                obj['sourceURI'] = ApiClient.convertToType(data['sourceURI'], 'String');
+            }
+        }
+        return obj;
+    }
+
+
+}
+
+/**
+ * Test capitalization
+ * @member {String} sourceURI
+ */
+File.prototype['sourceURI'] = undefined;
+
+
+
+
+
+
+export default File;
+
diff --git a/samples/client/petstore/javascript-promise-es6/src/model/FileSchemaTestClass.js b/samples/client/petstore/javascript-promise-es6/src/model/FileSchemaTestClass.js
new file mode 100644
index 000000000000..b4be63df0e68
--- /dev/null
+++ b/samples/client/petstore/javascript-promise-es6/src/model/FileSchemaTestClass.js
@@ -0,0 +1,79 @@
+/**
+ * OpenAPI Petstore
+ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
+ *
+ * OpenAPI spec version: 1.0.0
+ * 
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ *
+ */
+
+import ApiClient from '../ApiClient';
+
+/**
+ * The FileSchemaTestClass model module.
+ * @module model/FileSchemaTestClass
+ * @version 1.0.0
+ */
+class FileSchemaTestClass {
+    /**
+     * Constructs a new FileSchemaTestClass.
+     * @alias module:model/FileSchemaTestClass
+     */
+    constructor() { 
+        
+        FileSchemaTestClass.initialize(this);
+    }
+
+    /**
+     * Initializes the fields of this object.
+     * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
+     * Only for internal use.
+     */
+    static initialize(obj) { 
+    }
+
+    /**
+     * Constructs a FileSchemaTestClass from a plain JavaScript object, optionally creating a new instance.
+     * Copies all relevant properties from data to obj if supplied or a new instance if not.
+     * @param {Object} data The plain JavaScript object bearing properties of interest.
+     * @param {module:model/FileSchemaTestClass} obj Optional instance to populate.
+     * @return {module:model/FileSchemaTestClass} The populated FileSchemaTestClass instance.
+     */
+    static constructFromObject(data, obj) {
+        if (data) {
+            obj = obj || new FileSchemaTestClass();
+
+            if (data.hasOwnProperty('file')) {
+                obj['file'] = File.constructFromObject(data['file']);
+            }
+            if (data.hasOwnProperty('files')) {
+                obj['files'] = ApiClient.convertToType(data['files'], [File]);
+            }
+        }
+        return obj;
+    }
+
+
+}
+
+/**
+ * @member {File} file
+ */
+FileSchemaTestClass.prototype['file'] = undefined;
+
+/**
+ * @member {Array.} files
+ */
+FileSchemaTestClass.prototype['files'] = undefined;
+
+
+
+
+
+
+export default FileSchemaTestClass;
+
diff --git a/samples/client/petstore/javascript-promise-es6/src/model/MapTest.js b/samples/client/petstore/javascript-promise-es6/src/model/MapTest.js
index 8cc6640c9d4f..31c37d601cec 100644
--- a/samples/client/petstore/javascript-promise-es6/src/model/MapTest.js
+++ b/samples/client/petstore/javascript-promise-es6/src/model/MapTest.js
@@ -12,6 +12,7 @@
  */
 
 import ApiClient from '../ApiClient';
+import StringBooleanMap from './StringBooleanMap';
 
 /**
  * The MapTest model module.
@@ -53,6 +54,12 @@ class MapTest {
             if (data.hasOwnProperty('map_of_enum_string')) {
                 obj['map_of_enum_string'] = ApiClient.convertToType(data['map_of_enum_string'], {'String': 'String'});
             }
+            if (data.hasOwnProperty('direct_map')) {
+                obj['direct_map'] = ApiClient.convertToType(data['direct_map'], {'String': 'Boolean'});
+            }
+            if (data.hasOwnProperty('indirect_map')) {
+                obj['indirect_map'] = StringBooleanMap.constructFromObject(data['indirect_map']);
+            }
         }
         return obj;
     }
@@ -70,6 +77,16 @@ MapTest.prototype['map_map_of_string'] = undefined;
  */
 MapTest.prototype['map_of_enum_string'] = undefined;
 
+/**
+ * @member {Object.} direct_map
+ */
+MapTest.prototype['direct_map'] = undefined;
+
+/**
+ * @member {module:model/StringBooleanMap} indirect_map
+ */
+MapTest.prototype['indirect_map'] = undefined;
+
 
 
 
diff --git a/samples/client/petstore/javascript-promise-es6/src/model/OuterComposite.js b/samples/client/petstore/javascript-promise-es6/src/model/OuterComposite.js
index 8b61cb8f654b..ba597462eec6 100644
--- a/samples/client/petstore/javascript-promise-es6/src/model/OuterComposite.js
+++ b/samples/client/petstore/javascript-promise-es6/src/model/OuterComposite.js
@@ -48,13 +48,13 @@ class OuterComposite {
             obj = obj || new OuterComposite();
 
             if (data.hasOwnProperty('my_number')) {
-                obj['my_number'] = 'Number'.constructFromObject(data['my_number']);
+                obj['my_number'] = ApiClient.convertToType(data['my_number'], 'Number');
             }
             if (data.hasOwnProperty('my_string')) {
-                obj['my_string'] = 'String'.constructFromObject(data['my_string']);
+                obj['my_string'] = ApiClient.convertToType(data['my_string'], 'String');
             }
             if (data.hasOwnProperty('my_boolean')) {
-                obj['my_boolean'] = 'Boolean'.constructFromObject(data['my_boolean']);
+                obj['my_boolean'] = ApiClient.convertToType(data['my_boolean'], 'Boolean');
             }
         }
         return obj;
diff --git a/samples/client/petstore/javascript-promise-es6/src/model/StringBooleanMap.js b/samples/client/petstore/javascript-promise-es6/src/model/StringBooleanMap.js
new file mode 100644
index 000000000000..30172b33f7b9
--- /dev/null
+++ b/samples/client/petstore/javascript-promise-es6/src/model/StringBooleanMap.js
@@ -0,0 +1,67 @@
+/**
+ * OpenAPI Petstore
+ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
+ *
+ * OpenAPI spec version: 1.0.0
+ * 
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ *
+ */
+
+import ApiClient from '../ApiClient';
+
+/**
+ * The StringBooleanMap model module.
+ * @module model/StringBooleanMap
+ * @version 1.0.0
+ */
+class StringBooleanMap {
+    /**
+     * Constructs a new StringBooleanMap.
+     * @alias module:model/StringBooleanMap
+     * @extends Object
+     */
+    constructor() { 
+        
+        StringBooleanMap.initialize(this);
+    }
+
+    /**
+     * Initializes the fields of this object.
+     * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
+     * Only for internal use.
+     */
+    static initialize(obj) { 
+    }
+
+    /**
+     * Constructs a StringBooleanMap from a plain JavaScript object, optionally creating a new instance.
+     * Copies all relevant properties from data to obj if supplied or a new instance if not.
+     * @param {Object} data The plain JavaScript object bearing properties of interest.
+     * @param {module:model/StringBooleanMap} obj Optional instance to populate.
+     * @return {module:model/StringBooleanMap} The populated StringBooleanMap instance.
+     */
+    static constructFromObject(data, obj) {
+        if (data) {
+            obj = obj || new StringBooleanMap();
+
+            ApiClient.constructFromObject(data, obj, 'Boolean');
+            
+
+        }
+        return obj;
+    }
+
+
+}
+
+
+
+
+
+
+export default StringBooleanMap;
+
diff --git a/samples/client/petstore/javascript-promise-es6/test/model/File.spec.js b/samples/client/petstore/javascript-promise-es6/test/model/File.spec.js
new file mode 100644
index 000000000000..10666dc53c7c
--- /dev/null
+++ b/samples/client/petstore/javascript-promise-es6/test/model/File.spec.js
@@ -0,0 +1,65 @@
+/**
+ * OpenAPI Petstore
+ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
+ *
+ * OpenAPI spec version: 1.0.0
+ * 
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ *
+ */
+
+(function(root, factory) {
+  if (typeof define === 'function' && define.amd) {
+    // AMD.
+    define(['expect.js', '../../src/index'], factory);
+  } else if (typeof module === 'object' && module.exports) {
+    // CommonJS-like environments that support module.exports, like Node.
+    factory(require('expect.js'), require('../../src/index'));
+  } else {
+    // Browser globals (root is window)
+    factory(root.expect, root.OpenApiPetstore);
+  }
+}(this, function(expect, OpenApiPetstore) {
+  'use strict';
+
+  var instance;
+
+  beforeEach(function() {
+    instance = new OpenApiPetstore.File();
+  });
+
+  var getProperty = function(object, getter, property) {
+    // Use getter method if present; otherwise, get the property directly.
+    if (typeof object[getter] === 'function')
+      return object[getter]();
+    else
+      return object[property];
+  }
+
+  var setProperty = function(object, setter, property, value) {
+    // Use setter method if present; otherwise, set the property directly.
+    if (typeof object[setter] === 'function')
+      object[setter](value);
+    else
+      object[property] = value;
+  }
+
+  describe('File', function() {
+    it('should create an instance of File', function() {
+      // uncomment below and update the code to test File
+      //var instane = new OpenApiPetstore.File();
+      //expect(instance).to.be.a(OpenApiPetstore.File);
+    });
+
+    it('should have the property sourceURI (base name: "sourceURI")', function() {
+      // uncomment below and update the code to test the property sourceURI
+      //var instane = new OpenApiPetstore.File();
+      //expect(instance).to.be();
+    });
+
+  });
+
+}));
diff --git a/samples/client/petstore/javascript-promise-es6/test/model/FileSchemaTestClass.spec.js b/samples/client/petstore/javascript-promise-es6/test/model/FileSchemaTestClass.spec.js
new file mode 100644
index 000000000000..d6e49689d232
--- /dev/null
+++ b/samples/client/petstore/javascript-promise-es6/test/model/FileSchemaTestClass.spec.js
@@ -0,0 +1,71 @@
+/**
+ * OpenAPI Petstore
+ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
+ *
+ * OpenAPI spec version: 1.0.0
+ * 
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ *
+ */
+
+(function(root, factory) {
+  if (typeof define === 'function' && define.amd) {
+    // AMD.
+    define(['expect.js', '../../src/index'], factory);
+  } else if (typeof module === 'object' && module.exports) {
+    // CommonJS-like environments that support module.exports, like Node.
+    factory(require('expect.js'), require('../../src/index'));
+  } else {
+    // Browser globals (root is window)
+    factory(root.expect, root.OpenApiPetstore);
+  }
+}(this, function(expect, OpenApiPetstore) {
+  'use strict';
+
+  var instance;
+
+  beforeEach(function() {
+    instance = new OpenApiPetstore.FileSchemaTestClass();
+  });
+
+  var getProperty = function(object, getter, property) {
+    // Use getter method if present; otherwise, get the property directly.
+    if (typeof object[getter] === 'function')
+      return object[getter]();
+    else
+      return object[property];
+  }
+
+  var setProperty = function(object, setter, property, value) {
+    // Use setter method if present; otherwise, set the property directly.
+    if (typeof object[setter] === 'function')
+      object[setter](value);
+    else
+      object[property] = value;
+  }
+
+  describe('FileSchemaTestClass', function() {
+    it('should create an instance of FileSchemaTestClass', function() {
+      // uncomment below and update the code to test FileSchemaTestClass
+      //var instane = new OpenApiPetstore.FileSchemaTestClass();
+      //expect(instance).to.be.a(OpenApiPetstore.FileSchemaTestClass);
+    });
+
+    it('should have the property file (base name: "file")', function() {
+      // uncomment below and update the code to test the property file
+      //var instane = new OpenApiPetstore.FileSchemaTestClass();
+      //expect(instance).to.be();
+    });
+
+    it('should have the property files (base name: "files")', function() {
+      // uncomment below and update the code to test the property files
+      //var instane = new OpenApiPetstore.FileSchemaTestClass();
+      //expect(instance).to.be();
+    });
+
+  });
+
+}));
diff --git a/samples/client/petstore/javascript-promise-es6/test/model/StringBooleanMap.spec.js b/samples/client/petstore/javascript-promise-es6/test/model/StringBooleanMap.spec.js
new file mode 100644
index 000000000000..0fd499cc819e
--- /dev/null
+++ b/samples/client/petstore/javascript-promise-es6/test/model/StringBooleanMap.spec.js
@@ -0,0 +1,59 @@
+/**
+ * OpenAPI Petstore
+ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
+ *
+ * OpenAPI spec version: 1.0.0
+ * 
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ *
+ */
+
+(function(root, factory) {
+  if (typeof define === 'function' && define.amd) {
+    // AMD.
+    define(['expect.js', '../../src/index'], factory);
+  } else if (typeof module === 'object' && module.exports) {
+    // CommonJS-like environments that support module.exports, like Node.
+    factory(require('expect.js'), require('../../src/index'));
+  } else {
+    // Browser globals (root is window)
+    factory(root.expect, root.OpenApiPetstore);
+  }
+}(this, function(expect, OpenApiPetstore) {
+  'use strict';
+
+  var instance;
+
+  beforeEach(function() {
+    instance = new OpenApiPetstore.StringBooleanMap();
+  });
+
+  var getProperty = function(object, getter, property) {
+    // Use getter method if present; otherwise, get the property directly.
+    if (typeof object[getter] === 'function')
+      return object[getter]();
+    else
+      return object[property];
+  }
+
+  var setProperty = function(object, setter, property, value) {
+    // Use setter method if present; otherwise, set the property directly.
+    if (typeof object[setter] === 'function')
+      object[setter](value);
+    else
+      object[property] = value;
+  }
+
+  describe('StringBooleanMap', function() {
+    it('should create an instance of StringBooleanMap', function() {
+      // uncomment below and update the code to test StringBooleanMap
+      //var instane = new OpenApiPetstore.StringBooleanMap();
+      //expect(instance).to.be.a(OpenApiPetstore.StringBooleanMap);
+    });
+
+  });
+
+}));
diff --git a/samples/client/petstore/javascript-promise/.openapi-generator/VERSION b/samples/client/petstore/javascript-promise/.openapi-generator/VERSION
index 1c00c5181548..14900cee60e8 100644
--- a/samples/client/petstore/javascript-promise/.openapi-generator/VERSION
+++ b/samples/client/petstore/javascript-promise/.openapi-generator/VERSION
@@ -1 +1 @@
-3.0.2-SNAPSHOT
\ No newline at end of file
+3.2.1-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/javascript-promise/README.md b/samples/client/petstore/javascript-promise/README.md
index a78275aee673..93b5f02e2239 100644
--- a/samples/client/petstore/javascript-promise/README.md
+++ b/samples/client/petstore/javascript-promise/README.md
@@ -97,7 +97,7 @@ var OpenApiPetstore = require('open_api_petstore');
 
 var api = new OpenApiPetstore.AnotherFakeApi()
 var client = new OpenApiPetstore.Client(); // {Client} client model
-api.testSpecialTags(client).then(function(data) {
+api.call123testSpecialTags(client).then(function(data) {
   console.log('API called successfully. Returned data: ' + data);
 }, function(error) {
   console.error(error);
@@ -112,11 +112,12 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
 
 Class | Method | HTTP request | Description
 ------------ | ------------- | ------------- | -------------
-*OpenApiPetstore.AnotherFakeApi* | [**testSpecialTags**](docs/AnotherFakeApi.md#testSpecialTags) | **PATCH** /another-fake/dummy | To test special tags
+*OpenApiPetstore.AnotherFakeApi* | [**call123testSpecialTags**](docs/AnotherFakeApi.md#call123testSpecialTags) | **PATCH** /another-fake/dummy | To test special tags
 *OpenApiPetstore.FakeApi* | [**fakeOuterBooleanSerialize**](docs/FakeApi.md#fakeOuterBooleanSerialize) | **POST** /fake/outer/boolean | 
 *OpenApiPetstore.FakeApi* | [**fakeOuterCompositeSerialize**](docs/FakeApi.md#fakeOuterCompositeSerialize) | **POST** /fake/outer/composite | 
 *OpenApiPetstore.FakeApi* | [**fakeOuterNumberSerialize**](docs/FakeApi.md#fakeOuterNumberSerialize) | **POST** /fake/outer/number | 
 *OpenApiPetstore.FakeApi* | [**fakeOuterStringSerialize**](docs/FakeApi.md#fakeOuterStringSerialize) | **POST** /fake/outer/string | 
+*OpenApiPetstore.FakeApi* | [**testBodyWithFileSchema**](docs/FakeApi.md#testBodyWithFileSchema) | **PUT** /fake/body-with-file-schema | 
 *OpenApiPetstore.FakeApi* | [**testBodyWithQueryParams**](docs/FakeApi.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params | 
 *OpenApiPetstore.FakeApi* | [**testClientModel**](docs/FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model
 *OpenApiPetstore.FakeApi* | [**testEndpointParameters**](docs/FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 
@@ -132,6 +133,7 @@ Class | Method | HTTP request | Description
 *OpenApiPetstore.PetApi* | [**updatePet**](docs/PetApi.md#updatePet) | **PUT** /pet | Update an existing pet
 *OpenApiPetstore.PetApi* | [**updatePetWithForm**](docs/PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data
 *OpenApiPetstore.PetApi* | [**uploadFile**](docs/PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image
+*OpenApiPetstore.PetApi* | [**uploadFileWithRequiredFile**](docs/PetApi.md#uploadFileWithRequiredFile) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required)
 *OpenApiPetstore.StoreApi* | [**deleteOrder**](docs/StoreApi.md#deleteOrder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID
 *OpenApiPetstore.StoreApi* | [**getInventory**](docs/StoreApi.md#getInventory) | **GET** /store/inventory | Returns pet inventories by status
 *OpenApiPetstore.StoreApi* | [**getOrderById**](docs/StoreApi.md#getOrderById) | **GET** /store/order/{order_id} | Find purchase order by ID
@@ -164,6 +166,8 @@ Class | Method | HTTP request | Description
  - [OpenApiPetstore.EnumArrays](docs/EnumArrays.md)
  - [OpenApiPetstore.EnumClass](docs/EnumClass.md)
  - [OpenApiPetstore.EnumTest](docs/EnumTest.md)
+ - [OpenApiPetstore.File](docs/File.md)
+ - [OpenApiPetstore.FileSchemaTestClass](docs/FileSchemaTestClass.md)
  - [OpenApiPetstore.FormatTest](docs/FormatTest.md)
  - [OpenApiPetstore.HasOnlyReadOnly](docs/HasOnlyReadOnly.md)
  - [OpenApiPetstore.List](docs/List.md)
@@ -179,6 +183,7 @@ Class | Method | HTTP request | Description
  - [OpenApiPetstore.Pet](docs/Pet.md)
  - [OpenApiPetstore.ReadOnlyFirst](docs/ReadOnlyFirst.md)
  - [OpenApiPetstore.SpecialModelName](docs/SpecialModelName.md)
+ - [OpenApiPetstore.StringBooleanMap](docs/StringBooleanMap.md)
  - [OpenApiPetstore.Tag](docs/Tag.md)
  - [OpenApiPetstore.User](docs/User.md)
 
diff --git a/samples/client/petstore/javascript-promise/docs/AnotherFakeApi.md b/samples/client/petstore/javascript-promise/docs/AnotherFakeApi.md
index 6666cbc0df77..007f4327b179 100644
--- a/samples/client/petstore/javascript-promise/docs/AnotherFakeApi.md
+++ b/samples/client/petstore/javascript-promise/docs/AnotherFakeApi.md
@@ -4,16 +4,16 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
 
 Method | HTTP request | Description
 ------------- | ------------- | -------------
-[**testSpecialTags**](AnotherFakeApi.md#testSpecialTags) | **PATCH** /another-fake/dummy | To test special tags
+[**call123testSpecialTags**](AnotherFakeApi.md#call123testSpecialTags) | **PATCH** /another-fake/dummy | To test special tags
 
 
-
-# **testSpecialTags**
-> Client testSpecialTags(client)
+
+# **call123testSpecialTags**
+> Client call123testSpecialTags(client)
 
 To test special tags
 
-To test special tags
+To test special tags and operation ID starting with number
 
 ### Example
 ```javascript
@@ -21,7 +21,7 @@ var OpenApiPetstore = require('open_api_petstore');
 
 var apiInstance = new OpenApiPetstore.AnotherFakeApi();
 var client = new OpenApiPetstore.Client(); // Client | client model
-apiInstance.testSpecialTags(client).then(function(data) {
+apiInstance.call123testSpecialTags(client).then(function(data) {
   console.log('API called successfully. Returned data: ' + data);
 }, function(error) {
   console.error(error);
diff --git a/samples/client/petstore/javascript-promise/docs/FakeApi.md b/samples/client/petstore/javascript-promise/docs/FakeApi.md
index 9d56939ca608..cb50ee6de648 100644
--- a/samples/client/petstore/javascript-promise/docs/FakeApi.md
+++ b/samples/client/petstore/javascript-promise/docs/FakeApi.md
@@ -8,6 +8,7 @@ Method | HTTP request | Description
 [**fakeOuterCompositeSerialize**](FakeApi.md#fakeOuterCompositeSerialize) | **POST** /fake/outer/composite | 
 [**fakeOuterNumberSerialize**](FakeApi.md#fakeOuterNumberSerialize) | **POST** /fake/outer/number | 
 [**fakeOuterStringSerialize**](FakeApi.md#fakeOuterStringSerialize) | **POST** /fake/outer/string | 
+[**testBodyWithFileSchema**](FakeApi.md#testBodyWithFileSchema) | **PUT** /fake/body-with-file-schema | 
 [**testBodyWithQueryParams**](FakeApi.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params | 
 [**testClientModel**](FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model
 [**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 
@@ -188,6 +189,47 @@ No authorization required
  - **Content-Type**: Not defined
  - **Accept**: */*
 
+
+# **testBodyWithFileSchema**
+> testBodyWithFileSchema(fileSchemaTestClass)
+
+
+
+For this test, the body for this request much reference a schema named `File`.
+
+### Example
+```javascript
+var OpenApiPetstore = require('open_api_petstore');
+
+var apiInstance = new OpenApiPetstore.FakeApi();
+var fileSchemaTestClass = new OpenApiPetstore.FileSchemaTestClass(); // FileSchemaTestClass | 
+apiInstance.testBodyWithFileSchema(fileSchemaTestClass).then(function() {
+  console.log('API called successfully.');
+}, function(error) {
+  console.error(error);
+});
+
+```
+
+### Parameters
+
+Name | Type | Description  | Notes
+------------- | ------------- | ------------- | -------------
+ **fileSchemaTestClass** | [**FileSchemaTestClass**](FileSchemaTestClass.md)|  | 
+
+### Return type
+
+null (empty response body)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: Not defined
+
 
 # **testBodyWithQueryParams**
 > testBodyWithQueryParams(query, user)
diff --git a/samples/client/petstore/javascript-promise/docs/File.md b/samples/client/petstore/javascript-promise/docs/File.md
new file mode 100644
index 000000000000..a34d76a3e46e
--- /dev/null
+++ b/samples/client/petstore/javascript-promise/docs/File.md
@@ -0,0 +1,8 @@
+# OpenApiPetstore.File
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**sourceURI** | **String** | Test capitalization | [optional] 
+
+
diff --git a/samples/client/petstore/javascript-promise/docs/FileSchemaTestClass.md b/samples/client/petstore/javascript-promise/docs/FileSchemaTestClass.md
new file mode 100644
index 000000000000..3ccb4162dcc1
--- /dev/null
+++ b/samples/client/petstore/javascript-promise/docs/FileSchemaTestClass.md
@@ -0,0 +1,9 @@
+# OpenApiPetstore.FileSchemaTestClass
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**file** | **File** |  | [optional] 
+**files** | **[File]** |  | [optional] 
+
+
diff --git a/samples/client/petstore/javascript-promise/docs/MapTest.md b/samples/client/petstore/javascript-promise/docs/MapTest.md
index 4a128da00fd0..f1075bf0681f 100644
--- a/samples/client/petstore/javascript-promise/docs/MapTest.md
+++ b/samples/client/petstore/javascript-promise/docs/MapTest.md
@@ -5,6 +5,8 @@ Name | Type | Description | Notes
 ------------ | ------------- | ------------- | -------------
 **mapMapOfString** | **{String: {String: String}}** |  | [optional] 
 **mapOfEnumString** | **{String: String}** |  | [optional] 
+**directMap** | **{String: Boolean}** |  | [optional] 
+**indirectMap** | [**StringBooleanMap**](StringBooleanMap.md) |  | [optional] 
 
 
 
diff --git a/samples/client/petstore/javascript-promise/docs/PetApi.md b/samples/client/petstore/javascript-promise/docs/PetApi.md
index 28469bc95a1c..30f008958ffc 100644
--- a/samples/client/petstore/javascript-promise/docs/PetApi.md
+++ b/samples/client/petstore/javascript-promise/docs/PetApi.md
@@ -12,6 +12,7 @@ Method | HTTP request | Description
 [**updatePet**](PetApi.md#updatePet) | **PUT** /pet | Update an existing pet
 [**updatePetWithForm**](PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data
 [**uploadFile**](PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image
+[**uploadFileWithRequiredFile**](PetApi.md#uploadFileWithRequiredFile) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required)
 
 
 
@@ -382,3 +383,52 @@ Name | Type | Description  | Notes
  - **Content-Type**: multipart/form-data
  - **Accept**: application/json
 
+
+# **uploadFileWithRequiredFile**
+> ApiResponse uploadFileWithRequiredFile(petId, requiredFile, opts)
+
+uploads an image (required)
+
+### Example
+```javascript
+var OpenApiPetstore = require('open_api_petstore');
+var defaultClient = OpenApiPetstore.ApiClient.instance;
+// Configure OAuth2 access token for authorization: petstore_auth
+var petstore_auth = defaultClient.authentications['petstore_auth'];
+petstore_auth.accessToken = 'YOUR ACCESS TOKEN';
+
+var apiInstance = new OpenApiPetstore.PetApi();
+var petId = 789; // Number | ID of pet to update
+var requiredFile = "/path/to/file"; // File | file to upload
+var opts = {
+  'additionalMetadata': "additionalMetadata_example" // String | Additional data to pass to server
+};
+apiInstance.uploadFileWithRequiredFile(petId, requiredFile, opts).then(function(data) {
+  console.log('API called successfully. Returned data: ' + data);
+}, function(error) {
+  console.error(error);
+});
+
+```
+
+### Parameters
+
+Name | Type | Description  | Notes
+------------- | ------------- | ------------- | -------------
+ **petId** | **Number**| ID of pet to update | 
+ **requiredFile** | **File**| file to upload | 
+ **additionalMetadata** | **String**| Additional data to pass to server | [optional] 
+
+### Return type
+
+[**ApiResponse**](ApiResponse.md)
+
+### Authorization
+
+[petstore_auth](../README.md#petstore_auth)
+
+### HTTP request headers
+
+ - **Content-Type**: multipart/form-data
+ - **Accept**: application/json
+
diff --git a/samples/client/petstore/javascript-promise/docs/StringBooleanMap.md b/samples/client/petstore/javascript-promise/docs/StringBooleanMap.md
new file mode 100644
index 000000000000..195a7d57677f
--- /dev/null
+++ b/samples/client/petstore/javascript-promise/docs/StringBooleanMap.md
@@ -0,0 +1,7 @@
+# OpenApiPetstore.StringBooleanMap
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+
+
diff --git a/samples/client/petstore/javascript-promise/package.json b/samples/client/petstore/javascript-promise/package.json
index 6cee1971957b..6fcefce10bad 100644
--- a/samples/client/petstore/javascript-promise/package.json
+++ b/samples/client/petstore/javascript-promise/package.json
@@ -11,7 +11,7 @@
     "fs": false
   },
   "dependencies": {
-    "superagent": "3.5.2"
+    "superagent": "3.7.0"
   },
   "devDependencies": {
     "mocha": "~2.3.4",
diff --git a/samples/client/petstore/javascript-promise/src/ApiClient.js b/samples/client/petstore/javascript-promise/src/ApiClient.js
index 435175dc8d6b..b2151bf9f420 100644
--- a/samples/client/petstore/javascript-promise/src/ApiClient.js
+++ b/samples/client/petstore/javascript-promise/src/ApiClient.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
diff --git a/samples/client/petstore/javascript-promise/src/api/AnotherFakeApi.js b/samples/client/petstore/javascript-promise/src/api/AnotherFakeApi.js
index 7821ec7a222e..84c0b45c7cd8 100644
--- a/samples/client/petstore/javascript-promise/src/api/AnotherFakeApi.js
+++ b/samples/client/petstore/javascript-promise/src/api/AnotherFakeApi.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
@@ -50,16 +50,16 @@
 
     /**
      * To test special tags
-     * To test special tags
+     * To test special tags and operation ID starting with number
      * @param {module:model/Client} client client model
      * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Client} and HTTP response
      */
-    this.testSpecialTagsWithHttpInfo = function(client) {
+    this.call123testSpecialTagsWithHttpInfo = function(client) {
       var postBody = client;
 
       // verify the required parameter 'client' is set
       if (client === undefined || client === null) {
-        throw new Error("Missing the required parameter 'client' when calling testSpecialTags");
+        throw new Error("Missing the required parameter 'client' when calling call123testSpecialTags");
       }
 
 
@@ -88,12 +88,12 @@
 
     /**
      * To test special tags
-     * To test special tags
+     * To test special tags and operation ID starting with number
      * @param {module:model/Client} client client model
      * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Client}
      */
-    this.testSpecialTags = function(client) {
-      return this.testSpecialTagsWithHttpInfo(client)
+    this.call123testSpecialTags = function(client) {
+      return this.call123testSpecialTagsWithHttpInfo(client)
         .then(function(response_and_data) {
           return response_and_data.data;
         });
diff --git a/samples/client/petstore/javascript-promise/src/api/FakeApi.js b/samples/client/petstore/javascript-promise/src/api/FakeApi.js
index 8b07f17c78f9..284f964a43c1 100644
--- a/samples/client/petstore/javascript-promise/src/api/FakeApi.js
+++ b/samples/client/petstore/javascript-promise/src/api/FakeApi.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
@@ -16,18 +16,18 @@
 (function(root, factory) {
   if (typeof define === 'function' && define.amd) {
     // AMD. Register as an anonymous module.
-    define(['ApiClient', 'model/Client', 'model/OuterComposite', 'model/User'], factory);
+    define(['ApiClient', 'model/Client', 'model/FileSchemaTestClass', 'model/OuterComposite', 'model/User'], factory);
   } else if (typeof module === 'object' && module.exports) {
     // CommonJS-like environments that support module.exports, like Node.
-    module.exports = factory(require('../ApiClient'), require('../model/Client'), require('../model/OuterComposite'), require('../model/User'));
+    module.exports = factory(require('../ApiClient'), require('../model/Client'), require('../model/FileSchemaTestClass'), require('../model/OuterComposite'), require('../model/User'));
   } else {
     // Browser globals (root is window)
     if (!root.OpenApiPetstore) {
       root.OpenApiPetstore = {};
     }
-    root.OpenApiPetstore.FakeApi = factory(root.OpenApiPetstore.ApiClient, root.OpenApiPetstore.Client, root.OpenApiPetstore.OuterComposite, root.OpenApiPetstore.User);
+    root.OpenApiPetstore.FakeApi = factory(root.OpenApiPetstore.ApiClient, root.OpenApiPetstore.Client, root.OpenApiPetstore.FileSchemaTestClass, root.OpenApiPetstore.OuterComposite, root.OpenApiPetstore.User);
   }
-}(this, function(ApiClient, Client, OuterComposite, User) {
+}(this, function(ApiClient, Client, FileSchemaTestClass, OuterComposite, User) {
   'use strict';
 
   /**
@@ -240,6 +240,56 @@
     }
 
 
+    /**
+     * For this test, the body for this request much reference a schema named `File`.
+     * @param {module:model/FileSchemaTestClass} fileSchemaTestClass 
+     * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
+     */
+    this.testBodyWithFileSchemaWithHttpInfo = function(fileSchemaTestClass) {
+      var postBody = fileSchemaTestClass;
+
+      // verify the required parameter 'fileSchemaTestClass' is set
+      if (fileSchemaTestClass === undefined || fileSchemaTestClass === null) {
+        throw new Error("Missing the required parameter 'fileSchemaTestClass' when calling testBodyWithFileSchema");
+      }
+
+
+      var pathParams = {
+      };
+      var queryParams = {
+      };
+      var collectionQueryParams = {
+      };
+      var headerParams = {
+      };
+      var formParams = {
+      };
+
+      var authNames = [];
+      var contentTypes = ['application/json'];
+      var accepts = [];
+      var returnType = null;
+
+      return this.apiClient.callApi(
+        '/fake/body-with-file-schema', 'PUT',
+        pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
+        authNames, contentTypes, accepts, returnType
+      );
+    }
+
+    /**
+     * For this test, the body for this request much reference a schema named `File`.
+     * @param {module:model/FileSchemaTestClass} fileSchemaTestClass 
+     * @return {Promise} a {@link https://www.promisejs.org/|Promise}
+     */
+    this.testBodyWithFileSchema = function(fileSchemaTestClass) {
+      return this.testBodyWithFileSchemaWithHttpInfo(fileSchemaTestClass)
+        .then(function(response_and_data) {
+          return response_and_data.data;
+        });
+    }
+
+
     /**
      * @param {String} query 
      * @param {module:model/User} user 
diff --git a/samples/client/petstore/javascript-promise/src/api/FakeClassnameTags123Api.js b/samples/client/petstore/javascript-promise/src/api/FakeClassnameTags123Api.js
index 7293a03fe8eb..409db18bdb9e 100644
--- a/samples/client/petstore/javascript-promise/src/api/FakeClassnameTags123Api.js
+++ b/samples/client/petstore/javascript-promise/src/api/FakeClassnameTags123Api.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
diff --git a/samples/client/petstore/javascript-promise/src/api/PetApi.js b/samples/client/petstore/javascript-promise/src/api/PetApi.js
index 68d7bd7e1022..15db5e00a60f 100644
--- a/samples/client/petstore/javascript-promise/src/api/PetApi.js
+++ b/samples/client/petstore/javascript-promise/src/api/PetApi.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
@@ -488,6 +488,71 @@
           return response_and_data.data;
         });
     }
+
+
+    /**
+     * uploads an image (required)
+     * @param {Number} petId ID of pet to update
+     * @param {File} requiredFile file to upload
+     * @param {Object} opts Optional parameters
+     * @param {String} opts.additionalMetadata Additional data to pass to server
+     * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ApiResponse} and HTTP response
+     */
+    this.uploadFileWithRequiredFileWithHttpInfo = function(petId, requiredFile, opts) {
+      opts = opts || {};
+      var postBody = null;
+
+      // verify the required parameter 'petId' is set
+      if (petId === undefined || petId === null) {
+        throw new Error("Missing the required parameter 'petId' when calling uploadFileWithRequiredFile");
+      }
+
+      // verify the required parameter 'requiredFile' is set
+      if (requiredFile === undefined || requiredFile === null) {
+        throw new Error("Missing the required parameter 'requiredFile' when calling uploadFileWithRequiredFile");
+      }
+
+
+      var pathParams = {
+        'petId': petId
+      };
+      var queryParams = {
+      };
+      var collectionQueryParams = {
+      };
+      var headerParams = {
+      };
+      var formParams = {
+        'additionalMetadata': opts['additionalMetadata'],
+        'requiredFile': requiredFile
+      };
+
+      var authNames = ['petstore_auth'];
+      var contentTypes = ['multipart/form-data'];
+      var accepts = ['application/json'];
+      var returnType = ApiResponse;
+
+      return this.apiClient.callApi(
+        '/fake/{petId}/uploadImageWithRequiredFile', 'POST',
+        pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
+        authNames, contentTypes, accepts, returnType
+      );
+    }
+
+    /**
+     * uploads an image (required)
+     * @param {Number} petId ID of pet to update
+     * @param {File} requiredFile file to upload
+     * @param {Object} opts Optional parameters
+     * @param {String} opts.additionalMetadata Additional data to pass to server
+     * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ApiResponse}
+     */
+    this.uploadFileWithRequiredFile = function(petId, requiredFile, opts) {
+      return this.uploadFileWithRequiredFileWithHttpInfo(petId, requiredFile, opts)
+        .then(function(response_and_data) {
+          return response_and_data.data;
+        });
+    }
   };
 
   return exports;
diff --git a/samples/client/petstore/javascript-promise/src/api/StoreApi.js b/samples/client/petstore/javascript-promise/src/api/StoreApi.js
index c4b2f93bbc0d..517f01e2c837 100644
--- a/samples/client/petstore/javascript-promise/src/api/StoreApi.js
+++ b/samples/client/petstore/javascript-promise/src/api/StoreApi.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
diff --git a/samples/client/petstore/javascript-promise/src/api/UserApi.js b/samples/client/petstore/javascript-promise/src/api/UserApi.js
index 4942cbc464b3..2dfa2d9429d8 100644
--- a/samples/client/petstore/javascript-promise/src/api/UserApi.js
+++ b/samples/client/petstore/javascript-promise/src/api/UserApi.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
diff --git a/samples/client/petstore/javascript-promise/src/index.js b/samples/client/petstore/javascript-promise/src/index.js
index 25685095fb2f..3f904b570cab 100644
--- a/samples/client/petstore/javascript-promise/src/index.js
+++ b/samples/client/petstore/javascript-promise/src/index.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
@@ -16,12 +16,12 @@
 (function(factory) {
   if (typeof define === 'function' && define.amd) {
     // AMD. Register as an anonymous module.
-    define(['ApiClient', 'model/AdditionalPropertiesClass', 'model/Animal', 'model/AnimalFarm', 'model/ApiResponse', 'model/ArrayOfArrayOfNumberOnly', 'model/ArrayOfNumberOnly', 'model/ArrayTest', 'model/Capitalization', 'model/Cat', 'model/Category', 'model/ClassModel', 'model/Client', 'model/Dog', 'model/EnumArrays', 'model/EnumClass', 'model/EnumTest', 'model/FormatTest', 'model/HasOnlyReadOnly', 'model/List', 'model/MapTest', 'model/MixedPropertiesAndAdditionalPropertiesClass', 'model/Model200Response', 'model/ModelReturn', 'model/Name', 'model/NumberOnly', 'model/Order', 'model/OuterComposite', 'model/OuterEnum', 'model/Pet', 'model/ReadOnlyFirst', 'model/SpecialModelName', 'model/Tag', 'model/User', 'api/AnotherFakeApi', 'api/FakeApi', 'api/FakeClassnameTags123Api', 'api/PetApi', 'api/StoreApi', 'api/UserApi'], factory);
+    define(['ApiClient', 'model/AdditionalPropertiesClass', 'model/Animal', 'model/AnimalFarm', 'model/ApiResponse', 'model/ArrayOfArrayOfNumberOnly', 'model/ArrayOfNumberOnly', 'model/ArrayTest', 'model/Capitalization', 'model/Cat', 'model/Category', 'model/ClassModel', 'model/Client', 'model/Dog', 'model/EnumArrays', 'model/EnumClass', 'model/EnumTest', 'model/File', 'model/FileSchemaTestClass', 'model/FormatTest', 'model/HasOnlyReadOnly', 'model/List', 'model/MapTest', 'model/MixedPropertiesAndAdditionalPropertiesClass', 'model/Model200Response', 'model/ModelReturn', 'model/Name', 'model/NumberOnly', 'model/Order', 'model/OuterComposite', 'model/OuterEnum', 'model/Pet', 'model/ReadOnlyFirst', 'model/SpecialModelName', 'model/StringBooleanMap', 'model/Tag', 'model/User', 'api/AnotherFakeApi', 'api/FakeApi', 'api/FakeClassnameTags123Api', 'api/PetApi', 'api/StoreApi', 'api/UserApi'], factory);
   } else if (typeof module === 'object' && module.exports) {
     // CommonJS-like environments that support module.exports, like Node.
-    module.exports = factory(require('./ApiClient'), require('./model/AdditionalPropertiesClass'), require('./model/Animal'), require('./model/AnimalFarm'), require('./model/ApiResponse'), require('./model/ArrayOfArrayOfNumberOnly'), require('./model/ArrayOfNumberOnly'), require('./model/ArrayTest'), require('./model/Capitalization'), require('./model/Cat'), require('./model/Category'), require('./model/ClassModel'), require('./model/Client'), require('./model/Dog'), require('./model/EnumArrays'), require('./model/EnumClass'), require('./model/EnumTest'), require('./model/FormatTest'), require('./model/HasOnlyReadOnly'), require('./model/List'), require('./model/MapTest'), require('./model/MixedPropertiesAndAdditionalPropertiesClass'), require('./model/Model200Response'), require('./model/ModelReturn'), require('./model/Name'), require('./model/NumberOnly'), require('./model/Order'), require('./model/OuterComposite'), require('./model/OuterEnum'), require('./model/Pet'), require('./model/ReadOnlyFirst'), require('./model/SpecialModelName'), require('./model/Tag'), require('./model/User'), require('./api/AnotherFakeApi'), require('./api/FakeApi'), require('./api/FakeClassnameTags123Api'), require('./api/PetApi'), require('./api/StoreApi'), require('./api/UserApi'));
+    module.exports = factory(require('./ApiClient'), require('./model/AdditionalPropertiesClass'), require('./model/Animal'), require('./model/AnimalFarm'), require('./model/ApiResponse'), require('./model/ArrayOfArrayOfNumberOnly'), require('./model/ArrayOfNumberOnly'), require('./model/ArrayTest'), require('./model/Capitalization'), require('./model/Cat'), require('./model/Category'), require('./model/ClassModel'), require('./model/Client'), require('./model/Dog'), require('./model/EnumArrays'), require('./model/EnumClass'), require('./model/EnumTest'), require('./model/File'), require('./model/FileSchemaTestClass'), require('./model/FormatTest'), require('./model/HasOnlyReadOnly'), require('./model/List'), require('./model/MapTest'), require('./model/MixedPropertiesAndAdditionalPropertiesClass'), require('./model/Model200Response'), require('./model/ModelReturn'), require('./model/Name'), require('./model/NumberOnly'), require('./model/Order'), require('./model/OuterComposite'), require('./model/OuterEnum'), require('./model/Pet'), require('./model/ReadOnlyFirst'), require('./model/SpecialModelName'), require('./model/StringBooleanMap'), require('./model/Tag'), require('./model/User'), require('./api/AnotherFakeApi'), require('./api/FakeApi'), require('./api/FakeClassnameTags123Api'), require('./api/PetApi'), require('./api/StoreApi'), require('./api/UserApi'));
   }
-}(function(ApiClient, AdditionalPropertiesClass, Animal, AnimalFarm, ApiResponse, ArrayOfArrayOfNumberOnly, ArrayOfNumberOnly, ArrayTest, Capitalization, Cat, Category, ClassModel, Client, Dog, EnumArrays, EnumClass, EnumTest, FormatTest, HasOnlyReadOnly, List, MapTest, MixedPropertiesAndAdditionalPropertiesClass, Model200Response, ModelReturn, Name, NumberOnly, Order, OuterComposite, OuterEnum, Pet, ReadOnlyFirst, SpecialModelName, Tag, User, AnotherFakeApi, FakeApi, FakeClassnameTags123Api, PetApi, StoreApi, UserApi) {
+}(function(ApiClient, AdditionalPropertiesClass, Animal, AnimalFarm, ApiResponse, ArrayOfArrayOfNumberOnly, ArrayOfNumberOnly, ArrayTest, Capitalization, Cat, Category, ClassModel, Client, Dog, EnumArrays, EnumClass, EnumTest, File, FileSchemaTestClass, FormatTest, HasOnlyReadOnly, List, MapTest, MixedPropertiesAndAdditionalPropertiesClass, Model200Response, ModelReturn, Name, NumberOnly, Order, OuterComposite, OuterEnum, Pet, ReadOnlyFirst, SpecialModelName, StringBooleanMap, Tag, User, AnotherFakeApi, FakeApi, FakeClassnameTags123Api, PetApi, StoreApi, UserApi) {
   'use strict';
 
   /**
@@ -141,6 +141,16 @@
      * @property {module:model/EnumTest}
      */
     EnumTest: EnumTest,
+    /**
+     * The File model constructor.
+     * @property {module:model/File}
+     */
+    File: File,
+    /**
+     * The FileSchemaTestClass model constructor.
+     * @property {module:model/FileSchemaTestClass}
+     */
+    FileSchemaTestClass: FileSchemaTestClass,
     /**
      * The FormatTest model constructor.
      * @property {module:model/FormatTest}
@@ -216,6 +226,11 @@
      * @property {module:model/SpecialModelName}
      */
     SpecialModelName: SpecialModelName,
+    /**
+     * The StringBooleanMap model constructor.
+     * @property {module:model/StringBooleanMap}
+     */
+    StringBooleanMap: StringBooleanMap,
     /**
      * The Tag model constructor.
      * @property {module:model/Tag}
diff --git a/samples/client/petstore/javascript-promise/src/model/AdditionalPropertiesClass.js b/samples/client/petstore/javascript-promise/src/model/AdditionalPropertiesClass.js
index 08572d900840..3e41a2906a5b 100644
--- a/samples/client/petstore/javascript-promise/src/model/AdditionalPropertiesClass.js
+++ b/samples/client/petstore/javascript-promise/src/model/AdditionalPropertiesClass.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
diff --git a/samples/client/petstore/javascript-promise/src/model/Animal.js b/samples/client/petstore/javascript-promise/src/model/Animal.js
index 29376d771bfc..5ec0fe427cb4 100644
--- a/samples/client/petstore/javascript-promise/src/model/Animal.js
+++ b/samples/client/petstore/javascript-promise/src/model/Animal.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
diff --git a/samples/client/petstore/javascript-promise/src/model/AnimalFarm.js b/samples/client/petstore/javascript-promise/src/model/AnimalFarm.js
index e1a4797eec19..f80991972452 100644
--- a/samples/client/petstore/javascript-promise/src/model/AnimalFarm.js
+++ b/samples/client/petstore/javascript-promise/src/model/AnimalFarm.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
diff --git a/samples/client/petstore/javascript-promise/src/model/ApiResponse.js b/samples/client/petstore/javascript-promise/src/model/ApiResponse.js
index 5c112418181d..d3236a99234a 100644
--- a/samples/client/petstore/javascript-promise/src/model/ApiResponse.js
+++ b/samples/client/petstore/javascript-promise/src/model/ApiResponse.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
diff --git a/samples/client/petstore/javascript-promise/src/model/ArrayOfArrayOfNumberOnly.js b/samples/client/petstore/javascript-promise/src/model/ArrayOfArrayOfNumberOnly.js
index 024c26469df3..e7ac7b24a330 100644
--- a/samples/client/petstore/javascript-promise/src/model/ArrayOfArrayOfNumberOnly.js
+++ b/samples/client/petstore/javascript-promise/src/model/ArrayOfArrayOfNumberOnly.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
diff --git a/samples/client/petstore/javascript-promise/src/model/ArrayOfNumberOnly.js b/samples/client/petstore/javascript-promise/src/model/ArrayOfNumberOnly.js
index ca79a7c2a6d0..7c98321c3d4b 100644
--- a/samples/client/petstore/javascript-promise/src/model/ArrayOfNumberOnly.js
+++ b/samples/client/petstore/javascript-promise/src/model/ArrayOfNumberOnly.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
diff --git a/samples/client/petstore/javascript-promise/src/model/ArrayTest.js b/samples/client/petstore/javascript-promise/src/model/ArrayTest.js
index 01b97a1b5809..0f47e3e78ef1 100644
--- a/samples/client/petstore/javascript-promise/src/model/ArrayTest.js
+++ b/samples/client/petstore/javascript-promise/src/model/ArrayTest.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
diff --git a/samples/client/petstore/javascript-promise/src/model/Capitalization.js b/samples/client/petstore/javascript-promise/src/model/Capitalization.js
index 05934fb253ce..9f5e832699d3 100644
--- a/samples/client/petstore/javascript-promise/src/model/Capitalization.js
+++ b/samples/client/petstore/javascript-promise/src/model/Capitalization.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
diff --git a/samples/client/petstore/javascript-promise/src/model/Cat.js b/samples/client/petstore/javascript-promise/src/model/Cat.js
index 10b787fed4eb..4c1d8f0c845d 100644
--- a/samples/client/petstore/javascript-promise/src/model/Cat.js
+++ b/samples/client/petstore/javascript-promise/src/model/Cat.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
diff --git a/samples/client/petstore/javascript-promise/src/model/Category.js b/samples/client/petstore/javascript-promise/src/model/Category.js
index c289c6b8e5bd..560f1a94013e 100644
--- a/samples/client/petstore/javascript-promise/src/model/Category.js
+++ b/samples/client/petstore/javascript-promise/src/model/Category.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
diff --git a/samples/client/petstore/javascript-promise/src/model/ClassModel.js b/samples/client/petstore/javascript-promise/src/model/ClassModel.js
index 6edd8fbadd04..cadf752c6446 100644
--- a/samples/client/petstore/javascript-promise/src/model/ClassModel.js
+++ b/samples/client/petstore/javascript-promise/src/model/ClassModel.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
diff --git a/samples/client/petstore/javascript-promise/src/model/Client.js b/samples/client/petstore/javascript-promise/src/model/Client.js
index e563bcf7ea59..7bf09ed3ac6f 100644
--- a/samples/client/petstore/javascript-promise/src/model/Client.js
+++ b/samples/client/petstore/javascript-promise/src/model/Client.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
diff --git a/samples/client/petstore/javascript-promise/src/model/Dog.js b/samples/client/petstore/javascript-promise/src/model/Dog.js
index c308f3dc9f11..93f8f38ae13d 100644
--- a/samples/client/petstore/javascript-promise/src/model/Dog.js
+++ b/samples/client/petstore/javascript-promise/src/model/Dog.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
diff --git a/samples/client/petstore/javascript-promise/src/model/EnumArrays.js b/samples/client/petstore/javascript-promise/src/model/EnumArrays.js
index 07d52b119db0..d7b36eb6307e 100644
--- a/samples/client/petstore/javascript-promise/src/model/EnumArrays.js
+++ b/samples/client/petstore/javascript-promise/src/model/EnumArrays.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
diff --git a/samples/client/petstore/javascript-promise/src/model/EnumClass.js b/samples/client/petstore/javascript-promise/src/model/EnumClass.js
index d4a9f39f5661..d2f7c69374b1 100644
--- a/samples/client/petstore/javascript-promise/src/model/EnumClass.js
+++ b/samples/client/petstore/javascript-promise/src/model/EnumClass.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
diff --git a/samples/client/petstore/javascript-promise/src/model/EnumTest.js b/samples/client/petstore/javascript-promise/src/model/EnumTest.js
index 4dfc6753323a..e6f1a7ea9e47 100644
--- a/samples/client/petstore/javascript-promise/src/model/EnumTest.js
+++ b/samples/client/petstore/javascript-promise/src/model/EnumTest.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
diff --git a/samples/client/petstore/javascript-promise/src/model/File.js b/samples/client/petstore/javascript-promise/src/model/File.js
new file mode 100644
index 000000000000..aa7449e29078
--- /dev/null
+++ b/samples/client/petstore/javascript-promise/src/model/File.js
@@ -0,0 +1,83 @@
+/**
+ * OpenAPI Petstore
+ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
+ *
+ * OpenAPI spec version: 1.0.0
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ *
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
+ *
+ * Do not edit the class manually.
+ *
+ */
+
+(function(root, factory) {
+  if (typeof define === 'function' && define.amd) {
+    // AMD. Register as an anonymous module.
+    define(['ApiClient'], factory);
+  } else if (typeof module === 'object' && module.exports) {
+    // CommonJS-like environments that support module.exports, like Node.
+    module.exports = factory(require('../ApiClient'));
+  } else {
+    // Browser globals (root is window)
+    if (!root.OpenApiPetstore) {
+      root.OpenApiPetstore = {};
+    }
+    root.OpenApiPetstore.File = factory(root.OpenApiPetstore.ApiClient);
+  }
+}(this, function(ApiClient) {
+  'use strict';
+
+
+
+
+  /**
+   * The File model module.
+   * @module model/File
+   * @version 1.0.0
+   */
+
+  /**
+   * Constructs a new File.
+   * Must be named `File` for test.
+   * @alias module:model/File
+   * @class
+   */
+  var exports = function() {
+    var _this = this;
+
+
+  };
+
+  /**
+   * Constructs a File from a plain JavaScript object, optionally creating a new instance.
+   * Copies all relevant properties from data to obj if supplied or a new instance if not.
+   * @param {Object} data The plain JavaScript object bearing properties of interest.
+   * @param {module:model/File} obj Optional instance to populate.
+   * @return {module:model/File} The populated File instance.
+   */
+  exports.constructFromObject = function(data, obj) {
+    if (data) {
+      obj = obj || new exports();
+
+      if (data.hasOwnProperty('sourceURI')) {
+        obj['sourceURI'] = ApiClient.convertToType(data['sourceURI'], 'String');
+      }
+    }
+    return obj;
+  }
+
+  /**
+   * Test capitalization
+   * @member {String} sourceURI
+   */
+  exports.prototype['sourceURI'] = undefined;
+
+
+
+  return exports;
+}));
+
+
diff --git a/samples/client/petstore/javascript-promise/src/model/FileSchemaTestClass.js b/samples/client/petstore/javascript-promise/src/model/FileSchemaTestClass.js
new file mode 100644
index 000000000000..f2f1b8e966a3
--- /dev/null
+++ b/samples/client/petstore/javascript-promise/src/model/FileSchemaTestClass.js
@@ -0,0 +1,89 @@
+/**
+ * OpenAPI Petstore
+ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
+ *
+ * OpenAPI spec version: 1.0.0
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ *
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
+ *
+ * Do not edit the class manually.
+ *
+ */
+
+(function(root, factory) {
+  if (typeof define === 'function' && define.amd) {
+    // AMD. Register as an anonymous module.
+    define(['ApiClient'], factory);
+  } else if (typeof module === 'object' && module.exports) {
+    // CommonJS-like environments that support module.exports, like Node.
+    module.exports = factory(require('../ApiClient'));
+  } else {
+    // Browser globals (root is window)
+    if (!root.OpenApiPetstore) {
+      root.OpenApiPetstore = {};
+    }
+    root.OpenApiPetstore.FileSchemaTestClass = factory(root.OpenApiPetstore.ApiClient);
+  }
+}(this, function(ApiClient) {
+  'use strict';
+
+
+
+
+  /**
+   * The FileSchemaTestClass model module.
+   * @module model/FileSchemaTestClass
+   * @version 1.0.0
+   */
+
+  /**
+   * Constructs a new FileSchemaTestClass.
+   * @alias module:model/FileSchemaTestClass
+   * @class
+   */
+  var exports = function() {
+    var _this = this;
+
+
+
+  };
+
+  /**
+   * Constructs a FileSchemaTestClass from a plain JavaScript object, optionally creating a new instance.
+   * Copies all relevant properties from data to obj if supplied or a new instance if not.
+   * @param {Object} data The plain JavaScript object bearing properties of interest.
+   * @param {module:model/FileSchemaTestClass} obj Optional instance to populate.
+   * @return {module:model/FileSchemaTestClass} The populated FileSchemaTestClass instance.
+   */
+  exports.constructFromObject = function(data, obj) {
+    if (data) {
+      obj = obj || new exports();
+
+      if (data.hasOwnProperty('file')) {
+        obj['file'] = File.constructFromObject(data['file']);
+      }
+      if (data.hasOwnProperty('files')) {
+        obj['files'] = ApiClient.convertToType(data['files'], [File]);
+      }
+    }
+    return obj;
+  }
+
+  /**
+   * @member {File} file
+   */
+  exports.prototype['file'] = undefined;
+  /**
+   * @member {Array.} files
+   */
+  exports.prototype['files'] = undefined;
+
+
+
+  return exports;
+}));
+
+
diff --git a/samples/client/petstore/javascript-promise/src/model/FormatTest.js b/samples/client/petstore/javascript-promise/src/model/FormatTest.js
index 6c5986d48985..ea6d19666136 100644
--- a/samples/client/petstore/javascript-promise/src/model/FormatTest.js
+++ b/samples/client/petstore/javascript-promise/src/model/FormatTest.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
diff --git a/samples/client/petstore/javascript-promise/src/model/HasOnlyReadOnly.js b/samples/client/petstore/javascript-promise/src/model/HasOnlyReadOnly.js
index 484fd0c99910..b6470082caf9 100644
--- a/samples/client/petstore/javascript-promise/src/model/HasOnlyReadOnly.js
+++ b/samples/client/petstore/javascript-promise/src/model/HasOnlyReadOnly.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
diff --git a/samples/client/petstore/javascript-promise/src/model/List.js b/samples/client/petstore/javascript-promise/src/model/List.js
index ab3c2e34e343..3b9f343524e8 100644
--- a/samples/client/petstore/javascript-promise/src/model/List.js
+++ b/samples/client/petstore/javascript-promise/src/model/List.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
diff --git a/samples/client/petstore/javascript-promise/src/model/MapTest.js b/samples/client/petstore/javascript-promise/src/model/MapTest.js
index adf82a358c28..8563624adffe 100644
--- a/samples/client/petstore/javascript-promise/src/model/MapTest.js
+++ b/samples/client/petstore/javascript-promise/src/model/MapTest.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
@@ -16,18 +16,18 @@
 (function(root, factory) {
   if (typeof define === 'function' && define.amd) {
     // AMD. Register as an anonymous module.
-    define(['ApiClient'], factory);
+    define(['ApiClient', 'model/StringBooleanMap'], factory);
   } else if (typeof module === 'object' && module.exports) {
     // CommonJS-like environments that support module.exports, like Node.
-    module.exports = factory(require('../ApiClient'));
+    module.exports = factory(require('../ApiClient'), require('./StringBooleanMap'));
   } else {
     // Browser globals (root is window)
     if (!root.OpenApiPetstore) {
       root.OpenApiPetstore = {};
     }
-    root.OpenApiPetstore.MapTest = factory(root.OpenApiPetstore.ApiClient);
+    root.OpenApiPetstore.MapTest = factory(root.OpenApiPetstore.ApiClient, root.OpenApiPetstore.StringBooleanMap);
   }
-}(this, function(ApiClient) {
+}(this, function(ApiClient, StringBooleanMap) {
   'use strict';
 
 
@@ -49,6 +49,8 @@
 
 
 
+
+
   };
 
   /**
@@ -68,6 +70,12 @@
       if (data.hasOwnProperty('map_of_enum_string')) {
         obj['map_of_enum_string'] = ApiClient.convertToType(data['map_of_enum_string'], {'String': 'String'});
       }
+      if (data.hasOwnProperty('direct_map')) {
+        obj['direct_map'] = ApiClient.convertToType(data['direct_map'], {'String': 'Boolean'});
+      }
+      if (data.hasOwnProperty('indirect_map')) {
+        obj['indirect_map'] = StringBooleanMap.constructFromObject(data['indirect_map']);
+      }
     }
     return obj;
   }
@@ -80,6 +88,14 @@
    * @member {Object.} map_of_enum_string
    */
   exports.prototype['map_of_enum_string'] = undefined;
+  /**
+   * @member {Object.} direct_map
+   */
+  exports.prototype['direct_map'] = undefined;
+  /**
+   * @member {module:model/StringBooleanMap} indirect_map
+   */
+  exports.prototype['indirect_map'] = undefined;
 
 
   /**
diff --git a/samples/client/petstore/javascript-promise/src/model/MixedPropertiesAndAdditionalPropertiesClass.js b/samples/client/petstore/javascript-promise/src/model/MixedPropertiesAndAdditionalPropertiesClass.js
index 62c7a2f59e32..ff56b0e4981c 100644
--- a/samples/client/petstore/javascript-promise/src/model/MixedPropertiesAndAdditionalPropertiesClass.js
+++ b/samples/client/petstore/javascript-promise/src/model/MixedPropertiesAndAdditionalPropertiesClass.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
diff --git a/samples/client/petstore/javascript-promise/src/model/Model200Response.js b/samples/client/petstore/javascript-promise/src/model/Model200Response.js
index 84131169fb13..665e9d64f653 100644
--- a/samples/client/petstore/javascript-promise/src/model/Model200Response.js
+++ b/samples/client/petstore/javascript-promise/src/model/Model200Response.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
diff --git a/samples/client/petstore/javascript-promise/src/model/ModelReturn.js b/samples/client/petstore/javascript-promise/src/model/ModelReturn.js
index 87484d2ee234..836fab1b221c 100644
--- a/samples/client/petstore/javascript-promise/src/model/ModelReturn.js
+++ b/samples/client/petstore/javascript-promise/src/model/ModelReturn.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
diff --git a/samples/client/petstore/javascript-promise/src/model/Name.js b/samples/client/petstore/javascript-promise/src/model/Name.js
index 8c851c4cec54..24d63b4836f8 100644
--- a/samples/client/petstore/javascript-promise/src/model/Name.js
+++ b/samples/client/petstore/javascript-promise/src/model/Name.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
diff --git a/samples/client/petstore/javascript-promise/src/model/NumberOnly.js b/samples/client/petstore/javascript-promise/src/model/NumberOnly.js
index 389ad08e8c5c..b50c8dadc269 100644
--- a/samples/client/petstore/javascript-promise/src/model/NumberOnly.js
+++ b/samples/client/petstore/javascript-promise/src/model/NumberOnly.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
diff --git a/samples/client/petstore/javascript-promise/src/model/Order.js b/samples/client/petstore/javascript-promise/src/model/Order.js
index bfd5f3714bef..5abd1899c042 100644
--- a/samples/client/petstore/javascript-promise/src/model/Order.js
+++ b/samples/client/petstore/javascript-promise/src/model/Order.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
diff --git a/samples/client/petstore/javascript-promise/src/model/OuterComposite.js b/samples/client/petstore/javascript-promise/src/model/OuterComposite.js
index b4fc48476dee..7410237332e4 100644
--- a/samples/client/petstore/javascript-promise/src/model/OuterComposite.js
+++ b/samples/client/petstore/javascript-promise/src/model/OuterComposite.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
@@ -64,13 +64,13 @@
       obj = obj || new exports();
 
       if (data.hasOwnProperty('my_number')) {
-        obj['my_number'] = 'Number'.constructFromObject(data['my_number']);
+        obj['my_number'] = ApiClient.convertToType(data['my_number'], 'Number');
       }
       if (data.hasOwnProperty('my_string')) {
-        obj['my_string'] = 'String'.constructFromObject(data['my_string']);
+        obj['my_string'] = ApiClient.convertToType(data['my_string'], 'String');
       }
       if (data.hasOwnProperty('my_boolean')) {
-        obj['my_boolean'] = 'Boolean'.constructFromObject(data['my_boolean']);
+        obj['my_boolean'] = ApiClient.convertToType(data['my_boolean'], 'Boolean');
       }
     }
     return obj;
diff --git a/samples/client/petstore/javascript-promise/src/model/OuterEnum.js b/samples/client/petstore/javascript-promise/src/model/OuterEnum.js
index 9e1f532b44d0..0d7f9a4fd595 100644
--- a/samples/client/petstore/javascript-promise/src/model/OuterEnum.js
+++ b/samples/client/petstore/javascript-promise/src/model/OuterEnum.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
diff --git a/samples/client/petstore/javascript-promise/src/model/Pet.js b/samples/client/petstore/javascript-promise/src/model/Pet.js
index 55997490b789..69d47d25aef9 100644
--- a/samples/client/petstore/javascript-promise/src/model/Pet.js
+++ b/samples/client/petstore/javascript-promise/src/model/Pet.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
diff --git a/samples/client/petstore/javascript-promise/src/model/ReadOnlyFirst.js b/samples/client/petstore/javascript-promise/src/model/ReadOnlyFirst.js
index 1b0ae1104cc6..4e2f573958ea 100644
--- a/samples/client/petstore/javascript-promise/src/model/ReadOnlyFirst.js
+++ b/samples/client/petstore/javascript-promise/src/model/ReadOnlyFirst.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
diff --git a/samples/client/petstore/javascript-promise/src/model/SpecialModelName.js b/samples/client/petstore/javascript-promise/src/model/SpecialModelName.js
index 22464bbe7a25..5bea0b84fcf7 100644
--- a/samples/client/petstore/javascript-promise/src/model/SpecialModelName.js
+++ b/samples/client/petstore/javascript-promise/src/model/SpecialModelName.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
diff --git a/samples/client/petstore/javascript-promise/src/model/StringBooleanMap.js b/samples/client/petstore/javascript-promise/src/model/StringBooleanMap.js
new file mode 100644
index 000000000000..d07c0fc99ea7
--- /dev/null
+++ b/samples/client/petstore/javascript-promise/src/model/StringBooleanMap.js
@@ -0,0 +1,76 @@
+/**
+ * OpenAPI Petstore
+ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
+ *
+ * OpenAPI spec version: 1.0.0
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ *
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
+ *
+ * Do not edit the class manually.
+ *
+ */
+
+(function(root, factory) {
+  if (typeof define === 'function' && define.amd) {
+    // AMD. Register as an anonymous module.
+    define(['ApiClient'], factory);
+  } else if (typeof module === 'object' && module.exports) {
+    // CommonJS-like environments that support module.exports, like Node.
+    module.exports = factory(require('../ApiClient'));
+  } else {
+    // Browser globals (root is window)
+    if (!root.OpenApiPetstore) {
+      root.OpenApiPetstore = {};
+    }
+    root.OpenApiPetstore.StringBooleanMap = factory(root.OpenApiPetstore.ApiClient);
+  }
+}(this, function(ApiClient) {
+  'use strict';
+
+
+
+
+  /**
+   * The StringBooleanMap model module.
+   * @module model/StringBooleanMap
+   * @version 1.0.0
+   */
+
+  /**
+   * Constructs a new StringBooleanMap.
+   * @alias module:model/StringBooleanMap
+   * @class
+   * @extends Object
+   */
+  var exports = function() {
+    var _this = this;
+
+    return _this;
+  };
+
+  /**
+   * Constructs a StringBooleanMap from a plain JavaScript object, optionally creating a new instance.
+   * Copies all relevant properties from data to obj if supplied or a new instance if not.
+   * @param {Object} data The plain JavaScript object bearing properties of interest.
+   * @param {module:model/StringBooleanMap} obj Optional instance to populate.
+   * @return {module:model/StringBooleanMap} The populated StringBooleanMap instance.
+   */
+  exports.constructFromObject = function(data, obj) {
+    if (data) {
+      obj = obj || new exports();
+      ApiClient.constructFromObject(data, obj, 'Boolean');
+
+    }
+    return obj;
+  }
+
+
+
+
+  return exports;
+}));
+
+
diff --git a/samples/client/petstore/javascript-promise/src/model/Tag.js b/samples/client/petstore/javascript-promise/src/model/Tag.js
index 9e4f88b0872e..09299a4d0d61 100644
--- a/samples/client/petstore/javascript-promise/src/model/Tag.js
+++ b/samples/client/petstore/javascript-promise/src/model/Tag.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
diff --git a/samples/client/petstore/javascript-promise/src/model/User.js b/samples/client/petstore/javascript-promise/src/model/User.js
index 06d4e6e7ad0a..62a2a70c6802 100644
--- a/samples/client/petstore/javascript-promise/src/model/User.js
+++ b/samples/client/petstore/javascript-promise/src/model/User.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
diff --git a/samples/client/petstore/javascript-promise/test/model/File.spec.js b/samples/client/petstore/javascript-promise/test/model/File.spec.js
new file mode 100644
index 000000000000..67f2956c3973
--- /dev/null
+++ b/samples/client/petstore/javascript-promise/test/model/File.spec.js
@@ -0,0 +1,67 @@
+/**
+ * OpenAPI Petstore
+ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
+ *
+ * OpenAPI spec version: 1.0.0
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ *
+ * OpenAPI Generator version: 3.2.0-SNAPSHOT
+ *
+ * Do not edit the class manually.
+ *
+ */
+
+(function(root, factory) {
+  if (typeof define === 'function' && define.amd) {
+    // AMD.
+    define(['expect.js', '../../src/index'], factory);
+  } else if (typeof module === 'object' && module.exports) {
+    // CommonJS-like environments that support module.exports, like Node.
+    factory(require('expect.js'), require('../../src/index'));
+  } else {
+    // Browser globals (root is window)
+    factory(root.expect, root.OpenApiPetstore);
+  }
+}(this, function(expect, OpenApiPetstore) {
+  'use strict';
+
+  var instance;
+
+  beforeEach(function() {
+    instance = new OpenApiPetstore.File();
+  });
+
+  var getProperty = function(object, getter, property) {
+    // Use getter method if present; otherwise, get the property directly.
+    if (typeof object[getter] === 'function')
+      return object[getter]();
+    else
+      return object[property];
+  }
+
+  var setProperty = function(object, setter, property, value) {
+    // Use setter method if present; otherwise, set the property directly.
+    if (typeof object[setter] === 'function')
+      object[setter](value);
+    else
+      object[property] = value;
+  }
+
+  describe('File', function() {
+    it('should create an instance of File', function() {
+      // uncomment below and update the code to test File
+      //var instance = new OpenApiPetstore.File();
+      //expect(instance).to.be.a(OpenApiPetstore.File);
+    });
+
+    it('should have the property sourceURI (base name: "sourceURI")', function() {
+      // uncomment below and update the code to test the property sourceURI
+      //var instance = new OpenApiPetstore.File();
+      //expect(instance).to.be();
+    });
+
+  });
+
+}));
diff --git a/samples/client/petstore/javascript-promise/test/model/FileSchemaTestClass.spec.js b/samples/client/petstore/javascript-promise/test/model/FileSchemaTestClass.spec.js
new file mode 100644
index 000000000000..74f68c03ff6b
--- /dev/null
+++ b/samples/client/petstore/javascript-promise/test/model/FileSchemaTestClass.spec.js
@@ -0,0 +1,73 @@
+/**
+ * OpenAPI Petstore
+ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
+ *
+ * OpenAPI spec version: 1.0.0
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ *
+ * OpenAPI Generator version: 3.2.0-SNAPSHOT
+ *
+ * Do not edit the class manually.
+ *
+ */
+
+(function(root, factory) {
+  if (typeof define === 'function' && define.amd) {
+    // AMD.
+    define(['expect.js', '../../src/index'], factory);
+  } else if (typeof module === 'object' && module.exports) {
+    // CommonJS-like environments that support module.exports, like Node.
+    factory(require('expect.js'), require('../../src/index'));
+  } else {
+    // Browser globals (root is window)
+    factory(root.expect, root.OpenApiPetstore);
+  }
+}(this, function(expect, OpenApiPetstore) {
+  'use strict';
+
+  var instance;
+
+  beforeEach(function() {
+    instance = new OpenApiPetstore.FileSchemaTestClass();
+  });
+
+  var getProperty = function(object, getter, property) {
+    // Use getter method if present; otherwise, get the property directly.
+    if (typeof object[getter] === 'function')
+      return object[getter]();
+    else
+      return object[property];
+  }
+
+  var setProperty = function(object, setter, property, value) {
+    // Use setter method if present; otherwise, set the property directly.
+    if (typeof object[setter] === 'function')
+      object[setter](value);
+    else
+      object[property] = value;
+  }
+
+  describe('FileSchemaTestClass', function() {
+    it('should create an instance of FileSchemaTestClass', function() {
+      // uncomment below and update the code to test FileSchemaTestClass
+      //var instance = new OpenApiPetstore.FileSchemaTestClass();
+      //expect(instance).to.be.a(OpenApiPetstore.FileSchemaTestClass);
+    });
+
+    it('should have the property file (base name: "file")', function() {
+      // uncomment below and update the code to test the property file
+      //var instance = new OpenApiPetstore.FileSchemaTestClass();
+      //expect(instance).to.be();
+    });
+
+    it('should have the property files (base name: "files")', function() {
+      // uncomment below and update the code to test the property files
+      //var instance = new OpenApiPetstore.FileSchemaTestClass();
+      //expect(instance).to.be();
+    });
+
+  });
+
+}));
diff --git a/samples/client/petstore/javascript-promise/test/model/StringBooleanMap.spec.js b/samples/client/petstore/javascript-promise/test/model/StringBooleanMap.spec.js
new file mode 100644
index 000000000000..c14a469bcf5f
--- /dev/null
+++ b/samples/client/petstore/javascript-promise/test/model/StringBooleanMap.spec.js
@@ -0,0 +1,61 @@
+/**
+ * OpenAPI Petstore
+ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
+ *
+ * OpenAPI spec version: 1.0.0
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ *
+ * OpenAPI Generator version: 3.2.0-SNAPSHOT
+ *
+ * Do not edit the class manually.
+ *
+ */
+
+(function(root, factory) {
+  if (typeof define === 'function' && define.amd) {
+    // AMD.
+    define(['expect.js', '../../src/index'], factory);
+  } else if (typeof module === 'object' && module.exports) {
+    // CommonJS-like environments that support module.exports, like Node.
+    factory(require('expect.js'), require('../../src/index'));
+  } else {
+    // Browser globals (root is window)
+    factory(root.expect, root.OpenApiPetstore);
+  }
+}(this, function(expect, OpenApiPetstore) {
+  'use strict';
+
+  var instance;
+
+  beforeEach(function() {
+    instance = new OpenApiPetstore.StringBooleanMap();
+  });
+
+  var getProperty = function(object, getter, property) {
+    // Use getter method if present; otherwise, get the property directly.
+    if (typeof object[getter] === 'function')
+      return object[getter]();
+    else
+      return object[property];
+  }
+
+  var setProperty = function(object, setter, property, value) {
+    // Use setter method if present; otherwise, set the property directly.
+    if (typeof object[setter] === 'function')
+      object[setter](value);
+    else
+      object[property] = value;
+  }
+
+  describe('StringBooleanMap', function() {
+    it('should create an instance of StringBooleanMap', function() {
+      // uncomment below and update the code to test StringBooleanMap
+      //var instance = new OpenApiPetstore.StringBooleanMap();
+      //expect(instance).to.be.a(OpenApiPetstore.StringBooleanMap);
+    });
+
+  });
+
+}));
diff --git a/samples/client/petstore/javascript/.openapi-generator/VERSION b/samples/client/petstore/javascript/.openapi-generator/VERSION
index 1c00c5181548..14900cee60e8 100644
--- a/samples/client/petstore/javascript/.openapi-generator/VERSION
+++ b/samples/client/petstore/javascript/.openapi-generator/VERSION
@@ -1 +1 @@
-3.0.2-SNAPSHOT
\ No newline at end of file
+3.2.1-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/javascript/README.md b/samples/client/petstore/javascript/README.md
index 9d9637737d0c..5283d7248f67 100644
--- a/samples/client/petstore/javascript/README.md
+++ b/samples/client/petstore/javascript/README.md
@@ -105,7 +105,7 @@ var callback = function(error, data, response) {
     console.log('API called successfully. Returned data: ' + data);
   }
 };
-api.testSpecialTags(client, callback);
+api.call123testSpecialTags(client, callback);
 
 ```
 
@@ -115,11 +115,12 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
 
 Class | Method | HTTP request | Description
 ------------ | ------------- | ------------- | -------------
-*OpenApiPetstore.AnotherFakeApi* | [**testSpecialTags**](docs/AnotherFakeApi.md#testSpecialTags) | **PATCH** /another-fake/dummy | To test special tags
+*OpenApiPetstore.AnotherFakeApi* | [**call123testSpecialTags**](docs/AnotherFakeApi.md#call123testSpecialTags) | **PATCH** /another-fake/dummy | To test special tags
 *OpenApiPetstore.FakeApi* | [**fakeOuterBooleanSerialize**](docs/FakeApi.md#fakeOuterBooleanSerialize) | **POST** /fake/outer/boolean | 
 *OpenApiPetstore.FakeApi* | [**fakeOuterCompositeSerialize**](docs/FakeApi.md#fakeOuterCompositeSerialize) | **POST** /fake/outer/composite | 
 *OpenApiPetstore.FakeApi* | [**fakeOuterNumberSerialize**](docs/FakeApi.md#fakeOuterNumberSerialize) | **POST** /fake/outer/number | 
 *OpenApiPetstore.FakeApi* | [**fakeOuterStringSerialize**](docs/FakeApi.md#fakeOuterStringSerialize) | **POST** /fake/outer/string | 
+*OpenApiPetstore.FakeApi* | [**testBodyWithFileSchema**](docs/FakeApi.md#testBodyWithFileSchema) | **PUT** /fake/body-with-file-schema | 
 *OpenApiPetstore.FakeApi* | [**testBodyWithQueryParams**](docs/FakeApi.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params | 
 *OpenApiPetstore.FakeApi* | [**testClientModel**](docs/FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model
 *OpenApiPetstore.FakeApi* | [**testEndpointParameters**](docs/FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 
@@ -135,6 +136,7 @@ Class | Method | HTTP request | Description
 *OpenApiPetstore.PetApi* | [**updatePet**](docs/PetApi.md#updatePet) | **PUT** /pet | Update an existing pet
 *OpenApiPetstore.PetApi* | [**updatePetWithForm**](docs/PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data
 *OpenApiPetstore.PetApi* | [**uploadFile**](docs/PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image
+*OpenApiPetstore.PetApi* | [**uploadFileWithRequiredFile**](docs/PetApi.md#uploadFileWithRequiredFile) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required)
 *OpenApiPetstore.StoreApi* | [**deleteOrder**](docs/StoreApi.md#deleteOrder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID
 *OpenApiPetstore.StoreApi* | [**getInventory**](docs/StoreApi.md#getInventory) | **GET** /store/inventory | Returns pet inventories by status
 *OpenApiPetstore.StoreApi* | [**getOrderById**](docs/StoreApi.md#getOrderById) | **GET** /store/order/{order_id} | Find purchase order by ID
@@ -167,6 +169,8 @@ Class | Method | HTTP request | Description
  - [OpenApiPetstore.EnumArrays](docs/EnumArrays.md)
  - [OpenApiPetstore.EnumClass](docs/EnumClass.md)
  - [OpenApiPetstore.EnumTest](docs/EnumTest.md)
+ - [OpenApiPetstore.File](docs/File.md)
+ - [OpenApiPetstore.FileSchemaTestClass](docs/FileSchemaTestClass.md)
  - [OpenApiPetstore.FormatTest](docs/FormatTest.md)
  - [OpenApiPetstore.HasOnlyReadOnly](docs/HasOnlyReadOnly.md)
  - [OpenApiPetstore.List](docs/List.md)
@@ -182,6 +186,7 @@ Class | Method | HTTP request | Description
  - [OpenApiPetstore.Pet](docs/Pet.md)
  - [OpenApiPetstore.ReadOnlyFirst](docs/ReadOnlyFirst.md)
  - [OpenApiPetstore.SpecialModelName](docs/SpecialModelName.md)
+ - [OpenApiPetstore.StringBooleanMap](docs/StringBooleanMap.md)
  - [OpenApiPetstore.Tag](docs/Tag.md)
  - [OpenApiPetstore.User](docs/User.md)
 
diff --git a/samples/client/petstore/javascript/docs/AnotherFakeApi.md b/samples/client/petstore/javascript/docs/AnotherFakeApi.md
index 4529aa0c18b0..a334daa2e433 100644
--- a/samples/client/petstore/javascript/docs/AnotherFakeApi.md
+++ b/samples/client/petstore/javascript/docs/AnotherFakeApi.md
@@ -4,16 +4,16 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
 
 Method | HTTP request | Description
 ------------- | ------------- | -------------
-[**testSpecialTags**](AnotherFakeApi.md#testSpecialTags) | **PATCH** /another-fake/dummy | To test special tags
+[**call123testSpecialTags**](AnotherFakeApi.md#call123testSpecialTags) | **PATCH** /another-fake/dummy | To test special tags
 
 
-
-# **testSpecialTags**
-> Client testSpecialTags(client)
+
+# **call123testSpecialTags**
+> Client call123testSpecialTags(client)
 
 To test special tags
 
-To test special tags
+To test special tags and operation ID starting with number
 
 ### Example
 ```javascript
@@ -28,7 +28,7 @@ var callback = function(error, data, response) {
     console.log('API called successfully. Returned data: ' + data);
   }
 };
-apiInstance.testSpecialTags(client, callback);
+apiInstance.call123testSpecialTags(client, callback);
 ```
 
 ### Parameters
diff --git a/samples/client/petstore/javascript/docs/FakeApi.md b/samples/client/petstore/javascript/docs/FakeApi.md
index e0aa348e9011..73f3740d199e 100644
--- a/samples/client/petstore/javascript/docs/FakeApi.md
+++ b/samples/client/petstore/javascript/docs/FakeApi.md
@@ -8,6 +8,7 @@ Method | HTTP request | Description
 [**fakeOuterCompositeSerialize**](FakeApi.md#fakeOuterCompositeSerialize) | **POST** /fake/outer/composite | 
 [**fakeOuterNumberSerialize**](FakeApi.md#fakeOuterNumberSerialize) | **POST** /fake/outer/number | 
 [**fakeOuterStringSerialize**](FakeApi.md#fakeOuterStringSerialize) | **POST** /fake/outer/string | 
+[**testBodyWithFileSchema**](FakeApi.md#testBodyWithFileSchema) | **PUT** /fake/body-with-file-schema | 
 [**testBodyWithQueryParams**](FakeApi.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params | 
 [**testClientModel**](FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model
 [**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 
@@ -196,6 +197,49 @@ No authorization required
  - **Content-Type**: Not defined
  - **Accept**: */*
 
+
+# **testBodyWithFileSchema**
+> testBodyWithFileSchema(fileSchemaTestClass)
+
+
+
+For this test, the body for this request much reference a schema named `File`.
+
+### Example
+```javascript
+var OpenApiPetstore = require('open_api_petstore');
+
+var apiInstance = new OpenApiPetstore.FakeApi();
+var fileSchemaTestClass = new OpenApiPetstore.FileSchemaTestClass(); // FileSchemaTestClass | 
+var callback = function(error, data, response) {
+  if (error) {
+    console.error(error);
+  } else {
+    console.log('API called successfully.');
+  }
+};
+apiInstance.testBodyWithFileSchema(fileSchemaTestClass, callback);
+```
+
+### Parameters
+
+Name | Type | Description  | Notes
+------------- | ------------- | ------------- | -------------
+ **fileSchemaTestClass** | [**FileSchemaTestClass**](FileSchemaTestClass.md)|  | 
+
+### Return type
+
+null (empty response body)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: Not defined
+
 
 # **testBodyWithQueryParams**
 > testBodyWithQueryParams(query, user)
diff --git a/samples/client/petstore/javascript/docs/File.md b/samples/client/petstore/javascript/docs/File.md
new file mode 100644
index 000000000000..a34d76a3e46e
--- /dev/null
+++ b/samples/client/petstore/javascript/docs/File.md
@@ -0,0 +1,8 @@
+# OpenApiPetstore.File
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**sourceURI** | **String** | Test capitalization | [optional] 
+
+
diff --git a/samples/client/petstore/javascript/docs/FileSchemaTestClass.md b/samples/client/petstore/javascript/docs/FileSchemaTestClass.md
new file mode 100644
index 000000000000..3ccb4162dcc1
--- /dev/null
+++ b/samples/client/petstore/javascript/docs/FileSchemaTestClass.md
@@ -0,0 +1,9 @@
+# OpenApiPetstore.FileSchemaTestClass
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**file** | **File** |  | [optional] 
+**files** | **[File]** |  | [optional] 
+
+
diff --git a/samples/client/petstore/javascript/docs/MapTest.md b/samples/client/petstore/javascript/docs/MapTest.md
index 4a128da00fd0..f1075bf0681f 100644
--- a/samples/client/petstore/javascript/docs/MapTest.md
+++ b/samples/client/petstore/javascript/docs/MapTest.md
@@ -5,6 +5,8 @@ Name | Type | Description | Notes
 ------------ | ------------- | ------------- | -------------
 **mapMapOfString** | **{String: {String: String}}** |  | [optional] 
 **mapOfEnumString** | **{String: String}** |  | [optional] 
+**directMap** | **{String: Boolean}** |  | [optional] 
+**indirectMap** | [**StringBooleanMap**](StringBooleanMap.md) |  | [optional] 
 
 
 
diff --git a/samples/client/petstore/javascript/docs/PetApi.md b/samples/client/petstore/javascript/docs/PetApi.md
index fbcca8372ccc..265fc5a9b254 100644
--- a/samples/client/petstore/javascript/docs/PetApi.md
+++ b/samples/client/petstore/javascript/docs/PetApi.md
@@ -12,6 +12,7 @@ Method | HTTP request | Description
 [**updatePet**](PetApi.md#updatePet) | **PUT** /pet | Update an existing pet
 [**updatePetWithForm**](PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data
 [**uploadFile**](PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image
+[**uploadFileWithRequiredFile**](PetApi.md#uploadFileWithRequiredFile) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required)
 
 
 
@@ -398,3 +399,54 @@ Name | Type | Description  | Notes
  - **Content-Type**: multipart/form-data
  - **Accept**: application/json
 
+
+# **uploadFileWithRequiredFile**
+> ApiResponse uploadFileWithRequiredFile(petId, requiredFile, opts)
+
+uploads an image (required)
+
+### Example
+```javascript
+var OpenApiPetstore = require('open_api_petstore');
+var defaultClient = OpenApiPetstore.ApiClient.instance;
+// Configure OAuth2 access token for authorization: petstore_auth
+var petstore_auth = defaultClient.authentications['petstore_auth'];
+petstore_auth.accessToken = 'YOUR ACCESS TOKEN';
+
+var apiInstance = new OpenApiPetstore.PetApi();
+var petId = 789; // Number | ID of pet to update
+var requiredFile = "/path/to/file"; // File | file to upload
+var opts = {
+  'additionalMetadata': "additionalMetadata_example" // String | Additional data to pass to server
+};
+var callback = function(error, data, response) {
+  if (error) {
+    console.error(error);
+  } else {
+    console.log('API called successfully. Returned data: ' + data);
+  }
+};
+apiInstance.uploadFileWithRequiredFile(petId, requiredFile, opts, callback);
+```
+
+### Parameters
+
+Name | Type | Description  | Notes
+------------- | ------------- | ------------- | -------------
+ **petId** | **Number**| ID of pet to update | 
+ **requiredFile** | **File**| file to upload | 
+ **additionalMetadata** | **String**| Additional data to pass to server | [optional] 
+
+### Return type
+
+[**ApiResponse**](ApiResponse.md)
+
+### Authorization
+
+[petstore_auth](../README.md#petstore_auth)
+
+### HTTP request headers
+
+ - **Content-Type**: multipart/form-data
+ - **Accept**: application/json
+
diff --git a/samples/client/petstore/javascript/docs/StringBooleanMap.md b/samples/client/petstore/javascript/docs/StringBooleanMap.md
new file mode 100644
index 000000000000..195a7d57677f
--- /dev/null
+++ b/samples/client/petstore/javascript/docs/StringBooleanMap.md
@@ -0,0 +1,7 @@
+# OpenApiPetstore.StringBooleanMap
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+
+
diff --git a/samples/client/petstore/javascript/package.json b/samples/client/petstore/javascript/package.json
index 6cee1971957b..6fcefce10bad 100644
--- a/samples/client/petstore/javascript/package.json
+++ b/samples/client/petstore/javascript/package.json
@@ -11,7 +11,7 @@
     "fs": false
   },
   "dependencies": {
-    "superagent": "3.5.2"
+    "superagent": "3.7.0"
   },
   "devDependencies": {
     "mocha": "~2.3.4",
diff --git a/samples/client/petstore/javascript/src/ApiClient.js b/samples/client/petstore/javascript/src/ApiClient.js
index f43711962b0a..666b55968cd9 100644
--- a/samples/client/petstore/javascript/src/ApiClient.js
+++ b/samples/client/petstore/javascript/src/ApiClient.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
diff --git a/samples/client/petstore/javascript/src/api/AnotherFakeApi.js b/samples/client/petstore/javascript/src/api/AnotherFakeApi.js
index 73b690b0d56d..5075bf8ee34b 100644
--- a/samples/client/petstore/javascript/src/api/AnotherFakeApi.js
+++ b/samples/client/petstore/javascript/src/api/AnotherFakeApi.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
@@ -48,8 +48,8 @@
 
 
     /**
-     * Callback function to receive the result of the testSpecialTags operation.
-     * @callback module:api/AnotherFakeApi~testSpecialTagsCallback
+     * Callback function to receive the result of the call123testSpecialTags operation.
+     * @callback module:api/AnotherFakeApi~call123testSpecialTagsCallback
      * @param {String} error Error message, if any.
      * @param {module:model/Client} data The data returned by the service call.
      * @param {String} response The complete HTTP response.
@@ -57,17 +57,17 @@
 
     /**
      * To test special tags
-     * To test special tags
+     * To test special tags and operation ID starting with number
      * @param {module:model/Client} client client model
-     * @param {module:api/AnotherFakeApi~testSpecialTagsCallback} callback The callback function, accepting three arguments: error, data, response
+     * @param {module:api/AnotherFakeApi~call123testSpecialTagsCallback} callback The callback function, accepting three arguments: error, data, response
      * data is of type: {@link module:model/Client}
      */
-    this.testSpecialTags = function(client, callback) {
+    this.call123testSpecialTags = function(client, callback) {
       var postBody = client;
 
       // verify the required parameter 'client' is set
       if (client === undefined || client === null) {
-        throw new Error("Missing the required parameter 'client' when calling testSpecialTags");
+        throw new Error("Missing the required parameter 'client' when calling call123testSpecialTags");
       }
 
 
diff --git a/samples/client/petstore/javascript/src/api/FakeApi.js b/samples/client/petstore/javascript/src/api/FakeApi.js
index 71cb70f8be7c..56d61947600a 100644
--- a/samples/client/petstore/javascript/src/api/FakeApi.js
+++ b/samples/client/petstore/javascript/src/api/FakeApi.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
@@ -16,18 +16,18 @@
 (function(root, factory) {
   if (typeof define === 'function' && define.amd) {
     // AMD. Register as an anonymous module.
-    define(['ApiClient', 'model/Client', 'model/OuterComposite', 'model/User'], factory);
+    define(['ApiClient', 'model/Client', 'model/FileSchemaTestClass', 'model/OuterComposite', 'model/User'], factory);
   } else if (typeof module === 'object' && module.exports) {
     // CommonJS-like environments that support module.exports, like Node.
-    module.exports = factory(require('../ApiClient'), require('../model/Client'), require('../model/OuterComposite'), require('../model/User'));
+    module.exports = factory(require('../ApiClient'), require('../model/Client'), require('../model/FileSchemaTestClass'), require('../model/OuterComposite'), require('../model/User'));
   } else {
     // Browser globals (root is window)
     if (!root.OpenApiPetstore) {
       root.OpenApiPetstore = {};
     }
-    root.OpenApiPetstore.FakeApi = factory(root.OpenApiPetstore.ApiClient, root.OpenApiPetstore.Client, root.OpenApiPetstore.OuterComposite, root.OpenApiPetstore.User);
+    root.OpenApiPetstore.FakeApi = factory(root.OpenApiPetstore.ApiClient, root.OpenApiPetstore.Client, root.OpenApiPetstore.FileSchemaTestClass, root.OpenApiPetstore.OuterComposite, root.OpenApiPetstore.User);
   }
-}(this, function(ApiClient, Client, OuterComposite, User) {
+}(this, function(ApiClient, Client, FileSchemaTestClass, OuterComposite, User) {
   'use strict';
 
   /**
@@ -219,6 +219,51 @@
       );
     }
 
+    /**
+     * Callback function to receive the result of the testBodyWithFileSchema operation.
+     * @callback module:api/FakeApi~testBodyWithFileSchemaCallback
+     * @param {String} error Error message, if any.
+     * @param data This operation does not return a value.
+     * @param {String} response The complete HTTP response.
+     */
+
+    /**
+     * For this test, the body for this request much reference a schema named `File`.
+     * @param {module:model/FileSchemaTestClass} fileSchemaTestClass 
+     * @param {module:api/FakeApi~testBodyWithFileSchemaCallback} callback The callback function, accepting three arguments: error, data, response
+     */
+    this.testBodyWithFileSchema = function(fileSchemaTestClass, callback) {
+      var postBody = fileSchemaTestClass;
+
+      // verify the required parameter 'fileSchemaTestClass' is set
+      if (fileSchemaTestClass === undefined || fileSchemaTestClass === null) {
+        throw new Error("Missing the required parameter 'fileSchemaTestClass' when calling testBodyWithFileSchema");
+      }
+
+
+      var pathParams = {
+      };
+      var queryParams = {
+      };
+      var collectionQueryParams = {
+      };
+      var headerParams = {
+      };
+      var formParams = {
+      };
+
+      var authNames = [];
+      var contentTypes = ['application/json'];
+      var accepts = [];
+      var returnType = null;
+
+      return this.apiClient.callApi(
+        '/fake/body-with-file-schema', 'PUT',
+        pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
+        authNames, contentTypes, accepts, returnType, callback
+      );
+    }
+
     /**
      * Callback function to receive the result of the testBodyWithQueryParams operation.
      * @callback module:api/FakeApi~testBodyWithQueryParamsCallback
diff --git a/samples/client/petstore/javascript/src/api/FakeClassnameTags123Api.js b/samples/client/petstore/javascript/src/api/FakeClassnameTags123Api.js
index 469890d60bbb..9384dce1b7d2 100644
--- a/samples/client/petstore/javascript/src/api/FakeClassnameTags123Api.js
+++ b/samples/client/petstore/javascript/src/api/FakeClassnameTags123Api.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
diff --git a/samples/client/petstore/javascript/src/api/PetApi.js b/samples/client/petstore/javascript/src/api/PetApi.js
index 840cb2fa67e9..34bd8e70ddc2 100644
--- a/samples/client/petstore/javascript/src/api/PetApi.js
+++ b/samples/client/petstore/javascript/src/api/PetApi.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
@@ -441,6 +441,64 @@
         authNames, contentTypes, accepts, returnType, callback
       );
     }
+
+    /**
+     * Callback function to receive the result of the uploadFileWithRequiredFile operation.
+     * @callback module:api/PetApi~uploadFileWithRequiredFileCallback
+     * @param {String} error Error message, if any.
+     * @param {module:model/ApiResponse} data The data returned by the service call.
+     * @param {String} response The complete HTTP response.
+     */
+
+    /**
+     * uploads an image (required)
+     * @param {Number} petId ID of pet to update
+     * @param {File} requiredFile file to upload
+     * @param {Object} opts Optional parameters
+     * @param {String} opts.additionalMetadata Additional data to pass to server
+     * @param {module:api/PetApi~uploadFileWithRequiredFileCallback} callback The callback function, accepting three arguments: error, data, response
+     * data is of type: {@link module:model/ApiResponse}
+     */
+    this.uploadFileWithRequiredFile = function(petId, requiredFile, opts, callback) {
+      opts = opts || {};
+      var postBody = null;
+
+      // verify the required parameter 'petId' is set
+      if (petId === undefined || petId === null) {
+        throw new Error("Missing the required parameter 'petId' when calling uploadFileWithRequiredFile");
+      }
+
+      // verify the required parameter 'requiredFile' is set
+      if (requiredFile === undefined || requiredFile === null) {
+        throw new Error("Missing the required parameter 'requiredFile' when calling uploadFileWithRequiredFile");
+      }
+
+
+      var pathParams = {
+        'petId': petId
+      };
+      var queryParams = {
+      };
+      var collectionQueryParams = {
+      };
+      var headerParams = {
+      };
+      var formParams = {
+        'additionalMetadata': opts['additionalMetadata'],
+        'requiredFile': requiredFile
+      };
+
+      var authNames = ['petstore_auth'];
+      var contentTypes = ['multipart/form-data'];
+      var accepts = ['application/json'];
+      var returnType = ApiResponse;
+
+      return this.apiClient.callApi(
+        '/fake/{petId}/uploadImageWithRequiredFile', 'POST',
+        pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
+        authNames, contentTypes, accepts, returnType, callback
+      );
+    }
   };
 
   return exports;
diff --git a/samples/client/petstore/javascript/src/api/StoreApi.js b/samples/client/petstore/javascript/src/api/StoreApi.js
index ba2c675ec771..33216d30b39c 100644
--- a/samples/client/petstore/javascript/src/api/StoreApi.js
+++ b/samples/client/petstore/javascript/src/api/StoreApi.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
diff --git a/samples/client/petstore/javascript/src/api/UserApi.js b/samples/client/petstore/javascript/src/api/UserApi.js
index d3e3b8513c55..4ca5eb45ee76 100644
--- a/samples/client/petstore/javascript/src/api/UserApi.js
+++ b/samples/client/petstore/javascript/src/api/UserApi.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
diff --git a/samples/client/petstore/javascript/src/index.js b/samples/client/petstore/javascript/src/index.js
index 25685095fb2f..3f904b570cab 100644
--- a/samples/client/petstore/javascript/src/index.js
+++ b/samples/client/petstore/javascript/src/index.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
@@ -16,12 +16,12 @@
 (function(factory) {
   if (typeof define === 'function' && define.amd) {
     // AMD. Register as an anonymous module.
-    define(['ApiClient', 'model/AdditionalPropertiesClass', 'model/Animal', 'model/AnimalFarm', 'model/ApiResponse', 'model/ArrayOfArrayOfNumberOnly', 'model/ArrayOfNumberOnly', 'model/ArrayTest', 'model/Capitalization', 'model/Cat', 'model/Category', 'model/ClassModel', 'model/Client', 'model/Dog', 'model/EnumArrays', 'model/EnumClass', 'model/EnumTest', 'model/FormatTest', 'model/HasOnlyReadOnly', 'model/List', 'model/MapTest', 'model/MixedPropertiesAndAdditionalPropertiesClass', 'model/Model200Response', 'model/ModelReturn', 'model/Name', 'model/NumberOnly', 'model/Order', 'model/OuterComposite', 'model/OuterEnum', 'model/Pet', 'model/ReadOnlyFirst', 'model/SpecialModelName', 'model/Tag', 'model/User', 'api/AnotherFakeApi', 'api/FakeApi', 'api/FakeClassnameTags123Api', 'api/PetApi', 'api/StoreApi', 'api/UserApi'], factory);
+    define(['ApiClient', 'model/AdditionalPropertiesClass', 'model/Animal', 'model/AnimalFarm', 'model/ApiResponse', 'model/ArrayOfArrayOfNumberOnly', 'model/ArrayOfNumberOnly', 'model/ArrayTest', 'model/Capitalization', 'model/Cat', 'model/Category', 'model/ClassModel', 'model/Client', 'model/Dog', 'model/EnumArrays', 'model/EnumClass', 'model/EnumTest', 'model/File', 'model/FileSchemaTestClass', 'model/FormatTest', 'model/HasOnlyReadOnly', 'model/List', 'model/MapTest', 'model/MixedPropertiesAndAdditionalPropertiesClass', 'model/Model200Response', 'model/ModelReturn', 'model/Name', 'model/NumberOnly', 'model/Order', 'model/OuterComposite', 'model/OuterEnum', 'model/Pet', 'model/ReadOnlyFirst', 'model/SpecialModelName', 'model/StringBooleanMap', 'model/Tag', 'model/User', 'api/AnotherFakeApi', 'api/FakeApi', 'api/FakeClassnameTags123Api', 'api/PetApi', 'api/StoreApi', 'api/UserApi'], factory);
   } else if (typeof module === 'object' && module.exports) {
     // CommonJS-like environments that support module.exports, like Node.
-    module.exports = factory(require('./ApiClient'), require('./model/AdditionalPropertiesClass'), require('./model/Animal'), require('./model/AnimalFarm'), require('./model/ApiResponse'), require('./model/ArrayOfArrayOfNumberOnly'), require('./model/ArrayOfNumberOnly'), require('./model/ArrayTest'), require('./model/Capitalization'), require('./model/Cat'), require('./model/Category'), require('./model/ClassModel'), require('./model/Client'), require('./model/Dog'), require('./model/EnumArrays'), require('./model/EnumClass'), require('./model/EnumTest'), require('./model/FormatTest'), require('./model/HasOnlyReadOnly'), require('./model/List'), require('./model/MapTest'), require('./model/MixedPropertiesAndAdditionalPropertiesClass'), require('./model/Model200Response'), require('./model/ModelReturn'), require('./model/Name'), require('./model/NumberOnly'), require('./model/Order'), require('./model/OuterComposite'), require('./model/OuterEnum'), require('./model/Pet'), require('./model/ReadOnlyFirst'), require('./model/SpecialModelName'), require('./model/Tag'), require('./model/User'), require('./api/AnotherFakeApi'), require('./api/FakeApi'), require('./api/FakeClassnameTags123Api'), require('./api/PetApi'), require('./api/StoreApi'), require('./api/UserApi'));
+    module.exports = factory(require('./ApiClient'), require('./model/AdditionalPropertiesClass'), require('./model/Animal'), require('./model/AnimalFarm'), require('./model/ApiResponse'), require('./model/ArrayOfArrayOfNumberOnly'), require('./model/ArrayOfNumberOnly'), require('./model/ArrayTest'), require('./model/Capitalization'), require('./model/Cat'), require('./model/Category'), require('./model/ClassModel'), require('./model/Client'), require('./model/Dog'), require('./model/EnumArrays'), require('./model/EnumClass'), require('./model/EnumTest'), require('./model/File'), require('./model/FileSchemaTestClass'), require('./model/FormatTest'), require('./model/HasOnlyReadOnly'), require('./model/List'), require('./model/MapTest'), require('./model/MixedPropertiesAndAdditionalPropertiesClass'), require('./model/Model200Response'), require('./model/ModelReturn'), require('./model/Name'), require('./model/NumberOnly'), require('./model/Order'), require('./model/OuterComposite'), require('./model/OuterEnum'), require('./model/Pet'), require('./model/ReadOnlyFirst'), require('./model/SpecialModelName'), require('./model/StringBooleanMap'), require('./model/Tag'), require('./model/User'), require('./api/AnotherFakeApi'), require('./api/FakeApi'), require('./api/FakeClassnameTags123Api'), require('./api/PetApi'), require('./api/StoreApi'), require('./api/UserApi'));
   }
-}(function(ApiClient, AdditionalPropertiesClass, Animal, AnimalFarm, ApiResponse, ArrayOfArrayOfNumberOnly, ArrayOfNumberOnly, ArrayTest, Capitalization, Cat, Category, ClassModel, Client, Dog, EnumArrays, EnumClass, EnumTest, FormatTest, HasOnlyReadOnly, List, MapTest, MixedPropertiesAndAdditionalPropertiesClass, Model200Response, ModelReturn, Name, NumberOnly, Order, OuterComposite, OuterEnum, Pet, ReadOnlyFirst, SpecialModelName, Tag, User, AnotherFakeApi, FakeApi, FakeClassnameTags123Api, PetApi, StoreApi, UserApi) {
+}(function(ApiClient, AdditionalPropertiesClass, Animal, AnimalFarm, ApiResponse, ArrayOfArrayOfNumberOnly, ArrayOfNumberOnly, ArrayTest, Capitalization, Cat, Category, ClassModel, Client, Dog, EnumArrays, EnumClass, EnumTest, File, FileSchemaTestClass, FormatTest, HasOnlyReadOnly, List, MapTest, MixedPropertiesAndAdditionalPropertiesClass, Model200Response, ModelReturn, Name, NumberOnly, Order, OuterComposite, OuterEnum, Pet, ReadOnlyFirst, SpecialModelName, StringBooleanMap, Tag, User, AnotherFakeApi, FakeApi, FakeClassnameTags123Api, PetApi, StoreApi, UserApi) {
   'use strict';
 
   /**
@@ -141,6 +141,16 @@
      * @property {module:model/EnumTest}
      */
     EnumTest: EnumTest,
+    /**
+     * The File model constructor.
+     * @property {module:model/File}
+     */
+    File: File,
+    /**
+     * The FileSchemaTestClass model constructor.
+     * @property {module:model/FileSchemaTestClass}
+     */
+    FileSchemaTestClass: FileSchemaTestClass,
     /**
      * The FormatTest model constructor.
      * @property {module:model/FormatTest}
@@ -216,6 +226,11 @@
      * @property {module:model/SpecialModelName}
      */
     SpecialModelName: SpecialModelName,
+    /**
+     * The StringBooleanMap model constructor.
+     * @property {module:model/StringBooleanMap}
+     */
+    StringBooleanMap: StringBooleanMap,
     /**
      * The Tag model constructor.
      * @property {module:model/Tag}
diff --git a/samples/client/petstore/javascript/src/model/AdditionalPropertiesClass.js b/samples/client/petstore/javascript/src/model/AdditionalPropertiesClass.js
index 08572d900840..3e41a2906a5b 100644
--- a/samples/client/petstore/javascript/src/model/AdditionalPropertiesClass.js
+++ b/samples/client/petstore/javascript/src/model/AdditionalPropertiesClass.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
diff --git a/samples/client/petstore/javascript/src/model/Animal.js b/samples/client/petstore/javascript/src/model/Animal.js
index 29376d771bfc..5ec0fe427cb4 100644
--- a/samples/client/petstore/javascript/src/model/Animal.js
+++ b/samples/client/petstore/javascript/src/model/Animal.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
diff --git a/samples/client/petstore/javascript/src/model/AnimalFarm.js b/samples/client/petstore/javascript/src/model/AnimalFarm.js
index e1a4797eec19..f80991972452 100644
--- a/samples/client/petstore/javascript/src/model/AnimalFarm.js
+++ b/samples/client/petstore/javascript/src/model/AnimalFarm.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
diff --git a/samples/client/petstore/javascript/src/model/ApiResponse.js b/samples/client/petstore/javascript/src/model/ApiResponse.js
index 5c112418181d..d3236a99234a 100644
--- a/samples/client/petstore/javascript/src/model/ApiResponse.js
+++ b/samples/client/petstore/javascript/src/model/ApiResponse.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
diff --git a/samples/client/petstore/javascript/src/model/ArrayOfArrayOfNumberOnly.js b/samples/client/petstore/javascript/src/model/ArrayOfArrayOfNumberOnly.js
index 024c26469df3..e7ac7b24a330 100644
--- a/samples/client/petstore/javascript/src/model/ArrayOfArrayOfNumberOnly.js
+++ b/samples/client/petstore/javascript/src/model/ArrayOfArrayOfNumberOnly.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
diff --git a/samples/client/petstore/javascript/src/model/ArrayOfNumberOnly.js b/samples/client/petstore/javascript/src/model/ArrayOfNumberOnly.js
index ca79a7c2a6d0..7c98321c3d4b 100644
--- a/samples/client/petstore/javascript/src/model/ArrayOfNumberOnly.js
+++ b/samples/client/petstore/javascript/src/model/ArrayOfNumberOnly.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
diff --git a/samples/client/petstore/javascript/src/model/ArrayTest.js b/samples/client/petstore/javascript/src/model/ArrayTest.js
index 01b97a1b5809..0f47e3e78ef1 100644
--- a/samples/client/petstore/javascript/src/model/ArrayTest.js
+++ b/samples/client/petstore/javascript/src/model/ArrayTest.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
diff --git a/samples/client/petstore/javascript/src/model/Capitalization.js b/samples/client/petstore/javascript/src/model/Capitalization.js
index 05934fb253ce..9f5e832699d3 100644
--- a/samples/client/petstore/javascript/src/model/Capitalization.js
+++ b/samples/client/petstore/javascript/src/model/Capitalization.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
diff --git a/samples/client/petstore/javascript/src/model/Cat.js b/samples/client/petstore/javascript/src/model/Cat.js
index 10b787fed4eb..4c1d8f0c845d 100644
--- a/samples/client/petstore/javascript/src/model/Cat.js
+++ b/samples/client/petstore/javascript/src/model/Cat.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
diff --git a/samples/client/petstore/javascript/src/model/Category.js b/samples/client/petstore/javascript/src/model/Category.js
index c289c6b8e5bd..560f1a94013e 100644
--- a/samples/client/petstore/javascript/src/model/Category.js
+++ b/samples/client/petstore/javascript/src/model/Category.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
diff --git a/samples/client/petstore/javascript/src/model/ClassModel.js b/samples/client/petstore/javascript/src/model/ClassModel.js
index 6edd8fbadd04..cadf752c6446 100644
--- a/samples/client/petstore/javascript/src/model/ClassModel.js
+++ b/samples/client/petstore/javascript/src/model/ClassModel.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
diff --git a/samples/client/petstore/javascript/src/model/Client.js b/samples/client/petstore/javascript/src/model/Client.js
index e563bcf7ea59..7bf09ed3ac6f 100644
--- a/samples/client/petstore/javascript/src/model/Client.js
+++ b/samples/client/petstore/javascript/src/model/Client.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
diff --git a/samples/client/petstore/javascript/src/model/Dog.js b/samples/client/petstore/javascript/src/model/Dog.js
index c308f3dc9f11..93f8f38ae13d 100644
--- a/samples/client/petstore/javascript/src/model/Dog.js
+++ b/samples/client/petstore/javascript/src/model/Dog.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
diff --git a/samples/client/petstore/javascript/src/model/EnumArrays.js b/samples/client/petstore/javascript/src/model/EnumArrays.js
index 07d52b119db0..d7b36eb6307e 100644
--- a/samples/client/petstore/javascript/src/model/EnumArrays.js
+++ b/samples/client/petstore/javascript/src/model/EnumArrays.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
diff --git a/samples/client/petstore/javascript/src/model/EnumClass.js b/samples/client/petstore/javascript/src/model/EnumClass.js
index d4a9f39f5661..d2f7c69374b1 100644
--- a/samples/client/petstore/javascript/src/model/EnumClass.js
+++ b/samples/client/petstore/javascript/src/model/EnumClass.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
diff --git a/samples/client/petstore/javascript/src/model/EnumTest.js b/samples/client/petstore/javascript/src/model/EnumTest.js
index 4dfc6753323a..e6f1a7ea9e47 100644
--- a/samples/client/petstore/javascript/src/model/EnumTest.js
+++ b/samples/client/petstore/javascript/src/model/EnumTest.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
diff --git a/samples/client/petstore/javascript/src/model/File.js b/samples/client/petstore/javascript/src/model/File.js
new file mode 100644
index 000000000000..aa7449e29078
--- /dev/null
+++ b/samples/client/petstore/javascript/src/model/File.js
@@ -0,0 +1,83 @@
+/**
+ * OpenAPI Petstore
+ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
+ *
+ * OpenAPI spec version: 1.0.0
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ *
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
+ *
+ * Do not edit the class manually.
+ *
+ */
+
+(function(root, factory) {
+  if (typeof define === 'function' && define.amd) {
+    // AMD. Register as an anonymous module.
+    define(['ApiClient'], factory);
+  } else if (typeof module === 'object' && module.exports) {
+    // CommonJS-like environments that support module.exports, like Node.
+    module.exports = factory(require('../ApiClient'));
+  } else {
+    // Browser globals (root is window)
+    if (!root.OpenApiPetstore) {
+      root.OpenApiPetstore = {};
+    }
+    root.OpenApiPetstore.File = factory(root.OpenApiPetstore.ApiClient);
+  }
+}(this, function(ApiClient) {
+  'use strict';
+
+
+
+
+  /**
+   * The File model module.
+   * @module model/File
+   * @version 1.0.0
+   */
+
+  /**
+   * Constructs a new File.
+   * Must be named `File` for test.
+   * @alias module:model/File
+   * @class
+   */
+  var exports = function() {
+    var _this = this;
+
+
+  };
+
+  /**
+   * Constructs a File from a plain JavaScript object, optionally creating a new instance.
+   * Copies all relevant properties from data to obj if supplied or a new instance if not.
+   * @param {Object} data The plain JavaScript object bearing properties of interest.
+   * @param {module:model/File} obj Optional instance to populate.
+   * @return {module:model/File} The populated File instance.
+   */
+  exports.constructFromObject = function(data, obj) {
+    if (data) {
+      obj = obj || new exports();
+
+      if (data.hasOwnProperty('sourceURI')) {
+        obj['sourceURI'] = ApiClient.convertToType(data['sourceURI'], 'String');
+      }
+    }
+    return obj;
+  }
+
+  /**
+   * Test capitalization
+   * @member {String} sourceURI
+   */
+  exports.prototype['sourceURI'] = undefined;
+
+
+
+  return exports;
+}));
+
+
diff --git a/samples/client/petstore/javascript/src/model/FileSchemaTestClass.js b/samples/client/petstore/javascript/src/model/FileSchemaTestClass.js
new file mode 100644
index 000000000000..f2f1b8e966a3
--- /dev/null
+++ b/samples/client/petstore/javascript/src/model/FileSchemaTestClass.js
@@ -0,0 +1,89 @@
+/**
+ * OpenAPI Petstore
+ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
+ *
+ * OpenAPI spec version: 1.0.0
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ *
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
+ *
+ * Do not edit the class manually.
+ *
+ */
+
+(function(root, factory) {
+  if (typeof define === 'function' && define.amd) {
+    // AMD. Register as an anonymous module.
+    define(['ApiClient'], factory);
+  } else if (typeof module === 'object' && module.exports) {
+    // CommonJS-like environments that support module.exports, like Node.
+    module.exports = factory(require('../ApiClient'));
+  } else {
+    // Browser globals (root is window)
+    if (!root.OpenApiPetstore) {
+      root.OpenApiPetstore = {};
+    }
+    root.OpenApiPetstore.FileSchemaTestClass = factory(root.OpenApiPetstore.ApiClient);
+  }
+}(this, function(ApiClient) {
+  'use strict';
+
+
+
+
+  /**
+   * The FileSchemaTestClass model module.
+   * @module model/FileSchemaTestClass
+   * @version 1.0.0
+   */
+
+  /**
+   * Constructs a new FileSchemaTestClass.
+   * @alias module:model/FileSchemaTestClass
+   * @class
+   */
+  var exports = function() {
+    var _this = this;
+
+
+
+  };
+
+  /**
+   * Constructs a FileSchemaTestClass from a plain JavaScript object, optionally creating a new instance.
+   * Copies all relevant properties from data to obj if supplied or a new instance if not.
+   * @param {Object} data The plain JavaScript object bearing properties of interest.
+   * @param {module:model/FileSchemaTestClass} obj Optional instance to populate.
+   * @return {module:model/FileSchemaTestClass} The populated FileSchemaTestClass instance.
+   */
+  exports.constructFromObject = function(data, obj) {
+    if (data) {
+      obj = obj || new exports();
+
+      if (data.hasOwnProperty('file')) {
+        obj['file'] = File.constructFromObject(data['file']);
+      }
+      if (data.hasOwnProperty('files')) {
+        obj['files'] = ApiClient.convertToType(data['files'], [File]);
+      }
+    }
+    return obj;
+  }
+
+  /**
+   * @member {File} file
+   */
+  exports.prototype['file'] = undefined;
+  /**
+   * @member {Array.} files
+   */
+  exports.prototype['files'] = undefined;
+
+
+
+  return exports;
+}));
+
+
diff --git a/samples/client/petstore/javascript/src/model/FormatTest.js b/samples/client/petstore/javascript/src/model/FormatTest.js
index 6c5986d48985..ea6d19666136 100644
--- a/samples/client/petstore/javascript/src/model/FormatTest.js
+++ b/samples/client/petstore/javascript/src/model/FormatTest.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
diff --git a/samples/client/petstore/javascript/src/model/HasOnlyReadOnly.js b/samples/client/petstore/javascript/src/model/HasOnlyReadOnly.js
index 484fd0c99910..b6470082caf9 100644
--- a/samples/client/petstore/javascript/src/model/HasOnlyReadOnly.js
+++ b/samples/client/petstore/javascript/src/model/HasOnlyReadOnly.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
diff --git a/samples/client/petstore/javascript/src/model/List.js b/samples/client/petstore/javascript/src/model/List.js
index ab3c2e34e343..3b9f343524e8 100644
--- a/samples/client/petstore/javascript/src/model/List.js
+++ b/samples/client/petstore/javascript/src/model/List.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
diff --git a/samples/client/petstore/javascript/src/model/MapTest.js b/samples/client/petstore/javascript/src/model/MapTest.js
index adf82a358c28..8563624adffe 100644
--- a/samples/client/petstore/javascript/src/model/MapTest.js
+++ b/samples/client/petstore/javascript/src/model/MapTest.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
@@ -16,18 +16,18 @@
 (function(root, factory) {
   if (typeof define === 'function' && define.amd) {
     // AMD. Register as an anonymous module.
-    define(['ApiClient'], factory);
+    define(['ApiClient', 'model/StringBooleanMap'], factory);
   } else if (typeof module === 'object' && module.exports) {
     // CommonJS-like environments that support module.exports, like Node.
-    module.exports = factory(require('../ApiClient'));
+    module.exports = factory(require('../ApiClient'), require('./StringBooleanMap'));
   } else {
     // Browser globals (root is window)
     if (!root.OpenApiPetstore) {
       root.OpenApiPetstore = {};
     }
-    root.OpenApiPetstore.MapTest = factory(root.OpenApiPetstore.ApiClient);
+    root.OpenApiPetstore.MapTest = factory(root.OpenApiPetstore.ApiClient, root.OpenApiPetstore.StringBooleanMap);
   }
-}(this, function(ApiClient) {
+}(this, function(ApiClient, StringBooleanMap) {
   'use strict';
 
 
@@ -49,6 +49,8 @@
 
 
 
+
+
   };
 
   /**
@@ -68,6 +70,12 @@
       if (data.hasOwnProperty('map_of_enum_string')) {
         obj['map_of_enum_string'] = ApiClient.convertToType(data['map_of_enum_string'], {'String': 'String'});
       }
+      if (data.hasOwnProperty('direct_map')) {
+        obj['direct_map'] = ApiClient.convertToType(data['direct_map'], {'String': 'Boolean'});
+      }
+      if (data.hasOwnProperty('indirect_map')) {
+        obj['indirect_map'] = StringBooleanMap.constructFromObject(data['indirect_map']);
+      }
     }
     return obj;
   }
@@ -80,6 +88,14 @@
    * @member {Object.} map_of_enum_string
    */
   exports.prototype['map_of_enum_string'] = undefined;
+  /**
+   * @member {Object.} direct_map
+   */
+  exports.prototype['direct_map'] = undefined;
+  /**
+   * @member {module:model/StringBooleanMap} indirect_map
+   */
+  exports.prototype['indirect_map'] = undefined;
 
 
   /**
diff --git a/samples/client/petstore/javascript/src/model/MixedPropertiesAndAdditionalPropertiesClass.js b/samples/client/petstore/javascript/src/model/MixedPropertiesAndAdditionalPropertiesClass.js
index 62c7a2f59e32..ff56b0e4981c 100644
--- a/samples/client/petstore/javascript/src/model/MixedPropertiesAndAdditionalPropertiesClass.js
+++ b/samples/client/petstore/javascript/src/model/MixedPropertiesAndAdditionalPropertiesClass.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
diff --git a/samples/client/petstore/javascript/src/model/Model200Response.js b/samples/client/petstore/javascript/src/model/Model200Response.js
index 84131169fb13..665e9d64f653 100644
--- a/samples/client/petstore/javascript/src/model/Model200Response.js
+++ b/samples/client/petstore/javascript/src/model/Model200Response.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
diff --git a/samples/client/petstore/javascript/src/model/ModelReturn.js b/samples/client/petstore/javascript/src/model/ModelReturn.js
index 87484d2ee234..836fab1b221c 100644
--- a/samples/client/petstore/javascript/src/model/ModelReturn.js
+++ b/samples/client/petstore/javascript/src/model/ModelReturn.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
diff --git a/samples/client/petstore/javascript/src/model/Name.js b/samples/client/petstore/javascript/src/model/Name.js
index 8c851c4cec54..24d63b4836f8 100644
--- a/samples/client/petstore/javascript/src/model/Name.js
+++ b/samples/client/petstore/javascript/src/model/Name.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
diff --git a/samples/client/petstore/javascript/src/model/NumberOnly.js b/samples/client/petstore/javascript/src/model/NumberOnly.js
index 389ad08e8c5c..b50c8dadc269 100644
--- a/samples/client/petstore/javascript/src/model/NumberOnly.js
+++ b/samples/client/petstore/javascript/src/model/NumberOnly.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
diff --git a/samples/client/petstore/javascript/src/model/Order.js b/samples/client/petstore/javascript/src/model/Order.js
index bfd5f3714bef..5abd1899c042 100644
--- a/samples/client/petstore/javascript/src/model/Order.js
+++ b/samples/client/petstore/javascript/src/model/Order.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
diff --git a/samples/client/petstore/javascript/src/model/OuterComposite.js b/samples/client/petstore/javascript/src/model/OuterComposite.js
index b4fc48476dee..7410237332e4 100644
--- a/samples/client/petstore/javascript/src/model/OuterComposite.js
+++ b/samples/client/petstore/javascript/src/model/OuterComposite.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
@@ -64,13 +64,13 @@
       obj = obj || new exports();
 
       if (data.hasOwnProperty('my_number')) {
-        obj['my_number'] = 'Number'.constructFromObject(data['my_number']);
+        obj['my_number'] = ApiClient.convertToType(data['my_number'], 'Number');
       }
       if (data.hasOwnProperty('my_string')) {
-        obj['my_string'] = 'String'.constructFromObject(data['my_string']);
+        obj['my_string'] = ApiClient.convertToType(data['my_string'], 'String');
       }
       if (data.hasOwnProperty('my_boolean')) {
-        obj['my_boolean'] = 'Boolean'.constructFromObject(data['my_boolean']);
+        obj['my_boolean'] = ApiClient.convertToType(data['my_boolean'], 'Boolean');
       }
     }
     return obj;
diff --git a/samples/client/petstore/javascript/src/model/OuterEnum.js b/samples/client/petstore/javascript/src/model/OuterEnum.js
index 9e1f532b44d0..0d7f9a4fd595 100644
--- a/samples/client/petstore/javascript/src/model/OuterEnum.js
+++ b/samples/client/petstore/javascript/src/model/OuterEnum.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
diff --git a/samples/client/petstore/javascript/src/model/Pet.js b/samples/client/petstore/javascript/src/model/Pet.js
index 55997490b789..69d47d25aef9 100644
--- a/samples/client/petstore/javascript/src/model/Pet.js
+++ b/samples/client/petstore/javascript/src/model/Pet.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
diff --git a/samples/client/petstore/javascript/src/model/ReadOnlyFirst.js b/samples/client/petstore/javascript/src/model/ReadOnlyFirst.js
index 1b0ae1104cc6..4e2f573958ea 100644
--- a/samples/client/petstore/javascript/src/model/ReadOnlyFirst.js
+++ b/samples/client/petstore/javascript/src/model/ReadOnlyFirst.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
diff --git a/samples/client/petstore/javascript/src/model/SpecialModelName.js b/samples/client/petstore/javascript/src/model/SpecialModelName.js
index 22464bbe7a25..5bea0b84fcf7 100644
--- a/samples/client/petstore/javascript/src/model/SpecialModelName.js
+++ b/samples/client/petstore/javascript/src/model/SpecialModelName.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
diff --git a/samples/client/petstore/javascript/src/model/StringBooleanMap.js b/samples/client/petstore/javascript/src/model/StringBooleanMap.js
new file mode 100644
index 000000000000..d07c0fc99ea7
--- /dev/null
+++ b/samples/client/petstore/javascript/src/model/StringBooleanMap.js
@@ -0,0 +1,76 @@
+/**
+ * OpenAPI Petstore
+ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
+ *
+ * OpenAPI spec version: 1.0.0
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ *
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
+ *
+ * Do not edit the class manually.
+ *
+ */
+
+(function(root, factory) {
+  if (typeof define === 'function' && define.amd) {
+    // AMD. Register as an anonymous module.
+    define(['ApiClient'], factory);
+  } else if (typeof module === 'object' && module.exports) {
+    // CommonJS-like environments that support module.exports, like Node.
+    module.exports = factory(require('../ApiClient'));
+  } else {
+    // Browser globals (root is window)
+    if (!root.OpenApiPetstore) {
+      root.OpenApiPetstore = {};
+    }
+    root.OpenApiPetstore.StringBooleanMap = factory(root.OpenApiPetstore.ApiClient);
+  }
+}(this, function(ApiClient) {
+  'use strict';
+
+
+
+
+  /**
+   * The StringBooleanMap model module.
+   * @module model/StringBooleanMap
+   * @version 1.0.0
+   */
+
+  /**
+   * Constructs a new StringBooleanMap.
+   * @alias module:model/StringBooleanMap
+   * @class
+   * @extends Object
+   */
+  var exports = function() {
+    var _this = this;
+
+    return _this;
+  };
+
+  /**
+   * Constructs a StringBooleanMap from a plain JavaScript object, optionally creating a new instance.
+   * Copies all relevant properties from data to obj if supplied or a new instance if not.
+   * @param {Object} data The plain JavaScript object bearing properties of interest.
+   * @param {module:model/StringBooleanMap} obj Optional instance to populate.
+   * @return {module:model/StringBooleanMap} The populated StringBooleanMap instance.
+   */
+  exports.constructFromObject = function(data, obj) {
+    if (data) {
+      obj = obj || new exports();
+      ApiClient.constructFromObject(data, obj, 'Boolean');
+
+    }
+    return obj;
+  }
+
+
+
+
+  return exports;
+}));
+
+
diff --git a/samples/client/petstore/javascript/src/model/Tag.js b/samples/client/petstore/javascript/src/model/Tag.js
index 9e4f88b0872e..09299a4d0d61 100644
--- a/samples/client/petstore/javascript/src/model/Tag.js
+++ b/samples/client/petstore/javascript/src/model/Tag.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
diff --git a/samples/client/petstore/javascript/src/model/User.js b/samples/client/petstore/javascript/src/model/User.js
index 06d4e6e7ad0a..62a2a70c6802 100644
--- a/samples/client/petstore/javascript/src/model/User.js
+++ b/samples/client/petstore/javascript/src/model/User.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
diff --git a/samples/client/petstore/javascript/test/model/File.spec.js b/samples/client/petstore/javascript/test/model/File.spec.js
new file mode 100644
index 000000000000..67f2956c3973
--- /dev/null
+++ b/samples/client/petstore/javascript/test/model/File.spec.js
@@ -0,0 +1,67 @@
+/**
+ * OpenAPI Petstore
+ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
+ *
+ * OpenAPI spec version: 1.0.0
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ *
+ * OpenAPI Generator version: 3.2.0-SNAPSHOT
+ *
+ * Do not edit the class manually.
+ *
+ */
+
+(function(root, factory) {
+  if (typeof define === 'function' && define.amd) {
+    // AMD.
+    define(['expect.js', '../../src/index'], factory);
+  } else if (typeof module === 'object' && module.exports) {
+    // CommonJS-like environments that support module.exports, like Node.
+    factory(require('expect.js'), require('../../src/index'));
+  } else {
+    // Browser globals (root is window)
+    factory(root.expect, root.OpenApiPetstore);
+  }
+}(this, function(expect, OpenApiPetstore) {
+  'use strict';
+
+  var instance;
+
+  beforeEach(function() {
+    instance = new OpenApiPetstore.File();
+  });
+
+  var getProperty = function(object, getter, property) {
+    // Use getter method if present; otherwise, get the property directly.
+    if (typeof object[getter] === 'function')
+      return object[getter]();
+    else
+      return object[property];
+  }
+
+  var setProperty = function(object, setter, property, value) {
+    // Use setter method if present; otherwise, set the property directly.
+    if (typeof object[setter] === 'function')
+      object[setter](value);
+    else
+      object[property] = value;
+  }
+
+  describe('File', function() {
+    it('should create an instance of File', function() {
+      // uncomment below and update the code to test File
+      //var instance = new OpenApiPetstore.File();
+      //expect(instance).to.be.a(OpenApiPetstore.File);
+    });
+
+    it('should have the property sourceURI (base name: "sourceURI")', function() {
+      // uncomment below and update the code to test the property sourceURI
+      //var instance = new OpenApiPetstore.File();
+      //expect(instance).to.be();
+    });
+
+  });
+
+}));
diff --git a/samples/client/petstore/javascript/test/model/FileSchemaTestClass.spec.js b/samples/client/petstore/javascript/test/model/FileSchemaTestClass.spec.js
new file mode 100644
index 000000000000..74f68c03ff6b
--- /dev/null
+++ b/samples/client/petstore/javascript/test/model/FileSchemaTestClass.spec.js
@@ -0,0 +1,73 @@
+/**
+ * OpenAPI Petstore
+ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
+ *
+ * OpenAPI spec version: 1.0.0
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ *
+ * OpenAPI Generator version: 3.2.0-SNAPSHOT
+ *
+ * Do not edit the class manually.
+ *
+ */
+
+(function(root, factory) {
+  if (typeof define === 'function' && define.amd) {
+    // AMD.
+    define(['expect.js', '../../src/index'], factory);
+  } else if (typeof module === 'object' && module.exports) {
+    // CommonJS-like environments that support module.exports, like Node.
+    factory(require('expect.js'), require('../../src/index'));
+  } else {
+    // Browser globals (root is window)
+    factory(root.expect, root.OpenApiPetstore);
+  }
+}(this, function(expect, OpenApiPetstore) {
+  'use strict';
+
+  var instance;
+
+  beforeEach(function() {
+    instance = new OpenApiPetstore.FileSchemaTestClass();
+  });
+
+  var getProperty = function(object, getter, property) {
+    // Use getter method if present; otherwise, get the property directly.
+    if (typeof object[getter] === 'function')
+      return object[getter]();
+    else
+      return object[property];
+  }
+
+  var setProperty = function(object, setter, property, value) {
+    // Use setter method if present; otherwise, set the property directly.
+    if (typeof object[setter] === 'function')
+      object[setter](value);
+    else
+      object[property] = value;
+  }
+
+  describe('FileSchemaTestClass', function() {
+    it('should create an instance of FileSchemaTestClass', function() {
+      // uncomment below and update the code to test FileSchemaTestClass
+      //var instance = new OpenApiPetstore.FileSchemaTestClass();
+      //expect(instance).to.be.a(OpenApiPetstore.FileSchemaTestClass);
+    });
+
+    it('should have the property file (base name: "file")', function() {
+      // uncomment below and update the code to test the property file
+      //var instance = new OpenApiPetstore.FileSchemaTestClass();
+      //expect(instance).to.be();
+    });
+
+    it('should have the property files (base name: "files")', function() {
+      // uncomment below and update the code to test the property files
+      //var instance = new OpenApiPetstore.FileSchemaTestClass();
+      //expect(instance).to.be();
+    });
+
+  });
+
+}));
diff --git a/samples/client/petstore/javascript/test/model/StringBooleanMap.spec.js b/samples/client/petstore/javascript/test/model/StringBooleanMap.spec.js
new file mode 100644
index 000000000000..c14a469bcf5f
--- /dev/null
+++ b/samples/client/petstore/javascript/test/model/StringBooleanMap.spec.js
@@ -0,0 +1,61 @@
+/**
+ * OpenAPI Petstore
+ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
+ *
+ * OpenAPI spec version: 1.0.0
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ *
+ * OpenAPI Generator version: 3.2.0-SNAPSHOT
+ *
+ * Do not edit the class manually.
+ *
+ */
+
+(function(root, factory) {
+  if (typeof define === 'function' && define.amd) {
+    // AMD.
+    define(['expect.js', '../../src/index'], factory);
+  } else if (typeof module === 'object' && module.exports) {
+    // CommonJS-like environments that support module.exports, like Node.
+    factory(require('expect.js'), require('../../src/index'));
+  } else {
+    // Browser globals (root is window)
+    factory(root.expect, root.OpenApiPetstore);
+  }
+}(this, function(expect, OpenApiPetstore) {
+  'use strict';
+
+  var instance;
+
+  beforeEach(function() {
+    instance = new OpenApiPetstore.StringBooleanMap();
+  });
+
+  var getProperty = function(object, getter, property) {
+    // Use getter method if present; otherwise, get the property directly.
+    if (typeof object[getter] === 'function')
+      return object[getter]();
+    else
+      return object[property];
+  }
+
+  var setProperty = function(object, setter, property, value) {
+    // Use setter method if present; otherwise, set the property directly.
+    if (typeof object[setter] === 'function')
+      object[setter](value);
+    else
+      object[property] = value;
+  }
+
+  describe('StringBooleanMap', function() {
+    it('should create an instance of StringBooleanMap', function() {
+      // uncomment below and update the code to test StringBooleanMap
+      //var instance = new OpenApiPetstore.StringBooleanMap();
+      //expect(instance).to.be.a(OpenApiPetstore.StringBooleanMap);
+    });
+
+  });
+
+}));
diff --git a/samples/client/petstore/perl/pom.xml b/samples/client/petstore/perl/pom.xml
index d761d022cd61..e4ad8fbf6009 100644
--- a/samples/client/petstore/perl/pom.xml
+++ b/samples/client/petstore/perl/pom.xml
@@ -1,6 +1,6 @@
 
     4.0.0
-    com.wordnik
+    org.openapitools
     PerlPetstoreClientTests
     pom
     1.0-SNAPSHOT
diff --git a/samples/client/petstore/ruby/.openapi-generator/VERSION b/samples/client/petstore/ruby/.openapi-generator/VERSION
index afa636560641..148b1f35caf8 100644
--- a/samples/client/petstore/ruby/.openapi-generator/VERSION
+++ b/samples/client/petstore/ruby/.openapi-generator/VERSION
@@ -1 +1,5 @@
-4.0.0-SNAPSHOT
\ No newline at end of file
+<<<<<<< HEAD
+4.0.0-SNAPSHOT
+=======
+3.2.1-SNAPSHOT
+>>>>>>> 3.3.x
diff --git a/samples/client/petstore/ruby/lib/petstore.rb b/samples/client/petstore/ruby/lib/petstore.rb
index 4c307fb3672a..d475c45d87f9 100644
--- a/samples/client/petstore/ruby/lib/petstore.rb
+++ b/samples/client/petstore/ruby/lib/petstore.rb
@@ -6,7 +6,11 @@
 OpenAPI spec version: 1.0.0
 
 Generated by: https://openapi-generator.tech
+<<<<<<< HEAD
 OpenAPI Generator version: 4.0.0-SNAPSHOT
+=======
+OpenAPI Generator version: 3.2.1-SNAPSHOT
+>>>>>>> 3.3.x
 
 =end
 
diff --git a/samples/client/petstore/ruby/lib/petstore/api/another_fake_api.rb b/samples/client/petstore/ruby/lib/petstore/api/another_fake_api.rb
index ef152a3bd07a..bb178bf15758 100644
--- a/samples/client/petstore/ruby/lib/petstore/api/another_fake_api.rb
+++ b/samples/client/petstore/ruby/lib/petstore/api/another_fake_api.rb
@@ -6,7 +6,11 @@
 OpenAPI spec version: 1.0.0
 
 Generated by: https://openapi-generator.tech
+<<<<<<< HEAD
 OpenAPI Generator version: 4.0.0-SNAPSHOT
+=======
+OpenAPI Generator version: 3.2.1-SNAPSHOT
+>>>>>>> 3.3.x
 
 =end
 
@@ -73,5 +77,6 @@ module Petstore
       end
       return data, status_code, headers
     end
+
   end
 end
diff --git a/samples/client/petstore/ruby/lib/petstore/api/fake_api.rb b/samples/client/petstore/ruby/lib/petstore/api/fake_api.rb
index 5960fee60cd7..24a911dd4684 100644
--- a/samples/client/petstore/ruby/lib/petstore/api/fake_api.rb
+++ b/samples/client/petstore/ruby/lib/petstore/api/fake_api.rb
@@ -6,7 +6,11 @@
 OpenAPI spec version: 1.0.0
 
 Generated by: https://openapi-generator.tech
+<<<<<<< HEAD
 OpenAPI Generator version: 4.0.0-SNAPSHOT
+=======
+OpenAPI Generator version: 3.2.1-SNAPSHOT
+>>>>>>> 3.3.x
 
 =end
 
@@ -65,6 +69,7 @@ module Petstore
       end
       return data, status_code, headers
     end
+
     # Test serialization of object with outer number type
     # @param [Hash] opts the optional parameters
     # @option opts [OuterComposite] :outer_composite Input composite as post body
@@ -111,6 +116,7 @@ module Petstore
       end
       return data, status_code, headers
     end
+
     # Test serialization of outer number types
     # @param [Hash] opts the optional parameters
     # @option opts [Float] :body Input number as post body
@@ -157,6 +163,7 @@ module Petstore
       end
       return data, status_code, headers
     end
+
     # Test serialization of outer string types
     # @param [Hash] opts the optional parameters
     # @option opts [String] :body Input string as post body
@@ -203,6 +210,7 @@ module Petstore
       end
       return data, status_code, headers
     end
+
     # For this test, the body for this request much reference a schema named `File`.
     # @param file_schema_test_class 
     # @param [Hash] opts the optional parameters
@@ -252,6 +260,7 @@ module Petstore
       end
       return data, status_code, headers
     end
+
     # @param query 
     # @param user 
     # @param [Hash] opts the optional parameters
@@ -306,6 +315,7 @@ module Petstore
       end
       return data, status_code, headers
     end
+
     # To test \"client\" model
     # To test \"client\" model
     # @param client client model
@@ -360,6 +370,7 @@ module Petstore
       end
       return data, status_code, headers
     end
+
     # Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 
     # Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 
     # @param number None
@@ -515,6 +526,7 @@ module Petstore
       end
       return data, status_code, headers
     end
+
     # To test enum parameters
     # To test enum parameters
     # @param [Hash] opts the optional parameters
@@ -608,6 +620,7 @@ module Petstore
       end
       return data, status_code, headers
     end
+
     # test inline additionalProperties
     # @param request_body request body
     # @param [Hash] opts the optional parameters
@@ -657,6 +670,7 @@ module Petstore
       end
       return data, status_code, headers
     end
+
     # test json serialization of form data
     # @param param field1
     # @param param2 field2
@@ -714,5 +728,6 @@ module Petstore
       end
       return data, status_code, headers
     end
+
   end
 end
diff --git a/samples/client/petstore/ruby/lib/petstore/api/fake_classname_tags123_api.rb b/samples/client/petstore/ruby/lib/petstore/api/fake_classname_tags123_api.rb
index fea8fa906358..71f1d6676c89 100644
--- a/samples/client/petstore/ruby/lib/petstore/api/fake_classname_tags123_api.rb
+++ b/samples/client/petstore/ruby/lib/petstore/api/fake_classname_tags123_api.rb
@@ -6,7 +6,11 @@
 OpenAPI spec version: 1.0.0
 
 Generated by: https://openapi-generator.tech
+<<<<<<< HEAD
 OpenAPI Generator version: 4.0.0-SNAPSHOT
+=======
+OpenAPI Generator version: 3.2.1-SNAPSHOT
+>>>>>>> 3.3.x
 
 =end
 
@@ -73,5 +77,6 @@ module Petstore
       end
       return data, status_code, headers
     end
+
   end
 end
diff --git a/samples/client/petstore/ruby/lib/petstore/api/pet_api.rb b/samples/client/petstore/ruby/lib/petstore/api/pet_api.rb
index 7957f5336706..0a1ded34850b 100644
--- a/samples/client/petstore/ruby/lib/petstore/api/pet_api.rb
+++ b/samples/client/petstore/ruby/lib/petstore/api/pet_api.rb
@@ -6,7 +6,11 @@
 OpenAPI spec version: 1.0.0
 
 Generated by: https://openapi-generator.tech
+<<<<<<< HEAD
 OpenAPI Generator version: 4.0.0-SNAPSHOT
+=======
+OpenAPI Generator version: 3.2.1-SNAPSHOT
+>>>>>>> 3.3.x
 
 =end
 
@@ -68,6 +72,7 @@ module Petstore
       end
       return data, status_code, headers
     end
+
     # Deletes a pet
     # @param pet_id Pet id to delete
     # @param [Hash] opts the optional parameters
@@ -118,6 +123,7 @@ module Petstore
       end
       return data, status_code, headers
     end
+
     # Finds Pets by status
     # Multiple status values can be provided with comma separated strings
     # @param status Status values that need to be considered for filter
@@ -171,6 +177,7 @@ module Petstore
       end
       return data, status_code, headers
     end
+
     # Finds Pets by tags
     # Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
     # @param tags Tags to filter by
@@ -224,6 +231,7 @@ module Petstore
       end
       return data, status_code, headers
     end
+
     # Find pet by ID
     # Returns a single pet
     # @param pet_id ID of pet to return
@@ -276,6 +284,7 @@ module Petstore
       end
       return data, status_code, headers
     end
+
     # Update an existing pet
     # @param pet Pet object that needs to be added to the store
     # @param [Hash] opts the optional parameters
@@ -325,6 +334,7 @@ module Petstore
       end
       return data, status_code, headers
     end
+
     # Updates a pet in the store with form data
     # @param pet_id ID of pet that needs to be updated
     # @param [Hash] opts the optional parameters
@@ -380,6 +390,7 @@ module Petstore
       end
       return data, status_code, headers
     end
+
     # uploads an image
     # @param pet_id ID of pet to update
     # @param [Hash] opts the optional parameters
@@ -438,6 +449,7 @@ module Petstore
       end
       return data, status_code, headers
     end
+
     # uploads an image (required)
     # @param pet_id ID of pet to update
     # @param required_file file to upload
@@ -500,5 +512,6 @@ module Petstore
       end
       return data, status_code, headers
     end
+
   end
 end
diff --git a/samples/client/petstore/ruby/lib/petstore/api/store_api.rb b/samples/client/petstore/ruby/lib/petstore/api/store_api.rb
index e330a2addbbe..d2548aa6d344 100644
--- a/samples/client/petstore/ruby/lib/petstore/api/store_api.rb
+++ b/samples/client/petstore/ruby/lib/petstore/api/store_api.rb
@@ -6,7 +6,11 @@
 OpenAPI spec version: 1.0.0
 
 Generated by: https://openapi-generator.tech
+<<<<<<< HEAD
 OpenAPI Generator version: 4.0.0-SNAPSHOT
+=======
+OpenAPI Generator version: 3.2.1-SNAPSHOT
+>>>>>>> 3.3.x
 
 =end
 
@@ -68,6 +72,7 @@ module Petstore
       end
       return data, status_code, headers
     end
+
     # Returns pet inventories by status
     # Returns a map of status codes to quantities
     # @param [Hash] opts the optional parameters
@@ -114,6 +119,7 @@ module Petstore
       end
       return data, status_code, headers
     end
+
     # Find purchase order by ID
     # For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
     # @param order_id ID of pet that needs to be fetched
@@ -174,6 +180,7 @@ module Petstore
       end
       return data, status_code, headers
     end
+
     # Place an order for a pet
     # @param order order placed for purchasing the pet
     # @param [Hash] opts the optional parameters
@@ -224,5 +231,6 @@ module Petstore
       end
       return data, status_code, headers
     end
+
   end
 end
diff --git a/samples/client/petstore/ruby/lib/petstore/api/user_api.rb b/samples/client/petstore/ruby/lib/petstore/api/user_api.rb
index 0dad84c018bf..5d37b6ad1c84 100644
--- a/samples/client/petstore/ruby/lib/petstore/api/user_api.rb
+++ b/samples/client/petstore/ruby/lib/petstore/api/user_api.rb
@@ -6,7 +6,11 @@
 OpenAPI spec version: 1.0.0
 
 Generated by: https://openapi-generator.tech
+<<<<<<< HEAD
 OpenAPI Generator version: 4.0.0-SNAPSHOT
+=======
+OpenAPI Generator version: 3.2.1-SNAPSHOT
+>>>>>>> 3.3.x
 
 =end
 
@@ -68,6 +72,7 @@ module Petstore
       end
       return data, status_code, headers
     end
+
     # Creates list of users with given input array
     # @param user List of user object
     # @param [Hash] opts the optional parameters
@@ -115,6 +120,7 @@ module Petstore
       end
       return data, status_code, headers
     end
+
     # Creates list of users with given input array
     # @param user List of user object
     # @param [Hash] opts the optional parameters
@@ -162,6 +168,7 @@ module Petstore
       end
       return data, status_code, headers
     end
+
     # Delete user
     # This can only be done by the logged in user.
     # @param username The name that needs to be deleted
@@ -211,6 +218,7 @@ module Petstore
       end
       return data, status_code, headers
     end
+
     # Get user by user name
     # @param username The name that needs to be fetched. Use user1 for testing.
     # @param [Hash] opts the optional parameters
@@ -261,6 +269,7 @@ module Petstore
       end
       return data, status_code, headers
     end
+
     # Logs user into the system
     # @param username The user name for login
     # @param password The password for login in clear text
@@ -319,6 +328,7 @@ module Petstore
       end
       return data, status_code, headers
     end
+
     # Logs out current logged in user session
     # @param [Hash] opts the optional parameters
     # @return [nil]
@@ -360,6 +370,7 @@ module Petstore
       end
       return data, status_code, headers
     end
+
     # Updated user
     # This can only be done by the logged in user.
     # @param username name that need to be deleted
@@ -415,5 +426,6 @@ module Petstore
       end
       return data, status_code, headers
     end
+
   end
 end
diff --git a/samples/client/petstore/ruby/lib/petstore/api_client.rb b/samples/client/petstore/ruby/lib/petstore/api_client.rb
index 8de2c60ca7bd..de44b515a4d4 100644
--- a/samples/client/petstore/ruby/lib/petstore/api_client.rb
+++ b/samples/client/petstore/ruby/lib/petstore/api_client.rb
@@ -6,7 +6,11 @@
 OpenAPI spec version: 1.0.0
 
 Generated by: https://openapi-generator.tech
+<<<<<<< HEAD
 OpenAPI Generator version: 4.0.0-SNAPSHOT
+=======
+OpenAPI Generator version: 3.2.1-SNAPSHOT
+>>>>>>> 3.3.x
 
 =end
 
diff --git a/samples/client/petstore/ruby/lib/petstore/api_error.rb b/samples/client/petstore/ruby/lib/petstore/api_error.rb
index 66bf1edb437a..a00c3ca3063d 100644
--- a/samples/client/petstore/ruby/lib/petstore/api_error.rb
+++ b/samples/client/petstore/ruby/lib/petstore/api_error.rb
@@ -6,7 +6,11 @@
 OpenAPI spec version: 1.0.0
 
 Generated by: https://openapi-generator.tech
+<<<<<<< HEAD
 OpenAPI Generator version: 4.0.0-SNAPSHOT
+=======
+OpenAPI Generator version: 3.2.1-SNAPSHOT
+>>>>>>> 3.3.x
 
 =end
 
diff --git a/samples/client/petstore/ruby/lib/petstore/configuration.rb b/samples/client/petstore/ruby/lib/petstore/configuration.rb
index 40af7f1a2954..78b61c72fe9d 100644
--- a/samples/client/petstore/ruby/lib/petstore/configuration.rb
+++ b/samples/client/petstore/ruby/lib/petstore/configuration.rb
@@ -6,7 +6,11 @@
 OpenAPI spec version: 1.0.0
 
 Generated by: https://openapi-generator.tech
+<<<<<<< HEAD
 OpenAPI Generator version: 4.0.0-SNAPSHOT
+=======
+OpenAPI Generator version: 3.2.1-SNAPSHOT
+>>>>>>> 3.3.x
 
 =end
 
diff --git a/samples/client/petstore/ruby/lib/petstore/models/additional_properties_class.rb b/samples/client/petstore/ruby/lib/petstore/models/additional_properties_class.rb
index 14bbd6ce1bbd..1139acf7f0c3 100644
--- a/samples/client/petstore/ruby/lib/petstore/models/additional_properties_class.rb
+++ b/samples/client/petstore/ruby/lib/petstore/models/additional_properties_class.rb
@@ -6,7 +6,11 @@
 OpenAPI spec version: 1.0.0
 
 Generated by: https://openapi-generator.tech
+<<<<<<< HEAD
 OpenAPI Generator version: 4.0.0-SNAPSHOT
+=======
+OpenAPI Generator version: 3.2.1-SNAPSHOT
+>>>>>>> 3.3.x
 
 =end
 
diff --git a/samples/client/petstore/ruby/lib/petstore/models/animal.rb b/samples/client/petstore/ruby/lib/petstore/models/animal.rb
index bf0434c32f64..0bba71dd7d44 100644
--- a/samples/client/petstore/ruby/lib/petstore/models/animal.rb
+++ b/samples/client/petstore/ruby/lib/petstore/models/animal.rb
@@ -6,7 +6,11 @@
 OpenAPI spec version: 1.0.0
 
 Generated by: https://openapi-generator.tech
+<<<<<<< HEAD
 OpenAPI Generator version: 4.0.0-SNAPSHOT
+=======
+OpenAPI Generator version: 3.2.1-SNAPSHOT
+>>>>>>> 3.3.x
 
 =end
 
diff --git a/samples/client/petstore/ruby/lib/petstore/models/animal_farm.rb b/samples/client/petstore/ruby/lib/petstore/models/animal_farm.rb
index 03c705c71d6a..c0df4b4dde5f 100644
--- a/samples/client/petstore/ruby/lib/petstore/models/animal_farm.rb
+++ b/samples/client/petstore/ruby/lib/petstore/models/animal_farm.rb
@@ -6,7 +6,11 @@
 OpenAPI spec version: 1.0.0
 
 Generated by: https://openapi-generator.tech
+<<<<<<< HEAD
 OpenAPI Generator version: 4.0.0-SNAPSHOT
+=======
+OpenAPI Generator version: 3.2.1-SNAPSHOT
+>>>>>>> 3.3.x
 
 =end
 
diff --git a/samples/client/petstore/ruby/lib/petstore/models/api_response.rb b/samples/client/petstore/ruby/lib/petstore/models/api_response.rb
index 98cd00426ec3..717446b8a59a 100644
--- a/samples/client/petstore/ruby/lib/petstore/models/api_response.rb
+++ b/samples/client/petstore/ruby/lib/petstore/models/api_response.rb
@@ -6,7 +6,11 @@
 OpenAPI spec version: 1.0.0
 
 Generated by: https://openapi-generator.tech
+<<<<<<< HEAD
 OpenAPI Generator version: 4.0.0-SNAPSHOT
+=======
+OpenAPI Generator version: 3.2.1-SNAPSHOT
+>>>>>>> 3.3.x
 
 =end
 
diff --git a/samples/client/petstore/ruby/lib/petstore/models/array_of_array_of_number_only.rb b/samples/client/petstore/ruby/lib/petstore/models/array_of_array_of_number_only.rb
index 997b7d76013c..dc302ed5a5c7 100644
--- a/samples/client/petstore/ruby/lib/petstore/models/array_of_array_of_number_only.rb
+++ b/samples/client/petstore/ruby/lib/petstore/models/array_of_array_of_number_only.rb
@@ -6,7 +6,11 @@
 OpenAPI spec version: 1.0.0
 
 Generated by: https://openapi-generator.tech
+<<<<<<< HEAD
 OpenAPI Generator version: 4.0.0-SNAPSHOT
+=======
+OpenAPI Generator version: 3.2.1-SNAPSHOT
+>>>>>>> 3.3.x
 
 =end
 
diff --git a/samples/client/petstore/ruby/lib/petstore/models/array_of_number_only.rb b/samples/client/petstore/ruby/lib/petstore/models/array_of_number_only.rb
index c5305f99ed98..e8a29bd94a4d 100644
--- a/samples/client/petstore/ruby/lib/petstore/models/array_of_number_only.rb
+++ b/samples/client/petstore/ruby/lib/petstore/models/array_of_number_only.rb
@@ -6,7 +6,11 @@
 OpenAPI spec version: 1.0.0
 
 Generated by: https://openapi-generator.tech
+<<<<<<< HEAD
 OpenAPI Generator version: 4.0.0-SNAPSHOT
+=======
+OpenAPI Generator version: 3.2.1-SNAPSHOT
+>>>>>>> 3.3.x
 
 =end
 
diff --git a/samples/client/petstore/ruby/lib/petstore/models/array_test.rb b/samples/client/petstore/ruby/lib/petstore/models/array_test.rb
index 064ba67475d9..aa00919bea26 100644
--- a/samples/client/petstore/ruby/lib/petstore/models/array_test.rb
+++ b/samples/client/petstore/ruby/lib/petstore/models/array_test.rb
@@ -6,7 +6,11 @@
 OpenAPI spec version: 1.0.0
 
 Generated by: https://openapi-generator.tech
+<<<<<<< HEAD
 OpenAPI Generator version: 4.0.0-SNAPSHOT
+=======
+OpenAPI Generator version: 3.2.1-SNAPSHOT
+>>>>>>> 3.3.x
 
 =end
 
diff --git a/samples/client/petstore/ruby/lib/petstore/models/capitalization.rb b/samples/client/petstore/ruby/lib/petstore/models/capitalization.rb
index 67131328f2da..fd4dc2aa8164 100644
--- a/samples/client/petstore/ruby/lib/petstore/models/capitalization.rb
+++ b/samples/client/petstore/ruby/lib/petstore/models/capitalization.rb
@@ -6,7 +6,11 @@
 OpenAPI spec version: 1.0.0
 
 Generated by: https://openapi-generator.tech
+<<<<<<< HEAD
 OpenAPI Generator version: 4.0.0-SNAPSHOT
+=======
+OpenAPI Generator version: 3.2.1-SNAPSHOT
+>>>>>>> 3.3.x
 
 =end
 
diff --git a/samples/client/petstore/ruby/lib/petstore/models/cat.rb b/samples/client/petstore/ruby/lib/petstore/models/cat.rb
index d2cb1452eef9..b704faa85d7d 100644
--- a/samples/client/petstore/ruby/lib/petstore/models/cat.rb
+++ b/samples/client/petstore/ruby/lib/petstore/models/cat.rb
@@ -6,7 +6,11 @@
 OpenAPI spec version: 1.0.0
 
 Generated by: https://openapi-generator.tech
+<<<<<<< HEAD
 OpenAPI Generator version: 4.0.0-SNAPSHOT
+=======
+OpenAPI Generator version: 3.2.1-SNAPSHOT
+>>>>>>> 3.3.x
 
 =end
 
diff --git a/samples/client/petstore/ruby/lib/petstore/models/category.rb b/samples/client/petstore/ruby/lib/petstore/models/category.rb
index 77d814448774..b8527ad9e4e5 100644
--- a/samples/client/petstore/ruby/lib/petstore/models/category.rb
+++ b/samples/client/petstore/ruby/lib/petstore/models/category.rb
@@ -6,7 +6,11 @@
 OpenAPI spec version: 1.0.0
 
 Generated by: https://openapi-generator.tech
+<<<<<<< HEAD
 OpenAPI Generator version: 4.0.0-SNAPSHOT
+=======
+OpenAPI Generator version: 3.2.1-SNAPSHOT
+>>>>>>> 3.3.x
 
 =end
 
diff --git a/samples/client/petstore/ruby/lib/petstore/models/class_model.rb b/samples/client/petstore/ruby/lib/petstore/models/class_model.rb
index f946ed55be0f..223a57a9bd41 100644
--- a/samples/client/petstore/ruby/lib/petstore/models/class_model.rb
+++ b/samples/client/petstore/ruby/lib/petstore/models/class_model.rb
@@ -6,7 +6,11 @@
 OpenAPI spec version: 1.0.0
 
 Generated by: https://openapi-generator.tech
+<<<<<<< HEAD
 OpenAPI Generator version: 4.0.0-SNAPSHOT
+=======
+OpenAPI Generator version: 3.2.1-SNAPSHOT
+>>>>>>> 3.3.x
 
 =end
 
diff --git a/samples/client/petstore/ruby/lib/petstore/models/client.rb b/samples/client/petstore/ruby/lib/petstore/models/client.rb
index eb11c6e587ea..67d565396bab 100644
--- a/samples/client/petstore/ruby/lib/petstore/models/client.rb
+++ b/samples/client/petstore/ruby/lib/petstore/models/client.rb
@@ -6,7 +6,11 @@
 OpenAPI spec version: 1.0.0
 
 Generated by: https://openapi-generator.tech
+<<<<<<< HEAD
 OpenAPI Generator version: 4.0.0-SNAPSHOT
+=======
+OpenAPI Generator version: 3.2.1-SNAPSHOT
+>>>>>>> 3.3.x
 
 =end
 
diff --git a/samples/client/petstore/ruby/lib/petstore/models/dog.rb b/samples/client/petstore/ruby/lib/petstore/models/dog.rb
index 49a8866a3b9e..e46fd019e7b8 100644
--- a/samples/client/petstore/ruby/lib/petstore/models/dog.rb
+++ b/samples/client/petstore/ruby/lib/petstore/models/dog.rb
@@ -6,7 +6,11 @@
 OpenAPI spec version: 1.0.0
 
 Generated by: https://openapi-generator.tech
+<<<<<<< HEAD
 OpenAPI Generator version: 4.0.0-SNAPSHOT
+=======
+OpenAPI Generator version: 3.2.1-SNAPSHOT
+>>>>>>> 3.3.x
 
 =end
 
diff --git a/samples/client/petstore/ruby/lib/petstore/models/enum_arrays.rb b/samples/client/petstore/ruby/lib/petstore/models/enum_arrays.rb
index 16a31ed64371..779d24a3bf90 100644
--- a/samples/client/petstore/ruby/lib/petstore/models/enum_arrays.rb
+++ b/samples/client/petstore/ruby/lib/petstore/models/enum_arrays.rb
@@ -6,7 +6,11 @@
 OpenAPI spec version: 1.0.0
 
 Generated by: https://openapi-generator.tech
+<<<<<<< HEAD
 OpenAPI Generator version: 4.0.0-SNAPSHOT
+=======
+OpenAPI Generator version: 3.2.1-SNAPSHOT
+>>>>>>> 3.3.x
 
 =end
 
diff --git a/samples/client/petstore/ruby/lib/petstore/models/enum_class.rb b/samples/client/petstore/ruby/lib/petstore/models/enum_class.rb
index a0b472f3c168..fc94005f5957 100644
--- a/samples/client/petstore/ruby/lib/petstore/models/enum_class.rb
+++ b/samples/client/petstore/ruby/lib/petstore/models/enum_class.rb
@@ -6,7 +6,11 @@
 OpenAPI spec version: 1.0.0
 
 Generated by: https://openapi-generator.tech
+<<<<<<< HEAD
 OpenAPI Generator version: 4.0.0-SNAPSHOT
+=======
+OpenAPI Generator version: 3.2.1-SNAPSHOT
+>>>>>>> 3.3.x
 
 =end
 
diff --git a/samples/client/petstore/ruby/lib/petstore/models/enum_test.rb b/samples/client/petstore/ruby/lib/petstore/models/enum_test.rb
index d0828881c036..1304d373ddef 100644
--- a/samples/client/petstore/ruby/lib/petstore/models/enum_test.rb
+++ b/samples/client/petstore/ruby/lib/petstore/models/enum_test.rb
@@ -6,7 +6,11 @@
 OpenAPI spec version: 1.0.0
 
 Generated by: https://openapi-generator.tech
+<<<<<<< HEAD
 OpenAPI Generator version: 4.0.0-SNAPSHOT
+=======
+OpenAPI Generator version: 3.2.1-SNAPSHOT
+>>>>>>> 3.3.x
 
 =end
 
diff --git a/samples/client/petstore/ruby/lib/petstore/models/file.rb b/samples/client/petstore/ruby/lib/petstore/models/file.rb
index 9a242c87642e..52e2e2124550 100644
--- a/samples/client/petstore/ruby/lib/petstore/models/file.rb
+++ b/samples/client/petstore/ruby/lib/petstore/models/file.rb
@@ -6,7 +6,11 @@
 OpenAPI spec version: 1.0.0
 
 Generated by: https://openapi-generator.tech
+<<<<<<< HEAD
 OpenAPI Generator version: 4.0.0-SNAPSHOT
+=======
+OpenAPI Generator version: 3.2.1-SNAPSHOT
+>>>>>>> 3.3.x
 
 =end
 
diff --git a/samples/client/petstore/ruby/lib/petstore/models/file_schema_test_class.rb b/samples/client/petstore/ruby/lib/petstore/models/file_schema_test_class.rb
index 15b1abc488aa..3f3265d1a9d2 100644
--- a/samples/client/petstore/ruby/lib/petstore/models/file_schema_test_class.rb
+++ b/samples/client/petstore/ruby/lib/petstore/models/file_schema_test_class.rb
@@ -6,7 +6,11 @@
 OpenAPI spec version: 1.0.0
 
 Generated by: https://openapi-generator.tech
+<<<<<<< HEAD
 OpenAPI Generator version: 4.0.0-SNAPSHOT
+=======
+OpenAPI Generator version: 3.2.1-SNAPSHOT
+>>>>>>> 3.3.x
 
 =end
 
diff --git a/samples/client/petstore/ruby/lib/petstore/models/format_test.rb b/samples/client/petstore/ruby/lib/petstore/models/format_test.rb
index 4dff547a8515..6a6d0a4dd5e7 100644
--- a/samples/client/petstore/ruby/lib/petstore/models/format_test.rb
+++ b/samples/client/petstore/ruby/lib/petstore/models/format_test.rb
@@ -6,7 +6,11 @@
 OpenAPI spec version: 1.0.0
 
 Generated by: https://openapi-generator.tech
+<<<<<<< HEAD
 OpenAPI Generator version: 4.0.0-SNAPSHOT
+=======
+OpenAPI Generator version: 3.2.1-SNAPSHOT
+>>>>>>> 3.3.x
 
 =end
 
diff --git a/samples/client/petstore/ruby/lib/petstore/models/has_only_read_only.rb b/samples/client/petstore/ruby/lib/petstore/models/has_only_read_only.rb
index 2a34807da795..7f3be970892c 100644
--- a/samples/client/petstore/ruby/lib/petstore/models/has_only_read_only.rb
+++ b/samples/client/petstore/ruby/lib/petstore/models/has_only_read_only.rb
@@ -6,7 +6,11 @@
 OpenAPI spec version: 1.0.0
 
 Generated by: https://openapi-generator.tech
+<<<<<<< HEAD
 OpenAPI Generator version: 4.0.0-SNAPSHOT
+=======
+OpenAPI Generator version: 3.2.1-SNAPSHOT
+>>>>>>> 3.3.x
 
 =end
 
diff --git a/samples/client/petstore/ruby/lib/petstore/models/list.rb b/samples/client/petstore/ruby/lib/petstore/models/list.rb
index 5edff2ea0145..740e7b04f5ef 100644
--- a/samples/client/petstore/ruby/lib/petstore/models/list.rb
+++ b/samples/client/petstore/ruby/lib/petstore/models/list.rb
@@ -6,7 +6,11 @@
 OpenAPI spec version: 1.0.0
 
 Generated by: https://openapi-generator.tech
+<<<<<<< HEAD
 OpenAPI Generator version: 4.0.0-SNAPSHOT
+=======
+OpenAPI Generator version: 3.2.1-SNAPSHOT
+>>>>>>> 3.3.x
 
 =end
 
diff --git a/samples/client/petstore/ruby/lib/petstore/models/map_test.rb b/samples/client/petstore/ruby/lib/petstore/models/map_test.rb
index f546c9dc320b..2b1d8d8e03de 100644
--- a/samples/client/petstore/ruby/lib/petstore/models/map_test.rb
+++ b/samples/client/petstore/ruby/lib/petstore/models/map_test.rb
@@ -6,7 +6,11 @@
 OpenAPI spec version: 1.0.0
 
 Generated by: https://openapi-generator.tech
+<<<<<<< HEAD
 OpenAPI Generator version: 4.0.0-SNAPSHOT
+=======
+OpenAPI Generator version: 3.2.1-SNAPSHOT
+>>>>>>> 3.3.x
 
 =end
 
diff --git a/samples/client/petstore/ruby/lib/petstore/models/mixed_properties_and_additional_properties_class.rb b/samples/client/petstore/ruby/lib/petstore/models/mixed_properties_and_additional_properties_class.rb
index b65eeb0be558..7a0d3b4cfec4 100644
--- a/samples/client/petstore/ruby/lib/petstore/models/mixed_properties_and_additional_properties_class.rb
+++ b/samples/client/petstore/ruby/lib/petstore/models/mixed_properties_and_additional_properties_class.rb
@@ -6,7 +6,11 @@
 OpenAPI spec version: 1.0.0
 
 Generated by: https://openapi-generator.tech
+<<<<<<< HEAD
 OpenAPI Generator version: 4.0.0-SNAPSHOT
+=======
+OpenAPI Generator version: 3.2.1-SNAPSHOT
+>>>>>>> 3.3.x
 
 =end
 
diff --git a/samples/client/petstore/ruby/lib/petstore/models/model200_response.rb b/samples/client/petstore/ruby/lib/petstore/models/model200_response.rb
index 52dd2ab76cd5..d50ef325c4d8 100644
--- a/samples/client/petstore/ruby/lib/petstore/models/model200_response.rb
+++ b/samples/client/petstore/ruby/lib/petstore/models/model200_response.rb
@@ -6,7 +6,11 @@
 OpenAPI spec version: 1.0.0
 
 Generated by: https://openapi-generator.tech
+<<<<<<< HEAD
 OpenAPI Generator version: 4.0.0-SNAPSHOT
+=======
+OpenAPI Generator version: 3.2.1-SNAPSHOT
+>>>>>>> 3.3.x
 
 =end
 
diff --git a/samples/client/petstore/ruby/lib/petstore/models/model_return.rb b/samples/client/petstore/ruby/lib/petstore/models/model_return.rb
index ab24fe326f87..48728d4d9f39 100644
--- a/samples/client/petstore/ruby/lib/petstore/models/model_return.rb
+++ b/samples/client/petstore/ruby/lib/petstore/models/model_return.rb
@@ -6,7 +6,11 @@
 OpenAPI spec version: 1.0.0
 
 Generated by: https://openapi-generator.tech
+<<<<<<< HEAD
 OpenAPI Generator version: 4.0.0-SNAPSHOT
+=======
+OpenAPI Generator version: 3.2.1-SNAPSHOT
+>>>>>>> 3.3.x
 
 =end
 
diff --git a/samples/client/petstore/ruby/lib/petstore/models/name.rb b/samples/client/petstore/ruby/lib/petstore/models/name.rb
index 75aeab463e08..e79dc42f54ef 100644
--- a/samples/client/petstore/ruby/lib/petstore/models/name.rb
+++ b/samples/client/petstore/ruby/lib/petstore/models/name.rb
@@ -6,7 +6,11 @@
 OpenAPI spec version: 1.0.0
 
 Generated by: https://openapi-generator.tech
+<<<<<<< HEAD
 OpenAPI Generator version: 4.0.0-SNAPSHOT
+=======
+OpenAPI Generator version: 3.2.1-SNAPSHOT
+>>>>>>> 3.3.x
 
 =end
 
diff --git a/samples/client/petstore/ruby/lib/petstore/models/number_only.rb b/samples/client/petstore/ruby/lib/petstore/models/number_only.rb
index e5d95d4d2e6b..b24185b341ec 100644
--- a/samples/client/petstore/ruby/lib/petstore/models/number_only.rb
+++ b/samples/client/petstore/ruby/lib/petstore/models/number_only.rb
@@ -6,7 +6,11 @@
 OpenAPI spec version: 1.0.0
 
 Generated by: https://openapi-generator.tech
+<<<<<<< HEAD
 OpenAPI Generator version: 4.0.0-SNAPSHOT
+=======
+OpenAPI Generator version: 3.2.1-SNAPSHOT
+>>>>>>> 3.3.x
 
 =end
 
diff --git a/samples/client/petstore/ruby/lib/petstore/models/order.rb b/samples/client/petstore/ruby/lib/petstore/models/order.rb
index 5c47cda94c5b..0716ae390565 100644
--- a/samples/client/petstore/ruby/lib/petstore/models/order.rb
+++ b/samples/client/petstore/ruby/lib/petstore/models/order.rb
@@ -6,7 +6,11 @@
 OpenAPI spec version: 1.0.0
 
 Generated by: https://openapi-generator.tech
+<<<<<<< HEAD
 OpenAPI Generator version: 4.0.0-SNAPSHOT
+=======
+OpenAPI Generator version: 3.2.1-SNAPSHOT
+>>>>>>> 3.3.x
 
 =end
 
diff --git a/samples/client/petstore/ruby/lib/petstore/models/outer_composite.rb b/samples/client/petstore/ruby/lib/petstore/models/outer_composite.rb
index 5098b8e8cd3e..a45c31d9dbeb 100644
--- a/samples/client/petstore/ruby/lib/petstore/models/outer_composite.rb
+++ b/samples/client/petstore/ruby/lib/petstore/models/outer_composite.rb
@@ -6,7 +6,11 @@
 OpenAPI spec version: 1.0.0
 
 Generated by: https://openapi-generator.tech
+<<<<<<< HEAD
 OpenAPI Generator version: 4.0.0-SNAPSHOT
+=======
+OpenAPI Generator version: 3.2.1-SNAPSHOT
+>>>>>>> 3.3.x
 
 =end
 
diff --git a/samples/client/petstore/ruby/lib/petstore/models/outer_enum.rb b/samples/client/petstore/ruby/lib/petstore/models/outer_enum.rb
index cec4c0ef8307..bf11738b3ddf 100644
--- a/samples/client/petstore/ruby/lib/petstore/models/outer_enum.rb
+++ b/samples/client/petstore/ruby/lib/petstore/models/outer_enum.rb
@@ -6,7 +6,11 @@
 OpenAPI spec version: 1.0.0
 
 Generated by: https://openapi-generator.tech
+<<<<<<< HEAD
 OpenAPI Generator version: 4.0.0-SNAPSHOT
+=======
+OpenAPI Generator version: 3.2.1-SNAPSHOT
+>>>>>>> 3.3.x
 
 =end
 
diff --git a/samples/client/petstore/ruby/lib/petstore/models/pet.rb b/samples/client/petstore/ruby/lib/petstore/models/pet.rb
index 653c84dcc5cb..074f60f39c87 100644
--- a/samples/client/petstore/ruby/lib/petstore/models/pet.rb
+++ b/samples/client/petstore/ruby/lib/petstore/models/pet.rb
@@ -6,7 +6,11 @@
 OpenAPI spec version: 1.0.0
 
 Generated by: https://openapi-generator.tech
+<<<<<<< HEAD
 OpenAPI Generator version: 4.0.0-SNAPSHOT
+=======
+OpenAPI Generator version: 3.2.1-SNAPSHOT
+>>>>>>> 3.3.x
 
 =end
 
diff --git a/samples/client/petstore/ruby/lib/petstore/models/read_only_first.rb b/samples/client/petstore/ruby/lib/petstore/models/read_only_first.rb
index 45bd488b6d0f..e9a292a0a025 100644
--- a/samples/client/petstore/ruby/lib/petstore/models/read_only_first.rb
+++ b/samples/client/petstore/ruby/lib/petstore/models/read_only_first.rb
@@ -6,7 +6,11 @@
 OpenAPI spec version: 1.0.0
 
 Generated by: https://openapi-generator.tech
+<<<<<<< HEAD
 OpenAPI Generator version: 4.0.0-SNAPSHOT
+=======
+OpenAPI Generator version: 3.2.1-SNAPSHOT
+>>>>>>> 3.3.x
 
 =end
 
diff --git a/samples/client/petstore/ruby/lib/petstore/models/special_model_name.rb b/samples/client/petstore/ruby/lib/petstore/models/special_model_name.rb
index 5e6428da39ec..6271bf21df16 100644
--- a/samples/client/petstore/ruby/lib/petstore/models/special_model_name.rb
+++ b/samples/client/petstore/ruby/lib/petstore/models/special_model_name.rb
@@ -6,7 +6,11 @@
 OpenAPI spec version: 1.0.0
 
 Generated by: https://openapi-generator.tech
+<<<<<<< HEAD
 OpenAPI Generator version: 4.0.0-SNAPSHOT
+=======
+OpenAPI Generator version: 3.2.1-SNAPSHOT
+>>>>>>> 3.3.x
 
 =end
 
diff --git a/samples/client/petstore/ruby/lib/petstore/models/string_boolean_map.rb b/samples/client/petstore/ruby/lib/petstore/models/string_boolean_map.rb
index f6cee5382895..b6460e41ff13 100644
--- a/samples/client/petstore/ruby/lib/petstore/models/string_boolean_map.rb
+++ b/samples/client/petstore/ruby/lib/petstore/models/string_boolean_map.rb
@@ -6,7 +6,11 @@
 OpenAPI spec version: 1.0.0
 
 Generated by: https://openapi-generator.tech
+<<<<<<< HEAD
 OpenAPI Generator version: 4.0.0-SNAPSHOT
+=======
+OpenAPI Generator version: 3.2.1-SNAPSHOT
+>>>>>>> 3.3.x
 
 =end
 
diff --git a/samples/client/petstore/ruby/lib/petstore/models/tag.rb b/samples/client/petstore/ruby/lib/petstore/models/tag.rb
index 8361c631d481..b82674994430 100644
--- a/samples/client/petstore/ruby/lib/petstore/models/tag.rb
+++ b/samples/client/petstore/ruby/lib/petstore/models/tag.rb
@@ -6,7 +6,11 @@
 OpenAPI spec version: 1.0.0
 
 Generated by: https://openapi-generator.tech
+<<<<<<< HEAD
 OpenAPI Generator version: 4.0.0-SNAPSHOT
+=======
+OpenAPI Generator version: 3.2.1-SNAPSHOT
+>>>>>>> 3.3.x
 
 =end
 
diff --git a/samples/client/petstore/ruby/lib/petstore/models/user.rb b/samples/client/petstore/ruby/lib/petstore/models/user.rb
index 23aeb5d3d334..5056cce7030f 100644
--- a/samples/client/petstore/ruby/lib/petstore/models/user.rb
+++ b/samples/client/petstore/ruby/lib/petstore/models/user.rb
@@ -6,7 +6,11 @@
 OpenAPI spec version: 1.0.0
 
 Generated by: https://openapi-generator.tech
+<<<<<<< HEAD
 OpenAPI Generator version: 4.0.0-SNAPSHOT
+=======
+OpenAPI Generator version: 3.2.1-SNAPSHOT
+>>>>>>> 3.3.x
 
 =end
 
diff --git a/samples/client/petstore/ruby/lib/petstore/version.rb b/samples/client/petstore/ruby/lib/petstore/version.rb
index 44c8c1492b3b..0426a5182e00 100644
--- a/samples/client/petstore/ruby/lib/petstore/version.rb
+++ b/samples/client/petstore/ruby/lib/petstore/version.rb
@@ -6,7 +6,11 @@
 OpenAPI spec version: 1.0.0
 
 Generated by: https://openapi-generator.tech
+<<<<<<< HEAD
 OpenAPI Generator version: 4.0.0-SNAPSHOT
+=======
+OpenAPI Generator version: 3.2.1-SNAPSHOT
+>>>>>>> 3.3.x
 
 =end
 
diff --git a/samples/client/petstore/ruby/petstore.gemspec b/samples/client/petstore/ruby/petstore.gemspec
index 77629f8f038e..5259937d364c 100644
--- a/samples/client/petstore/ruby/petstore.gemspec
+++ b/samples/client/petstore/ruby/petstore.gemspec
@@ -8,7 +8,11 @@
 OpenAPI spec version: 1.0.0
 
 Generated by: https://openapi-generator.tech
+<<<<<<< HEAD
 OpenAPI Generator version: 4.0.0-SNAPSHOT
+=======
+OpenAPI Generator version: 3.2.1-SNAPSHOT
+>>>>>>> 3.3.x
 
 =end
 
diff --git a/samples/client/petstore/ruby/pom.xml b/samples/client/petstore/ruby/pom.xml
index 2e720e226b22..f4c621fca53f 100644
--- a/samples/client/petstore/ruby/pom.xml
+++ b/samples/client/petstore/ruby/pom.xml
@@ -1,6 +1,6 @@
 
     4.0.0
-    com.wordnik
+    org.openapitools
     RubyPetstoreClientTests
     pom
     1.0-SNAPSHOT
diff --git a/samples/client/petstore/scala-akka/pom.xml b/samples/client/petstore/scala-akka/pom.xml
index 264dad8d1a58..20bf1d9209f4 100644
--- a/samples/client/petstore/scala-akka/pom.xml
+++ b/samples/client/petstore/scala-akka/pom.xml
@@ -240,4 +240,4 @@
       
     
   
-
\ No newline at end of file
+
diff --git a/samples/client/petstore/typescript-angular-v2/npm/pom.xml b/samples/client/petstore/typescript-angular-v2/npm/pom.xml
index bbdce5d5da9b..813fbfca88ea 100644
--- a/samples/client/petstore/typescript-angular-v2/npm/pom.xml
+++ b/samples/client/petstore/typescript-angular-v2/npm/pom.xml
@@ -1,6 +1,6 @@
 
     4.0.0
-    com.wordnik
+    org.openapitools
     TSAngular2PestoreClientTests
     pom
     1.0-SNAPSHOT
diff --git a/samples/client/petstore/typescript-angular-v4.3/npm/pom.xml b/samples/client/petstore/typescript-angular-v4.3/npm/pom.xml
index fdc35dd82912..5d48e6a3e731 100644
--- a/samples/client/petstore/typescript-angular-v4.3/npm/pom.xml
+++ b/samples/client/petstore/typescript-angular-v4.3/npm/pom.xml
@@ -1,6 +1,6 @@
 
     4.0.0
-    com.wordnik
+    org.openapitools
     TSAngular43PestoreClientTests
     pom
     1.0-SNAPSHOT
diff --git a/samples/client/petstore/typescript-angular-v4/npm/pom.xml b/samples/client/petstore/typescript-angular-v4/npm/pom.xml
index 7a610e08f6ef..6fb9db534599 100644
--- a/samples/client/petstore/typescript-angular-v4/npm/pom.xml
+++ b/samples/client/petstore/typescript-angular-v4/npm/pom.xml
@@ -1,6 +1,6 @@
 
     4.0.0
-    com.wordnik
+    org.openapitools
     TSAngular4PestoreClientTests
     pom
     1.0-SNAPSHOT
diff --git a/samples/client/petstore/typescript-angular-v6-provided-in-root/pom.xml b/samples/client/petstore/typescript-angular-v6-provided-in-root/pom.xml
index 3848ddf87c01..ee3bb1ecffd0 100644
--- a/samples/client/petstore/typescript-angular-v6-provided-in-root/pom.xml
+++ b/samples/client/petstore/typescript-angular-v6-provided-in-root/pom.xml
@@ -1,6 +1,6 @@
 
     4.0.0
-    com.wordnik
+    org.openapitools
     TypeScriptAngular6PestoreClientTests
     pom
     1.0-SNAPSHOT
diff --git a/samples/client/petstore/typescript-angularjs/pom.xml b/samples/client/petstore/typescript-angularjs/pom.xml
index 6072fc71140f..e334e2d5cadc 100644
--- a/samples/client/petstore/typescript-angularjs/pom.xml
+++ b/samples/client/petstore/typescript-angularjs/pom.xml
@@ -1,6 +1,6 @@
 
     4.0.0
-    com.wordnik
+    org.openapitools
     TypeScriptAngularPestoreClientTests
     pom
     1.0-SNAPSHOT
diff --git a/samples/client/petstore/typescript-fetch/builds/default/pom.xml b/samples/client/petstore/typescript-fetch/builds/default/pom.xml
index 6b36b1d83c46..b40b83a0c751 100644
--- a/samples/client/petstore/typescript-fetch/builds/default/pom.xml
+++ b/samples/client/petstore/typescript-fetch/builds/default/pom.xml
@@ -1,6 +1,6 @@
 
     4.0.0
-    com.wordnik
+    org.openapitools
     TypeScriptAngularBuildPestoreClientTests
     pom
     1.0-SNAPSHOT
diff --git a/samples/client/petstore/typescript-fetch/builds/es6-target/pom.xml b/samples/client/petstore/typescript-fetch/builds/es6-target/pom.xml
index 8b8e6052761e..db6dfdfeb6aa 100644
--- a/samples/client/petstore/typescript-fetch/builds/es6-target/pom.xml
+++ b/samples/client/petstore/typescript-fetch/builds/es6-target/pom.xml
@@ -1,6 +1,6 @@
 
     4.0.0
-    com.wordnik
+    org.openapitools
     TypeScriptAngularBuildES6PestoreClientTests
     pom
     1.0-SNAPSHOT
diff --git a/samples/client/petstore/typescript-fetch/builds/with-npm-version/pom.xml b/samples/client/petstore/typescript-fetch/builds/with-npm-version/pom.xml
index b7725ec2309e..339fe7665186 100644
--- a/samples/client/petstore/typescript-fetch/builds/with-npm-version/pom.xml
+++ b/samples/client/petstore/typescript-fetch/builds/with-npm-version/pom.xml
@@ -1,6 +1,6 @@
 
     4.0.0
-    com.wordnik
+    org.openapitools
     TypeScriptAngularBuildWithNPMVersionPestoreClientTests
     pom
     1.0-SNAPSHOT
diff --git a/samples/client/petstore/typescript-fetch/tests/default/pom.xml b/samples/client/petstore/typescript-fetch/tests/default/pom.xml
index 5e76c65dfede..92063ea7bcc5 100644
--- a/samples/client/petstore/typescript-fetch/tests/default/pom.xml
+++ b/samples/client/petstore/typescript-fetch/tests/default/pom.xml
@@ -1,6 +1,6 @@
 
     4.0.0
-    com.wordnik
+    org.openapitools
     TypeScriptFetchPestoreClientTests
     pom
     1.0-SNAPSHOT
diff --git a/samples/client/petstore/typescript-node/default/model/models.ts b/samples/client/petstore/typescript-node/default/model/models.ts
index 8ed47b194d73..7b0dc89cbf78 100644
--- a/samples/client/petstore/typescript-node/default/model/models.ts
+++ b/samples/client/petstore/typescript-node/default/model/models.ts
@@ -91,7 +91,7 @@ export class ObjectSerializer {
             }
             return transformedData;
         } else if (type === "Date") {
-            return data.toString();
+            return data.toISOString();
         } else {
             if (enumsMap[type]) {
                 return data;
diff --git a/samples/client/petstore/typescript-node/npm/model/models.ts b/samples/client/petstore/typescript-node/npm/model/models.ts
index 8ed47b194d73..7b0dc89cbf78 100644
--- a/samples/client/petstore/typescript-node/npm/model/models.ts
+++ b/samples/client/petstore/typescript-node/npm/model/models.ts
@@ -91,7 +91,7 @@ export class ObjectSerializer {
             }
             return transformedData;
         } else if (type === "Date") {
-            return data.toString();
+            return data.toISOString();
         } else {
             if (enumsMap[type]) {
                 return data;
diff --git a/samples/client/petstore/typescript-node/npm/pom.xml b/samples/client/petstore/typescript-node/npm/pom.xml
index 1e4796b6b231..a69d53db3173 100644
--- a/samples/client/petstore/typescript-node/npm/pom.xml
+++ b/samples/client/petstore/typescript-node/npm/pom.xml
@@ -1,6 +1,6 @@
 
     4.0.0
-    com.wordnik
+    org.openapitools
     TypeScriptNodeNPMPestoreClientTests
     pom
     1.0-SNAPSHOT
diff --git a/samples/documentation/cwiki/.openapi-generator/VERSION b/samples/documentation/cwiki/.openapi-generator/VERSION
index 096bf47efe31..14900cee60e8 100644
--- a/samples/documentation/cwiki/.openapi-generator/VERSION
+++ b/samples/documentation/cwiki/.openapi-generator/VERSION
@@ -1 +1 @@
-3.0.0-SNAPSHOT
\ No newline at end of file
+3.2.1-SNAPSHOT
\ No newline at end of file
diff --git a/samples/dynamic-html/.openapi-generator-ignore b/samples/documentation/dynamic-html/.openapi-generator-ignore
similarity index 100%
rename from samples/dynamic-html/.openapi-generator-ignore
rename to samples/documentation/dynamic-html/.openapi-generator-ignore
diff --git a/samples/documentation/dynamic-html/.openapi-generator/VERSION b/samples/documentation/dynamic-html/.openapi-generator/VERSION
new file mode 100644
index 000000000000..14900cee60e8
--- /dev/null
+++ b/samples/documentation/dynamic-html/.openapi-generator/VERSION
@@ -0,0 +1 @@
+3.2.1-SNAPSHOT
\ No newline at end of file
diff --git a/samples/dynamic-html/docs/assets/css/bootstrap-responsive.css b/samples/documentation/dynamic-html/docs/assets/css/bootstrap-responsive.css
similarity index 100%
rename from samples/dynamic-html/docs/assets/css/bootstrap-responsive.css
rename to samples/documentation/dynamic-html/docs/assets/css/bootstrap-responsive.css
diff --git a/samples/dynamic-html/docs/assets/css/bootstrap.css b/samples/documentation/dynamic-html/docs/assets/css/bootstrap.css
similarity index 100%
rename from samples/dynamic-html/docs/assets/css/bootstrap.css
rename to samples/documentation/dynamic-html/docs/assets/css/bootstrap.css
diff --git a/samples/dynamic-html/docs/assets/css/style.css b/samples/documentation/dynamic-html/docs/assets/css/style.css
similarity index 100%
rename from samples/dynamic-html/docs/assets/css/style.css
rename to samples/documentation/dynamic-html/docs/assets/css/style.css
diff --git a/samples/dynamic-html/docs/assets/images/logo.png b/samples/documentation/dynamic-html/docs/assets/images/logo.png
similarity index 100%
rename from samples/dynamic-html/docs/assets/images/logo.png
rename to samples/documentation/dynamic-html/docs/assets/images/logo.png
diff --git a/samples/dynamic-html/docs/assets/js/bootstrap.js b/samples/documentation/dynamic-html/docs/assets/js/bootstrap.js
similarity index 100%
rename from samples/dynamic-html/docs/assets/js/bootstrap.js
rename to samples/documentation/dynamic-html/docs/assets/js/bootstrap.js
diff --git a/samples/dynamic-html/docs/assets/js/jquery-1.8.3.min.js b/samples/documentation/dynamic-html/docs/assets/js/jquery-1.8.3.min.js
similarity index 100%
rename from samples/dynamic-html/docs/assets/js/jquery-1.8.3.min.js
rename to samples/documentation/dynamic-html/docs/assets/js/jquery-1.8.3.min.js
diff --git a/samples/dynamic-html/docs/assets/js/main.js b/samples/documentation/dynamic-html/docs/assets/js/main.js
similarity index 100%
rename from samples/dynamic-html/docs/assets/js/main.js
rename to samples/documentation/dynamic-html/docs/assets/js/main.js
diff --git a/samples/dynamic-html/docs/index.html b/samples/documentation/dynamic-html/docs/index.html
similarity index 100%
rename from samples/dynamic-html/docs/index.html
rename to samples/documentation/dynamic-html/docs/index.html
diff --git a/samples/dynamic-html/docs/models/ApiResponse.html b/samples/documentation/dynamic-html/docs/models/ApiResponse.html
similarity index 100%
rename from samples/dynamic-html/docs/models/ApiResponse.html
rename to samples/documentation/dynamic-html/docs/models/ApiResponse.html
diff --git a/samples/dynamic-html/docs/models/Category.html b/samples/documentation/dynamic-html/docs/models/Category.html
similarity index 100%
rename from samples/dynamic-html/docs/models/Category.html
rename to samples/documentation/dynamic-html/docs/models/Category.html
diff --git a/samples/dynamic-html/docs/models/Order.html b/samples/documentation/dynamic-html/docs/models/Order.html
similarity index 100%
rename from samples/dynamic-html/docs/models/Order.html
rename to samples/documentation/dynamic-html/docs/models/Order.html
diff --git a/samples/dynamic-html/docs/models/Pet.html b/samples/documentation/dynamic-html/docs/models/Pet.html
similarity index 100%
rename from samples/dynamic-html/docs/models/Pet.html
rename to samples/documentation/dynamic-html/docs/models/Pet.html
diff --git a/samples/dynamic-html/docs/models/Tag.html b/samples/documentation/dynamic-html/docs/models/Tag.html
similarity index 100%
rename from samples/dynamic-html/docs/models/Tag.html
rename to samples/documentation/dynamic-html/docs/models/Tag.html
diff --git a/samples/dynamic-html/docs/models/User.html b/samples/documentation/dynamic-html/docs/models/User.html
similarity index 100%
rename from samples/dynamic-html/docs/models/User.html
rename to samples/documentation/dynamic-html/docs/models/User.html
diff --git a/samples/dynamic-html/docs/operations/PetApi.html b/samples/documentation/dynamic-html/docs/operations/PetApi.html
similarity index 100%
rename from samples/dynamic-html/docs/operations/PetApi.html
rename to samples/documentation/dynamic-html/docs/operations/PetApi.html
diff --git a/samples/dynamic-html/docs/operations/StoreApi.html b/samples/documentation/dynamic-html/docs/operations/StoreApi.html
similarity index 100%
rename from samples/dynamic-html/docs/operations/StoreApi.html
rename to samples/documentation/dynamic-html/docs/operations/StoreApi.html
diff --git a/samples/dynamic-html/docs/operations/UserApi.html b/samples/documentation/dynamic-html/docs/operations/UserApi.html
similarity index 100%
rename from samples/dynamic-html/docs/operations/UserApi.html
rename to samples/documentation/dynamic-html/docs/operations/UserApi.html
diff --git a/samples/dynamic-html/main.js b/samples/documentation/dynamic-html/main.js
similarity index 100%
rename from samples/dynamic-html/main.js
rename to samples/documentation/dynamic-html/main.js
diff --git a/samples/dynamic-html/package.json b/samples/documentation/dynamic-html/package.json
similarity index 100%
rename from samples/dynamic-html/package.json
rename to samples/documentation/dynamic-html/package.json
diff --git a/samples/html.md/.openapi-generator-ignore b/samples/documentation/html.md/.openapi-generator-ignore
similarity index 100%
rename from samples/html.md/.openapi-generator-ignore
rename to samples/documentation/html.md/.openapi-generator-ignore
diff --git a/samples/dynamic-html/.openapi-generator/VERSION b/samples/documentation/html.md/.openapi-generator/VERSION
similarity index 100%
rename from samples/dynamic-html/.openapi-generator/VERSION
rename to samples/documentation/html.md/.openapi-generator/VERSION
diff --git a/samples/html.md/index.html b/samples/documentation/html.md/index.html
similarity index 100%
rename from samples/html.md/index.html
rename to samples/documentation/html.md/index.html
diff --git a/samples/html/.openapi-generator-ignore b/samples/documentation/html/.openapi-generator-ignore
similarity index 100%
rename from samples/html/.openapi-generator-ignore
rename to samples/documentation/html/.openapi-generator-ignore
diff --git a/samples/documentation/html/.openapi-generator/VERSION b/samples/documentation/html/.openapi-generator/VERSION
new file mode 100644
index 000000000000..14900cee60e8
--- /dev/null
+++ b/samples/documentation/html/.openapi-generator/VERSION
@@ -0,0 +1 @@
+3.2.1-SNAPSHOT
\ No newline at end of file
diff --git a/samples/html/index.html b/samples/documentation/html/index.html
similarity index 99%
rename from samples/html/index.html
rename to samples/documentation/html/index.html
index 0d30f2be00bd..f2a1bfb3f77d 100644
--- a/samples/html/index.html
+++ b/samples/documentation/html/index.html
@@ -181,8 +181,8 @@ font-style: italic;
   
   

OpenAPI Petstore

This is a sample server Petstore server. For this sample, you can use the api key special-key to test the authorization filters.
-
More information: https://helloreverb.com
-
Contact Info: hello@helloreverb.com
+ +
Contact Info: team@openapitools.org
Version: 1.0.0
BasePath:/v2
Apache-2.0
diff --git a/samples/html2/.openapi-generator-ignore b/samples/documentation/html2/.openapi-generator-ignore similarity index 100% rename from samples/html2/.openapi-generator-ignore rename to samples/documentation/html2/.openapi-generator-ignore diff --git a/samples/documentation/html2/.openapi-generator/VERSION b/samples/documentation/html2/.openapi-generator/VERSION new file mode 100644 index 000000000000..14900cee60e8 --- /dev/null +++ b/samples/documentation/html2/.openapi-generator/VERSION @@ -0,0 +1 @@ +3.2.1-SNAPSHOT \ No newline at end of file diff --git a/samples/html2/index.html b/samples/documentation/html2/index.html similarity index 99% rename from samples/html2/index.html rename to samples/documentation/html2/index.html index 821520080add..5b9ce2fe173c 100644 --- a/samples/html2/index.html +++ b/samples/documentation/html2/index.html @@ -8103,7 +8103,7 @@ $(document).ready(function() {