diff --git a/bin/go-gin-petstore-server.sh b/bin/go-gin-petstore-server.sh index 98dd63100a2..bbd7cda3164 100755 --- a/bin/go-gin-petstore-server.sh +++ b/bin/go-gin-petstore-server.sh @@ -25,7 +25,7 @@ then mvn -B clean package fi -SPEC="modules/openapi-generator/src/test/resources/2_0/petstore.yaml" +SPEC="modules/openapi-generator/src/test/resources/3_0/petstore.yaml" GENERATOR="go-gin-server" STUB_DIR="samples/server/petstore/go-gin-api-server" diff --git a/bin/go-petstore-server.sh b/bin/go-petstore-server.sh index e8ac83eba82..d58365c5dbe 100755 --- a/bin/go-petstore-server.sh +++ b/bin/go-petstore-server.sh @@ -25,7 +25,7 @@ then mvn -B clean package fi -SPEC="modules/openapi-generator/src/test/resources/2_0/petstore.yaml" +SPEC="modules/openapi-generator/src/test/resources/3_0/petstore.yaml" GENERATOR="go-server" STUB_DIR="samples/server/petstore/go-api-server" diff --git a/bin/java-petstore-all.sh b/bin/java-petstore-all.sh index e57e60c3311..2277e850bb7 100755 --- a/bin/java-petstore-all.sh +++ b/bin/java-petstore-all.sh @@ -2,7 +2,6 @@ # update java petstore clients for all supported http libraries ./bin/java-petstore-feign-10x.sh -./bin/java-petstore-feign.sh ./bin/java-petstore-google-api-client.sh ./bin/java-petstore-jersey1.sh ./bin/java-petstore-jersey2-java8.sh @@ -15,7 +14,6 @@ ./bin/java-petstore-resteasy.sh ./bin/java-petstore-resttemplate-withxml.sh ./bin/java-petstore-resttemplate.sh -./bin/java-petstore-retrofit.sh ./bin/java-petstore-retrofit2-play24.sh ./bin/java-petstore-retrofit2-play25.sh ./bin/java-petstore-retrofit2-play26.sh diff --git a/bin/java-petstore-feign-9x.json b/bin/java-petstore-feign-9x.json deleted file mode 100644 index 3508a4521ce..00000000000 --- a/bin/java-petstore-feign-9x.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "library": "feign", - "artifactId": "petstore-feign", - "feignVersion": "9.x" -} diff --git a/bin/java-petstore-feign.json b/bin/java-petstore-feign.json deleted file mode 100644 index 187612c699c..00000000000 --- a/bin/java-petstore-feign.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "library": "feign", - "artifactId": "petstore-feign", - "feignVersion": "10.x" -} diff --git a/bin/java-petstore-feign.sh b/bin/java-petstore-feign.sh deleted file mode 100755 index 48038613a82..00000000000 --- a/bin/java-petstore-feign.sh +++ /dev/null @@ -1,40 +0,0 @@ -#!/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 -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/Java/libraries/feign -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin/java-petstore-feign-9x.json -o samples/client/petstore/java/feign --additional-properties hideGenerationTimestamp=true,booleanGetterPrefix=is,additionalModelTypeAnnotations=@javax.annotation.concurrent.Immutable $@" - -echo "Removing files and folders under samples/client/petstore/java/feign/src/main" -rm -rf samples/client/petstore/java/feign/src/main -find samples/client/petstore/java/feign -maxdepth 1 -type f ! -name "README.md" -exec rm {} + -java $JAVA_OPTS -jar $executable $ags - -# copy additional manually written unit-tests -mkdir samples/client/petstore/java/feign/src/test/java/org/openapitools/client - -cp CI/samples.ci/client/petstore/java/test-manual/common/StringUtilTest.java samples/client/petstore/java/feign/src/test/java/org/openapitools/client/StringUtilTest.java diff --git a/bin/java-petstore-retrofit.json b/bin/java-petstore-retrofit.json deleted file mode 100644 index 34ca51f008b..00000000000 --- a/bin/java-petstore-retrofit.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "library": "retrofit", - "artifactId": "petstore-retrofit" -} diff --git a/bin/java-petstore-retrofit.sh b/bin/java-petstore-retrofit.sh deleted file mode 100755 index 127f16b44eb..00000000000 --- a/bin/java-petstore-retrofit.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/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 -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin/java-petstore-retrofit.json -o samples/client/petstore/java/retrofit --additional-properties hideGenerationTimestamp=true,dateLibrary=joda $@" - -echo "Removing files and folders under samples/client/petstore/java/retrofit/src/main" -rm -rf samples/client/petstore/java/retrofit/src/main -find samples/client/petstore/java/retrofit -maxdepth 1 -type f ! -name "README.md" -exec rm {} + -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/python-experimental-petstore.sh b/bin/python-experimental-petstore.sh index 531cf295d64..8a64ca98898 100755 --- a/bin/python-experimental-petstore.sh +++ b/bin/python-experimental-petstore.sh @@ -27,6 +27,6 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/python -i modules/openapi-generator/src/test/resources/2_0/python-client-experimental/petstore-with-fake-endpoints-models-for-testing.yaml -g python-experimental -o samples/client/petstore/python-experimental --additional-properties packageName=petstore_api $@" +ags="generate -t modules/openapi-generator/src/main/resources/python -i modules/openapi-generator/src/test/resources/2_0/python-client-experimental/petstore-with-fake-endpoints-models-for-testing.yaml -g python-experimental -o samples/client/petstore/python-experimental --additional-properties packageName=petstore_api --additional-properties disallowAdditionalPropertiesIfNotPresent=true $@" java $JAVA_OPTS -jar $executable $ags diff --git a/bin/typescript-angular-v4-petstore-with-npm.sh b/bin/rust-petstore-reqwest-async.sh similarity index 68% rename from bin/typescript-angular-v4-petstore-with-npm.sh rename to bin/rust-petstore-reqwest-async.sh index 0b2c5630ed5..13a7c649bcb 100755 --- a/bin/typescript-angular-v4-petstore-with-npm.sh +++ b/bin/rust-petstore-reqwest-async.sh @@ -26,7 +26,7 @@ then fi # if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g typescript-angular -c bin/typescript-petstore-npm.json -o samples/client/petstore/typescript-angular-v4/npm --additional-properties ngVersion=4 $@" +export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties $@" +ags="generate -t modules/openapi-generator/src/main/resources/rust -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g rust --library reqwest -o samples/client/petstore/rust/reqwest/petstore-async --additional-properties supportAsync=true,packageName=petstore-reqwest-async $@" java $JAVA_OPTS -jar $executable $ags diff --git a/bin/typescript-angular-petstore-all.sh b/bin/typescript-angular-petstore-all.sh index fb3e9b7ef36..55ed856f34e 100755 --- a/bin/typescript-angular-petstore-all.sh +++ b/bin/typescript-angular-petstore-all.sh @@ -1,10 +1,5 @@ #!/bin/sh -./bin/typescript-angular-v2-petstore.sh -./bin/typescript-angular-v2-petstore-with-npm.sh -./bin/typescript-angular-v2-petstore-interfaces.sh -./bin/typescript-angular-v4-petstore-with-npm.sh -./bin/typescript-angular-v4.3-petstore-with-npm.sh ./bin/typescript-angular-v6-petstore-not-provided-in-root.sh ./bin/typescript-angular-v6-petstore-not-provided-in-root-with-npm.sh ./bin/typescript-angular-v6-petstore-provided-in-root.sh diff --git a/bin/typescript-angular-v2-petstore-interfaces.sh b/bin/typescript-angular-v2-petstore-interfaces.sh deleted file mode 100755 index 18f638f4dfe..00000000000 --- a/bin/typescript-angular-v2-petstore-interfaces.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/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 -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g typescript-angular -o samples/client/petstore/typescript-angular-v2/with-interfaces --additional-properties ngVersion=2,withInterfaces=true $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/typescript-angular-v2-petstore-with-npm.sh b/bin/typescript-angular-v2-petstore-with-npm.sh deleted file mode 100755 index 39afef97b5b..00000000000 --- a/bin/typescript-angular-v2-petstore-with-npm.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/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 -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g typescript-angular -c bin/typescript-petstore-npm.json -o samples/client/petstore/typescript-angular-v2/npm --additional-properties ngVersion=2 $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/typescript-angular-v2-petstore.sh b/bin/typescript-angular-v2-petstore.sh deleted file mode 100755 index 16184283f29..00000000000 --- a/bin/typescript-angular-v2-petstore.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/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 -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g typescript-angular -o samples/client/petstore/typescript-angular-v2/default --additional-properties ngVersion=2 $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/typescript-angular-v4.3-petstore-with-npm.sh b/bin/typescript-angular-v4.3-petstore-with-npm.sh deleted file mode 100755 index a5797d302ee..00000000000 --- a/bin/typescript-angular-v4.3-petstore-with-npm.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/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 -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g typescript-angular -c bin/typescript-petstore-npm.json -o samples/client/petstore/typescript-angular-v4.3/npm --additional-properties ngVersion=4.3 $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/typescript-axios-petstore-with-single-request-parameters.sh b/bin/typescript-axios-petstore-with-single-request-parameters.sh index 4f04a39e09d..25a7a60ce29 100755 --- a/bin/typescript-axios-petstore-with-single-request-parameters.sh +++ b/bin/typescript-axios-petstore-with-single-request-parameters.sh @@ -27,6 +27,6 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g typescript-axios -o samples/client/petstore/typescript-axios/builds/with-single-request-parameters --additional-properties useSingleRequestParameter=true $@" +ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore-with-operations-without-required-params.yaml -g typescript-axios -o samples/client/petstore/typescript-axios/builds/with-single-request-parameters --additional-properties useSingleRequestParameter=true $@" java $JAVA_OPTS -jar $executable $ags diff --git a/bin/windows/go-gin-petstore-server.bat b/bin/windows/go-gin-petstore-server.bat index 894976e9991..1085b4e9418 100644 --- a/bin/windows/go-gin-petstore-server.bat +++ b/bin/windows/go-gin-petstore-server.bat @@ -6,7 +6,7 @@ If Not Exist %executable% ( mvn clean package ) -set SPEC=modules\openapi-generator\src\test\resources\2_0\petstore.yaml +set SPEC=modules\openapi-generator\src\test\resources\3_0\petstore.yaml set GENERATOR=go-gin-server set STUB_DIR=samples\server\petstore\go-gin-api-server diff --git a/bin/windows/go-petstore-server.bat b/bin/windows/go-petstore-server.bat index e520f5b252a..32ab6977d2f 100644 --- a/bin/windows/go-petstore-server.bat +++ b/bin/windows/go-petstore-server.bat @@ -6,7 +6,7 @@ If Not Exist %executable% ( mvn clean package ) -set SPEC=modules\openapi-generator\src\test\resources\2_0\petstore.yaml +set SPEC=modules\openapi-generator\src\test\resources\3_0\petstore.yaml set GENERATOR=go-server set STUB_DIR=samples\server\petstore\go-api-server diff --git a/bin/windows/java-petstore-all.bat b/bin/windows/java-petstore-all.bat index 6bff30955cd..bb661a9fa1c 100644 --- a/bin/windows/java-petstore-all.bat +++ b/bin/windows/java-petstore-all.bat @@ -1,5 +1,4 @@ call .\bin\windows\java-petstore-feign-10x.bat -call .\bin\windows\java-petstore-feign.bat call .\bin\windows\java-petstore-google-api-client.bat call .\bin\windows\java-petstore-jersey1.bat call .\bin\windows\java-petstore-jersey2-java8.bat @@ -11,7 +10,6 @@ call .\bin\windows\java-petstore-rest-assured-jackson.bat call .\bin\windows\java-petstore-resteasy.bat call .\bin\windows\java-petstore-resttemplate-withxml.bat call .\bin\windows\java-petstore-resttemplate.bat -call .\bin\windows\java-petstore-retrofit.bat call .\bin\windows\java-petstore-retrofit2-play24.bat call .\bin\windows\java-petstore-retrofit2-play25.bat call .\bin\windows\java-petstore-retrofit2-play26.bat diff --git a/bin/windows/java-petstore-feign.bat b/bin/windows/java-petstore-feign.bat deleted file mode 100644 index 261965dcb6f..00000000000 --- a/bin/windows/java-petstore-feign.bat +++ /dev/null @@ -1,10 +0,0 @@ -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 -t modules\openapi-generator\src\main\resources\Java\libraries\feign -i modules\openapi-generator\src\test\resources\2_0\petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin\java-petstore-feign-9x.json -o samples\client\petstore\java\feign --additional-properties hideGenerationTimestamp=true,booleanGetterPrefix=is,additionalModelTypeAnnotations=@javax.annotation.concurrent.Immutable - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/java-petstore-retrofit.bat b/bin/windows/java-petstore-retrofit.bat deleted file mode 100644 index 970393a34e6..00000000000 --- a/bin/windows/java-petstore-retrofit.bat +++ /dev/null @@ -1,10 +0,0 @@ -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 java -c bin\java-petstore-retrofit.json -o samples\client\petstore\java\retrofit --additional-properties hideGenerationTimestamp=true,dateLibrary=joda - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/typescript-angular-petstore-all.bat b/bin/windows/typescript-angular-petstore-all.bat index 46dc9814917..aa3a4fa2f96 100644 --- a/bin/windows/typescript-angular-petstore-all.bat +++ b/bin/windows/typescript-angular-petstore-all.bat @@ -1,8 +1,3 @@ -call .\bin\windows\typescript-angular-v2-with-npm.bat -call .\bin\windows\typescript-angular-v2-interfaces.bat -call .\bin\windows\typescript-angular-v2.bat -call .\bin\windows\typescript-angular-v4-with-npm.bat -call .\bin\windows\typescript-angular-v4.3-with-npm.bat call .\bin\windows\typescript-angular-v6-provided-in-root.bat call .\bin\windows\typescript-angular-v6-provided-in-root-with-npm.bat call .\bin\windows\typescript-angular-v6-not-provided-in-root.bat diff --git a/bin/windows/typescript-angular-v2-interfaces.bat b/bin/windows/typescript-angular-v2-interfaces.bat deleted file mode 100644 index 881810e729f..00000000000 --- a/bin/windows/typescript-angular-v2-interfaces.bat +++ /dev/null @@ -1,10 +0,0 @@ -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.yaml -g typescript-angular -o samples\client\petstore\typescript-angular-v2\with-interfaces --additional-properties withInterfaces=true --additional-properties ngVersion=2 - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/typescript-angular-v2-with-npm.bat b/bin/windows/typescript-angular-v2-with-npm.bat deleted file mode 100644 index f5387f93eb6..00000000000 --- a/bin/windows/typescript-angular-v2-with-npm.bat +++ /dev/null @@ -1,10 +0,0 @@ -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.yaml -c bin\typescript-petstore-npm.json -g typescript-angular -o samples\client\petstore\typescript-angular-v2\npm --additional-properties ngVersion=2 - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/typescript-angular-v2.bat b/bin/windows/typescript-angular-v2.bat deleted file mode 100755 index a6925eb7e2e..00000000000 --- a/bin/windows/typescript-angular-v2.bat +++ /dev/null @@ -1,10 +0,0 @@ -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.yaml -g typescript-angular -o samples\client\petstore\typescript-angular-v2\default --additional-properties ngVersion=2 - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/typescript-angular-v4-with-npm.bat b/bin/windows/typescript-angular-v4-with-npm.bat deleted file mode 100644 index d28721dd2c5..00000000000 --- a/bin/windows/typescript-angular-v4-with-npm.bat +++ /dev/null @@ -1,10 +0,0 @@ -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.yaml -c bin\typescript-petstore-npm.json -g typescript-angular -o samples\client\petstore\typescript-angular-v4\npm --additional-properties ngVersion=4 - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/typescript-angular-v4.3-with-npm.bat b/bin/windows/typescript-angular-v4.3-with-npm.bat deleted file mode 100644 index eff7b6bb1bf..00000000000 --- a/bin/windows/typescript-angular-v4.3-with-npm.bat +++ /dev/null @@ -1,10 +0,0 @@ -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.yaml -c bin\typescript-petstore-npm.json -g typescript-angular -o samples\client\petstore\typescript-angular-v4.3\npm --additional-properties ngVersion=4.3 - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/typescript-axios-petstore-with-single-request-parameters.bat b/bin/windows/typescript-axios-petstore-with-single-request-parameters.bat index 108bed50f77..efe0284cb87 100755 --- a/bin/windows/typescript-axios-petstore-with-single-request-parameters.bat +++ b/bin/windows/typescript-axios-petstore-with-single-request-parameters.bat @@ -7,6 +7,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.yaml -g typescript-axios -o samples\client\petstore\typescript-axios\builds\with-single-request-parameters --additional-properties useSingleRequestParameter=true +set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore-with-operations-without-required-params.yaml -g typescript-axios -o samples\client\petstore\typescript-axios\builds\with-single-request-parameters --additional-properties useSingleRequestParameter=true java %JAVA_OPTS% -jar %executable% %ags% diff --git a/docs/generators/ada-server.md b/docs/generators/ada-server.md index 85bfb5b5d02..66d41103a77 100644 --- a/docs/generators/ada-server.md +++ b/docs/generators/ada-server.md @@ -6,6 +6,8 @@ sidebar_label: ada-server | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| diff --git a/docs/generators/ada.md b/docs/generators/ada.md index 66114165a03..971e3267b2f 100644 --- a/docs/generators/ada.md +++ b/docs/generators/ada.md @@ -6,6 +6,8 @@ sidebar_label: ada | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| diff --git a/docs/generators/android.md b/docs/generators/android.md index c499a15ff94..11a5cd1e364 100644 --- a/docs/generators/android.md +++ b/docs/generators/android.md @@ -12,6 +12,8 @@ sidebar_label: android |apiPackage|package for generated api classes| |null| |artifactId|artifactId for use in the generated build.gradle and pom.xml| |null| |artifactVersion|artifact version for use in the generated build.gradle and pom.xml| |null| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |groupId|groupId for use in the generated build.gradle and pom.xml| |null| |invokerPackage|root package for generated code| |null| diff --git a/docs/generators/apache2.md b/docs/generators/apache2.md index 599189a5598..3f183ffdf53 100644 --- a/docs/generators/apache2.md +++ b/docs/generators/apache2.md @@ -6,6 +6,8 @@ sidebar_label: apache2 | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| diff --git a/docs/generators/apex.md b/docs/generators/apex.md index 9ead87c94e9..45d0d2a5123 100644 --- a/docs/generators/apex.md +++ b/docs/generators/apex.md @@ -9,6 +9,8 @@ sidebar_label: apex |apiVersion|The Metadata API version number to use for components in this package.| |null| |buildMethod|The build method for this package.| |null| |classPrefix|Prefix for generated classes. Set this to avoid overwriting existing classes in your org.| |null| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |namedCredential|The named credential name for the HTTP callouts| |null| diff --git a/docs/generators/asciidoc.md b/docs/generators/asciidoc.md index 01683b0a323..ac2d3cca0b6 100644 --- a/docs/generators/asciidoc.md +++ b/docs/generators/asciidoc.md @@ -10,6 +10,8 @@ sidebar_label: asciidoc |appName|short name of the application| |null| |artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |null| |artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |null| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |groupId|groupId in generated pom.xml| |null| |headerAttributes|generation of asciidoc header meta data attributes (set to false to suppress, default: true)| |true| diff --git a/docs/generators/avro-schema.md b/docs/generators/avro-schema.md index da33df52001..ba46bc6dc93 100644 --- a/docs/generators/avro-schema.md +++ b/docs/generators/avro-schema.md @@ -6,6 +6,8 @@ sidebar_label: avro-schema | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |packageName|package for generated classes (where supported)| |null| diff --git a/docs/generators/bash.md b/docs/generators/bash.md index 75dde1d62cd..0e5cbf5cc72 100644 --- a/docs/generators/bash.md +++ b/docs/generators/bash.md @@ -9,6 +9,8 @@ sidebar_label: bash |apiKeyAuthEnvironmentVariable|Name of environment variable where API key can be defined (e.g. PETSTORE_APIKEY='kjhasdGASDa5asdASD')| |false| |basicAuthEnvironmentVariable|Name of environment variable where username and password can be defined (e.g. PETSTORE_CREDS='username:password')| |null| |curlOptions|Default cURL options| |null| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |generateBashCompletion|Whether to generate the Bash completion script| |false| |generateZshCompletion|Whether to generate the Zsh completion script| |false| diff --git a/docs/generators/c.md b/docs/generators/c.md index 80e50635f4c..8d467ca2fd0 100644 --- a/docs/generators/c.md +++ b/docs/generators/c.md @@ -6,6 +6,8 @@ sidebar_label: c | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| diff --git a/docs/generators/clojure.md b/docs/generators/clojure.md index 0cf52175e71..af43ffffe77 100644 --- a/docs/generators/clojure.md +++ b/docs/generators/clojure.md @@ -7,6 +7,8 @@ sidebar_label: clojure | ------ | ----------- | ------ | ------- | |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |baseNamespace|the base/top namespace (Default: generated from projectName)| |null| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| diff --git a/docs/generators/cpp-qt5-client.md b/docs/generators/cpp-qt5-client.md index 8e2bf7ab98b..bfda02a1d16 100644 --- a/docs/generators/cpp-qt5-client.md +++ b/docs/generators/cpp-qt5-client.md @@ -8,6 +8,8 @@ sidebar_label: cpp-qt5-client |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |contentCompression|Enable Compressed Content Encoding for requests and responses| |false| |cppNamespace|C++ namespace (convention: name::space::for::api).| |OpenAPI| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |modelNamePrefix|Prefix that will be prepended to all model names.| |OAI| diff --git a/docs/generators/cpp-qt5-qhttpengine-server.md b/docs/generators/cpp-qt5-qhttpengine-server.md index 9e2f0e75e5c..bbb1852e231 100644 --- a/docs/generators/cpp-qt5-qhttpengine-server.md +++ b/docs/generators/cpp-qt5-qhttpengine-server.md @@ -8,6 +8,8 @@ sidebar_label: cpp-qt5-qhttpengine-server |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |contentCompression|Enable Compressed Content Encoding for requests and responses| |false| |cppNamespace|C++ namespace (convention: name::space::for::api).| |OpenAPI| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |modelNamePrefix|Prefix that will be prepended to all model names.| |OAI| diff --git a/docs/generators/cpp-tizen.md b/docs/generators/cpp-tizen.md index dd887f70478..5bc03d3fbab 100644 --- a/docs/generators/cpp-tizen.md +++ b/docs/generators/cpp-tizen.md @@ -6,6 +6,8 @@ sidebar_label: cpp-tizen | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| diff --git a/docs/generators/cpp-ue4.md b/docs/generators/cpp-ue4.md index eb00fa4a5ce..ecfac79de95 100644 --- a/docs/generators/cpp-ue4.md +++ b/docs/generators/cpp-ue4.md @@ -7,6 +7,8 @@ sidebar_label: cpp-ue4 | ------ | ----------- | ------ | ------- | |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |cppNamespace|C++ namespace (convention: name::space::for::api).| |OpenAPI| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |optionalProjectFile|Generate Build.cs| |true| diff --git a/docs/generators/cwiki.md b/docs/generators/cwiki.md index 2804a1bb2b8..c0bb03f3930 100644 --- a/docs/generators/cwiki.md +++ b/docs/generators/cwiki.md @@ -10,6 +10,8 @@ sidebar_label: cwiki |appName|short name of the application| |null| |artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |null| |artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |null| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |groupId|groupId in generated pom.xml| |null| |infoEmail|an email address to contact for inquiries about the application| |null| diff --git a/docs/generators/dart-dio.md b/docs/generators/dart-dio.md index 5bab2b35a21..e1c1e26c7f1 100644 --- a/docs/generators/dart-dio.md +++ b/docs/generators/dart-dio.md @@ -8,6 +8,8 @@ sidebar_label: dart-dio |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |browserClient|Is the client browser based (for Dart 1.x only)| |null| |dateLibrary|Option. Date library to use|
**core**
Dart core library (DateTime)
**timemachine**
Time Machine is date and time library for Flutter, Web, and Server with support for timezones, calendars, cultures, formatting and parsing.
|core| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |nullableFields|Is the null fields should be in the JSON payload| |null| diff --git a/docs/generators/dart-jaguar.md b/docs/generators/dart-jaguar.md index a23282c5095..5659caf8668 100644 --- a/docs/generators/dart-jaguar.md +++ b/docs/generators/dart-jaguar.md @@ -7,6 +7,8 @@ sidebar_label: dart-jaguar | ------ | ----------- | ------ | ------- | |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |browserClient|Is the client browser based (for Dart 1.x only)| |null| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |nullableFields|Is the null fields should be in the JSON payload| |null| diff --git a/docs/generators/dart.md b/docs/generators/dart.md index b6ff9ba8eef..c4ee6f36b2e 100644 --- a/docs/generators/dart.md +++ b/docs/generators/dart.md @@ -7,6 +7,8 @@ sidebar_label: dart | ------ | ----------- | ------ | ------- | |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |browserClient|Is the client browser based (for Dart 1.x only)| |null| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| diff --git a/docs/generators/dynamic-html.md b/docs/generators/dynamic-html.md index 9766b76b426..50ad9583c32 100644 --- a/docs/generators/dynamic-html.md +++ b/docs/generators/dynamic-html.md @@ -8,6 +8,8 @@ sidebar_label: dynamic-html |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |null| |artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |null| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |groupId|groupId in generated pom.xml| |null| |invokerPackage|root package for generated code| |null| diff --git a/docs/generators/elixir.md b/docs/generators/elixir.md index 9b7b08bd44b..45acc262f67 100644 --- a/docs/generators/elixir.md +++ b/docs/generators/elixir.md @@ -6,6 +6,8 @@ sidebar_label: elixir | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |invokerPackage|The main namespace to use for all classes. e.g. Yay.Pets| |null| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| diff --git a/docs/generators/fsharp-functions.md b/docs/generators/fsharp-functions.md index 07b7aa3ded2..ec2f54a8cd7 100644 --- a/docs/generators/fsharp-functions.md +++ b/docs/generators/fsharp-functions.md @@ -6,6 +6,8 @@ sidebar_label: fsharp-functions | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |licenseName|The name of the license| |NoLicense| diff --git a/docs/generators/groovy.md b/docs/generators/groovy.md index 4dd2d48a5c8..6ace5afab9e 100644 --- a/docs/generators/groovy.md +++ b/docs/generators/groovy.md @@ -18,6 +18,8 @@ sidebar_label: groovy |developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org| |developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org| |disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| diff --git a/docs/generators/haskell-http-client.md b/docs/generators/haskell-http-client.md index a1ecfc5a4b0..883ffd35f0e 100644 --- a/docs/generators/haskell-http-client.md +++ b/docs/generators/haskell-http-client.md @@ -17,6 +17,8 @@ sidebar_label: haskell-http-client |dateFormat|format string used to parse/render a date| |%Y-%m-%d| |dateTimeFormat|format string used to parse/render a datetime| |null| |dateTimeParseFormat|overrides the format string used to parse a datetime| |null| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |generateEnums|Generate specific datatypes for OpenAPI enums| |true| |generateFormUrlEncodedInstances|Generate FromForm/ToForm instances for models that are used by operations that produce or consume application/x-www-form-urlencoded| |true| diff --git a/docs/generators/haskell.md b/docs/generators/haskell.md index 1fef8d922d2..bea5cef5a62 100644 --- a/docs/generators/haskell.md +++ b/docs/generators/haskell.md @@ -7,6 +7,8 @@ sidebar_label: haskell | ------ | ----------- | ------ | ------- | |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |apiPackage|package for generated api classes| |null| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |modelPackage|package for generated models| |null| diff --git a/docs/generators/html.md b/docs/generators/html.md index b5603e1888a..7d03a4b1591 100644 --- a/docs/generators/html.md +++ b/docs/generators/html.md @@ -10,6 +10,8 @@ sidebar_label: html |appName|short name of the application| |null| |artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |null| |artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |null| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |groupId|groupId in generated pom.xml| |null| |infoEmail|an email address to contact for inquiries about the application| |null| diff --git a/docs/generators/html2.md b/docs/generators/html2.md index 6641bcfa3e4..1b3b2d572a9 100644 --- a/docs/generators/html2.md +++ b/docs/generators/html2.md @@ -10,6 +10,8 @@ sidebar_label: html2 |appName|short name of the application| |null| |artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |null| |artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |null| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |groupId|groupId in generated pom.xml| |null| |infoEmail|an email address to contact for inquiries about the application| |null| diff --git a/docs/generators/java-inflector.md b/docs/generators/java-inflector.md index 0b6f2cff5b9..e539008e605 100644 --- a/docs/generators/java-inflector.md +++ b/docs/generators/java-inflector.md @@ -20,6 +20,8 @@ sidebar_label: java-inflector |developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org| |developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org| |disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| diff --git a/docs/generators/java-msf4j.md b/docs/generators/java-msf4j.md index ce767ba3394..e11b4275c90 100644 --- a/docs/generators/java-msf4j.md +++ b/docs/generators/java-msf4j.md @@ -20,6 +20,8 @@ sidebar_label: java-msf4j |developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org| |developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org| |disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| diff --git a/docs/generators/java-pkmst.md b/docs/generators/java-pkmst.md index 01b1d565aa1..5076c759329 100644 --- a/docs/generators/java-pkmst.md +++ b/docs/generators/java-pkmst.md @@ -21,6 +21,8 @@ sidebar_label: java-pkmst |developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org| |developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org| |disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |eurekaUri|Eureka URI| |null| diff --git a/docs/generators/java-play-framework.md b/docs/generators/java-play-framework.md index 474f2fe1cd2..aefc44cd2e0 100644 --- a/docs/generators/java-play-framework.md +++ b/docs/generators/java-play-framework.md @@ -23,6 +23,8 @@ sidebar_label: java-play-framework |developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org| |developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org| |disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| diff --git a/docs/generators/java-undertow-server.md b/docs/generators/java-undertow-server.md index ddf5fc8c899..354a67db6cf 100644 --- a/docs/generators/java-undertow-server.md +++ b/docs/generators/java-undertow-server.md @@ -20,6 +20,8 @@ sidebar_label: java-undertow-server |developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org| |developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org| |disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| diff --git a/docs/generators/java-vertx-web.md b/docs/generators/java-vertx-web.md index fed507c1194..d0f2dbd0bce 100644 --- a/docs/generators/java-vertx-web.md +++ b/docs/generators/java-vertx-web.md @@ -20,6 +20,8 @@ sidebar_label: java-vertx-web |developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org| |developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org| |disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| diff --git a/docs/generators/java-vertx.md b/docs/generators/java-vertx.md index 24ed9d8eddf..f0bfea0446a 100644 --- a/docs/generators/java-vertx.md +++ b/docs/generators/java-vertx.md @@ -20,6 +20,8 @@ sidebar_label: java-vertx |developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org| |developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org| |disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| diff --git a/docs/generators/java.md b/docs/generators/java.md index 3f5dc6e9551..3d0d3afda00 100644 --- a/docs/generators/java.md +++ b/docs/generators/java.md @@ -22,6 +22,8 @@ sidebar_label: java |developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org| |developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org| |disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |feignVersion|Version of OpenFeign: '10.x' (default), '9.x' (deprecated)| |false| @@ -31,7 +33,7 @@ sidebar_label: java |invokerPackage|root package for generated code| |org.openapitools.client| |java8|Use Java8 classes instead of third party equivalents. Starting in 5.x, JDK8 is the default and the support for JDK7, JDK6 has been dropped|
**true**
Use Java 8 classes such as Base64
**false**
Various third party libraries as needed
|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| -|library|library template (sub-template) to use|
**jersey1**
HTTP client: Jersey client 1.19.x. JSON processing: Jackson 2.9.x. Enable Java6 support using '-DsupportJava6=true'. Enable gzip request encoding using '-DuseGzipFeature=true'. IMPORTANT NOTE: jersey 1.x is no longer actively maintained so please upgrade to 'jersey2' or other HTTP libaries instead.
**jersey2**
HTTP client: Jersey client 2.25.1. JSON processing: Jackson 2.9.x
**feign**
HTTP client: OpenFeign 9.x (deprecated) or 10.x (default). JSON processing: Jackson 2.9.x.
**okhttp-gson**
[DEFAULT] HTTP client: OkHttp 3.x. JSON processing: Gson 2.8.x. Enable Parcelable models on Android using '-DparcelableModel=true'. Enable gzip request encoding using '-DuseGzipFeature=true'.
**retrofit**
HTTP client: OkHttp 2.x. JSON processing: Gson 2.x (Retrofit 1.9.0). IMPORTANT NOTE: retrofit1.x is no longer actively maintained so please upgrade to 'retrofit2' instead.
**retrofit2**
HTTP client: OkHttp 3.x. JSON processing: Gson 2.x (Retrofit 2.3.0). Enable the RxJava adapter using '-DuseRxJava[2]=true'. (RxJava 1.x or 2.x)
**resttemplate**
HTTP client: Spring RestTemplate 4.x. JSON processing: Jackson 2.9.x
**webclient**
HTTP client: Spring WebClient 5.x. JSON processing: Jackson 2.9.x
**resteasy**
HTTP client: Resteasy client 3.x. JSON processing: Jackson 2.9.x
**vertx**
HTTP client: VertX client 3.x. JSON processing: Jackson 2.9.x
**google-api-client**
HTTP client: Google API client 1.x. JSON processing: Jackson 2.9.x
**rest-assured**
HTTP client: rest-assured : 4.x. JSON processing: Gson 2.x or Jackson 2.10.x. Only for Java 8
**native**
HTTP client: Java native HttpClient. JSON processing: Jackson 2.9.x. Only for Java11+
**microprofile**
HTTP client: Microprofile client X.x. JSON processing: Jackson 2.9.x
|okhttp-gson| +|library|library template (sub-template) to use|
**jersey1**
HTTP client: Jersey client 1.19.x. JSON processing: Jackson 2.9.x. Enable Java6 support using '-DsupportJava6=true'. Enable gzip request encoding using '-DuseGzipFeature=true'. IMPORTANT NOTE: jersey 1.x is no longer actively maintained so please upgrade to 'jersey2' or other HTTP libaries instead.
**jersey2**
HTTP client: Jersey client 2.25.1. JSON processing: Jackson 2.9.x
**feign**
HTTP client: OpenFeign 9.x (deprecated) or 10.x (default). JSON processing: Jackson 2.9.x.
**okhttp-gson**
[DEFAULT] HTTP client: OkHttp 3.x. JSON processing: Gson 2.8.x. Enable Parcelable models on Android using '-DparcelableModel=true'. Enable gzip request encoding using '-DuseGzipFeature=true'.
**retrofit2**
HTTP client: OkHttp 3.x. JSON processing: Gson 2.x (Retrofit 2.3.0). Enable the RxJava adapter using '-DuseRxJava[2]=true'. (RxJava 1.x or 2.x)
**resttemplate**
HTTP client: Spring RestTemplate 4.x. JSON processing: Jackson 2.9.x
**webclient**
HTTP client: Spring WebClient 5.x. JSON processing: Jackson 2.9.x
**resteasy**
HTTP client: Resteasy client 3.x. JSON processing: Jackson 2.9.x
**vertx**
HTTP client: VertX client 3.x. JSON processing: Jackson 2.9.x
**google-api-client**
HTTP client: Google API client 1.x. JSON processing: Jackson 2.9.x
**rest-assured**
HTTP client: rest-assured : 4.x. JSON processing: Gson 2.x or Jackson 2.10.x. Only for Java 8
**native**
HTTP client: Java native HttpClient. JSON processing: Jackson 2.9.x. Only for Java11+
**microprofile**
HTTP client: Microprofile client 1.x. JSON processing: Jackson 2.9.x
|okhttp-gson| |licenseName|The name of the license| |Unlicense| |licenseUrl|The URL of the license| |http://unlicense.org| |modelPackage|package for generated models| |org.openapitools.client.model| diff --git a/docs/generators/javascript-apollo.md b/docs/generators/javascript-apollo.md index ca26bb0c061..83a11b96146 100644 --- a/docs/generators/javascript-apollo.md +++ b/docs/generators/javascript-apollo.md @@ -7,6 +7,8 @@ sidebar_label: javascript-apollo | ------ | ----------- | ------ | ------- | |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |apiPackage|package for generated api classes| |null| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |emitJSDoc|generate JSDoc comments| |true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| diff --git a/docs/generators/javascript-closure-angular.md b/docs/generators/javascript-closure-angular.md index e870e567eac..10eae6c4653 100644 --- a/docs/generators/javascript-closure-angular.md +++ b/docs/generators/javascript-closure-angular.md @@ -6,6 +6,8 @@ sidebar_label: javascript-closure-angular | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| diff --git a/docs/generators/javascript-flowtyped.md b/docs/generators/javascript-flowtyped.md index 8c7f5973aa7..50392d647cb 100644 --- a/docs/generators/javascript-flowtyped.md +++ b/docs/generators/javascript-flowtyped.md @@ -6,6 +6,8 @@ sidebar_label: javascript-flowtyped | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |enumNameSuffix|Suffix that will be appended to all enum names.| |Enum| |enumPropertyNaming|Naming convention for enum properties: 'camelCase', 'PascalCase', 'snake_case', 'UPPERCASE', and 'original'| |PascalCase| diff --git a/docs/generators/javascript.md b/docs/generators/javascript.md index 2fd4170f9b2..82756eb1d5d 100644 --- a/docs/generators/javascript.md +++ b/docs/generators/javascript.md @@ -7,6 +7,8 @@ sidebar_label: javascript | ------ | ----------- | ------ | ------- | |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |apiPackage|package for generated api classes| |null| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |emitJSDoc|generate JSDoc comments| |true| |emitModelMethods|generate getters and setters for model properties| |false| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| diff --git a/docs/generators/jaxrs-cxf-cdi.md b/docs/generators/jaxrs-cxf-cdi.md index 41fd45fd373..703ae43da8d 100644 --- a/docs/generators/jaxrs-cxf-cdi.md +++ b/docs/generators/jaxrs-cxf-cdi.md @@ -20,6 +20,8 @@ sidebar_label: jaxrs-cxf-cdi |developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org| |developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org| |disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| diff --git a/docs/generators/jaxrs-cxf-client.md b/docs/generators/jaxrs-cxf-client.md index fa1460bdb30..f4c76df0005 100644 --- a/docs/generators/jaxrs-cxf-client.md +++ b/docs/generators/jaxrs-cxf-client.md @@ -20,6 +20,8 @@ sidebar_label: jaxrs-cxf-client |developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org| |developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org| |disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| diff --git a/docs/generators/jaxrs-cxf-extended.md b/docs/generators/jaxrs-cxf-extended.md index 192f1998a1c..ee4f8c806ea 100644 --- a/docs/generators/jaxrs-cxf-extended.md +++ b/docs/generators/jaxrs-cxf-extended.md @@ -21,6 +21,8 @@ sidebar_label: jaxrs-cxf-extended |developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org| |developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org| |disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| diff --git a/docs/generators/jaxrs-cxf.md b/docs/generators/jaxrs-cxf.md index 2254f2ac3a8..1b92b5adb0c 100644 --- a/docs/generators/jaxrs-cxf.md +++ b/docs/generators/jaxrs-cxf.md @@ -21,6 +21,8 @@ sidebar_label: jaxrs-cxf |developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org| |developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org| |disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| diff --git a/docs/generators/jaxrs-jersey.md b/docs/generators/jaxrs-jersey.md index 23a9b9c7d76..38904348f0c 100644 --- a/docs/generators/jaxrs-jersey.md +++ b/docs/generators/jaxrs-jersey.md @@ -20,6 +20,8 @@ sidebar_label: jaxrs-jersey |developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org| |developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org| |disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| diff --git a/docs/generators/jaxrs-resteasy-eap.md b/docs/generators/jaxrs-resteasy-eap.md index b243da65f08..94d017ba9b2 100644 --- a/docs/generators/jaxrs-resteasy-eap.md +++ b/docs/generators/jaxrs-resteasy-eap.md @@ -20,6 +20,8 @@ sidebar_label: jaxrs-resteasy-eap |developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org| |developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org| |disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| diff --git a/docs/generators/jaxrs-resteasy.md b/docs/generators/jaxrs-resteasy.md index f65d96401bc..d926832f249 100644 --- a/docs/generators/jaxrs-resteasy.md +++ b/docs/generators/jaxrs-resteasy.md @@ -20,6 +20,8 @@ sidebar_label: jaxrs-resteasy |developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org| |developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org| |disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| diff --git a/docs/generators/jaxrs-spec.md b/docs/generators/jaxrs-spec.md index 31d624bca53..c33c645b7df 100644 --- a/docs/generators/jaxrs-spec.md +++ b/docs/generators/jaxrs-spec.md @@ -20,6 +20,8 @@ sidebar_label: jaxrs-spec |developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org| |developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org| |disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| diff --git a/docs/generators/jmeter.md b/docs/generators/jmeter.md index c3a201424d6..aa08a31ad00 100644 --- a/docs/generators/jmeter.md +++ b/docs/generators/jmeter.md @@ -6,6 +6,8 @@ sidebar_label: jmeter | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| diff --git a/docs/generators/k6.md b/docs/generators/k6.md index 7e53e811f52..92b6eef3323 100644 --- a/docs/generators/k6.md +++ b/docs/generators/k6.md @@ -6,6 +6,8 @@ sidebar_label: k6 | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| diff --git a/docs/generators/markdown.md b/docs/generators/markdown.md index 8e3566df531..42b38b611cc 100644 --- a/docs/generators/markdown.md +++ b/docs/generators/markdown.md @@ -6,6 +6,8 @@ sidebar_label: markdown | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| diff --git a/docs/generators/nim.md b/docs/generators/nim.md index 6a36b277593..f92d1bdf31a 100644 --- a/docs/generators/nim.md +++ b/docs/generators/nim.md @@ -6,6 +6,8 @@ sidebar_label: nim | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| diff --git a/docs/generators/nodejs-express-server.md b/docs/generators/nodejs-express-server.md index 5c5b3e44a5f..b90bafa673a 100644 --- a/docs/generators/nodejs-express-server.md +++ b/docs/generators/nodejs-express-server.md @@ -6,6 +6,8 @@ sidebar_label: nodejs-express-server | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| diff --git a/docs/generators/nodejs-server-deprecated.md b/docs/generators/nodejs-server-deprecated.md index 74b494ef0d2..f109ef771fd 100644 --- a/docs/generators/nodejs-server-deprecated.md +++ b/docs/generators/nodejs-server-deprecated.md @@ -6,6 +6,8 @@ sidebar_label: nodejs-server-deprecated | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |exportedName|When the generated code will be deployed to Google Cloud Functions, this option can be used to update the name of the exported function. By default, it refers to the basePath. This does not affect normal standalone nodejs server code.| |null| |googleCloudFunctions|When specified, it will generate the code which runs within Google Cloud Functions instead of standalone Node.JS server. See https://cloud.google.com/functions/docs/quickstart for the details of how to deploy the generated code.| |false| diff --git a/docs/generators/ocaml.md b/docs/generators/ocaml.md index 6dcc9dd7ae5..9d6ac07fb39 100644 --- a/docs/generators/ocaml.md +++ b/docs/generators/ocaml.md @@ -6,6 +6,8 @@ sidebar_label: ocaml | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| diff --git a/docs/generators/openapi-yaml.md b/docs/generators/openapi-yaml.md index 704efea2209..6c2056c1d9b 100644 --- a/docs/generators/openapi-yaml.md +++ b/docs/generators/openapi-yaml.md @@ -6,6 +6,8 @@ sidebar_label: openapi-yaml | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |outputFile|Output filename| |openapi/openapi.yaml| diff --git a/docs/generators/openapi.md b/docs/generators/openapi.md index e2a97f80bb1..d4d4c7aa603 100644 --- a/docs/generators/openapi.md +++ b/docs/generators/openapi.md @@ -6,6 +6,8 @@ sidebar_label: openapi | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| diff --git a/docs/generators/php-laravel.md b/docs/generators/php-laravel.md index cc5e5f1e1b5..550361b7a32 100644 --- a/docs/generators/php-laravel.md +++ b/docs/generators/php-laravel.md @@ -8,6 +8,8 @@ sidebar_label: php-laravel |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |apiPackage|package for generated api classes| |null| |artifactVersion|The version to use in the composer package version field. e.g. 1.2.3| |null| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |invokerPackage|The main namespace to use for all classes. e.g. Yay\Pets| |null| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| diff --git a/docs/generators/php-lumen.md b/docs/generators/php-lumen.md index d85b094b070..2f30bbb7818 100644 --- a/docs/generators/php-lumen.md +++ b/docs/generators/php-lumen.md @@ -8,6 +8,8 @@ sidebar_label: php-lumen |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |apiPackage|package for generated api classes| |null| |artifactVersion|The version to use in the composer package version field. e.g. 1.2.3| |null| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |invokerPackage|The main namespace to use for all classes. e.g. Yay\Pets| |null| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| diff --git a/docs/generators/php-silex-deprecated.md b/docs/generators/php-silex-deprecated.md index 1a18db41c36..69d16ec9bbb 100644 --- a/docs/generators/php-silex-deprecated.md +++ b/docs/generators/php-silex-deprecated.md @@ -6,6 +6,8 @@ sidebar_label: php-silex-deprecated | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| diff --git a/docs/generators/php-slim-deprecated.md b/docs/generators/php-slim-deprecated.md index d97ebb8060d..834d7d17e87 100644 --- a/docs/generators/php-slim-deprecated.md +++ b/docs/generators/php-slim-deprecated.md @@ -8,6 +8,8 @@ sidebar_label: php-slim-deprecated |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |apiPackage|package for generated api classes| |null| |artifactVersion|The version to use in the composer package version field. e.g. 1.2.3| |null| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |invokerPackage|The main namespace to use for all classes. e.g. Yay\Pets| |null| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| diff --git a/docs/generators/php-slim4.md b/docs/generators/php-slim4.md index ff5ee683ab1..4bb03dc60e2 100644 --- a/docs/generators/php-slim4.md +++ b/docs/generators/php-slim4.md @@ -8,6 +8,8 @@ sidebar_label: php-slim4 |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |apiPackage|package for generated api classes| |null| |artifactVersion|The version to use in the composer package version field. e.g. 1.2.3| |null| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |invokerPackage|The main namespace to use for all classes. e.g. Yay\Pets| |null| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| diff --git a/docs/generators/php-symfony.md b/docs/generators/php-symfony.md index 1c781a04c97..dd0faa80256 100644 --- a/docs/generators/php-symfony.md +++ b/docs/generators/php-symfony.md @@ -12,6 +12,8 @@ sidebar_label: php-symfony |bundleName|The name of the Symfony bundle. The template uses {{bundleName}}| |null| |composerProjectName|The project name used in the composer package name. The template uses {{composerVendorName}}/{{composerProjectName}} for the composer package name. e.g. petstore-client| |null| |composerVendorName|The vendor name used in the composer package name. The template uses {{composerVendorName}}/{{composerProjectName}} for the composer package name. e.g. yaypets| |null| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| |invokerPackage|The main namespace to use for all classes. e.g. Yay\Pets| |null| diff --git a/docs/generators/php-ze-ph.md b/docs/generators/php-ze-ph.md index 04fd2bda5b5..04ce9d997d9 100644 --- a/docs/generators/php-ze-ph.md +++ b/docs/generators/php-ze-ph.md @@ -8,6 +8,8 @@ sidebar_label: php-ze-ph |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |apiPackage|package for generated api classes| |null| |artifactVersion|The version to use in the composer package version field. e.g. 1.2.3| |null| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |invokerPackage|The main namespace to use for all classes. e.g. Yay\Pets| |null| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| diff --git a/docs/generators/php.md b/docs/generators/php.md index 329969e42fd..6d84ee3fbf4 100644 --- a/docs/generators/php.md +++ b/docs/generators/php.md @@ -8,6 +8,8 @@ sidebar_label: php |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |apiPackage|package for generated api classes| |null| |artifactVersion|The version to use in the composer package version field. e.g. 1.2.3| |null| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |hideGenerationTimestamp|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |true| |invokerPackage|The main namespace to use for all classes. e.g. Yay\Pets| |null| diff --git a/docs/generators/plantuml.md b/docs/generators/plantuml.md index d559ea7ebb3..6f2f76823cf 100644 --- a/docs/generators/plantuml.md +++ b/docs/generators/plantuml.md @@ -6,6 +6,8 @@ sidebar_label: plantuml | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| diff --git a/docs/generators/python-aiohttp.md b/docs/generators/python-aiohttp.md index 288f4e1f8b9..562d371110d 100644 --- a/docs/generators/python-aiohttp.md +++ b/docs/generators/python-aiohttp.md @@ -8,6 +8,8 @@ sidebar_label: python-aiohttp |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |controllerPackage|controller package| |controllers| |defaultController|default controller| |default_controller| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |packageName|python package name (convention: snake_case).| |openapi_server| diff --git a/docs/generators/python-blueplanet.md b/docs/generators/python-blueplanet.md index c0ec66d38c1..c4f3ef71d83 100644 --- a/docs/generators/python-blueplanet.md +++ b/docs/generators/python-blueplanet.md @@ -8,6 +8,8 @@ sidebar_label: python-blueplanet |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |controllerPackage|controller package| |controllers| |defaultController|default controller| |default_controller| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |packageName|python package name (convention: snake_case).| |openapi_server| diff --git a/docs/generators/python-flask.md b/docs/generators/python-flask.md index cc7c312d982..77ea8871a3e 100644 --- a/docs/generators/python-flask.md +++ b/docs/generators/python-flask.md @@ -8,6 +8,8 @@ sidebar_label: python-flask |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |controllerPackage|controller package| |controllers| |defaultController|default controller| |default_controller| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |packageName|python package name (convention: snake_case).| |openapi_server| diff --git a/docs/generators/ruby.md b/docs/generators/ruby.md index 72dc31253a7..a4808ee1af3 100644 --- a/docs/generators/ruby.md +++ b/docs/generators/ruby.md @@ -6,6 +6,8 @@ sidebar_label: ruby | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |gemAuthor|gem author (only one is supported).| |null| |gemAuthorEmail|gem author email (only one is supported).| |null| diff --git a/docs/generators/rust.md b/docs/generators/rust.md index b93f900f3b1..b59b31471f0 100644 --- a/docs/generators/rust.md +++ b/docs/generators/rust.md @@ -9,6 +9,7 @@ sidebar_label: rust |library|library template (sub-template) to use.|
**hyper**
HTTP client: Hyper.
**reqwest**
HTTP client: Reqwest.
|hyper| |packageName|Rust package name (convention: lowercase).| |openapi| |packageVersion|Rust package version.| |1.0.0| +|supportAsync|If set, generate async function call instead| |false| |useSingleRequestParameter|Setting this property to true will generate functions with a single argument containing all API endpoint parameters instead of one argument per parameter.| |false| ## IMPORT MAPPING diff --git a/docs/generators/scala-akka-http-server.md b/docs/generators/scala-akka-http-server.md index ce885201ee9..96e31f09055 100644 --- a/docs/generators/scala-akka-http-server.md +++ b/docs/generators/scala-akka-http-server.md @@ -11,6 +11,8 @@ sidebar_label: scala-akka-http-server |artifactId|artifactId| |openapi-scala-akka-http-server| |artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0| |dateLibrary|Option. Date library to use|
**joda**
Joda (for legacy app)
**java8**
Java 8 native JSR310 (prefered for JDK 1.8+)
|java8| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |groupId|groupId in generated pom.xml| |org.openapitools| |invokerPackage|root package for generated code| |org.openapitools.server| diff --git a/docs/generators/scala-akka.md b/docs/generators/scala-akka.md index 0faa17e202b..2bad9c82b6a 100644 --- a/docs/generators/scala-akka.md +++ b/docs/generators/scala-akka.md @@ -8,6 +8,8 @@ sidebar_label: scala-akka |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |apiPackage|package for generated api classes| |null| |dateLibrary|Option. Date library to use|
**joda**
Joda (for legacy app)
**java8**
Java 8 native JSR310 (prefered for JDK 1.8+)
|java8| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |mainPackage|Top-level package name, which defines 'apiPackage', 'modelPackage', 'invokerPackage'| |org.openapitools.client| diff --git a/docs/generators/scala-gatling.md b/docs/generators/scala-gatling.md index 3a957c1cb09..b59c37ee122 100644 --- a/docs/generators/scala-gatling.md +++ b/docs/generators/scala-gatling.md @@ -8,6 +8,8 @@ sidebar_label: scala-gatling |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |apiPackage|package for generated api classes| |null| |dateLibrary|Option. Date library to use|
**joda**
Joda (for legacy app)
**java8**
Java 8 native JSR310 (prefered for JDK 1.8+)
|java8| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |modelPackage|package for generated models| |null| diff --git a/docs/generators/scala-httpclient-deprecated.md b/docs/generators/scala-httpclient-deprecated.md index 0a4015fbac0..e0d631f8645 100644 --- a/docs/generators/scala-httpclient-deprecated.md +++ b/docs/generators/scala-httpclient-deprecated.md @@ -8,6 +8,8 @@ sidebar_label: scala-httpclient-deprecated |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |apiPackage|package for generated api classes| |null| |dateLibrary|Option. Date library to use|
**joda**
Joda (for legacy app)
**java8**
Java 8 native JSR310 (prefered for JDK 1.8+)
|java8| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |modelPackage|package for generated models| |null| diff --git a/docs/generators/scala-lagom-server.md b/docs/generators/scala-lagom-server.md index cef8bf855c0..2ed7519b665 100644 --- a/docs/generators/scala-lagom-server.md +++ b/docs/generators/scala-lagom-server.md @@ -8,6 +8,8 @@ sidebar_label: scala-lagom-server |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |apiPackage|package for generated api classes| |null| |dateLibrary|Option. Date library to use|
**joda**
Joda (for legacy app)
**java8**
Java 8 native JSR310 (prefered for JDK 1.8+)
|java8| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |modelPackage|package for generated models| |null| diff --git a/docs/generators/scala-play-server.md b/docs/generators/scala-play-server.md index dea0eb49248..d46eb3a9fbe 100644 --- a/docs/generators/scala-play-server.md +++ b/docs/generators/scala-play-server.md @@ -8,6 +8,8 @@ sidebar_label: scala-play-server |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |apiPackage|package for generated api classes| |null| |basePackage|Base package in which supporting classes are generated.| |org.openapitools| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |generateCustomExceptions|If set, generates custom exception types.| |true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| diff --git a/docs/generators/scala-sttp.md b/docs/generators/scala-sttp.md index 27a8b862b10..05cbbe99dea 100644 --- a/docs/generators/scala-sttp.md +++ b/docs/generators/scala-sttp.md @@ -8,6 +8,8 @@ sidebar_label: scala-sttp |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |apiPackage|package for generated api classes| |null| |dateLibrary|Option. Date library to use|
**joda**
Joda (for legacy app)
**java8**
Java 8 native JSR310 (prefered for JDK 1.8+)
|java8| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |mainPackage|Top-level package name, which defines 'apiPackage', 'modelPackage', 'invokerPackage'| |org.openapitools.client| diff --git a/docs/generators/scalatra.md b/docs/generators/scalatra.md index 39eb4dc8ca6..f9edf8f3875 100644 --- a/docs/generators/scalatra.md +++ b/docs/generators/scalatra.md @@ -8,6 +8,8 @@ sidebar_label: scalatra |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |apiPackage|package for generated api classes| |null| |dateLibrary|Option. Date library to use|
**joda**
Joda (for legacy app)
**java8**
Java 8 native JSR310 (prefered for JDK 1.8+)
|java8| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |modelPackage|package for generated models| |null| diff --git a/docs/generators/scalaz.md b/docs/generators/scalaz.md index f8279d1df61..1d62a3e5ff0 100644 --- a/docs/generators/scalaz.md +++ b/docs/generators/scalaz.md @@ -8,6 +8,8 @@ sidebar_label: scalaz |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |apiPackage|package for generated api classes| |null| |dateLibrary|Option. Date library to use|
**joda**
Joda (for legacy app)
**java8**
Java 8 native JSR310 (prefered for JDK 1.8+)
|java8| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |modelPackage|package for generated models| |null| diff --git a/docs/generators/spring.md b/docs/generators/spring.md index ed4b48bc018..fb93b92db40 100644 --- a/docs/generators/spring.md +++ b/docs/generators/spring.md @@ -25,6 +25,8 @@ sidebar_label: spring |developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org| |developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org| |disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| diff --git a/docs/generators/swift4-deprecated.md b/docs/generators/swift4-deprecated.md index a4da5435f68..2ad3deb81c7 100644 --- a/docs/generators/swift4-deprecated.md +++ b/docs/generators/swift4-deprecated.md @@ -6,6 +6,8 @@ sidebar_label: swift4-deprecated | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| diff --git a/docs/generators/swift5.md b/docs/generators/swift5.md index 9b172cdf785..53e8733dec2 100644 --- a/docs/generators/swift5.md +++ b/docs/generators/swift5.md @@ -7,6 +7,8 @@ sidebar_label: swift5 | ------ | ----------- | ------ | ------- | |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |apiNamePrefix|Prefix that will be appended to all API names ('tags'). Default: empty string. e.g. Pet => Pet.| |null| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| diff --git a/docs/generators/typescript-angular.md b/docs/generators/typescript-angular.md index 9fbecda0707..79974ab1641 100644 --- a/docs/generators/typescript-angular.md +++ b/docs/generators/typescript-angular.md @@ -7,6 +7,8 @@ sidebar_label: typescript-angular | ------ | ----------- | ------ | ------- | |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |apiModulePrefix|The prefix of the generated ApiModule.| |null| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |enumNameSuffix|Suffix that will be appended to all enum names.| |Enum| |enumPropertyNaming|Naming convention for enum properties: 'camelCase', 'PascalCase', 'snake_case', 'UPPERCASE', and 'original'| |PascalCase| @@ -15,7 +17,7 @@ sidebar_label: typescript-angular |modelFileSuffix|The suffix of the file of the generated model (model<suffix>.ts).| |null| |modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name. Only change it if you provide your own run-time code for (de-)serialization of models| |original| |modelSuffix|The suffix of the generated model.| |null| -|ngVersion|The version of Angular.| |9.0.0| +|ngVersion|The version of Angular. (At least 6.0.0)| |9.0.0| |npmName|The name under which you want to publish generated npm package. Required to generate a full package| |null| |npmRepository|Use this property to set an url your private npmRepo in the package.json| |null| |npmVersion|The version of your npm package. If not provided, using the version from the OpenAPI specification file.| |1.0.0| diff --git a/docs/generators/typescript-angularjs.md b/docs/generators/typescript-angularjs.md index 08a4bdad894..bd9f87fdb25 100644 --- a/docs/generators/typescript-angularjs.md +++ b/docs/generators/typescript-angularjs.md @@ -6,6 +6,8 @@ sidebar_label: typescript-angularjs | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |enumNameSuffix|Suffix that will be appended to all enum names.| |Enum| |enumPropertyNaming|Naming convention for enum properties: 'camelCase', 'PascalCase', 'snake_case', 'UPPERCASE', and 'original'| |PascalCase| diff --git a/docs/generators/typescript-aurelia.md b/docs/generators/typescript-aurelia.md index 55cc57522bb..3e39180156b 100644 --- a/docs/generators/typescript-aurelia.md +++ b/docs/generators/typescript-aurelia.md @@ -6,6 +6,8 @@ sidebar_label: typescript-aurelia | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |enumNameSuffix|Suffix that will be appended to all enum names.| |Enum| |enumPropertyNaming|Naming convention for enum properties: 'camelCase', 'PascalCase', 'snake_case', 'UPPERCASE', and 'original'| |PascalCase| diff --git a/docs/generators/typescript-axios.md b/docs/generators/typescript-axios.md index 896b46d3eb6..b2ab58b6adc 100644 --- a/docs/generators/typescript-axios.md +++ b/docs/generators/typescript-axios.md @@ -6,6 +6,8 @@ sidebar_label: typescript-axios | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |enumNameSuffix|Suffix that will be appended to all enum names.| |Enum| |enumPropertyNaming|Naming convention for enum properties: 'camelCase', 'PascalCase', 'snake_case', 'UPPERCASE', and 'original'| |PascalCase| diff --git a/docs/generators/typescript-fetch.md b/docs/generators/typescript-fetch.md index 5fe6e898708..037b7d01ca6 100644 --- a/docs/generators/typescript-fetch.md +++ b/docs/generators/typescript-fetch.md @@ -6,6 +6,8 @@ sidebar_label: typescript-fetch | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |enumNameSuffix|Suffix that will be appended to all enum names.| |Enum| |enumPropertyNaming|Naming convention for enum properties: 'camelCase', 'PascalCase', 'snake_case', 'UPPERCASE', and 'original'| |PascalCase| diff --git a/docs/generators/typescript-inversify.md b/docs/generators/typescript-inversify.md index a979fd102cb..3788b8a67d5 100644 --- a/docs/generators/typescript-inversify.md +++ b/docs/generators/typescript-inversify.md @@ -6,6 +6,8 @@ sidebar_label: typescript-inversify | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |enumNameSuffix|Suffix that will be appended to all enum names.| |Enum| |enumPropertyNaming|Naming convention for enum properties: 'camelCase', 'PascalCase', 'snake_case', 'UPPERCASE', and 'original'| |PascalCase| diff --git a/docs/generators/typescript-jquery.md b/docs/generators/typescript-jquery.md index 5616ceb5862..16460679ccd 100644 --- a/docs/generators/typescript-jquery.md +++ b/docs/generators/typescript-jquery.md @@ -6,6 +6,8 @@ sidebar_label: typescript-jquery | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |enumNameSuffix|Suffix that will be appended to all enum names.| |Enum| |enumPropertyNaming|Naming convention for enum properties: 'camelCase', 'PascalCase', 'snake_case', 'UPPERCASE', and 'original'| |PascalCase| diff --git a/docs/generators/typescript-node.md b/docs/generators/typescript-node.md index 4462d0e3798..af0f5286f1b 100644 --- a/docs/generators/typescript-node.md +++ b/docs/generators/typescript-node.md @@ -6,6 +6,8 @@ sidebar_label: typescript-node | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |enumNameSuffix|Suffix that will be appended to all enum names.| |Enum| |enumPropertyNaming|Naming convention for enum properties: 'camelCase', 'PascalCase', 'snake_case', 'UPPERCASE', and 'original'| |PascalCase| diff --git a/docs/generators/typescript-redux-query.md b/docs/generators/typescript-redux-query.md index 15900a22a7d..8f35944f8b7 100644 --- a/docs/generators/typescript-redux-query.md +++ b/docs/generators/typescript-redux-query.md @@ -6,6 +6,8 @@ sidebar_label: typescript-redux-query | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |enumNameSuffix|Suffix that will be appended to all enum names.| |Enum| |enumPropertyNaming|Naming convention for enum properties: 'camelCase', 'PascalCase', 'snake_case', 'UPPERCASE', and 'original'| |PascalCase| diff --git a/docs/generators/typescript-rxjs.md b/docs/generators/typescript-rxjs.md index e080a0761bd..41d58058a86 100644 --- a/docs/generators/typescript-rxjs.md +++ b/docs/generators/typescript-rxjs.md @@ -6,6 +6,8 @@ sidebar_label: typescript-rxjs | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| +|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document +If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |enumNameSuffix|Suffix that will be appended to all enum names.| |Enum| |enumPropertyNaming|Naming convention for enum properties: 'camelCase', 'PascalCase', 'snake_case', 'UPPERCASE', and 'original'| |PascalCase| diff --git a/docs/templating.md b/docs/templating.md index 89be66a3285..cd93f62ed6d 100644 --- a/docs/templating.md +++ b/docs/templating.md @@ -50,13 +50,41 @@ java -cp /path/totemplate-classpath-example-1.0-SNAPSHOT.jar:modules/openapi-gen Note that our template directory is relative to the resource directory of the JAR defined on the classpath. +### Retrieving Templates + +You will need to find and retrieve the templates for your desired generator in order to redefine structures, documentation, or API logic. We cover template customization in the following sections. + +In OpenAPI Generator 5.0 and later, you can use the CLI command `author template` to extract embedded templates for your target generator. For example: + +``` +openapi-generator author template -g java --library webclient +``` + +For OpenAPI Generator versions prior to 5.0, you will want to find the [resources directory](https://github.com/OpenAPITools/openapi-generator/tree/master/modules/openapi-generator/src/main/resources) for the generator you want to extend. This is generally easy to find as directories commonly follow the convention of `resources/`. In cases where you're unsure, you will need to find the `embeddedTemplateDir` assignment in your desired generator. This is almost always assigned in the constructor of the generator class. The C# .Net Core generator assigns this as: + +``` +embeddedTemplateDir = templateDir = "csharp-netcore"; +``` + +These templates are in our source repository at [modules/openapi-generator/src/main/resources/csharp-netcore](https://github.com/OpenAPITools/openapi-generator/tree/master/modules/openapi-generator/src/main/resources/csharp-netcore). Be sure to select the tag or branch for the version of OpenAPI Generator you're using before grabbing the templates. + +**NOTE** If you have specific logic you'd like to modify such as modifying the generated README, you _only_ need to pull and modify this individual template. OpenAPI Generator will lookup templates in this order: + +* User customized library path (e.g. `custom_template/libraries/feign/model.mustache`) +* User customized generator top-level path (e.g. `custom_template/model.mustache`) +* Embedded library path (e.g. `resources/Java/libraries/feign/model.mustache`) +* Embedded top-level path (e.g. `resources/Java/model.mustache`) +* Common embedded path (e.g. `resources/_common/model.mustache`) + ### Custom Logic For this example, let's modify a Java client to use AOP via [jcabi/jcabi-aspects](https://github.com/jcabi/jcabi-aspects). We'll log API method execution at the `INFO` level. The jcabi-aspects project could also be used to implement method retries on failures; this would be a great exercise to further play around with templating. The Java generator supports a `library` option. This option works by defining base templates, then applying library-specific template overrides. This allows for template reuse for libraries sharing the same programming language. Templates defined as a library need only modify or extend the templates concerning the library, and generation falls back to the root templates (the "defaults") when not extended by the library. Generators which support the `library` option will only support the libraries known by the generator at compile time, and will throw a runtime error if you try to provide a custom library name. -To get started, we will need to copy our target generator's directory in full. The directory will be located under `modules/opeanpi-generator/src/main/resources/{generator}`. In general, the generator directory matches the generator name (what you would pass to the `generator` option), but this is not a requirement-- if you are having a hard time finding the template directory, look at the `embeddedTemplateDir` option in your target generator's implementation. +To get started, we will need to copy our target generator's directory in full. + +The directory will be located under `modules/opeanpi-generator/src/main/resources/{generator}`. In general, the generator directory matches the generator name (what you would pass to the `generator` option), but this is not a requirement-- if you are having a hard time finding the template directory, look at the `embeddedTemplateDir` option in your target generator's implementation. If you've already cloned openapi-generator, find and copy the `modules/opeanpi-generator/src/main/resources/Java` directory. If you have the [Refined GitHub](https://github.com/sindresorhus/refined-github) Chrome or Firefox Extension, you can navigate to this directory on GitHub and click the "Download" button. Or, to pull the directory from latest master: diff --git a/docs/usage.md b/docs/usage.md index cddfd145ca9..4522d551009 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -15,13 +15,14 @@ openapi-generator help usage: openapi-generator-cli [] The most commonly used openapi-generator-cli commands are: + author Utilities for authoring generators or customizing templates. config-help Config help for chosen lang generate Generate code with the specified generator. - help Display help information + help Display help information about openapi-generator list Lists the available generators meta MetaGenerator. Generator for creating a new template set and configuration for Codegen. The output will be based on the language you specify, and includes default templates to include. validate Validate specification - version Show version information + version Show version information used in tooling See 'openapi-generator-cli help ' for more information on a specific command. @@ -670,3 +671,87 @@ EOF openapi-generator batch *.yaml ``` +## author + +This command group contains utilities for authoring generators or customizing templates. + +``` +openapi-generator help author +NAME + openapi-generator-cli author - Utilities for authoring generators or + customizing templates. + +SYNOPSIS + openapi-generator-cli author + openapi-generator-cli author template [(-v | --verbose)] + [(-o | --output )] + [--library ] + (-g | --generator-name ) + +OPTIONS + --help + Display help about the tool + + --version + Display full version output + +COMMANDS + With no arguments, Display help information about openapi-generator + + template + Retrieve templates for local modification + + With --verbose option, verbose mode + + With --output option, where to write the template files (defaults to + 'out') + + With --library option, library template (sub-template) + + With --generator-name option, generator to use (see list command for + list) +``` + +### template + +This command allows user to extract templates from the CLI jar which simplifies customization efforts. + +``` +NAME + openapi-generator-cli author template - Retrieve templates for local + modification + +SYNOPSIS + openapi-generator-cli author template + (-g | --generator-name ) + [--library ] + [(-o | --output )] + [(-v | --verbose)] + +OPTIONS + -g , --generator-name + generator to use (see list command for list) + + --library + library template (sub-template) + + -o , --output + where to write the template files (defaults to 'out') + + -v, --verbose + verbose mode +``` + +Example: + +Extract Java templates, limiting to the `webclient` library. + +``` +openapi-generator author template -g java --library webclient +``` + +Extract all Java templates: + +``` +openapi-generator author template -g java +``` diff --git a/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/OpenAPIGenerator.java b/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/OpenAPIGenerator.java index f0e42adb4a9..335b1232de6 100644 --- a/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/OpenAPIGenerator.java +++ b/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/OpenAPIGenerator.java @@ -57,6 +57,11 @@ public class OpenAPIGenerator { GenerateBatch.class ); + builder.withGroup("author") + .withDescription("Utilities for authoring generators or customizing templates.") + .withDefaultCommand(HelpCommand.class) + .withCommands(AuthorTemplate.class); + try { builder.build().parse(args).run(); diff --git a/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/AuthorTemplate.java b/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/AuthorTemplate.java new file mode 100644 index 00000000000..50b6b4a2815 --- /dev/null +++ b/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/AuthorTemplate.java @@ -0,0 +1,168 @@ +package org.openapitools.codegen.cmd; + +import io.airlift.airline.Command; +import io.airlift.airline.Option; +import org.apache.commons.lang3.StringUtils; +import org.openapitools.codegen.CodegenConfig; +import org.openapitools.codegen.CodegenConfigLoader; +import org.openapitools.codegen.CodegenConstants; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.io.File; +import java.io.IOException; +import java.net.URI; +import java.net.URISyntaxException; +import java.nio.file.*; +import java.nio.file.spi.FileSystemProvider; +import java.util.*; +import java.util.regex.Pattern; +import java.util.stream.Stream; + +@SuppressWarnings({"FieldMayBeFinal", "FieldCanBeLocal", "unused"}) +@Command(name = "template", description = "Retrieve templates for local modification") +public class AuthorTemplate extends OpenApiGeneratorCommand { + + private static final Logger LOGGER = LoggerFactory.getLogger(AuthorTemplate.class); + + @Option(name = {"-g", "--generator-name"}, title = "generator name", + description = "generator to use (see list command for list)", + required = true) + private String generatorName; + + @Option(name = {"--library"}, title = "library", description = CodegenConstants.LIBRARY_DESC) + private String library; + + @Option(name = {"-o", "--output"}, title = "output directory", + description = "where to write the template files (defaults to 'out')") + private String output = ""; + + @Option(name = {"-v", "--verbose"}, description = "verbose mode") + private boolean verbose; + + private Pattern pattern = null; + + @Override + void execute() { + CodegenConfig config = CodegenConfigLoader.forName(generatorName); + String templateDirectory = config.templateDir(); + + log("Requesting '{}' from embedded resource directory '{}'", generatorName, templateDirectory); + + Path embeddedTemplatePath; + try { + URI uri = Objects.requireNonNull(this.getClass().getClassLoader().getResource(templateDirectory)).toURI(); + + if ("jar".equals(uri.getScheme())) { + Optional provider = FileSystemProvider.installedProviders() + .stream() + .filter(p -> p.getScheme().equalsIgnoreCase("jar")) + .findFirst(); + + if (!provider.isPresent()) { + throw new ProviderNotFoundException("Unable to load jar file system provider"); + } + + try { + provider.get().getFileSystem(uri); + } catch (FileSystemNotFoundException ex) { + // File system wasn't loaded, so create it. + provider.get().newFileSystem(uri, Collections.emptyMap()); + } + } + + embeddedTemplatePath = Paths.get(uri); + + log("Copying from jar location {}", embeddedTemplatePath.toAbsolutePath().toString()); + + File outputDir; + if (StringUtils.isNotEmpty(output)) { + outputDir = new File(output); + } else { + outputDir = new File("out"); + } + + Path outputDirPath = outputDir.toPath(); + if (!Files.exists(outputDirPath)) { + Files.createDirectories(outputDirPath); + } + List generatedFiles = new ArrayList<>(); + try (final Stream templates = Files.walk(embeddedTemplatePath)) { + templates.forEach(template -> { + log("Found template: {}", template.toAbsolutePath()); + Path relativePath = embeddedTemplatePath.relativize(template); + if (shouldCopy(relativePath)) { + Path target = outputDirPath.resolve(relativePath.toString()); + generatedFiles.add(target); + try { + if (Files.isDirectory(template)) { + if (Files.notExists(target)) { + log("Creating directory: {}", target.toAbsolutePath()); + Files.createDirectories(target); + } + } else { + if (target.getParent() != null && Files.notExists(target.getParent())) { + log("Creating directory: {}", target.getParent()); + Files.createDirectories(target.getParent()); + } + log("Copying to: {}", target.toAbsolutePath()); + Files.copy(template, target, StandardCopyOption.REPLACE_EXISTING); + } + } catch (IOException e) { + LOGGER.error("Unable to create target location '{}'.", target); + } + } else { + log("Directory is excluded by library option: {}", relativePath); + } + }); + } + + if (StringUtils.isNotEmpty(library) && !generatedFiles.isEmpty()) { + Path librariesPath = outputDirPath.resolve("libraries"); + Path targetLibrary = librariesPath.resolve(library); + String librariesPrefix = librariesPath.toString(); + if (!Files.isDirectory(targetLibrary)) { + LOGGER.warn("The library '{}' was not extracted. Please verify the spelling and retry.", targetLibrary); + } + generatedFiles.stream() + .filter(p -> p.startsWith(librariesPrefix)) + .forEach(p -> { + if (p.startsWith(targetLibrary)) { + // We don't care about empty directories, and not need to check directory for files. + if (!Files.isDirectory(p)) { + // warn if the file was not written + if (Files.notExists(p)) { + LOGGER.warn("An expected library file was not extracted: {}", p.toAbsolutePath()); + } + } + } else { + LOGGER.warn("The library filter '{}' extracted an unexpected library path: {}", library, p.toAbsolutePath()); + } + }); + } + + LOGGER.info("Extracted templates to '{}' directory. Refer to https://openapi-generator.tech/docs/templating for customization details.", outputDirPath); + } catch (URISyntaxException | IOException e) { + LOGGER.error("Unable to load embedded template directory.", e); + } + } + + private void log(String format, Object... arguments) { + if (verbose) { + LOGGER.info(format, arguments); + } + } + + private boolean shouldCopy(Path relativePath) { + String path = relativePath.toString(); + if (StringUtils.isNotEmpty(library) && path.contains("libraries")) { + if (pattern == null) { + pattern = Pattern.compile(String.format(Locale.ROOT, "libraries[/\\\\]{1}%s[/\\\\]{1}.*", Pattern.quote(library))); + } + + return pattern.matcher(path).matches(); + } + + return true; + } +} diff --git a/modules/openapi-generator-cli/src/test/java/org/openapitools/codegen/cmd/AuthorTemplateTest.java b/modules/openapi-generator-cli/src/test/java/org/openapitools/codegen/cmd/AuthorTemplateTest.java new file mode 100644 index 00000000000..4826464ad91 --- /dev/null +++ b/modules/openapi-generator-cli/src/test/java/org/openapitools/codegen/cmd/AuthorTemplateTest.java @@ -0,0 +1,71 @@ +package org.openapitools.codegen.cmd; + +import io.airlift.airline.Cli; +import org.testng.Assert; +import org.testng.ITestContext; +import org.testng.annotations.BeforeTest; +import org.testng.annotations.Test; + +import java.io.IOException; +import java.nio.file.Files; +import java.nio.file.Path; +import java.util.Arrays; + +public class AuthorTemplateTest { + Path outputDirectory; + + @BeforeTest + public void setUp(ITestContext ctx) throws IOException { + outputDirectory = Files.createTempDirectory("AuthorTemplateTest"); + outputDirectory.toFile().deleteOnExit(); + } + + @Test + public void smokeTestAuthorTemplateCommand(){ + Cli.CliBuilder builder = createBuilder(); + String[] arguments = new String[]{ + "author", + "template", + "-g", + "java", + "--library", + "webclient", + "--output", + outputDirectory.toAbsolutePath().toString() + }; + builder.build().parse(arguments).run(); + + // spot check root files + Assert.assertTrue(Files.exists(outputDirectory.resolve("ApiClient.mustache"))); + Assert.assertTrue(Files.exists(outputDirectory.resolve("api_doc.mustache"))); + Assert.assertTrue(Files.exists(outputDirectory.resolve("pom.mustache"))); + + Assert.assertTrue(Files.exists(outputDirectory.resolve("auth/OAuth.mustache"))); + + // check libraries files and subdirectories + Assert.assertTrue(Files.exists(outputDirectory.resolve("libraries/webclient/ApiClient.mustache"))); + Assert.assertTrue(Files.exists(outputDirectory.resolve("libraries/webclient/pom.mustache"))); + Assert.assertTrue(Files.exists(outputDirectory.resolve("libraries/webclient/auth/OAuth.mustache"))); + + // check non-existence of unselected libraries + Assert.assertFalse(Files.exists(outputDirectory.resolve("libraries/feign/build.gradle.mustache"))); + Assert.assertFalse(Files.exists(outputDirectory.resolve("libraries/feign/auth/OAuth.mustache"))); + + Assert.assertFalse(Files.exists(outputDirectory.resolve("libraries/jersey2/api_doc.mustache"))); + Assert.assertFalse(Files.exists(outputDirectory.resolve("libraries/jersey2/auth/HttpBasicAuth.mustache"))); + + Assert.assertFalse(Files.exists(outputDirectory.resolve("libraries/okhttp-gson/api.mustache"))); + Assert.assertFalse(Files.exists(outputDirectory.resolve("libraries/okhttp-gson/auth/RetryingOAuth.mustache"))); + } + + private Cli.CliBuilder createBuilder(){ + Cli.CliBuilder builder = new Cli.CliBuilder<>("openapi-generator-cli"); + + builder.withGroup("author") + .withDescription("Utilities for authoring generators or customizing templates.") + .withDefaultCommand(HelpCommand.class) + .withCommands(AuthorTemplate.class); + + return builder; + } +} diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConstants.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConstants.java index c0304aebb36..fded4a05766 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConstants.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConstants.java @@ -359,4 +359,20 @@ public class CodegenConstants { public static final String USE_SINGLE_REQUEST_PARAMETER = "useSingleRequestParameter"; public static final String USE_SINGLE_REQUEST_PARAMETER_DESC = "Setting this property to true will generate functions with a single argument containing all API endpoint parameters instead of one argument per parameter."; + public static final String DISALLOW_ADDITIONAL_PROPERTIES_IF_NOT_PRESENT = "disallowAdditionalPropertiesIfNotPresent"; + public static final String DISALLOW_ADDITIONAL_PROPERTIES_IF_NOT_PRESENT_DESC = + "Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document\n" + + + "If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. " + + + "If true: when the 'additionalProperties' keyword is not present in a schema, " + + "the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. " + + "Note: this mode is not compliant with the JSON schema specification. " + + "This is the original openapi-generator behavior." + + + "This setting is currently ignored for OAS 2.0 documents: " + + " 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. " + + " 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed." + + "Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project."; + } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenModel.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenModel.java index 68b26dbf496..e868c2b1131 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenModel.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenModel.java @@ -102,7 +102,31 @@ public class CodegenModel implements IJsonSchemaValidationProperties { public Map vendorExtensions = new HashMap(); - //The type of the value from additional properties. Used in map like objects. + /** + * The type of the value for the additionalProperties keyword in the OAS document. + * Used in map like objects, including composed schemas. + * + * In most programming languages, the additional (undeclared) properties are stored + * in a map data structure, such as HashMap in Java, map in golang, or a dict in Python. + * There are multiple ways to implement the additionalProperties keyword, depending + * on the programming language and mustache template. + * One way is to use class inheritance. For example in the generated Java code, the + * generated model class may extend from HashMap to store the additional properties. + * In that case 'CodegenModel.parent' is set to represent the class hierarchy. + * Another way is to use CodegenModel.additionalPropertiesType. A code generator + * such as Python does not use class inheritance to model additional properties. + * + * For example, in the OAS schema below, the schema has a declared 'id' property + * and additional, undeclared properties of type 'integer' are allowed. + * + * type: object + * properties: + * id: + * type: integer + * additionalProperties: + * type: integer + * + */ public String additionalPropertiesType; private Integer maxProperties; 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 08894cd58a4..7a3accd1b58 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 @@ -59,6 +59,7 @@ import org.openapitools.codegen.templating.MustacheEngineAdapter; import org.openapitools.codegen.templating.mustache.*; import org.openapitools.codegen.utils.ModelUtils; import org.openapitools.codegen.utils.OneOfImplementorAdditionalData; +import org.openapitools.codegen.utils.SemVer; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -176,8 +177,28 @@ public class DefaultCodegen implements CodegenConfig { protected List cliOptions = new ArrayList(); protected boolean skipOverwrite; protected boolean removeOperationIdPrefix; + + /** + * True if the code generator supports multiple class inheritance. + * This is used to model the parent hierarchy based on the 'allOf' composed schemas. + */ protected boolean supportsMultipleInheritance; + /** + * True if the code generator supports single class inheritance. + * This is used to model the parent hierarchy based on the 'allOf' composed schemas. + * Note: the single-class inheritance technique has inherent limitations because + * a 'allOf' composed schema may have multiple $ref child schemas, each one + * potentially representing a "parent" in the class inheritance hierarchy. + * Some language generators also use class inheritance to implement the `additionalProperties` + * keyword. For example, the Java code generator may generate 'extends HashMap'. + */ protected boolean supportsInheritance; + /** + * True if the language generator supports the 'additionalProperties' keyword + * as sibling of a composed (allOf/anyOf/oneOf) schema. + * Note: all language generators should support this to comply with the OAS specification. + */ + protected boolean supportsAdditionalPropertiesWithComposedSchema; protected boolean supportsMixins; protected Map supportedLibraries = new LinkedHashMap(); protected String library; @@ -218,6 +239,10 @@ public class DefaultCodegen implements CodegenConfig { // Support legacy logic for evaluating discriminators protected boolean legacyDiscriminatorBehavior = true; + // Specify what to do if the 'additionalProperties' keyword is not present in a schema. + // See CodegenConstants.java for more details. + protected boolean disallowAdditionalPropertiesIfNotPresent = true; + // make openapi available to all methods protected OpenAPI openAPI; @@ -314,6 +339,10 @@ public class DefaultCodegen implements CodegenConfig { this.setLegacyDiscriminatorBehavior(Boolean.valueOf(additionalProperties .get(CodegenConstants.LEGACY_DISCRIMINATOR_BEHAVIOR).toString())); } + if (additionalProperties.containsKey(CodegenConstants.DISALLOW_ADDITIONAL_PROPERTIES_IF_NOT_PRESENT)) { + this.setDisallowAdditionalPropertiesIfNotPresent(Boolean.valueOf(additionalProperties + .get(CodegenConstants.DISALLOW_ADDITIONAL_PROPERTIES_IF_NOT_PRESENT).toString())); + } } /*** @@ -687,9 +716,16 @@ public class DefaultCodegen implements CodegenConfig { } } + /** + * Set the OpenAPI document. + * This method is invoked when the input OpenAPI document has been parsed and validated. + */ @Override public void setOpenAPI(OpenAPI openAPI) { this.openAPI = openAPI; + // Set global settings such that helper functions in ModelUtils can lookup the value + // of the CLI option. + ModelUtils.setDisallowAdditionalPropertiesIfNotPresent(getDisallowAdditionalPropertiesIfNotPresent()); } // override with any special post-processing @@ -786,7 +822,7 @@ public class DefaultCodegen implements CodegenConfig { addOneOfInterfaceModel((ComposedSchema) items, nOneOf, openAPI); } } else if (ModelUtils.isMapSchema(s)) { - Schema addProps = ModelUtils.getAdditionalProperties(s); + Schema addProps = getAdditionalProperties(s); if (addProps != null && ModelUtils.isComposedSchema(addProps)) { addOneOfNameExtension((ComposedSchema) addProps, nOneOf); addOneOfInterfaceModel((ComposedSchema) addProps, nOneOf, openAPI); @@ -1126,6 +1162,14 @@ public class DefaultCodegen implements CodegenConfig { this.legacyDiscriminatorBehavior = val; } + public Boolean getDisallowAdditionalPropertiesIfNotPresent() { + return disallowAdditionalPropertiesIfNotPresent; + } + + public void setDisallowAdditionalPropertiesIfNotPresent(boolean val) { + this.disallowAdditionalPropertiesIfNotPresent = val; + } + public Boolean getAllowUnicodeIdentifiers() { return allowUnicodeIdentifiers; } @@ -1453,6 +1497,22 @@ public class DefaultCodegen implements CodegenConfig { legacyDiscriminatorBehaviorOpt.setEnum(legacyDiscriminatorBehaviorOpts); cliOptions.add(legacyDiscriminatorBehaviorOpt); + // option to change how we process + set the data in the 'additionalProperties' keyword. + CliOption disallowAdditionalPropertiesIfNotPresentOpt = CliOption.newBoolean( + CodegenConstants.DISALLOW_ADDITIONAL_PROPERTIES_IF_NOT_PRESENT, + CodegenConstants.DISALLOW_ADDITIONAL_PROPERTIES_IF_NOT_PRESENT_DESC).defaultValue(Boolean.TRUE.toString()); + Map disallowAdditionalPropertiesIfNotPresentOpts = new HashMap<>(); + disallowAdditionalPropertiesIfNotPresentOpts.put("false", + "The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications."); + disallowAdditionalPropertiesIfNotPresentOpts.put("true", + "when the 'additionalProperties' keyword is not present in a schema, " + + "the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. " + + "Note: this mode is not compliant with the JSON schema specification. " + + "This is the original openapi-generator behavior."); + disallowAdditionalPropertiesIfNotPresentOpt.setEnum(disallowAdditionalPropertiesIfNotPresentOpts); + cliOptions.add(disallowAdditionalPropertiesIfNotPresentOpt); + this.setDisallowAdditionalPropertiesIfNotPresent(true); + // initialize special character mapping initalizeSpecialCharacterMapping(); @@ -1585,7 +1645,7 @@ public class DefaultCodegen implements CodegenConfig { */ public String toInstantiationType(Schema schema) { if (ModelUtils.isMapSchema(schema)) { - Schema additionalProperties = ModelUtils.getAdditionalProperties(schema); + Schema additionalProperties = getAdditionalProperties(schema); String inner = getSchemaType(additionalProperties); return instantiationTypes.get("map") + ""; } else if (ModelUtils.isArraySchema(schema)) { @@ -1843,7 +1903,7 @@ public class DefaultCodegen implements CodegenConfig { } protected Schema getSchemaAdditionalProperties(Schema schema) { - Schema inner = ModelUtils.getAdditionalProperties(schema); + Schema inner = getAdditionalProperties(schema); if (inner == null) { LOGGER.error("`{}` (map property) does not have a proper inner type defined. Default to type:string", schema.getName()); inner = new StringSchema().description("TODO default missing map inner type to string"); @@ -2006,13 +2066,13 @@ public class DefaultCodegen implements CodegenConfig { return schema.getFormat(); } return "string"; - } else if (ModelUtils.isFreeFormObject(schema)) { + } else if (isFreeFormObject(schema)) { // Note: the value of a free-form object cannot be an arbitrary type. Per OAS specification, // it must be a map of string to values. return "object"; } else if (schema.getProperties() != null && !schema.getProperties().isEmpty()) { // having property implies it's a model return "object"; - } else if (ModelUtils.isAnyTypeSchema(schema)) { + } else if (isAnyTypeSchema(schema)) { return "AnyType"; } else if (StringUtils.isNotEmpty(schema.getType())) { LOGGER.warn("Unknown type found in the schema: " + schema.getType()); @@ -2193,7 +2253,7 @@ public class DefaultCodegen implements CodegenConfig { m.xmlNamespace = schema.getXml().getNamespace(); m.xmlName = schema.getXml().getName(); } - if (ModelUtils.isAnyTypeSchema(schema)) { + if (isAnyTypeSchema(schema)) { // The 'null' value is allowed when the OAS schema is 'any type'. // See https://github.com/OAI/OpenAPI-Specification/issues/1389 if (Boolean.FALSE.equals(schema.getNullable())) { @@ -2365,6 +2425,24 @@ public class DefaultCodegen implements CodegenConfig { addVars(m, unaliasPropertySchema(properties), required, unaliasPropertySchema(allProperties), allRequired); + // Per OAS specification, composed schemas may use the 'additionalProperties' keyword. + if (supportsAdditionalPropertiesWithComposedSchema) { + // Process the schema specified with the 'additionalProperties' keyword. + // This will set the 'CodegenModel.additionalPropertiesType' field + // and potentially 'Codegen.parent'. + // + // Note: it's not a good idea to use single class inheritance to implement + // the 'additionalProperties' keyword. Code generators that use single class + // inheritance sometimes use the 'Codegen.parent' field to implement the + // 'additionalProperties' keyword. However, that would be in conflict with + // 'allOf' composed schemas, because these code generators also want to set + // 'Codegen.parent' to the first child schema of the 'allOf' schema. + addAdditionPropertiesToCodeGenModel(m, schema); + } + + if (Boolean.TRUE.equals(schema.getNullable())) { + m.isNullable = Boolean.TRUE; + } // end of code block for composed schema } else { m.dataType = getSchemaType(schema); @@ -2806,6 +2884,12 @@ public class DefaultCodegen implements CodegenConfig { return discriminator; } + /** + * Handle the model for the 'additionalProperties' keyword in the OAS schema. + * + * @param codegenModel The codegen representation of the schema. + * @param schema the input OAS schema. + */ protected void addAdditionPropertiesToCodeGenModel(CodegenModel codegenModel, Schema schema) { addParentContainer(codegenModel, codegenModel.name, schema); } @@ -3051,9 +3135,9 @@ public class DefaultCodegen implements CodegenConfig { property.hasValidation = true; } - } else if (ModelUtils.isFreeFormObject(p)) { + } else if (isFreeFormObject(p)) { property.isFreeFormObject = true; - } else if (ModelUtils.isAnyTypeSchema(p)) { + } else if (isAnyTypeSchema(p)) { // The 'null' value is allowed when the OAS schema is 'any type'. // See https://github.com/OAI/OpenAPI-Specification/issues/1389 if (Boolean.FALSE.equals(p.getNullable())) { @@ -3066,7 +3150,7 @@ public class DefaultCodegen implements CodegenConfig { ArraySchema arraySchema = (ArraySchema) p; Schema innerSchema = ModelUtils.unaliasSchema(this.openAPI, getSchemaItems(arraySchema), importMapping); } else if (ModelUtils.isMapSchema(p)) { - Schema innerSchema = ModelUtils.unaliasSchema(this.openAPI, ModelUtils.getAdditionalProperties(p), + Schema innerSchema = ModelUtils.unaliasSchema(this.openAPI, getAdditionalProperties(p), importMapping); if (innerSchema == null) { LOGGER.error("Undefined map inner type for `{}`. Default to String.", p.getName()); @@ -3159,7 +3243,7 @@ public class DefaultCodegen implements CodegenConfig { property.maxItems = p.getMaxProperties(); // handle inner property - Schema innerSchema = ModelUtils.unaliasSchema(this.openAPI, ModelUtils.getAdditionalProperties(p), + Schema innerSchema = ModelUtils.unaliasSchema(this.openAPI, getAdditionalProperties(p), importMapping); if (innerSchema == null) { LOGGER.error("Undefined map inner type for `{}`. Default to String.", p.getName()); @@ -3168,13 +3252,13 @@ public class DefaultCodegen implements CodegenConfig { } CodegenProperty cp = fromProperty("inner", innerSchema); updatePropertyForMap(property, cp); - } else if (ModelUtils.isFreeFormObject(p)) { + } else if (isFreeFormObject(p)) { property.isFreeFormObject = true; property.baseType = getSchemaType(p); if (languageSpecificPrimitives.contains(property.dataType)) { property.isPrimitiveType = true; } - } else if (ModelUtils.isAnyTypeSchema(p)) { + } else if (isAnyTypeSchema(p)) { property.isAnyType = true; property.baseType = getSchemaType(p); if (languageSpecificPrimitives.contains(property.dataType)) { @@ -3410,7 +3494,7 @@ public class DefaultCodegen implements CodegenConfig { CodegenProperty innerProperty = fromProperty("response", getSchemaItems(as)); op.returnBaseType = innerProperty.baseType; } else if (ModelUtils.isMapSchema(responseSchema)) { - CodegenProperty innerProperty = fromProperty("response", ModelUtils.getAdditionalProperties(responseSchema)); + CodegenProperty innerProperty = fromProperty("response", getAdditionalProperties(responseSchema)); op.returnBaseType = innerProperty.baseType; } else { if (cm.complexType != null) { @@ -4083,7 +4167,7 @@ public class DefaultCodegen implements CodegenConfig { } } else if (ModelUtils.isMapSchema(parameterSchema)) { // for map parameter - CodegenProperty codegenProperty = fromProperty("inner", ModelUtils.getAdditionalProperties(parameterSchema)); + CodegenProperty codegenProperty = fromProperty("inner", getAdditionalProperties(parameterSchema)); codegenParameter.items = codegenProperty; codegenParameter.mostInnerItems = codegenProperty.mostInnerItems; codegenParameter.baseType = codegenProperty.dataType; @@ -4505,6 +4589,22 @@ public class DefaultCodegen implements CodegenConfig { co.baseName = tag; } + /** + * Sets the value of the 'model.parent' property in CodegenModel, based on the value + * of the 'additionalProperties' keyword. Some language generator use class inheritance + * to implement additional properties. For example, in Java the generated model class + * has 'extends HashMap' to represent the additional properties. + * + * TODO: it's not a good idea to use single class inheritance to implement + * additionalProperties. That may work for non-composed schemas, but that does not + * work for composed 'allOf' schemas. For example, in Java, if additionalProperties + * is set to true (which it should be by default, per OAS spec), then the generated + * code has extends HashMap. That wouldn't work for composed 'allOf' schemas. + * + * @param model the codegen representation of the OAS schema. + * @param name the name of the model. + * @param schema the input OAS schema. + */ protected void addParentContainer(CodegenModel model, String name, Schema schema) { final CodegenProperty property = fromProperty(name, schema); addImport(model, property.complexType); @@ -5783,7 +5883,7 @@ public class DefaultCodegen implements CodegenConfig { if (ModelUtils.isGenerateAliasAsModel() && StringUtils.isNotBlank(name)) { this.addBodyModelSchema(codegenParameter, name, schema, imports, bodyParameterName, true); } else { - Schema inner = ModelUtils.getAdditionalProperties(schema); + Schema inner = getAdditionalProperties(schema); if (inner == null) { LOGGER.error("No inner type supplied for map parameter `{}`. Default to type:string", schema.getName()); inner = new StringSchema().description("//TODO automatically added by openapi-generator"); @@ -5865,7 +5965,7 @@ public class DefaultCodegen implements CodegenConfig { codegenProperty = codegenProperty.items; } } - } else if (ModelUtils.isFreeFormObject(schema)) { + } else if (isFreeFormObject(schema)) { // HTTP request body is free form object CodegenProperty codegenProperty = fromProperty("FREE_FORM_REQUEST_BODY", schema); if (codegenProperty != null) { @@ -6262,4 +6362,100 @@ public class DefaultCodegen implements CodegenConfig { return Objects.hash(getName(), getRemoveCharRegEx(), getExceptions()); } } + + /** + * Return true if the schema value can be any type, i.e. it can be + * the null value, integer, number, string, object or array. + * One use case is when the "type" attribute in the OAS schema is unspecified. + * + * Examples: + * + * arbitraryTypeValue: + * description: This is an arbitrary type schema. + * It is not a free-form object. + * The value can be any type except the 'null' value. + * arbitraryTypeNullableValue: + * description: This is an arbitrary type schema. + * It is not a free-form object. + * The value can be any type, including the 'null' value. + * nullable: true + * + * @param schema the OAS schema. + * @return true if the schema value can be an arbitrary type. + */ + public boolean isAnyTypeSchema(Schema schema) { + if (schema == null) { + once(LOGGER).error("Schema cannot be null in isAnyTypeSchema check"); + return false; + } + + if (isFreeFormObject(schema)) { + // make sure it's not free form object + return false; + } + + if (schema.getClass().equals(Schema.class) && schema.get$ref() == null && schema.getType() == null && + (schema.getProperties() == null || schema.getProperties().isEmpty()) && + schema.getAdditionalProperties() == null && schema.getNot() == null && + schema.getEnum() == null) { + return true; + // If and when type arrays are supported in a future OAS specification, + // we could return true if the type array includes all possible JSON schema types. + } + return false; + } + + /** + * Check to see if the schema is a free form object. + * + * A free form object is an object (i.e. 'type: object' in a OAS document) that: + * 1) Does not define properties, and + * 2) Is not a composed schema (no anyOf, oneOf, allOf), and + * 3) additionalproperties is not defined, or additionalproperties: true, or additionalproperties: {}. + * + * Examples: + * + * components: + * schemas: + * arbitraryObject: + * type: object + * description: This is a free-form object. + * The value must be a map of strings to values. The value cannot be 'null'. + * It cannot be array, string, integer, number. + * arbitraryNullableObject: + * type: object + * description: This is a free-form object. + * The value must be a map of strings to values. The value can be 'null', + * It cannot be array, string, integer, number. + * nullable: true + * arbitraryTypeValue: + * description: This is NOT a free-form object. + * The value can be any type except the 'null' value. + * + * @param schema potentially containing a '$ref' + * @return true if it's a free-form object + */ + protected boolean isFreeFormObject(Schema schema) { + return ModelUtils.isFreeFormObject(this.openAPI, schema); + } + + /** + * Returns the additionalProperties Schema for the specified input schema. + * + * The additionalProperties keyword is used to control the handling of additional, undeclared + * properties, that is, properties whose names are not listed in the properties keyword. + * The additionalProperties keyword may be either a boolean or an object. + * If additionalProperties is a boolean and set to false, no additional properties are allowed. + * By default when the additionalProperties keyword is not specified in the input schema, + * any additional properties are allowed. This is equivalent to setting additionalProperties + * to the boolean value True or setting additionalProperties: {} + * + * @param schema the input schema that may or may not have the additionalProperties keyword. + * @return the Schema of the additionalProperties. The null value is returned if no additional + * properties are allowed. + */ + protected Schema getAdditionalProperties(Schema schema) { + return ModelUtils.getAdditionalProperties(openAPI, schema); + } + } 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 c9e449c6e01..8359682d158 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 @@ -469,7 +469,7 @@ public class DefaultGenerator extends AbstractGenerator implements Generator { Schema schema = schemas.get(name); - if (ModelUtils.isFreeFormObject(schema)) { // check to see if it'a a free-form object + if (ModelUtils.isFreeFormObject(this.openAPI, schema)) { // check to see if it'a a free-form object LOGGER.info("Model {} not generated since it's a free-form object", name); continue; } else if (ModelUtils.isMapSchema(schema)) { // check to see if it's a "map" model diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/InlineModelResolver.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/InlineModelResolver.java index c1f26c8ad77..9d632888f20 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/InlineModelResolver.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/InlineModelResolver.java @@ -105,7 +105,7 @@ public class InlineModelResolver { Schema obj = (Schema) model; if (obj.getType() == null || "object".equals(obj.getType())) { if (obj.getProperties() != null && obj.getProperties().size() > 0) { - flattenProperties(obj.getProperties(), pathname); + flattenProperties(openAPI, 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); @@ -156,10 +156,10 @@ public class InlineModelResolver { if (inner instanceof ObjectSchema) { ObjectSchema op = (ObjectSchema) inner; if (op.getProperties() != null && op.getProperties().size() > 0) { - flattenProperties(op.getProperties(), pathname); + flattenProperties(openAPI, op.getProperties(), pathname); // Generate a unique model name based on the title. String modelName = resolveModelName(op.getTitle(), null); - Schema innerModel = modelFromProperty(op, modelName); + Schema innerModel = modelFromProperty(openAPI, op, modelName); String existing = matchGenerated(innerModel); if (existing != null) { Schema schema = new Schema().$ref(existing); @@ -200,7 +200,7 @@ public class InlineModelResolver { Schema obj = (Schema) model; if (obj.getType() == null || "object".equals(obj.getType())) { if (obj.getProperties() != null && obj.getProperties().size() > 0) { - flattenProperties(obj.getProperties(), pathname); + flattenProperties(openAPI, obj.getProperties(), pathname); String modelName = resolveModelName(obj.getTitle(), parameter.getName()); parameter.$ref(modelName); @@ -214,9 +214,9 @@ public class InlineModelResolver { if (inner instanceof ObjectSchema) { ObjectSchema op = (ObjectSchema) inner; if (op.getProperties() != null && op.getProperties().size() > 0) { - flattenProperties(op.getProperties(), pathname); + flattenProperties(openAPI, op.getProperties(), pathname); String modelName = resolveModelName(op.getTitle(), parameter.getName()); - Schema innerModel = modelFromProperty(op, modelName); + Schema innerModel = modelFromProperty(openAPI, op, modelName); String existing = matchGenerated(innerModel); if (existing != null) { Schema schema = new Schema().$ref(existing); @@ -259,7 +259,7 @@ public class InlineModelResolver { 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); + Schema model = modelFromProperty(openAPI, op, modelName); String existing = matchGenerated(model); Content content = response.getContent(); for (MediaType mediaType : content.values()) { @@ -282,10 +282,10 @@ public class InlineModelResolver { if (inner instanceof ObjectSchema) { ObjectSchema op = (ObjectSchema) inner; if (op.getProperties() != null && op.getProperties().size() > 0) { - flattenProperties(op.getProperties(), pathname); + flattenProperties(openAPI, op.getProperties(), pathname); String modelName = resolveModelName(op.getTitle(), "inline_response_" + key); - Schema innerModel = modelFromProperty(op, modelName); + Schema innerModel = modelFromProperty(openAPI, op, modelName); String existing = matchGenerated(innerModel); if (existing != null) { Schema schema = this.makeSchema(existing, op); @@ -302,14 +302,14 @@ public class InlineModelResolver { } } else if (property instanceof MapSchema) { MapSchema mp = (MapSchema) property; - Schema innerProperty = ModelUtils.getAdditionalProperties(mp); + Schema innerProperty = ModelUtils.getAdditionalProperties(openAPI, mp); if (innerProperty instanceof ObjectSchema) { ObjectSchema op = (ObjectSchema) innerProperty; if (op.getProperties() != null && op.getProperties().size() > 0) { - flattenProperties(op.getProperties(), pathname); + flattenProperties(openAPI, op.getProperties(), pathname); String modelName = resolveModelName(op.getTitle(), "inline_response_" + key); - Schema innerModel = modelFromProperty(op, modelName); + Schema innerModel = modelFromProperty(openAPI, op, modelName); String existing = matchGenerated(innerModel); if (existing != null) { Schema schema = new Schema().$ref(existing); @@ -378,7 +378,7 @@ public class InlineModelResolver { // To have complete control of the model naming, one can define the model separately // instead of inline. String innerModelName = resolveModelName(op.getTitle(), key); - Schema innerModel = modelFromProperty(op, innerModelName); + Schema innerModel = modelFromProperty(openAPI, op, innerModelName); String existing = matchGenerated(innerModel); if (existing == null) { openAPI.getComponents().addSchemas(innerModelName, innerModel); @@ -421,7 +421,7 @@ public class InlineModelResolver { } else if (model instanceof Schema) { Schema m = (Schema) model; Map properties = m.getProperties(); - flattenProperties(properties, modelName); + flattenProperties(openAPI, properties, modelName); fixStringModel(m); } else if (ModelUtils.isArraySchema(model)) { ArraySchema m = (ArraySchema) model; @@ -430,7 +430,7 @@ public class InlineModelResolver { ObjectSchema op = (ObjectSchema) inner; if (op.getProperties() != null && op.getProperties().size() > 0) { String innerModelName = resolveModelName(op.getTitle(), modelName + "_inner"); - Schema innerModel = modelFromProperty(op, innerModelName); + Schema innerModel = modelFromProperty(openAPI, op, innerModelName); String existing = matchGenerated(innerModel); if (existing == null) { openAPI.getComponents().addSchemas(innerModelName, innerModel); @@ -526,7 +526,7 @@ public class InlineModelResolver { // TODO it would probably be a good idea to check against a list of used uniqueNames to make sure there are no collisions } - private void flattenProperties(Map properties, String path) { + private void flattenProperties(OpenAPI openAPI, Map properties, String path) { if (properties == null) { return; } @@ -538,7 +538,7 @@ public class InlineModelResolver { && ((ObjectSchema) property).getProperties().size() > 0) { ObjectSchema op = (ObjectSchema) property; String modelName = resolveModelName(op.getTitle(), path + "_" + key); - Schema model = modelFromProperty(op, modelName); + Schema model = modelFromProperty(openAPI, op, modelName); String existing = matchGenerated(model); if (existing != null) { Schema schema = new Schema().$ref(existing); @@ -558,9 +558,9 @@ public class InlineModelResolver { if (inner instanceof ObjectSchema) { ObjectSchema op = (ObjectSchema) inner; if (op.getProperties() != null && op.getProperties().size() > 0) { - flattenProperties(op.getProperties(), path); + flattenProperties(openAPI, op.getProperties(), path); String modelName = resolveModelName(op.getTitle(), path + "_" + key); - Schema innerModel = modelFromProperty(op, modelName); + Schema innerModel = modelFromProperty(openAPI, op, modelName); String existing = matchGenerated(innerModel); if (existing != null) { Schema schema = new Schema().$ref(existing); @@ -577,13 +577,13 @@ public class InlineModelResolver { } } if (ModelUtils.isMapSchema(property)) { - Schema inner = ModelUtils.getAdditionalProperties(property); + Schema inner = ModelUtils.getAdditionalProperties(openAPI, property); if (inner instanceof ObjectSchema) { ObjectSchema op = (ObjectSchema) inner; if (op.getProperties() != null && op.getProperties().size() > 0) { - flattenProperties(op.getProperties(), path); + flattenProperties(openAPI, op.getProperties(), path); String modelName = resolveModelName(op.getTitle(), path + "_" + key); - Schema innerModel = modelFromProperty(op, modelName); + Schema innerModel = modelFromProperty(openAPI, op, modelName); String existing = matchGenerated(innerModel); if (existing != null) { Schema schema = new Schema().$ref(existing); @@ -611,7 +611,7 @@ public class InlineModelResolver { } } - private Schema modelFromProperty(Schema object, String path) { + private Schema modelFromProperty(OpenAPI openAPI, Schema object, String path) { String description = object.getDescription(); String example = null; Object obj = object.getExample(); @@ -628,7 +628,7 @@ public class InlineModelResolver { model.setRequired(object.getRequired()); model.setNullable(object.getNullable()); if (properties != null) { - flattenProperties(properties, path); + flattenProperties(openAPI, properties, path); model.setProperties(properties); } return model; 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 840790ed4c8..df0d00f44e7 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 @@ -463,6 +463,10 @@ public class CodegenConfigurator { // TODO: Move custom validations to a separate type as part of a "Workflow" Set validationMessages = new HashSet<>(result.getMessages()); OpenAPI specification = result.getOpenAPI(); + // TODO: The line below could be removed when at least one of the issue below has been resolved. + // https://github.com/swagger-api/swagger-parser/issues/1369 + // https://github.com/swagger-api/swagger-parser/pull/1374 + //ModelUtils.getOpenApiVersion(specification, inputSpec, authorizationValues); // NOTE: We will only expose errors+warnings if there are already errors in the spec. if (validationMessages.size() > 0) { diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/examples/ExampleGenerator.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/examples/ExampleGenerator.java index ffc664c3cf4..6a6a807c6f2 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/examples/ExampleGenerator.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/examples/ExampleGenerator.java @@ -269,10 +269,10 @@ public class ExampleGenerator { Map mp = new HashMap(); if (property.getName() != null) { mp.put(property.getName(), - resolvePropertyToExample(propertyName, mediaType, ModelUtils.getAdditionalProperties(property), processedModels)); + resolvePropertyToExample(propertyName, mediaType, ModelUtils.getAdditionalProperties(openAPI, property), processedModels)); } else { mp.put("key", - resolvePropertyToExample(propertyName, mediaType, ModelUtils.getAdditionalProperties(property), processedModels)); + resolvePropertyToExample(propertyName, mediaType, ModelUtils.getAdditionalProperties(openAPI, property), processedModels)); } return mp; } else if (ModelUtils.isUUIDSchema(property)) { diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractAdaCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractAdaCodegen.java index b3177163df8..d09d7ab2c02 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractAdaCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractAdaCodegen.java @@ -347,7 +347,7 @@ abstract public class AbstractAdaCodegen extends DefaultCodegen implements Codeg return getTypeDeclaration(inner) + "_Vectors.Vector"; } if (ModelUtils.isMapSchema(p)) { - Schema inner = ModelUtils.getAdditionalProperties(p); + Schema inner = getAdditionalProperties(p); String name = getTypeDeclaration(inner) + "_Map"; if (name.startsWith("Swagger.")) { return name; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractApexCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractApexCodegen.java index bb2a21d4afa..196ac1aa181 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractApexCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractApexCodegen.java @@ -195,7 +195,7 @@ public abstract class AbstractApexCodegen extends DefaultCodegen implements Code } return getSchemaType(p) + "<" + getTypeDeclaration(inner) + ">"; } else if (ModelUtils.isMapSchema(p)) { - Schema inner = ModelUtils.getAdditionalProperties(p); + Schema inner = getAdditionalProperties(p); if (inner == null) { LOGGER.warn(p.getName() + "(map property) does not have a proper inner type defined"); @@ -228,11 +228,11 @@ public abstract class AbstractApexCodegen extends DefaultCodegen implements Code } else if (ModelUtils.isMapSchema(p)) { final MapSchema ap = (MapSchema) p; final String pattern = "new HashMap<%s>()"; - if (ModelUtils.getAdditionalProperties(ap) == null) { + if (getAdditionalProperties(ap) == null) { return null; } - return String.format(Locale.ROOT, pattern, String.format(Locale.ROOT, "String, %s", getTypeDeclaration(ModelUtils.getAdditionalProperties(ap)))); + return String.format(Locale.ROOT, pattern, String.format(Locale.ROOT, "String, %s", getTypeDeclaration(getAdditionalProperties(ap)))); } else if (ModelUtils.isLongSchema(p)) { if (p.getDefault() != null) { return p.getDefault().toString() + "l"; @@ -365,7 +365,7 @@ public abstract class AbstractApexCodegen extends DefaultCodegen implements Code } else if (ModelUtils.isLongSchema(p)) { example = example.isEmpty() ? "123456789L" : example + "L"; } else if (ModelUtils.isMapSchema(p)) { - example = "new " + getTypeDeclaration(p) + "{'key'=>" + toExampleValue(ModelUtils.getAdditionalProperties(p)) + "}"; + example = "new " + getTypeDeclaration(p) + "{'key'=>" + toExampleValue(getAdditionalProperties(p)) + "}"; } else if (ModelUtils.isPasswordSchema(p)) { example = example.isEmpty() ? "password123" : escapeText(example); 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 66af4e39a87..ee16ccdd0eb 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 @@ -989,7 +989,7 @@ public abstract class AbstractCSharpCodegen extends DefaultCodegen implements Co return getArrayTypeDeclaration((ArraySchema) p); } else if (ModelUtils.isMapSchema(p)) { // Should we also support maps of maps? - Schema inner = ModelUtils.getAdditionalProperties(p); + Schema inner = getAdditionalProperties(p); return getSchemaType(p) + ""; } return super.getTypeDeclaration(p); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractEiffelCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractEiffelCodegen.java index 6d8f5e97632..82eba4b189c 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractEiffelCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractEiffelCodegen.java @@ -281,7 +281,7 @@ public abstract class AbstractEiffelCodegen extends DefaultCodegen implements Co Schema inner = ap.getItems(); return "LIST [" + getTypeDeclaration(inner) + "]"; } else if (ModelUtils.isMapSchema(p)) { - Schema inner = ModelUtils.getAdditionalProperties(p); + Schema inner = getAdditionalProperties(p); return getSchemaType(p) + "[" + getTypeDeclaration(inner) + "]"; } @@ -549,7 +549,7 @@ public abstract class AbstractEiffelCodegen extends DefaultCodegen implements Co @Override public String toInstantiationType(Schema p) { if (ModelUtils.isMapSchema(p)) { - Schema additionalProperties2 = ModelUtils.getAdditionalProperties(p); + Schema additionalProperties2 = getAdditionalProperties(p); String type = additionalProperties2.getType(); if (null == type) { LOGGER.error("No Type defined for Additional Schema " + additionalProperties2 + "\n" // diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractFSharpCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractFSharpCodegen.java index 6ec69705188..c258b22eb09 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractFSharpCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractFSharpCodegen.java @@ -881,7 +881,7 @@ public abstract class AbstractFSharpCodegen extends DefaultCodegen implements Co return getArrayTypeDeclaration((ArraySchema) p); } else if (ModelUtils.isMapSchema(p)) { // Should we also support maps of maps? - Schema inner = ModelUtils.getAdditionalProperties(p); + Schema inner = getAdditionalProperties(p); return getSchemaType(p) + ""; } return super.getTypeDeclaration(p); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractGoCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractGoCodegen.java index 141b2d81594..5a7f9ae4e4f 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractGoCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractGoCodegen.java @@ -344,7 +344,7 @@ public abstract class AbstractGoCodegen extends DefaultCodegen implements Codege } return "[]" + typDecl; } else if (ModelUtils.isMapSchema(p)) { - Schema inner = ModelUtils.getAdditionalProperties(p); + Schema inner = getAdditionalProperties(p); return getSchemaType(p) + "[string]" + getTypeDeclaration(ModelUtils.unaliasSchema(this.openAPI, inner)); } //return super.getTypeDeclaration(p); @@ -390,7 +390,7 @@ public abstract class AbstractGoCodegen extends DefaultCodegen implements Codege if (ref != null && !ref.isEmpty()) { type = openAPIType; - } else if ("object".equals(openAPIType) && ModelUtils.isAnyTypeSchema(p)) { + } else if ("object".equals(openAPIType) && isAnyTypeSchema(p)) { // Arbitrary type. Note this is not the same thing as free-form object. type = "interface{}"; } else if (typeMapping.containsKey(openAPIType)) { diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaCodegen.java index 910d1da5008..f4e35763adb 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaCodegen.java @@ -814,11 +814,11 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code } else { pattern = "new HashMap<%s>()"; } - if (ModelUtils.getAdditionalProperties(schema) == null) { + if (getAdditionalProperties(schema) == null) { return null; } - String typeDeclaration = String.format(Locale.ROOT, "String, %s", getTypeDeclaration(ModelUtils.getAdditionalProperties(schema))); + String typeDeclaration = String.format(Locale.ROOT, "String, %s", getTypeDeclaration(getAdditionalProperties(schema))); Object java8obj = additionalProperties.get("java8"); if (java8obj != null) { Boolean java8 = Boolean.valueOf(java8obj.toString()); @@ -1654,7 +1654,7 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code super.addAdditionPropertiesToCodeGenModel(codegenModel, schema); // See https://github.com/OpenAPITools/openapi-generator/pull/1729#issuecomment-449937728 - codegenModel.additionalPropertiesType = getSchemaType(ModelUtils.getAdditionalProperties(schema)); + codegenModel.additionalPropertiesType = getSchemaType(getAdditionalProperties(schema)); addImport(codegenModel, codegenModel.additionalPropertiesType); } } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractKotlinCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractKotlinCodegen.java index 05de11aa5c2..347ce1d07cf 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractKotlinCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractKotlinCodegen.java @@ -310,7 +310,7 @@ public abstract class AbstractKotlinCodegen extends DefaultCodegen implements Co if (ModelUtils.isArraySchema(p)) { return getArrayTypeDeclaration((ArraySchema) p); } else if (ModelUtils.isMapSchema(p)) { - Schema inner = ModelUtils.getAdditionalProperties(p); + Schema inner = getAdditionalProperties(p); // Maps will be keyed only by primitive Kotlin string return getSchemaType(p) + ""; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractPhpCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractPhpCodegen.java index 7395186f484..eff7939d6e3 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractPhpCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractPhpCodegen.java @@ -301,7 +301,7 @@ public abstract class AbstractPhpCodegen extends DefaultCodegen implements Codeg } return getTypeDeclaration(inner) + "[]"; } else if (ModelUtils.isMapSchema(p)) { - Schema inner = ModelUtils.getAdditionalProperties(p); + Schema inner = getAdditionalProperties(p); if (inner == null) { LOGGER.warn(p.getName() + "(map property) does not have a proper inner type defined. Default to string"); inner = new StringSchema().description("TODO default missing map inner type to string"); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractRubyCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractRubyCodegen.java index 96758042a6f..a2a7d460af6 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractRubyCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractRubyCodegen.java @@ -111,7 +111,7 @@ abstract public class AbstractRubyCodegen extends DefaultCodegen implements Code Schema inner = ((ArraySchema) schema).getItems(); return getSchemaType(schema) + "<" + getTypeDeclaration(inner) + ">"; } else if (ModelUtils.isMapSchema(schema)) { - Schema inner = ModelUtils.getAdditionalProperties(schema); + Schema inner = getAdditionalProperties(schema); return getSchemaType(schema) + ""; } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractScalaCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractScalaCodegen.java index af24ba9c21a..6f87d96f13e 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractScalaCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractScalaCodegen.java @@ -325,7 +325,7 @@ public abstract class AbstractScalaCodegen extends DefaultCodegen { Schema inner = ap.getItems(); return getSchemaType(p) + "[" + getTypeDeclaration(inner) + "]"; } else if (ModelUtils.isMapSchema(p)) { - Schema inner = ModelUtils.getAdditionalProperties(p); + Schema inner = getAdditionalProperties(p); return getSchemaType(p) + "[String, " + getTypeDeclaration(inner) + "]"; } @@ -354,7 +354,7 @@ public abstract class AbstractScalaCodegen extends DefaultCodegen { @Override public String toInstantiationType(Schema p) { if (ModelUtils.isMapSchema(p)) { - String inner = getSchemaType(ModelUtils.getAdditionalProperties(p)); + String inner = getSchemaType(getAdditionalProperties(p)); return instantiationTypes.get("map") + "[String, " + inner + "]"; } else if (ModelUtils.isArraySchema(p)) { ArraySchema ap = (ArraySchema) p; @@ -383,7 +383,7 @@ public abstract class AbstractScalaCodegen extends DefaultCodegen { } else if (ModelUtils.isIntegerSchema(p)) { return null; } else if (ModelUtils.isMapSchema(p)) { - String inner = getSchemaType(ModelUtils.getAdditionalProperties(p)); + String inner = getSchemaType(getAdditionalProperties(p)); return "new HashMap[String, " + inner + "]() "; } else if (ModelUtils.isArraySchema(p)) { ArraySchema ap = (ArraySchema) p; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractTypeScriptClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractTypeScriptClientCodegen.java index 95767640988..4b5f43e4600 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractTypeScriptClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractTypeScriptClientCodegen.java @@ -390,7 +390,7 @@ public abstract class AbstractTypeScriptClientCodegen extends DefaultCodegen imp inner = mp1.getItems(); return this.getSchemaType(p) + "<" + this.getParameterDataType(parameter, inner) + ">"; } else if (ModelUtils.isMapSchema(p)) { - inner = ModelUtils.getAdditionalProperties(p); + inner = getAdditionalProperties(p); return "{ [key: string]: " + this.getParameterDataType(parameter, inner) + "; }"; } else if (ModelUtils.isStringSchema(p)) { // Handle string enums diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AndroidClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AndroidClientCodegen.java index 1e7349a53bd..6a5e2ee83af 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AndroidClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AndroidClientCodegen.java @@ -216,7 +216,7 @@ public class AndroidClientCodegen extends DefaultCodegen implements CodegenConfi Schema inner = ap.getItems(); return getSchemaType(p) + "<" + getTypeDeclaration(inner) + ">"; } else if (ModelUtils.isMapSchema(p)) { - Schema inner = ModelUtils.getAdditionalProperties(p); + Schema inner = getAdditionalProperties(p); return getSchemaType(p) + ""; } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ApexClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ApexClientCodegen.java index 1deb382a6a5..d7e5889c173 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ApexClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ApexClientCodegen.java @@ -238,7 +238,7 @@ public class ApexClientCodegen extends AbstractApexCodegen { Long def = (Long) p.getDefault(); out = def == null ? out : def.toString() + "L"; } else if (ModelUtils.isMapSchema(p)) { - Schema inner = ModelUtils.getAdditionalProperties(p); + Schema inner = getAdditionalProperties(p); String s = inner == null ? "Object" : getTypeDeclaration(inner); out = String.format(Locale.ROOT, "new Map()", s); } else if (ModelUtils.isStringSchema(p)) { diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/BashClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/BashClientCodegen.java index bf59d7db699..93e9d09e470 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/BashClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/BashClientCodegen.java @@ -428,7 +428,7 @@ public class BashClientCodegen extends DefaultCodegen implements CodegenConfig { Schema inner = ap.getItems(); return getSchemaType(p) + "[" + getTypeDeclaration(inner) + "]"; } else if (ModelUtils.isMapSchema(p)) { - Schema inner = ModelUtils.getAdditionalProperties(p); + Schema inner = getAdditionalProperties(p); return getSchemaType(p) + "[String, " + getTypeDeclaration(inner) + "]"; } return super.getTypeDeclaration(p); 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 a12d712c3ff..495ccf72f6b 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 @@ -982,7 +982,7 @@ public class CSharpClientCodegen extends AbstractCSharpCodegen { @Override public String toInstantiationType(Schema schema) { if (ModelUtils.isMapSchema(schema)) { - Schema additionalProperties = ModelUtils.getAdditionalProperties(schema); + Schema additionalProperties = getAdditionalProperties(schema); String inner = getSchemaType(additionalProperties); if (ModelUtils.isMapSchema(additionalProperties)) { inner = toInstantiationType(additionalProperties); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpNetCoreClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpNetCoreClientCodegen.java index 3c8d8a3e33d..2d2f563bf21 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpNetCoreClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpNetCoreClientCodegen.java @@ -917,7 +917,7 @@ public class CSharpNetCoreClientCodegen extends AbstractCSharpCodegen { @Override public String toInstantiationType(Schema schema) { if (ModelUtils.isMapSchema(schema)) { - Schema additionalProperties = ModelUtils.getAdditionalProperties(schema); + Schema additionalProperties = getAdditionalProperties(schema); String inner = getSchemaType(additionalProperties); if (ModelUtils.isMapSchema(additionalProperties)) { inner = toInstantiationType(additionalProperties); 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 1de98be94e7..c2cadfa1702 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 @@ -107,7 +107,7 @@ public class ConfluenceWikiCodegen extends DefaultCodegen implements CodegenConf Schema inner = ap.getItems(); return getSchemaType(p) + "[" + getTypeDeclaration(inner) + "]"; } else if (ModelUtils.isMapSchema(p)) { - Schema inner = ModelUtils.getAdditionalProperties(p); + Schema inner = getAdditionalProperties(p); return getSchemaType(p) + "[String, " + getTypeDeclaration(inner) + "]"; } return super.getTypeDeclaration(p); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppPistacheServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppPistacheServerCodegen.java index 88637961ccc..6a2368cd319 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppPistacheServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppPistacheServerCodegen.java @@ -363,7 +363,7 @@ public class CppPistacheServerCodegen extends AbstractCppCodegen { return getSchemaType(p) + "<" + getTypeDeclaration(inner) + ">"; } if (ModelUtils.isMapSchema(p)) { - Schema inner = ModelUtils.getAdditionalProperties(p); + Schema inner = getAdditionalProperties(p); return getSchemaType(p) + ""; } else if (ModelUtils.isByteArraySchema(p)) { return "std::string"; @@ -399,7 +399,7 @@ public class CppPistacheServerCodegen extends AbstractCppCodegen { } else if (ModelUtils.isByteArraySchema(p)) { return "\"\""; } else if (ModelUtils.isMapSchema(p)) { - String inner = getSchemaType(ModelUtils.getAdditionalProperties(p)); + String inner = getSchemaType(getAdditionalProperties(p)); return "std::map()"; } else if (ModelUtils.isArraySchema(p)) { ArraySchema ap = (ArraySchema) p; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppQt5AbstractCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppQt5AbstractCodegen.java index c308a53996e..c3227182214 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppQt5AbstractCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppQt5AbstractCodegen.java @@ -186,7 +186,7 @@ public class CppQt5AbstractCodegen extends AbstractCppCodegen implements Codegen Schema inner = ap.getItems(); return getSchemaType(p) + "<" + getTypeDeclaration(inner) + ">"; } else if (ModelUtils.isMapSchema(p)) { - Schema inner = ModelUtils.getAdditionalProperties(p); + Schema inner = getAdditionalProperties(p); return getSchemaType(p) + ""; } else if (ModelUtils.isBinarySchema(p)) { return getSchemaType(p); @@ -222,7 +222,7 @@ public class CppQt5AbstractCodegen extends AbstractCppCodegen implements Codegen } return "0"; } else if (ModelUtils.isMapSchema(p)) { - Schema inner = ModelUtils.getAdditionalProperties(p); + Schema inner = getAdditionalProperties(p); return "QMap()"; } else if (ModelUtils.isArraySchema(p)) { ArraySchema ap = (ArraySchema) p; 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 0dd42392622..149a10be6dd 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 @@ -349,7 +349,7 @@ public class CppRestSdkClientCodegen extends AbstractCppCodegen { Schema inner = ap.getItems(); return getSchemaType(p) + "<" + getTypeDeclaration(inner) + ">"; } else if (ModelUtils.isMapSchema(p)) { - Schema inner = ModelUtils.getAdditionalProperties(p); + Schema inner = getAdditionalProperties(p); return getSchemaType(p) + ""; } else if (ModelUtils.isFileSchema(p) || ModelUtils.isBinarySchema(p)) { return "std::shared_ptr<" + openAPIType + ">"; @@ -382,7 +382,7 @@ public class CppRestSdkClientCodegen extends AbstractCppCodegen { } return "0"; } else if (ModelUtils.isMapSchema(p)) { - String inner = getSchemaType(ModelUtils.getAdditionalProperties(p)); + String inner = getSchemaType(getAdditionalProperties(p)); return "std::map()"; } else if (ModelUtils.isArraySchema(p)) { ArraySchema ap = (ArraySchema) p; @@ -395,7 +395,7 @@ public class CppRestSdkClientCodegen extends AbstractCppCodegen { return "new " + toModelName(ModelUtils.getSimpleRef(p.get$ref())) + "()"; } else if (ModelUtils.isStringSchema(p)) { return "utility::conversions::to_string_t(\"\")"; - } else if (ModelUtils.isFreeFormObject(p)) { + } else if (isFreeFormObject(p)) { return "new Object()"; } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppRestbedServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppRestbedServerCodegen.java index 3234cfb4c9f..09626e7a327 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppRestbedServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppRestbedServerCodegen.java @@ -355,7 +355,7 @@ public class CppRestbedServerCodegen extends AbstractCppCodegen { Schema inner = ap.getItems(); return getSchemaType(p) + "<" + getTypeDeclaration(inner) + ">"; } else if (ModelUtils.isMapSchema(p)) { - Schema inner = ModelUtils.getAdditionalProperties(p); + Schema inner = getAdditionalProperties(p); return getSchemaType(p) + ""; } else if (ModelUtils.isByteArraySchema(p)) { return "std::string"; @@ -430,7 +430,7 @@ public class CppRestbedServerCodegen extends AbstractCppCodegen { return "\"\""; } } else if (ModelUtils.isMapSchema(p)) { - String inner = getSchemaType(ModelUtils.getAdditionalProperties(p)); + String inner = getSchemaType(getAdditionalProperties(p)); return "std::map()"; } else if (ModelUtils.isArraySchema(p)) { ArraySchema ap = (ArraySchema) p; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppUE4ClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppUE4ClientCodegen.java index 88d9c309ecd..175a64160a1 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppUE4ClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppUE4ClientCodegen.java @@ -386,7 +386,7 @@ public class CppUE4ClientCodegen extends AbstractCppCodegen { String inner = getSchemaType(ap.getItems()); return getSchemaType(p) + "<" + getTypeDeclaration(inner) + ">"; } else if (ModelUtils.isMapSchema(p)) { - String inner = getSchemaType(ModelUtils.getAdditionalProperties(p)); + String inner = getSchemaType(getAdditionalProperties(p)); return getSchemaType(p) + ""; } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartClientCodegen.java index ae1a2e8fbb0..2ba3d7be485 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartClientCodegen.java @@ -425,7 +425,7 @@ public class DartClientCodegen extends DefaultCodegen implements CodegenConfig { Schema inner = ap.getItems(); return getSchemaType(p) + "<" + getTypeDeclaration(inner) + ">"; } else if (ModelUtils.isMapSchema(p)) { - Schema inner = ModelUtils.getAdditionalProperties(p); + Schema inner = getAdditionalProperties(p); return getSchemaType(p) + ""; } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartDioClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartDioClientCodegen.java index 9c06fb029b7..2a8de81aff6 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartDioClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartDioClientCodegen.java @@ -142,7 +142,7 @@ public class DartDioClientCodegen extends DartClientCodegen { @Override protected void addAdditionPropertiesToCodeGenModel(CodegenModel codegenModel, Schema schema) { //super.addAdditionPropertiesToCodeGenModel(codegenModel, schema); - codegenModel.additionalPropertiesType = getSchemaType(ModelUtils.getAdditionalProperties(schema)); + codegenModel.additionalPropertiesType = getSchemaType(getAdditionalProperties(schema)); addImport(codegenModel, codegenModel.additionalPropertiesType); } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ElixirClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ElixirClientCodegen.java index 103ac17700c..72ffa1b9317 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ElixirClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ElixirClientCodegen.java @@ -495,7 +495,7 @@ public class ElixirClientCodegen extends DefaultCodegen implements CodegenConfig Schema inner = ap.getItems(); return "[" + getTypeDeclaration(inner) + "]"; } else if (ModelUtils.isMapSchema(p)) { - Schema inner = ModelUtils.getAdditionalProperties(p); + Schema inner = getAdditionalProperties(p); return "%{optional(String.t) => " + getTypeDeclaration(inner) + "}"; } else if (ModelUtils.isPasswordSchema(p)) { return "String.t"; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ElmClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ElmClientCodegen.java index b31277f51e8..630c720ccef 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ElmClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ElmClientCodegen.java @@ -428,7 +428,7 @@ public class ElmClientCodegen extends DefaultCodegen implements CodegenConfig { Schema inner = ap.getItems(); return getTypeDeclaration(inner); } else if (ModelUtils.isMapSchema(p)) { - Schema inner = ModelUtils.getAdditionalProperties(p); + Schema inner = getAdditionalProperties(p); return getTypeDeclaration(inner); } return super.getTypeDeclaration(p); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/HaskellHttpClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/HaskellHttpClientCodegen.java index 1daf144230d..f0676b8e187 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/HaskellHttpClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/HaskellHttpClientCodegen.java @@ -647,7 +647,7 @@ public class HaskellHttpClientCodegen extends DefaultCodegen implements CodegenC Schema inner = ap.getItems(); return "[" + getTypeDeclaration(inner) + "]"; } else if (ModelUtils.isMapSchema(p)) { - Schema inner = ModelUtils.getAdditionalProperties(p); + Schema inner = getAdditionalProperties(p); return "(Map.Map String " + getTypeDeclaration(inner) + ")"; } return super.getTypeDeclaration(p); @@ -669,7 +669,7 @@ public class HaskellHttpClientCodegen extends DefaultCodegen implements CodegenC @Override public String toInstantiationType(Schema p) { if (ModelUtils.isMapSchema(p)) { - Schema additionalProperties2 = ModelUtils.getAdditionalProperties(p); + Schema additionalProperties2 = getAdditionalProperties(p); String type = additionalProperties2.getType(); if (null == type) { LOGGER.error("No Type defined for Additional Schema " + additionalProperties2 + "\n" // diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/HaskellServantCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/HaskellServantCodegen.java index 024447f3dd3..857bc4a55e4 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/HaskellServantCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/HaskellServantCodegen.java @@ -374,7 +374,7 @@ public class HaskellServantCodegen extends DefaultCodegen implements CodegenConf Schema inner = ap.getItems(); return "[" + getTypeDeclaration(inner) + "]"; } else if (ModelUtils.isMapSchema(p)) { - Schema inner = ModelUtils.getAdditionalProperties(p); + Schema inner = getAdditionalProperties(p); return "(Map.Map String " + getTypeDeclaration(inner) + ")"; } return fixModelChars(super.getTypeDeclaration(p)); @@ -409,7 +409,7 @@ public class HaskellServantCodegen extends DefaultCodegen implements CodegenConf @Override public String toInstantiationType(Schema p) { if (ModelUtils.isMapSchema(p)) { - Schema additionalProperties2 = ModelUtils.getAdditionalProperties(p); + Schema additionalProperties2 = getAdditionalProperties(p); String type = additionalProperties2.getType(); if (null == type) { LOGGER.error("No Type defined for Additional Property " + additionalProperties2 + "\n" // diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JMeterClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JMeterClientCodegen.java index 5617b2973da..9678d29c880 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JMeterClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JMeterClientCodegen.java @@ -206,7 +206,7 @@ public class JMeterClientCodegen extends DefaultCodegen implements CodegenConfig Schema inner = ap.getItems(); return getSchemaType(p) + "[" + getTypeDeclaration(inner) + "]"; } else if (ModelUtils.isMapSchema(p)) { - Schema inner = ModelUtils.getAdditionalProperties(p); + Schema inner = getAdditionalProperties(p); return getSchemaType(p) + "[String, " + getTypeDeclaration(inner) + "]"; } return super.getTypeDeclaration(p); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaClientCodegen.java index b7d84d43466..0a973ab0496 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaClientCodegen.java @@ -78,7 +78,6 @@ public class JavaClientCodegen extends AbstractJavaCodegen public static final String RESTTEMPLATE = "resttemplate"; public static final String WEBCLIENT = "webclient"; public static final String REST_ASSURED = "rest-assured"; - public static final String RETROFIT_1 = "retrofit"; public static final String RETROFIT_2 = "retrofit2"; public static final String VERTX = "vertx"; public static final String MICROPROFILE = "microprofile"; @@ -149,7 +148,6 @@ public class JavaClientCodegen extends AbstractJavaCodegen supportedLibraries.put(JERSEY2, "HTTP client: Jersey client 2.25.1. JSON processing: Jackson 2.9.x"); supportedLibraries.put(FEIGN, "HTTP client: OpenFeign 9.x (deprecated) or 10.x (default). JSON processing: Jackson 2.9.x."); supportedLibraries.put(OKHTTP_GSON, "[DEFAULT] HTTP client: OkHttp 3.x. JSON processing: Gson 2.8.x. Enable Parcelable models on Android using '-DparcelableModel=true'. Enable gzip request encoding using '-DuseGzipFeature=true'."); - supportedLibraries.put(RETROFIT_1, "HTTP client: OkHttp 2.x. JSON processing: Gson 2.x (Retrofit 1.9.0). IMPORTANT NOTE: retrofit1.x is no longer actively maintained so please upgrade to 'retrofit2' instead."); supportedLibraries.put(RETROFIT_2, "HTTP client: OkHttp 3.x. JSON processing: Gson 2.x (Retrofit 2.3.0). Enable the RxJava adapter using '-DuseRxJava[2]=true'. (RxJava 1.x or 2.x)"); supportedLibraries.put(RESTTEMPLATE, "HTTP client: Spring RestTemplate 4.x. JSON processing: Jackson 2.9.x"); supportedLibraries.put(WEBCLIENT, "HTTP client: Spring WebClient 5.x. JSON processing: Jackson 2.9.x"); @@ -158,7 +156,7 @@ public class JavaClientCodegen extends AbstractJavaCodegen supportedLibraries.put(GOOGLE_API_CLIENT, "HTTP client: Google API client 1.x. JSON processing: Jackson 2.9.x"); supportedLibraries.put(REST_ASSURED, "HTTP client: rest-assured : 4.x. JSON processing: Gson 2.x or Jackson 2.10.x. Only for Java 8"); supportedLibraries.put(NATIVE, "HTTP client: Java native HttpClient. JSON processing: Jackson 2.9.x. Only for Java11+"); - supportedLibraries.put(MICROPROFILE, "HTTP client: Microprofile client X.x. JSON processing: Jackson 2.9.x"); + supportedLibraries.put(MICROPROFILE, "HTTP client: Microprofile client 1.x. JSON processing: Jackson 2.9.x"); CliOption libraryOption = new CliOption(CodegenConstants.LIBRARY, "library template (sub-template) to use"); libraryOption.setEnum(supportedLibraries); @@ -192,7 +190,7 @@ public class JavaClientCodegen extends AbstractJavaCodegen @Override public String getHelp() { - return "Generates a Java client library (HTTP lib: Jersey (1.x, 2.x), Retrofit (1.x, 2.x), OpenFeign (9.x, 10.x) and more."; + return "Generates a Java client library (HTTP lib: Jersey (1.x, 2.x), Retrofit (2.x), OpenFeign (10.x) and more."; } @Override @@ -237,21 +235,9 @@ public class JavaClientCodegen extends AbstractJavaCodegen } additionalProperties.put(PLAY_VERSION, playVersion); - // OpenFeign + // default to feign 10.x if (additionalProperties.containsKey(FEIGN_VERSION)) { - this.setFeignVersion(additionalProperties.get(FEIGN_VERSION).toString()); - - if ("10.x".equals(feignVersion)) { - additionalProperties.put("useFeign10", true); - } else if ("9.x".equals(feignVersion)) { - additionalProperties.put("useFeign10", false); - once(LOGGER).warn("Feign 9.x support has been deprecated. Please use 10.x (default) instead."); - } else { - throw new RuntimeException("Ivalid feignOoption '{}'. Must be '10.x' or '9.x' (deprecated)."); - } - } else { - // default to feign 10.x - additionalProperties.put("useFeign10", true); + once(LOGGER).warn("feignVersion has been deprecated. 10.x is the default."); } additionalProperties.put(FEIGN_VERSION, feignVersion); @@ -337,19 +323,19 @@ public class JavaClientCodegen extends AbstractJavaCodegen setSerializationLibrary(additionalProperties.get(CodegenConstants.SERIALIZATION_LIBRARY).toString()); } - //TODO: add doc to retrofit1 and feign - if (FEIGN.equals(getLibrary()) || RETROFIT_1.equals(getLibrary())) { + //TODO: add auto-generated doc to feign + if (FEIGN.equals(getLibrary())) { modelDocTemplateFiles.remove("model_doc.mustache"); apiDocTemplateFiles.remove("api_doc.mustache"); } - if (!(FEIGN.equals(getLibrary()) || RESTTEMPLATE.equals(getLibrary()) || usesAnyRetrofitLibrary() || GOOGLE_API_CLIENT.equals(getLibrary()) || REST_ASSURED.equals(getLibrary()) || WEBCLIENT.equals(getLibrary()) || MICROPROFILE.equals(getLibrary()))) { + if (!(FEIGN.equals(getLibrary()) || RESTTEMPLATE.equals(getLibrary()) || RETROFIT_2.equals(getLibrary()) || GOOGLE_API_CLIENT.equals(getLibrary()) || REST_ASSURED.equals(getLibrary()) || WEBCLIENT.equals(getLibrary()) || MICROPROFILE.equals(getLibrary()))) { supportingFiles.add(new SupportingFile("apiException.mustache", invokerFolder, "ApiException.java")); supportingFiles.add(new SupportingFile("Configuration.mustache", invokerFolder, "Configuration.java")); supportingFiles.add(new SupportingFile("Pair.mustache", invokerFolder, "Pair.java")); } - if (!(FEIGN.equals(getLibrary()) || RESTTEMPLATE.equals(getLibrary()) || usesAnyRetrofitLibrary() || GOOGLE_API_CLIENT.equals(getLibrary()) || REST_ASSURED.equals(getLibrary()) || NATIVE.equals(getLibrary()) || MICROPROFILE.equals(getLibrary()))) { + if (!(FEIGN.equals(getLibrary()) || RESTTEMPLATE.equals(getLibrary()) || RETROFIT_2.equals(getLibrary()) || GOOGLE_API_CLIENT.equals(getLibrary()) || REST_ASSURED.equals(getLibrary()) || NATIVE.equals(getLibrary()) || MICROPROFILE.equals(getLibrary()))) { supportingFiles.add(new SupportingFile("auth/Authentication.mustache", authFolder, "Authentication.java")); } @@ -370,11 +356,11 @@ public class JavaClientCodegen extends AbstractJavaCodegen //supportingFiles.add(new SupportingFile("auth/OAuthOkHttpClient.mustache", authFolder, "OAuthOkHttpClient.java")); //supportingFiles.add(new SupportingFile("auth/RetryingOAuth.mustache", authFolder, "RetryingOAuth.java")); forceSerializationLibrary(SERIALIZATION_LIBRARY_GSON); - } else if (usesAnyRetrofitLibrary()) { + } else if (RETROFIT_2.equals(getLibrary())) { supportingFiles.add(new SupportingFile("auth/OAuthOkHttpClient.mustache", authFolder, "OAuthOkHttpClient.java")); supportingFiles.add(new SupportingFile("CollectionFormats.mustache", invokerFolder, "CollectionFormats.java")); forceSerializationLibrary(SERIALIZATION_LIBRARY_GSON); - if ("retrofit2".equals(getLibrary()) && !usePlayWS) { + if (RETROFIT_2.equals(getLibrary()) && !usePlayWS) { supportingFiles.add(new SupportingFile("JSON.mustache", invokerFolder, "JSON.java")); } } else if (JERSEY2.equals(getLibrary())) { @@ -531,19 +517,11 @@ public class JavaClientCodegen extends AbstractJavaCodegen } } - private boolean usesAnyRetrofitLibrary() { - return getLibrary() != null && getLibrary().contains(RETROFIT_1); - } - - private boolean usesRetrofit2Library() { - return getLibrary() != null && getLibrary().contains(RETROFIT_2); - } - @SuppressWarnings("unchecked") @Override public Map postProcessOperationsWithModels(Map objs, List allModels) { super.postProcessOperationsWithModels(objs, allModels); - if (usesAnyRetrofitLibrary()) { + if (RETROFIT_2.equals(getLibrary())) { Map operations = (Map) objs.get("operations"); if (operations != null) { List ops = (List) operations.get("operation"); @@ -556,7 +534,8 @@ public class JavaClientCodegen extends AbstractJavaCodegen operation.prioritizedContentTypes = prioritizeContentTypes(operation.consumes); } } - if (usesRetrofit2Library() && StringUtils.isNotEmpty(operation.path) && operation.path.startsWith("/")) { + + if (StringUtils.isNotEmpty(operation.path) && operation.path.startsWith("/")) { operation.path = operation.path.substring(1); } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptApolloClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptApolloClientCodegen.java index 6103ae1edc9..a08486854ab 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptApolloClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptApolloClientCodegen.java @@ -565,7 +565,7 @@ public class JavascriptApolloClientCodegen extends DefaultCodegen implements Cod Schema inner = ap.getItems(); return "[" + getTypeDeclaration(inner) + "]"; } else if (ModelUtils.isMapSchema(p)) { - Schema inner = ModelUtils.getAdditionalProperties(p); + Schema inner = getAdditionalProperties(p); return "{String: " + getTypeDeclaration(inner) + "}"; } return super.getTypeDeclaration(p); @@ -835,8 +835,8 @@ public class JavascriptApolloClientCodegen extends DefaultCodegen implements Cod codegenModel.vendorExtensions.put("x-item-type", itemType); } } else if (ModelUtils.isMapSchema(model)) { - if (codegenModel != null && ModelUtils.getAdditionalProperties(model) != null) { - String itemType = getSchemaType(ModelUtils.getAdditionalProperties(model)); + if (codegenModel != null && getAdditionalProperties(model) != null) { + String itemType = getSchemaType(getAdditionalProperties(model)); codegenModel.vendorExtensions.put("x-isMap", true); // TODO: 5.0 Remove codegenModel.vendorExtensions.put("x-is-map", true); codegenModel.vendorExtensions.put("x-itemType", itemType); // TODO: 5.0 Remove 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 5ba759a3fd7..092ecd65872 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 @@ -613,7 +613,7 @@ public class JavascriptClientCodegen extends DefaultCodegen implements CodegenCo Schema inner = ap.getItems(); return "[" + getTypeDeclaration(inner) + "]"; } else if (ModelUtils.isMapSchema(p)) { - Schema inner = ModelUtils.getAdditionalProperties(p); + Schema inner = getAdditionalProperties(p); return "{String: " + getTypeDeclaration(inner) + "}"; } return super.getTypeDeclaration(p); @@ -883,8 +883,8 @@ public class JavascriptClientCodegen extends DefaultCodegen implements CodegenCo codegenModel.vendorExtensions.put("x-item-type", itemType); } } else if (ModelUtils.isMapSchema(model)) { - if (codegenModel != null && ModelUtils.getAdditionalProperties(model) != null) { - String itemType = getSchemaType(ModelUtils.getAdditionalProperties(model)); + if (codegenModel != null && getAdditionalProperties(model) != null) { + String itemType = getSchemaType(getAdditionalProperties(model)); codegenModel.vendorExtensions.put("x-isMap", true); // TODO: 5.0 Remove codegenModel.vendorExtensions.put("x-is-map", true); codegenModel.vendorExtensions.put("x-itemType", itemType); // TODO: 5.0 Remove diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptClosureAngularClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptClosureAngularClientCodegen.java index 7cc1215f464..877db877e4d 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptClosureAngularClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptClosureAngularClientCodegen.java @@ -225,7 +225,7 @@ public class JavascriptClosureAngularClientCodegen extends DefaultCodegen implem Schema inner = ap.getItems(); return getSchemaType(p) + ""; } else if (ModelUtils.isMapSchema(p)) { - Schema inner = ModelUtils.getAdditionalProperties(p); + Schema inner = getAdditionalProperties(p); return "Object"; } else if (ModelUtils.isFileSchema(p)) { return "Object"; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptFlowtypedClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptFlowtypedClientCodegen.java index 322b7b98e99..84c10840c44 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptFlowtypedClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptFlowtypedClientCodegen.java @@ -107,7 +107,7 @@ public class JavascriptFlowtypedClientCodegen extends AbstractTypeScriptClientCo @Override protected void addAdditionPropertiesToCodeGenModel(CodegenModel codegenModel, Schema schema) { - codegenModel.additionalPropertiesType = getTypeDeclaration(ModelUtils.getAdditionalProperties(schema)); + codegenModel.additionalPropertiesType = getTypeDeclaration(getAdditionalProperties(schema)); addImport(codegenModel, codegenModel.additionalPropertiesType); } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/LuaClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/LuaClientCodegen.java index 18330873bcf..f69352db3a9 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/LuaClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/LuaClientCodegen.java @@ -367,7 +367,7 @@ public class LuaClientCodegen extends DefaultCodegen implements CodegenConfig { Schema inner = ap.getItems(); return getTypeDeclaration(inner); } else if (ModelUtils.isMapSchema(p)) { - Schema inner = ModelUtils.getAdditionalProperties(p); + Schema inner = getAdditionalProperties(p); return getTypeDeclaration(inner); } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/NimClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/NimClientCodegen.java index 101dbab1fb9..6e754097c5c 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/NimClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/NimClientCodegen.java @@ -278,7 +278,7 @@ public class NimClientCodegen extends DefaultCodegen implements CodegenConfig { } return "seq[" + getTypeDeclaration(inner) + "]"; } else if (ModelUtils.isMapSchema(p)) { - Schema inner = ModelUtils.getAdditionalProperties(p); + Schema inner = getAdditionalProperties(p); if (inner == null) { inner = new StringSchema(); } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/OCamlClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/OCamlClientCodegen.java index d3e022bf6d6..4d6d038c73b 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/OCamlClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/OCamlClientCodegen.java @@ -584,7 +584,7 @@ public class OCamlClientCodegen extends DefaultCodegen implements CodegenConfig } return getTypeDeclaration(inner) + " list"; } else if (ModelUtils.isMapSchema(p)) { - Schema inner = ModelUtils.getAdditionalProperties(p); + Schema inner = getAdditionalProperties(p); if (inner == null) { LOGGER.warn(p.getName() + "(map property) does not have a proper inner type defined. Default to string"); inner = new StringSchema().description("TODO default missing map inner type to string"); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ObjcClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ObjcClientCodegen.java index 2fa81b97dd4..abeeeffa269 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ObjcClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ObjcClientCodegen.java @@ -389,7 +389,7 @@ public class ObjcClientCodegen extends DefaultCodegen implements CodegenConfig { return getSchemaType(p) + "<" + innerTypeDeclaration + ">*"; } } else if (ModelUtils.isMapSchema(p)) { - Schema inner = ModelUtils.getAdditionalProperties(p); + Schema inner = getAdditionalProperties(p); String innerTypeDeclaration = getTypeDeclaration(inner); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PerlClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PerlClientCodegen.java index f96af82dc70..04757f27d10 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PerlClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PerlClientCodegen.java @@ -257,7 +257,7 @@ public class PerlClientCodegen extends DefaultCodegen implements CodegenConfig { Schema inner = ap.getItems(); return getSchemaType(p) + "[" + getTypeDeclaration(inner) + "]"; } else if (ModelUtils.isMapSchema(p)) { - Schema inner = ModelUtils.getAdditionalProperties(p); + Schema inner = getAdditionalProperties(p); return getSchemaType(p) + "[string," + getTypeDeclaration(inner) + "]"; } return super.getTypeDeclaration(p); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpSilexServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpSilexServerCodegen.java index fef8185b61d..71512e350ae 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpSilexServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpSilexServerCodegen.java @@ -176,7 +176,7 @@ public class PhpSilexServerCodegen extends DefaultCodegen implements CodegenConf Schema inner = ap.getItems(); return getSchemaType(p) + "[" + getTypeDeclaration(inner) + "]"; } else if (ModelUtils.isMapSchema(p)) { - Schema inner = ModelUtils.getAdditionalProperties(p); + Schema inner = getAdditionalProperties(p); return getSchemaType(p) + "[string," + getTypeDeclaration(inner) + "]"; } return super.getTypeDeclaration(p); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpSymfonyServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpSymfonyServerCodegen.java index ef09fa0caa1..31e66bc67bf 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpSymfonyServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpSymfonyServerCodegen.java @@ -558,7 +558,7 @@ public class PhpSymfonyServerCodegen extends AbstractPhpCodegen implements Codeg } if (ModelUtils.isMapSchema(p)) { - Schema inner = ModelUtils.getAdditionalProperties(p); + Schema inner = getAdditionalProperties(p); return getTypeDeclaration(inner); } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ProtobufSchemaCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ProtobufSchemaCodegen.java index c2bccf21152..6cefe264da5 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ProtobufSchemaCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ProtobufSchemaCodegen.java @@ -459,7 +459,7 @@ public class ProtobufSchemaCodegen extends DefaultCodegen implements CodegenConf Schema inner = ap.getItems(); return getSchemaType(p) + "[" + getTypeDeclaration(inner) + "]"; } else if (ModelUtils.isMapSchema(p)) { - Schema inner = ModelUtils.getAdditionalProperties(p); + Schema inner = getAdditionalProperties(p); return getSchemaType(p) + "[str, " + getTypeDeclaration(inner) + "]"; } return super.getTypeDeclaration(p); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonAbstractConnexionServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonAbstractConnexionServerCodegen.java index 267d14bc83b..6105a43bf9a 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonAbstractConnexionServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonAbstractConnexionServerCodegen.java @@ -350,7 +350,7 @@ public class PythonAbstractConnexionServerCodegen extends DefaultCodegen impleme Schema inner = ap.getItems(); return getSchemaType(p) + "[" + getTypeDeclaration(inner) + "]"; } else if (ModelUtils.isMapSchema(p)) { - Schema inner = ModelUtils.getAdditionalProperties(p); + Schema inner = getAdditionalProperties(p); return getSchemaType(p) + "[str, " + getTypeDeclaration(inner) + "]"; } return super.getTypeDeclaration(p); 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 ef92f7ce0db..5c0df0ab817 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 @@ -461,7 +461,7 @@ public class PythonClientCodegen extends DefaultCodegen implements CodegenConfig Schema inner = ap.getItems(); return getSchemaType(p) + "[" + getTypeDeclaration(inner) + "]"; } else if (ModelUtils.isMapSchema(p)) { - Schema inner = ModelUtils.getAdditionalProperties(p); + Schema inner = getAdditionalProperties(p); return getSchemaType(p) + "(str, " + getTypeDeclaration(inner) + ")"; } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientExperimentalCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientExperimentalCodegen.java index 92c76bb89bb..5b7138c0686 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientExperimentalCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientExperimentalCodegen.java @@ -53,6 +53,15 @@ public class PythonClientExperimentalCodegen extends PythonClientCodegen { public PythonClientExperimentalCodegen() { super(); + // Composed schemas can have the 'additionalProperties' keyword, as specified in JSON schema. + // In principle, this should be enabled by default for all code generators. However due to limitations + // in other code generators, support needs to be enabled on a case-by-case basis. + supportsAdditionalPropertiesWithComposedSchema = true; + + // When the 'additionalProperties' keyword is not present in a OAS schema, allow + // undeclared properties. This is compliant with the JSON schema specification. + this.setDisallowAdditionalPropertiesIfNotPresent(false); + modifyFeatureSet(features -> features .includeDocumentationFeatures(DocumentationFeature.Readme) .wireFormatFeatures(EnumSet.of(WireFormatFeature.JSON, WireFormatFeature.XML, WireFormatFeature.Custom)) @@ -359,7 +368,9 @@ public class PythonClientExperimentalCodegen extends PythonClientCodegen { } } - // override with any special post-processing for all models + /** + * Override with special post-processing for all models. + */ @SuppressWarnings({"static-method", "unchecked"}) public Map postProcessAllModels(Map objs) { // loop through all models and delete ones where type!=object and the model has no validations and enums @@ -899,27 +910,41 @@ public class PythonClientExperimentalCodegen extends PythonClientCodegen { * @param p The OAS schema. * @param prefix prepended to the returned value. * @param suffix appended to the returned value. + * @param referencedModelNames a list of models that are being referenced while generating the types, + * may be used to generate imports. * @return a comma-separated string representation of the Python types */ - private String getTypeString(Schema p, String prefix, String suffix) { + private String getTypeString(Schema p, String prefix, String suffix, List referencedModelNames) { // this is used to set dataType, which defines a python tuple of classes String fullSuffix = suffix; if (")".equals(suffix)) { fullSuffix = "," + suffix; } - if (ModelUtils.isAnyTypeSchema(p)) { + if (StringUtils.isNotEmpty(p.get$ref())) { + // The input schema is a reference. If the resolved schema is + // a composed schema, convert the name to a Python class. + Schema s = ModelUtils.getReferencedSchema(this.openAPI, p); + if (s instanceof ComposedSchema) { + String modelName = ModelUtils.getSimpleRef(p.get$ref()); + if (referencedModelNames != null) { + referencedModelNames.add(modelName); + } + return prefix + toModelName(modelName) + fullSuffix; + } + } + if (isAnyTypeSchema(p)) { return prefix + "bool, date, datetime, dict, float, int, list, str, none_type" + suffix; } // Resolve $ref because ModelUtils.isXYZ methods do not automatically resolve references. if (ModelUtils.isNullable(ModelUtils.getReferencedSchema(this.openAPI, p))) { fullSuffix = ", none_type" + suffix; } - if (ModelUtils.isFreeFormObject(p) && ModelUtils.getAdditionalProperties(p) == null) { + if (isFreeFormObject(p) && getAdditionalProperties(p) == null) { return prefix + "bool, date, datetime, dict, float, int, list, str" + fullSuffix; } - if ((ModelUtils.isMapSchema(p) || "object".equals(p.getType())) && ModelUtils.getAdditionalProperties(p) != null) { - Schema inner = ModelUtils.getAdditionalProperties(p); - return prefix + "{str: " + getTypeString(inner, "(", ")") + "}" + fullSuffix; + if ((ModelUtils.isMapSchema(p) || "object".equals(p.getType())) && getAdditionalProperties(p) != null) { + Schema inner = getAdditionalProperties(p); + return prefix + "{str: " + getTypeString(inner, "(", ")", referencedModelNames) + "}" + fullSuffix; } else if (ModelUtils.isArraySchema(p)) { ArraySchema ap = (ArraySchema) p; Schema inner = ap.getItems(); @@ -932,11 +957,11 @@ public class PythonClientExperimentalCodegen extends PythonClientCodegen { // "[bool, date, datetime, dict, float, int, list, str, none_type]" // Using recursion to wrap the allowed python types in an array. Schema anyType = new Schema(); // A Schema without any attribute represents 'any type'. - return getTypeString(anyType, "[", "]"); + return getTypeString(anyType, "[", "]", referencedModelNames); } else { - return prefix + getTypeString(inner, "[", "]") + fullSuffix; + return prefix + getTypeString(inner, "[", "]", referencedModelNames) + fullSuffix; } - } + } if (ModelUtils.isFileSchema(p)) { return prefix + "file_type" + fullSuffix; } @@ -956,7 +981,7 @@ public class PythonClientExperimentalCodegen extends PythonClientCodegen { // in Python we will wrap this in () to make it a tuple but here we // will omit the parens so the generated documentaion will not include // them - return getTypeString(p, "", ""); + return getTypeString(p, "", "", null); } @Override @@ -969,14 +994,22 @@ public class PythonClientExperimentalCodegen extends PythonClientCodegen { @Override protected void addAdditionPropertiesToCodeGenModel(CodegenModel codegenModel, Schema schema) { - Schema addProps = ModelUtils.getAdditionalProperties(schema); - if (addProps != null && addProps.get$ref() == null) { - // if AdditionalProperties exists and is an inline definition, get its datatype and store it in m.parent - String typeString = getTypeDeclaration(addProps); - codegenModel.additionalPropertiesType = typeString; - } else { - addParentContainer(codegenModel, codegenModel.name, schema); + Schema addProps = getAdditionalProperties(schema); + if (addProps != null) { + // if AdditionalProperties exists, get its datatype and + // store it in codegenModel.additionalPropertiesType. + // The 'addProps' may be a reference, getTypeDeclaration will resolve + // the reference. + List referencedModelNames = new ArrayList(); + codegenModel.additionalPropertiesType = getTypeString(addProps, "", "", referencedModelNames); + if (referencedModelNames.size() != 0) { + // Models that are referenced in the 'additionalPropertiesType' keyword + // must be added to the imports. + codegenModel.imports.addAll(referencedModelNames); + } } + // If addProps is null, the value of the 'additionalProperties' keyword is set + // to false, i.e. no additional properties are allowed. } @Override diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RClientCodegen.java index 85be42aca6f..c719f5ebfb4 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RClientCodegen.java @@ -360,7 +360,7 @@ public class RClientCodegen extends DefaultCodegen implements CodegenConfig { Schema inner = ap.getItems(); return getSchemaType(p) + "[" + getTypeDeclaration(inner)+ "]"; } else if (ModelUtils.isMapSchema(p)) { - Schema inner = ModelUtils.getAdditionalProperties(p); + Schema inner = getAdditionalProperties(p); return getSchemaType(p) + "(" + getTypeDeclaration(inner) + ")"; } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RubyClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RubyClientCodegen.java index ce35525629a..d893636abf6 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RubyClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RubyClientCodegen.java @@ -659,7 +659,7 @@ public class RubyClientCodegen extends AbstractRubyCodegen { @Override protected void addAdditionPropertiesToCodeGenModel(CodegenModel codegenModel, Schema schema) { - final Schema additionalProperties = ModelUtils.getAdditionalProperties(schema); + final Schema additionalProperties = getAdditionalProperties(schema); if (additionalProperties != null) { codegenModel.additionalPropertiesType = getSchemaType(additionalProperties); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RustClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RustClientCodegen.java index 706083b50dc..3ff2bfe8569 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RustClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RustClientCodegen.java @@ -39,12 +39,13 @@ import static org.openapitools.codegen.utils.StringUtils.underscore; public class RustClientCodegen extends DefaultCodegen implements CodegenConfig { private static final Logger LOGGER = LoggerFactory.getLogger(RustClientCodegen.class); private boolean useSingleRequestParameter = false; + private boolean supportAsync = false; public static final String PACKAGE_NAME = "packageName"; public static final String PACKAGE_VERSION = "packageVersion"; - public static final String HYPER_LIBRARY = "hyper"; public static final String REQWEST_LIBRARY = "reqwest"; + public static final String SUPPORT_ASYNC = "supportAsync"; protected String packageName = "openapi"; protected String packageVersion = "1.0.0"; @@ -172,6 +173,8 @@ public class RustClientCodegen extends DefaultCodegen implements CodegenConfig { .defaultValue(Boolean.TRUE.toString())); cliOptions.add(new CliOption(CodegenConstants.USE_SINGLE_REQUEST_PARAMETER, CodegenConstants.USE_SINGLE_REQUEST_PARAMETER_DESC, SchemaTypeUtil.BOOLEAN_TYPE) .defaultValue(Boolean.FALSE.toString())); + cliOptions.add(new CliOption(SUPPORT_ASYNC, "If set, generate async function call instead", SchemaTypeUtil.BOOLEAN_TYPE) + .defaultValue(Boolean.FALSE.toString())); supportedLibraries.put(HYPER_LIBRARY, "HTTP client: Hyper."); supportedLibraries.put(REQWEST_LIBRARY, "HTTP client: Reqwest."); @@ -257,6 +260,11 @@ public class RustClientCodegen extends DefaultCodegen implements CodegenConfig { } writePropertyBack(CodegenConstants.USE_SINGLE_REQUEST_PARAMETER, getUseSingleRequestParameter()); + if (additionalProperties.containsKey(SUPPORT_ASYNC)) { + this.setSupportAsync(convertPropertyToBoolean(SUPPORT_ASYNC)); + } + writePropertyBack(SUPPORT_ASYNC, getSupportAsync()); + additionalProperties.put(CodegenConstants.PACKAGE_NAME, packageName); additionalProperties.put(CodegenConstants.PACKAGE_VERSION, packageVersion); @@ -284,13 +292,22 @@ public class RustClientCodegen extends DefaultCodegen implements CodegenConfig { supportingFiles.add(new SupportingFile("lib.mustache", "src", "lib.rs")); supportingFiles.add(new SupportingFile("Cargo.mustache", "", "Cargo.toml")); + supportingFiles.add(new SupportingFile(getLibrary() + "/api_mod.mustache", apiFolder, "mod.rs")); + supportingFiles.add(new SupportingFile(getLibrary() + "/configuration.mustache", apiFolder, "configuration.rs")); if (HYPER_LIBRARY.equals(getLibrary())) { supportingFiles.add(new SupportingFile("request.rs", apiFolder, "request.rs")); } + if (!getSupportAsync()) { // for sync only + supportingFiles.add(new SupportingFile(getLibrary() + "/client.mustache", apiFolder, "client.rs")); + } + } - supportingFiles.add(new SupportingFile(getLibrary() + "/configuration.mustache", apiFolder, "configuration.rs")); - supportingFiles.add(new SupportingFile(getLibrary() + "/client.mustache", apiFolder, "client.rs")); - supportingFiles.add(new SupportingFile(getLibrary() + "/api_mod.mustache", apiFolder, "mod.rs")); + private boolean getSupportAsync() { + return supportAsync; + } + + private void setSupportAsync(boolean supportAsync) { + this.supportAsync = supportAsync; } private boolean getUseSingleRequestParameter() { @@ -421,7 +438,7 @@ public class RustClientCodegen extends DefaultCodegen implements CodegenConfig { } return "Vec<" + getTypeDeclaration(inner) + ">"; } else if (ModelUtils.isMapSchema(p)) { - Schema inner = ModelUtils.getAdditionalProperties(p); + Schema inner = getAdditionalProperties(p); if (inner == null) { LOGGER.warn(p.getName() + "(map property) does not have a proper inner type defined. Default to string"); inner = new StringSchema().description("TODO default missing map inner type to string"); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RustServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RustServerCodegen.java index a0ef19a483a..80fd3dd58e2 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RustServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RustServerCodegen.java @@ -1177,7 +1177,7 @@ public class RustServerCodegen extends DefaultCodegen implements CodegenConfig { String innerType = getTypeDeclaration(inner); return typeMapping.get("array") + "<" + innerType + ">"; } else if (ModelUtils.isMapSchema(p)) { - Schema inner = ModelUtils.getAdditionalProperties(p); + Schema inner = getAdditionalProperties(p); String innerType = getTypeDeclaration(inner); StringBuilder typeDeclaration = new StringBuilder(typeMapping.get("map")).append("<").append(typeMapping.get("string")).append(", "); typeDeclaration.append(innerType).append(">"); @@ -1211,7 +1211,7 @@ public class RustServerCodegen extends DefaultCodegen implements CodegenConfig { Schema inner = ap.getItems(); return instantiationTypes.get("array") + "<" + getSchemaType(inner) + ">"; } else if (ModelUtils.isMapSchema(p)) { - Schema inner = ModelUtils.getAdditionalProperties(p); + Schema inner = getAdditionalProperties(p); return instantiationTypes.get("map") + "<" + typeMapping.get("string") + ", " + getSchemaType(inner) + ">"; } else { return null; @@ -1274,7 +1274,7 @@ public class RustServerCodegen extends DefaultCodegen implements CodegenConfig { additionalProperties.put("usesXmlNamespaces", true); } - Schema additionalProperties = ModelUtils.getAdditionalProperties(model); + Schema additionalProperties = getAdditionalProperties(model); if (additionalProperties != null) { mdl.additionalPropertiesType = getSchemaType(additionalProperties); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaAkkaClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaAkkaClientCodegen.java index 299a8e79e57..6c06262a5ec 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaAkkaClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaAkkaClientCodegen.java @@ -288,7 +288,7 @@ public class ScalaAkkaClientCodegen extends AbstractScalaCodegen implements Code } else if (ModelUtils.isIntegerSchema(p)) { return null; } else if (ModelUtils.isMapSchema(p)) { - String inner = getSchemaType(ModelUtils.getAdditionalProperties(p)); + String inner = getSchemaType(getAdditionalProperties(p)); return "Map[String, " + inner + "].empty "; } else if (ModelUtils.isArraySchema(p)) { ArraySchema ap = (ArraySchema) p; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaFinchServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaFinchServerCodegen.java index d49f37e5622..50e4ffc684e 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaFinchServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaFinchServerCodegen.java @@ -265,7 +265,7 @@ public class ScalaFinchServerCodegen extends DefaultCodegen implements CodegenCo Schema inner = ap.getItems(); return getSchemaType(p) + "[" + getTypeDeclaration(inner) + "]"; } else if (ModelUtils.isMapSchema(p)) { - Schema inner = ModelUtils.getAdditionalProperties(p); + Schema inner = getAdditionalProperties(p); return getSchemaType(p) + "[String, " + getTypeDeclaration(inner) + "]"; } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaGatlingCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaGatlingCodegen.java index 4cd79f8644e..30d8c83d130 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaGatlingCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaGatlingCodegen.java @@ -387,7 +387,7 @@ public class ScalaGatlingCodegen extends AbstractScalaCodegen implements Codegen Schema inner = ap.getItems(); return getSchemaType(p) + "[" + getTypeDeclaration(inner) + "]"; } else if (ModelUtils.isMapSchema(p)) { - Schema inner = ModelUtils.getAdditionalProperties(p); + Schema inner = getAdditionalProperties(p); return getSchemaType(p) + "[String, " + getTypeDeclaration(inner) + "]"; } return super.getTypeDeclaration(p); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaPlayFrameworkServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaPlayFrameworkServerCodegen.java index 4c1da136a2e..18ad995d1f5 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaPlayFrameworkServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaPlayFrameworkServerCodegen.java @@ -374,7 +374,7 @@ public class ScalaPlayFrameworkServerCodegen extends AbstractScalaCodegen implem } if (ModelUtils.isMapSchema(p)) { - Schema ap = ModelUtils.getAdditionalProperties(p); + Schema ap = getAdditionalProperties(p); String inner = getSchemaType(ap); return "Map.empty[String, " + inner + "]"; } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalazClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalazClientCodegen.java index 0b19394c08e..036970066f5 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalazClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalazClientCodegen.java @@ -182,7 +182,7 @@ public class ScalazClientCodegen extends AbstractScalaCodegen implements Codegen } else if (ModelUtils.isIntegerSchema(p)) { return null; } else if (ModelUtils.isMapSchema(p)) { - String inner = getSchemaType(ModelUtils.getAdditionalProperties(p)); + String inner = getSchemaType(getAdditionalProperties(p)); return "Map.empty[String, " + inner + "] "; } else if (ModelUtils.isArraySchema(p)) { 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 347b371c776..a0aaec72486 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 @@ -135,7 +135,7 @@ public class StaticHtml2Generator extends DefaultCodegen implements CodegenConfi Schema inner = ap.getItems(); return getSchemaType(p) + "[" + getTypeDeclaration(inner) + "]"; } else if (ModelUtils.isMapSchema(p)) { - Schema inner = ModelUtils.getAdditionalProperties(p); + Schema inner = getAdditionalProperties(p); return getSchemaType(p) + "[String, " + getTypeDeclaration(inner) + "]"; } return super.getTypeDeclaration(p); 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 c50f4492b40..3804de3160a 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 @@ -117,7 +117,7 @@ public class StaticHtmlGenerator extends DefaultCodegen implements CodegenConfig Schema inner = ap.getItems(); return getSchemaType(p) + "[" + getTypeDeclaration(inner) + "]"; } else if (ModelUtils.isMapSchema(p)) { - Schema inner = ModelUtils.getAdditionalProperties(p); + Schema inner = getAdditionalProperties(p); return getSchemaType(p) + "[String, " + getTypeDeclaration(inner) + "]"; } return super.getTypeDeclaration(p); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift4Codegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift4Codegen.java index ecd029c13fb..0c389b58e72 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift4Codegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift4Codegen.java @@ -341,7 +341,7 @@ public class Swift4Codegen extends DefaultCodegen implements CodegenConfig { protected void addAdditionPropertiesToCodeGenModel(CodegenModel codegenModel, Schema schema) { - final Schema additionalProperties = ModelUtils.getAdditionalProperties(schema); + final Schema additionalProperties = getAdditionalProperties(schema); if (additionalProperties != null) { codegenModel.additionalPropertiesType = getSchemaType(additionalProperties); @@ -516,7 +516,7 @@ public class Swift4Codegen extends DefaultCodegen implements CodegenConfig { Schema inner = ap.getItems(); return "[" + getTypeDeclaration(inner) + "]"; } else if (ModelUtils.isMapSchema(p)) { - Schema inner = ModelUtils.getAdditionalProperties(p); + Schema inner = getAdditionalProperties(p); return "[String:" + getTypeDeclaration(inner) + "]"; } return super.getTypeDeclaration(p); @@ -629,7 +629,7 @@ public class Swift4Codegen extends DefaultCodegen implements CodegenConfig { @Override public String toInstantiationType(Schema p) { if (ModelUtils.isMapSchema(p)) { - return getSchemaType(ModelUtils.getAdditionalProperties(p)); + return getSchemaType(getAdditionalProperties(p)); } else if (ModelUtils.isArraySchema(p)) { ArraySchema ap = (ArraySchema) p; String inner = getSchemaType(ap.getItems()); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift5ClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift5ClientCodegen.java index 445069455d4..ccd1b7ad3d0 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift5ClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift5ClientCodegen.java @@ -330,7 +330,7 @@ public class Swift5ClientCodegen extends DefaultCodegen implements CodegenConfig protected void addAdditionPropertiesToCodeGenModel(CodegenModel codegenModel, Schema schema) { - final Schema additionalProperties = ModelUtils.getAdditionalProperties(schema); + final Schema additionalProperties = getAdditionalProperties(schema); if (additionalProperties != null) { codegenModel.additionalPropertiesType = getSchemaType(additionalProperties); @@ -522,7 +522,7 @@ public class Swift5ClientCodegen extends DefaultCodegen implements CodegenConfig Schema inner = ap.getItems(); return "[" + getTypeDeclaration(inner) + "]"; } else if (ModelUtils.isMapSchema(p)) { - Schema inner = ModelUtils.getAdditionalProperties(p); + Schema inner = getAdditionalProperties(p); return "[String:" + getTypeDeclaration(inner) + "]"; } return super.getTypeDeclaration(p); @@ -635,7 +635,7 @@ public class Swift5ClientCodegen extends DefaultCodegen implements CodegenConfig @Override public String toInstantiationType(Schema p) { if (ModelUtils.isMapSchema(p)) { - return getSchemaType(ModelUtils.getAdditionalProperties(p)); + return getSchemaType(getAdditionalProperties(p)); } else if (ModelUtils.isArraySchema(p)) { ArraySchema ap = (ArraySchema) p; String inner = getSchemaType(ap.getItems()); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAngularClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAngularClientCodegen.java index ef2ce919638..9c87bc94f3f 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAngularClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAngularClientCodegen.java @@ -99,7 +99,7 @@ public class TypeScriptAngularClientCodegen extends AbstractTypeScriptClientCode this.cliOptions.add(CliOption.newBoolean(PROVIDED_IN_ROOT, "Use this property to provide Injectables in root (it is only valid in angular version greater or equal to 6.0.0).", false)); - this.cliOptions.add(new CliOption(NG_VERSION, "The version of Angular.").defaultValue(this.ngVersion)); + this.cliOptions.add(new CliOption(NG_VERSION, "The version of Angular. (At least 6.0.0)").defaultValue(this.ngVersion)); this.cliOptions.add(new CliOption(API_MODULE_PREFIX, "The prefix of the generated ApiModule.")); this.cliOptions.add(new CliOption(SERVICE_SUFFIX, "The suffix of the generated service.").defaultValue(this.serviceSuffix)); this.cliOptions.add(new CliOption(SERVICE_FILE_SUFFIX, "The suffix of the file of the generated service (service.ts).").defaultValue(this.serviceFileSuffix)); @@ -111,7 +111,7 @@ public class TypeScriptAngularClientCodegen extends AbstractTypeScriptClientCode @Override protected void addAdditionPropertiesToCodeGenModel(CodegenModel codegenModel, Schema schema) { - codegenModel.additionalPropertiesType = getTypeDeclaration(ModelUtils.getAdditionalProperties(schema)); + codegenModel.additionalPropertiesType = getTypeDeclaration(getAdditionalProperties(schema)); addImport(codegenModel, codegenModel.additionalPropertiesType); } @@ -122,7 +122,7 @@ public class TypeScriptAngularClientCodegen extends AbstractTypeScriptClientCode @Override public String getHelp() { - return "Generates a TypeScript Angular (2.x - 9.x) client library."; + return "Generates a TypeScript Angular (6.x - 9.x) client library."; } @Override @@ -179,16 +179,12 @@ public class TypeScriptAngularClientCodegen extends AbstractTypeScriptClientCode taggedUnions = Boolean.parseBoolean(additionalProperties.get(TAGGED_UNIONS).toString()); } - if (ngVersion.atLeast("6.0.0")) { - if (!additionalProperties.containsKey(PROVIDED_IN_ROOT)) { - additionalProperties.put(PROVIDED_IN_ROOT, true); - } else { - additionalProperties.put(PROVIDED_IN_ROOT, Boolean.parseBoolean( - additionalProperties.get(PROVIDED_IN_ROOT).toString() - )); - } + if (!additionalProperties.containsKey(PROVIDED_IN_ROOT)) { + additionalProperties.put(PROVIDED_IN_ROOT, true); } else { - additionalProperties.put(PROVIDED_IN_ROOT, false); + additionalProperties.put(PROVIDED_IN_ROOT, Boolean.parseBoolean( + additionalProperties.get(PROVIDED_IN_ROOT).toString() + )); } if (ngVersion.atLeast("9.0.0")) { @@ -198,13 +194,7 @@ public class TypeScriptAngularClientCodegen extends AbstractTypeScriptClientCode } additionalProperties.put(NG_VERSION, ngVersion); - additionalProperties.put("injectionToken", ngVersion.atLeast("4.0.0") ? "InjectionToken" : "OpaqueToken"); - additionalProperties.put("injectionTokenTyped", ngVersion.atLeast("4.0.0")); - additionalProperties.put("useHttpClient", ngVersion.atLeast("4.3.0")); - additionalProperties.put("useRxJS6", ngVersion.atLeast("6.0.0")); - if (!ngVersion.atLeast("4.3.0")) { - supportingFiles.add(new SupportingFile("rxjs-operators.mustache", getIndexDirectory(), "rxjs-operators.ts")); - } + if (additionalProperties.containsKey(API_MODULE_PREFIX)) { String apiModulePrefix = additionalProperties.get(API_MODULE_PREFIX).toString(); validateClassPrefixArgument("ApiModule", apiModulePrefix); @@ -248,13 +238,9 @@ public class TypeScriptAngularClientCodegen extends AbstractTypeScriptClientCode additionalProperties.put("tsVersion", ">=3.4.0 <3.6.0"); } else if (ngVersion.atLeast("7.0.0")) { additionalProperties.put("tsVersion", ">=3.1.1 <3.2.0"); - } else if (ngVersion.atLeast("6.0.0")) { - additionalProperties.put("tsVersion", ">=2.7.2 and <2.10.0"); - } else if (ngVersion.atLeast("5.0.0")) { - additionalProperties.put("tsVersion", ">=2.1.5 <2.7.0"); } else { - // Angular v2-v4 requires typescript ">=2.1.5 <2.8" - additionalProperties.put("tsVersion", ">=2.1.5 <2.8.0"); + // Angular v6 requires typescript ">=2.7.2 and <2.10.0" + additionalProperties.put("tsVersion", ">=2.7.2 and <2.10.0"); } // Set the rxJS version compatible to the Angular version @@ -264,30 +250,12 @@ public class TypeScriptAngularClientCodegen extends AbstractTypeScriptClientCode additionalProperties.put("rxjsVersion", "6.5.0"); } else if (ngVersion.atLeast("7.0.0")) { additionalProperties.put("rxjsVersion", "6.3.0"); - } else if (ngVersion.atLeast("6.0.0")) { + } else { + // Angular v6 additionalProperties.put("rxjsVersion", "6.1.0"); - } else { - // Angular prior to v6 - additionalProperties.put("rxjsVersion", "5.4.0"); } - if (!ngVersion.atLeast("4.3.0")) { - supportingFiles.add(new SupportingFile("rxjs-operators.mustache", getIndexDirectory(), "rxjs-operators.ts")); - } - - // for Angular 2 AOT support we will use good-old ngc, - // Angular Package format wasn't invented at this time and building was much more easier - if (!ngVersion.atLeast("4.0.0")) { - LOGGER.warn("Please update your legacy Angular " + ngVersion + " project to benefit from 'Angular Package Format' support."); - additionalProperties.put("useNgPackagr", false); - } else { - additionalProperties.put("useNgPackagr", true); - supportingFiles.add(new SupportingFile("ng-package.mustache", getIndexDirectory(), "ng-package.json")); - } - - // Libraries generated with v1.x of ng-packagr will ship with AoT metadata in v3, which is intended for Angular v4. - // Libraries generated with v2.x of ng-packagr will ship with AoT metadata in v4, which is intended for Angular v5 (and Angular v6). - additionalProperties.put("useOldNgPackagr", !ngVersion.atLeast("5.0.0")); + supportingFiles.add(new SupportingFile("ng-package.mustache", getIndexDirectory(), "ng-package.json")); // Specific ng-packagr configuration if (ngVersion.atLeast("9.0.0")) { @@ -300,17 +268,11 @@ public class TypeScriptAngularClientCodegen extends AbstractTypeScriptClientCode // compatible versions with typescript version additionalProperties.put("ngPackagrVersion", "5.1.0"); additionalProperties.put("tsickleVersion", "0.34.0"); - } else if (ngVersion.atLeast("6.0.0")) { + } else { + // angular v6 // compatible versions with typescript version additionalProperties.put("ngPackagrVersion", "3.0.6"); additionalProperties.put("tsickleVersion", "0.32.1"); - } else if (ngVersion.atLeast("5.0.0")) { - // compatible versions with typescript version - additionalProperties.put("ngPackagrVersion", "2.4.5"); - additionalProperties.put("tsickleVersion", "0.27.5"); - } else { - // Angular versions prior to v5 - additionalProperties.put("ngPackagrVersion", "1.6.0"); } // set zone.js version @@ -318,12 +280,9 @@ public class TypeScriptAngularClientCodegen extends AbstractTypeScriptClientCode additionalProperties.put("zonejsVersion", "0.10.2"); } else if (ngVersion.atLeast("8.0.0")) { additionalProperties.put("zonejsVersion", "0.9.1"); - } else if (ngVersion.atLeast("5.0.0")) { - // compatible versions to Angular 5+ - additionalProperties.put("zonejsVersion", "0.8.26"); } else { - // Angular versions prior to v5 - additionalProperties.put("zonejsVersion", "0.7.6"); + // compatible versions to Angular 6+ + additionalProperties.put("zonejsVersion", "0.8.26"); } //Files for building our lib @@ -385,37 +344,8 @@ public class TypeScriptAngularClientCodegen extends AbstractTypeScriptClientCode if (op.getHasFormParams()) { hasSomeFormParams = true; } - if ((boolean) additionalProperties.get("useHttpClient")) { - op.httpMethod = op.httpMethod.toLowerCase(Locale.ENGLISH); - } else { - // Convert httpMethod to Angular's RequestMethod enum - // https://angular.io/docs/ts/latest/api/http/index/RequestMethod-enum.html - switch (op.httpMethod) { - case "GET": - op.httpMethod = "RequestMethod.Get"; - break; - case "POST": - op.httpMethod = "RequestMethod.Post"; - break; - case "PUT": - op.httpMethod = "RequestMethod.Put"; - break; - case "DELETE": - op.httpMethod = "RequestMethod.Delete"; - break; - case "OPTIONS": - op.httpMethod = "RequestMethod.Options"; - break; - case "HEAD": - op.httpMethod = "RequestMethod.Head"; - break; - case "PATCH": - op.httpMethod = "RequestMethod.Patch"; - break; - default: - throw new RuntimeException("Unknown HTTP Method " + op.httpMethod + " not allowed"); - } - } + op.httpMethod = op.httpMethod.toLowerCase(Locale.ENGLISH); + // Prep a string buffer where we're going to set up our new version of the string. StringBuilder pathBuffer = new StringBuilder(); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAxiosClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAxiosClientCodegen.java index 2a1863ebd52..95ded86dce5 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAxiosClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAxiosClientCodegen.java @@ -166,7 +166,7 @@ public class TypeScriptAxiosClientCodegen extends AbstractTypeScriptClientCodege @Override protected void addAdditionPropertiesToCodeGenModel(CodegenModel codegenModel, Schema schema) { - codegenModel.additionalPropertiesType = getTypeDeclaration(ModelUtils.getAdditionalProperties(schema)); + codegenModel.additionalPropertiesType = getTypeDeclaration(getAdditionalProperties(schema)); addImport(codegenModel, codegenModel.additionalPropertiesType); } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptFetchClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptFetchClientCodegen.java index 990c206fca5..c5b857ef2cd 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptFetchClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptFetchClientCodegen.java @@ -157,7 +157,7 @@ public class TypeScriptFetchClientCodegen extends AbstractTypeScriptClientCodege @Override protected void addAdditionPropertiesToCodeGenModel(CodegenModel codegenModel, Schema schema) { - codegenModel.additionalPropertiesType = getTypeDeclaration(ModelUtils.getAdditionalProperties(schema)); + codegenModel.additionalPropertiesType = getTypeDeclaration(getAdditionalProperties(schema)); addImport(codegenModel, codegenModel.additionalPropertiesType); } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptInversifyClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptInversifyClientCodegen.java index 93f47c09b5e..8bff85a02ad 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptInversifyClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptInversifyClientCodegen.java @@ -76,7 +76,7 @@ public class TypeScriptInversifyClientCodegen extends AbstractTypeScriptClientCo @Override protected void addAdditionPropertiesToCodeGenModel(CodegenModel codegenModel, Schema schema) { - codegenModel.additionalPropertiesType = getTypeDeclaration(ModelUtils.getAdditionalProperties(schema)); + codegenModel.additionalPropertiesType = getTypeDeclaration(getAdditionalProperties(schema)); addImport(codegenModel, codegenModel.additionalPropertiesType); } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptJqueryClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptJqueryClientCodegen.java index c680840da7a..6e4e2fad7b1 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptJqueryClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptJqueryClientCodegen.java @@ -112,7 +112,7 @@ public class TypeScriptJqueryClientCodegen extends AbstractTypeScriptClientCodeg @Override protected void addAdditionPropertiesToCodeGenModel(CodegenModel codegenModel, Schema schema) { - codegenModel.additionalPropertiesType = getSchemaType(ModelUtils.getAdditionalProperties(schema)); + codegenModel.additionalPropertiesType = getSchemaType(getAdditionalProperties(schema)); addImport(codegenModel, codegenModel.additionalPropertiesType); } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptNodeClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptNodeClientCodegen.java index 6a46fbc78dd..09d5ae4df4e 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptNodeClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptNodeClientCodegen.java @@ -316,7 +316,7 @@ public class TypeScriptNodeClientCodegen extends AbstractTypeScriptClientCodegen @Override protected void addAdditionPropertiesToCodeGenModel(CodegenModel codegenModel, Schema schema) { super.addAdditionPropertiesToCodeGenModel(codegenModel, schema); - Schema additionalProperties = ModelUtils.getAdditionalProperties(schema); + Schema additionalProperties = getAdditionalProperties(schema); codegenModel.additionalPropertiesType = getSchemaType(additionalProperties); if ("array".equalsIgnoreCase(codegenModel.additionalPropertiesType)) { codegenModel.additionalPropertiesType += '<' + getSchemaType(((ArraySchema) additionalProperties).getItems()) + '>'; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptReduxQueryClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptReduxQueryClientCodegen.java index 26f6fb6f06b..aac1d6bc8d9 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptReduxQueryClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptReduxQueryClientCodegen.java @@ -117,7 +117,7 @@ public class TypeScriptReduxQueryClientCodegen extends AbstractTypeScriptClientC @Override protected void addAdditionPropertiesToCodeGenModel(CodegenModel codegenModel, Schema schema) { - codegenModel.additionalPropertiesType = getTypeDeclaration(ModelUtils.getAdditionalProperties(schema)); + codegenModel.additionalPropertiesType = getTypeDeclaration(getAdditionalProperties(schema)); addImport(codegenModel, codegenModel.additionalPropertiesType); } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptRxjsClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptRxjsClientCodegen.java index 2d00d6b30a0..ec5ddb557fd 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptRxjsClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptRxjsClientCodegen.java @@ -117,7 +117,7 @@ public class TypeScriptRxjsClientCodegen extends AbstractTypeScriptClientCodegen @Override protected void addAdditionPropertiesToCodeGenModel(CodegenModel codegenModel, Schema schema) { - codegenModel.additionalPropertiesType = getTypeDeclaration(ModelUtils.getAdditionalProperties(schema)); + codegenModel.additionalPropertiesType = getTypeDeclaration(getAdditionalProperties(schema)); addImport(codegenModel, codegenModel.additionalPropertiesType); } 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 7092f296171..961ff1974b2 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 @@ -17,6 +17,8 @@ package org.openapitools.codegen.utils; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.ObjectMapper; import io.swagger.v3.oas.models.OpenAPI; import io.swagger.v3.oas.models.Operation; import io.swagger.v3.oas.models.PathItem; @@ -26,6 +28,10 @@ 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; +import io.swagger.v3.parser.core.models.AuthorizationValue; +import io.swagger.v3.parser.util.ClasspathHelper; +import io.swagger.v3.parser.ObjectMapperFactory; +import io.swagger.v3.parser.util.RemoteUrl; import io.swagger.v3.parser.util.SchemaTypeUtil; import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.CodegenModel; @@ -33,11 +39,16 @@ import org.openapitools.codegen.IJsonSchemaValidationProperties; import org.openapitools.codegen.config.GlobalSettings; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.apache.commons.io.FileUtils; import java.math.BigDecimal; +import java.net.URI; import java.util.*; import java.util.Map.Entry; import java.util.stream.Collectors; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; import static org.openapitools.codegen.utils.OnceLogger.once; @@ -48,6 +59,27 @@ public class ModelUtils { private static final String generateAliasAsModelKey = "generateAliasAsModel"; + // A vendor extension to track the value of the 'swagger' field in a 2.0 doc, if applicable. + private static final String openapiDocVersion = "x-original-swagger-version"; + + // A vendor extension to track the value of the 'disallowAdditionalPropertiesIfNotPresent' CLI + private static final String disallowAdditionalPropertiesIfNotPresent = "x-disallow-additional-properties-if-not-present"; + + private static ObjectMapper JSON_MAPPER, YAML_MAPPER; + + static { + JSON_MAPPER = ObjectMapperFactory.createJson(); + YAML_MAPPER = ObjectMapperFactory.createYaml(); + } + + public static void setDisallowAdditionalPropertiesIfNotPresent(boolean value) { + GlobalSettings.setProperty(disallowAdditionalPropertiesIfNotPresent, Boolean.toString(value)); + } + + public static boolean isDisallowAdditionalPropertiesIfNotPresent() { + return Boolean.parseBoolean(GlobalSettings.getProperty(disallowAdditionalPropertiesIfNotPresent, "true")); + } + public static void setGenerateAliasAsModel(boolean value) { GlobalSettings.setProperty(generateAliasAsModelKey, Boolean.toString(value)); } @@ -657,48 +689,6 @@ public class ModelUtils { return schema instanceof ComposedSchema; } - /** - * Return true if the schema value can be any type, i.e. it can be - * the null value, integer, number, string, object or array. - * One use case is when the "type" attribute in the OAS schema is unspecified. - * - * Examples: - * - * arbitraryTypeValue: - * description: This is an arbitrary type schema. - * It is not a free-form object. - * The value can be any type except the 'null' value. - * arbitraryTypeNullableValue: - * description: This is an arbitrary type schema. - * It is not a free-form object. - * The value can be any type, including the 'null' value. - * nullable: true - * - * @param schema the OAS schema. - * @return true if the schema value can be an arbitrary type. - */ - public static boolean isAnyTypeSchema(Schema schema) { - if (schema == null) { - once(LOGGER).error("Schema cannot be null in isAnyTypeSchema check"); - return false; - } - - if (isFreeFormObject(schema)) { - // make sure it's not free form object - return false; - } - - if (schema.getClass().equals(Schema.class) && schema.get$ref() == null && schema.getType() == null && - (schema.getProperties() == null || schema.getProperties().isEmpty()) && - schema.getAdditionalProperties() == null && schema.getNot() == null && - schema.getEnum() == null) { - return true; - // If and when type arrays are supported in a future OAS specification, - // we could return true if the type array includes all possible JSON schema types. - } - return false; - } - /** * Check to see if the schema is a free form object. * @@ -726,10 +716,11 @@ public class ModelUtils { * description: This is NOT a free-form object. * The value can be any type except the 'null' value. * + * @param openAPI the object that encapsulates the OAS document. * @param schema potentially containing a '$ref' * @return true if it's a free-form object */ - public static boolean isFreeFormObject(Schema schema) { + public static boolean isFreeFormObject(OpenAPI openAPI, Schema schema) { if (schema == null) { // TODO: Is this message necessary? A null schema is not a free-form object, so the result is correct. once(LOGGER).error("Schema cannot be null in isFreeFormObject check"); @@ -739,7 +730,7 @@ public class ModelUtils { // not free-form if allOf, anyOf, oneOf is not empty if (schema instanceof ComposedSchema) { ComposedSchema cs = (ComposedSchema) schema; - List interfaces = getInterfaces(cs); + List interfaces = ModelUtils.getInterfaces(cs); if (interfaces != null && !interfaces.isEmpty()) { return false; } @@ -749,7 +740,7 @@ public class ModelUtils { if ("object".equals(schema.getType())) { // no properties if ((schema.getProperties() == null || schema.getProperties().isEmpty())) { - Schema addlProps = getAdditionalProperties(schema); + Schema addlProps = getAdditionalProperties(openAPI, schema); // additionalProperties not defined if (addlProps == null) { return true; @@ -1080,16 +1071,73 @@ public class ModelUtils { return schema; } - public static Schema getAdditionalProperties(Schema schema) { - if (schema.getAdditionalProperties() instanceof Schema) { - return (Schema) schema.getAdditionalProperties(); + /** + * Returns the additionalProperties Schema for the specified input schema. + * + * The additionalProperties keyword is used to control the handling of additional, undeclared + * properties, that is, properties whose names are not listed in the properties keyword. + * The additionalProperties keyword may be either a boolean or an object. + * If additionalProperties is a boolean and set to false, no additional properties are allowed. + * By default when the additionalProperties keyword is not specified in the input schema, + * any additional properties are allowed. This is equivalent to setting additionalProperties + * to the boolean value True or setting additionalProperties: {} + * + * @param openAPI the object that encapsulates the OAS document. + * @param schema the input schema that may or may not have the additionalProperties keyword. + * @return the Schema of the additionalProperties. The null value is returned if no additional + * properties are allowed. + */ + public static Schema getAdditionalProperties(OpenAPI openAPI, Schema schema) { + Object addProps = schema.getAdditionalProperties(); + if (addProps instanceof Schema) { + return (Schema) addProps; } - if (schema.getAdditionalProperties() instanceof Boolean && (Boolean) schema.getAdditionalProperties()) { - return new ObjectSchema(); + if (addProps == null) { + // When reaching this code path, this should indicate the 'additionalProperties' keyword is + // not present in the OAS schema. This is true for OAS 3.0 documents. + // However, the parsing logic is broken for OAS 2.0 documents because of the + // https://github.com/swagger-api/swagger-parser/issues/1369 issue. + // When OAS 2.0 documents are parsed, the swagger-v2-converter ignores the 'additionalProperties' + // keyword if the value is boolean. That means codegen is unable to determine whether + // additional properties are allowed or not. + // + // The original behavior was to assume additionalProperties had been set to false. + if (isDisallowAdditionalPropertiesIfNotPresent()) { + // If the 'additionalProperties' keyword is not present in a OAS schema, + // interpret as if the 'additionalProperties' keyword had been set to false. + // This is NOT compliant with the JSON schema specification. It is the original + // 'openapi-generator' behavior. + return null; + } + /* + // The disallowAdditionalPropertiesIfNotPresent CLI option has been set to true, + // but for now that only works with OAS 3.0 documents. + // The new behavior does not work with OAS 2.0 documents. + if (extensions == null || !extensions.containsKey(EXTENSION_OPENAPI_DOC_VERSION)) { + // Fallback to the legacy behavior. + return null; + } + // Get original swagger version from OAS extension. + // Note openAPI.getOpenapi() is always set to 3.x even when the document + // is converted from a OAS/Swagger 2.0 document. + // https://github.com/swagger-api/swagger-parser/pull/1374 + SemVer version = new SemVer((String)extensions.get(EXTENSION_OPENAPI_DOC_VERSION)); + if (version.major != 3) { + return null; + } + */ + } + if (addProps == null || (addProps instanceof Boolean && (Boolean) addProps)) { + // Return ObjectSchema to specify any object (map) value is allowed. + // Set nullable to specify the value of additional properties may be + // the null value. + // Free-form additionalProperties don't need to have an inner + // additional properties, the type is already free-form. + return new ObjectSchema().additionalProperties(Boolean.FALSE).nullable(Boolean.TRUE); } return null; } - + public static Header getReferencedHeader(OpenAPI openAPI, Header header) { if (header != null && StringUtils.isNotEmpty(header.get$ref())) { String name = getSimpleRef(header.get$ref()); @@ -1413,4 +1461,82 @@ public class ModelUtils { if (maxProperties != null) target.setMaxProperties(maxProperties); } } + + private static ObjectMapper getRightMapper(String data) { + ObjectMapper mapper; + if(data.trim().startsWith("{")) { + mapper = JSON_MAPPER; + } else { + mapper = YAML_MAPPER; + } + return mapper; + } + + /** + * Parse and return a JsonNode representation of the input OAS document. + * + * @param location the URL of the OAS document. + * @param auths the list of authorization values to access the remote URL. + * + * @throws java.lang.Exception if an error occurs while retrieving the OpenAPI document. + * + * @return A JsonNode representation of the input OAS document. + */ + public static JsonNode readWithInfo(String location, List auths) throws Exception { + String data; + location = location.replaceAll("\\\\","/"); + if (location.toLowerCase(Locale.ROOT).startsWith("http")) { + data = RemoteUrl.urlToString(location, auths); + } else { + final String fileScheme = "file:"; + Path path; + if (location.toLowerCase(Locale.ROOT).startsWith(fileScheme)) { + path = Paths.get(URI.create(location)); + } else { + path = Paths.get(location); + } + if (Files.exists(path)) { + data = FileUtils.readFileToString(path.toFile(), "UTF-8"); + } else { + data = ClasspathHelper.loadFileFromClasspath(location); + } + } + return getRightMapper(data).readTree(data); + } + + /** + * Parse the OAS document at the specified location, get the swagger or openapi version + * as specified in the source document, and return the version. + * + * For OAS 2.0 documents, return the value of the 'swagger' attribute. + * For OAS 3.x documents, return the value of the 'openapi' attribute. + * + * @param openAPI the object that encapsulates the OAS document. + * @param location the URL of the OAS document. + * @param auths the list of authorization values to access the remote URL. + * + * @return the version of the OpenAPI document. + */ + public static SemVer getOpenApiVersion(OpenAPI openAPI, String location, List auths) { + String version; + try { + JsonNode document = readWithInfo(location, auths); + JsonNode value = document.findValue("swagger"); + if (value == null) { + // This is not a OAS 2.0 document. + // Note: we cannot simply return the value of the "openapi" attribute + // because the 2.0 to 3.0 converter always sets the value to '3.0'. + value = document.findValue("openapi"); + } + version = value.asText(); + } catch (Exception ex) { + // Fallback to using the 'openapi' attribute. + LOGGER.warn("Unable to read swagger/openapi attribute"); + version = openAPI.getOpenapi(); + } + // Cache the OAS version in global settings so it can be looked up in the helper functions. + //GlobalSettings.setProperty(openapiDocVersion, version); + + return new SemVer(version); + } } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/SemVer.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/SemVer.java index b2b58a8da3b..0dc35067779 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/SemVer.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/SemVer.java @@ -47,4 +47,33 @@ public class SemVer implements Comparable { public String toString() { return major + "." + minor + "." + revision; } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + major; + result = prime * result + minor; + result = prime * result + revision; + return result; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + SemVer other = (SemVer) obj; + if (major != other.major) + return false; + if (minor != other.minor) + return false; + if (revision != other.revision) + return false; + return true; + } + } \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/ApiClient.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/ApiClient.mustache index 362aee07d75..8d12c42630d 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/ApiClient.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/ApiClient.mustache @@ -200,8 +200,6 @@ public class ApiClient { {{#isHttpSignature}} if (auth instanceof HttpSignatureAuth) { authentications.put("{{name}}", auth); - } else { - authentications.put("{{name}}", null); } {{/isHttpSignature}} {{/isBasic}} @@ -246,10 +244,20 @@ public class ApiClient { return this; } + /** + * Returns the base URL to the location where the OpenAPI document is being served. + * + * @return The base URL to the target host. + */ public String getBasePath() { return basePath; } + /** + * Sets the base URL to the location where the OpenAPI document is being served. + * + * @param basePath The base URL to the target host. + */ public ApiClient setBasePath(String basePath) { this.basePath = basePath; {{#hasOAuthMethods}} @@ -1281,7 +1289,7 @@ public class ApiClient { for (String authName : authNames) { Authentication auth = authentications.get(authName); if (auth == null) { - throw new RuntimeException("Authentication undefined: " + authName); + continue; } auth.applyToParams(queryParams, headerParams, cookieParams, payload, method, uri); } diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/auth/HttpSignatureAuth.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/auth/HttpSignatureAuth.mustache index 75adbdbba3f..3e1c0f0e7f7 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/auth/HttpSignatureAuth.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/auth/HttpSignatureAuth.mustache @@ -181,7 +181,7 @@ public class HttpSignatureAuth implements Authentication { /** * Returns the signer instance used to sign HTTP messages. * - * @returrn the signer instance. + * @return the signer instance. */ public Signer getSigner() { return signer; @@ -200,12 +200,14 @@ public class HttpSignatureAuth implements Authentication { * Set the private key used to sign HTTP requests using the HTTP signature scheme. * * @param key The private key. + * + * @throws InvalidKeyException Unable to parse the key, or the security provider for this key + * is not installed. */ - public void setPrivateKey(Key key) throws ApiException { + public void setPrivateKey(Key key) throws InvalidKeyException { if (key == null) { throw new ApiException("Private key (java.security.Key) cannot be null"); } - signer = new Signer(key, new Signature(keyId, signingAlgorithm, algorithm, parameterSpec, null, headers)); } diff --git a/modules/openapi-generator/src/main/resources/python/python-experimental/model.mustache b/modules/openapi-generator/src/main/resources/python/python-experimental/model.mustache index 9afb17b5277..0790c614357 100644 --- a/modules/openapi-generator/src/main/resources/python/python-experimental/model.mustache +++ b/modules/openapi-generator/src/main/resources/python/python-experimental/model.mustache @@ -10,6 +10,7 @@ import six # noqa: F401 import nulltype # noqa: F401 from {{packageName}}.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, diff --git a/modules/openapi-generator/src/main/resources/python/python-experimental/model_templates/classvars.mustache b/modules/openapi-generator/src/main/resources/python/python-experimental/model_templates/classvars.mustache index 471c16c10a9..9fc3f83433a 100644 --- a/modules/openapi-generator/src/main/resources/python/python-experimental/model_templates/classvars.mustache +++ b/modules/openapi-generator/src/main/resources/python/python-experimental/model_templates/classvars.mustache @@ -100,6 +100,8 @@ additional_properties_type = {{#additionalPropertiesType}}({{{additionalPropertiesType}}},) # noqa: E501{{/additionalPropertiesType}}{{^additionalPropertiesType}}None{{/additionalPropertiesType}} + _nullable = {{#isNullable}}True{{/isNullable}}{{^isNullable}}False{{/isNullable}} + @cached_property def openapi_types(): """ diff --git a/modules/openapi-generator/src/main/resources/python/python-experimental/model_templates/method_init_shared.mustache b/modules/openapi-generator/src/main/resources/python/python-experimental/model_templates/method_init_shared.mustache index 3a77f7e8a8d..78059150f20 100644 --- a/modules/openapi-generator/src/main/resources/python/python-experimental/model_templates/method_init_shared.mustache +++ b/modules/openapi-generator/src/main/resources/python/python-experimental/model_templates/method_init_shared.mustache @@ -1,5 +1,5 @@ @convert_js_args_to_python_args - def __init__(self{{#requiredVars}}{{^defaultValue}}, {{name}}{{/defaultValue}}{{/requiredVars}}{{#requiredVars}}{{#defaultValue}}, {{name}}={{{defaultValue}}}{{/defaultValue}}{{/requiredVars}}, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self{{#requiredVars}}{{^defaultValue}}, {{name}}{{/defaultValue}}{{/requiredVars}}, *args, **kwargs): # noqa: E501 """{{classname}} - a model defined in OpenAPI {{#requiredVars}} @@ -54,6 +54,27 @@ {{/optionalVars}} """ +{{#requiredVars}} +{{#defaultValue}} + {{name}} = kwargs.get('{{name}}', {{{defaultValue}}}) +{{/defaultValue}} +{{/requiredVars}} + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/modules/openapi-generator/src/main/resources/python/python-experimental/model_utils.mustache b/modules/openapi-generator/src/main/resources/python/python-experimental/model_utils.mustache index c9a527ab6fe..b1db9b329c6 100644 --- a/modules/openapi-generator/src/main/resources/python/python-experimental/model_utils.mustache +++ b/modules/openapi-generator/src/main/resources/python/python-experimental/model_utils.mustache @@ -66,16 +66,8 @@ class OpenApiModel(object): # pick a new schema/class to instantiate because a discriminator # propertyName value was passed in - # Build a list containing all oneOf and anyOf descendants. - oneof_anyof_classes = None - if cls._composed_schemas is not None: - oneof_anyof_classes = ( - cls._composed_schemas.get('oneOf', ()) + - cls._composed_schemas.get('anyOf', ())) - if (oneof_anyof_classes and none_type in oneof_anyof_classes and - len(args) == 1 and args[0] is None): - # The input data is the 'null' value AND one of the oneOf/anyOf children - # is the 'null' type (which is introduced in OAS schema >= 3.1). + if len(args) == 1 and args[0] is None and is_type_nullable(cls): + # The input data is the 'null' value and the type is nullable. return None visited_composed_classes = kwargs.get('_visited_composed_classes', ()) @@ -83,26 +75,22 @@ class OpenApiModel(object): cls.discriminator is None or cls in visited_composed_classes ): - # This openapi schema (cls) does not have a discriminator - # Or we have already visited this class before and are sure that we - # want to instantiate it this time. + # Use case 1: this openapi schema (cls) does not have a discriminator + # Use case 2: we have already visited this class before and are sure that we + # want to instantiate it this time. We have visited this class deserializing + # a payload with a discriminator. During that process we traveled through + # this class but did not make an instance of it. Now we are making an + # instance of a composed class which contains cls in it, so this time make an instance of cls. # - # If we are making an instance of a composed schema Descendent - # which allOf includes Ancestor, then Ancestor contains - # a discriminator that includes Descendent. - # So if we make an instance of Descendent, we have to make an - # instance of Ancestor to hold the allOf properties. - # This code detects that use case and makes the instance of Ancestor - # For example: - # When making an instance of Dog, _visited_composed_classes = (Dog,) - # then we make an instance of Animal to include in dog._composed_instances - # so when we are here, cls is Animal - # cls.discriminator != None - # cls not in _visited_composed_classes - # new_cls = Dog - # but we know we know that we already have Dog - # because it is in visited_composed_classes - # so make Animal here + # Here's an example of use case 2: If Animal has a discriminator + # petType and we pass in "Dog", and the class Dog + # allOf includes Animal, we move through Animal + # once using the discriminator, and pick Dog. + # Then in the composed schema dog Dog, we will make an instance of the + # Animal class (because Dal has allOf: Animal) but this time we won't travel + # through Animal's discriminator because we passed in + # _visited_composed_classes = (Animal,) + return super(OpenApiModel, cls).__new__(cls) # Get the name and value of the discriminator property. @@ -141,9 +129,30 @@ class OpenApiModel(object): ) if new_cls in visited_composed_classes: - # if we are coming from the chosen new_cls use cls instead + # if we are making an instance of a composed schema Descendent + # which allOf includes Ancestor, then Ancestor contains + # a discriminator that includes Descendent. + # So if we make an instance of Descendent, we have to make an + # instance of Ancestor to hold the allOf properties. + # This code detects that use case and makes the instance of Ancestor + # For example: + # When making an instance of Dog, _visited_composed_classes = (Dog,) + # then we make an instance of Animal to include in dog._composed_instances + # so when we are here, cls is Animal + # cls.discriminator != None + # cls not in _visited_composed_classes + # new_cls = Dog + # but we know we know that we already have Dog + # because it is in visited_composed_classes + # so make Animal here return super(OpenApiModel, cls).__new__(cls) + # Build a list containing all oneOf and anyOf descendants. + oneof_anyof_classes = None + if cls._composed_schemas is not None: + oneof_anyof_classes = ( + cls._composed_schemas.get('oneOf', ()) + + cls._composed_schemas.get('anyOf', ())) oneof_anyof_child = new_cls in oneof_anyof_classes kwargs['_visited_composed_classes'] = visited_composed_classes + (cls,) @@ -766,18 +775,20 @@ def get_discriminator_class(model_class, used_model_class = class_name_to_discr_class.get(discr_value) if used_model_class is None: # We didn't find a discriminated class in class_name_to_discr_class. + # So look in the ancestor or descendant discriminators # The discriminator mapping may exist in a descendant (anyOf, oneOf) # or ancestor (allOf). - # Ancestor example: in the "Dog -> Mammal -> Chordate -> Animal" + # Ancestor example: in the GrandparentAnimal -> ParentPet -> ChildCat # hierarchy, the discriminator mappings may be defined at any level - # in the hieararchy. - # Descendant example: a schema is oneOf[Plant, Mammal], and each - # oneOf child may itself be an allOf with some arbitrary hierarchy, - # and a graph traversal is required to find the discriminator. - composed_children = model_class._composed_schemas.get('oneOf', ()) + \ - model_class._composed_schemas.get('anyOf', ()) + \ - model_class._composed_schemas.get('allOf', ()) - for cls in composed_children: + # in the hierarchy. + # Descendant example: mammal -> whale/zebra/Pig -> BasquePig/DanishPig + # if we try to make BasquePig from mammal, we need to travel through + # the oneOf descendant discriminators to find BasquePig + descendant_classes = model_class._composed_schemas.get('oneOf', ()) + \ + model_class._composed_schemas.get('anyOf', ()) + ancestor_classes = model_class._composed_schemas.get('allOf', ()) + possible_classes = descendant_classes + ancestor_classes + for cls in possible_classes: # Check if the schema has inherited discriminators. if hasattr(cls, 'discriminator') and cls.discriminator is not None: used_model_class = get_discriminator_class( @@ -937,8 +948,10 @@ def is_type_nullable(input_type): """ if input_type is none_type: return True + if issubclass(input_type, OpenApiModel) and input_type._nullable: + return True if issubclass(input_type, ModelComposed): - # If oneOf/anyOf, check if the 'null' type is one of the allowed types. + # If oneOf/anyOf, check if the 'null' type is one of the allowed types. for t in input_type._composed_schemas.get('oneOf', ()): if is_type_nullable(t): return True for t in input_type._composed_schemas.get('anyOf', ()): diff --git a/modules/openapi-generator/src/main/resources/ruby-client/rubocop.mustache b/modules/openapi-generator/src/main/resources/ruby-client/rubocop.mustache index df46058490d..d32b2b1cdab 100644 --- a/modules/openapi-generator/src/main/resources/ruby-client/rubocop.mustache +++ b/modules/openapi-generator/src/main/resources/ruby-client/rubocop.mustache @@ -113,7 +113,7 @@ Layout/SpaceInsideParens: # EnforcedStyle: single_quotes # Detect hard tabs, no hard tabs. -Layout/Tab: +Layout/IndentationStyle: Enabled: true # Blank lines should not have any spaces. diff --git a/modules/openapi-generator/src/main/resources/rust/Cargo.mustache b/modules/openapi-generator/src/main/resources/rust/Cargo.mustache index e448a38c51c..264ae44d594 100644 --- a/modules/openapi-generator/src/main/resources/rust/Cargo.mustache +++ b/modules/openapi-generator/src/main/resources/rust/Cargo.mustache @@ -2,6 +2,7 @@ name = "{{{packageName}}}" version = "{{{packageVersion}}}" authors = ["OpenAPI Generator team and contributors"] +edition = "2018" [dependencies] serde = "^1.0" @@ -15,7 +16,15 @@ base64 = "~0.7.0" futures = "0.1.23" {{/hyper}} {{#reqwest}} +{{^supportAsync}} reqwest = "~0.9" +{{/supportAsync}} +{{#supportAsync}} +[dependencies.reqwest] +version = "^0.10" +default-features = false +features = ["json"] +{{/supportAsync}} {{/reqwest}} [dev-dependencies] diff --git a/modules/openapi-generator/src/main/resources/rust/reqwest/api.mustache b/modules/openapi-generator/src/main/resources/rust/reqwest/api.mustache index d705fd33c43..4e7c63fe5cc 100644 --- a/modules/openapi-generator/src/main/resources/rust/reqwest/api.mustache +++ b/modules/openapi-generator/src/main/resources/rust/reqwest/api.mustache @@ -1,13 +1,14 @@ {{>partial_header}} +#[allow(unused_imports)] use std::rc::Rc; use std::borrow::Borrow; -#[allow(unused_imports)] use std::option::Option; use reqwest; use super::{Error, configuration}; +{{^supportAsync}} pub struct {{{classname}}}Client { configuration: Rc, } @@ -20,28 +21,30 @@ impl {{{classname}}}Client { } } +{{/supportAsync}} {{#operations}} {{#operation}} - {{#vendorExtensions.x-group-parameters}} - {{#allParams}} - {{#-first}} - /// struct for passing parameters to the method `{{operationId}}` - #[derive(Clone, Debug)] - pub struct {{{operationIdCamelCase}}}Params { - {{/-first}} - {{#description}} - /// {{{.}}} - {{/description}} - pub {{{paramName}}}: {{^required}}Option<{{/required}}{{#required}}{{#isNullable}}Option<{{/isNullable}}{{/required}}{{#isString}}String{{/isString}}{{#isUuid}}String{{/isUuid}}{{^isString}}{{^isUuid}}{{^isPrimitiveType}}{{^isContainer}}crate::models::{{/isContainer}}{{/isPrimitiveType}}{{{dataType}}}{{/isUuid}}{{/isString}}{{^required}}>{{/required}}{{#required}}{{#isNullable}}>{{/isNullable}}{{/required}}{{#hasMore}}, {{/hasMore}} - {{#-last}} - } +{{#vendorExtensions.x-group-parameters}} +{{#allParams}} +{{#-first}} +/// struct for passing parameters to the method `{{operationId}}` +#[derive(Clone, Debug)] +pub struct {{{operationIdCamelCase}}}Params { +{{/-first}} + {{#description}} + /// {{{.}}} + {{/description}} + pub {{{paramName}}}: {{^required}}Option<{{/required}}{{#required}}{{#isNullable}}Option<{{/isNullable}}{{/required}}{{#isString}}String{{/isString}}{{#isUuid}}String{{/isUuid}}{{^isString}}{{^isUuid}}{{^isPrimitiveType}}{{^isContainer}}crate::models::{{/isContainer}}{{/isPrimitiveType}}{{{dataType}}}{{/isUuid}}{{/isString}}{{^required}}>{{/required}}{{#required}}{{#isNullable}}>{{/isNullable}}{{/required}}{{#hasMore}},{{/hasMore}} +{{#-last}} +} - {{/-last}} - {{/allParams}} - {{/vendorExtensions.x-group-parameters}} +{{/-last}} +{{/allParams}} +{{/vendorExtensions.x-group-parameters}} {{/operation}} {{/operations}} +{{^supportAsync}} pub trait {{{classname}}} { {{#operations}} {{#operation}} @@ -56,10 +59,11 @@ pub trait {{{classname}}} { } impl {{{classname}}} for {{{classname}}}Client { +{{/supportAsync}} {{#operations}} {{#operation}} {{#vendorExtensions.x-group-parameters}} - fn {{{operationId}}}(&self{{#allParams}}{{#-first}}, params: {{{operationIdCamelCase}}}Params{{/-first}}{{/allParams}}) -> Result<{{^returnType}}(){{/returnType}}{{#returnType}}{{{returnType}}}{{/returnType}}, Error> { + {{#supportAsync}}pub async {{/supportAsync}}fn {{{operationId}}}({{^supportAsync}}&self{{/supportAsync}}{{#supportAsync}}configuration: &configuration::Configuration{{/supportAsync}}{{#allParams}}{{#-first}}, params: {{{operationIdCamelCase}}}Params{{/-first}}{{/allParams}}) -> Result<{{^returnType}}(){{/returnType}}{{#returnType}}{{{returnType}}}{{/returnType}}, Error> { // unbox the parameters {{#allParams}} let {{paramName}} = params.{{paramName}}; @@ -67,9 +71,11 @@ impl {{{classname}}} for {{{classname}}}Client { {{/vendorExtensions.x-group-parameters}} {{^vendorExtensions.x-group-parameters}} - fn {{{operationId}}}(&self, {{#allParams}}{{{paramName}}}: {{^required}}Option<{{/required}}{{#required}}{{#isNullable}}Option<{{/isNullable}}{{/required}}{{#isString}}&str{{/isString}}{{#isUuid}}&str{{/isUuid}}{{^isString}}{{^isUuid}}{{^isPrimitiveType}}{{^isContainer}}crate::models::{{/isContainer}}{{/isPrimitiveType}}{{{dataType}}}{{/isUuid}}{{/isString}}{{^required}}>{{/required}}{{#required}}{{#isNullable}}>{{/isNullable}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) -> Result<{{^returnType}}(){{/returnType}}{{#returnType}}{{{returnType}}}{{/returnType}}, Error> { + {{#supportAsync}}pub async {{/supportAsync}}fn {{{operationId}}}({{^supportAsync}}&self{{/supportAsync}}{{#supportAsync}}configuration: &configuration::Configuration{{/supportAsync}}, {{#allParams}}{{{paramName}}}: {{^required}}Option<{{/required}}{{#required}}{{#isNullable}}Option<{{/isNullable}}{{/required}}{{#isString}}&str{{/isString}}{{#isUuid}}&str{{/isUuid}}{{^isString}}{{^isUuid}}{{^isPrimitiveType}}{{^isContainer}}crate::models::{{/isContainer}}{{/isPrimitiveType}}{{{dataType}}}{{/isUuid}}{{/isString}}{{^required}}>{{/required}}{{#required}}{{#isNullable}}>{{/isNullable}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) -> Result<{{^returnType}}(){{/returnType}}{{#returnType}}{{{returnType}}}{{/returnType}}, Error> { {{/vendorExtensions.x-group-parameters}} + {{^supportAsync}} let configuration: &configuration::Configuration = self.configuration.borrow(); + {{/supportAsync}} let client = &configuration.client; let uri_str = format!("{}{{{path}}}", configuration.base_path{{#pathParams}}, {{{baseName}}}={{#isString}}crate::apis::urlencode({{/isString}}{{{paramName}}}{{^required}}.unwrap(){{/required}}{{#required}}{{#isNullable}}.unwrap(){{/isNullable}}{{/required}}{{#isListContainer}}.join(",").as_ref(){{/isListContainer}}{{#isString}}){{/isString}}{{/pathParams}}); @@ -162,6 +168,7 @@ impl {{{classname}}} for {{{classname}}}Client { let mut form = reqwest::multipart::Form::new(); {{#formParams}} {{#isFile}} + {{^supportAsync}} {{#required}} {{^isNullable}} form = form.file("{{{baseName}}}", {{{paramName}}})?; @@ -178,6 +185,10 @@ impl {{{classname}}} for {{{classname}}}Client { form = form.file("{{{baseName}}}", param_value)?; } {{/required}} + {{/supportAsync}} + {{#supportAsync}} + // TODO: support file upload for '{{{baseName}}}' parameter + {{/supportAsync}} {{/isFile}} {{^isFile}} {{#required}} @@ -251,19 +262,18 @@ impl {{{classname}}} for {{{classname}}}Client { {{/bodyParams}} {{/hasBodyParam}} - // send request let req = req_builder.build()?; - let mut resp = client.execute(req)?; + let mut resp = client.execute(req){{#supportAsync}}.await{{/supportAsync}}?; if resp.status().is_success() { {{^returnType}} Ok(()) {{/returnType}} {{#returnType}} - Ok(resp.json()?) + Ok(resp.json{{#supportAsync}}::<{{{.}}}>().await{{/supportAsync}}{{^supportAsync}}(){{/supportAsync}}?) {{/returnType}} } else { let status = resp.status(); - let content = resp.text()?; + let content = resp.text(){{#supportAsync}}.await{{/supportAsync}}?; let entity: Option = serde_json::from_str(&content).ok(); let error = crate::apis::ResponseErrorContent { status, content, entity }; Err(Error::ResponseError(error)) @@ -272,4 +282,6 @@ impl {{{classname}}} for {{{classname}}}Client { {{/operation}} {{/operations}} +{{^supportAsync}} } +{{/supportAsync}} diff --git a/modules/openapi-generator/src/main/resources/rust/reqwest/api_mod.mustache b/modules/openapi-generator/src/main/resources/rust/reqwest/api_mod.mustache index 365d5ffee43..f9aba13baf9 100644 --- a/modules/openapi-generator/src/main/resources/rust/reqwest/api_mod.mustache +++ b/modules/openapi-generator/src/main/resources/rust/reqwest/api_mod.mustache @@ -43,13 +43,27 @@ pub fn urlencode>(s: T) -> String { mod {{{classFilename}}}; {{#operations}} {{#operation}} -{{#-last}} +{{^supportAsync}} +{{#-first}} pub use self::{{{classFilename}}}::{ {{{classname}}}, {{{classname}}}Client }; -{{/-last}} +{{/-first}} +{{/supportAsync}} +{{#supportAsync}} +pub use self::{{{classFilename}}}::{ {{{operationId}}} }; +{{/supportAsync}} +{{#vendorExtensions.x-group-parameters}} +{{#allParams}} +{{#-first}} +pub use self::{{{classFilename}}}::{{{operationIdCamelCase}}} as {{{classname}}}{{{operationIdCamelCase}}}; +{{/-first}} +{{/allParams}} +{{/vendorExtensions.x-group-parameters}} {{/operation}} {{/operations}} {{/apis}} {{/apiInfo}} -pub mod configuration; +{{^supportAsync}} pub mod client; +{{/supportAsync}} +pub mod configuration; diff --git a/modules/openapi-generator/src/main/resources/typescript-angular/README.mustache b/modules/openapi-generator/src/main/resources/typescript-angular/README.mustache index 446cfcb1b60..f94be6a072a 100644 --- a/modules/openapi-generator/src/main/resources/typescript-angular/README.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-angular/README.mustache @@ -10,12 +10,7 @@ npm run build ### publishing -{{#useNgPackagr}} First build the package then run ```npm publish dist``` (don't forget to specify the `dist` folder!) -{{/useNgPackagr}} -{{^useNgPackagr}} -First build the package then run ```npm publish``` -{{/useNgPackagr}} ### consuming @@ -30,24 +25,14 @@ npm install {{npmName}}@{{npmVersion}} --save _without publishing (not recommended):_ ``` -{{#useNgPackagr}} npm install PATH_TO_GENERATED_PACKAGE/dist.tgz --save -{{/useNgPackagr}} -{{^useNgPackagr}} -npm install PATH_TO_GENERATED_PACKAGE/{{npmName}}-{{npmVersion}}.tgz --save -{{/useNgPackagr}} ``` _It's important to take the tgz file, otherwise you'll get trouble with links on windows_ _using `npm link`:_ -{{#useNgPackagr}} In PATH_TO_GENERATED_PACKAGE/dist: -{{/useNgPackagr}} -{{^useNgPackagr}} -In PATH_TO_GENERATED_PACKAGE: -{{/useNgPackagr}} ``` npm link ``` @@ -70,15 +55,14 @@ In your Angular project: ``` // without configuring providers import { ApiModule } from '{{npmName}}'; -{{#useHttpClient}}import { HttpClientModule } from '@angular/common/http';{{/useHttpClient}} -{{^useHttpClient}}import { HttpModule } from '@angular/http';{{/useHttpClient}} +import { HttpClientModule } from '@angular/common/http'; @NgModule({ imports: [ ApiModule, - {{#useHttpClient}}// make sure to import the HttpClientModule in the AppModule only, + // make sure to import the HttpClientModule in the AppModule only, // see https://github.com/angular/angular/issues/20575 - HttpClientModule{{/useHttpClient}}{{^useHttpClient}}HttpModule{{/useHttpClient}} + HttpClientModule ], declarations: [ AppComponent ], providers: [], @@ -150,16 +134,15 @@ in order to avoid naming conflicts: ``` import { ApiModule } from 'my-api-path'; import { ApiModule as OtherApiModule } from 'my-other-api-path'; -{{#useHttpClient}}import { HttpClientModule } from '@angular/common/http';{{/useHttpClient}} -{{^useHttpClient}}import { HttpModule } from '@angular/http';{{/useHttpClient}} +import { HttpClientModule } from '@angular/common/http'; @NgModule({ imports: [ ApiModule, OtherApiModule, - {{#useHttpClient}}// make sure to import the HttpClientModule in the AppModule only, + // make sure to import the HttpClientModule in the AppModule only, // see https://github.com/angular/angular/issues/20575 - HttpClientModule{{/useHttpClient}}{{^useHttpClient}}HttpModule{{/useHttpClient}} + HttpClientModule ] }) export class AppModule { diff --git a/modules/openapi-generator/src/main/resources/typescript-angular/api.module.mustache b/modules/openapi-generator/src/main/resources/typescript-angular/api.module.mustache index 6c0962fd1b1..74fae2fb22e 100644 --- a/modules/openapi-generator/src/main/resources/typescript-angular/api.module.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-angular/api.module.mustache @@ -1,7 +1,6 @@ import { NgModule, ModuleWithProviders, SkipSelf, Optional } from '@angular/core'; import { Configuration } from './configuration'; -{{#useHttpClient}}import { HttpClient } from '@angular/common/http';{{/useHttpClient}} -{{^useHttpClient}}import { Http } from '@angular/http';{{/useHttpClient}} +import { HttpClient } from '@angular/common/http'; {{#apiInfo}} {{#apis}} @@ -26,12 +25,12 @@ export class {{apiModuleClassName}} { } constructor( @Optional() @SkipSelf() parentModule: {{apiModuleClassName}}, - @Optional() http: {{#useHttpClient}}HttpClient{{/useHttpClient}}{{^useHttpClient}}Http{{/useHttpClient}}) { + @Optional() http: HttpClient) { if (parentModule) { throw new Error('{{apiModuleClassName}} is already loaded. Import in your base AppModule only.'); } if (!http) { - throw new Error('You need to import the {{#useHttpClient}}HttpClientModule{{/useHttpClient}}{{^useHttpClient}}HttpModule{{/useHttpClient}} in your AppModule! \n' + + throw new Error('You need to import the HttpClientModule in your AppModule! \n' + 'See also https://github.com/angular/angular/issues/20575'); } } diff --git a/modules/openapi-generator/src/main/resources/typescript-angular/api.service.mustache b/modules/openapi-generator/src/main/resources/typescript-angular/api.service.mustache index a5053d4f2c8..872ea6a262f 100644 --- a/modules/openapi-generator/src/main/resources/typescript-angular/api.service.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-angular/api.service.mustache @@ -2,26 +2,10 @@ /* tslint:disable:no-unused-variable member-ordering */ import { Inject, Injectable, Optional } from '@angular/core'; -{{#useHttpClient}} import { HttpClient, HttpHeaders, HttpParams, HttpResponse, HttpEvent, HttpParameterCodec } from '@angular/common/http'; import { CustomHttpParameterCodec } from '../encoder'; -{{/useHttpClient}} -{{^useHttpClient}} -import { Http, Headers, URLSearchParams, - RequestMethod, RequestOptions, RequestOptionsArgs, - Response, ResponseContentType, QueryEncoder } from '@angular/http'; -import { CustomQueryEncoderHelper } from '../encoder'; -{{/useHttpClient}} -{{^useRxJS6}} -import { Observable } from 'rxjs/Observable'; -{{/useRxJS6}} -{{#useRxJS6}} import { Observable } from 'rxjs'; -{{/useRxJS6}} -{{^useHttpClient}} -import '../rxjs-operators'; -{{/useHttpClient}} {{#imports}} import { {{classname}} } from '../model/models'; @@ -75,16 +59,11 @@ export class {{classname}} { {{/withInterfaces}} protected basePath = '{{{basePath}}}'; - public defaultHeaders = new {{#useHttpClient}}Http{{/useHttpClient}}Headers(); + public defaultHeaders = new HttpHeaders(); public configuration = new Configuration(); -{{#useHttpClient}} public encoder: HttpParameterCodec; -{{/useHttpClient}} -{{^useHttpClient}} - public encoder: QueryEncoder; -{{/useHttpClient}} - constructor(protected {{#useHttpClient}}httpClient: HttpClient{{/useHttpClient}}{{^useHttpClient}}http: Http{{/useHttpClient}}, @Optional()@Inject(BASE_PATH) basePath: string, @Optional() configuration: Configuration) { + constructor(protected httpClient: HttpClient, @Optional()@Inject(BASE_PATH) basePath: string, @Optional() configuration: Configuration) { if (configuration) { this.configuration = configuration; } @@ -94,12 +73,7 @@ export class {{classname}} { } this.configuration.basePath = basePath; } -{{#useHttpClient}} this.encoder = this.configuration.encoder || new CustomHttpParameterCodec(); -{{/useHttpClient}} -{{^useHttpClient}} - this.encoder = this.configuration.encoder || new CustomQueryEncoderHelper(); -{{/useHttpClient}} } {{#hasSomeFormParams}} @@ -118,45 +92,11 @@ export class {{classname}} { } {{/hasSomeFormParams}} -{{^useHttpClient}} -{{! Before HttpClient implementation or method overloading we relied on 2 functions, 1 to return the straight body as json - and another to get the full response.}} -{{#operation}} - /** - * {{¬es}} - {{#summary}} - * @summary {{&summary}} - {{/summary}} - {{^useSingleRequestParameter}}{{#allParams}} - * @param {{paramName}} {{description}}{{/allParams}}{{/useSingleRequestParameter}} - {{#useSingleRequestParameter}}{{#allParams.0}} - * @param requestParameters - {{/allParams.0}}{{/useSingleRequestParameter}}*/ - {{! if you change this method signature, also change the version below }} - public {{nickname}}({{^useSingleRequestParameter}}{{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{{dataType}}}{{#hasMore}}, {{/hasMore}}{{/allParams}}{{/useSingleRequestParameter}}{{#useSingleRequestParameter}}{{#allParams.0}}requestParameters: {{#prefixParameterInterfaces}}{{classname}}{{/prefixParameterInterfaces}}{{operationIdCamelCase}}RequestParams{{/allParams.0}}{{/useSingleRequestParameter}}{{^useHttpClient}}{{#hasParams}}, {{/hasParams}}extraHttpRequestParams?: RequestOptionsArgs{{/useHttpClient}}): Observable<{{#returnType}}{{{returnType}}}{{#isResponseTypeFile}}|undefined{{/isResponseTypeFile}}{{/returnType}}{{^returnType}}{}{{/returnType}}> { - return this.{{nickname}}WithHttpInfo({{^useSingleRequestParameter}}{{#allParams}}{{paramName}}, {{/allParams}}{{/useSingleRequestParameter}}{{#useSingleRequestParameter}}{{#allParams.0}}requestParameters, {{/allParams.0}}{{/useSingleRequestParameter}}extraHttpRequestParams) - .map((response: Response) => { - if (response.status === 204) { - return undefined; - } else { -{{^isResponseFile}} - return response.json() || {}; -{{/isResponseFile}} -{{#isResponseFile}} - return response.blob(); -{{/isResponseFile}} - } - }); - } - -{{/operation}} -{{/useHttpClient}} - private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams { if (typeof value === "object" && value instanceof Date === false) { - {{#useHttpClient}}httpParams = {{/useHttpClient}}this.addToHttpParamsRecursive(httpParams, value); + httpParams = this.addToHttpParamsRecursive(httpParams, value); } else { - {{#useHttpClient}}httpParams = {{/useHttpClient}}this.addToHttpParamsRecursive(httpParams, value, key); + httpParams = this.addToHttpParamsRecursive(httpParams, value, key); } return httpParams; } @@ -171,17 +111,17 @@ export class {{classname}} { (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); } else if (value instanceof Date) { if (key != null) { - {{#useHttpClient}}httpParams = {{/useHttpClient}}httpParams.append(key, + httpParams = httpParams.append(key, (value as Date).toISOString(){{^isDateTime}}.substr(0, 10)){{/isDateTime}}; } else { throw Error("key may not be null if value is Date"); } } else { - Object.keys(value).forEach( k => {{#useHttpClient}}httpParams = {{/useHttpClient}}this.addToHttpParamsRecursive( + Object.keys(value).forEach( k => httpParams = this.addToHttpParamsRecursive( httpParams, value[k], key != null ? `${key}.${k}` : k)); } } else if (key != null) { - {{#useHttpClient}}httpParams = {{/useHttpClient}}httpParams.append(key, value); + httpParams = httpParams.append(key, value); } else { throw Error("key may not be null if value is not object or array"); } @@ -206,20 +146,13 @@ export class {{classname}} { * @param requestParameters {{/allParams.0}} {{/useSingleRequestParameter}} - {{#useHttpClient}} * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. - {{/useHttpClient}} */ - {{#useHttpClient}} public {{nickname}}({{^useSingleRequestParameter}}{{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{{dataType}}}, {{/allParams}}{{/useSingleRequestParameter}}{{#useSingleRequestParameter}}{{#allParams.0}}requestParameters: {{#prefixParameterInterfaces}}{{classname}}{{/prefixParameterInterfaces}}{{operationIdCamelCase}}RequestParams, {{/allParams.0}}{{/useSingleRequestParameter}}observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: {{#produces}}'{{mediaType}}'{{#hasMore}} | {{/hasMore}}{{/produces}}{{^produces}}undefined{{/produces}}}): Observable<{{#returnType}}{{{returnType}}}{{#isResponseTypeFile}}|undefined{{/isResponseTypeFile}}{{/returnType}}{{^returnType}}any{{/returnType}}>; public {{nickname}}({{^useSingleRequestParameter}}{{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{{dataType}}}, {{/allParams}}{{/useSingleRequestParameter}}{{#useSingleRequestParameter}}{{#allParams.0}}requestParameters: {{#prefixParameterInterfaces}}{{classname}}{{/prefixParameterInterfaces}}{{operationIdCamelCase}}RequestParams, {{/allParams.0}}{{/useSingleRequestParameter}}observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: {{#produces}}'{{mediaType}}'{{#hasMore}} | {{/hasMore}}{{/produces}}{{^produces}}undefined{{/produces}}}): Observable>; public {{nickname}}({{^useSingleRequestParameter}}{{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{{dataType}}}, {{/allParams}}{{/useSingleRequestParameter}}{{#useSingleRequestParameter}}{{#allParams.0}}requestParameters: {{#prefixParameterInterfaces}}{{classname}}{{/prefixParameterInterfaces}}{{operationIdCamelCase}}RequestParams, {{/allParams.0}}{{/useSingleRequestParameter}}observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: {{#produces}}'{{mediaType}}'{{#hasMore}} | {{/hasMore}}{{/produces}}{{^produces}}undefined{{/produces}}}): Observable>; public {{nickname}}({{^useSingleRequestParameter}}{{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{{dataType}}}, {{/allParams}}{{/useSingleRequestParameter}}{{#useSingleRequestParameter}}{{#allParams.0}}requestParameters: {{#prefixParameterInterfaces}}{{classname}}{{/prefixParameterInterfaces}}{{operationIdCamelCase}}RequestParams, {{/allParams.0}}{{/useSingleRequestParameter}}observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: {{#produces}}'{{mediaType}}'{{#hasMore}} | {{/hasMore}}{{/produces}}{{^produces}}undefined{{/produces}}}): Observable { - {{/useHttpClient}} - {{^useHttpClient}} - public {{nickname}}WithHttpInfo({{^useSingleRequestParameter}}{{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{{dataType}}}, {{/allParams}}{{/useSingleRequestParameter}}{{#useSingleRequestParameter}}{{#allParams.0}}requestParameters: {{#prefixParameterInterfaces}}{{classname}}{{/prefixParameterInterfaces}}{{operationIdCamelCase}}RequestParams, {{/allParams.0}}{{/useSingleRequestParameter}}extraHttpRequestParams?: RequestOptionsArgs, options?: {httpHeaderAccept?: {{#produces}}'{{mediaType}}'{{#hasMore}} | {{/hasMore}}{{/produces}}{{^produces}}undefined{{/produces}}}): Observable { - {{/useHttpClient}} {{#allParams}} {{#useSingleRequestParameter}} const {{paramName}} = requestParameters.{{paramName}}; @@ -232,46 +165,41 @@ export class {{classname}} { {{/allParams}} {{#hasQueryParams}} - {{#useHttpClient}} let queryParameters = new HttpParams({encoder: this.encoder}); - {{/useHttpClient}} - {{^useHttpClient}} - let queryParameters = new URLSearchParams('', this.encoder); - {{/useHttpClient}} {{#queryParams}} {{#isListContainer}} if ({{paramName}}) { {{#isCollectionFormatMulti}} {{paramName}}.forEach((element) => { - {{#useHttpClient}}queryParameters = {{/useHttpClient}}this.addToHttpParams(queryParameters, + queryParameters = this.addToHttpParams(queryParameters, element, '{{baseName}}'); }) {{/isCollectionFormatMulti}} {{^isCollectionFormatMulti}} - {{#useHttpClient}}queryParameters = {{/useHttpClient}}this.addToHttpParams(queryParameters, + queryParameters = this.addToHttpParams(queryParameters, {{paramName}}.join(COLLECTION_FORMATS['{{collectionFormat}}']), '{{baseName}}'); {{/isCollectionFormatMulti}} } {{/isListContainer}} {{^isListContainer}} if ({{paramName}} !== undefined && {{paramName}} !== null) { - {{#useHttpClient}}queryParameters = {{/useHttpClient}}this.addToHttpParams(queryParameters, + queryParameters = this.addToHttpParams(queryParameters, {{paramName}}, '{{baseName}}'); } {{/isListContainer}} {{/queryParams}} {{/hasQueryParams}} - let headers = {{#useHttpClient}}this.defaultHeaders;{{/useHttpClient}}{{^useHttpClient}}new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845{{/useHttpClient}} + let headers = this.defaultHeaders; {{#headerParams}} {{#isListContainer}} if ({{paramName}}) { - {{#useHttpClient}}headers = {{/useHttpClient}}headers.set('{{baseName}}', {{paramName}}.join(COLLECTION_FORMATS['{{collectionFormat}}'])); + headers = headers.set('{{baseName}}', {{paramName}}.join(COLLECTION_FORMATS['{{collectionFormat}}'])); } {{/isListContainer}} {{^isListContainer}} if ({{paramName}} !== undefined && {{paramName}} !== null) { - {{#useHttpClient}}headers = {{/useHttpClient}}headers.set('{{baseName}}', String({{paramName}})); + headers = headers.set('{{baseName}}', String({{paramName}})); } {{/isListContainer}} {{/headerParams}} @@ -284,10 +212,10 @@ export class {{classname}} { const key: string | undefined = this.configuration.apiKeys["{{name}}"] || this.configuration.apiKeys["{{keyParamName}}"]; if (key) { {{#isKeyInHeader}} - {{#useHttpClient}}headers = {{/useHttpClient}}headers.set('{{keyParamName}}', key); + headers = headers.set('{{keyParamName}}', key); {{/isKeyInHeader}} {{#isKeyInQuery}} - {{#useHttpClient}}queryParameters = {{/useHttpClient}}queryParameters.set('{{keyParamName}}', key); + queryParameters = queryParameters.set('{{keyParamName}}', key); {{/isKeyInQuery}} } } @@ -296,7 +224,7 @@ export class {{classname}} { {{#isBasic}} {{#isBasicBasic}} if (this.configuration.username || this.configuration.password) { - {{#useHttpClient}}headers = {{/useHttpClient}}headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); + headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password)); } {{/isBasicBasic}} {{#isBasicBearer}} @@ -304,7 +232,7 @@ export class {{classname}} { const accessToken = typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; - {{#useHttpClient}}headers = {{/useHttpClient}}headers.set('Authorization', 'Bearer ' + accessToken); + headers = headers.set('Authorization', 'Bearer ' + accessToken); } {{/isBasicBearer}} {{/isBasic}} @@ -313,7 +241,7 @@ export class {{classname}} { const accessToken = typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; - {{#useHttpClient}}headers = {{/useHttpClient}}headers.set('Authorization', 'Bearer ' + accessToken); + headers = headers.set('Authorization', 'Bearer ' + accessToken); } {{/isOAuth}} @@ -329,12 +257,7 @@ export class {{classname}} { httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); } if (httpHeaderAcceptSelected !== undefined) { -{{^useHttpClient}} - headers.set('Accept', httpHeaderAcceptSelected); -{{/useHttpClient}} -{{#useHttpClient}} headers = headers.set('Accept', httpHeaderAcceptSelected); -{{/useHttpClient}} } {{#bodyParam}} @@ -359,12 +282,7 @@ export class {{classname}} { {{#bodyParam}} const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); if (httpContentTypeSelected !== undefined) { -{{^useHttpClient}} - headers.set('Content-Type', httpContentTypeSelected); -{{/useHttpClient}} -{{#useHttpClient}} headers = headers.set('Content-Type', httpContentTypeSelected); -{{/useHttpClient}} } {{/bodyParam}} @@ -384,16 +302,7 @@ export class {{classname}} { if (useForm) { formParams = new FormData(); } else { -{{#useHttpClient}} formParams = new HttpParams({encoder: this.encoder}); -{{/useHttpClient}} -{{^useHttpClient}} - // TODO: this fails if a parameter is a file, the api can't consume "multipart/form-data" and a blob is passed. - convertFormParamsToString = true; - formParams = new URLSearchParams('', this.encoder); - // set the content-type explicitly to avoid having it set to 'text/plain' - headers.set('Content-Type', 'application/x-www-form-urlencoded;charset=UTF-8'); -{{/useHttpClient}} } {{#formParams}} @@ -401,29 +310,28 @@ export class {{classname}} { if ({{paramName}}) { {{#isCollectionFormatMulti}} {{paramName}}.forEach((element) => { - {{#useHttpClient}}formParams = {{/useHttpClient}}formParams.append('{{baseName}}', element){{#useHttpClient}} as any || formParams{{/useHttpClient}}; + formParams = formParams.append('{{baseName}}', element) as any || formParams; }) {{/isCollectionFormatMulti}} {{^isCollectionFormatMulti}} if (useForm) { {{paramName}}.forEach((element) => { - {{#useHttpClient}}formParams = {{/useHttpClient}}formParams.append('{{baseName}}', element){{#useHttpClient}} as any || formParams{{/useHttpClient}}; + formParams = formParams.append('{{baseName}}', element) as any || formParams; }) } else { - {{#useHttpClient}}formParams = {{/useHttpClient}}formParams.append('{{baseName}}', {{paramName}}.join(COLLECTION_FORMATS['{{collectionFormat}}'])){{#useHttpClient}} as any || formParams{{/useHttpClient}}; + formParams = formParams.append('{{baseName}}', {{paramName}}.join(COLLECTION_FORMATS['{{collectionFormat}}'])) as any || formParams; } {{/isCollectionFormatMulti}} } {{/isListContainer}} {{^isListContainer}} if ({{paramName}} !== undefined) { - {{#useHttpClient}}formParams = {{/useHttpClient}}formParams.append('{{baseName}}', {{^isModel}}{{paramName}}{{/isModel}}{{#isModel}}useForm ? new Blob([JSON.stringify({{paramName}})], {type: 'application/json'}) : {{paramName}}{{/isModel}}){{#useHttpClient}} as any || formParams{{/useHttpClient}}; + formParams = formParams.append('{{baseName}}', {{^isModel}}{{paramName}}{{/isModel}}{{#isModel}}useForm ? new Blob([JSON.stringify({{paramName}})], {type: 'application/json'}) : {{paramName}}{{/isModel}}) as any || formParams; } {{/isListContainer}} {{/formParams}} {{/hasFormParams}} -{{#useHttpClient}} {{^isResponseFile}} let responseType: 'text' | 'json' = 'json'; if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { @@ -449,35 +357,6 @@ export class {{classname}} { reportProgress: reportProgress } ); -{{/useHttpClient}} -{{^useHttpClient}} - let requestOptions: RequestOptionsArgs = new RequestOptions({ - method: {{httpMethod}}, - headers: headers, -{{#bodyParam}} - body: {{paramName}} == null ? '' : JSON.stringify({{paramName}}), // https://github.com/angular/angular/issues/10612 -{{/bodyParam}} -{{#hasFormParams}} - body: convertFormParamsToString ? formParams.toString() : formParams, -{{/hasFormParams}} -{{#isResponseFile}} - responseType: ResponseContentType.Blob, -{{/isResponseFile}} -{{^isResponseFile}} - responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, -{{/isResponseFile}} -{{#hasQueryParams}} - search: queryParameters, -{{/hasQueryParams}} - withCredentials:this.configuration.withCredentials - }); - // issues#4037 - if (extraHttpRequestParams) { - requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); - } - - return this.http.request(`${this.configuration.basePath}{{{path}}}`, requestOptions); -{{/useHttpClient}} } {{/operation}}} diff --git a/modules/openapi-generator/src/main/resources/typescript-angular/apiInterface.mustache b/modules/openapi-generator/src/main/resources/typescript-angular/apiInterface.mustache index f300098fc8e..a9641b95785 100644 --- a/modules/openapi-generator/src/main/resources/typescript-angular/apiInterface.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-angular/apiInterface.mustache @@ -1,17 +1,7 @@ {{>licenseInfo}} -{{#useHttpClient}} import { HttpHeaders } from '@angular/common/http'; -{{/useHttpClient}} -{{^useHttpClient}} -import { Headers } from '@angular/http'; -{{/useHttpClient}} -{{^useRxJS6}} -import { Observable } from 'rxjs/Observable'; -{{/useRxJS6}} -{{#useRxJS6}} import { Observable } from 'rxjs'; -{{/useRxJS6}} {{#imports}} import { {{classname}} } from '../model/models'; @@ -41,9 +31,8 @@ export interface {{#prefixParameterInterfaces}}{{classname}}{{/prefixParameterIn */ {{/description}} export interface {{classname}}Interface { - defaultHeaders: {{#useHttpClient}}Http{{/useHttpClient}}Headers; + defaultHeaders: HttpHeaders; configuration: Configuration; - {{^useHttpClient}}[others: string]: any;{{/useHttpClient}} {{#operation}} /** diff --git a/modules/openapi-generator/src/main/resources/typescript-angular/configuration.mustache b/modules/openapi-generator/src/main/resources/typescript-angular/configuration.mustache index 272608be3a6..c038bbc9478 100644 --- a/modules/openapi-generator/src/main/resources/typescript-angular/configuration.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-angular/configuration.mustache @@ -1,9 +1,4 @@ -{{#useHttpClient}} import { HttpParameterCodec } from '@angular/common/http'; -{{/useHttpClient}} -{{^useHttpClient}} -import { QueryEncoder } from '@angular/http'; -{{/useHttpClient}} export interface ConfigurationParameters { apiKeys?: {[ key: string ]: string}; @@ -12,12 +7,7 @@ export interface ConfigurationParameters { accessToken?: string | (() => string); basePath?: string; withCredentials?: boolean; -{{#useHttpClient}} encoder?: HttpParameterCodec; -{{/useHttpClient}} -{{^useHttpClient}} - encoder?: QueryEncoder; -{{/useHttpClient}} } export class Configuration { @@ -27,12 +17,7 @@ export class Configuration { accessToken?: string | (() => string); basePath?: string; withCredentials?: boolean; -{{#useHttpClient}} encoder?: HttpParameterCodec; -{{/useHttpClient}} -{{^useHttpClient}} - encoder?: QueryEncoder; -{{/useHttpClient}} constructor(configurationParameters: ConfigurationParameters = {}) { this.apiKeys = configurationParameters.apiKeys; diff --git a/modules/openapi-generator/src/main/resources/typescript-angular/encoder.mustache b/modules/openapi-generator/src/main/resources/typescript-angular/encoder.mustache index c7e5f3cc8da..138c4d5cf2c 100644 --- a/modules/openapi-generator/src/main/resources/typescript-angular/encoder.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-angular/encoder.mustache @@ -1,11 +1,5 @@ -{{#useHttpClient}} import { HttpParameterCodec } from '@angular/common/http'; -{{/useHttpClient}} -{{^useHttpClient}} -import { QueryEncoder } from '@angular/http'; -{{/useHttpClient}} -{{#useHttpClient}} /** * Custom HttpParameterCodec * Workaround for https://github.com/angular/angular/issues/18261 @@ -24,22 +18,3 @@ export class CustomHttpParameterCodec implements HttpParameterCodec { return decodeURIComponent(v); } } -{{/useHttpClient}} -{{^useHttpClient}} -/** - * Custom QueryEncoder - * Fix plus sign (+) not encoding, so sent as blank space - * See: https://github.com/angular/angular/issues/11058#issuecomment-247367318 - */ -export class CustomQueryEncoderHelper extends QueryEncoder { - encodeKey(k: string): string { - k = super.encodeKey(k); - return k.replace(/\+/gi, '%2B'); - } - encodeValue(v: string): string { - v = super.encodeValue(v); - return v.replace(/\+/gi, '%2B'); - } -} -{{/useHttpClient}} - diff --git a/modules/openapi-generator/src/main/resources/typescript-angular/package.mustache b/modules/openapi-generator/src/main/resources/typescript-angular/package.mustache index 867114a1793..c2286eda8ce 100644 --- a/modules/openapi-generator/src/main/resources/typescript-angular/package.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-angular/package.mustache @@ -8,39 +8,23 @@ "openapi-generator" ], "license": "Unlicense", - {{#useNgPackagr}} "scripts": { "build": "ng-packagr -p ng-package.json" }, - {{/useNgPackagr}} - {{^useNgPackagr}} - "main": "dist/index.js", - "module": "dist/index.js", - "typings": "dist/index.d.ts", - "scripts": { - "build": "ngc && npm pack" - }, - {{/useNgPackagr}} "peerDependencies": { - "@angular/core": "^{{ngVersion}}",{{^useHttpClient}} - "@angular/http": "^{{ngVersion}}",{{/useHttpClient}} - "@angular/common": "^{{ngVersion}}", - "@angular/compiler": "^{{ngVersion}}", - "core-js": "^2.4.0", - "reflect-metadata": "^0.1.3", + "@angular/core": "^{{ngVersion}}", "rxjs": "^{{rxjsVersion}}" }, "devDependencies": { "@angular/common": "^{{ngVersion}}", "@angular/compiler": "^{{ngVersion}}", "@angular/compiler-cli": "^{{ngVersion}}", - "@angular/core": "^{{ngVersion}}",{{^useHttpClient}} - "@angular/http": "^{{ngVersion}}",{{/useHttpClient}} - "@angular/platform-browser": "^{{ngVersion}}",{{#useNgPackagr}} - "ng-packagr": "^{{ngPackagrVersion}}",{{/useNgPackagr}} + "@angular/core": "^{{ngVersion}}", + "@angular/platform-browser": "^{{ngVersion}}", + "ng-packagr": "^{{ngPackagrVersion}}", "reflect-metadata": "^0.1.3", - "rxjs": "^{{rxjsVersion}}",{{#useNgPackagr}}{{^useOldNgPackagr}} - "tsickle": "^{{tsickleVersion}}",{{/useOldNgPackagr}}{{/useNgPackagr}} + "rxjs": "^{{rxjsVersion}}", + "tsickle": "^{{tsickleVersion}}", "typescript": "{{{tsVersion}}}", "zone.js": "^{{zonejsVersion}}" }{{#npmRepository}}, diff --git a/modules/openapi-generator/src/main/resources/typescript-angular/rxjs-operators.mustache b/modules/openapi-generator/src/main/resources/typescript-angular/rxjs-operators.mustache deleted file mode 100644 index 5659cd0694f..00000000000 --- a/modules/openapi-generator/src/main/resources/typescript-angular/rxjs-operators.mustache +++ /dev/null @@ -1,11 +0,0 @@ -// RxJS imports according to https://angular.io/docs/ts/latest/guide/server-communication.html#!#rxjs - -// See node_module/rxjs/Rxjs.js -// Import just the rxjs statics and operators we need for THIS app. - -// Statics -import 'rxjs/add/observable/throw'; - -// Operators -import 'rxjs/add/operator/catch'; -import 'rxjs/add/operator/map'; diff --git a/modules/openapi-generator/src/main/resources/typescript-angular/tsconfig.mustache b/modules/openapi-generator/src/main/resources/typescript-angular/tsconfig.mustache index f03a3761c7c..dd4391c668a 100644 --- a/modules/openapi-generator/src/main/resources/typescript-angular/tsconfig.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-angular/tsconfig.mustache @@ -24,9 +24,5 @@ "filesGlob": [ "./model/*.ts", "./api/*.ts" - ]{{^useNgPackagr}}, - "angularCompilerOptions": { - "genDir": "dist", - "skipTemplateCodegen": true - }{{/useNgPackagr}} + ] } diff --git a/modules/openapi-generator/src/main/resources/typescript-angular/variables.mustache b/modules/openapi-generator/src/main/resources/typescript-angular/variables.mustache index b3241fcebcd..6fe58549f39 100644 --- a/modules/openapi-generator/src/main/resources/typescript-angular/variables.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-angular/variables.mustache @@ -1,6 +1,6 @@ -import { {{injectionToken}} } from '@angular/core'; +import { InjectionToken } from '@angular/core'; -export const BASE_PATH = new {{injectionToken}}{{#injectionTokenTyped}}{{/injectionTokenTyped}}('basePath'); +export const BASE_PATH = new InjectionToken('basePath'); export const COLLECTION_FORMATS = { 'csv': ',', 'tsv': ' ', diff --git a/modules/openapi-generator/src/main/resources/typescript-axios/apiInner.mustache b/modules/openapi-generator/src/main/resources/typescript-axios/apiInner.mustache index ec637d7b44a..e1fecd41c99 100644 --- a/modules/openapi-generator/src/main/resources/typescript-axios/apiInner.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-axios/apiInner.mustache @@ -351,7 +351,7 @@ export class {{classname}} extends BaseAPI { * @memberof {{classname}} */ {{#useSingleRequestParameter}} - public {{nickname}}({{#allParams.0}}requestParameters: {{classname}}{{operationIdCamelCase}}Request, {{/allParams.0}}options?: any) { + public {{nickname}}({{#allParams.0}}requestParameters: {{classname}}{{operationIdCamelCase}}Request{{^hasRequiredParams}} = {}{{/hasRequiredParams}}, {{/allParams.0}}options?: any) { return {{classname}}Fp(this.configuration).{{nickname}}({{#allParams.0}}{{#allParams}}requestParameters.{{paramName}}, {{/allParams}}{{/allParams.0}}options).then((request) => request(this.axios, this.basePath)); } {{/useSingleRequestParameter}} diff --git a/modules/openapi-generator/src/main/resources/typescript-axios/modelGeneric.mustache b/modules/openapi-generator/src/main/resources/typescript-axios/modelGeneric.mustache index ebe734cefb2..b332ec25a0e 100644 --- a/modules/openapi-generator/src/main/resources/typescript-axios/modelGeneric.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-axios/modelGeneric.mustache @@ -13,6 +13,9 @@ export interface {{classname}} {{#parent}}extends {{{parent}}} {{/parent}}{ * {{{description}}} * @type {{=<% %>=}}{<%&datatype%>}<%={{ }}=%> * @memberof {{classname}} + {{#deprecated}} + * @deprecated + {{/deprecated}} */ {{name}}{{^required}}?{{/required}}: {{#isEnum}}{{{datatypeWithEnum}}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{#isNullable}} | null{{/isNullable}}{{/isEnum}}; {{/vars}} diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/DefaultCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/DefaultCodegenTest.java index 45b7c529816..de269086006 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/DefaultCodegenTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/DefaultCodegenTest.java @@ -40,6 +40,7 @@ import org.openapitools.codegen.templating.mustache.LowercaseLambda; import org.openapitools.codegen.templating.mustache.TitlecaseLambda; import org.openapitools.codegen.templating.mustache.UppercaseLambda; import org.openapitools.codegen.utils.ModelUtils; +import org.openapitools.codegen.utils.SemVer; import org.testng.Assert; import org.testng.annotations.Test; @@ -222,6 +223,157 @@ public class DefaultCodegenTest { Assert.assertEquals(codegenParameter.defaultValue, "-efg"); } + @Test + public void testOriginalOpenApiDocumentVersion() { + // Test with OAS 2.0 document. + String location = "src/test/resources/2_0/python-client-experimental/petstore-with-fake-endpoints-models-for-testing.yaml"; + OpenAPI openAPI = TestUtils.parseFlattenSpec(location); + SemVer version = ModelUtils.getOpenApiVersion(openAPI, location, null); + Assert.assertEquals(version, new SemVer("2.0.0")); + + // Test with OAS 3.0 document. + location = "src/test/resources/3_0/python-experimental/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml"; + openAPI = TestUtils.parseFlattenSpec(location); + version = ModelUtils.getOpenApiVersion(openAPI, location, null); + Assert.assertEquals(version, new SemVer("3.0.0")); + } + + @Test + public void testAdditionalPropertiesV2Spec() { + OpenAPI openAPI = TestUtils.parseFlattenSpec("src/test/resources/2_0/additional-properties-for-testing.yaml"); + DefaultCodegen codegen = new DefaultCodegen(); + codegen.setOpenAPI(openAPI); + codegen.setDisallowAdditionalPropertiesIfNotPresent(true); + + Schema schema = openAPI.getComponents().getSchemas().get("AdditionalPropertiesClass"); + Assert.assertEquals(schema.getAdditionalProperties(), null); + + Schema addProps = ModelUtils.getAdditionalProperties(openAPI, schema); + // The petstore-with-fake-endpoints-models-for-testing.yaml does not set the + // 'additionalProperties' keyword for this model, hence assert the value to be null. + Assert.assertNull(addProps); + CodegenModel cm = codegen.fromModel("AdditionalPropertiesClass", schema); + // When the 'additionalProperties' keyword is not present, the model + // should allow undeclared properties. However, due to bug + // https://github.com/swagger-api/swagger-parser/issues/1369, the swagger + // converter does not retain the value of the additionalProperties. + + Map m = schema.getProperties(); + Schema child = m.get("map_string"); + // This property has the following inline schema. + // additionalProperties: + // type: string + Assert.assertNotNull(child); + Assert.assertNotNull(child.getAdditionalProperties()); + + child = m.get("map_with_additional_properties"); + // This property has the following inline schema. + // additionalProperties: true + Assert.assertNotNull(child); + // It is unfortunate that child.getAdditionalProperties() returns null for a V2 schema. + // We cannot differentiate between 'additionalProperties' not present and + // additionalProperties: true. + Assert.assertNull(child.getAdditionalProperties()); + addProps = ModelUtils.getAdditionalProperties(openAPI, child); + Assert.assertNull(addProps); + + child = m.get("map_without_additional_properties"); + // This property has the following inline schema. + // additionalProperties: false + Assert.assertNotNull(child); + // It is unfortunate that child.getAdditionalProperties() returns null for a V2 schema. + // We cannot differentiate between 'additionalProperties' not present and + // additionalProperties: false. + Assert.assertNull(child.getAdditionalProperties()); + addProps = ModelUtils.getAdditionalProperties(openAPI, child); + Assert.assertNull(addProps); + } + + @Test + public void testAdditionalPropertiesV3Spec() { + OpenAPI openAPI = TestUtils.parseFlattenSpec("src/test/resources/3_0/python-experimental/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml"); + DefaultCodegen codegen = new DefaultCodegen(); + codegen.setDisallowAdditionalPropertiesIfNotPresent(false); + codegen.setOpenAPI(openAPI); + + Schema schema = openAPI.getComponents().getSchemas().get("AdditionalPropertiesClass"); + Assert.assertNull(schema.getAdditionalProperties()); + + // When the 'additionalProperties' keyword is not present, the schema may be + // extended with any undeclared properties. + Schema addProps = ModelUtils.getAdditionalProperties(openAPI, schema); + Assert.assertNotNull(addProps); + Assert.assertTrue(addProps instanceof ObjectSchema); + CodegenModel cm = codegen.fromModel("AdditionalPropertiesClass", schema); + + Map m = schema.getProperties(); + Schema child = m.get("map_with_undeclared_properties_string"); + // This property has the following inline schema. + // additionalProperties: + // type: string + Assert.assertNotNull(child); + Assert.assertNotNull(child.getAdditionalProperties()); + + child = m.get("map_with_undeclared_properties_anytype_1"); + // This property does not use the additionalProperties keyword, + // which means by default undeclared properties are allowed. + Assert.assertNotNull(child); + Assert.assertNull(child.getAdditionalProperties()); + addProps = ModelUtils.getAdditionalProperties(openAPI, child); + Assert.assertNotNull(addProps); + Assert.assertTrue(addProps instanceof ObjectSchema); + + child = m.get("map_with_undeclared_properties_anytype_2"); + // This property does not use the additionalProperties keyword, + // which means by default undeclared properties are allowed. + Assert.assertNotNull(child); + Assert.assertNull(child.getAdditionalProperties()); + addProps = ModelUtils.getAdditionalProperties(openAPI, child); + Assert.assertNotNull(addProps); + Assert.assertTrue(addProps instanceof ObjectSchema); + + child = m.get("map_with_undeclared_properties_anytype_3"); + // This property has the following inline schema. + // additionalProperties: true + Assert.assertNotNull(child); + // Unlike the V2 spec, in V3 we CAN differentiate between 'additionalProperties' not present and + // additionalProperties: true. + Assert.assertNotNull(child.getAdditionalProperties()); + Assert.assertEquals(child.getAdditionalProperties(), Boolean.TRUE); + addProps = ModelUtils.getAdditionalProperties(openAPI, child); + Assert.assertNotNull(addProps); + Assert.assertTrue(addProps instanceof ObjectSchema); + + child = m.get("empty_map"); + // This property has the following inline schema. + // additionalProperties: false + Assert.assertNotNull(child); + // Unlike the V2 spec, in V3 we CAN differentiate between 'additionalProperties' not present and + // additionalProperties: false. + Assert.assertNotNull(child.getAdditionalProperties()); + Assert.assertEquals(child.getAdditionalProperties(), Boolean.FALSE); + addProps = ModelUtils.getAdditionalProperties(openAPI, child); + Assert.assertNull(addProps); + } + + @Test + public void testAdditionalPropertiesV3SpecLegacy() { + OpenAPI openAPI = TestUtils.parseFlattenSpec("src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml"); + DefaultCodegen codegen = new DefaultCodegen(); + codegen.setDisallowAdditionalPropertiesIfNotPresent(true); + codegen.setOpenAPI(openAPI); + + Schema schema = openAPI.getComponents().getSchemas().get("AdditionalPropertiesClass"); + Assert.assertNull(schema.getAdditionalProperties()); + + // As per OAS spec, when the 'additionalProperties' keyword is not present, the schema may be + // extended with any undeclared properties. + // However, in legacy 'additionalProperties' mode, this is interpreted as + // 'no additional properties are allowed'. + Schema addProps = ModelUtils.getAdditionalProperties(openAPI, schema); + Assert.assertNull(addProps); + } + @Test public void testEnsureNoDuplicateProduces() { final OpenAPI openAPI = TestUtils.parseFlattenSpec("src/test/resources/3_0/two-responses.yaml"); @@ -1187,6 +1339,8 @@ public class DefaultCodegenTest { // check that the model's children contain the x-discriminator-values modelName = "BaseObj"; cm = getModel(allModels, modelName); + Assert.assertNotNull(cm); + Assert.assertNotNull(cm.children); List excpectedDiscriminatorValues = new ArrayList<>(Arrays.asList("daily", "sub-obj")); ArrayList xDiscriminatorValues = new ArrayList<>(); for (CodegenModel child: cm.children) { diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/TestUtils.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/TestUtils.java index 077268f2408..dc5ec9965a2 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/TestUtils.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/TestUtils.java @@ -18,6 +18,7 @@ import io.swagger.v3.oas.models.servers.Server; import io.swagger.v3.parser.core.models.ParseOptions; import org.openapitools.codegen.MockDefaultGenerator.WrittenTemplateBasedFile; +import org.openapitools.codegen.utils.ModelUtils; import org.testng.Assert; import java.io.File; @@ -52,11 +53,19 @@ public class TestUtils { * @return A "raw" OpenAPI document */ public static OpenAPI parseSpec(String specFilePath) { - return new OpenAPIParser().readLocation(specFilePath, null, new ParseOptions()).getOpenAPI(); + OpenAPI openAPI = new OpenAPIParser().readLocation(specFilePath, null, new ParseOptions()).getOpenAPI(); + // Invoke helper function to get the original swagger version. + // See https://github.com/swagger-api/swagger-parser/pull/1374 + // Also see https://github.com/swagger-api/swagger-parser/issues/1369. + ModelUtils.getOpenApiVersion(openAPI, specFilePath, null); + return openAPI; } public static OpenAPI parseContent(String jsonOrYaml) { - return new OpenAPIParser().readContents(jsonOrYaml, null, null).getOpenAPI(); + OpenAPI openAPI = new OpenAPIParser().readContents(jsonOrYaml, null, null).getOpenAPI(); + // Invoke helper function to get the original swagger version. + ModelUtils.getOpenApiVersion(openAPI, jsonOrYaml, null); + return openAPI; } public static OpenAPI createOpenAPI() { diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/BashClientOptionsProvider.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/BashClientOptionsProvider.java index 45b03efccce..2a4564db2b9 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/BashClientOptionsProvider.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/BashClientOptionsProvider.java @@ -71,6 +71,7 @@ public class BashClientOptionsProvider implements OptionsProvider { .put(CodegenConstants.ALLOW_UNICODE_IDENTIFIERS, ALLOW_UNICODE_IDENTIFIERS_VALUE) .put(CodegenConstants.PREPEND_FORM_OR_BODY_PARAMETERS, PREPEND_FORM_OR_BODY_PARAMETERS_VALUE) .put(CodegenConstants.LEGACY_DISCRIMINATOR_BEHAVIOR, "true") + .put(CodegenConstants.DISALLOW_ADDITIONAL_PROPERTIES_IF_NOT_PRESENT, "true") .build(); } diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/DartClientOptionsProvider.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/DartClientOptionsProvider.java index 79cf084234f..ef59bc8c812 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/DartClientOptionsProvider.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/DartClientOptionsProvider.java @@ -63,6 +63,7 @@ public class DartClientOptionsProvider implements OptionsProvider { .put(CodegenConstants.PREPEND_FORM_OR_BODY_PARAMETERS, PREPEND_FORM_OR_BODY_PARAMETERS_VALUE) .put(DartClientCodegen.SUPPORT_DART2, "false") .put(CodegenConstants.LEGACY_DISCRIMINATOR_BEHAVIOR, "true") + .put(CodegenConstants.DISALLOW_ADDITIONAL_PROPERTIES_IF_NOT_PRESENT, "true") .build(); } diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/DartDioClientOptionsProvider.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/DartDioClientOptionsProvider.java index 9e54e028f7f..6b63cbee5f8 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/DartDioClientOptionsProvider.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/DartDioClientOptionsProvider.java @@ -68,6 +68,7 @@ public class DartDioClientOptionsProvider implements OptionsProvider { .put(DartDioClientCodegen.DATE_LIBRARY, DATE_LIBRARY) .put(DartDioClientCodegen.NULLABLE_FIELDS, NULLABLE_FIELDS) .put(CodegenConstants.LEGACY_DISCRIMINATOR_BEHAVIOR, "true") + .put(CodegenConstants.DISALLOW_ADDITIONAL_PROPERTIES_IF_NOT_PRESENT, "true") .build(); } diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/ElixirClientOptionsProvider.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/ElixirClientOptionsProvider.java index f6efa94aa51..bd39161584f 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/ElixirClientOptionsProvider.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/ElixirClientOptionsProvider.java @@ -44,6 +44,7 @@ public class ElixirClientOptionsProvider implements OptionsProvider { .put(CodegenConstants.PACKAGE_NAME, "yay_pets") .put(CodegenConstants.PREPEND_FORM_OR_BODY_PARAMETERS, PREPEND_FORM_OR_BODY_PARAMETERS_VALUE) .put(CodegenConstants.LEGACY_DISCRIMINATOR_BEHAVIOR, "true") + .put(CodegenConstants.DISALLOW_ADDITIONAL_PROPERTIES_IF_NOT_PRESENT, "true") .build(); } diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/GoGinServerOptionsProvider.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/GoGinServerOptionsProvider.java index 0684591597b..910f9441c18 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/GoGinServerOptionsProvider.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/GoGinServerOptionsProvider.java @@ -39,6 +39,7 @@ public class GoGinServerOptionsProvider implements OptionsProvider { .put(CodegenConstants.ENSURE_UNIQUE_PARAMS, ENSURE_UNIQUE_PARAMS_VALUE) .put(CodegenConstants.ALLOW_UNICODE_IDENTIFIERS, ALLOW_UNICODE_IDENTIFIERS_VALUE) .put(CodegenConstants.PREPEND_FORM_OR_BODY_PARAMETERS, "true") + .put(CodegenConstants.DISALLOW_ADDITIONAL_PROPERTIES_IF_NOT_PRESENT, "true") .build(); } diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/GoServerOptionsProvider.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/GoServerOptionsProvider.java index 767c81b336b..e445afd3fc2 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/GoServerOptionsProvider.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/GoServerOptionsProvider.java @@ -40,6 +40,7 @@ public class GoServerOptionsProvider implements OptionsProvider { .put(CodegenConstants.ENSURE_UNIQUE_PARAMS, ENSURE_UNIQUE_PARAMS_VALUE) .put(CodegenConstants.ALLOW_UNICODE_IDENTIFIERS, ALLOW_UNICODE_IDENTIFIERS_VALUE) .put(CodegenConstants.PREPEND_FORM_OR_BODY_PARAMETERS, "true") + .put(CodegenConstants.DISALLOW_ADDITIONAL_PROPERTIES_IF_NOT_PRESENT, "true") .build(); } diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/HaskellServantOptionsProvider.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/HaskellServantOptionsProvider.java index f883ebbed19..728b44ef38f 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/HaskellServantOptionsProvider.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/HaskellServantOptionsProvider.java @@ -49,6 +49,7 @@ public class HaskellServantOptionsProvider implements OptionsProvider { .put(CodegenConstants.PREPEND_FORM_OR_BODY_PARAMETERS, PREPEND_FORM_OR_BODY_PARAMETERS_VALUE) .put(HaskellServantCodegen.PROP_SERVE_STATIC, HaskellServantCodegen.PROP_SERVE_STATIC_DEFAULT.toString()) .put(CodegenConstants.LEGACY_DISCRIMINATOR_BEHAVIOR, "true") + .put(CodegenConstants.DISALLOW_ADDITIONAL_PROPERTIES_IF_NOT_PRESENT, "true") .build(); } diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/PhpClientOptionsProvider.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/PhpClientOptionsProvider.java index 245957be407..b2a987d924e 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/PhpClientOptionsProvider.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/PhpClientOptionsProvider.java @@ -59,6 +59,7 @@ public class PhpClientOptionsProvider implements OptionsProvider { .put(CodegenConstants.ALLOW_UNICODE_IDENTIFIERS, ALLOW_UNICODE_IDENTIFIERS_VALUE) .put(CodegenConstants.PREPEND_FORM_OR_BODY_PARAMETERS, PREPEND_FORM_OR_BODY_PARAMETERS_VALUE) .put(CodegenConstants.LEGACY_DISCRIMINATOR_BEHAVIOR, "true") + .put(CodegenConstants.DISALLOW_ADDITIONAL_PROPERTIES_IF_NOT_PRESENT, "true") .build(); } diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/PhpLumenServerOptionsProvider.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/PhpLumenServerOptionsProvider.java index 97ad8132ce4..25d34b16d80 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/PhpLumenServerOptionsProvider.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/PhpLumenServerOptionsProvider.java @@ -58,6 +58,7 @@ public class PhpLumenServerOptionsProvider implements OptionsProvider { .put(CodegenConstants.ALLOW_UNICODE_IDENTIFIERS, ALLOW_UNICODE_IDENTIFIERS_VALUE) .put(CodegenConstants.PREPEND_FORM_OR_BODY_PARAMETERS, PREPEND_FORM_OR_BODY_PARAMETERS_VALUE) .put(CodegenConstants.LEGACY_DISCRIMINATOR_BEHAVIOR, "true") + .put(CodegenConstants.DISALLOW_ADDITIONAL_PROPERTIES_IF_NOT_PRESENT, "true") .build(); } diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/PhpSilexServerOptionsProvider.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/PhpSilexServerOptionsProvider.java index a3f32f9b4a0..b6c55c7a27b 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/PhpSilexServerOptionsProvider.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/PhpSilexServerOptionsProvider.java @@ -43,6 +43,7 @@ public class PhpSilexServerOptionsProvider implements OptionsProvider { .put(CodegenConstants.ALLOW_UNICODE_IDENTIFIERS, ALLOW_UNICODE_IDENTIFIERS_VALUE) .put(CodegenConstants.PREPEND_FORM_OR_BODY_PARAMETERS, PREPEND_FORM_OR_BODY_PARAMETERS_VALUE) .put(CodegenConstants.LEGACY_DISCRIMINATOR_BEHAVIOR, "true") + .put(CodegenConstants.DISALLOW_ADDITIONAL_PROPERTIES_IF_NOT_PRESENT, "true") .build(); } diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/PhpSlim4ServerOptionsProvider.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/PhpSlim4ServerOptionsProvider.java index 4bf91932a3f..3295ed95101 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/PhpSlim4ServerOptionsProvider.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/PhpSlim4ServerOptionsProvider.java @@ -61,6 +61,7 @@ public class PhpSlim4ServerOptionsProvider implements OptionsProvider { .put(CodegenConstants.PREPEND_FORM_OR_BODY_PARAMETERS, PREPEND_FORM_OR_BODY_PARAMETERS_VALUE) .put(PhpSlim4ServerCodegen.PSR7_IMPLEMENTATION, PSR7_IMPLEMENTATION_VALUE) .put(CodegenConstants.LEGACY_DISCRIMINATOR_BEHAVIOR, "true") + .put(CodegenConstants.DISALLOW_ADDITIONAL_PROPERTIES_IF_NOT_PRESENT, "true") .build(); } diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/PhpSlimServerOptionsProvider.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/PhpSlimServerOptionsProvider.java index 537b7b10c66..4a40588c0eb 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/PhpSlimServerOptionsProvider.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/PhpSlimServerOptionsProvider.java @@ -58,6 +58,7 @@ public class PhpSlimServerOptionsProvider implements OptionsProvider { .put(CodegenConstants.ALLOW_UNICODE_IDENTIFIERS, ALLOW_UNICODE_IDENTIFIERS_VALUE) .put(CodegenConstants.PREPEND_FORM_OR_BODY_PARAMETERS, PREPEND_FORM_OR_BODY_PARAMETERS_VALUE) .put(CodegenConstants.LEGACY_DISCRIMINATOR_BEHAVIOR, "true") + .put(CodegenConstants.DISALLOW_ADDITIONAL_PROPERTIES_IF_NOT_PRESENT, "true") .build(); } diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/RubyClientOptionsProvider.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/RubyClientOptionsProvider.java index 09bd0dceabc..9d5c63f9d2d 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/RubyClientOptionsProvider.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/RubyClientOptionsProvider.java @@ -67,6 +67,7 @@ public class RubyClientOptionsProvider implements OptionsProvider { .put(CodegenConstants.PREPEND_FORM_OR_BODY_PARAMETERS, PREPEND_FORM_OR_BODY_PARAMETERS_VALUE) .put(CodegenConstants.LIBRARY, LIBRARY) .put(CodegenConstants.LEGACY_DISCRIMINATOR_BEHAVIOR, "true") + .put(CodegenConstants.DISALLOW_ADDITIONAL_PROPERTIES_IF_NOT_PRESENT, "true") .build(); } diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/ScalaAkkaClientOptionsProvider.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/ScalaAkkaClientOptionsProvider.java index 4b982932b98..62909fb5b3f 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/ScalaAkkaClientOptionsProvider.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/ScalaAkkaClientOptionsProvider.java @@ -56,6 +56,7 @@ public class ScalaAkkaClientOptionsProvider implements OptionsProvider { .put(CodegenConstants.MODEL_PROPERTY_NAMING, MODEL_PROPERTY_NAMING) .put("dateLibrary", DATE_LIBRARY) .put(CodegenConstants.LEGACY_DISCRIMINATOR_BEHAVIOR, "true") + .put(CodegenConstants.DISALLOW_ADDITIONAL_PROPERTIES_IF_NOT_PRESENT, "true") .build(); } diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/ScalaHttpClientOptionsProvider.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/ScalaHttpClientOptionsProvider.java index 11825e2ec12..ac3c7f713c5 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/ScalaHttpClientOptionsProvider.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/ScalaHttpClientOptionsProvider.java @@ -53,6 +53,7 @@ public class ScalaHttpClientOptionsProvider implements OptionsProvider { .put(CodegenConstants.PREPEND_FORM_OR_BODY_PARAMETERS, PREPEND_FORM_OR_BODY_PARAMETERS_VALUE) .put("dateLibrary", DATE_LIBRARY) .put(CodegenConstants.LEGACY_DISCRIMINATOR_BEHAVIOR, "true") + .put(CodegenConstants.DISALLOW_ADDITIONAL_PROPERTIES_IF_NOT_PRESENT, "true") .build(); } diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/Swift4OptionsProvider.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/Swift4OptionsProvider.java index aa2d61f2829..038c40121d6 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/Swift4OptionsProvider.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/Swift4OptionsProvider.java @@ -82,6 +82,7 @@ public class Swift4OptionsProvider implements OptionsProvider { .put(CodegenConstants.ALLOW_UNICODE_IDENTIFIERS, ALLOW_UNICODE_IDENTIFIERS_VALUE) .put(CodegenConstants.PREPEND_FORM_OR_BODY_PARAMETERS, PREPEND_FORM_OR_BODY_PARAMETERS_VALUE) .put(CodegenConstants.LEGACY_DISCRIMINATOR_BEHAVIOR, "true") + .put(CodegenConstants.DISALLOW_ADDITIONAL_PROPERTIES_IF_NOT_PRESENT, "true") .build(); } diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/Swift5OptionsProvider.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/Swift5OptionsProvider.java index 58b3ae01fd3..e432b326d1c 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/Swift5OptionsProvider.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/Swift5OptionsProvider.java @@ -83,6 +83,7 @@ public class Swift5OptionsProvider implements OptionsProvider { .put(CodegenConstants.API_NAME_PREFIX, "") .put(CodegenConstants.LIBRARY, LIBRARY_VALUE) .put(CodegenConstants.LEGACY_DISCRIMINATOR_BEHAVIOR, "true") + .put(CodegenConstants.DISALLOW_ADDITIONAL_PROPERTIES_IF_NOT_PRESENT, "true") .build(); } diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/TypeScriptAngularClientOptionsProvider.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/TypeScriptAngularClientOptionsProvider.java index 51b62748e3c..7553e379e4f 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/TypeScriptAngularClientOptionsProvider.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/TypeScriptAngularClientOptionsProvider.java @@ -82,6 +82,7 @@ public class TypeScriptAngularClientOptionsProvider implements OptionsProvider { .put(CodegenConstants.PREPEND_FORM_OR_BODY_PARAMETERS, PREPEND_FORM_OR_BODY_PARAMETERS_VALUE) .put(TypeScriptAngularClientCodegen.FILE_NAMING, FILE_NAMING_VALUE) .put(CodegenConstants.LEGACY_DISCRIMINATOR_BEHAVIOR, "true") + .put(CodegenConstants.DISALLOW_ADDITIONAL_PROPERTIES_IF_NOT_PRESENT, "true") .build(); } diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/TypeScriptAngularJsClientOptionsProvider.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/TypeScriptAngularJsClientOptionsProvider.java index 1e008de1ed1..2c56e0c1268 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/TypeScriptAngularJsClientOptionsProvider.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/TypeScriptAngularJsClientOptionsProvider.java @@ -54,6 +54,7 @@ public class TypeScriptAngularJsClientOptionsProvider implements OptionsProvider .put(CodegenConstants.ALLOW_UNICODE_IDENTIFIERS, ALLOW_UNICODE_IDENTIFIERS_VALUE) .put(CodegenConstants.PREPEND_FORM_OR_BODY_PARAMETERS, PREPEND_FORM_OR_BODY_PARAMETERS_VALUE) .put(CodegenConstants.LEGACY_DISCRIMINATOR_BEHAVIOR, "true") + .put(CodegenConstants.DISALLOW_ADDITIONAL_PROPERTIES_IF_NOT_PRESENT, "true") .build(); } diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/TypeScriptAureliaClientOptionsProvider.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/TypeScriptAureliaClientOptionsProvider.java index 58b5aa61826..cae9790d8da 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/TypeScriptAureliaClientOptionsProvider.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/TypeScriptAureliaClientOptionsProvider.java @@ -60,6 +60,7 @@ public class TypeScriptAureliaClientOptionsProvider implements OptionsProvider { .put(CodegenConstants.ALLOW_UNICODE_IDENTIFIERS, ALLOW_UNICODE_IDENTIFIERS_VALUE) .put(CodegenConstants.PREPEND_FORM_OR_BODY_PARAMETERS, PREPEND_FORM_OR_BODY_PARAMETERS_VALUE) .put(CodegenConstants.LEGACY_DISCRIMINATOR_BEHAVIOR, "true") + .put(CodegenConstants.DISALLOW_ADDITIONAL_PROPERTIES_IF_NOT_PRESENT, "true") .build(); } diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/TypeScriptFetchClientOptionsProvider.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/TypeScriptFetchClientOptionsProvider.java index 7bec81c9ae3..1671fc5293c 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/TypeScriptFetchClientOptionsProvider.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/TypeScriptFetchClientOptionsProvider.java @@ -67,6 +67,7 @@ public class TypeScriptFetchClientOptionsProvider implements OptionsProvider { .put(CodegenConstants.ALLOW_UNICODE_IDENTIFIERS, ALLOW_UNICODE_IDENTIFIERS_VALUE) .put(CodegenConstants.PREPEND_FORM_OR_BODY_PARAMETERS, PREPEND_FORM_OR_BODY_PARAMETERS_VALUE) .put(CodegenConstants.LEGACY_DISCRIMINATOR_BEHAVIOR, "true") + .put(CodegenConstants.DISALLOW_ADDITIONAL_PROPERTIES_IF_NOT_PRESENT, "true") .build(); } diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/TypeScriptNodeClientOptionsProvider.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/TypeScriptNodeClientOptionsProvider.java index a2dc76d63f4..0600f14838c 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/TypeScriptNodeClientOptionsProvider.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/TypeScriptNodeClientOptionsProvider.java @@ -64,6 +64,7 @@ public class TypeScriptNodeClientOptionsProvider implements OptionsProvider { .put(CodegenConstants.ALLOW_UNICODE_IDENTIFIERS, ALLOW_UNICODE_IDENTIFIERS_VALUE) .put(CodegenConstants.PREPEND_FORM_OR_BODY_PARAMETERS, PREPEND_FORM_OR_BODY_PARAMETERS_VALUE) .put(CodegenConstants.LEGACY_DISCRIMINATOR_BEHAVIOR, "true") + .put(CodegenConstants.DISALLOW_ADDITIONAL_PROPERTIES_IF_NOT_PRESENT, "true") .build(); } diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/python/PythonClientExperimentalTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/python/PythonClientExperimentalTest.java index c040b61b33e..c7988952b7f 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/python/PythonClientExperimentalTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/python/PythonClientExperimentalTest.java @@ -289,9 +289,8 @@ public class PythonClientExperimentalTest { Assert.assertEquals(cm.classname, "sample.Sample"); Assert.assertEquals(cm.description, "a map model"); Assert.assertEquals(cm.vars.size(), 0); - Assert.assertEquals(cm.parent, "dict"); - Assert.assertEquals(cm.imports.size(), 1); - Assert.assertEquals(Sets.intersection(cm.imports, Sets.newHashSet("children.Children")).size(), 1); + Assert.assertEquals(cm.parent, null); + Assert.assertEquals(cm.imports.size(), 0); } } 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 5b0114d96ac..221f13a7004 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 @@ -226,25 +226,26 @@ public class ModelUtilsTest { */ @Test public void testIsFreeFormObject() { + OpenAPI openAPI = new OpenAPI().openapi("3.0.0"); // Create initial "empty" object schema. ObjectSchema objSchema = new ObjectSchema(); - Assert.assertTrue(ModelUtils.isFreeFormObject(objSchema)); + Assert.assertTrue(ModelUtils.isFreeFormObject(openAPI, objSchema)); // Set additionalProperties to an empty ObjectSchema. objSchema.setAdditionalProperties(new ObjectSchema()); - Assert.assertTrue(ModelUtils.isFreeFormObject(objSchema)); + Assert.assertTrue(ModelUtils.isFreeFormObject(openAPI, objSchema)); // Add a single property to the schema (no longer a free-form object). Map props = new HashMap<>(); props.put("prop1", new StringSchema()); objSchema.setProperties(props); - Assert.assertFalse(ModelUtils.isFreeFormObject(objSchema)); + Assert.assertFalse(ModelUtils.isFreeFormObject(openAPI, objSchema)); // Test a non-object schema - Assert.assertFalse(ModelUtils.isFreeFormObject(new StringSchema())); + Assert.assertFalse(ModelUtils.isFreeFormObject(openAPI, new StringSchema())); // Test a null schema - Assert.assertFalse(ModelUtils.isFreeFormObject(null)); + Assert.assertFalse(ModelUtils.isFreeFormObject(openAPI, null)); } @Test diff --git a/modules/openapi-generator/src/test/resources/2_0/additional-properties-for-testing.yaml b/modules/openapi-generator/src/test/resources/2_0/additional-properties-for-testing.yaml new file mode 100644 index 00000000000..5cfa74c27c8 --- /dev/null +++ b/modules/openapi-generator/src/test/resources/2_0/additional-properties-for-testing.yaml @@ -0,0 +1,24 @@ +swagger: '2.0' +info: + description: "This spec is for testing additional properties" + version: 1.0.0 + title: OpenAPI Petstore + license: + name: Apache-2.0 + url: 'https://www.apache.org/licenses/LICENSE-2.0.html' +host: petstore.swagger.io:80 +basePath: /v2 +definitions: + AdditionalPropertiesClass: + type: object + properties: + map_string: + type: object + additionalProperties: + type: string + map_with_additional_properties: + type: object + additionalProperties: true + map_without_additional_properties: + type: object + additionalProperties: false diff --git a/modules/openapi-generator/src/test/resources/2_0/petstore-with-operations-without-required-params.yaml b/modules/openapi-generator/src/test/resources/2_0/petstore-with-operations-without-required-params.yaml new file mode 100644 index 00000000000..23cc94c587c --- /dev/null +++ b/modules/openapi-generator/src/test/resources/2_0/petstore-with-operations-without-required-params.yaml @@ -0,0 +1,695 @@ +swagger: '2.0' +info: + description: 'This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.' + version: 1.0.0 + title: OpenAPI Petstore + license: + name: Apache-2.0 + url: 'https://www.apache.org/licenses/LICENSE-2.0.html' +host: petstore.swagger.io +basePath: /v2 +tags: + - name: pet + description: Everything about your Pets + - name: store + description: Access to Petstore orders + - name: user + description: Operations about user +schemes: + - http +paths: + /pet: + post: + tags: + - pet + summary: Add a new pet to the store + description: '' + operationId: addPet + consumes: + - application/json + - application/xml + produces: + - application/xml + - application/json + parameters: + - in: body + name: body + description: Pet object that needs to be added to the store + required: true + schema: + $ref: '#/definitions/Pet' + responses: + '405': + description: Invalid input + security: + - petstore_auth: + - 'write:pets' + - 'read:pets' + put: + tags: + - pet + summary: Update an existing pet + description: '' + operationId: updatePet + consumes: + - application/json + - application/xml + produces: + - application/xml + - application/json + parameters: + - in: body + name: body + description: Pet object that needs to be added to the store + required: true + schema: + $ref: '#/definitions/Pet' + responses: + '400': + description: Invalid ID supplied + '404': + description: Pet not found + '405': + description: Validation exception + security: + - petstore_auth: + - 'write:pets' + - 'read:pets' + /pet/findByStatus: + get: + tags: + - pet + summary: Finds Pets by status + description: Multiple status values can be provided with comma separated strings + operationId: findPetsByStatus + produces: + - application/xml + - application/json + parameters: + - name: status + in: query + description: Status values that need to be considered for filter + required: true + type: array + items: + type: string + enum: + - available + - pending + - sold + default: available + collectionFormat: csv + responses: + '200': + description: successful operation + schema: + type: array + items: + $ref: '#/definitions/Pet' + '400': + description: Invalid status value + security: + - petstore_auth: + - 'write:pets' + - 'read:pets' + /pet/findByTags: + get: + tags: + - pet + summary: Finds Pets by tags + description: 'Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.' + operationId: findPetsByTags + produces: + - application/xml + - application/json + parameters: + - name: tags + in: query + description: Tags to filter by + required: true + type: array + items: + type: string + collectionFormat: csv + responses: + '200': + description: successful operation + schema: + type: array + items: + $ref: '#/definitions/Pet' + '400': + description: Invalid tag value + security: + - petstore_auth: + - 'write:pets' + - 'read:pets' + deprecated: true + '/pet/{petId}': + get: + tags: + - pet + summary: Find pet by ID + description: Returns a single pet + operationId: getPetById + produces: + - application/xml + - application/json + parameters: + - name: petId + in: path + description: ID of pet to return + required: true + type: integer + format: int64 + responses: + '200': + description: successful operation + schema: + $ref: '#/definitions/Pet' + '400': + description: Invalid ID supplied + '404': + description: Pet not found + security: + - api_key: [] + post: + tags: + - pet + summary: Updates a pet in the store with form data + description: '' + operationId: updatePetWithForm + consumes: + - application/x-www-form-urlencoded + produces: + - application/xml + - application/json + parameters: + - name: petId + in: path + description: ID of pet that needs to be updated + required: true + type: integer + format: int64 + - name: name + in: formData + description: Updated name of the pet + required: false + type: string + - name: status + in: formData + description: Updated status of the pet + required: false + type: string + responses: + '405': + description: Invalid input + security: + - petstore_auth: + - 'write:pets' + - 'read:pets' + delete: + tags: + - pet + summary: Deletes a pet + description: '' + operationId: deletePet + produces: + - application/xml + - application/json + parameters: + - name: api_key + in: header + required: false + type: string + - name: petId + in: path + description: Pet id to delete + required: true + type: integer + format: int64 + responses: + '400': + description: Invalid pet value + security: + - petstore_auth: + - 'write:pets' + - 'read:pets' + '/pet/{petId}/uploadImage': + post: + tags: + - pet + summary: uploads an image + description: '' + operationId: uploadFile + consumes: + - multipart/form-data + produces: + - application/json + parameters: + - name: petId + in: path + description: ID of pet to update + required: true + type: integer + format: int64 + - name: additionalMetadata + in: formData + description: Additional data to pass to server + required: false + type: string + - name: file + in: formData + description: file to upload + required: false + type: file + responses: + '200': + description: successful operation + schema: + $ref: '#/definitions/ApiResponse' + security: + - petstore_auth: + - 'write:pets' + - 'read:pets' + /store/inventory: + get: + tags: + - store + summary: Returns pet inventories by status + description: Returns a map of status codes to quantities + operationId: getInventory + produces: + - application/json + parameters: [] + responses: + '200': + description: successful operation + schema: + type: object + additionalProperties: + type: integer + format: int32 + security: + - api_key: [] + /store/order: + post: + tags: + - store + summary: Place an order for a pet + description: '' + operationId: placeOrder + produces: + - application/xml + - application/json + parameters: + - in: body + name: body + description: order placed for purchasing the pet + required: false + schema: + $ref: '#/definitions/Order' + responses: + '200': + description: successful operation + schema: + $ref: '#/definitions/Order' + '400': + description: Invalid Order + '/store/order/{orderId}': + get: + tags: + - store + summary: Find purchase order by ID + description: 'For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions' + operationId: getOrderById + produces: + - application/xml + - application/json + parameters: + - name: orderId + in: path + description: ID of pet that needs to be fetched + required: true + type: integer + maximum: 5 + minimum: 1 + format: int64 + responses: + '200': + description: successful operation + schema: + $ref: '#/definitions/Order' + '400': + description: Invalid ID supplied + '404': + description: Order not found + delete: + tags: + - store + summary: Delete purchase order by ID + description: For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + operationId: deleteOrder + produces: + - application/xml + - application/json + parameters: + - name: orderId + in: path + description: ID of the order that needs to be deleted + required: true + type: string + responses: + '400': + description: Invalid ID supplied + '404': + description: Order not found + /user: + post: + tags: + - user + summary: Create user + description: This can only be done by the logged in user. + operationId: createUser + produces: + - application/xml + - application/json + parameters: + - in: body + name: body + description: Created user object + required: true + schema: + $ref: '#/definitions/User' + responses: + default: + description: successful operation + /user/createWithArray: + post: + tags: + - user + summary: Creates list of users with given input array + description: '' + operationId: createUsersWithArrayInput + produces: + - application/xml + - application/json + parameters: + - in: body + name: body + description: List of user object + required: true + schema: + type: array + items: + $ref: '#/definitions/User' + responses: + default: + description: successful operation + /user/createWithList: + post: + tags: + - user + summary: Creates list of users with given input array + description: '' + operationId: createUsersWithListInput + produces: + - application/xml + - application/json + parameters: + - in: body + name: body + description: List of user object + required: true + schema: + type: array + items: + $ref: '#/definitions/User' + responses: + default: + description: successful operation + /user/login: + get: + tags: + - user + summary: Logs user into the system + description: '' + operationId: loginUser + produces: + - application/xml + - application/json + parameters: + - name: username + in: query + description: The user name for login + required: true + type: string + - name: password + in: query + description: The password for login in clear text + required: true + type: string + responses: + '200': + description: successful operation + schema: + type: string + headers: + X-Rate-Limit: + type: integer + format: int32 + description: calls per hour allowed by the user + X-Expires-After: + type: string + format: date-time + description: date in UTC when toekn expires + '400': + description: Invalid username/password supplied + /user/logout: + get: + tags: + - user + summary: Logs out current logged in user session + description: '' + operationId: logoutUser + produces: + - application/xml + - application/json + parameters: [] + responses: + default: + description: successful operation + '/user/{username}': + get: + tags: + - user + summary: Get user by user name + description: '' + operationId: getUserByName + produces: + - application/xml + - application/json + parameters: + - name: username + in: path + description: 'The name that needs to be fetched. Use user1 for testing.' + required: true + type: string + responses: + '200': + description: successful operation + schema: + $ref: '#/definitions/User' + '400': + description: Invalid username supplied + '404': + description: User not found + put: + tags: + - user + summary: Updated user + description: This can only be done by the logged in user. + operationId: updateUser + produces: + - application/xml + - application/json + parameters: + - name: username + in: path + description: name that need to be deleted + required: true + type: string + - in: body + name: body + description: Updated user object + required: true + schema: + $ref: '#/definitions/User' + responses: + '400': + description: Invalid user supplied + '404': + description: User not found + delete: + tags: + - user + summary: Delete user + description: This can only be done by the logged in user. + operationId: deleteUser + produces: + - application/xml + - application/json + parameters: + - name: username + in: path + description: The name that needs to be deleted + required: true + type: string + responses: + '400': + description: Invalid username supplied + '404': + description: User not found +securityDefinitions: + petstore_auth: + type: oauth2 + authorizationUrl: 'http://petstore.swagger.io/api/oauth/dialog' + flow: implicit + scopes: + 'write:pets': modify pets in your account + 'read:pets': read your pets + api_key: + type: apiKey + name: api_key + in: header +definitions: + Order: + title: Pet Order + description: An order for a pets from the pet store + type: object + properties: + id: + type: integer + format: int64 + petId: + type: integer + format: int64 + quantity: + type: integer + format: int32 + shipDate: + type: string + format: date-time + status: + type: string + description: Order Status + enum: + - placed + - approved + - delivered + complete: + type: boolean + default: false + xml: + name: Order + Category: + title: Pet category + description: A category for a pet + type: object + properties: + id: + type: integer + format: int64 + name: + type: string + xml: + name: Category + User: + title: a User + description: A User who is purchasing from the pet store + type: object + properties: + id: + type: integer + format: int64 + username: + type: string + firstName: + type: string + lastName: + type: string + email: + type: string + password: + type: string + phone: + type: string + userStatus: + type: integer + format: int32 + description: User Status + xml: + name: User + Tag: + title: Pet Tag + description: A tag for a pet + type: object + properties: + id: + type: integer + format: int64 + name: + type: string + xml: + name: Tag + Pet: + title: a Pet + description: A pet for sale in the pet store + type: object + required: + - name + - photoUrls + properties: + id: + type: integer + format: int64 + category: + $ref: '#/definitions/Category' + name: + type: string + example: doggie + photoUrls: + type: array + xml: + name: photoUrl + wrapped: true + items: + type: string + tags: + type: array + xml: + name: tag + wrapped: true + items: + $ref: '#/definitions/Tag' + status: + type: string + description: pet status in the store + enum: + - available + - pending + - sold + xml: + name: Pet + ApiResponse: + title: An uploaded response + description: Describes the result of uploading an image resource + type: object + properties: + code: + type: integer + format: int32 + type: + type: string + message: + type: string diff --git a/modules/openapi-generator/src/test/resources/2_0/python-client-experimental/petstore-with-fake-endpoints-models-for-testing.yaml b/modules/openapi-generator/src/test/resources/2_0/python-client-experimental/petstore-with-fake-endpoints-models-for-testing.yaml index ba8906a1a2d..cd6d793ec81 100644 --- a/modules/openapi-generator/src/test/resources/2_0/python-client-experimental/petstore-with-fake-endpoints-models-for-testing.yaml +++ b/modules/openapi-generator/src/test/resources/2_0/python-client-experimental/petstore-with-fake-endpoints-models-for-testing.yaml @@ -1356,6 +1356,8 @@ definitions: properties: breed: type: string + additionalProperties: false + additionalProperties: false Cat: allOf: - $ref: '#/definitions/Animal' @@ -1374,6 +1376,7 @@ definitions: color: type: string default: 'red' + additionalProperties: false AnimalFarm: type: array items: @@ -2070,6 +2073,7 @@ definitions: properties: interNet: type: boolean + additionalProperties: false GrandparentAnimal: type: object required: @@ -2102,4 +2106,4 @@ definitions: - type: object properties: lovesRocks: - type: boolean \ No newline at end of file + type: boolean diff --git a/modules/openapi-generator/src/test/resources/3_0/python-experimental/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml b/modules/openapi-generator/src/test/resources/3_0/python-experimental/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml index 9e01283cc8c..6fb6d09416e 100644 --- a/modules/openapi-generator/src/test/resources/3_0/python-experimental/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml +++ b/modules/openapi-generator/src/test/resources/3_0/python-experimental/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml @@ -1252,10 +1252,14 @@ components: description: User Status objectWithNoDeclaredProps: type: object + # Note: the 'additionalProperties' keyword is not specified, which is + # equivalent to allowing undeclared properties of any type. description: test code generation for objects Value must be a map of strings to values. It cannot be the 'null' value. objectWithNoDeclaredPropsNullable: type: object + # Note: the 'additionalProperties' keyword is not specified, which is + # equivalent to allowing undeclared properties of any type. description: test code generation for nullable objects. Value must be a map of strings to values or the 'null' value. nullable: true @@ -1539,6 +1543,24 @@ components: type: object additionalProperties: type: string + anytype_1: {} + map_with_undeclared_properties_anytype_1: + type: object + map_with_undeclared_properties_anytype_2: + type: object + properties: {} + map_with_undeclared_properties_anytype_3: + type: object + additionalProperties: true + empty_map: + type: object + description: an object with no declared properties and no undeclared + properties, hence it's an empty map. + additionalProperties: false + map_with_undeclared_properties_string: + type: object + additionalProperties: + type: string MixedPropertiesAndAdditionalPropertiesClass: type: object properties: @@ -1815,6 +1837,9 @@ components: oneOf: - $ref: '#/components/schemas/apple' - $ref: '#/components/schemas/banana' + # Below additionalProperties is set to false to validate the use + # case when a composed schema has additionalProperties set to false. + additionalProperties: false apple: type: object properties: @@ -1824,6 +1849,7 @@ components: origin: type: string pattern: /^[A-Z\s]*$/i + nullable: true banana: type: object properties: @@ -1833,11 +1859,9 @@ components: oneOf: - $ref: '#/components/schemas/whale' - $ref: '#/components/schemas/zebra' + - $ref: '#/components/schemas/Pig' discriminator: propertyName: className - mapping: - whale: '#/components/schemas/whale' - zebra: '#/components/schemas/zebra' whale: type: object properties: @@ -1862,6 +1886,27 @@ components: type: string required: - className + additionalProperties: true + Pig: + oneOf: + - $ref: '#/components/schemas/BasquePig' + - $ref: '#/components/schemas/DanishPig' + discriminator: + propertyName: className + BasquePig: + type: object + properties: + className: + type: string + required: + - className + DanishPig: + type: object + properties: + className: + type: string + required: + - className gmFruit: properties: color: @@ -1869,11 +1914,13 @@ components: anyOf: - $ref: '#/components/schemas/apple' - $ref: '#/components/schemas/banana' + additionalProperties: false fruitReq: oneOf: - type: 'null' - $ref: '#/components/schemas/appleReq' - $ref: '#/components/schemas/bananaReq' + additionalProperties: false appleReq: type: object properties: @@ -1883,6 +1930,7 @@ components: type: boolean required: - cultivar + additionalProperties: false bananaReq: type: object properties: @@ -1892,6 +1940,7 @@ components: type: boolean required: - lengthCm + additionalProperties: false # go-experimental is unable to make Triangle and Quadrilateral models # correctly https://github.com/OpenAPITools/openapi-generator/issues/6149 Drawing: @@ -1916,6 +1965,11 @@ components: type: array items: $ref: '#/components/schemas/Shape' + additionalProperties: + # Here the additional properties are specified using a referenced schema. + # This is just to validate the generated code works when using $ref + # under 'additionalProperties'. + $ref: '#/components/schemas/fruit' Shape: oneOf: - $ref: '#/components/schemas/Triangle' @@ -1960,6 +2014,8 @@ components: - $ref: '#/components/schemas/ScaleneTriangle' discriminator: propertyName: triangleType + # Note: the 'additionalProperties' keyword is not specified, which is + # equivalent to allowing undeclared properties of any type. EquilateralTriangle: allOf: - $ref: '#/components/schemas/ShapeInterface' @@ -1968,6 +2024,7 @@ components: allOf: - $ref: '#/components/schemas/ShapeInterface' - $ref: '#/components/schemas/TriangleInterface' + additionalProperties: false ScaleneTriangle: allOf: - $ref: '#/components/schemas/ShapeInterface' @@ -1992,26 +2049,23 @@ components: allOf: - $ref: '#/components/schemas/ShapeInterface' - $ref: '#/components/schemas/QuadrilateralInterface' - # The following hierarchy is used to test discriminators - # that require recursive lookups. - biology.Chordate: + GrandparentAnimal: type: object - discriminator: - propertyName: className required: - - className + - pet_type properties: - className: + pet_type: type: string - biology.Reptile: + discriminator: + propertyName: pet_type + ParentPet: + type: object allOf: - - $ref: '#/components/schemas/biology.Chordate' - biology.Mammal: + - $ref: '#/components/schemas/GrandparentAnimal' + ChildCat: allOf: - - $ref: '#/components/schemas/biology.Chordate' - biology.Primate: - allOf: - - $ref: '#/components/schemas/biology.Mammal' - biology.Hominid: - allOf: - - $ref: '#/components/schemas/biology.Primate' + - $ref: '#/components/schemas/ParentPet' + - type: object + properties: + name: + type: string diff --git a/pom.xml b/pom.xml index 6669c8f8185..e88c2f52de6 100644 --- a/pom.xml +++ b/pom.xml @@ -727,18 +727,6 @@ samples/client/petstore/java/okhttp-gson-parcelableModel - - java-client-retrofit - - - env - java - - - - samples/client/petstore/java/retrofit - - java-client-retrofit2 @@ -772,7 +760,7 @@ - samples/client/petstore/java/feign + samples/client/petstore/java/feign10x @@ -1206,6 +1194,7 @@ samples/client/petstore/c samples/client/petstore/cpp-qt5 samples/client/petstore/rust + samples/client/petstore/rust/reqwest/petstore samples/client/petstore/php/OpenAPIClient-php samples/openapi3/client/petstore/php/OpenAPIClient-php @@ -1260,12 +1249,10 @@ samples/client/petstore/scala-httpclient samples/client/petstore/scalaz samples/client/petstore/clojure - samples/client/petstore/java/feign samples/client/petstore/java/feign10x samples/client/petstore/java/jersey1 samples/client/petstore/java/jersey2-java8 samples/client/petstore/java/okhttp-gson - samples/client/petstore/java/retrofit samples/client/petstore/java/retrofit2 samples/client/petstore/java/retrofit2rx samples/client/petstore/java/retrofit2-play25 @@ -1354,10 +1341,8 @@ samples/client/petstore/dart-jaguar/flutter_petstore/openapi samples/client/petstore/scala-akka samples/client/petstore/scala-httpclient - samples/client/petstore/java/feign samples/client/petstore/java/jersey1 samples/client/petstore/java/okhttp-gson - samples/client/petstore/java/retrofit samples/client/petstore/java/retrofit2 samples/client/petstore/java/retrofit2rx samples/client/petstore/jaxrs-cxf-client diff --git a/samples/client/petstore/java/feign/.gitignore b/samples/client/petstore/java/feign/.gitignore deleted file mode 100644 index a530464afa1..00000000000 --- a/samples/client/petstore/java/feign/.gitignore +++ /dev/null @@ -1,21 +0,0 @@ -*.class - -# Mobile Tools for Java (J2ME) -.mtj.tmp/ - -# Package Files # -*.jar -*.war -*.ear - -# exclude jar for gradle wrapper -!gradle/wrapper/*.jar - -# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml -hs_err_pid* - -# build files -**/target -target -.gradle -build diff --git a/samples/client/petstore/java/feign/.openapi-generator/FILES b/samples/client/petstore/java/feign/.openapi-generator/FILES deleted file mode 100644 index 4fa1d13eeb8..00000000000 --- a/samples/client/petstore/java/feign/.openapi-generator/FILES +++ /dev/null @@ -1,81 +0,0 @@ -.gitignore -.openapi-generator-ignore -.travis.yml -README.md -api/openapi.yaml -build.gradle -build.sbt -git_push.sh -gradle.properties -gradle/wrapper/gradle-wrapper.jar -gradle/wrapper/gradle-wrapper.properties -gradlew -gradlew.bat -pom.xml -settings.gradle -src/main/AndroidManifest.xml -src/main/java/org/openapitools/client/ApiClient.java -src/main/java/org/openapitools/client/CustomInstantDeserializer.java -src/main/java/org/openapitools/client/EncodingUtils.java -src/main/java/org/openapitools/client/ParamExpander.java -src/main/java/org/openapitools/client/RFC3339DateFormat.java -src/main/java/org/openapitools/client/ServerConfiguration.java -src/main/java/org/openapitools/client/ServerVariable.java -src/main/java/org/openapitools/client/StringUtil.java -src/main/java/org/openapitools/client/api/AnotherFakeApi.java -src/main/java/org/openapitools/client/api/FakeApi.java -src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java -src/main/java/org/openapitools/client/api/PetApi.java -src/main/java/org/openapitools/client/api/StoreApi.java -src/main/java/org/openapitools/client/api/UserApi.java -src/main/java/org/openapitools/client/auth/ApiKeyAuth.java -src/main/java/org/openapitools/client/auth/HttpBasicAuth.java -src/main/java/org/openapitools/client/auth/HttpBearerAuth.java -src/main/java/org/openapitools/client/auth/OAuth.java -src/main/java/org/openapitools/client/auth/OAuthFlow.java -src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java -src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java -src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java -src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java -src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java -src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java -src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java -src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java -src/main/java/org/openapitools/client/model/Animal.java -src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java -src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java -src/main/java/org/openapitools/client/model/ArrayTest.java -src/main/java/org/openapitools/client/model/BigCat.java -src/main/java/org/openapitools/client/model/BigCatAllOf.java -src/main/java/org/openapitools/client/model/Capitalization.java -src/main/java/org/openapitools/client/model/Cat.java -src/main/java/org/openapitools/client/model/CatAllOf.java -src/main/java/org/openapitools/client/model/Category.java -src/main/java/org/openapitools/client/model/ClassModel.java -src/main/java/org/openapitools/client/model/Client.java -src/main/java/org/openapitools/client/model/Dog.java -src/main/java/org/openapitools/client/model/DogAllOf.java -src/main/java/org/openapitools/client/model/EnumArrays.java -src/main/java/org/openapitools/client/model/EnumClass.java -src/main/java/org/openapitools/client/model/EnumTest.java -src/main/java/org/openapitools/client/model/FileSchemaTestClass.java -src/main/java/org/openapitools/client/model/FormatTest.java -src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java -src/main/java/org/openapitools/client/model/MapTest.java -src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java -src/main/java/org/openapitools/client/model/Model200Response.java -src/main/java/org/openapitools/client/model/ModelApiResponse.java -src/main/java/org/openapitools/client/model/ModelReturn.java -src/main/java/org/openapitools/client/model/Name.java -src/main/java/org/openapitools/client/model/NumberOnly.java -src/main/java/org/openapitools/client/model/Order.java -src/main/java/org/openapitools/client/model/OuterComposite.java -src/main/java/org/openapitools/client/model/OuterEnum.java -src/main/java/org/openapitools/client/model/Pet.java -src/main/java/org/openapitools/client/model/ReadOnlyFirst.java -src/main/java/org/openapitools/client/model/SpecialModelName.java -src/main/java/org/openapitools/client/model/Tag.java -src/main/java/org/openapitools/client/model/TypeHolderDefault.java -src/main/java/org/openapitools/client/model/TypeHolderExample.java -src/main/java/org/openapitools/client/model/User.java -src/main/java/org/openapitools/client/model/XmlItem.java diff --git a/samples/client/petstore/java/feign/.travis.yml b/samples/client/petstore/java/feign/.travis.yml deleted file mode 100644 index e3bdf2af1be..00000000000 --- a/samples/client/petstore/java/feign/.travis.yml +++ /dev/null @@ -1,22 +0,0 @@ -# -# Generated by OpenAPI Generator: https://openapi-generator.tech -# -# Ref: https://docs.travis-ci.com/user/languages/java/ -# -language: java -jdk: - - openjdk12 - - openjdk11 - - openjdk10 - - openjdk9 - - openjdk8 -before_install: - # ensure gradlew has proper permission - - chmod a+x ./gradlew -script: - # test using maven - #- mvn test - # test using gradle - - gradle test - # test using sbt - # - sbt test diff --git a/samples/client/petstore/java/feign/README.md b/samples/client/petstore/java/feign/README.md deleted file mode 100644 index 646dfdc4e2b..00000000000 --- a/samples/client/petstore/java/feign/README.md +++ /dev/null @@ -1,43 +0,0 @@ -# petstore-feign - -## Requirements - -Building the API client library requires [Maven](https://maven.apache.org/) to be installed. - -## Installation & Usage - -To install the API client library to your local Maven repository, simply execute: - -```shell -mvn install -``` - -To deploy it to a remote Maven repository instead, configure the settings of the repository and execute: - -```shell -mvn deploy -``` - -Refer to the [official documentation](https://maven.apache.org/plugins/maven-deploy-plugin/usage.html) for more information. - -After the client library is installed/deployed, you can use it in your Maven project by adding the following to your *pom.xml*: - -```xml - - org.openapitools - petstore-feign - 1.0.0 - compile - - -``` - -## Recommendation - -It's recommended to create an instance of `ApiClient` per thread in a multithreaded environment to avoid any potential issues. - -## Author - - - - diff --git a/samples/client/petstore/java/feign/api/openapi.yaml b/samples/client/petstore/java/feign/api/openapi.yaml deleted file mode 100644 index a49359fd348..00000000000 --- a/samples/client/petstore/java/feign/api/openapi.yaml +++ /dev/null @@ -1,2187 +0,0 @@ -openapi: 3.0.1 -info: - 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: - " \' - license: - name: Apache-2.0 - url: https://www.apache.org/licenses/LICENSE-2.0.html - title: OpenAPI Petstore - version: 1.0.0 -servers: -- url: http://petstore.swagger.io:80/v2 -tags: -- description: Everything about your Pets - name: pet -- description: Access to Petstore orders - name: store -- description: Operations about user - name: user -paths: - /pet: - post: - operationId: addPet - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/Pet' - application/xml: - schema: - $ref: '#/components/schemas/Pet' - description: Pet object that needs to be added to the store - required: true - responses: - "200": - content: {} - description: successful operation - "405": - content: {} - description: Invalid input - security: - - petstore_auth: - - write:pets - - read:pets - summary: Add a new pet to the store - tags: - - pet - x-codegen-request-body-name: body - x-contentType: application/json - x-accepts: application/json - put: - operationId: updatePet - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/Pet' - application/xml: - schema: - $ref: '#/components/schemas/Pet' - description: Pet object that needs to be added to the store - required: true - responses: - "200": - content: {} - description: successful operation - "400": - content: {} - description: Invalid ID supplied - "404": - content: {} - description: Pet not found - "405": - content: {} - description: Validation exception - security: - - petstore_auth: - - write:pets - - read:pets - summary: Update an existing pet - tags: - - pet - x-codegen-request-body-name: body - x-contentType: application/json - x-accepts: application/json - /pet/findByStatus: - get: - description: Multiple status values can be provided with comma separated strings - operationId: findPetsByStatus - parameters: - - description: Status values that need to be considered for filter - explode: false - in: query - name: status - required: true - schema: - items: - default: available - enum: - - available - - pending - - sold - type: string - type: array - style: form - responses: - "200": - content: - application/xml: - schema: - items: - $ref: '#/components/schemas/Pet' - type: array - application/json: - schema: - items: - $ref: '#/components/schemas/Pet' - type: array - description: successful operation - "400": - content: {} - description: Invalid status value - security: - - petstore_auth: - - write:pets - - read:pets - summary: Finds Pets by status - tags: - - pet - x-accepts: application/json - /pet/findByTags: - get: - deprecated: true - description: Multiple tags can be provided with comma separated strings. Use - tag1, tag2, tag3 for testing. - operationId: findPetsByTags - parameters: - - description: Tags to filter by - explode: false - in: query - name: tags - required: true - schema: - items: - type: string - type: array - uniqueItems: true - style: form - responses: - "200": - content: - application/xml: - schema: - items: - $ref: '#/components/schemas/Pet' - type: array - uniqueItems: true - application/json: - schema: - items: - $ref: '#/components/schemas/Pet' - type: array - uniqueItems: true - description: successful operation - "400": - content: {} - description: Invalid tag value - security: - - petstore_auth: - - write:pets - - read:pets - summary: Finds Pets by tags - tags: - - pet - x-accepts: application/json - /pet/{petId}: - delete: - operationId: deletePet - parameters: - - in: header - name: api_key - schema: - type: string - - description: Pet id to delete - in: path - name: petId - required: true - schema: - format: int64 - type: integer - responses: - "200": - content: {} - description: successful operation - "400": - content: {} - description: Invalid pet value - security: - - petstore_auth: - - write:pets - - read:pets - summary: Deletes a pet - tags: - - pet - x-accepts: application/json - get: - description: Returns a single pet - operationId: getPetById - parameters: - - description: ID of pet to return - in: path - name: petId - required: true - schema: - format: int64 - type: integer - responses: - "200": - content: - application/xml: - schema: - $ref: '#/components/schemas/Pet' - application/json: - schema: - $ref: '#/components/schemas/Pet' - description: successful operation - "400": - content: {} - description: Invalid ID supplied - "404": - content: {} - description: Pet not found - security: - - api_key: [] - summary: Find pet by ID - tags: - - pet - x-accepts: application/json - post: - operationId: updatePetWithForm - parameters: - - description: ID of pet that needs to be updated - in: path - name: petId - required: true - schema: - format: int64 - type: integer - requestBody: - content: - application/x-www-form-urlencoded: - schema: - properties: - name: - description: Updated name of the pet - type: string - status: - description: Updated status of the pet - type: string - responses: - "405": - content: {} - description: Invalid input - security: - - petstore_auth: - - write:pets - - read:pets - summary: Updates a pet in the store with form data - tags: - - pet - x-contentType: application/x-www-form-urlencoded - x-accepts: application/json - /pet/{petId}/uploadImage: - post: - operationId: uploadFile - parameters: - - description: ID of pet to update - in: path - name: petId - required: true - schema: - format: int64 - type: integer - requestBody: - content: - multipart/form-data: - schema: - properties: - additionalMetadata: - description: Additional data to pass to server - type: string - file: - description: file to upload - format: binary - type: string - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/ApiResponse' - description: successful operation - security: - - petstore_auth: - - write:pets - - read:pets - summary: uploads an image - tags: - - pet - x-contentType: multipart/form-data - x-accepts: application/json - /store/inventory: - get: - description: Returns a map of status codes to quantities - operationId: getInventory - responses: - "200": - content: - application/json: - schema: - additionalProperties: - format: int32 - type: integer - type: object - description: successful operation - security: - - api_key: [] - summary: Returns pet inventories by status - tags: - - store - x-accepts: application/json - /store/order: - post: - operationId: placeOrder - requestBody: - content: - '*/*': - schema: - $ref: '#/components/schemas/Order' - description: order placed for purchasing the pet - required: true - responses: - "200": - content: - application/xml: - schema: - $ref: '#/components/schemas/Order' - application/json: - schema: - $ref: '#/components/schemas/Order' - description: successful operation - "400": - content: {} - description: Invalid Order - summary: Place an order for a pet - tags: - - store - x-codegen-request-body-name: body - x-contentType: '*/*' - x-accepts: application/json - /store/order/{order_id}: - delete: - description: For valid response try integer IDs with value < 1000. Anything - above 1000 or nonintegers will generate API errors - operationId: deleteOrder - parameters: - - description: ID of the order that needs to be deleted - in: path - name: order_id - required: true - schema: - type: string - responses: - "400": - content: {} - description: Invalid ID supplied - "404": - content: {} - description: Order not found - summary: Delete purchase order by ID - tags: - - store - x-accepts: application/json - get: - description: For valid response try integer IDs with value <= 5 or > 10. Other - values will generated exceptions - operationId: getOrderById - parameters: - - description: ID of pet that needs to be fetched - in: path - name: order_id - required: true - schema: - format: int64 - maximum: 5 - minimum: 1 - type: integer - responses: - "200": - content: - application/xml: - schema: - $ref: '#/components/schemas/Order' - application/json: - schema: - $ref: '#/components/schemas/Order' - description: successful operation - "400": - content: {} - description: Invalid ID supplied - "404": - content: {} - description: Order not found - summary: Find purchase order by ID - tags: - - store - x-accepts: application/json - /user: - post: - description: This can only be done by the logged in user. - operationId: createUser - requestBody: - content: - '*/*': - schema: - $ref: '#/components/schemas/User' - description: Created user object - required: true - responses: - default: - content: {} - description: successful operation - summary: Create user - tags: - - user - x-codegen-request-body-name: body - x-contentType: '*/*' - x-accepts: application/json - /user/createWithArray: - post: - operationId: createUsersWithArrayInput - requestBody: - content: - '*/*': - schema: - items: - $ref: '#/components/schemas/User' - type: array - description: List of user object - required: true - responses: - default: - content: {} - description: successful operation - summary: Creates list of users with given input array - tags: - - user - x-codegen-request-body-name: body - x-contentType: '*/*' - x-accepts: application/json - /user/createWithList: - post: - operationId: createUsersWithListInput - requestBody: - content: - '*/*': - schema: - items: - $ref: '#/components/schemas/User' - type: array - description: List of user object - required: true - responses: - default: - content: {} - description: successful operation - summary: Creates list of users with given input array - tags: - - user - x-codegen-request-body-name: body - x-contentType: '*/*' - x-accepts: application/json - /user/login: - get: - operationId: loginUser - parameters: - - description: The user name for login - in: query - name: username - required: true - schema: - type: string - - description: The password for login in clear text - in: query - name: password - required: true - schema: - type: string - responses: - "200": - content: - application/xml: - schema: - type: string - application/json: - schema: - type: string - description: successful operation - headers: - X-Rate-Limit: - description: calls per hour allowed by the user - schema: - format: int32 - type: integer - X-Expires-After: - description: date in UTC when token expires - schema: - format: date-time - type: string - "400": - content: {} - description: Invalid username/password supplied - summary: Logs user into the system - tags: - - user - x-accepts: application/json - /user/logout: - get: - operationId: logoutUser - responses: - default: - content: {} - description: successful operation - summary: Logs out current logged in user session - tags: - - user - x-accepts: application/json - /user/{username}: - delete: - description: This can only be done by the logged in user. - operationId: deleteUser - parameters: - - description: The name that needs to be deleted - in: path - name: username - required: true - schema: - type: string - responses: - "400": - content: {} - description: Invalid username supplied - "404": - content: {} - description: User not found - summary: Delete user - tags: - - user - x-accepts: application/json - get: - operationId: getUserByName - parameters: - - description: The name that needs to be fetched. Use user1 for testing. - in: path - name: username - required: true - schema: - type: string - responses: - "200": - content: - application/xml: - schema: - $ref: '#/components/schemas/User' - application/json: - schema: - $ref: '#/components/schemas/User' - description: successful operation - "400": - content: {} - description: Invalid username supplied - "404": - content: {} - description: User not found - summary: Get user by user name - tags: - - user - x-accepts: application/json - put: - description: This can only be done by the logged in user. - operationId: updateUser - parameters: - - description: name that need to be deleted - in: path - name: username - required: true - schema: - type: string - requestBody: - content: - '*/*': - schema: - $ref: '#/components/schemas/User' - description: Updated user object - required: true - responses: - "400": - content: {} - description: Invalid user supplied - "404": - content: {} - description: User not found - summary: Updated user - tags: - - user - x-codegen-request-body-name: body - x-contentType: '*/*' - x-accepts: application/json - /fake_classname_test: - patch: - description: To test class name in snake case - operationId: testClassname - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/Client' - description: client model - required: true - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/Client' - description: successful operation - security: - - api_key_query: [] - summary: To test class name in snake case - tags: - - fake_classname_tags 123#$%^ - x-codegen-request-body-name: body - x-contentType: application/json - x-accepts: application/json - /fake: - delete: - description: Fake endpoint to test group parameters (optional) - operationId: testGroupParameters - parameters: - - description: Required String in group parameters - in: query - name: required_string_group - required: true - schema: - type: integer - - description: Required Boolean in group parameters - in: header - name: required_boolean_group - required: true - schema: - type: boolean - - description: Required Integer in group parameters - in: query - name: required_int64_group - required: true - schema: - format: int64 - type: integer - - description: String in group parameters - in: query - name: string_group - schema: - type: integer - - description: Boolean in group parameters - in: header - name: boolean_group - schema: - type: boolean - - description: Integer in group parameters - in: query - name: int64_group - schema: - format: int64 - type: integer - responses: - "400": - content: {} - description: Someting wrong - summary: Fake endpoint to test group parameters (optional) - tags: - - fake - x-group-parameters: true - x-accepts: application/json - get: - description: To test enum parameters - operationId: testEnumParameters - parameters: - - description: Header parameter enum test (string array) - explode: false - in: header - name: enum_header_string_array - schema: - items: - default: $ - enum: - - '>' - - $ - type: string - type: array - style: simple - - description: Header parameter enum test (string) - in: header - name: enum_header_string - schema: - default: -efg - enum: - - _abc - - -efg - - (xyz) - type: string - - description: Query parameter enum test (string array) - explode: false - in: query - name: enum_query_string_array - schema: - items: - default: $ - enum: - - '>' - - $ - type: string - type: array - style: form - - description: Query parameter enum test (string) - in: query - name: enum_query_string - schema: - default: -efg - enum: - - _abc - - -efg - - (xyz) - type: string - - description: Query parameter enum test (double) - in: query - name: enum_query_integer - schema: - enum: - - 1 - - -2 - format: int32 - type: integer - - description: Query parameter enum test (double) - in: query - name: enum_query_double - schema: - enum: - - 1.1 - - -1.2 - format: double - type: number - requestBody: - content: - application/x-www-form-urlencoded: - schema: - properties: - enum_form_string_array: - description: Form parameter enum test (string array) - items: - default: $ - enum: - - '>' - - $ - type: string - type: array - enum_form_string: - default: -efg - description: Form parameter enum test (string) - enum: - - _abc - - -efg - - (xyz) - type: string - responses: - "400": - content: {} - description: Invalid request - "404": - content: {} - description: Not found - summary: To test enum parameters - tags: - - fake - x-contentType: application/x-www-form-urlencoded - x-accepts: application/json - patch: - description: To test "client" model - operationId: testClientModel - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/Client' - description: client model - required: true - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/Client' - description: successful operation - summary: To test "client" model - tags: - - fake - x-codegen-request-body-name: body - x-contentType: application/json - x-accepts: application/json - post: - description: |- - Fake endpoint for testing various parameters - 假端點 - 偽のエンドポイント - 가짜 엔드 포인트 - operationId: testEndpointParameters - requestBody: - content: - application/x-www-form-urlencoded: - schema: - properties: - integer: - description: None - format: int32 - maximum: 100 - minimum: 10 - type: integer - int32: - description: None - format: int32 - maximum: 200 - minimum: 20 - type: integer - int64: - description: None - format: int64 - type: integer - number: - description: None - maximum: 543.2 - minimum: 32.1 - type: number - float: - description: None - format: float - maximum: 987.6 - type: number - double: - description: None - format: double - maximum: 123.4 - minimum: 67.8 - type: number - string: - description: None - pattern: /[a-z]/i - type: string - pattern_without_delimiter: - description: None - pattern: ^[A-Z].* - type: string - byte: - description: None - format: byte - type: string - binary: - description: None - format: binary - type: string - date: - description: None - format: date - type: string - dateTime: - description: None - format: date-time - type: string - password: - description: None - format: password - maxLength: 64 - minLength: 10 - type: string - callback: - description: None - type: string - required: - - byte - - double - - number - - pattern_without_delimiter - required: true - responses: - "400": - content: {} - description: Invalid username supplied - "404": - content: {} - description: User not found - security: - - http_basic_test: [] - summary: |- - Fake endpoint for testing various parameters - 假端點 - 偽のエンドポイント - 가짜 엔드 포인트 - tags: - - fake - x-contentType: application/x-www-form-urlencoded - x-accepts: application/json - /fake/outer/number: - post: - description: Test serialization of outer number types - operationId: fakeOuterNumberSerialize - requestBody: - content: - '*/*': - schema: - $ref: '#/components/schemas/OuterNumber' - description: Input number as post body - required: false - responses: - "200": - content: - '*/*': - schema: - $ref: '#/components/schemas/OuterNumber' - description: Output number - tags: - - fake - x-codegen-request-body-name: body - x-contentType: '*/*' - x-accepts: '*/*' - /fake/outer/string: - post: - description: Test serialization of outer string types - operationId: fakeOuterStringSerialize - requestBody: - content: - '*/*': - schema: - $ref: '#/components/schemas/OuterString' - description: Input string as post body - required: false - responses: - "200": - content: - '*/*': - schema: - $ref: '#/components/schemas/OuterString' - description: Output string - tags: - - fake - x-codegen-request-body-name: body - x-contentType: '*/*' - x-accepts: '*/*' - /fake/outer/boolean: - post: - description: Test serialization of outer boolean types - operationId: fakeOuterBooleanSerialize - requestBody: - content: - '*/*': - schema: - $ref: '#/components/schemas/OuterBoolean' - description: Input boolean as post body - required: false - responses: - "200": - content: - '*/*': - schema: - $ref: '#/components/schemas/OuterBoolean' - description: Output boolean - tags: - - fake - x-codegen-request-body-name: body - x-contentType: '*/*' - x-accepts: '*/*' - /fake/outer/composite: - post: - description: Test serialization of object with outer number type - operationId: fakeOuterCompositeSerialize - requestBody: - content: - '*/*': - schema: - $ref: '#/components/schemas/OuterComposite' - description: Input composite as post body - required: false - responses: - "200": - content: - '*/*': - schema: - $ref: '#/components/schemas/OuterComposite' - description: Output composite - tags: - - fake - x-codegen-request-body-name: body - x-contentType: '*/*' - x-accepts: '*/*' - /fake/jsonFormData: - get: - operationId: testJsonFormData - requestBody: - content: - application/x-www-form-urlencoded: - schema: - properties: - param: - description: field1 - type: string - param2: - description: field2 - type: string - required: - - param - - param2 - required: true - responses: - "200": - content: {} - description: successful operation - summary: test json serialization of form data - tags: - - fake - x-contentType: application/x-www-form-urlencoded - x-accepts: application/json - /fake/inline-additionalProperties: - post: - operationId: testInlineAdditionalProperties - requestBody: - content: - application/json: - schema: - additionalProperties: - type: string - type: object - description: request body - required: true - responses: - "200": - content: {} - description: successful operation - summary: test inline additionalProperties - tags: - - fake - x-codegen-request-body-name: param - x-contentType: application/json - x-accepts: application/json - /fake/body-with-query-params: - put: - operationId: testBodyWithQueryParams - parameters: - - in: query - name: query - required: true - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/User' - required: true - responses: - "200": - content: {} - description: Success - tags: - - fake - x-codegen-request-body-name: body - x-contentType: application/json - x-accepts: application/json - /fake/create_xml_item: - post: - description: this route creates an XmlItem - operationId: createXmlItem - requestBody: - content: - application/xml: - schema: - $ref: '#/components/schemas/XmlItem' - application/xml; charset=utf-8: - schema: - $ref: '#/components/schemas/XmlItem' - application/xml; charset=utf-16: - schema: - $ref: '#/components/schemas/XmlItem' - text/xml: - schema: - $ref: '#/components/schemas/XmlItem' - text/xml; charset=utf-8: - schema: - $ref: '#/components/schemas/XmlItem' - text/xml; charset=utf-16: - schema: - $ref: '#/components/schemas/XmlItem' - description: XmlItem Body - required: true - responses: - "200": - content: {} - description: successful operation - summary: creates an XmlItem - tags: - - fake - x-codegen-request-body-name: XmlItem - x-contentType: application/xml - x-accepts: application/json - /another-fake/dummy: - patch: - description: To test special tags and operation ID starting with number - operationId: 123_test_@#$%_special_tags - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/Client' - description: client model - required: true - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/Client' - description: successful operation - summary: To test special tags - tags: - - $another-fake? - x-codegen-request-body-name: body - x-contentType: application/json - x-accepts: application/json - /fake/body-with-file-schema: - put: - description: For this test, the body for this request much reference a schema - named `File`. - operationId: testBodyWithFileSchema - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/FileSchemaTestClass' - required: true - responses: - "200": - content: {} - description: Success - tags: - - fake - x-codegen-request-body-name: body - x-contentType: application/json - x-accepts: application/json - /fake/test-query-paramters: - put: - description: To test the collection format in query parameters - operationId: testQueryParameterCollectionFormat - parameters: - - explode: false - in: query - name: pipe - required: true - schema: - items: - type: string - type: array - style: form - - in: query - name: ioutil - required: true - schema: - items: - type: string - type: array - - in: query - name: http - required: true - schema: - items: - type: string - type: array - style: spaceDelimited - - explode: false - in: query - name: url - required: true - schema: - items: - type: string - type: array - style: form - - explode: true - in: query - name: context - required: true - schema: - items: - type: string - type: array - style: form - responses: - "200": - content: {} - description: Success - tags: - - fake - x-accepts: application/json - /fake/{petId}/uploadImageWithRequiredFile: - post: - operationId: uploadFileWithRequiredFile - parameters: - - description: ID of pet to update - in: path - name: petId - required: true - schema: - format: int64 - type: integer - requestBody: - content: - multipart/form-data: - schema: - properties: - additionalMetadata: - description: Additional data to pass to server - type: string - requiredFile: - description: file to upload - format: binary - type: string - required: - - requiredFile - required: true - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/ApiResponse' - description: successful operation - security: - - petstore_auth: - - write:pets - - read:pets - summary: uploads an image (required) - tags: - - pet - x-contentType: multipart/form-data - x-accepts: application/json -components: - schemas: - Order: - example: - petId: 6 - quantity: 1 - id: 0 - shipDate: 2000-01-23T04:56:07.000+00:00 - complete: false - status: placed - properties: - id: - format: int64 - type: integer - petId: - format: int64 - type: integer - quantity: - format: int32 - type: integer - shipDate: - format: date-time - type: string - status: - description: Order Status - enum: - - placed - - approved - - delivered - type: string - complete: - default: false - type: boolean - type: object - xml: - name: Order - Category: - example: - name: default-name - id: 6 - properties: - id: - format: int64 - type: integer - name: - default: default-name - type: string - required: - - name - type: object - xml: - name: Category - User: - example: - firstName: firstName - lastName: lastName - password: password - userStatus: 6 - phone: phone - id: 0 - email: email - username: username - properties: - id: - format: int64 - type: integer - x-is-unique: true - username: - type: string - firstName: - type: string - lastName: - type: string - email: - type: string - password: - type: string - phone: - type: string - userStatus: - description: User Status - format: int32 - type: integer - type: object - xml: - name: User - Tag: - example: - name: name - id: 1 - properties: - id: - format: int64 - type: integer - name: - type: string - type: object - xml: - name: Tag - Pet: - example: - photoUrls: - - photoUrls - - photoUrls - name: doggie - id: 0 - category: - name: default-name - id: 6 - tags: - - name: name - id: 1 - - name: name - id: 1 - status: available - properties: - id: - format: int64 - type: integer - x-is-unique: true - category: - $ref: '#/components/schemas/Category' - name: - example: doggie - type: string - photoUrls: - items: - type: string - type: array - uniqueItems: true - xml: - name: photoUrl - wrapped: true - tags: - items: - $ref: '#/components/schemas/Tag' - type: array - xml: - name: tag - wrapped: true - status: - description: pet status in the store - enum: - - available - - pending - - sold - type: string - required: - - name - - photoUrls - type: object - xml: - name: Pet - ApiResponse: - example: - code: 0 - type: type - message: message - properties: - code: - format: int32 - type: integer - type: - type: string - message: - type: string - type: object - $special[model.name]: - properties: - $special[property.name]: - format: int64 - type: integer - type: object - xml: - name: $special[model.name] - Return: - description: Model for testing reserved words - properties: - return: - format: int32 - type: integer - type: object - xml: - name: Return - Name: - description: Model for testing model name same as property name - properties: - name: - format: int32 - type: integer - snake_case: - format: int32 - readOnly: true - type: integer - property: - type: string - "123Number": - readOnly: true - type: integer - required: - - name - type: object - xml: - name: Name - "200_response": - description: Model for testing model name starting with number - properties: - name: - format: int32 - type: integer - class: - type: string - type: object - xml: - name: Name - ClassModel: - description: Model for testing model with "_class" property - properties: - _class: - type: string - type: object - Dog: - allOf: - - $ref: '#/components/schemas/Animal' - - $ref: '#/components/schemas/Dog_allOf' - Cat: - allOf: - - $ref: '#/components/schemas/Animal' - - $ref: '#/components/schemas/Cat_allOf' - BigCat: - allOf: - - $ref: '#/components/schemas/Cat' - - $ref: '#/components/schemas/BigCat_allOf' - Animal: - discriminator: - propertyName: className - properties: - className: - type: string - color: - default: red - type: string - required: - - className - type: object - AnimalFarm: - items: - $ref: '#/components/schemas/Animal' - type: array - format_test: - properties: - integer: - maximum: 1E+2 - minimum: 1E+1 - type: integer - int32: - format: int32 - maximum: 2E+2 - minimum: 2E+1 - type: integer - int64: - format: int64 - type: integer - number: - maximum: 543.2 - minimum: 32.1 - type: number - float: - format: float - maximum: 987.6 - minimum: 54.3 - type: number - double: - format: double - maximum: 123.4 - minimum: 67.8 - type: number - string: - pattern: /[a-z]/i - type: string - byte: - format: byte - pattern: ^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$ - type: string - binary: - format: binary - type: string - date: - format: date - type: string - dateTime: - format: date-time - type: string - uuid: - example: 72f98069-206d-4f12-9f12-3d1e525a8e84 - format: uuid - type: string - password: - format: password - maxLength: 64 - minLength: 10 - type: string - BigDecimal: - format: number - type: string - required: - - byte - - date - - number - - password - type: object - EnumClass: - default: -efg - enum: - - _abc - - -efg - - (xyz) - type: string - Enum_Test: - properties: - enum_string: - enum: - - UPPER - - lower - - "" - type: string - enum_string_required: - enum: - - UPPER - - lower - - "" - type: string - enum_integer: - enum: - - 1 - - -1 - format: int32 - type: integer - enum_number: - enum: - - 1.1 - - -1.2 - format: double - type: number - outerEnum: - $ref: '#/components/schemas/OuterEnum' - required: - - enum_string_required - type: object - AdditionalPropertiesClass: - properties: - map_string: - additionalProperties: - type: string - type: object - map_number: - additionalProperties: - type: number - type: object - map_integer: - additionalProperties: - type: integer - type: object - map_boolean: - additionalProperties: - type: boolean - type: object - map_array_integer: - additionalProperties: - items: - type: integer - type: array - type: object - map_array_anytype: - additionalProperties: - items: - properties: {} - type: object - type: array - type: object - map_map_string: - additionalProperties: - additionalProperties: - type: string - type: object - type: object - map_map_anytype: - additionalProperties: - additionalProperties: - properties: {} - type: object - type: object - type: object - anytype_1: - properties: {} - type: object - anytype_2: - type: object - anytype_3: - properties: {} - type: object - type: object - AdditionalPropertiesString: - additionalProperties: - type: string - properties: - name: - type: string - type: object - AdditionalPropertiesInteger: - additionalProperties: - type: integer - properties: - name: - type: string - type: object - AdditionalPropertiesNumber: - additionalProperties: - type: number - properties: - name: - type: string - type: object - AdditionalPropertiesBoolean: - additionalProperties: - type: boolean - properties: - name: - type: string - type: object - AdditionalPropertiesArray: - additionalProperties: - items: - properties: {} - type: object - type: array - properties: - name: - type: string - type: object - AdditionalPropertiesObject: - additionalProperties: - additionalProperties: - properties: {} - type: object - type: object - properties: - name: - type: string - type: object - AdditionalPropertiesAnyType: - additionalProperties: - properties: {} - type: object - properties: - name: - type: string - type: object - MixedPropertiesAndAdditionalPropertiesClass: - properties: - uuid: - format: uuid - type: string - dateTime: - format: date-time - type: string - map: - additionalProperties: - $ref: '#/components/schemas/Animal' - type: object - type: object - List: - properties: - "123-list": - type: string - type: object - Client: - example: - client: client - properties: - client: - type: string - type: object - ReadOnlyFirst: - properties: - bar: - readOnly: true - type: string - baz: - type: string - type: object - hasOnlyReadOnly: - properties: - bar: - readOnly: true - type: string - foo: - readOnly: true - type: string - type: object - Capitalization: - properties: - smallCamel: - type: string - CapitalCamel: - type: string - small_Snake: - type: string - Capital_Snake: - type: string - SCA_ETH_Flow_Points: - type: string - ATT_NAME: - description: | - Name of the pet - type: string - type: object - MapTest: - properties: - map_map_of_string: - additionalProperties: - additionalProperties: - type: string - type: object - type: object - map_of_enum_string: - additionalProperties: - enum: - - UPPER - - lower - type: string - type: object - direct_map: - additionalProperties: - type: boolean - type: object - indirect_map: - additionalProperties: - type: boolean - type: object - type: object - ArrayTest: - properties: - array_of_string: - items: - type: string - type: array - array_array_of_integer: - items: - items: - format: int64 - type: integer - type: array - type: array - array_array_of_model: - items: - items: - $ref: '#/components/schemas/ReadOnlyFirst' - type: array - type: array - type: object - NumberOnly: - properties: - JustNumber: - type: number - type: object - ArrayOfNumberOnly: - properties: - ArrayNumber: - items: - type: number - type: array - type: object - ArrayOfArrayOfNumberOnly: - properties: - ArrayArrayNumber: - items: - items: - type: number - type: array - type: array - type: object - EnumArrays: - properties: - just_symbol: - enum: - - '>=' - - $ - type: string - array_enum: - items: - enum: - - fish - - crab - type: string - type: array - type: object - OuterEnum: - enum: - - placed - - approved - - delivered - type: string - OuterComposite: - example: - my_string: my_string - my_number: 0.8008281904610115 - my_boolean: true - properties: - my_number: - type: number - my_string: - type: string - my_boolean: - type: boolean - x-codegen-body-parameter-name: boolean_post_body - type: object - OuterNumber: - type: number - OuterString: - type: string - OuterBoolean: - type: boolean - x-codegen-body-parameter-name: boolean_post_body - StringBooleanMap: - additionalProperties: - type: boolean - type: object - FileSchemaTestClass: - example: - file: - sourceURI: sourceURI - files: - - sourceURI: sourceURI - - sourceURI: sourceURI - properties: - file: - $ref: '#/components/schemas/File' - files: - items: - $ref: '#/components/schemas/File' - type: array - type: object - File: - description: Must be named `File` for test. - example: - sourceURI: sourceURI - properties: - sourceURI: - description: Test capitalization - type: string - type: object - TypeHolderDefault: - properties: - string_item: - default: what - type: string - number_item: - type: number - integer_item: - type: integer - bool_item: - default: true - type: boolean - array_item: - items: - type: integer - type: array - required: - - array_item - - bool_item - - integer_item - - number_item - - string_item - type: object - TypeHolderExample: - properties: - string_item: - example: what - type: string - number_item: - example: 1.234 - type: number - float_item: - example: 1.234 - format: float - type: number - integer_item: - example: -2 - type: integer - bool_item: - example: true - type: boolean - array_item: - example: - - 0 - - 1 - - 2 - - 3 - items: - type: integer - type: array - required: - - array_item - - bool_item - - float_item - - integer_item - - number_item - - string_item - type: object - XmlItem: - properties: - attribute_string: - example: string - type: string - xml: - attribute: true - attribute_number: - example: 1.234 - type: number - xml: - attribute: true - attribute_integer: - example: -2 - type: integer - xml: - attribute: true - attribute_boolean: - example: true - type: boolean - xml: - attribute: true - wrapped_array: - items: - type: integer - type: array - xml: - wrapped: true - name_string: - example: string - type: string - xml: - name: xml_name_string - name_number: - example: 1.234 - type: number - xml: - name: xml_name_number - name_integer: - example: -2 - type: integer - xml: - name: xml_name_integer - name_boolean: - example: true - type: boolean - xml: - name: xml_name_boolean - name_array: - items: - type: integer - xml: - name: xml_name_array_item - type: array - name_wrapped_array: - items: - type: integer - xml: - name: xml_name_wrapped_array_item - type: array - xml: - name: xml_name_wrapped_array - wrapped: true - prefix_string: - example: string - type: string - xml: - prefix: ab - prefix_number: - example: 1.234 - type: number - xml: - prefix: cd - prefix_integer: - example: -2 - type: integer - xml: - prefix: ef - prefix_boolean: - example: true - type: boolean - xml: - prefix: gh - prefix_array: - items: - type: integer - xml: - prefix: ij - type: array - prefix_wrapped_array: - items: - type: integer - xml: - prefix: mn - type: array - xml: - prefix: kl - wrapped: true - namespace_string: - example: string - type: string - xml: - namespace: http://a.com/schema - namespace_number: - example: 1.234 - type: number - xml: - namespace: http://b.com/schema - namespace_integer: - example: -2 - type: integer - xml: - namespace: http://c.com/schema - namespace_boolean: - example: true - type: boolean - xml: - namespace: http://d.com/schema - namespace_array: - items: - type: integer - xml: - namespace: http://e.com/schema - type: array - namespace_wrapped_array: - items: - type: integer - xml: - namespace: http://g.com/schema - type: array - xml: - namespace: http://f.com/schema - wrapped: true - prefix_ns_string: - example: string - type: string - xml: - namespace: http://a.com/schema - prefix: a - prefix_ns_number: - example: 1.234 - type: number - xml: - namespace: http://b.com/schema - prefix: b - prefix_ns_integer: - example: -2 - type: integer - xml: - namespace: http://c.com/schema - prefix: c - prefix_ns_boolean: - example: true - type: boolean - xml: - namespace: http://d.com/schema - prefix: d - prefix_ns_array: - items: - type: integer - xml: - namespace: http://e.com/schema - prefix: e - type: array - prefix_ns_wrapped_array: - items: - type: integer - xml: - namespace: http://g.com/schema - prefix: g - type: array - xml: - namespace: http://f.com/schema - prefix: f - wrapped: true - type: object - xml: - namespace: http://a.com/schema - prefix: pre - Dog_allOf: - properties: - breed: - type: string - Cat_allOf: - properties: - declawed: - type: boolean - BigCat_allOf: - properties: - kind: - enum: - - lions - - tigers - - leopards - - jaguars - type: string - securitySchemes: - petstore_auth: - flows: - implicit: - authorizationUrl: http://petstore.swagger.io/api/oauth/dialog - scopes: - write:pets: modify pets in your account - read:pets: read your pets - type: oauth2 - api_key: - in: header - name: api_key - type: apiKey - api_key_query: - in: query - name: api_key_query - type: apiKey - http_basic_test: - scheme: basic - type: http - diff --git a/samples/client/petstore/java/feign/build.gradle b/samples/client/petstore/java/feign/build.gradle deleted file mode 100644 index 4768524c68d..00000000000 --- a/samples/client/petstore/java/feign/build.gradle +++ /dev/null @@ -1,124 +0,0 @@ -apply plugin: 'idea' -apply plugin: 'eclipse' - -group = 'org.openapitools' -version = '1.0.0' - -buildscript { - repositories { - maven { url "https://repo1.maven.org/maven2" } - jcenter() - } - dependencies { - classpath 'com.android.tools.build:gradle:2.3.+' - classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5' - } -} - -repositories { - jcenter() -} - - -if(hasProperty('target') && target == 'android') { - - apply plugin: 'com.android.library' - apply plugin: 'com.github.dcendents.android-maven' - - android { - compileSdkVersion 25 - buildToolsVersion '25.0.2' - defaultConfig { - minSdkVersion 14 - targetSdkVersion 25 - } - compileOptions { - sourceCompatibility JavaVersion.VERSION_1_7 - targetCompatibility JavaVersion.VERSION_1_7 - } - - // Rename the aar correctly - libraryVariants.all { variant -> - variant.outputs.each { output -> - def outputFile = output.outputFile - if (outputFile != null && outputFile.name.endsWith('.aar')) { - def fileName = "${project.name}-${variant.baseName}-${version}.aar" - output.outputFile = new File(outputFile.parent, fileName) - } - } - } - - dependencies { - provided 'javax.annotation:jsr250-api:1.0' - } - } - - afterEvaluate { - android.libraryVariants.all { variant -> - def task = project.tasks.create "jar${variant.name.capitalize()}", Jar - task.description = "Create jar artifact for ${variant.name}" - task.dependsOn variant.javaCompile - task.from variant.javaCompile.destinationDir - task.destinationDir = project.file("${project.buildDir}/outputs/jar") - task.archiveName = "${project.name}-${variant.baseName}-${version}.jar" - artifacts.add('archives', task); - } - } - - task sourcesJar(type: Jar) { - from android.sourceSets.main.java.srcDirs - classifier = 'sources' - } - - artifacts { - archives sourcesJar - } - -} else { - - apply plugin: 'java' - apply plugin: 'maven' - - sourceCompatibility = JavaVersion.VERSION_1_7 - targetCompatibility = JavaVersion.VERSION_1_7 - - install { - repositories.mavenInstaller { - pom.artifactId = 'petstore-feign' - } - } - - task execute(type:JavaExec) { - main = System.getProperty('mainClass') - classpath = sourceSets.main.runtimeClasspath - } -} - -ext { - swagger_annotations_version = "1.5.24" - jackson_version = "2.10.3" - jackson_databind_version = "2.10.3" - jackson_databind_nullable_version = "0.2.1" - jackson_threetenbp_version = "2.9.10" - feign_version = "9.7.0" - feign_form_version = "2.1.0" - junit_version = "4.13" - oltu_version = "1.0.1" -} - -dependencies { - compile "io.swagger:swagger-annotations:$swagger_annotations_version" - compile "com.google.code.findbugs:jsr305:3.0.2" - compile "io.github.openfeign:feign-core:$feign_version" - compile "io.github.openfeign:feign-jackson:$feign_version" - compile "io.github.openfeign:feign-slf4j:$feign_version" - compile "io.github.openfeign.form:feign-form:$feign_form_version" - compile "com.fasterxml.jackson.core:jackson-core:$jackson_version" - compile "com.fasterxml.jackson.core:jackson-annotations:$jackson_version" - compile "com.fasterxml.jackson.core:jackson-databind:$jackson_databind_version" - compile "org.openapitools:jackson-databind-nullable:$jackson_databind_nullable_version" - compile "com.github.joschi.jackson:jackson-datatype-threetenbp:$jackson_threetenbp_version" - compile "org.apache.oltu.oauth2:org.apache.oltu.oauth2.client:$oltu_version" - compile "com.brsanthu:migbase64:2.2" - testCompile "junit:junit:$junit_version" -} diff --git a/samples/client/petstore/java/feign/build.sbt b/samples/client/petstore/java/feign/build.sbt deleted file mode 100644 index f706a6d4860..00000000000 --- a/samples/client/petstore/java/feign/build.sbt +++ /dev/null @@ -1,27 +0,0 @@ -lazy val root = (project in file(".")). - settings( - organization := "org.openapitools", - name := "petstore-feign", - version := "1.0.0", - scalaVersion := "2.11.4", - scalacOptions ++= Seq("-feature"), - javacOptions in compile ++= Seq("-Xlint:deprecation"), - publishArtifact in (Compile, packageDoc) := false, - resolvers += Resolver.mavenLocal, - libraryDependencies ++= Seq( - "io.swagger" % "swagger-annotations" % "1.5.24" % "compile", - "io.github.openfeign" % "feign-core" % "9.7.0" % "compile", - "io.github.openfeign" % "feign-jackson" % "9.7.0" % "compile", - "io.github.openfeign" % "feign-slf4j" % "9.7.0" % "compile", - "io.github.openfeign.form" % "feign-form" % "2.1.0" % "compile", - "com.fasterxml.jackson.core" % "jackson-core" % "2.10.3" % "compile", - "com.fasterxml.jackson.core" % "jackson-annotations" % "2.10.3" % "compile", - "com.fasterxml.jackson.core" % "jackson-databind" % "2.10.3" % "compile", - "com.fasterxml.jackson.datatype" % "jackson-datatype-joda" % "2.9.10" % "compile", - "com.github.joschi.jackson" % "jackson-datatype-threetenbp" % "2.9.10" % "compile", - "org.apache.oltu.oauth2" % "org.apache.oltu.oauth2.client" % "1.0.1" % "compile", - "com.brsanthu" % "migbase64" % "2.2" % "compile", - "junit" % "junit" % "4.13" % "test", - "com.novocode" % "junit-interface" % "0.10" % "test" - ) - ) diff --git a/samples/client/petstore/java/feign/gradle.properties b/samples/client/petstore/java/feign/gradle.properties deleted file mode 100644 index 05644f0754a..00000000000 --- a/samples/client/petstore/java/feign/gradle.properties +++ /dev/null @@ -1,2 +0,0 @@ -# Uncomment to build for Android -#target = android \ No newline at end of file diff --git a/samples/client/petstore/java/feign/gradle/wrapper/gradle-wrapper.jar b/samples/client/petstore/java/feign/gradle/wrapper/gradle-wrapper.jar deleted file mode 100644 index cc4fdc293d0..00000000000 Binary files a/samples/client/petstore/java/feign/gradle/wrapper/gradle-wrapper.jar and /dev/null differ diff --git a/samples/client/petstore/java/feign/gradle/wrapper/gradle-wrapper.properties b/samples/client/petstore/java/feign/gradle/wrapper/gradle-wrapper.properties deleted file mode 100644 index 94920145f34..00000000000 --- a/samples/client/petstore/java/feign/gradle/wrapper/gradle-wrapper.properties +++ /dev/null @@ -1,5 +0,0 @@ -distributionBase=GRADLE_USER_HOME -distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.0.1-bin.zip -zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists diff --git a/samples/client/petstore/java/feign/gradlew b/samples/client/petstore/java/feign/gradlew deleted file mode 100644 index 2fe81a7d95e..00000000000 --- a/samples/client/petstore/java/feign/gradlew +++ /dev/null @@ -1,183 +0,0 @@ -#!/usr/bin/env sh - -# -# Copyright 2015 the original author or authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -############################################################################## -## -## Gradle start up script for UN*X -## -############################################################################## - -# Attempt to set APP_HOME -# Resolve links: $0 may be a link -PRG="$0" -# Need this for relative symlinks. -while [ -h "$PRG" ] ; do - ls=`ls -ld "$PRG"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - PRG="$link" - else - PRG=`dirname "$PRG"`"/$link" - fi -done -SAVED="`pwd`" -cd "`dirname \"$PRG\"`/" >/dev/null -APP_HOME="`pwd -P`" -cd "$SAVED" >/dev/null - -APP_NAME="Gradle" -APP_BASE_NAME=`basename "$0"` - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' - -# Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD="maximum" - -warn () { - echo "$*" -} - -die () { - echo - echo "$*" - echo - exit 1 -} - -# OS specific support (must be 'true' or 'false'). -cygwin=false -msys=false -darwin=false -nonstop=false -case "`uname`" in - CYGWIN* ) - cygwin=true - ;; - Darwin* ) - darwin=true - ;; - MINGW* ) - msys=true - ;; - NONSTOP* ) - nonstop=true - ;; -esac - -CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar - -# Determine the Java command to use to start the JVM. -if [ -n "$JAVA_HOME" ] ; then - if [ -x "$JAVA_HOME/jre/sh/java" ] ; then - # IBM's JDK on AIX uses strange locations for the executables - JAVACMD="$JAVA_HOME/jre/sh/java" - else - JAVACMD="$JAVA_HOME/bin/java" - fi - if [ ! -x "$JAVACMD" ] ; then - die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." - fi -else - JAVACMD="java" - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." -fi - -# Increase the maximum file descriptors if we can. -if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then - MAX_FD_LIMIT=`ulimit -H -n` - if [ $? -eq 0 ] ; then - if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then - MAX_FD="$MAX_FD_LIMIT" - fi - ulimit -n $MAX_FD - if [ $? -ne 0 ] ; then - warn "Could not set maximum file descriptor limit: $MAX_FD" - fi - else - warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" - fi -fi - -# For Darwin, add options to specify how the application appears in the dock -if $darwin; then - GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" -fi - -# For Cygwin or MSYS, switch paths to Windows format before running java -if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then - APP_HOME=`cygpath --path --mixed "$APP_HOME"` - CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` - JAVACMD=`cygpath --unix "$JAVACMD"` - - # We build the pattern for arguments to be converted via cygpath - ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` - SEP="" - for dir in $ROOTDIRSRAW ; do - ROOTDIRS="$ROOTDIRS$SEP$dir" - SEP="|" - done - OURCYGPATTERN="(^($ROOTDIRS))" - # Add a user-defined pattern to the cygpath arguments - if [ "$GRADLE_CYGPATTERN" != "" ] ; then - OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" - fi - # Now convert the arguments - kludge to limit ourselves to /bin/sh - i=0 - for arg in "$@" ; do - CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` - CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option - - if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition - eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` - else - eval `echo args$i`="\"$arg\"" - fi - i=`expr $i + 1` - done - case $i in - 0) set -- ;; - 1) set -- "$args0" ;; - 2) set -- "$args0" "$args1" ;; - 3) set -- "$args0" "$args1" "$args2" ;; - 4) set -- "$args0" "$args1" "$args2" "$args3" ;; - 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; - 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; - 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; - 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; - 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; - esac -fi - -# Escape application args -save () { - for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done - echo " " -} -APP_ARGS=`save "$@"` - -# Collect all arguments for the java command, following the shell quoting and substitution rules -eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" - -exec "$JAVACMD" "$@" diff --git a/samples/client/petstore/java/feign/gradlew.bat b/samples/client/petstore/java/feign/gradlew.bat deleted file mode 100644 index 9618d8d9607..00000000000 --- a/samples/client/petstore/java/feign/gradlew.bat +++ /dev/null @@ -1,100 +0,0 @@ -@rem -@rem Copyright 2015 the original author or authors. -@rem -@rem Licensed under the Apache License, Version 2.0 (the "License"); -@rem you may not use this file except in compliance with the License. -@rem You may obtain a copy of the License at -@rem -@rem https://www.apache.org/licenses/LICENSE-2.0 -@rem -@rem Unless required by applicable law or agreed to in writing, software -@rem distributed under the License is distributed on an "AS IS" BASIS, -@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -@rem See the License for the specific language governing permissions and -@rem limitations under the License. -@rem - -@if "%DEBUG%" == "" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto init - -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto init - -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:init -@rem Get command-line arguments, handling Windows variants - -if not "%OS%" == "Windows_NT" goto win9xME_args - -:win9xME_args -@rem Slurp the command line arguments. -set CMD_LINE_ARGS= -set _SKIP=2 - -:win9xME_args_slurp -if "x%~1" == "x" goto execute - -set CMD_LINE_ARGS=%* - -:execute -@rem Setup the command line - -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% - -:end -@rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega diff --git a/samples/client/petstore/java/feign/pom.xml b/samples/client/petstore/java/feign/pom.xml deleted file mode 100644 index 5e288b31a45..00000000000 --- a/samples/client/petstore/java/feign/pom.xml +++ /dev/null @@ -1,311 +0,0 @@ - - 4.0.0 - org.openapitools - petstore-feign - jar - petstore-feign - 1.0.0 - https://github.com/openapitools/openapi-generator - OpenAPI Java - - scm:git:git@github.com:openapitools/openapi-generator.git - scm:git:git@github.com:openapitools/openapi-generator.git - https://github.com/openapitools/openapi-generator - - - - - Unlicense - https://www.apache.org/licenses/LICENSE-2.0.html - repo - - - - - - OpenAPI-Generator Contributors - team@openapitools.org - OpenAPITools.org - http://openapitools.org - - - - - - - org.apache.maven.plugins - maven-enforcer-plugin - 3.0.0-M1 - - - enforce-maven - - enforce - - - - - 2.2.0 - - - - - - - - org.apache.maven.plugins - maven-surefire-plugin - 3.0.0-M4 - - - - loggerPath - conf/log4j.properties - - - -Xms512m -Xmx1500m - methods - 10 - - - - maven-dependency-plugin - - - package - - copy-dependencies - - - ${project.build.directory}/lib - - - - - - - - org.apache.maven.plugins - maven-jar-plugin - 2.2 - - - - jar - test-jar - - - - - - - - - org.codehaus.mojo - build-helper-maven-plugin - 1.10 - - - add_sources - generate-sources - - add-source - - - - src/main/java - - - - - add_test_sources - generate-test-sources - - add-test-source - - - - src/test/java - - - - - - - org.apache.maven.plugins - maven-compiler-plugin - 3.8.1 - - 1.8 - 1.8 - true - 128m - 512m - - -Xlint:all - -J-Xss4m - - - - - org.apache.maven.plugins - maven-javadoc-plugin - 3.1.1 - - none - - - - attach-javadocs - - jar - - - - - - org.apache.maven.plugins - maven-source-plugin - 2.2.1 - - - attach-sources - - jar-no-fork - - - - - - - - - - sign-artifacts - - - - org.apache.maven.plugins - maven-gpg-plugin - 1.5 - - - sign-artifacts - verify - - sign - - - - - - - - - - - - io.swagger - swagger-annotations - ${swagger-annotations-version} - - - - - com.google.code.findbugs - jsr305 - 3.0.2 - - - - - io.github.openfeign - feign-core - ${feign-version} - - - io.github.openfeign - feign-jackson - ${feign-version} - - - io.github.openfeign - feign-slf4j - ${feign-version} - - - io.github.openfeign.form - feign-form - ${feign-form-version} - - - - - com.fasterxml.jackson.core - jackson-core - ${jackson-version} - - - com.fasterxml.jackson.core - jackson-annotations - ${jackson-version} - - - com.fasterxml.jackson.core - jackson-databind - ${jackson-databind-version} - - - org.openapitools - jackson-databind-nullable - ${jackson-databind-nullable-version} - - - com.github.joschi.jackson - jackson-datatype-threetenbp - ${jackson-threetenbp-version} - - - org.apache.oltu.oauth2 - org.apache.oltu.oauth2.client - ${oltu-version} - - - - - junit - junit - ${junit-version} - test - - - com.squareup.okhttp3 - mockwebserver - 3.6.0 - test - - - org.assertj - assertj-core - 1.7.1 - test - - - - UTF-8 - 1.7 - ${java.version} - ${java.version} - 1.5.24 - 9.7.0 - 2.1.0 - 2.10.3 - 0.2.1 - 2.10.3 - 2.9.10 - 4.13 - 1.0.0 - 1.0.1 - - diff --git a/samples/client/petstore/java/feign/settings.gradle b/samples/client/petstore/java/feign/settings.gradle deleted file mode 100644 index 56240d66842..00000000000 --- a/samples/client/petstore/java/feign/settings.gradle +++ /dev/null @@ -1 +0,0 @@ -rootProject.name = "petstore-feign" \ No newline at end of file diff --git a/samples/client/petstore/java/feign/src/main/AndroidManifest.xml b/samples/client/petstore/java/feign/src/main/AndroidManifest.xml deleted file mode 100644 index 54fbcb3da1e..00000000000 --- a/samples/client/petstore/java/feign/src/main/AndroidManifest.xml +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/ApiClient.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/ApiClient.java deleted file mode 100644 index 738307efaf7..00000000000 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/ApiClient.java +++ /dev/null @@ -1,355 +0,0 @@ -package org.openapitools.client; - -import java.util.LinkedHashMap; -import java.util.Map; - -import org.apache.oltu.oauth2.client.request.OAuthClientRequest.AuthenticationRequestBuilder; -import org.apache.oltu.oauth2.client.request.OAuthClientRequest.TokenRequestBuilder; - -import org.threeten.bp.*; - -import com.fasterxml.jackson.databind.DeserializationFeature; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.SerializationFeature; -import org.openapitools.jackson.nullable.JsonNullableModule; -import com.fasterxml.jackson.datatype.threetenbp.ThreeTenModule; - -import feign.Feign; -import feign.RequestInterceptor; -import feign.form.FormEncoder; -import feign.jackson.JacksonDecoder; -import feign.jackson.JacksonEncoder; -import feign.slf4j.Slf4jLogger; -import org.openapitools.client.auth.*; -import org.openapitools.client.auth.OAuth.AccessTokenListener; - - -public class ApiClient { - public interface Api {} - - protected ObjectMapper objectMapper; - private String basePath = "http://petstore.swagger.io:80/v2"; - private Map apiAuthorizations; - private Feign.Builder feignBuilder; - - public ApiClient() { - objectMapper = createObjectMapper(); - apiAuthorizations = new LinkedHashMap(); - feignBuilder = Feign.builder() - .encoder(new FormEncoder(new JacksonEncoder(objectMapper))) - .decoder(new JacksonDecoder(objectMapper)) - .logger(new Slf4jLogger()); - } - - public ApiClient(String[] authNames) { - this(); - for(String authName : authNames) { - RequestInterceptor auth; - if ("api_key".equals(authName)) { - auth = new ApiKeyAuth("header", "api_key"); - } else if ("api_key_query".equals(authName)) { - auth = new ApiKeyAuth("query", "api_key_query"); - } else if ("http_basic_test".equals(authName)) { - auth = new HttpBasicAuth(); - } else if ("petstore_auth".equals(authName)) { - auth = new OAuth(OAuthFlow.implicit, "http://petstore.swagger.io/api/oauth/dialog", "", "write:pets, read:pets"); - } else { - throw new RuntimeException("auth name \"" + authName + "\" not found in available auth names"); - } - addAuthorization(authName, auth); - } - } - - /** - * Basic constructor for single auth name - * @param authName - */ - public ApiClient(String authName) { - this(new String[]{authName}); - } - - /** - * Helper constructor for single api key - * @param authName - * @param apiKey - */ - public ApiClient(String authName, String apiKey) { - this(authName); - this.setApiKey(apiKey); - } - - /** - * Helper constructor for single basic auth or password oauth2 - * @param authName - * @param username - * @param password - */ - public ApiClient(String authName, String username, String password) { - this(authName); - this.setCredentials(username, password); - } - - /** - * Helper constructor for single password oauth2 - * @param authName - * @param clientId - * @param secret - * @param username - * @param password - */ - public ApiClient(String authName, String clientId, String secret, String username, String password) { - this(authName); - this.getTokenEndPoint() - .setClientId(clientId) - .setClientSecret(secret) - .setUsername(username) - .setPassword(password); - } - - public String getBasePath() { - return basePath; - } - - public ApiClient setBasePath(String basePath) { - this.basePath = basePath; - return this; - } - - public Map getApiAuthorizations() { - return apiAuthorizations; - } - - public void setApiAuthorizations(Map apiAuthorizations) { - this.apiAuthorizations = apiAuthorizations; - } - - public Feign.Builder getFeignBuilder() { - return feignBuilder; - } - - public ApiClient setFeignBuilder(Feign.Builder feignBuilder) { - this.feignBuilder = feignBuilder; - return this; - } - - private ObjectMapper createObjectMapper() { - ObjectMapper objectMapper = new ObjectMapper(); - objectMapper.enable(SerializationFeature.WRITE_ENUMS_USING_TO_STRING); - objectMapper.enable(DeserializationFeature.READ_ENUMS_USING_TO_STRING); - objectMapper.disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES); - objectMapper.disable(DeserializationFeature.FAIL_ON_INVALID_SUBTYPE); - objectMapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS); - objectMapper.setDateFormat(new RFC3339DateFormat()); - ThreeTenModule module = new ThreeTenModule(); - module.addDeserializer(Instant.class, CustomInstantDeserializer.INSTANT); - module.addDeserializer(OffsetDateTime.class, CustomInstantDeserializer.OFFSET_DATE_TIME); - module.addDeserializer(ZonedDateTime.class, CustomInstantDeserializer.ZONED_DATE_TIME); - objectMapper.registerModule(module); - JsonNullableModule jnm = new JsonNullableModule(); - objectMapper.registerModule(jnm); - return objectMapper; - } - - public ObjectMapper getObjectMapper(){ - return objectMapper; - } - - /** - * Creates a feign client for given API interface. - * - * Usage: - * ApiClient apiClient = new ApiClient(); - * apiClient.setBasePath("http://localhost:8080"); - * XYZApi api = apiClient.buildClient(XYZApi.class); - * XYZResponse response = api.someMethod(...); - * @param Type - * @param clientClass Client class - * @return The Client - */ - public T buildClient(Class clientClass) { - return feignBuilder.target(clientClass, basePath); - } - - /** - * Select the Accept header's value from the given accepts array: - * if JSON exists in the given array, use it; - * otherwise use all of them (joining into a string) - * - * @param accepts The accepts array to select from - * @return The Accept header to use. If the given array is empty, - * null will be returned (not to set the Accept header explicitly). - */ - public String selectHeaderAccept(String[] accepts) { - if (accepts.length == 0) return null; - if (StringUtil.containsIgnoreCase(accepts, "application/json")) return "application/json"; - return StringUtil.join(accepts, ","); - } - - /** - * Select the Content-Type header's value from the given array: - * if JSON exists in the given array, use it; - * otherwise use the first one of the array. - * - * @param contentTypes The Content-Type array to select from - * @return The Content-Type header to use. If the given array is empty, - * JSON will be used. - */ - public String selectHeaderContentType(String[] contentTypes) { - if (contentTypes.length == 0) return "application/json"; - if (StringUtil.containsIgnoreCase(contentTypes, "application/json")) return "application/json"; - return contentTypes[0]; - } - - - /** - * Helper method to configure the bearer token. - * @param bearerToken the bearer token. - */ - public void setBearerToken(String bearerToken) { - for(RequestInterceptor apiAuthorization : apiAuthorizations.values()) { - if (apiAuthorization instanceof HttpBearerAuth) { - ((HttpBearerAuth) apiAuthorization).setBearerToken(bearerToken); - return; - } - } - throw new RuntimeException("No Bearer authentication configured!"); - } - - /** - * Helper method to configure the first api key found - * @param apiKey API key - */ - public void setApiKey(String apiKey) { - for(RequestInterceptor apiAuthorization : apiAuthorizations.values()) { - if (apiAuthorization instanceof ApiKeyAuth) { - ApiKeyAuth keyAuth = (ApiKeyAuth) apiAuthorization; - keyAuth.setApiKey(apiKey); - return ; - } - } - throw new RuntimeException("No API key authentication configured!"); - } - - /** - * Helper method to configure the username/password for basic auth or password OAuth - * @param username Username - * @param password Password - */ - public void setCredentials(String username, String password) { - for(RequestInterceptor apiAuthorization : apiAuthorizations.values()) { - if (apiAuthorization instanceof HttpBasicAuth) { - HttpBasicAuth basicAuth = (HttpBasicAuth) apiAuthorization; - basicAuth.setCredentials(username, password); - return; - } - if (apiAuthorization instanceof OAuth) { - OAuth oauth = (OAuth) apiAuthorization; - oauth.getTokenRequestBuilder().setUsername(username).setPassword(password); - return; - } - } - throw new RuntimeException("No Basic authentication or OAuth configured!"); - } - - /** - * Helper method to configure the token endpoint of the first oauth found in the apiAuthorizations (there should be only one) - * @return Token request builder - */ - public TokenRequestBuilder getTokenEndPoint() { - for(RequestInterceptor apiAuthorization : apiAuthorizations.values()) { - if (apiAuthorization instanceof OAuth) { - OAuth oauth = (OAuth) apiAuthorization; - return oauth.getTokenRequestBuilder(); - } - } - return null; - } - - /** - * Helper method to configure authorization endpoint of the first oauth found in the apiAuthorizations (there should be only one) - * @return Authentication request builder - */ - public AuthenticationRequestBuilder getAuthorizationEndPoint() { - for(RequestInterceptor apiAuthorization : apiAuthorizations.values()) { - if (apiAuthorization instanceof OAuth) { - OAuth oauth = (OAuth) apiAuthorization; - return oauth.getAuthenticationRequestBuilder(); - } - } - return null; - } - - /** - * Helper method to pre-set the oauth access token of the first oauth found in the apiAuthorizations (there should be only one) - * @param accessToken Access Token - * @param expiresIn Validity period in seconds - */ - public void setAccessToken(String accessToken, Long expiresIn) { - for(RequestInterceptor apiAuthorization : apiAuthorizations.values()) { - if (apiAuthorization instanceof OAuth) { - OAuth oauth = (OAuth) apiAuthorization; - oauth.setAccessToken(accessToken, expiresIn); - return; - } - } - } - - /** - * Helper method to configure the oauth accessCode/implicit flow parameters - * @param clientId Client ID - * @param clientSecret Client secret - * @param redirectURI Redirect URI - */ - public void configureAuthorizationFlow(String clientId, String clientSecret, String redirectURI) { - for(RequestInterceptor apiAuthorization : apiAuthorizations.values()) { - if (apiAuthorization instanceof OAuth) { - OAuth oauth = (OAuth) apiAuthorization; - oauth.getTokenRequestBuilder() - .setClientId(clientId) - .setClientSecret(clientSecret) - .setRedirectURI(redirectURI); - oauth.getAuthenticationRequestBuilder() - .setClientId(clientId) - .setRedirectURI(redirectURI); - return; - } - } - } - - /** - * Configures a listener which is notified when a new access token is received. - * @param accessTokenListener Acesss token listener - */ - public void registerAccessTokenListener(AccessTokenListener accessTokenListener) { - for(RequestInterceptor apiAuthorization : apiAuthorizations.values()) { - if (apiAuthorization instanceof OAuth) { - OAuth oauth = (OAuth) apiAuthorization; - oauth.registerAccessTokenListener(accessTokenListener); - return; - } - } - } - - /** - * Gets request interceptor based on authentication name - * @param authName Authentiation name - * @return Request Interceptor - */ - public RequestInterceptor getAuthorization(String authName) { - return apiAuthorizations.get(authName); - } - - /** - * Adds an authorization to be used by the client - * @param authName Authentication name - * @param authorization Request interceptor - */ - public void addAuthorization(String authName, RequestInterceptor authorization) { - if (apiAuthorizations.containsKey(authName)) { - throw new RuntimeException("auth name \"" + authName + "\" already in api authorizations"); - } - apiAuthorizations.put(authName, authorization); - feignBuilder.requestInterceptor(authorization); - } - -} diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/CustomInstantDeserializer.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/CustomInstantDeserializer.java deleted file mode 100644 index 83d4514b071..00000000000 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/CustomInstantDeserializer.java +++ /dev/null @@ -1,232 +0,0 @@ -package org.openapitools.client; - -import com.fasterxml.jackson.core.JsonParser; -import com.fasterxml.jackson.core.JsonTokenId; -import com.fasterxml.jackson.databind.DeserializationContext; -import com.fasterxml.jackson.databind.DeserializationFeature; -import com.fasterxml.jackson.databind.JsonDeserializer; -import com.fasterxml.jackson.datatype.threetenbp.DecimalUtils; -import com.fasterxml.jackson.datatype.threetenbp.deser.ThreeTenDateTimeDeserializerBase; -import com.fasterxml.jackson.datatype.threetenbp.function.BiFunction; -import com.fasterxml.jackson.datatype.threetenbp.function.Function; -import org.threeten.bp.DateTimeException; -import org.threeten.bp.DateTimeUtils; -import org.threeten.bp.Instant; -import org.threeten.bp.OffsetDateTime; -import org.threeten.bp.ZoneId; -import org.threeten.bp.ZonedDateTime; -import org.threeten.bp.format.DateTimeFormatter; -import org.threeten.bp.temporal.Temporal; -import org.threeten.bp.temporal.TemporalAccessor; - -import java.io.IOException; -import java.math.BigDecimal; - -/** - * Deserializer for ThreeTen temporal {@link Instant}s, {@link OffsetDateTime}, and {@link ZonedDateTime}s. - * Adapted from the jackson threetenbp InstantDeserializer to add support for deserializing rfc822 format. - * - * @author Nick Williams - */ -public class CustomInstantDeserializer - extends ThreeTenDateTimeDeserializerBase { - private static final long serialVersionUID = 1L; - - public static final CustomInstantDeserializer INSTANT = new CustomInstantDeserializer( - Instant.class, DateTimeFormatter.ISO_INSTANT, - new Function() { - @Override - public Instant apply(TemporalAccessor temporalAccessor) { - return Instant.from(temporalAccessor); - } - }, - new Function() { - @Override - public Instant apply(FromIntegerArguments a) { - return Instant.ofEpochMilli(a.value); - } - }, - new Function() { - @Override - public Instant apply(FromDecimalArguments a) { - return Instant.ofEpochSecond(a.integer, a.fraction); - } - }, - null - ); - - public static final CustomInstantDeserializer OFFSET_DATE_TIME = new CustomInstantDeserializer( - OffsetDateTime.class, DateTimeFormatter.ISO_OFFSET_DATE_TIME, - new Function() { - @Override - public OffsetDateTime apply(TemporalAccessor temporalAccessor) { - return OffsetDateTime.from(temporalAccessor); - } - }, - new Function() { - @Override - public OffsetDateTime apply(FromIntegerArguments a) { - return OffsetDateTime.ofInstant(Instant.ofEpochMilli(a.value), a.zoneId); - } - }, - new Function() { - @Override - public OffsetDateTime apply(FromDecimalArguments a) { - return OffsetDateTime.ofInstant(Instant.ofEpochSecond(a.integer, a.fraction), a.zoneId); - } - }, - new BiFunction() { - @Override - public OffsetDateTime apply(OffsetDateTime d, ZoneId z) { - return d.withOffsetSameInstant(z.getRules().getOffset(d.toLocalDateTime())); - } - } - ); - - public static final CustomInstantDeserializer ZONED_DATE_TIME = new CustomInstantDeserializer( - ZonedDateTime.class, DateTimeFormatter.ISO_ZONED_DATE_TIME, - new Function() { - @Override - public ZonedDateTime apply(TemporalAccessor temporalAccessor) { - return ZonedDateTime.from(temporalAccessor); - } - }, - new Function() { - @Override - public ZonedDateTime apply(FromIntegerArguments a) { - return ZonedDateTime.ofInstant(Instant.ofEpochMilli(a.value), a.zoneId); - } - }, - new Function() { - @Override - public ZonedDateTime apply(FromDecimalArguments a) { - return ZonedDateTime.ofInstant(Instant.ofEpochSecond(a.integer, a.fraction), a.zoneId); - } - }, - new BiFunction() { - @Override - public ZonedDateTime apply(ZonedDateTime zonedDateTime, ZoneId zoneId) { - return zonedDateTime.withZoneSameInstant(zoneId); - } - } - ); - - protected final Function fromMilliseconds; - - protected final Function fromNanoseconds; - - protected final Function parsedToValue; - - protected final BiFunction adjust; - - protected CustomInstantDeserializer(Class supportedType, - DateTimeFormatter parser, - Function parsedToValue, - Function fromMilliseconds, - Function fromNanoseconds, - BiFunction adjust) { - super(supportedType, parser); - this.parsedToValue = parsedToValue; - this.fromMilliseconds = fromMilliseconds; - this.fromNanoseconds = fromNanoseconds; - this.adjust = adjust == null ? new BiFunction() { - @Override - public T apply(T t, ZoneId zoneId) { - return t; - } - } : adjust; - } - - @SuppressWarnings("unchecked") - protected CustomInstantDeserializer(CustomInstantDeserializer base, DateTimeFormatter f) { - super((Class) base.handledType(), f); - parsedToValue = base.parsedToValue; - fromMilliseconds = base.fromMilliseconds; - fromNanoseconds = base.fromNanoseconds; - adjust = base.adjust; - } - - @Override - protected JsonDeserializer withDateFormat(DateTimeFormatter dtf) { - if (dtf == _formatter) { - return this; - } - return new CustomInstantDeserializer(this, dtf); - } - - @Override - public T deserialize(JsonParser parser, DeserializationContext context) throws IOException { - //NOTE: Timestamps contain no timezone info, and are always in configured TZ. Only - //string values have to be adjusted to the configured TZ. - switch (parser.getCurrentTokenId()) { - case JsonTokenId.ID_NUMBER_FLOAT: { - BigDecimal value = parser.getDecimalValue(); - long seconds = value.longValue(); - int nanoseconds = DecimalUtils.extractNanosecondDecimal(value, seconds); - return fromNanoseconds.apply(new FromDecimalArguments( - seconds, nanoseconds, getZone(context))); - } - - case JsonTokenId.ID_NUMBER_INT: { - long timestamp = parser.getLongValue(); - if (context.isEnabled(DeserializationFeature.READ_DATE_TIMESTAMPS_AS_NANOSECONDS)) { - return this.fromNanoseconds.apply(new FromDecimalArguments( - timestamp, 0, this.getZone(context) - )); - } - return this.fromMilliseconds.apply(new FromIntegerArguments( - timestamp, this.getZone(context) - )); - } - - case JsonTokenId.ID_STRING: { - String string = parser.getText().trim(); - if (string.length() == 0) { - return null; - } - if (string.endsWith("+0000")) { - string = string.substring(0, string.length() - 5) + "Z"; - } - T value; - try { - TemporalAccessor acc = _formatter.parse(string); - value = parsedToValue.apply(acc); - if (context.isEnabled(DeserializationFeature.ADJUST_DATES_TO_CONTEXT_TIME_ZONE)) { - return adjust.apply(value, this.getZone(context)); - } - } catch (DateTimeException e) { - throw _peelDTE(e); - } - return value; - } - } - throw context.mappingException("Expected type float, integer, or string."); - } - - private ZoneId getZone(DeserializationContext context) { - // Instants are always in UTC, so don't waste compute cycles - return (_valueClass == Instant.class) ? null : DateTimeUtils.toZoneId(context.getTimeZone()); - } - - private static class FromIntegerArguments { - public final long value; - public final ZoneId zoneId; - - private FromIntegerArguments(long value, ZoneId zoneId) { - this.value = value; - this.zoneId = zoneId; - } - } - - private static class FromDecimalArguments { - public final long integer; - public final int fraction; - public final ZoneId zoneId; - - private FromDecimalArguments(long integer, int fraction, ZoneId zoneId) { - this.integer = integer; - this.fraction = fraction; - this.zoneId = zoneId; - } - } -} diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/EncodingUtils.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/EncodingUtils.java deleted file mode 100644 index c5a76a97857..00000000000 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/EncodingUtils.java +++ /dev/null @@ -1,86 +0,0 @@ -package org.openapitools.client; - -import java.io.UnsupportedEncodingException; -import java.net.URLEncoder; -import java.util.ArrayList; -import java.util.Collection; -import java.util.List; - -/** -* Utilities to support Swagger encoding formats in Feign. -*/ -public final class EncodingUtils { - - /** - * Private constructor. Do not construct this class. - */ - private EncodingUtils() {} - - /** - *

Encodes a collection of query parameters according to the Swagger - * collection format.

- * - *

Of the various collection formats defined by Swagger ("csv", "tsv", - * etc), Feign only natively supports "multi". This utility generates the - * other format types so it will be properly processed by Feign.

- * - *

Note, as part of reformatting, it URL encodes the parameters as - * well.

- * @param parameters The collection object to be formatted. This object will - * not be changed. - * @param collectionFormat The Swagger collection format (eg, "csv", "tsv", - * "pipes"). See the - * - * OpenAPI Spec for more details. - * @return An object that will be correctly formatted by Feign. - */ - public static Object encodeCollection(Collection parameters, - String collectionFormat) { - if (parameters == null) { - return parameters; - } - List stringValues = new ArrayList<>(parameters.size()); - for (Object parameter : parameters) { - // ignore null values (same behavior as Feign) - if (parameter != null) { - stringValues.add(encode(parameter)); - } - } - // Feign natively handles single-element lists and the "multi" format. - if (stringValues.size() < 2 || "multi".equals(collectionFormat)) { - return stringValues; - } - // Otherwise return a formatted String - String[] stringArray = stringValues.toArray(new String[0]); - switch (collectionFormat) { - case "csv": - default: - return StringUtil.join(stringArray, ","); - case "ssv": - return StringUtil.join(stringArray, " "); - case "tsv": - return StringUtil.join(stringArray, "\t"); - case "pipes": - return StringUtil.join(stringArray, "|"); - } - } - - /** - * URL encode a single query parameter. - * @param parameter The query parameter to encode. This object will not be - * changed. - * @return The URL encoded string representation of the parameter. If the - * parameter is null, returns null. - */ - public static String encode(Object parameter) { - if (parameter == null) { - return null; - } - try { - return URLEncoder.encode(parameter.toString(), "UTF-8").replaceAll("\\+", "%20"); - } catch (UnsupportedEncodingException e) { - // Should never happen, UTF-8 is always supported - throw new RuntimeException(e); - } - } -} diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/ParamExpander.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/ParamExpander.java deleted file mode 100644 index 2331d87fdbd..00000000000 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/ParamExpander.java +++ /dev/null @@ -1,22 +0,0 @@ -package org.openapitools.client; - -import feign.Param; - -import java.text.DateFormat; -import java.util.Date; - -/** - * Param Expander to convert {@link Date} to RFC3339 - */ -public class ParamExpander implements Param.Expander { - - private static final DateFormat dateformat = new RFC3339DateFormat(); - - @Override - public String expand(Object value) { - if (value instanceof Date) { - return dateformat.format(value); - } - return value.toString(); - } -} diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/RFC3339DateFormat.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/RFC3339DateFormat.java deleted file mode 100644 index 9509fd08981..00000000000 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/RFC3339DateFormat.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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. - */ - -package org.openapitools.client; - -import com.fasterxml.jackson.databind.util.ISO8601DateFormat; -import com.fasterxml.jackson.databind.util.ISO8601Utils; - -import java.text.FieldPosition; -import java.util.Date; - - -public class RFC3339DateFormat extends ISO8601DateFormat { - - // Same as ISO8601DateFormat but serializing milliseconds. - @Override - public StringBuffer format(Date date, StringBuffer toAppendTo, FieldPosition fieldPosition) { - String value = ISO8601Utils.format(date, true); - toAppendTo.append(value); - return toAppendTo; - } - -} \ No newline at end of file diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/ServerConfiguration.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/ServerConfiguration.java deleted file mode 100644 index a1107a8690e..00000000000 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/ServerConfiguration.java +++ /dev/null @@ -1,58 +0,0 @@ -package org.openapitools.client; - -import java.util.Map; - -/** - * Representing a Server configuration. - */ -public class ServerConfiguration { - public String URL; - public String description; - public Map variables; - - /** - * @param URL A URL to the target host. - * @param description A describtion of the host designated by the URL. - * @param variables A map between a variable name and its value. The value is used for substitution in the server's URL template. - */ - public ServerConfiguration(String URL, String description, Map variables) { - this.URL = URL; - this.description = description; - this.variables = variables; - } - - /** - * Format URL template using given variables. - * - * @param variables A map between a variable name and its value. - * @return Formatted URL. - */ - public String URL(Map variables) { - String url = this.URL; - - // go through variables and replace placeholders - for (Map.Entry variable: this.variables.entrySet()) { - String name = variable.getKey(); - ServerVariable serverVariable = variable.getValue(); - String value = serverVariable.defaultValue; - - if (variables != null && variables.containsKey(name)) { - value = variables.get(name); - if (serverVariable.enumValues.size() > 0 && !serverVariable.enumValues.contains(value)) { - throw new RuntimeException("The variable " + name + " in the server URL has invalid value " + value + "."); - } - } - url = url.replaceAll("\\{" + name + "\\}", value); - } - return url; - } - - /** - * Format URL template using default server variables. - * - * @return Formatted URL. - */ - public String URL() { - return URL(null); - } -} diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/ServerVariable.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/ServerVariable.java deleted file mode 100644 index c2f13e21666..00000000000 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/ServerVariable.java +++ /dev/null @@ -1,23 +0,0 @@ -package org.openapitools.client; - -import java.util.HashSet; - -/** - * Representing a Server Variable for server URL template substitution. - */ -public class ServerVariable { - public String description; - public String defaultValue; - public HashSet enumValues = null; - - /** - * @param description A description for the server variable. - * @param defaultValue The default value to use for substitution. - * @param enumValues An enumeration of string values to be used if the substitution options are from a limited set. - */ - public ServerVariable(String description, String defaultValue, HashSet enumValues) { - this.description = description; - this.defaultValue = defaultValue; - this.enumValues = enumValues; - } -} diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/StringUtil.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/StringUtil.java deleted file mode 100644 index 747a23f5bf2..00000000000 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/StringUtil.java +++ /dev/null @@ -1,83 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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. - */ - - -package org.openapitools.client; - -import java.util.Collection; -import java.util.Iterator; - - -public class StringUtil { - /** - * Check if the given array contains the given value (with case-insensitive comparison). - * - * @param array The array - * @param value The value to search - * @return true if the array contains the value - */ - public static boolean containsIgnoreCase(String[] array, String value) { - for (String str : array) { - if (value == null && str == null) { - return true; - } - if (value != null && value.equalsIgnoreCase(str)) { - return true; - } - } - return false; - } - - /** - * Join an array of strings with the given separator. - *

- * Note: This might be replaced by utility method from commons-lang or guava someday - * if one of those libraries is added as dependency. - *

- * - * @param array The array of strings - * @param separator The separator - * @return the resulting string - */ - public static String join(String[] array, String separator) { - int len = array.length; - if (len == 0) { - return ""; - } - - StringBuilder out = new StringBuilder(); - out.append(array[0]); - for (int i = 1; i < len; i++) { - out.append(separator).append(array[i]); - } - return out.toString(); - } - - /** - * Join a list of strings with the given separator. - * - * @param list The list of strings - * @param separator The separator - * @return the resulting string - */ - public static String join(Collection list, String separator) { - Iterator iterator = list.iterator(); - StringBuilder out = new StringBuilder(); - if (iterator.hasNext()) { - out.append(iterator.next()); - } - while (iterator.hasNext()) { - out.append(separator).append(iterator.next()); - } - return out.toString(); - } -} diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/api/AnotherFakeApi.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/api/AnotherFakeApi.java deleted file mode 100644 index bd4cd7e1fe7..00000000000 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/api/AnotherFakeApi.java +++ /dev/null @@ -1,30 +0,0 @@ -package org.openapitools.client.api; - -import org.openapitools.client.ApiClient; -import org.openapitools.client.EncodingUtils; - -import org.openapitools.client.model.Client; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import feign.*; - - -public interface AnotherFakeApi extends ApiClient.Api { - - - /** - * To test special tags - * To test special tags and operation ID starting with number - * @param body client model (required) - * @return Client - */ - @RequestLine("PATCH /another-fake/dummy") - @Headers({ - "Content-Type: application/json", - "Accept: application/json", - }) - Client call123testSpecialTags(Client body); -} diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/api/FakeApi.java deleted file mode 100644 index 69cc2a9064f..00000000000 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/api/FakeApi.java +++ /dev/null @@ -1,422 +0,0 @@ -package org.openapitools.client.api; - -import org.openapitools.client.ApiClient; -import org.openapitools.client.EncodingUtils; - -import java.math.BigDecimal; -import org.openapitools.client.model.Client; -import java.io.File; -import org.openapitools.client.model.FileSchemaTestClass; -import org.threeten.bp.LocalDate; -import org.threeten.bp.OffsetDateTime; -import org.openapitools.client.model.OuterComposite; -import org.openapitools.client.model.User; -import org.openapitools.client.model.XmlItem; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import feign.*; - - -public interface FakeApi extends ApiClient.Api { - - - /** - * creates an XmlItem - * this route creates an XmlItem - * @param xmlItem XmlItem Body (required) - */ - @RequestLine("POST /fake/create_xml_item") - @Headers({ - "Content-Type: application/xml", - "Accept: application/json", - }) - void createXmlItem(XmlItem xmlItem); - - /** - * - * Test serialization of outer boolean types - * @param body Input boolean as post body (optional) - * @return Boolean - */ - @RequestLine("POST /fake/outer/boolean") - @Headers({ - "Content-Type: */*", - "Accept: */*", - }) - Boolean fakeOuterBooleanSerialize(Boolean body); - - /** - * - * Test serialization of object with outer number type - * @param body Input composite as post body (optional) - * @return OuterComposite - */ - @RequestLine("POST /fake/outer/composite") - @Headers({ - "Content-Type: */*", - "Accept: */*", - }) - OuterComposite fakeOuterCompositeSerialize(OuterComposite body); - - /** - * - * Test serialization of outer number types - * @param body Input number as post body (optional) - * @return BigDecimal - */ - @RequestLine("POST /fake/outer/number") - @Headers({ - "Content-Type: */*", - "Accept: */*", - }) - BigDecimal fakeOuterNumberSerialize(BigDecimal body); - - /** - * - * Test serialization of outer string types - * @param body Input string as post body (optional) - * @return String - */ - @RequestLine("POST /fake/outer/string") - @Headers({ - "Content-Type: */*", - "Accept: */*", - }) - String fakeOuterStringSerialize(String body); - - /** - * - * For this test, the body for this request much reference a schema named `File`. - * @param body (required) - */ - @RequestLine("PUT /fake/body-with-file-schema") - @Headers({ - "Content-Type: application/json", - "Accept: application/json", - }) - void testBodyWithFileSchema(FileSchemaTestClass body); - - /** - * - * - * @param query (required) - * @param body (required) - */ - @RequestLine("PUT /fake/body-with-query-params?query={query}") - @Headers({ - "Content-Type: application/json", - "Accept: application/json", - }) - void testBodyWithQueryParams(@Param("query") String query, User body); - - /** - * - * - * Note, this is equivalent to the other testBodyWithQueryParams method, - * but with the query parameters collected into a single Map parameter. This - * is convenient for services with optional query parameters, especially when - * used with the {@link TestBodyWithQueryParamsQueryParams} class that allows for - * building up this map in a fluent style. - * @param body (required) - * @param queryParams Map of query parameters as name-value pairs - *

The following elements may be specified in the query map:

- *
    - *
  • query - (required)
  • - *
- */ - @RequestLine("PUT /fake/body-with-query-params?query={query}") - @Headers({ - "Content-Type: application/json", - "Accept: application/json", - }) - void testBodyWithQueryParams(User body, @QueryMap(encoded=true) Map queryParams); - - /** - * A convenience class for generating query parameters for the - * testBodyWithQueryParams method in a fluent style. - */ - public static class TestBodyWithQueryParamsQueryParams extends HashMap { - public TestBodyWithQueryParamsQueryParams query(final String value) { - put("query", EncodingUtils.encode(value)); - return this; - } - } - - /** - * To test \"client\" model - * To test \"client\" model - * @param body client model (required) - * @return Client - */ - @RequestLine("PATCH /fake") - @Headers({ - "Content-Type: application/json", - "Accept: application/json", - }) - Client testClientModel(Client body); - - /** - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - * @param number None (required) - * @param _double None (required) - * @param patternWithoutDelimiter None (required) - * @param _byte None (required) - * @param integer None (optional) - * @param int32 None (optional) - * @param int64 None (optional) - * @param _float None (optional) - * @param string None (optional) - * @param binary None (optional) - * @param date None (optional) - * @param dateTime None (optional) - * @param password None (optional) - * @param paramCallback None (optional) - */ - @RequestLine("POST /fake") - @Headers({ - "Content-Type: application/x-www-form-urlencoded", - "Accept: application/json", - }) - void testEndpointParameters(@Param("number") BigDecimal number, @Param("_double") Double _double, @Param("patternWithoutDelimiter") String patternWithoutDelimiter, @Param("_byte") byte[] _byte, @Param("integer") Integer integer, @Param("int32") Integer int32, @Param("int64") Long int64, @Param("_float") Float _float, @Param("string") String string, @Param("binary") File binary, @Param("date") LocalDate date, @Param("dateTime") OffsetDateTime dateTime, @Param("password") String password, @Param("paramCallback") String paramCallback); - - /** - * To test enum parameters - * To test enum parameters - * @param enumHeaderStringArray Header parameter enum test (string array) (optional) - * @param enumHeaderString Header parameter enum test (string) (optional, default to -efg) - * @param enumQueryStringArray Query parameter enum test (string array) (optional) - * @param enumQueryString Query parameter enum test (string) (optional, default to -efg) - * @param enumQueryInteger Query parameter enum test (double) (optional) - * @param enumQueryDouble Query parameter enum test (double) (optional) - * @param enumFormStringArray Form parameter enum test (string array) (optional) - * @param enumFormString Form parameter enum test (string) (optional, default to -efg) - */ - @RequestLine("GET /fake?enum_query_string_array={enumQueryStringArray}&enum_query_string={enumQueryString}&enum_query_integer={enumQueryInteger}&enum_query_double={enumQueryDouble}") - @Headers({ - "Content-Type: application/x-www-form-urlencoded", - "Accept: application/json", - "enum_header_string_array: {enumHeaderStringArray}", - - "enum_header_string: {enumHeaderString}" - }) - void testEnumParameters(@Param("enumHeaderStringArray") List enumHeaderStringArray, @Param("enumHeaderString") String enumHeaderString, @Param("enumQueryStringArray") List enumQueryStringArray, @Param("enumQueryString") String enumQueryString, @Param("enumQueryInteger") Integer enumQueryInteger, @Param("enumQueryDouble") Double enumQueryDouble, @Param("enumFormStringArray") List enumFormStringArray, @Param("enumFormString") String enumFormString); - - /** - * To test enum parameters - * To test enum parameters - * Note, this is equivalent to the other testEnumParameters method, - * but with the query parameters collected into a single Map parameter. This - * is convenient for services with optional query parameters, especially when - * used with the {@link TestEnumParametersQueryParams} class that allows for - * building up this map in a fluent style. - * @param enumHeaderStringArray Header parameter enum test (string array) (optional) - * @param enumHeaderString Header parameter enum test (string) (optional, default to -efg) - * @param enumFormStringArray Form parameter enum test (string array) (optional) - * @param enumFormString Form parameter enum test (string) (optional, default to -efg) - * @param queryParams Map of query parameters as name-value pairs - *

The following elements may be specified in the query map:

- *
    - *
  • enumQueryStringArray - Query parameter enum test (string array) (optional)
  • - *
  • enumQueryString - Query parameter enum test (string) (optional, default to -efg)
  • - *
  • enumQueryInteger - Query parameter enum test (double) (optional)
  • - *
  • enumQueryDouble - Query parameter enum test (double) (optional)
  • - *
- */ - @RequestLine("GET /fake?enum_query_string_array={enumQueryStringArray}&enum_query_string={enumQueryString}&enum_query_integer={enumQueryInteger}&enum_query_double={enumQueryDouble}") - @Headers({ - "Content-Type: application/x-www-form-urlencoded", - "Accept: application/json", - "enum_header_string_array: {enumHeaderStringArray}", - - "enum_header_string: {enumHeaderString}" - }) - void testEnumParameters(@Param("enumHeaderStringArray") List enumHeaderStringArray, @Param("enumHeaderString") String enumHeaderString, @Param("enumFormStringArray") List enumFormStringArray, @Param("enumFormString") String enumFormString, @QueryMap(encoded=true) Map queryParams); - - /** - * A convenience class for generating query parameters for the - * testEnumParameters method in a fluent style. - */ - public static class TestEnumParametersQueryParams extends HashMap { - public TestEnumParametersQueryParams enumQueryStringArray(final List value) { - put("enum_query_string_array", EncodingUtils.encodeCollection(value, "csv")); - return this; - } - public TestEnumParametersQueryParams enumQueryString(final String value) { - put("enum_query_string", EncodingUtils.encode(value)); - return this; - } - public TestEnumParametersQueryParams enumQueryInteger(final Integer value) { - put("enum_query_integer", EncodingUtils.encode(value)); - return this; - } - public TestEnumParametersQueryParams enumQueryDouble(final Double value) { - put("enum_query_double", EncodingUtils.encode(value)); - return this; - } - } - - /** - * Fake endpoint to test group parameters (optional) - * Fake endpoint to test group parameters (optional) - * @param requiredStringGroup Required String in group parameters (required) - * @param requiredBooleanGroup Required Boolean in group parameters (required) - * @param requiredInt64Group Required Integer in group parameters (required) - * @param stringGroup String in group parameters (optional) - * @param booleanGroup Boolean in group parameters (optional) - * @param int64Group Integer in group parameters (optional) - */ - @RequestLine("DELETE /fake?required_string_group={requiredStringGroup}&required_int64_group={requiredInt64Group}&string_group={stringGroup}&int64_group={int64Group}") - @Headers({ - "Accept: application/json", - "required_boolean_group: {requiredBooleanGroup}", - - "boolean_group: {booleanGroup}" - }) - void testGroupParameters(@Param("requiredStringGroup") Integer requiredStringGroup, @Param("requiredBooleanGroup") Boolean requiredBooleanGroup, @Param("requiredInt64Group") Long requiredInt64Group, @Param("stringGroup") Integer stringGroup, @Param("booleanGroup") Boolean booleanGroup, @Param("int64Group") Long int64Group); - - /** - * Fake endpoint to test group parameters (optional) - * Fake endpoint to test group parameters (optional) - * Note, this is equivalent to the other testGroupParameters method, - * but with the query parameters collected into a single Map parameter. This - * is convenient for services with optional query parameters, especially when - * used with the {@link TestGroupParametersQueryParams} class that allows for - * building up this map in a fluent style. - * @param requiredBooleanGroup Required Boolean in group parameters (required) - * @param booleanGroup Boolean in group parameters (optional) - * @param queryParams Map of query parameters as name-value pairs - *

The following elements may be specified in the query map:

- *
    - *
  • requiredStringGroup - Required String in group parameters (required)
  • - *
  • requiredInt64Group - Required Integer in group parameters (required)
  • - *
  • stringGroup - String in group parameters (optional)
  • - *
  • int64Group - Integer in group parameters (optional)
  • - *
- */ - @RequestLine("DELETE /fake?required_string_group={requiredStringGroup}&required_int64_group={requiredInt64Group}&string_group={stringGroup}&int64_group={int64Group}") - @Headers({ - "Accept: application/json", - "required_boolean_group: {requiredBooleanGroup}", - - "boolean_group: {booleanGroup}" - }) - void testGroupParameters(@Param("requiredBooleanGroup") Boolean requiredBooleanGroup, @Param("booleanGroup") Boolean booleanGroup, @QueryMap(encoded=true) Map queryParams); - - /** - * A convenience class for generating query parameters for the - * testGroupParameters method in a fluent style. - */ - public static class TestGroupParametersQueryParams extends HashMap { - public TestGroupParametersQueryParams requiredStringGroup(final Integer value) { - put("required_string_group", EncodingUtils.encode(value)); - return this; - } - public TestGroupParametersQueryParams requiredInt64Group(final Long value) { - put("required_int64_group", EncodingUtils.encode(value)); - return this; - } - public TestGroupParametersQueryParams stringGroup(final Integer value) { - put("string_group", EncodingUtils.encode(value)); - return this; - } - public TestGroupParametersQueryParams int64Group(final Long value) { - put("int64_group", EncodingUtils.encode(value)); - return this; - } - } - - /** - * test inline additionalProperties - * - * @param param request body (required) - */ - @RequestLine("POST /fake/inline-additionalProperties") - @Headers({ - "Content-Type: application/json", - "Accept: application/json", - }) - void testInlineAdditionalProperties(Map param); - - /** - * test json serialization of form data - * - * @param param field1 (required) - * @param param2 field2 (required) - */ - @RequestLine("GET /fake/jsonFormData") - @Headers({ - "Content-Type: application/x-www-form-urlencoded", - "Accept: application/json", - }) - void testJsonFormData(@Param("param") String param, @Param("param2") String param2); - - /** - * - * To test the collection format in query parameters - * @param pipe (required) - * @param ioutil (required) - * @param http (required) - * @param url (required) - * @param context (required) - */ - @RequestLine("PUT /fake/test-query-paramters?pipe={pipe}&ioutil={ioutil}&http={http}&url={url}&context={context}") - @Headers({ - "Accept: application/json", - }) - void testQueryParameterCollectionFormat(@Param("pipe") List pipe, @Param("ioutil") List ioutil, @Param("http") List http, @Param("url") List url, @Param("context") List context); - - /** - * - * To test the collection format in query parameters - * Note, this is equivalent to the other testQueryParameterCollectionFormat method, - * but with the query parameters collected into a single Map parameter. This - * is convenient for services with optional query parameters, especially when - * used with the {@link TestQueryParameterCollectionFormatQueryParams} class that allows for - * building up this map in a fluent style. - * @param queryParams Map of query parameters as name-value pairs - *

The following elements may be specified in the query map:

- *
    - *
  • pipe - (required)
  • - *
  • ioutil - (required)
  • - *
  • http - (required)
  • - *
  • url - (required)
  • - *
  • context - (required)
  • - *
- */ - @RequestLine("PUT /fake/test-query-paramters?pipe={pipe}&ioutil={ioutil}&http={http}&url={url}&context={context}") - @Headers({ - "Accept: application/json", - }) - void testQueryParameterCollectionFormat(@QueryMap(encoded=true) Map queryParams); - - /** - * A convenience class for generating query parameters for the - * testQueryParameterCollectionFormat method in a fluent style. - */ - public static class TestQueryParameterCollectionFormatQueryParams extends HashMap { - public TestQueryParameterCollectionFormatQueryParams pipe(final List value) { - put("pipe", EncodingUtils.encodeCollection(value, "csv")); - return this; - } - public TestQueryParameterCollectionFormatQueryParams ioutil(final List value) { - put("ioutil", EncodingUtils.encodeCollection(value, "csv")); - return this; - } - public TestQueryParameterCollectionFormatQueryParams http(final List value) { - put("http", EncodingUtils.encodeCollection(value, "space")); - return this; - } - public TestQueryParameterCollectionFormatQueryParams url(final List value) { - put("url", EncodingUtils.encodeCollection(value, "csv")); - return this; - } - public TestQueryParameterCollectionFormatQueryParams context(final List value) { - put("context", EncodingUtils.encodeCollection(value, "multi")); - return this; - } - } -} diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java deleted file mode 100644 index 2df21ad9b96..00000000000 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java +++ /dev/null @@ -1,30 +0,0 @@ -package org.openapitools.client.api; - -import org.openapitools.client.ApiClient; -import org.openapitools.client.EncodingUtils; - -import org.openapitools.client.model.Client; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import feign.*; - - -public interface FakeClassnameTags123Api extends ApiClient.Api { - - - /** - * To test class name in snake case - * To test class name in snake case - * @param body client model (required) - * @return Client - */ - @RequestLine("PATCH /fake_classname_test") - @Headers({ - "Content-Type: application/json", - "Accept: application/json", - }) - Client testClassname(Client body); -} diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/api/PetApi.java deleted file mode 100644 index 48ecf31fd3f..00000000000 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/api/PetApi.java +++ /dev/null @@ -1,201 +0,0 @@ -package org.openapitools.client.api; - -import org.openapitools.client.ApiClient; -import org.openapitools.client.EncodingUtils; - -import java.io.File; -import org.openapitools.client.model.ModelApiResponse; -import org.openapitools.client.model.Pet; -import java.util.Set; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import feign.*; - - -public interface PetApi extends ApiClient.Api { - - - /** - * Add a new pet to the store - * - * @param body Pet object that needs to be added to the store (required) - */ - @RequestLine("POST /pet") - @Headers({ - "Content-Type: application/json", - "Accept: application/json", - }) - void addPet(Pet body); - - /** - * Deletes a pet - * - * @param petId Pet id to delete (required) - * @param apiKey (optional) - */ - @RequestLine("DELETE /pet/{petId}") - @Headers({ - "Accept: application/json", - "api_key: {apiKey}" - }) - void deletePet(@Param("petId") Long petId, @Param("apiKey") String apiKey); - - /** - * 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 (required) - * @return List<Pet> - */ - @RequestLine("GET /pet/findByStatus?status={status}") - @Headers({ - "Accept: application/json", - }) - List findPetsByStatus(@Param("status") List status); - - /** - * Finds Pets by status - * Multiple status values can be provided with comma separated strings - * Note, this is equivalent to the other findPetsByStatus method, - * but with the query parameters collected into a single Map parameter. This - * is convenient for services with optional query parameters, especially when - * used with the {@link FindPetsByStatusQueryParams} class that allows for - * building up this map in a fluent style. - * @param queryParams Map of query parameters as name-value pairs - *

The following elements may be specified in the query map:

- *
    - *
  • status - Status values that need to be considered for filter (required)
  • - *
- * @return List<Pet> - */ - @RequestLine("GET /pet/findByStatus?status={status}") - @Headers({ - "Accept: application/json", - }) - List findPetsByStatus(@QueryMap(encoded=true) Map queryParams); - - /** - * A convenience class for generating query parameters for the - * findPetsByStatus method in a fluent style. - */ - public static class FindPetsByStatusQueryParams extends HashMap { - public FindPetsByStatusQueryParams status(final List value) { - put("status", EncodingUtils.encodeCollection(value, "csv")); - return this; - } - } - - /** - * 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 (required) - * @return Set<Pet> - */ - @RequestLine("GET /pet/findByTags?tags={tags}") - @Headers({ - "Accept: application/json", - }) - Set findPetsByTags(@Param("tags") Set tags); - - /** - * Finds Pets by tags - * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. - * Note, this is equivalent to the other findPetsByTags method, - * but with the query parameters collected into a single Map parameter. This - * is convenient for services with optional query parameters, especially when - * used with the {@link FindPetsByTagsQueryParams} class that allows for - * building up this map in a fluent style. - * @param queryParams Map of query parameters as name-value pairs - *

The following elements may be specified in the query map:

- *
    - *
  • tags - Tags to filter by (required)
  • - *
- * @return Set<Pet> - */ - @RequestLine("GET /pet/findByTags?tags={tags}") - @Headers({ - "Accept: application/json", - }) - Set findPetsByTags(@QueryMap(encoded=true) Map queryParams); - - /** - * A convenience class for generating query parameters for the - * findPetsByTags method in a fluent style. - */ - public static class FindPetsByTagsQueryParams extends HashMap { - public FindPetsByTagsQueryParams tags(final Set value) { - put("tags", EncodingUtils.encodeCollection(value, "csv")); - return this; - } - } - - /** - * Find pet by ID - * Returns a single pet - * @param petId ID of pet to return (required) - * @return Pet - */ - @RequestLine("GET /pet/{petId}") - @Headers({ - "Accept: application/json", - }) - Pet getPetById(@Param("petId") Long petId); - - /** - * Update an existing pet - * - * @param body Pet object that needs to be added to the store (required) - */ - @RequestLine("PUT /pet") - @Headers({ - "Content-Type: application/json", - "Accept: application/json", - }) - void updatePet(Pet body); - - /** - * Updates a pet in the store with form data - * - * @param petId ID of pet that needs to be updated (required) - * @param name Updated name of the pet (optional) - * @param status Updated status of the pet (optional) - */ - @RequestLine("POST /pet/{petId}") - @Headers({ - "Content-Type: application/x-www-form-urlencoded", - "Accept: application/json", - }) - void updatePetWithForm(@Param("petId") Long petId, @Param("name") String name, @Param("status") String status); - - /** - * uploads an image - * - * @param petId ID of pet to update (required) - * @param additionalMetadata Additional data to pass to server (optional) - * @param file file to upload (optional) - * @return ModelApiResponse - */ - @RequestLine("POST /pet/{petId}/uploadImage") - @Headers({ - "Content-Type: multipart/form-data", - "Accept: application/json", - }) - ModelApiResponse uploadFile(@Param("petId") Long petId, @Param("additionalMetadata") String additionalMetadata, @Param("file") File file); - - /** - * uploads an image (required) - * - * @param petId ID of pet to update (required) - * @param requiredFile file to upload (required) - * @param additionalMetadata Additional data to pass to server (optional) - * @return ModelApiResponse - */ - @RequestLine("POST /fake/{petId}/uploadImageWithRequiredFile") - @Headers({ - "Content-Type: multipart/form-data", - "Accept: application/json", - }) - ModelApiResponse uploadFileWithRequiredFile(@Param("petId") Long petId, @Param("requiredFile") File requiredFile, @Param("additionalMetadata") String additionalMetadata); -} diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/api/StoreApi.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/api/StoreApi.java deleted file mode 100644 index 30757ed5731..00000000000 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/api/StoreApi.java +++ /dev/null @@ -1,64 +0,0 @@ -package org.openapitools.client.api; - -import org.openapitools.client.ApiClient; -import org.openapitools.client.EncodingUtils; - -import org.openapitools.client.model.Order; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import feign.*; - - -public interface StoreApi extends ApiClient.Api { - - - /** - * Delete purchase order by ID - * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors - * @param orderId ID of the order that needs to be deleted (required) - */ - @RequestLine("DELETE /store/order/{orderId}") - @Headers({ - "Accept: application/json", - }) - void deleteOrder(@Param("orderId") String orderId); - - /** - * Returns pet inventories by status - * Returns a map of status codes to quantities - * @return Map<String, Integer> - */ - @RequestLine("GET /store/inventory") - @Headers({ - "Accept: application/json", - }) - Map getInventory(); - - /** - * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions - * @param orderId ID of pet that needs to be fetched (required) - * @return Order - */ - @RequestLine("GET /store/order/{orderId}") - @Headers({ - "Accept: application/json", - }) - Order getOrderById(@Param("orderId") Long orderId); - - /** - * Place an order for a pet - * - * @param body order placed for purchasing the pet (required) - * @return Order - */ - @RequestLine("POST /store/order") - @Headers({ - "Content-Type: */*", - "Accept: application/json", - }) - Order placeOrder(Order body); -} diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/api/UserApi.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/api/UserApi.java deleted file mode 100644 index d74a9a2f809..00000000000 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/api/UserApi.java +++ /dev/null @@ -1,149 +0,0 @@ -package org.openapitools.client.api; - -import org.openapitools.client.ApiClient; -import org.openapitools.client.EncodingUtils; - -import org.openapitools.client.model.User; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import feign.*; - - -public interface UserApi extends ApiClient.Api { - - - /** - * Create user - * This can only be done by the logged in user. - * @param body Created user object (required) - */ - @RequestLine("POST /user") - @Headers({ - "Content-Type: */*", - "Accept: application/json", - }) - void createUser(User body); - - /** - * Creates list of users with given input array - * - * @param body List of user object (required) - */ - @RequestLine("POST /user/createWithArray") - @Headers({ - "Content-Type: */*", - "Accept: application/json", - }) - void createUsersWithArrayInput(List body); - - /** - * Creates list of users with given input array - * - * @param body List of user object (required) - */ - @RequestLine("POST /user/createWithList") - @Headers({ - "Content-Type: */*", - "Accept: application/json", - }) - void createUsersWithListInput(List body); - - /** - * Delete user - * This can only be done by the logged in user. - * @param username The name that needs to be deleted (required) - */ - @RequestLine("DELETE /user/{username}") - @Headers({ - "Accept: application/json", - }) - void deleteUser(@Param("username") String username); - - /** - * Get user by user name - * - * @param username The name that needs to be fetched. Use user1 for testing. (required) - * @return User - */ - @RequestLine("GET /user/{username}") - @Headers({ - "Accept: application/json", - }) - User getUserByName(@Param("username") String username); - - /** - * Logs user into the system - * - * @param username The user name for login (required) - * @param password The password for login in clear text (required) - * @return String - */ - @RequestLine("GET /user/login?username={username}&password={password}") - @Headers({ - "Accept: application/json", - }) - String loginUser(@Param("username") String username, @Param("password") String password); - - /** - * Logs user into the system - * - * Note, this is equivalent to the other loginUser method, - * but with the query parameters collected into a single Map parameter. This - * is convenient for services with optional query parameters, especially when - * used with the {@link LoginUserQueryParams} class that allows for - * building up this map in a fluent style. - * @param queryParams Map of query parameters as name-value pairs - *

The following elements may be specified in the query map:

- *
    - *
  • username - The user name for login (required)
  • - *
  • password - The password for login in clear text (required)
  • - *
- * @return String - */ - @RequestLine("GET /user/login?username={username}&password={password}") - @Headers({ - "Accept: application/json", - }) - String loginUser(@QueryMap(encoded=true) Map queryParams); - - /** - * A convenience class for generating query parameters for the - * loginUser method in a fluent style. - */ - public static class LoginUserQueryParams extends HashMap { - public LoginUserQueryParams username(final String value) { - put("username", EncodingUtils.encode(value)); - return this; - } - public LoginUserQueryParams password(final String value) { - put("password", EncodingUtils.encode(value)); - return this; - } - } - - /** - * Logs out current logged in user session - * - */ - @RequestLine("GET /user/logout") - @Headers({ - "Accept: application/json", - }) - void logoutUser(); - - /** - * Updated user - * This can only be done by the logged in user. - * @param username name that need to be deleted (required) - * @param body Updated user object (required) - */ - @RequestLine("PUT /user/{username}") - @Headers({ - "Content-Type: */*", - "Accept: application/json", - }) - void updateUser(@Param("username") String username, User body); -} diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java deleted file mode 100644 index 44511e4641c..00000000000 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java +++ /dev/null @@ -1,43 +0,0 @@ -package org.openapitools.client.auth; - -import feign.RequestInterceptor; -import feign.RequestTemplate; - -public class ApiKeyAuth implements RequestInterceptor { - private final String location; - private final String paramName; - - private String apiKey; - - public ApiKeyAuth(String location, String paramName) { - this.location = location; - this.paramName = paramName; - } - - public String getLocation() { - return location; - } - - public String getParamName() { - return paramName; - } - - public String getApiKey() { - return apiKey; - } - - public void setApiKey(String apiKey) { - this.apiKey = apiKey; - } - - @Override - public void apply(RequestTemplate template) { - if ("query".equals(location)) { - template.query(paramName, apiKey); - } else if ("header".equals(location)) { - template.header(paramName, apiKey); - } else if ("cookie".equals(location)) { - template.header("Cookie", String.format("%s=%s", paramName, apiKey)); - } - } -} diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/auth/HttpBasicAuth.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/auth/HttpBasicAuth.java deleted file mode 100644 index b275826472a..00000000000 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/auth/HttpBasicAuth.java +++ /dev/null @@ -1,41 +0,0 @@ -package org.openapitools.client.auth; - -import feign.RequestInterceptor; -import feign.RequestTemplate; -import feign.auth.BasicAuthRequestInterceptor; - -/** - * An interceptor that adds the request header needed to use HTTP basic authentication. - */ -public class HttpBasicAuth implements RequestInterceptor { - - private String username; - private String password; - - public String getUsername() { - return username; - } - - public void setUsername(String username) { - this.username = username; - } - - public String getPassword() { - return password; - } - - public void setPassword(String password) { - this.password = password; - } - - public void setCredentials(String username, String password) { - this.username = username; - this.password = password; - } - - @Override - public void apply(RequestTemplate template) { - RequestInterceptor requestInterceptor = new BasicAuthRequestInterceptor(username, password); - requestInterceptor.apply(template); - } -} diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/auth/HttpBearerAuth.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/auth/HttpBearerAuth.java deleted file mode 100644 index d4c9cbe6361..00000000000 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/auth/HttpBearerAuth.java +++ /dev/null @@ -1,43 +0,0 @@ -package org.openapitools.client.auth; - -import feign.RequestInterceptor; -import feign.RequestTemplate; - -/** - * An interceptor that adds the request header needed to use HTTP bearer authentication. - */ -public class HttpBearerAuth implements RequestInterceptor { - private final String scheme; - private String bearerToken; - - public HttpBearerAuth(String scheme) { - this.scheme = scheme; - } - - /** - * Gets the token, which together with the scheme, will be sent as the value of the Authorization header. - */ - public String getBearerToken() { - return bearerToken; - } - - /** - * Sets the token, which together with the scheme, will be sent as the value of the Authorization header. - */ - public void setBearerToken(String bearerToken) { - this.bearerToken = bearerToken; - } - - @Override - public void apply(RequestTemplate template) { - if(bearerToken == null) { - return; - } - - template.header("Authorization", (scheme != null ? upperCaseBearer(scheme) + " " : "") + bearerToken); - } - - private static String upperCaseBearer(String scheme) { - return ("bearer".equalsIgnoreCase(scheme)) ? "Bearer" : scheme; - } -} diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/auth/OAuth.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/auth/OAuth.java deleted file mode 100644 index d6d6fae57fb..00000000000 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/auth/OAuth.java +++ /dev/null @@ -1,197 +0,0 @@ -package org.openapitools.client.auth; - -import java.io.IOException; -import java.util.Collection; -import java.util.Map; -import java.util.Map.Entry; - -import org.apache.oltu.oauth2.client.HttpClient; -import org.apache.oltu.oauth2.client.OAuthClient; -import org.apache.oltu.oauth2.client.request.OAuthClientRequest; -import org.apache.oltu.oauth2.client.request.OAuthClientRequest.AuthenticationRequestBuilder; -import org.apache.oltu.oauth2.client.request.OAuthClientRequest.TokenRequestBuilder; -import org.apache.oltu.oauth2.client.response.OAuthClientResponse; -import org.apache.oltu.oauth2.client.response.OAuthClientResponseFactory; -import org.apache.oltu.oauth2.client.response.OAuthJSONAccessTokenResponse; -import org.apache.oltu.oauth2.common.exception.OAuthProblemException; -import org.apache.oltu.oauth2.common.exception.OAuthSystemException; -import org.apache.oltu.oauth2.common.message.types.GrantType; -import org.apache.oltu.oauth2.common.token.BasicOAuthToken; - -import feign.Client; -import feign.Request.Options; -import feign.RequestInterceptor; -import feign.RequestTemplate; -import feign.Response; -import feign.RetryableException; -import feign.Util; -import org.openapitools.client.StringUtil; - - -public class OAuth implements RequestInterceptor { - - static final int MILLIS_PER_SECOND = 1000; - - public interface AccessTokenListener { - void notify(BasicOAuthToken token); - } - - private volatile String accessToken; - private Long expirationTimeMillis; - private OAuthClient oauthClient; - private TokenRequestBuilder tokenRequestBuilder; - private AuthenticationRequestBuilder authenticationRequestBuilder; - private AccessTokenListener accessTokenListener; - - public OAuth(Client client, TokenRequestBuilder requestBuilder) { - this.oauthClient = new OAuthClient(new OAuthFeignClient(client)); - this.tokenRequestBuilder = requestBuilder; - } - - public OAuth(Client client, OAuthFlow flow, String authorizationUrl, String tokenUrl, String scopes) { - this(client, OAuthClientRequest.tokenLocation(tokenUrl).setScope(scopes)); - - switch(flow) { - case accessCode: - case implicit: - tokenRequestBuilder.setGrantType(GrantType.AUTHORIZATION_CODE); - break; - case password: - tokenRequestBuilder.setGrantType(GrantType.PASSWORD); - break; - case application: - tokenRequestBuilder.setGrantType(GrantType.CLIENT_CREDENTIALS); - break; - default: - break; - } - authenticationRequestBuilder = OAuthClientRequest.authorizationLocation(authorizationUrl); - } - - public OAuth(OAuthFlow flow, String authorizationUrl, String tokenUrl, String scopes) { - this(new Client.Default(null, null), flow, authorizationUrl, tokenUrl, scopes); - } - - @Override - public void apply(RequestTemplate template) { - // If the request already have an authorization (eg. Basic auth), do nothing - if (template.headers().containsKey("Authorization")) { - return; - } - // If first time, get the token - if (expirationTimeMillis == null || System.currentTimeMillis() >= expirationTimeMillis) { - updateAccessToken(template); - } - if (getAccessToken() != null) { - template.header("Authorization", "Bearer " + getAccessToken()); - } - } - - public synchronized void updateAccessToken(RequestTemplate template) { - OAuthJSONAccessTokenResponse accessTokenResponse; - try { - accessTokenResponse = oauthClient.accessToken(tokenRequestBuilder.buildBodyMessage()); - } catch (Exception e) { - throw new RetryableException(e.getMessage(), e,null); - } - if (accessTokenResponse != null && accessTokenResponse.getAccessToken() != null) { - setAccessToken(accessTokenResponse.getAccessToken(), accessTokenResponse.getExpiresIn()); - if (accessTokenListener != null) { - accessTokenListener.notify((BasicOAuthToken) accessTokenResponse.getOAuthToken()); - } - } - } - - public synchronized void registerAccessTokenListener(AccessTokenListener accessTokenListener) { - this.accessTokenListener = accessTokenListener; - } - - public synchronized String getAccessToken() { - return accessToken; - } - - public synchronized void setAccessToken(String accessToken, Long expiresIn) { - this.accessToken = accessToken; - this.expirationTimeMillis = expiresIn == null ? null : System.currentTimeMillis() + expiresIn * MILLIS_PER_SECOND; - } - - public TokenRequestBuilder getTokenRequestBuilder() { - return tokenRequestBuilder; - } - - public void setTokenRequestBuilder(TokenRequestBuilder tokenRequestBuilder) { - this.tokenRequestBuilder = tokenRequestBuilder; - } - - public AuthenticationRequestBuilder getAuthenticationRequestBuilder() { - return authenticationRequestBuilder; - } - - public void setAuthenticationRequestBuilder(AuthenticationRequestBuilder authenticationRequestBuilder) { - this.authenticationRequestBuilder = authenticationRequestBuilder; - } - - public OAuthClient getOauthClient() { - return oauthClient; - } - - public void setOauthClient(OAuthClient oauthClient) { - this.oauthClient = oauthClient; - } - - public void setOauthClient(Client client) { - this.oauthClient = new OAuthClient( new OAuthFeignClient(client)); - } - - public static class OAuthFeignClient implements HttpClient { - - private Client client; - - public OAuthFeignClient() { - this.client = new Client.Default(null, null); - } - - public OAuthFeignClient(Client client) { - this.client = client; - } - - public T execute(OAuthClientRequest request, Map headers, - String requestMethod, Class responseClass) - throws OAuthSystemException, OAuthProblemException { - - RequestTemplate req = new RequestTemplate() - .append(request.getLocationUri()) - .method(requestMethod) - .body(request.getBody()); - - for (Entry entry : headers.entrySet()) { - req.header(entry.getKey(), entry.getValue()); - } - Response feignResponse; - String body = ""; - try { - feignResponse = client.execute(req.request(), new Options()); - body = Util.toString(feignResponse.body().asReader()); - } catch (IOException e) { - throw new OAuthSystemException(e); - } - - String contentType = null; - Collection contentTypeHeader = feignResponse.headers().get("Content-Type"); - if(contentTypeHeader != null) { - contentType = StringUtil.join(contentTypeHeader.toArray(new String[0]), ";"); - } - - return OAuthClientResponseFactory.createCustomResponse( - body, - contentType, - feignResponse.status(), - responseClass - ); - } - - public void shutdown() { - // Nothing to do here - } - } -} diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/auth/OAuthFlow.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/auth/OAuthFlow.java deleted file mode 100644 index b2d11ff0c4f..00000000000 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/auth/OAuthFlow.java +++ /dev/null @@ -1,18 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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. - */ - - -package org.openapitools.client.auth; - -public enum OAuthFlow { - accessCode, implicit, password, application -} diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java deleted file mode 100644 index b3b18538873..00000000000 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java +++ /dev/null @@ -1,107 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.util.HashMap; -import java.util.Map; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - -/** - * AdditionalPropertiesAnyType - */ -@JsonPropertyOrder({ - AdditionalPropertiesAnyType.JSON_PROPERTY_NAME -}) -@javax.annotation.concurrent.Immutable - -public class AdditionalPropertiesAnyType extends HashMap { - public static final String JSON_PROPERTY_NAME = "name"; - private String name; - - - public AdditionalPropertiesAnyType name(String name) { - - this.name = name; - return this; - } - - /** - * Get name - * @return name - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getName() { - return name; - } - - - public void setName(String name) { - this.name = name; - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AdditionalPropertiesAnyType additionalPropertiesAnyType = (AdditionalPropertiesAnyType) o; - return Objects.equals(this.name, additionalPropertiesAnyType.name) && - super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(name, super.hashCode()); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AdditionalPropertiesAnyType {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java deleted file mode 100644 index b096a099e9d..00000000000 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java +++ /dev/null @@ -1,108 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - -/** - * AdditionalPropertiesArray - */ -@JsonPropertyOrder({ - AdditionalPropertiesArray.JSON_PROPERTY_NAME -}) -@javax.annotation.concurrent.Immutable - -public class AdditionalPropertiesArray extends HashMap { - public static final String JSON_PROPERTY_NAME = "name"; - private String name; - - - public AdditionalPropertiesArray name(String name) { - - this.name = name; - return this; - } - - /** - * Get name - * @return name - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getName() { - return name; - } - - - public void setName(String name) { - this.name = name; - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AdditionalPropertiesArray additionalPropertiesArray = (AdditionalPropertiesArray) o; - return Objects.equals(this.name, additionalPropertiesArray.name) && - super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(name, super.hashCode()); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AdditionalPropertiesArray {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java deleted file mode 100644 index cb08b798a87..00000000000 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java +++ /dev/null @@ -1,107 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.util.HashMap; -import java.util.Map; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - -/** - * AdditionalPropertiesBoolean - */ -@JsonPropertyOrder({ - AdditionalPropertiesBoolean.JSON_PROPERTY_NAME -}) -@javax.annotation.concurrent.Immutable - -public class AdditionalPropertiesBoolean extends HashMap { - public static final String JSON_PROPERTY_NAME = "name"; - private String name; - - - public AdditionalPropertiesBoolean name(String name) { - - this.name = name; - return this; - } - - /** - * Get name - * @return name - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getName() { - return name; - } - - - public void setName(String name) { - this.name = name; - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AdditionalPropertiesBoolean additionalPropertiesBoolean = (AdditionalPropertiesBoolean) o; - return Objects.equals(this.name, additionalPropertiesBoolean.name) && - super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(name, super.hashCode()); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AdditionalPropertiesBoolean {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java deleted file mode 100644 index e35f2cca9ab..00000000000 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java +++ /dev/null @@ -1,481 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.math.BigDecimal; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - -/** - * AdditionalPropertiesClass - */ -@JsonPropertyOrder({ - AdditionalPropertiesClass.JSON_PROPERTY_MAP_STRING, - AdditionalPropertiesClass.JSON_PROPERTY_MAP_NUMBER, - AdditionalPropertiesClass.JSON_PROPERTY_MAP_INTEGER, - AdditionalPropertiesClass.JSON_PROPERTY_MAP_BOOLEAN, - AdditionalPropertiesClass.JSON_PROPERTY_MAP_ARRAY_INTEGER, - AdditionalPropertiesClass.JSON_PROPERTY_MAP_ARRAY_ANYTYPE, - AdditionalPropertiesClass.JSON_PROPERTY_MAP_MAP_STRING, - AdditionalPropertiesClass.JSON_PROPERTY_MAP_MAP_ANYTYPE, - AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE1, - AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE2, - AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE3 -}) -@javax.annotation.concurrent.Immutable - -public class AdditionalPropertiesClass { - public static final String JSON_PROPERTY_MAP_STRING = "map_string"; - private Map mapString = null; - - public static final String JSON_PROPERTY_MAP_NUMBER = "map_number"; - private Map mapNumber = null; - - public static final String JSON_PROPERTY_MAP_INTEGER = "map_integer"; - private Map mapInteger = null; - - public static final String JSON_PROPERTY_MAP_BOOLEAN = "map_boolean"; - private Map mapBoolean = null; - - public static final String JSON_PROPERTY_MAP_ARRAY_INTEGER = "map_array_integer"; - private Map> mapArrayInteger = null; - - public static final String JSON_PROPERTY_MAP_ARRAY_ANYTYPE = "map_array_anytype"; - private Map> mapArrayAnytype = null; - - public static final String JSON_PROPERTY_MAP_MAP_STRING = "map_map_string"; - private Map> mapMapString = null; - - public static final String JSON_PROPERTY_MAP_MAP_ANYTYPE = "map_map_anytype"; - private Map> mapMapAnytype = null; - - public static final String JSON_PROPERTY_ANYTYPE1 = "anytype_1"; - private Object anytype1; - - public static final String JSON_PROPERTY_ANYTYPE2 = "anytype_2"; - private Object anytype2; - - public static final String JSON_PROPERTY_ANYTYPE3 = "anytype_3"; - private Object anytype3; - - - public AdditionalPropertiesClass mapString(Map mapString) { - - this.mapString = mapString; - return this; - } - - public AdditionalPropertiesClass putMapStringItem(String key, String mapStringItem) { - if (this.mapString == null) { - this.mapString = new HashMap(); - } - this.mapString.put(key, mapStringItem); - return this; - } - - /** - * Get mapString - * @return mapString - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_MAP_STRING) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Map getMapString() { - return mapString; - } - - - public void setMapString(Map mapString) { - this.mapString = mapString; - } - - - public AdditionalPropertiesClass mapNumber(Map mapNumber) { - - this.mapNumber = mapNumber; - return this; - } - - public AdditionalPropertiesClass putMapNumberItem(String key, BigDecimal mapNumberItem) { - if (this.mapNumber == null) { - this.mapNumber = new HashMap(); - } - this.mapNumber.put(key, mapNumberItem); - return this; - } - - /** - * Get mapNumber - * @return mapNumber - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_MAP_NUMBER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Map getMapNumber() { - return mapNumber; - } - - - public void setMapNumber(Map mapNumber) { - this.mapNumber = mapNumber; - } - - - public AdditionalPropertiesClass mapInteger(Map mapInteger) { - - this.mapInteger = mapInteger; - return this; - } - - public AdditionalPropertiesClass putMapIntegerItem(String key, Integer mapIntegerItem) { - if (this.mapInteger == null) { - this.mapInteger = new HashMap(); - } - this.mapInteger.put(key, mapIntegerItem); - return this; - } - - /** - * Get mapInteger - * @return mapInteger - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_MAP_INTEGER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Map getMapInteger() { - return mapInteger; - } - - - public void setMapInteger(Map mapInteger) { - this.mapInteger = mapInteger; - } - - - public AdditionalPropertiesClass mapBoolean(Map mapBoolean) { - - this.mapBoolean = mapBoolean; - return this; - } - - public AdditionalPropertiesClass putMapBooleanItem(String key, Boolean mapBooleanItem) { - if (this.mapBoolean == null) { - this.mapBoolean = new HashMap(); - } - this.mapBoolean.put(key, mapBooleanItem); - return this; - } - - /** - * Get mapBoolean - * @return mapBoolean - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_MAP_BOOLEAN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Map getMapBoolean() { - return mapBoolean; - } - - - public void setMapBoolean(Map mapBoolean) { - this.mapBoolean = mapBoolean; - } - - - public AdditionalPropertiesClass mapArrayInteger(Map> mapArrayInteger) { - - this.mapArrayInteger = mapArrayInteger; - return this; - } - - public AdditionalPropertiesClass putMapArrayIntegerItem(String key, List mapArrayIntegerItem) { - if (this.mapArrayInteger == null) { - this.mapArrayInteger = new HashMap>(); - } - this.mapArrayInteger.put(key, mapArrayIntegerItem); - return this; - } - - /** - * Get mapArrayInteger - * @return mapArrayInteger - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_MAP_ARRAY_INTEGER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Map> getMapArrayInteger() { - return mapArrayInteger; - } - - - public void setMapArrayInteger(Map> mapArrayInteger) { - this.mapArrayInteger = mapArrayInteger; - } - - - public AdditionalPropertiesClass mapArrayAnytype(Map> mapArrayAnytype) { - - this.mapArrayAnytype = mapArrayAnytype; - return this; - } - - public AdditionalPropertiesClass putMapArrayAnytypeItem(String key, List mapArrayAnytypeItem) { - if (this.mapArrayAnytype == null) { - this.mapArrayAnytype = new HashMap>(); - } - this.mapArrayAnytype.put(key, mapArrayAnytypeItem); - return this; - } - - /** - * Get mapArrayAnytype - * @return mapArrayAnytype - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_MAP_ARRAY_ANYTYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Map> getMapArrayAnytype() { - return mapArrayAnytype; - } - - - public void setMapArrayAnytype(Map> mapArrayAnytype) { - this.mapArrayAnytype = mapArrayAnytype; - } - - - public AdditionalPropertiesClass mapMapString(Map> mapMapString) { - - this.mapMapString = mapMapString; - return this; - } - - public AdditionalPropertiesClass putMapMapStringItem(String key, Map mapMapStringItem) { - if (this.mapMapString == null) { - this.mapMapString = new HashMap>(); - } - this.mapMapString.put(key, mapMapStringItem); - return this; - } - - /** - * Get mapMapString - * @return mapMapString - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_MAP_MAP_STRING) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Map> getMapMapString() { - return mapMapString; - } - - - public void setMapMapString(Map> mapMapString) { - this.mapMapString = mapMapString; - } - - - public AdditionalPropertiesClass mapMapAnytype(Map> mapMapAnytype) { - - this.mapMapAnytype = mapMapAnytype; - return this; - } - - public AdditionalPropertiesClass putMapMapAnytypeItem(String key, Map mapMapAnytypeItem) { - if (this.mapMapAnytype == null) { - this.mapMapAnytype = new HashMap>(); - } - this.mapMapAnytype.put(key, mapMapAnytypeItem); - return this; - } - - /** - * Get mapMapAnytype - * @return mapMapAnytype - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_MAP_MAP_ANYTYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Map> getMapMapAnytype() { - return mapMapAnytype; - } - - - public void setMapMapAnytype(Map> mapMapAnytype) { - this.mapMapAnytype = mapMapAnytype; - } - - - public AdditionalPropertiesClass anytype1(Object anytype1) { - - this.anytype1 = anytype1; - return this; - } - - /** - * Get anytype1 - * @return anytype1 - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_ANYTYPE1) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Object getAnytype1() { - return anytype1; - } - - - public void setAnytype1(Object anytype1) { - this.anytype1 = anytype1; - } - - - public AdditionalPropertiesClass anytype2(Object anytype2) { - - this.anytype2 = anytype2; - return this; - } - - /** - * Get anytype2 - * @return anytype2 - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_ANYTYPE2) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Object getAnytype2() { - return anytype2; - } - - - public void setAnytype2(Object anytype2) { - this.anytype2 = anytype2; - } - - - public AdditionalPropertiesClass anytype3(Object anytype3) { - - this.anytype3 = anytype3; - return this; - } - - /** - * Get anytype3 - * @return anytype3 - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_ANYTYPE3) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Object getAnytype3() { - return anytype3; - } - - - public void setAnytype3(Object anytype3) { - this.anytype3 = anytype3; - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AdditionalPropertiesClass additionalPropertiesClass = (AdditionalPropertiesClass) o; - return Objects.equals(this.mapString, additionalPropertiesClass.mapString) && - Objects.equals(this.mapNumber, additionalPropertiesClass.mapNumber) && - Objects.equals(this.mapInteger, additionalPropertiesClass.mapInteger) && - Objects.equals(this.mapBoolean, additionalPropertiesClass.mapBoolean) && - Objects.equals(this.mapArrayInteger, additionalPropertiesClass.mapArrayInteger) && - Objects.equals(this.mapArrayAnytype, additionalPropertiesClass.mapArrayAnytype) && - Objects.equals(this.mapMapString, additionalPropertiesClass.mapMapString) && - Objects.equals(this.mapMapAnytype, additionalPropertiesClass.mapMapAnytype) && - Objects.equals(this.anytype1, additionalPropertiesClass.anytype1) && - Objects.equals(this.anytype2, additionalPropertiesClass.anytype2) && - Objects.equals(this.anytype3, additionalPropertiesClass.anytype3); - } - - @Override - public int hashCode() { - return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, anytype1, anytype2, anytype3); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AdditionalPropertiesClass {\n"); - sb.append(" mapString: ").append(toIndentedString(mapString)).append("\n"); - sb.append(" mapNumber: ").append(toIndentedString(mapNumber)).append("\n"); - sb.append(" mapInteger: ").append(toIndentedString(mapInteger)).append("\n"); - sb.append(" mapBoolean: ").append(toIndentedString(mapBoolean)).append("\n"); - sb.append(" mapArrayInteger: ").append(toIndentedString(mapArrayInteger)).append("\n"); - sb.append(" mapArrayAnytype: ").append(toIndentedString(mapArrayAnytype)).append("\n"); - sb.append(" mapMapString: ").append(toIndentedString(mapMapString)).append("\n"); - sb.append(" mapMapAnytype: ").append(toIndentedString(mapMapAnytype)).append("\n"); - sb.append(" anytype1: ").append(toIndentedString(anytype1)).append("\n"); - sb.append(" anytype2: ").append(toIndentedString(anytype2)).append("\n"); - sb.append(" anytype3: ").append(toIndentedString(anytype3)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java deleted file mode 100644 index c3241fbab3d..00000000000 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java +++ /dev/null @@ -1,107 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.util.HashMap; -import java.util.Map; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - -/** - * AdditionalPropertiesInteger - */ -@JsonPropertyOrder({ - AdditionalPropertiesInteger.JSON_PROPERTY_NAME -}) -@javax.annotation.concurrent.Immutable - -public class AdditionalPropertiesInteger extends HashMap { - public static final String JSON_PROPERTY_NAME = "name"; - private String name; - - - public AdditionalPropertiesInteger name(String name) { - - this.name = name; - return this; - } - - /** - * Get name - * @return name - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getName() { - return name; - } - - - public void setName(String name) { - this.name = name; - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AdditionalPropertiesInteger additionalPropertiesInteger = (AdditionalPropertiesInteger) o; - return Objects.equals(this.name, additionalPropertiesInteger.name) && - super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(name, super.hashCode()); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AdditionalPropertiesInteger {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java deleted file mode 100644 index 2e4c40ce549..00000000000 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java +++ /dev/null @@ -1,108 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.math.BigDecimal; -import java.util.HashMap; -import java.util.Map; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - -/** - * AdditionalPropertiesNumber - */ -@JsonPropertyOrder({ - AdditionalPropertiesNumber.JSON_PROPERTY_NAME -}) -@javax.annotation.concurrent.Immutable - -public class AdditionalPropertiesNumber extends HashMap { - public static final String JSON_PROPERTY_NAME = "name"; - private String name; - - - public AdditionalPropertiesNumber name(String name) { - - this.name = name; - return this; - } - - /** - * Get name - * @return name - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getName() { - return name; - } - - - public void setName(String name) { - this.name = name; - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AdditionalPropertiesNumber additionalPropertiesNumber = (AdditionalPropertiesNumber) o; - return Objects.equals(this.name, additionalPropertiesNumber.name) && - super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(name, super.hashCode()); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AdditionalPropertiesNumber {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java deleted file mode 100644 index ac8cd6cf152..00000000000 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java +++ /dev/null @@ -1,107 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.util.HashMap; -import java.util.Map; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - -/** - * AdditionalPropertiesObject - */ -@JsonPropertyOrder({ - AdditionalPropertiesObject.JSON_PROPERTY_NAME -}) -@javax.annotation.concurrent.Immutable - -public class AdditionalPropertiesObject extends HashMap { - public static final String JSON_PROPERTY_NAME = "name"; - private String name; - - - public AdditionalPropertiesObject name(String name) { - - this.name = name; - return this; - } - - /** - * Get name - * @return name - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getName() { - return name; - } - - - public void setName(String name) { - this.name = name; - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AdditionalPropertiesObject additionalPropertiesObject = (AdditionalPropertiesObject) o; - return Objects.equals(this.name, additionalPropertiesObject.name) && - super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(name, super.hashCode()); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AdditionalPropertiesObject {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java deleted file mode 100644 index 94b3707ee95..00000000000 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java +++ /dev/null @@ -1,107 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.util.HashMap; -import java.util.Map; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - -/** - * AdditionalPropertiesString - */ -@JsonPropertyOrder({ - AdditionalPropertiesString.JSON_PROPERTY_NAME -}) -@javax.annotation.concurrent.Immutable - -public class AdditionalPropertiesString extends HashMap { - public static final String JSON_PROPERTY_NAME = "name"; - private String name; - - - public AdditionalPropertiesString name(String name) { - - this.name = name; - return this; - } - - /** - * Get name - * @return name - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getName() { - return name; - } - - - public void setName(String name) { - this.name = name; - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AdditionalPropertiesString additionalPropertiesString = (AdditionalPropertiesString) o; - return Objects.equals(this.name, additionalPropertiesString.name) && - super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(name, super.hashCode()); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AdditionalPropertiesString {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Animal.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Animal.java deleted file mode 100644 index f556fe11883..00000000000 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Animal.java +++ /dev/null @@ -1,145 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import org.openapitools.client.model.BigCat; -import org.openapitools.client.model.Cat; -import org.openapitools.client.model.Dog; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - -/** - * Animal - */ -@JsonPropertyOrder({ - Animal.JSON_PROPERTY_CLASS_NAME, - Animal.JSON_PROPERTY_COLOR -}) -@javax.annotation.concurrent.Immutable - -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) -@JsonSubTypes({ - @JsonSubTypes.Type(value = BigCat.class, name = "BigCat"), - @JsonSubTypes.Type(value = Cat.class, name = "Cat"), - @JsonSubTypes.Type(value = Dog.class, name = "Dog"), -}) - -public class Animal { - public static final String JSON_PROPERTY_CLASS_NAME = "className"; - protected String className; - - public static final String JSON_PROPERTY_COLOR = "color"; - private String color = "red"; - - - public Animal className(String className) { - - this.className = className; - return this; - } - - /** - * Get className - * @return className - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_CLASS_NAME) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - - public String getClassName() { - return className; - } - - - public void setClassName(String className) { - this.className = className; - } - - - public Animal color(String color) { - - this.color = color; - return this; - } - - /** - * Get color - * @return color - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_COLOR) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getColor() { - return color; - } - - - public void setColor(String color) { - this.color = color; - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Animal animal = (Animal) o; - return Objects.equals(this.className, animal.className) && - Objects.equals(this.color, animal.color); - } - - @Override - public int hashCode() { - return Objects.hash(className, color); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Animal {\n"); - sb.append(" className: ").append(toIndentedString(className)).append("\n"); - sb.append(" color: ").append(toIndentedString(color)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java deleted file mode 100644 index d2b96d3910a..00000000000 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java +++ /dev/null @@ -1,114 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.math.BigDecimal; -import java.util.ArrayList; -import java.util.List; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - -/** - * ArrayOfArrayOfNumberOnly - */ -@JsonPropertyOrder({ - ArrayOfArrayOfNumberOnly.JSON_PROPERTY_ARRAY_ARRAY_NUMBER -}) -@javax.annotation.concurrent.Immutable - -public class ArrayOfArrayOfNumberOnly { - public static final String JSON_PROPERTY_ARRAY_ARRAY_NUMBER = "ArrayArrayNumber"; - private List> arrayArrayNumber = null; - - - public ArrayOfArrayOfNumberOnly arrayArrayNumber(List> arrayArrayNumber) { - - this.arrayArrayNumber = arrayArrayNumber; - return this; - } - - public ArrayOfArrayOfNumberOnly addArrayArrayNumberItem(List arrayArrayNumberItem) { - if (this.arrayArrayNumber == null) { - this.arrayArrayNumber = new ArrayList>(); - } - this.arrayArrayNumber.add(arrayArrayNumberItem); - return this; - } - - /** - * Get arrayArrayNumber - * @return arrayArrayNumber - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_ARRAY_ARRAY_NUMBER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public List> getArrayArrayNumber() { - return arrayArrayNumber; - } - - - public void setArrayArrayNumber(List> arrayArrayNumber) { - this.arrayArrayNumber = arrayArrayNumber; - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ArrayOfArrayOfNumberOnly arrayOfArrayOfNumberOnly = (ArrayOfArrayOfNumberOnly) o; - return Objects.equals(this.arrayArrayNumber, arrayOfArrayOfNumberOnly.arrayArrayNumber); - } - - @Override - public int hashCode() { - return Objects.hash(arrayArrayNumber); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ArrayOfArrayOfNumberOnly {\n"); - sb.append(" arrayArrayNumber: ").append(toIndentedString(arrayArrayNumber)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java deleted file mode 100644 index c4ad3fd608d..00000000000 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java +++ /dev/null @@ -1,114 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.math.BigDecimal; -import java.util.ArrayList; -import java.util.List; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - -/** - * ArrayOfNumberOnly - */ -@JsonPropertyOrder({ - ArrayOfNumberOnly.JSON_PROPERTY_ARRAY_NUMBER -}) -@javax.annotation.concurrent.Immutable - -public class ArrayOfNumberOnly { - public static final String JSON_PROPERTY_ARRAY_NUMBER = "ArrayNumber"; - private List arrayNumber = null; - - - public ArrayOfNumberOnly arrayNumber(List arrayNumber) { - - this.arrayNumber = arrayNumber; - return this; - } - - public ArrayOfNumberOnly addArrayNumberItem(BigDecimal arrayNumberItem) { - if (this.arrayNumber == null) { - this.arrayNumber = new ArrayList(); - } - this.arrayNumber.add(arrayNumberItem); - return this; - } - - /** - * Get arrayNumber - * @return arrayNumber - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_ARRAY_NUMBER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public List getArrayNumber() { - return arrayNumber; - } - - - public void setArrayNumber(List arrayNumber) { - this.arrayNumber = arrayNumber; - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ArrayOfNumberOnly arrayOfNumberOnly = (ArrayOfNumberOnly) o; - return Objects.equals(this.arrayNumber, arrayOfNumberOnly.arrayNumber); - } - - @Override - public int hashCode() { - return Objects.hash(arrayNumber); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ArrayOfNumberOnly {\n"); - sb.append(" arrayNumber: ").append(toIndentedString(arrayNumber)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/ArrayTest.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/ArrayTest.java deleted file mode 100644 index c650f156e57..00000000000 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/ArrayTest.java +++ /dev/null @@ -1,192 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.util.ArrayList; -import java.util.List; -import org.openapitools.client.model.ReadOnlyFirst; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - -/** - * ArrayTest - */ -@JsonPropertyOrder({ - ArrayTest.JSON_PROPERTY_ARRAY_OF_STRING, - ArrayTest.JSON_PROPERTY_ARRAY_ARRAY_OF_INTEGER, - ArrayTest.JSON_PROPERTY_ARRAY_ARRAY_OF_MODEL -}) -@javax.annotation.concurrent.Immutable - -public class ArrayTest { - public static final String JSON_PROPERTY_ARRAY_OF_STRING = "array_of_string"; - private List arrayOfString = null; - - public static final String JSON_PROPERTY_ARRAY_ARRAY_OF_INTEGER = "array_array_of_integer"; - private List> arrayArrayOfInteger = null; - - public static final String JSON_PROPERTY_ARRAY_ARRAY_OF_MODEL = "array_array_of_model"; - private List> arrayArrayOfModel = null; - - - public ArrayTest arrayOfString(List arrayOfString) { - - this.arrayOfString = arrayOfString; - return this; - } - - public ArrayTest addArrayOfStringItem(String arrayOfStringItem) { - if (this.arrayOfString == null) { - this.arrayOfString = new ArrayList(); - } - this.arrayOfString.add(arrayOfStringItem); - return this; - } - - /** - * Get arrayOfString - * @return arrayOfString - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_ARRAY_OF_STRING) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public List getArrayOfString() { - return arrayOfString; - } - - - public void setArrayOfString(List arrayOfString) { - this.arrayOfString = arrayOfString; - } - - - public ArrayTest arrayArrayOfInteger(List> arrayArrayOfInteger) { - - this.arrayArrayOfInteger = arrayArrayOfInteger; - return this; - } - - public ArrayTest addArrayArrayOfIntegerItem(List arrayArrayOfIntegerItem) { - if (this.arrayArrayOfInteger == null) { - this.arrayArrayOfInteger = new ArrayList>(); - } - this.arrayArrayOfInteger.add(arrayArrayOfIntegerItem); - return this; - } - - /** - * Get arrayArrayOfInteger - * @return arrayArrayOfInteger - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_ARRAY_ARRAY_OF_INTEGER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public List> getArrayArrayOfInteger() { - return arrayArrayOfInteger; - } - - - public void setArrayArrayOfInteger(List> arrayArrayOfInteger) { - this.arrayArrayOfInteger = arrayArrayOfInteger; - } - - - public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) { - - this.arrayArrayOfModel = arrayArrayOfModel; - return this; - } - - public ArrayTest addArrayArrayOfModelItem(List arrayArrayOfModelItem) { - if (this.arrayArrayOfModel == null) { - this.arrayArrayOfModel = new ArrayList>(); - } - this.arrayArrayOfModel.add(arrayArrayOfModelItem); - return this; - } - - /** - * Get arrayArrayOfModel - * @return arrayArrayOfModel - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_ARRAY_ARRAY_OF_MODEL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public List> getArrayArrayOfModel() { - return arrayArrayOfModel; - } - - - public void setArrayArrayOfModel(List> arrayArrayOfModel) { - this.arrayArrayOfModel = arrayArrayOfModel; - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ArrayTest arrayTest = (ArrayTest) o; - return Objects.equals(this.arrayOfString, arrayTest.arrayOfString) && - Objects.equals(this.arrayArrayOfInteger, arrayTest.arrayArrayOfInteger) && - Objects.equals(this.arrayArrayOfModel, arrayTest.arrayArrayOfModel); - } - - @Override - public int hashCode() { - return Objects.hash(arrayOfString, arrayArrayOfInteger, arrayArrayOfModel); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ArrayTest {\n"); - sb.append(" arrayOfString: ").append(toIndentedString(arrayOfString)).append("\n"); - sb.append(" arrayArrayOfInteger: ").append(toIndentedString(arrayArrayOfInteger)).append("\n"); - sb.append(" arrayArrayOfModel: ").append(toIndentedString(arrayArrayOfModel)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/BigCat.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/BigCat.java deleted file mode 100644 index 8319e975641..00000000000 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/BigCat.java +++ /dev/null @@ -1,152 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import org.openapitools.client.model.BigCatAllOf; -import org.openapitools.client.model.Cat; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - -/** - * BigCat - */ -@JsonPropertyOrder({ - BigCat.JSON_PROPERTY_KIND -}) -@javax.annotation.concurrent.Immutable - -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) -@JsonSubTypes({ -}) - -public class BigCat extends Cat { - /** - * Gets or Sets kind - */ - public enum KindEnum { - LIONS("lions"), - - TIGERS("tigers"), - - LEOPARDS("leopards"), - - JAGUARS("jaguars"); - - private String value; - - KindEnum(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static KindEnum fromValue(String value) { - for (KindEnum b : KindEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - } - - public static final String JSON_PROPERTY_KIND = "kind"; - private KindEnum kind; - - - public BigCat kind(KindEnum kind) { - - this.kind = kind; - return this; - } - - /** - * Get kind - * @return kind - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_KIND) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public KindEnum getKind() { - return kind; - } - - - public void setKind(KindEnum kind) { - this.kind = kind; - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BigCat bigCat = (BigCat) o; - return Objects.equals(this.kind, bigCat.kind) && - super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(kind, super.hashCode()); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BigCat {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" kind: ").append(toIndentedString(kind)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/BigCatAllOf.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/BigCatAllOf.java deleted file mode 100644 index d430edae189..00000000000 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/BigCatAllOf.java +++ /dev/null @@ -1,142 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - -/** - * BigCatAllOf - */ -@JsonPropertyOrder({ - BigCatAllOf.JSON_PROPERTY_KIND -}) -@javax.annotation.concurrent.Immutable - -public class BigCatAllOf { - /** - * Gets or Sets kind - */ - public enum KindEnum { - LIONS("lions"), - - TIGERS("tigers"), - - LEOPARDS("leopards"), - - JAGUARS("jaguars"); - - private String value; - - KindEnum(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static KindEnum fromValue(String value) { - for (KindEnum b : KindEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - } - - public static final String JSON_PROPERTY_KIND = "kind"; - private KindEnum kind; - - - public BigCatAllOf kind(KindEnum kind) { - - this.kind = kind; - return this; - } - - /** - * Get kind - * @return kind - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_KIND) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public KindEnum getKind() { - return kind; - } - - - public void setKind(KindEnum kind) { - this.kind = kind; - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BigCatAllOf bigCatAllOf = (BigCatAllOf) o; - return Objects.equals(this.kind, bigCatAllOf.kind); - } - - @Override - public int hashCode() { - return Objects.hash(kind); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BigCatAllOf {\n"); - sb.append(" kind: ").append(toIndentedString(kind)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Capitalization.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Capitalization.java deleted file mode 100644 index 20050a23c00..00000000000 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Capitalization.java +++ /dev/null @@ -1,258 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - -/** - * Capitalization - */ -@JsonPropertyOrder({ - Capitalization.JSON_PROPERTY_SMALL_CAMEL, - Capitalization.JSON_PROPERTY_CAPITAL_CAMEL, - Capitalization.JSON_PROPERTY_SMALL_SNAKE, - Capitalization.JSON_PROPERTY_CAPITAL_SNAKE, - Capitalization.JSON_PROPERTY_SC_A_E_T_H_FLOW_POINTS, - Capitalization.JSON_PROPERTY_A_T_T_N_A_M_E -}) -@javax.annotation.concurrent.Immutable - -public class Capitalization { - public static final String JSON_PROPERTY_SMALL_CAMEL = "smallCamel"; - private String smallCamel; - - public static final String JSON_PROPERTY_CAPITAL_CAMEL = "CapitalCamel"; - private String capitalCamel; - - public static final String JSON_PROPERTY_SMALL_SNAKE = "small_Snake"; - private String smallSnake; - - public static final String JSON_PROPERTY_CAPITAL_SNAKE = "Capital_Snake"; - private String capitalSnake; - - public static final String JSON_PROPERTY_SC_A_E_T_H_FLOW_POINTS = "SCA_ETH_Flow_Points"; - private String scAETHFlowPoints; - - public static final String JSON_PROPERTY_A_T_T_N_A_M_E = "ATT_NAME"; - private String ATT_NAME; - - - public Capitalization smallCamel(String smallCamel) { - - this.smallCamel = smallCamel; - return this; - } - - /** - * Get smallCamel - * @return smallCamel - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_SMALL_CAMEL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getSmallCamel() { - return smallCamel; - } - - - public void setSmallCamel(String smallCamel) { - this.smallCamel = smallCamel; - } - - - public Capitalization capitalCamel(String capitalCamel) { - - this.capitalCamel = capitalCamel; - return this; - } - - /** - * Get capitalCamel - * @return capitalCamel - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_CAPITAL_CAMEL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getCapitalCamel() { - return capitalCamel; - } - - - public void setCapitalCamel(String capitalCamel) { - this.capitalCamel = capitalCamel; - } - - - public Capitalization smallSnake(String smallSnake) { - - this.smallSnake = smallSnake; - return this; - } - - /** - * Get smallSnake - * @return smallSnake - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_SMALL_SNAKE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getSmallSnake() { - return smallSnake; - } - - - public void setSmallSnake(String smallSnake) { - this.smallSnake = smallSnake; - } - - - public Capitalization capitalSnake(String capitalSnake) { - - this.capitalSnake = capitalSnake; - return this; - } - - /** - * Get capitalSnake - * @return capitalSnake - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_CAPITAL_SNAKE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getCapitalSnake() { - return capitalSnake; - } - - - public void setCapitalSnake(String capitalSnake) { - this.capitalSnake = capitalSnake; - } - - - public Capitalization scAETHFlowPoints(String scAETHFlowPoints) { - - this.scAETHFlowPoints = scAETHFlowPoints; - return this; - } - - /** - * Get scAETHFlowPoints - * @return scAETHFlowPoints - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_SC_A_E_T_H_FLOW_POINTS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getScAETHFlowPoints() { - return scAETHFlowPoints; - } - - - public void setScAETHFlowPoints(String scAETHFlowPoints) { - this.scAETHFlowPoints = scAETHFlowPoints; - } - - - public Capitalization ATT_NAME(String ATT_NAME) { - - this.ATT_NAME = ATT_NAME; - return this; - } - - /** - * Name of the pet - * @return ATT_NAME - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "Name of the pet ") - @JsonProperty(JSON_PROPERTY_A_T_T_N_A_M_E) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getATTNAME() { - return ATT_NAME; - } - - - public void setATTNAME(String ATT_NAME) { - this.ATT_NAME = ATT_NAME; - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Capitalization capitalization = (Capitalization) o; - return Objects.equals(this.smallCamel, capitalization.smallCamel) && - Objects.equals(this.capitalCamel, capitalization.capitalCamel) && - Objects.equals(this.smallSnake, capitalization.smallSnake) && - Objects.equals(this.capitalSnake, capitalization.capitalSnake) && - Objects.equals(this.scAETHFlowPoints, capitalization.scAETHFlowPoints) && - Objects.equals(this.ATT_NAME, capitalization.ATT_NAME); - } - - @Override - public int hashCode() { - return Objects.hash(smallCamel, capitalCamel, smallSnake, capitalSnake, scAETHFlowPoints, ATT_NAME); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Capitalization {\n"); - sb.append(" smallCamel: ").append(toIndentedString(smallCamel)).append("\n"); - sb.append(" capitalCamel: ").append(toIndentedString(capitalCamel)).append("\n"); - sb.append(" smallSnake: ").append(toIndentedString(smallSnake)).append("\n"); - sb.append(" capitalSnake: ").append(toIndentedString(capitalSnake)).append("\n"); - sb.append(" scAETHFlowPoints: ").append(toIndentedString(scAETHFlowPoints)).append("\n"); - sb.append(" ATT_NAME: ").append(toIndentedString(ATT_NAME)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Cat.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Cat.java deleted file mode 100644 index 778ed874ce2..00000000000 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Cat.java +++ /dev/null @@ -1,115 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import org.openapitools.client.model.Animal; -import org.openapitools.client.model.BigCat; -import org.openapitools.client.model.CatAllOf; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - -/** - * Cat - */ -@JsonPropertyOrder({ - Cat.JSON_PROPERTY_DECLAWED -}) -@javax.annotation.concurrent.Immutable - -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) -@JsonSubTypes({ - @JsonSubTypes.Type(value = BigCat.class, name = "BigCat"), -}) - -public class Cat extends Animal { - public static final String JSON_PROPERTY_DECLAWED = "declawed"; - private Boolean declawed; - - - public Cat declawed(Boolean declawed) { - - this.declawed = declawed; - return this; - } - - /** - * Get declawed - * @return declawed - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_DECLAWED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Boolean isDeclawed() { - return declawed; - } - - - public void setDeclawed(Boolean declawed) { - this.declawed = declawed; - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Cat cat = (Cat) o; - return Objects.equals(this.declawed, cat.declawed) && - super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(declawed, super.hashCode()); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Cat {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" declawed: ").append(toIndentedString(declawed)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/CatAllOf.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/CatAllOf.java deleted file mode 100644 index a1c88ddb120..00000000000 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/CatAllOf.java +++ /dev/null @@ -1,103 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - -/** - * CatAllOf - */ -@JsonPropertyOrder({ - CatAllOf.JSON_PROPERTY_DECLAWED -}) -@javax.annotation.concurrent.Immutable - -public class CatAllOf { - public static final String JSON_PROPERTY_DECLAWED = "declawed"; - private Boolean declawed; - - - public CatAllOf declawed(Boolean declawed) { - - this.declawed = declawed; - return this; - } - - /** - * Get declawed - * @return declawed - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_DECLAWED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Boolean isDeclawed() { - return declawed; - } - - - public void setDeclawed(Boolean declawed) { - this.declawed = declawed; - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CatAllOf catAllOf = (CatAllOf) o; - return Objects.equals(this.declawed, catAllOf.declawed); - } - - @Override - public int hashCode() { - return Objects.hash(declawed); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CatAllOf {\n"); - sb.append(" declawed: ").append(toIndentedString(declawed)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Category.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Category.java deleted file mode 100644 index e351a7841bb..00000000000 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Category.java +++ /dev/null @@ -1,133 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - -/** - * Category - */ -@JsonPropertyOrder({ - Category.JSON_PROPERTY_ID, - Category.JSON_PROPERTY_NAME -}) -@javax.annotation.concurrent.Immutable - -public class Category { - public static final String JSON_PROPERTY_ID = "id"; - private Long id; - - public static final String JSON_PROPERTY_NAME = "name"; - private String name = "default-name"; - - - public Category id(Long id) { - - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Long getId() { - return id; - } - - - public void setId(Long id) { - this.id = id; - } - - - public Category name(String name) { - - this.name = name; - return this; - } - - /** - * Get name - * @return name - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - - public String getName() { - return name; - } - - - public void setName(String name) { - this.name = name; - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Category category = (Category) o; - return Objects.equals(this.id, category.id) && - Objects.equals(this.name, category.name); - } - - @Override - public int hashCode() { - return Objects.hash(id, name); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Category {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/ClassModel.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/ClassModel.java deleted file mode 100644 index 01403deddd8..00000000000 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/ClassModel.java +++ /dev/null @@ -1,104 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - -/** - * Model for testing model with \"_class\" property - */ -@ApiModel(description = "Model for testing model with \"_class\" property") -@JsonPropertyOrder({ - ClassModel.JSON_PROPERTY_PROPERTY_CLASS -}) -@javax.annotation.concurrent.Immutable - -public class ClassModel { - public static final String JSON_PROPERTY_PROPERTY_CLASS = "_class"; - private String propertyClass; - - - public ClassModel propertyClass(String propertyClass) { - - this.propertyClass = propertyClass; - return this; - } - - /** - * Get propertyClass - * @return propertyClass - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_PROPERTY_CLASS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getPropertyClass() { - return propertyClass; - } - - - public void setPropertyClass(String propertyClass) { - this.propertyClass = propertyClass; - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ClassModel classModel = (ClassModel) o; - return Objects.equals(this.propertyClass, classModel.propertyClass); - } - - @Override - public int hashCode() { - return Objects.hash(propertyClass); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ClassModel {\n"); - sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Client.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Client.java deleted file mode 100644 index 6cd245b2f72..00000000000 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Client.java +++ /dev/null @@ -1,103 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - -/** - * Client - */ -@JsonPropertyOrder({ - Client.JSON_PROPERTY_CLIENT -}) -@javax.annotation.concurrent.Immutable - -public class Client { - public static final String JSON_PROPERTY_CLIENT = "client"; - private String client; - - - public Client client(String client) { - - this.client = client; - return this; - } - - /** - * Get client - * @return client - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_CLIENT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getClient() { - return client; - } - - - public void setClient(String client) { - this.client = client; - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Client client = (Client) o; - return Objects.equals(this.client, client.client); - } - - @Override - public int hashCode() { - return Objects.hash(client); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Client {\n"); - sb.append(" client: ").append(toIndentedString(client)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Dog.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Dog.java deleted file mode 100644 index cd44ea2c88a..00000000000 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Dog.java +++ /dev/null @@ -1,113 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import org.openapitools.client.model.Animal; -import org.openapitools.client.model.DogAllOf; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - -/** - * Dog - */ -@JsonPropertyOrder({ - Dog.JSON_PROPERTY_BREED -}) -@javax.annotation.concurrent.Immutable - -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) -@JsonSubTypes({ -}) - -public class Dog extends Animal { - public static final String JSON_PROPERTY_BREED = "breed"; - private String breed; - - - public Dog breed(String breed) { - - this.breed = breed; - return this; - } - - /** - * Get breed - * @return breed - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_BREED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getBreed() { - return breed; - } - - - public void setBreed(String breed) { - this.breed = breed; - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Dog dog = (Dog) o; - return Objects.equals(this.breed, dog.breed) && - super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(breed, super.hashCode()); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Dog {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" breed: ").append(toIndentedString(breed)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/DogAllOf.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/DogAllOf.java deleted file mode 100644 index 57942316357..00000000000 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/DogAllOf.java +++ /dev/null @@ -1,103 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - -/** - * DogAllOf - */ -@JsonPropertyOrder({ - DogAllOf.JSON_PROPERTY_BREED -}) -@javax.annotation.concurrent.Immutable - -public class DogAllOf { - public static final String JSON_PROPERTY_BREED = "breed"; - private String breed; - - - public DogAllOf breed(String breed) { - - this.breed = breed; - return this; - } - - /** - * Get breed - * @return breed - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_BREED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getBreed() { - return breed; - } - - - public void setBreed(String breed) { - this.breed = breed; - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DogAllOf dogAllOf = (DogAllOf) o; - return Objects.equals(this.breed, dogAllOf.breed); - } - - @Override - public int hashCode() { - return Objects.hash(breed); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DogAllOf {\n"); - sb.append(" breed: ").append(toIndentedString(breed)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/EnumArrays.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/EnumArrays.java deleted file mode 100644 index 5585af2f9c2..00000000000 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/EnumArrays.java +++ /dev/null @@ -1,214 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.util.ArrayList; -import java.util.List; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - -/** - * EnumArrays - */ -@JsonPropertyOrder({ - EnumArrays.JSON_PROPERTY_JUST_SYMBOL, - EnumArrays.JSON_PROPERTY_ARRAY_ENUM -}) -@javax.annotation.concurrent.Immutable - -public class EnumArrays { - /** - * Gets or Sets justSymbol - */ - public enum JustSymbolEnum { - GREATER_THAN_OR_EQUAL_TO(">="), - - DOLLAR("$"); - - private String value; - - JustSymbolEnum(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static JustSymbolEnum fromValue(String value) { - for (JustSymbolEnum b : JustSymbolEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - } - - public static final String JSON_PROPERTY_JUST_SYMBOL = "just_symbol"; - private JustSymbolEnum justSymbol; - - /** - * Gets or Sets arrayEnum - */ - public enum ArrayEnumEnum { - FISH("fish"), - - CRAB("crab"); - - private String value; - - ArrayEnumEnum(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static ArrayEnumEnum fromValue(String value) { - for (ArrayEnumEnum b : ArrayEnumEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - } - - public static final String JSON_PROPERTY_ARRAY_ENUM = "array_enum"; - private List arrayEnum = null; - - - public EnumArrays justSymbol(JustSymbolEnum justSymbol) { - - this.justSymbol = justSymbol; - return this; - } - - /** - * Get justSymbol - * @return justSymbol - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_JUST_SYMBOL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public JustSymbolEnum getJustSymbol() { - return justSymbol; - } - - - public void setJustSymbol(JustSymbolEnum justSymbol) { - this.justSymbol = justSymbol; - } - - - public EnumArrays arrayEnum(List arrayEnum) { - - this.arrayEnum = arrayEnum; - return this; - } - - public EnumArrays addArrayEnumItem(ArrayEnumEnum arrayEnumItem) { - if (this.arrayEnum == null) { - this.arrayEnum = new ArrayList(); - } - this.arrayEnum.add(arrayEnumItem); - return this; - } - - /** - * Get arrayEnum - * @return arrayEnum - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_ARRAY_ENUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public List getArrayEnum() { - return arrayEnum; - } - - - public void setArrayEnum(List arrayEnum) { - this.arrayEnum = arrayEnum; - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - EnumArrays enumArrays = (EnumArrays) o; - return Objects.equals(this.justSymbol, enumArrays.justSymbol) && - Objects.equals(this.arrayEnum, enumArrays.arrayEnum); - } - - @Override - public int hashCode() { - return Objects.hash(justSymbol, arrayEnum); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class EnumArrays {\n"); - sb.append(" justSymbol: ").append(toIndentedString(justSymbol)).append("\n"); - sb.append(" arrayEnum: ").append(toIndentedString(arrayEnum)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/EnumClass.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/EnumClass.java deleted file mode 100644 index e9102d97427..00000000000 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/EnumClass.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Gets or Sets EnumClass - */ -public enum EnumClass { - - _ABC("_abc"), - - _EFG("-efg"), - - _XYZ_("(xyz)"); - - private String value; - - EnumClass(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static EnumClass fromValue(String value) { - for (EnumClass b : EnumClass.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} - diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/EnumTest.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/EnumTest.java deleted file mode 100644 index ca72f8b9012..00000000000 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/EnumTest.java +++ /dev/null @@ -1,371 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import org.openapitools.client.model.OuterEnum; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - -/** - * EnumTest - */ -@JsonPropertyOrder({ - EnumTest.JSON_PROPERTY_ENUM_STRING, - EnumTest.JSON_PROPERTY_ENUM_STRING_REQUIRED, - EnumTest.JSON_PROPERTY_ENUM_INTEGER, - EnumTest.JSON_PROPERTY_ENUM_NUMBER, - EnumTest.JSON_PROPERTY_OUTER_ENUM -}) -@javax.annotation.concurrent.Immutable - -public class EnumTest { - /** - * Gets or Sets enumString - */ - public enum EnumStringEnum { - UPPER("UPPER"), - - LOWER("lower"), - - EMPTY(""); - - private String value; - - EnumStringEnum(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static EnumStringEnum fromValue(String value) { - for (EnumStringEnum b : EnumStringEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - } - - public static final String JSON_PROPERTY_ENUM_STRING = "enum_string"; - private EnumStringEnum enumString; - - /** - * Gets or Sets enumStringRequired - */ - public enum EnumStringRequiredEnum { - UPPER("UPPER"), - - LOWER("lower"), - - EMPTY(""); - - private String value; - - EnumStringRequiredEnum(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static EnumStringRequiredEnum fromValue(String value) { - for (EnumStringRequiredEnum b : EnumStringRequiredEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - } - - public static final String JSON_PROPERTY_ENUM_STRING_REQUIRED = "enum_string_required"; - private EnumStringRequiredEnum enumStringRequired; - - /** - * Gets or Sets enumInteger - */ - public enum EnumIntegerEnum { - NUMBER_1(1), - - NUMBER_MINUS_1(-1); - - private Integer value; - - EnumIntegerEnum(Integer value) { - this.value = value; - } - - @JsonValue - public Integer getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static EnumIntegerEnum fromValue(Integer value) { - for (EnumIntegerEnum b : EnumIntegerEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - } - - public static final String JSON_PROPERTY_ENUM_INTEGER = "enum_integer"; - private EnumIntegerEnum enumInteger; - - /** - * Gets or Sets enumNumber - */ - public enum EnumNumberEnum { - NUMBER_1_DOT_1(1.1), - - NUMBER_MINUS_1_DOT_2(-1.2); - - private Double value; - - EnumNumberEnum(Double value) { - this.value = value; - } - - @JsonValue - public Double getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static EnumNumberEnum fromValue(Double value) { - for (EnumNumberEnum b : EnumNumberEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - } - - public static final String JSON_PROPERTY_ENUM_NUMBER = "enum_number"; - private EnumNumberEnum enumNumber; - - public static final String JSON_PROPERTY_OUTER_ENUM = "outerEnum"; - private OuterEnum outerEnum; - - - public EnumTest enumString(EnumStringEnum enumString) { - - this.enumString = enumString; - return this; - } - - /** - * Get enumString - * @return enumString - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_ENUM_STRING) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public EnumStringEnum getEnumString() { - return enumString; - } - - - public void setEnumString(EnumStringEnum enumString) { - this.enumString = enumString; - } - - - public EnumTest enumStringRequired(EnumStringRequiredEnum enumStringRequired) { - - this.enumStringRequired = enumStringRequired; - return this; - } - - /** - * Get enumStringRequired - * @return enumStringRequired - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_ENUM_STRING_REQUIRED) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - - public EnumStringRequiredEnum getEnumStringRequired() { - return enumStringRequired; - } - - - public void setEnumStringRequired(EnumStringRequiredEnum enumStringRequired) { - this.enumStringRequired = enumStringRequired; - } - - - public EnumTest enumInteger(EnumIntegerEnum enumInteger) { - - this.enumInteger = enumInteger; - return this; - } - - /** - * Get enumInteger - * @return enumInteger - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_ENUM_INTEGER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public EnumIntegerEnum getEnumInteger() { - return enumInteger; - } - - - public void setEnumInteger(EnumIntegerEnum enumInteger) { - this.enumInteger = enumInteger; - } - - - public EnumTest enumNumber(EnumNumberEnum enumNumber) { - - this.enumNumber = enumNumber; - return this; - } - - /** - * Get enumNumber - * @return enumNumber - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_ENUM_NUMBER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public EnumNumberEnum getEnumNumber() { - return enumNumber; - } - - - public void setEnumNumber(EnumNumberEnum enumNumber) { - this.enumNumber = enumNumber; - } - - - public EnumTest outerEnum(OuterEnum outerEnum) { - - this.outerEnum = outerEnum; - return this; - } - - /** - * Get outerEnum - * @return outerEnum - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_OUTER_ENUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public OuterEnum getOuterEnum() { - return outerEnum; - } - - - public void setOuterEnum(OuterEnum outerEnum) { - this.outerEnum = outerEnum; - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - EnumTest enumTest = (EnumTest) o; - return Objects.equals(this.enumString, enumTest.enumString) && - Objects.equals(this.enumStringRequired, enumTest.enumStringRequired) && - Objects.equals(this.enumInteger, enumTest.enumInteger) && - Objects.equals(this.enumNumber, enumTest.enumNumber) && - Objects.equals(this.outerEnum, enumTest.outerEnum); - } - - @Override - public int hashCode() { - return Objects.hash(enumString, enumStringRequired, enumInteger, enumNumber, outerEnum); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class EnumTest {\n"); - sb.append(" enumString: ").append(toIndentedString(enumString)).append("\n"); - sb.append(" enumStringRequired: ").append(toIndentedString(enumStringRequired)).append("\n"); - sb.append(" enumInteger: ").append(toIndentedString(enumInteger)).append("\n"); - sb.append(" enumNumber: ").append(toIndentedString(enumNumber)).append("\n"); - sb.append(" outerEnum: ").append(toIndentedString(outerEnum)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java deleted file mode 100644 index d1793a655e0..00000000000 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java +++ /dev/null @@ -1,144 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.util.ArrayList; -import java.util.List; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - -/** - * FileSchemaTestClass - */ -@JsonPropertyOrder({ - FileSchemaTestClass.JSON_PROPERTY_FILE, - FileSchemaTestClass.JSON_PROPERTY_FILES -}) -@javax.annotation.concurrent.Immutable - -public class FileSchemaTestClass { - public static final String JSON_PROPERTY_FILE = "file"; - private java.io.File file; - - public static final String JSON_PROPERTY_FILES = "files"; - private List files = null; - - - public FileSchemaTestClass file(java.io.File file) { - - this.file = file; - return this; - } - - /** - * Get file - * @return file - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_FILE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public java.io.File getFile() { - return file; - } - - - public void setFile(java.io.File file) { - this.file = file; - } - - - public FileSchemaTestClass files(List files) { - - this.files = files; - return this; - } - - public FileSchemaTestClass addFilesItem(java.io.File filesItem) { - if (this.files == null) { - this.files = new ArrayList(); - } - this.files.add(filesItem); - return this; - } - - /** - * Get files - * @return files - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_FILES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public List getFiles() { - return files; - } - - - public void setFiles(List files) { - this.files = files; - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - FileSchemaTestClass fileSchemaTestClass = (FileSchemaTestClass) o; - return Objects.equals(this.file, fileSchemaTestClass.file) && - Objects.equals(this.files, fileSchemaTestClass.files); - } - - @Override - public int hashCode() { - return Objects.hash(file, files); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class FileSchemaTestClass {\n"); - sb.append(" file: ").append(toIndentedString(file)).append("\n"); - sb.append(" files: ").append(toIndentedString(files)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/FormatTest.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/FormatTest.java deleted file mode 100644 index 20939e85f8b..00000000000 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/FormatTest.java +++ /dev/null @@ -1,517 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.File; -import java.math.BigDecimal; -import java.util.UUID; -import org.threeten.bp.LocalDate; -import org.threeten.bp.OffsetDateTime; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - -/** - * FormatTest - */ -@JsonPropertyOrder({ - FormatTest.JSON_PROPERTY_INTEGER, - FormatTest.JSON_PROPERTY_INT32, - FormatTest.JSON_PROPERTY_INT64, - FormatTest.JSON_PROPERTY_NUMBER, - FormatTest.JSON_PROPERTY_FLOAT, - FormatTest.JSON_PROPERTY_DOUBLE, - FormatTest.JSON_PROPERTY_STRING, - FormatTest.JSON_PROPERTY_BYTE, - FormatTest.JSON_PROPERTY_BINARY, - FormatTest.JSON_PROPERTY_DATE, - FormatTest.JSON_PROPERTY_DATE_TIME, - FormatTest.JSON_PROPERTY_UUID, - FormatTest.JSON_PROPERTY_PASSWORD, - FormatTest.JSON_PROPERTY_BIG_DECIMAL -}) -@javax.annotation.concurrent.Immutable - -public class FormatTest { - public static final String JSON_PROPERTY_INTEGER = "integer"; - private Integer integer; - - public static final String JSON_PROPERTY_INT32 = "int32"; - private Integer int32; - - public static final String JSON_PROPERTY_INT64 = "int64"; - private Long int64; - - public static final String JSON_PROPERTY_NUMBER = "number"; - private BigDecimal number; - - public static final String JSON_PROPERTY_FLOAT = "float"; - private Float _float; - - public static final String JSON_PROPERTY_DOUBLE = "double"; - private Double _double; - - public static final String JSON_PROPERTY_STRING = "string"; - private String string; - - public static final String JSON_PROPERTY_BYTE = "byte"; - private byte[] _byte; - - public static final String JSON_PROPERTY_BINARY = "binary"; - private File binary; - - public static final String JSON_PROPERTY_DATE = "date"; - private LocalDate date; - - public static final String JSON_PROPERTY_DATE_TIME = "dateTime"; - private OffsetDateTime dateTime; - - public static final String JSON_PROPERTY_UUID = "uuid"; - private UUID uuid; - - public static final String JSON_PROPERTY_PASSWORD = "password"; - private String password; - - public static final String JSON_PROPERTY_BIG_DECIMAL = "BigDecimal"; - private BigDecimal bigDecimal; - - - public FormatTest integer(Integer integer) { - - this.integer = integer; - return this; - } - - /** - * Get integer - * minimum: 10 - * maximum: 100 - * @return integer - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_INTEGER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Integer getInteger() { - return integer; - } - - - public void setInteger(Integer integer) { - this.integer = integer; - } - - - public FormatTest int32(Integer int32) { - - this.int32 = int32; - return this; - } - - /** - * Get int32 - * minimum: 20 - * maximum: 200 - * @return int32 - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_INT32) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Integer getInt32() { - return int32; - } - - - public void setInt32(Integer int32) { - this.int32 = int32; - } - - - public FormatTest int64(Long int64) { - - this.int64 = int64; - return this; - } - - /** - * Get int64 - * @return int64 - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_INT64) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Long getInt64() { - return int64; - } - - - public void setInt64(Long int64) { - this.int64 = int64; - } - - - public FormatTest number(BigDecimal number) { - - this.number = number; - return this; - } - - /** - * Get number - * minimum: 32.1 - * maximum: 543.2 - * @return number - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_NUMBER) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - - public BigDecimal getNumber() { - return number; - } - - - public void setNumber(BigDecimal number) { - this.number = number; - } - - - public FormatTest _float(Float _float) { - - this._float = _float; - return this; - } - - /** - * Get _float - * minimum: 54.3 - * maximum: 987.6 - * @return _float - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_FLOAT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Float getFloat() { - return _float; - } - - - public void setFloat(Float _float) { - this._float = _float; - } - - - public FormatTest _double(Double _double) { - - this._double = _double; - return this; - } - - /** - * Get _double - * minimum: 67.8 - * maximum: 123.4 - * @return _double - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_DOUBLE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Double getDouble() { - return _double; - } - - - public void setDouble(Double _double) { - this._double = _double; - } - - - public FormatTest string(String string) { - - this.string = string; - return this; - } - - /** - * Get string - * @return string - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_STRING) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getString() { - return string; - } - - - public void setString(String string) { - this.string = string; - } - - - public FormatTest _byte(byte[] _byte) { - - this._byte = _byte; - return this; - } - - /** - * Get _byte - * @return _byte - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_BYTE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - - public byte[] getByte() { - return _byte; - } - - - public void setByte(byte[] _byte) { - this._byte = _byte; - } - - - public FormatTest binary(File binary) { - - this.binary = binary; - return this; - } - - /** - * Get binary - * @return binary - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_BINARY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public File getBinary() { - return binary; - } - - - public void setBinary(File binary) { - this.binary = binary; - } - - - public FormatTest date(LocalDate date) { - - this.date = date; - return this; - } - - /** - * Get date - * @return date - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_DATE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - - public LocalDate getDate() { - return date; - } - - - public void setDate(LocalDate date) { - this.date = date; - } - - - public FormatTest dateTime(OffsetDateTime dateTime) { - - this.dateTime = dateTime; - return this; - } - - /** - * Get dateTime - * @return dateTime - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_DATE_TIME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public OffsetDateTime getDateTime() { - return dateTime; - } - - - public void setDateTime(OffsetDateTime dateTime) { - this.dateTime = dateTime; - } - - - public FormatTest uuid(UUID uuid) { - - this.uuid = uuid; - return this; - } - - /** - * Get uuid - * @return uuid - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "72f98069-206d-4f12-9f12-3d1e525a8e84", value = "") - @JsonProperty(JSON_PROPERTY_UUID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public UUID getUuid() { - return uuid; - } - - - public void setUuid(UUID uuid) { - this.uuid = uuid; - } - - - public FormatTest password(String password) { - - this.password = password; - return this; - } - - /** - * Get password - * @return password - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_PASSWORD) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - - public String getPassword() { - return password; - } - - - public void setPassword(String password) { - this.password = password; - } - - - public FormatTest bigDecimal(BigDecimal bigDecimal) { - - this.bigDecimal = bigDecimal; - return this; - } - - /** - * Get bigDecimal - * @return bigDecimal - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_BIG_DECIMAL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public BigDecimal getBigDecimal() { - return bigDecimal; - } - - - public void setBigDecimal(BigDecimal bigDecimal) { - this.bigDecimal = bigDecimal; - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - FormatTest formatTest = (FormatTest) o; - return Objects.equals(this.integer, formatTest.integer) && - Objects.equals(this.int32, formatTest.int32) && - Objects.equals(this.int64, formatTest.int64) && - Objects.equals(this.number, formatTest.number) && - Objects.equals(this._float, formatTest._float) && - Objects.equals(this._double, formatTest._double) && - Objects.equals(this.string, formatTest.string) && - Arrays.equals(this._byte, formatTest._byte) && - Objects.equals(this.binary, formatTest.binary) && - Objects.equals(this.date, formatTest.date) && - Objects.equals(this.dateTime, formatTest.dateTime) && - Objects.equals(this.uuid, formatTest.uuid) && - Objects.equals(this.password, formatTest.password) && - Objects.equals(this.bigDecimal, formatTest.bigDecimal); - } - - @Override - public int hashCode() { - return Objects.hash(integer, int32, int64, number, _float, _double, string, Arrays.hashCode(_byte), binary, date, dateTime, uuid, password, bigDecimal); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class FormatTest {\n"); - sb.append(" integer: ").append(toIndentedString(integer)).append("\n"); - sb.append(" int32: ").append(toIndentedString(int32)).append("\n"); - sb.append(" int64: ").append(toIndentedString(int64)).append("\n"); - sb.append(" number: ").append(toIndentedString(number)).append("\n"); - sb.append(" _float: ").append(toIndentedString(_float)).append("\n"); - sb.append(" _double: ").append(toIndentedString(_double)).append("\n"); - sb.append(" string: ").append(toIndentedString(string)).append("\n"); - sb.append(" _byte: ").append(toIndentedString(_byte)).append("\n"); - sb.append(" binary: ").append(toIndentedString(binary)).append("\n"); - sb.append(" date: ").append(toIndentedString(date)).append("\n"); - sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n"); - sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); - sb.append(" password: ").append(toIndentedString(password)).append("\n"); - sb.append(" bigDecimal: ").append(toIndentedString(bigDecimal)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java deleted file mode 100644 index 43e9ddd65f6..00000000000 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java +++ /dev/null @@ -1,116 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - -/** - * HasOnlyReadOnly - */ -@JsonPropertyOrder({ - HasOnlyReadOnly.JSON_PROPERTY_BAR, - HasOnlyReadOnly.JSON_PROPERTY_FOO -}) -@javax.annotation.concurrent.Immutable - -public class HasOnlyReadOnly { - public static final String JSON_PROPERTY_BAR = "bar"; - private String bar; - - public static final String JSON_PROPERTY_FOO = "foo"; - private String foo; - - - /** - * Get bar - * @return bar - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_BAR) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getBar() { - return bar; - } - - - - - /** - * Get foo - * @return foo - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_FOO) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getFoo() { - return foo; - } - - - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - HasOnlyReadOnly hasOnlyReadOnly = (HasOnlyReadOnly) o; - return Objects.equals(this.bar, hasOnlyReadOnly.bar) && - Objects.equals(this.foo, hasOnlyReadOnly.foo); - } - - @Override - public int hashCode() { - return Objects.hash(bar, foo); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class HasOnlyReadOnly {\n"); - sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); - sb.append(" foo: ").append(toIndentedString(foo)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/MapTest.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/MapTest.java deleted file mode 100644 index 62492374cca..00000000000 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/MapTest.java +++ /dev/null @@ -1,266 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - -/** - * MapTest - */ -@JsonPropertyOrder({ - MapTest.JSON_PROPERTY_MAP_MAP_OF_STRING, - MapTest.JSON_PROPERTY_MAP_OF_ENUM_STRING, - MapTest.JSON_PROPERTY_DIRECT_MAP, - MapTest.JSON_PROPERTY_INDIRECT_MAP -}) -@javax.annotation.concurrent.Immutable - -public class MapTest { - public static final String JSON_PROPERTY_MAP_MAP_OF_STRING = "map_map_of_string"; - private Map> mapMapOfString = null; - - /** - * Gets or Sets inner - */ - public enum InnerEnum { - UPPER("UPPER"), - - LOWER("lower"); - - private String value; - - InnerEnum(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static InnerEnum fromValue(String value) { - for (InnerEnum b : InnerEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - } - - public static final String JSON_PROPERTY_MAP_OF_ENUM_STRING = "map_of_enum_string"; - private Map mapOfEnumString = null; - - public static final String JSON_PROPERTY_DIRECT_MAP = "direct_map"; - private Map directMap = null; - - public static final String JSON_PROPERTY_INDIRECT_MAP = "indirect_map"; - private Map indirectMap = null; - - - public MapTest mapMapOfString(Map> mapMapOfString) { - - this.mapMapOfString = mapMapOfString; - return this; - } - - public MapTest putMapMapOfStringItem(String key, Map mapMapOfStringItem) { - if (this.mapMapOfString == null) { - this.mapMapOfString = new HashMap>(); - } - this.mapMapOfString.put(key, mapMapOfStringItem); - return this; - } - - /** - * Get mapMapOfString - * @return mapMapOfString - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_MAP_MAP_OF_STRING) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Map> getMapMapOfString() { - return mapMapOfString; - } - - - public void setMapMapOfString(Map> mapMapOfString) { - this.mapMapOfString = mapMapOfString; - } - - - public MapTest mapOfEnumString(Map mapOfEnumString) { - - this.mapOfEnumString = mapOfEnumString; - return this; - } - - public MapTest putMapOfEnumStringItem(String key, InnerEnum mapOfEnumStringItem) { - if (this.mapOfEnumString == null) { - this.mapOfEnumString = new HashMap(); - } - this.mapOfEnumString.put(key, mapOfEnumStringItem); - return this; - } - - /** - * Get mapOfEnumString - * @return mapOfEnumString - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_MAP_OF_ENUM_STRING) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Map getMapOfEnumString() { - return mapOfEnumString; - } - - - public void setMapOfEnumString(Map mapOfEnumString) { - this.mapOfEnumString = mapOfEnumString; - } - - - public MapTest directMap(Map directMap) { - - this.directMap = directMap; - return this; - } - - public MapTest putDirectMapItem(String key, Boolean directMapItem) { - if (this.directMap == null) { - this.directMap = new HashMap(); - } - this.directMap.put(key, directMapItem); - return this; - } - - /** - * Get directMap - * @return directMap - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_DIRECT_MAP) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Map getDirectMap() { - return directMap; - } - - - public void setDirectMap(Map directMap) { - this.directMap = directMap; - } - - - public MapTest indirectMap(Map indirectMap) { - - this.indirectMap = indirectMap; - return this; - } - - public MapTest putIndirectMapItem(String key, Boolean indirectMapItem) { - if (this.indirectMap == null) { - this.indirectMap = new HashMap(); - } - this.indirectMap.put(key, indirectMapItem); - return this; - } - - /** - * Get indirectMap - * @return indirectMap - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_INDIRECT_MAP) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Map getIndirectMap() { - return indirectMap; - } - - - public void setIndirectMap(Map indirectMap) { - this.indirectMap = indirectMap; - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - MapTest mapTest = (MapTest) o; - return Objects.equals(this.mapMapOfString, mapTest.mapMapOfString) && - Objects.equals(this.mapOfEnumString, mapTest.mapOfEnumString) && - Objects.equals(this.directMap, mapTest.directMap) && - Objects.equals(this.indirectMap, mapTest.indirectMap); - } - - @Override - public int hashCode() { - return Objects.hash(mapMapOfString, mapOfEnumString, directMap, indirectMap); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class MapTest {\n"); - sb.append(" mapMapOfString: ").append(toIndentedString(mapMapOfString)).append("\n"); - sb.append(" mapOfEnumString: ").append(toIndentedString(mapOfEnumString)).append("\n"); - sb.append(" directMap: ").append(toIndentedString(directMap)).append("\n"); - sb.append(" indirectMap: ").append(toIndentedString(indirectMap)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java deleted file mode 100644 index 205ba6040a9..00000000000 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ /dev/null @@ -1,179 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.UUID; -import org.openapitools.client.model.Animal; -import org.threeten.bp.OffsetDateTime; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - -/** - * MixedPropertiesAndAdditionalPropertiesClass - */ -@JsonPropertyOrder({ - MixedPropertiesAndAdditionalPropertiesClass.JSON_PROPERTY_UUID, - MixedPropertiesAndAdditionalPropertiesClass.JSON_PROPERTY_DATE_TIME, - MixedPropertiesAndAdditionalPropertiesClass.JSON_PROPERTY_MAP -}) -@javax.annotation.concurrent.Immutable - -public class MixedPropertiesAndAdditionalPropertiesClass { - public static final String JSON_PROPERTY_UUID = "uuid"; - private UUID uuid; - - public static final String JSON_PROPERTY_DATE_TIME = "dateTime"; - private OffsetDateTime dateTime; - - public static final String JSON_PROPERTY_MAP = "map"; - private Map map = null; - - - public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) { - - this.uuid = uuid; - return this; - } - - /** - * Get uuid - * @return uuid - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_UUID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public UUID getUuid() { - return uuid; - } - - - public void setUuid(UUID uuid) { - this.uuid = uuid; - } - - - public MixedPropertiesAndAdditionalPropertiesClass dateTime(OffsetDateTime dateTime) { - - this.dateTime = dateTime; - return this; - } - - /** - * Get dateTime - * @return dateTime - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_DATE_TIME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public OffsetDateTime getDateTime() { - return dateTime; - } - - - public void setDateTime(OffsetDateTime dateTime) { - this.dateTime = dateTime; - } - - - public MixedPropertiesAndAdditionalPropertiesClass map(Map map) { - - this.map = map; - return this; - } - - public MixedPropertiesAndAdditionalPropertiesClass putMapItem(String key, Animal mapItem) { - if (this.map == null) { - this.map = new HashMap(); - } - this.map.put(key, mapItem); - return this; - } - - /** - * Get map - * @return map - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_MAP) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Map getMap() { - return map; - } - - - public void setMap(Map map) { - this.map = map; - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - MixedPropertiesAndAdditionalPropertiesClass mixedPropertiesAndAdditionalPropertiesClass = (MixedPropertiesAndAdditionalPropertiesClass) o; - return Objects.equals(this.uuid, mixedPropertiesAndAdditionalPropertiesClass.uuid) && - Objects.equals(this.dateTime, mixedPropertiesAndAdditionalPropertiesClass.dateTime) && - Objects.equals(this.map, mixedPropertiesAndAdditionalPropertiesClass.map); - } - - @Override - public int hashCode() { - return Objects.hash(uuid, dateTime, map); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class MixedPropertiesAndAdditionalPropertiesClass {\n"); - sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); - sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n"); - sb.append(" map: ").append(toIndentedString(map)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Model200Response.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Model200Response.java deleted file mode 100644 index 5d4a6f98461..00000000000 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Model200Response.java +++ /dev/null @@ -1,135 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - -/** - * Model for testing model name starting with number - */ -@ApiModel(description = "Model for testing model name starting with number") -@JsonPropertyOrder({ - Model200Response.JSON_PROPERTY_NAME, - Model200Response.JSON_PROPERTY_PROPERTY_CLASS -}) -@javax.annotation.concurrent.Immutable - -public class Model200Response { - public static final String JSON_PROPERTY_NAME = "name"; - private Integer name; - - public static final String JSON_PROPERTY_PROPERTY_CLASS = "class"; - private String propertyClass; - - - public Model200Response name(Integer name) { - - this.name = name; - return this; - } - - /** - * Get name - * @return name - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Integer getName() { - return name; - } - - - public void setName(Integer name) { - this.name = name; - } - - - public Model200Response propertyClass(String propertyClass) { - - this.propertyClass = propertyClass; - return this; - } - - /** - * Get propertyClass - * @return propertyClass - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_PROPERTY_CLASS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getPropertyClass() { - return propertyClass; - } - - - public void setPropertyClass(String propertyClass) { - this.propertyClass = propertyClass; - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Model200Response _200response = (Model200Response) o; - return Objects.equals(this.name, _200response.name) && - Objects.equals(this.propertyClass, _200response.propertyClass); - } - - @Override - public int hashCode() { - return Objects.hash(name, propertyClass); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Model200Response {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/ModelApiResponse.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/ModelApiResponse.java deleted file mode 100644 index d6acae129e4..00000000000 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/ModelApiResponse.java +++ /dev/null @@ -1,165 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - -/** - * ModelApiResponse - */ -@JsonPropertyOrder({ - ModelApiResponse.JSON_PROPERTY_CODE, - ModelApiResponse.JSON_PROPERTY_TYPE, - ModelApiResponse.JSON_PROPERTY_MESSAGE -}) -@javax.annotation.concurrent.Immutable - -public class ModelApiResponse { - public static final String JSON_PROPERTY_CODE = "code"; - private Integer code; - - public static final String JSON_PROPERTY_TYPE = "type"; - private String type; - - public static final String JSON_PROPERTY_MESSAGE = "message"; - private String message; - - - public ModelApiResponse code(Integer code) { - - this.code = code; - return this; - } - - /** - * Get code - * @return code - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_CODE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Integer getCode() { - return code; - } - - - public void setCode(Integer code) { - this.code = code; - } - - - public ModelApiResponse type(String type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getType() { - return type; - } - - - public void setType(String type) { - this.type = type; - } - - - public ModelApiResponse message(String message) { - - this.message = message; - return this; - } - - /** - * Get message - * @return message - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_MESSAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getMessage() { - return message; - } - - - public void setMessage(String message) { - this.message = message; - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ModelApiResponse _apiResponse = (ModelApiResponse) o; - return Objects.equals(this.code, _apiResponse.code) && - Objects.equals(this.type, _apiResponse.type) && - Objects.equals(this.message, _apiResponse.message); - } - - @Override - public int hashCode() { - return Objects.hash(code, type, message); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ModelApiResponse {\n"); - sb.append(" code: ").append(toIndentedString(code)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" message: ").append(toIndentedString(message)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/ModelReturn.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/ModelReturn.java deleted file mode 100644 index 9b51c8944a4..00000000000 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/ModelReturn.java +++ /dev/null @@ -1,104 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - -/** - * Model for testing reserved words - */ -@ApiModel(description = "Model for testing reserved words") -@JsonPropertyOrder({ - ModelReturn.JSON_PROPERTY_RETURN -}) -@javax.annotation.concurrent.Immutable - -public class ModelReturn { - public static final String JSON_PROPERTY_RETURN = "return"; - private Integer _return; - - - public ModelReturn _return(Integer _return) { - - this._return = _return; - return this; - } - - /** - * Get _return - * @return _return - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_RETURN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Integer getReturn() { - return _return; - } - - - public void setReturn(Integer _return) { - this._return = _return; - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ModelReturn _return = (ModelReturn) o; - return Objects.equals(this._return, _return._return); - } - - @Override - public int hashCode() { - return Objects.hash(_return); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ModelReturn {\n"); - sb.append(" _return: ").append(toIndentedString(_return)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Name.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Name.java deleted file mode 100644 index 811858d4a84..00000000000 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Name.java +++ /dev/null @@ -1,178 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - -/** - * Model for testing model name same as property name - */ -@ApiModel(description = "Model for testing model name same as property name") -@JsonPropertyOrder({ - Name.JSON_PROPERTY_NAME, - Name.JSON_PROPERTY_SNAKE_CASE, - Name.JSON_PROPERTY_PROPERTY, - Name.JSON_PROPERTY_123NUMBER -}) -@javax.annotation.concurrent.Immutable - -public class Name { - public static final String JSON_PROPERTY_NAME = "name"; - private Integer name; - - public static final String JSON_PROPERTY_SNAKE_CASE = "snake_case"; - private Integer snakeCase; - - public static final String JSON_PROPERTY_PROPERTY = "property"; - private String property; - - public static final String JSON_PROPERTY_123NUMBER = "123Number"; - private Integer _123number; - - - public Name name(Integer name) { - - this.name = name; - return this; - } - - /** - * Get name - * @return name - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - - public Integer getName() { - return name; - } - - - public void setName(Integer name) { - this.name = name; - } - - - /** - * Get snakeCase - * @return snakeCase - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_SNAKE_CASE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Integer getSnakeCase() { - return snakeCase; - } - - - - - public Name property(String property) { - - this.property = property; - return this; - } - - /** - * Get property - * @return property - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_PROPERTY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getProperty() { - return property; - } - - - public void setProperty(String property) { - this.property = property; - } - - - /** - * Get _123number - * @return _123number - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_123NUMBER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Integer get123number() { - return _123number; - } - - - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Name name = (Name) o; - return Objects.equals(this.name, name.name) && - Objects.equals(this.snakeCase, name.snakeCase) && - Objects.equals(this.property, name.property) && - Objects.equals(this._123number, name._123number); - } - - @Override - public int hashCode() { - return Objects.hash(name, snakeCase, property, _123number); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Name {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" snakeCase: ").append(toIndentedString(snakeCase)).append("\n"); - sb.append(" property: ").append(toIndentedString(property)).append("\n"); - sb.append(" _123number: ").append(toIndentedString(_123number)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/NumberOnly.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/NumberOnly.java deleted file mode 100644 index 7e27fe83b1c..00000000000 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/NumberOnly.java +++ /dev/null @@ -1,104 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.math.BigDecimal; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - -/** - * NumberOnly - */ -@JsonPropertyOrder({ - NumberOnly.JSON_PROPERTY_JUST_NUMBER -}) -@javax.annotation.concurrent.Immutable - -public class NumberOnly { - public static final String JSON_PROPERTY_JUST_NUMBER = "JustNumber"; - private BigDecimal justNumber; - - - public NumberOnly justNumber(BigDecimal justNumber) { - - this.justNumber = justNumber; - return this; - } - - /** - * Get justNumber - * @return justNumber - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_JUST_NUMBER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public BigDecimal getJustNumber() { - return justNumber; - } - - - public void setJustNumber(BigDecimal justNumber) { - this.justNumber = justNumber; - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - NumberOnly numberOnly = (NumberOnly) o; - return Objects.equals(this.justNumber, numberOnly.justNumber); - } - - @Override - public int hashCode() { - return Objects.hash(justNumber); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class NumberOnly {\n"); - sb.append(" justNumber: ").append(toIndentedString(justNumber)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Order.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Order.java deleted file mode 100644 index aa3d4a98d0c..00000000000 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Order.java +++ /dev/null @@ -1,296 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import org.threeten.bp.OffsetDateTime; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - -/** - * Order - */ -@JsonPropertyOrder({ - Order.JSON_PROPERTY_ID, - Order.JSON_PROPERTY_PET_ID, - Order.JSON_PROPERTY_QUANTITY, - Order.JSON_PROPERTY_SHIP_DATE, - Order.JSON_PROPERTY_STATUS, - Order.JSON_PROPERTY_COMPLETE -}) -@javax.annotation.concurrent.Immutable - -public class Order { - public static final String JSON_PROPERTY_ID = "id"; - private Long id; - - public static final String JSON_PROPERTY_PET_ID = "petId"; - private Long petId; - - public static final String JSON_PROPERTY_QUANTITY = "quantity"; - private Integer quantity; - - public static final String JSON_PROPERTY_SHIP_DATE = "shipDate"; - private OffsetDateTime shipDate; - - /** - * Order Status - */ - public enum StatusEnum { - PLACED("placed"), - - APPROVED("approved"), - - DELIVERED("delivered"); - - private String value; - - StatusEnum(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static StatusEnum fromValue(String value) { - for (StatusEnum b : StatusEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - } - - public static final String JSON_PROPERTY_STATUS = "status"; - private StatusEnum status; - - public static final String JSON_PROPERTY_COMPLETE = "complete"; - private Boolean complete = false; - - - public Order id(Long id) { - - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Long getId() { - return id; - } - - - public void setId(Long id) { - this.id = id; - } - - - public Order petId(Long petId) { - - this.petId = petId; - return this; - } - - /** - * Get petId - * @return petId - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_PET_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Long getPetId() { - return petId; - } - - - public void setPetId(Long petId) { - this.petId = petId; - } - - - public Order quantity(Integer quantity) { - - this.quantity = quantity; - return this; - } - - /** - * Get quantity - * @return quantity - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_QUANTITY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Integer getQuantity() { - return quantity; - } - - - public void setQuantity(Integer quantity) { - this.quantity = quantity; - } - - - public Order shipDate(OffsetDateTime shipDate) { - - this.shipDate = shipDate; - return this; - } - - /** - * Get shipDate - * @return shipDate - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_SHIP_DATE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public OffsetDateTime getShipDate() { - return shipDate; - } - - - public void setShipDate(OffsetDateTime shipDate) { - this.shipDate = shipDate; - } - - - public Order status(StatusEnum status) { - - this.status = status; - return this; - } - - /** - * Order Status - * @return status - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "Order Status") - @JsonProperty(JSON_PROPERTY_STATUS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public StatusEnum getStatus() { - return status; - } - - - public void setStatus(StatusEnum status) { - this.status = status; - } - - - public Order complete(Boolean complete) { - - this.complete = complete; - return this; - } - - /** - * Get complete - * @return complete - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_COMPLETE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Boolean isComplete() { - return complete; - } - - - public void setComplete(Boolean complete) { - this.complete = complete; - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Order order = (Order) o; - return Objects.equals(this.id, order.id) && - Objects.equals(this.petId, order.petId) && - Objects.equals(this.quantity, order.quantity) && - Objects.equals(this.shipDate, order.shipDate) && - Objects.equals(this.status, order.status) && - Objects.equals(this.complete, order.complete); - } - - @Override - public int hashCode() { - return Objects.hash(id, petId, quantity, shipDate, status, complete); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Order {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); - sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); - sb.append(" shipDate: ").append(toIndentedString(shipDate)).append("\n"); - sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append(" complete: ").append(toIndentedString(complete)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/OuterComposite.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/OuterComposite.java deleted file mode 100644 index 89b5ed48f3b..00000000000 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/OuterComposite.java +++ /dev/null @@ -1,166 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.math.BigDecimal; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - -/** - * OuterComposite - */ -@JsonPropertyOrder({ - OuterComposite.JSON_PROPERTY_MY_NUMBER, - OuterComposite.JSON_PROPERTY_MY_STRING, - OuterComposite.JSON_PROPERTY_MY_BOOLEAN -}) -@javax.annotation.concurrent.Immutable - -public class OuterComposite { - public static final String JSON_PROPERTY_MY_NUMBER = "my_number"; - private BigDecimal myNumber; - - public static final String JSON_PROPERTY_MY_STRING = "my_string"; - private String myString; - - public static final String JSON_PROPERTY_MY_BOOLEAN = "my_boolean"; - private Boolean myBoolean; - - - public OuterComposite myNumber(BigDecimal myNumber) { - - this.myNumber = myNumber; - return this; - } - - /** - * Get myNumber - * @return myNumber - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_MY_NUMBER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public BigDecimal getMyNumber() { - return myNumber; - } - - - public void setMyNumber(BigDecimal myNumber) { - this.myNumber = myNumber; - } - - - public OuterComposite myString(String myString) { - - this.myString = myString; - return this; - } - - /** - * Get myString - * @return myString - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_MY_STRING) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getMyString() { - return myString; - } - - - public void setMyString(String myString) { - this.myString = myString; - } - - - public OuterComposite myBoolean(Boolean myBoolean) { - - this.myBoolean = myBoolean; - return this; - } - - /** - * Get myBoolean - * @return myBoolean - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_MY_BOOLEAN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Boolean isMyBoolean() { - return myBoolean; - } - - - public void setMyBoolean(Boolean myBoolean) { - this.myBoolean = myBoolean; - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OuterComposite outerComposite = (OuterComposite) o; - return Objects.equals(this.myNumber, outerComposite.myNumber) && - Objects.equals(this.myString, outerComposite.myString) && - Objects.equals(this.myBoolean, outerComposite.myBoolean); - } - - @Override - public int hashCode() { - return Objects.hash(myNumber, myString, myBoolean); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OuterComposite {\n"); - sb.append(" myNumber: ").append(toIndentedString(myNumber)).append("\n"); - sb.append(" myString: ").append(toIndentedString(myString)).append("\n"); - sb.append(" myBoolean: ").append(toIndentedString(myBoolean)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/OuterEnum.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/OuterEnum.java deleted file mode 100644 index 308646a320c..00000000000 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/OuterEnum.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Gets or Sets OuterEnum - */ -public enum OuterEnum { - - PLACED("placed"), - - APPROVED("approved"), - - DELIVERED("delivered"); - - private String value; - - OuterEnum(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static OuterEnum fromValue(String value) { - for (OuterEnum b : OuterEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} - diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Pet.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Pet.java deleted file mode 100644 index 986b5ba89da..00000000000 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Pet.java +++ /dev/null @@ -1,312 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.util.ArrayList; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Set; -import org.openapitools.client.model.Category; -import org.openapitools.client.model.Tag; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - -/** - * Pet - */ -@JsonPropertyOrder({ - Pet.JSON_PROPERTY_ID, - Pet.JSON_PROPERTY_CATEGORY, - Pet.JSON_PROPERTY_NAME, - Pet.JSON_PROPERTY_PHOTO_URLS, - Pet.JSON_PROPERTY_TAGS, - Pet.JSON_PROPERTY_STATUS -}) -@javax.annotation.concurrent.Immutable - -public class Pet { - public static final String JSON_PROPERTY_ID = "id"; - private Long id; - - public static final String JSON_PROPERTY_CATEGORY = "category"; - private Category category; - - public static final String JSON_PROPERTY_NAME = "name"; - private String name; - - public static final String JSON_PROPERTY_PHOTO_URLS = "photoUrls"; - private Set photoUrls = new LinkedHashSet(); - - public static final String JSON_PROPERTY_TAGS = "tags"; - private List tags = null; - - /** - * pet status in the store - */ - public enum StatusEnum { - AVAILABLE("available"), - - PENDING("pending"), - - SOLD("sold"); - - private String value; - - StatusEnum(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static StatusEnum fromValue(String value) { - for (StatusEnum b : StatusEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - } - - public static final String JSON_PROPERTY_STATUS = "status"; - private StatusEnum status; - - - public Pet id(Long id) { - - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Long getId() { - return id; - } - - - public void setId(Long id) { - this.id = id; - } - - - public Pet category(Category category) { - - this.category = category; - return this; - } - - /** - * Get category - * @return category - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_CATEGORY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Category getCategory() { - return category; - } - - - public void setCategory(Category category) { - this.category = category; - } - - - public Pet name(String name) { - - this.name = name; - return this; - } - - /** - * Get name - * @return name - **/ - @ApiModelProperty(example = "doggie", required = true, value = "") - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - - public String getName() { - return name; - } - - - public void setName(String name) { - this.name = name; - } - - - public Pet photoUrls(Set photoUrls) { - - this.photoUrls = photoUrls; - return this; - } - - public Pet addPhotoUrlsItem(String photoUrlsItem) { - this.photoUrls.add(photoUrlsItem); - return this; - } - - /** - * Get photoUrls - * @return photoUrls - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_PHOTO_URLS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - - public Set getPhotoUrls() { - return photoUrls; - } - - - public void setPhotoUrls(Set photoUrls) { - this.photoUrls = photoUrls; - } - - - public Pet tags(List tags) { - - this.tags = tags; - return this; - } - - public Pet addTagsItem(Tag tagsItem) { - if (this.tags == null) { - this.tags = new ArrayList(); - } - this.tags.add(tagsItem); - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_TAGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public List getTags() { - return tags; - } - - - public void setTags(List tags) { - this.tags = tags; - } - - - public Pet status(StatusEnum status) { - - this.status = status; - return this; - } - - /** - * pet status in the store - * @return status - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "pet status in the store") - @JsonProperty(JSON_PROPERTY_STATUS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public StatusEnum getStatus() { - return status; - } - - - public void setStatus(StatusEnum status) { - this.status = status; - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Pet pet = (Pet) o; - return Objects.equals(this.id, pet.id) && - Objects.equals(this.category, pet.category) && - Objects.equals(this.name, pet.name) && - Objects.equals(this.photoUrls, pet.photoUrls) && - Objects.equals(this.tags, pet.tags) && - Objects.equals(this.status, pet.status); - } - - @Override - public int hashCode() { - return Objects.hash(id, category, name, photoUrls, tags, status); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Pet {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" category: ").append(toIndentedString(category)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" photoUrls: ").append(toIndentedString(photoUrls)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java deleted file mode 100644 index 1cee03d06c3..00000000000 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java +++ /dev/null @@ -1,125 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - -/** - * ReadOnlyFirst - */ -@JsonPropertyOrder({ - ReadOnlyFirst.JSON_PROPERTY_BAR, - ReadOnlyFirst.JSON_PROPERTY_BAZ -}) -@javax.annotation.concurrent.Immutable - -public class ReadOnlyFirst { - public static final String JSON_PROPERTY_BAR = "bar"; - private String bar; - - public static final String JSON_PROPERTY_BAZ = "baz"; - private String baz; - - - /** - * Get bar - * @return bar - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_BAR) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getBar() { - return bar; - } - - - - - public ReadOnlyFirst baz(String baz) { - - this.baz = baz; - return this; - } - - /** - * Get baz - * @return baz - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_BAZ) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getBaz() { - return baz; - } - - - public void setBaz(String baz) { - this.baz = baz; - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadOnlyFirst readOnlyFirst = (ReadOnlyFirst) o; - return Objects.equals(this.bar, readOnlyFirst.bar) && - Objects.equals(this.baz, readOnlyFirst.baz); - } - - @Override - public int hashCode() { - return Objects.hash(bar, baz); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReadOnlyFirst {\n"); - sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); - sb.append(" baz: ").append(toIndentedString(baz)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/SpecialModelName.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/SpecialModelName.java deleted file mode 100644 index 453c8ad9b99..00000000000 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/SpecialModelName.java +++ /dev/null @@ -1,103 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - -/** - * SpecialModelName - */ -@JsonPropertyOrder({ - SpecialModelName.JSON_PROPERTY_$_SPECIAL_PROPERTY_NAME -}) -@javax.annotation.concurrent.Immutable - -public class SpecialModelName { - public static final String JSON_PROPERTY_$_SPECIAL_PROPERTY_NAME = "$special[property.name]"; - private Long $specialPropertyName; - - - public SpecialModelName $specialPropertyName(Long $specialPropertyName) { - - this.$specialPropertyName = $specialPropertyName; - return this; - } - - /** - * Get $specialPropertyName - * @return $specialPropertyName - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_$_SPECIAL_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Long get$SpecialPropertyName() { - return $specialPropertyName; - } - - - public void set$SpecialPropertyName(Long $specialPropertyName) { - this.$specialPropertyName = $specialPropertyName; - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SpecialModelName $specialModelName = (SpecialModelName) o; - return Objects.equals(this.$specialPropertyName, $specialModelName.$specialPropertyName); - } - - @Override - public int hashCode() { - return Objects.hash($specialPropertyName); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SpecialModelName {\n"); - sb.append(" $specialPropertyName: ").append(toIndentedString($specialPropertyName)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Tag.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Tag.java deleted file mode 100644 index a7c2f4cafe2..00000000000 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/Tag.java +++ /dev/null @@ -1,134 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - -/** - * Tag - */ -@JsonPropertyOrder({ - Tag.JSON_PROPERTY_ID, - Tag.JSON_PROPERTY_NAME -}) -@javax.annotation.concurrent.Immutable - -public class Tag { - public static final String JSON_PROPERTY_ID = "id"; - private Long id; - - public static final String JSON_PROPERTY_NAME = "name"; - private String name; - - - public Tag id(Long id) { - - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Long getId() { - return id; - } - - - public void setId(Long id) { - this.id = id; - } - - - public Tag name(String name) { - - this.name = name; - return this; - } - - /** - * Get name - * @return name - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getName() { - return name; - } - - - public void setName(String name) { - this.name = name; - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Tag tag = (Tag) o; - return Objects.equals(this.id, tag.id) && - Objects.equals(this.name, tag.name); - } - - @Override - public int hashCode() { - return Objects.hash(id, name); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Tag {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/TypeHolderDefault.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/TypeHolderDefault.java deleted file mode 100644 index f5a3d19c0a9..00000000000 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/TypeHolderDefault.java +++ /dev/null @@ -1,230 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.math.BigDecimal; -import java.util.ArrayList; -import java.util.List; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - -/** - * TypeHolderDefault - */ -@JsonPropertyOrder({ - TypeHolderDefault.JSON_PROPERTY_STRING_ITEM, - TypeHolderDefault.JSON_PROPERTY_NUMBER_ITEM, - TypeHolderDefault.JSON_PROPERTY_INTEGER_ITEM, - TypeHolderDefault.JSON_PROPERTY_BOOL_ITEM, - TypeHolderDefault.JSON_PROPERTY_ARRAY_ITEM -}) -@javax.annotation.concurrent.Immutable - -public class TypeHolderDefault { - public static final String JSON_PROPERTY_STRING_ITEM = "string_item"; - private String stringItem = "what"; - - public static final String JSON_PROPERTY_NUMBER_ITEM = "number_item"; - private BigDecimal numberItem; - - public static final String JSON_PROPERTY_INTEGER_ITEM = "integer_item"; - private Integer integerItem; - - public static final String JSON_PROPERTY_BOOL_ITEM = "bool_item"; - private Boolean boolItem = true; - - public static final String JSON_PROPERTY_ARRAY_ITEM = "array_item"; - private List arrayItem = new ArrayList(); - - - public TypeHolderDefault stringItem(String stringItem) { - - this.stringItem = stringItem; - return this; - } - - /** - * Get stringItem - * @return stringItem - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_STRING_ITEM) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - - public String getStringItem() { - return stringItem; - } - - - public void setStringItem(String stringItem) { - this.stringItem = stringItem; - } - - - public TypeHolderDefault numberItem(BigDecimal numberItem) { - - this.numberItem = numberItem; - return this; - } - - /** - * Get numberItem - * @return numberItem - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_NUMBER_ITEM) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - - public BigDecimal getNumberItem() { - return numberItem; - } - - - public void setNumberItem(BigDecimal numberItem) { - this.numberItem = numberItem; - } - - - public TypeHolderDefault integerItem(Integer integerItem) { - - this.integerItem = integerItem; - return this; - } - - /** - * Get integerItem - * @return integerItem - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_INTEGER_ITEM) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - - public Integer getIntegerItem() { - return integerItem; - } - - - public void setIntegerItem(Integer integerItem) { - this.integerItem = integerItem; - } - - - public TypeHolderDefault boolItem(Boolean boolItem) { - - this.boolItem = boolItem; - return this; - } - - /** - * Get boolItem - * @return boolItem - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_BOOL_ITEM) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - - public Boolean isBoolItem() { - return boolItem; - } - - - public void setBoolItem(Boolean boolItem) { - this.boolItem = boolItem; - } - - - public TypeHolderDefault arrayItem(List arrayItem) { - - this.arrayItem = arrayItem; - return this; - } - - public TypeHolderDefault addArrayItemItem(Integer arrayItemItem) { - this.arrayItem.add(arrayItemItem); - return this; - } - - /** - * Get arrayItem - * @return arrayItem - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_ARRAY_ITEM) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - - public List getArrayItem() { - return arrayItem; - } - - - public void setArrayItem(List arrayItem) { - this.arrayItem = arrayItem; - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - TypeHolderDefault typeHolderDefault = (TypeHolderDefault) o; - return Objects.equals(this.stringItem, typeHolderDefault.stringItem) && - Objects.equals(this.numberItem, typeHolderDefault.numberItem) && - Objects.equals(this.integerItem, typeHolderDefault.integerItem) && - Objects.equals(this.boolItem, typeHolderDefault.boolItem) && - Objects.equals(this.arrayItem, typeHolderDefault.arrayItem); - } - - @Override - public int hashCode() { - return Objects.hash(stringItem, numberItem, integerItem, boolItem, arrayItem); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class TypeHolderDefault {\n"); - sb.append(" stringItem: ").append(toIndentedString(stringItem)).append("\n"); - sb.append(" numberItem: ").append(toIndentedString(numberItem)).append("\n"); - sb.append(" integerItem: ").append(toIndentedString(integerItem)).append("\n"); - sb.append(" boolItem: ").append(toIndentedString(boolItem)).append("\n"); - sb.append(" arrayItem: ").append(toIndentedString(arrayItem)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/TypeHolderExample.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/TypeHolderExample.java deleted file mode 100644 index d00f5441862..00000000000 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/TypeHolderExample.java +++ /dev/null @@ -1,260 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.math.BigDecimal; -import java.util.ArrayList; -import java.util.List; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - -/** - * TypeHolderExample - */ -@JsonPropertyOrder({ - TypeHolderExample.JSON_PROPERTY_STRING_ITEM, - TypeHolderExample.JSON_PROPERTY_NUMBER_ITEM, - TypeHolderExample.JSON_PROPERTY_FLOAT_ITEM, - TypeHolderExample.JSON_PROPERTY_INTEGER_ITEM, - TypeHolderExample.JSON_PROPERTY_BOOL_ITEM, - TypeHolderExample.JSON_PROPERTY_ARRAY_ITEM -}) -@javax.annotation.concurrent.Immutable - -public class TypeHolderExample { - public static final String JSON_PROPERTY_STRING_ITEM = "string_item"; - private String stringItem; - - public static final String JSON_PROPERTY_NUMBER_ITEM = "number_item"; - private BigDecimal numberItem; - - public static final String JSON_PROPERTY_FLOAT_ITEM = "float_item"; - private Float floatItem; - - public static final String JSON_PROPERTY_INTEGER_ITEM = "integer_item"; - private Integer integerItem; - - public static final String JSON_PROPERTY_BOOL_ITEM = "bool_item"; - private Boolean boolItem; - - public static final String JSON_PROPERTY_ARRAY_ITEM = "array_item"; - private List arrayItem = new ArrayList(); - - - public TypeHolderExample stringItem(String stringItem) { - - this.stringItem = stringItem; - return this; - } - - /** - * Get stringItem - * @return stringItem - **/ - @ApiModelProperty(example = "what", required = true, value = "") - @JsonProperty(JSON_PROPERTY_STRING_ITEM) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - - public String getStringItem() { - return stringItem; - } - - - public void setStringItem(String stringItem) { - this.stringItem = stringItem; - } - - - public TypeHolderExample numberItem(BigDecimal numberItem) { - - this.numberItem = numberItem; - return this; - } - - /** - * Get numberItem - * @return numberItem - **/ - @ApiModelProperty(example = "1.234", required = true, value = "") - @JsonProperty(JSON_PROPERTY_NUMBER_ITEM) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - - public BigDecimal getNumberItem() { - return numberItem; - } - - - public void setNumberItem(BigDecimal numberItem) { - this.numberItem = numberItem; - } - - - public TypeHolderExample floatItem(Float floatItem) { - - this.floatItem = floatItem; - return this; - } - - /** - * Get floatItem - * @return floatItem - **/ - @ApiModelProperty(example = "1.234", required = true, value = "") - @JsonProperty(JSON_PROPERTY_FLOAT_ITEM) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - - public Float getFloatItem() { - return floatItem; - } - - - public void setFloatItem(Float floatItem) { - this.floatItem = floatItem; - } - - - public TypeHolderExample integerItem(Integer integerItem) { - - this.integerItem = integerItem; - return this; - } - - /** - * Get integerItem - * @return integerItem - **/ - @ApiModelProperty(example = "-2", required = true, value = "") - @JsonProperty(JSON_PROPERTY_INTEGER_ITEM) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - - public Integer getIntegerItem() { - return integerItem; - } - - - public void setIntegerItem(Integer integerItem) { - this.integerItem = integerItem; - } - - - public TypeHolderExample boolItem(Boolean boolItem) { - - this.boolItem = boolItem; - return this; - } - - /** - * Get boolItem - * @return boolItem - **/ - @ApiModelProperty(example = "true", required = true, value = "") - @JsonProperty(JSON_PROPERTY_BOOL_ITEM) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - - public Boolean isBoolItem() { - return boolItem; - } - - - public void setBoolItem(Boolean boolItem) { - this.boolItem = boolItem; - } - - - public TypeHolderExample arrayItem(List arrayItem) { - - this.arrayItem = arrayItem; - return this; - } - - public TypeHolderExample addArrayItemItem(Integer arrayItemItem) { - this.arrayItem.add(arrayItemItem); - return this; - } - - /** - * Get arrayItem - * @return arrayItem - **/ - @ApiModelProperty(example = "[0, 1, 2, 3]", required = true, value = "") - @JsonProperty(JSON_PROPERTY_ARRAY_ITEM) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - - public List getArrayItem() { - return arrayItem; - } - - - public void setArrayItem(List arrayItem) { - this.arrayItem = arrayItem; - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - TypeHolderExample typeHolderExample = (TypeHolderExample) o; - return Objects.equals(this.stringItem, typeHolderExample.stringItem) && - Objects.equals(this.numberItem, typeHolderExample.numberItem) && - Objects.equals(this.floatItem, typeHolderExample.floatItem) && - Objects.equals(this.integerItem, typeHolderExample.integerItem) && - Objects.equals(this.boolItem, typeHolderExample.boolItem) && - Objects.equals(this.arrayItem, typeHolderExample.arrayItem); - } - - @Override - public int hashCode() { - return Objects.hash(stringItem, numberItem, floatItem, integerItem, boolItem, arrayItem); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class TypeHolderExample {\n"); - sb.append(" stringItem: ").append(toIndentedString(stringItem)).append("\n"); - sb.append(" numberItem: ").append(toIndentedString(numberItem)).append("\n"); - sb.append(" floatItem: ").append(toIndentedString(floatItem)).append("\n"); - sb.append(" integerItem: ").append(toIndentedString(integerItem)).append("\n"); - sb.append(" boolItem: ").append(toIndentedString(boolItem)).append("\n"); - sb.append(" arrayItem: ").append(toIndentedString(arrayItem)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/User.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/User.java deleted file mode 100644 index f83fb1e6718..00000000000 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/User.java +++ /dev/null @@ -1,320 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - -/** - * User - */ -@JsonPropertyOrder({ - User.JSON_PROPERTY_ID, - User.JSON_PROPERTY_USERNAME, - User.JSON_PROPERTY_FIRST_NAME, - User.JSON_PROPERTY_LAST_NAME, - User.JSON_PROPERTY_EMAIL, - User.JSON_PROPERTY_PASSWORD, - User.JSON_PROPERTY_PHONE, - User.JSON_PROPERTY_USER_STATUS -}) -@javax.annotation.concurrent.Immutable - -public class User { - public static final String JSON_PROPERTY_ID = "id"; - private Long id; - - public static final String JSON_PROPERTY_USERNAME = "username"; - private String username; - - public static final String JSON_PROPERTY_FIRST_NAME = "firstName"; - private String firstName; - - public static final String JSON_PROPERTY_LAST_NAME = "lastName"; - private String lastName; - - public static final String JSON_PROPERTY_EMAIL = "email"; - private String email; - - public static final String JSON_PROPERTY_PASSWORD = "password"; - private String password; - - public static final String JSON_PROPERTY_PHONE = "phone"; - private String phone; - - public static final String JSON_PROPERTY_USER_STATUS = "userStatus"; - private Integer userStatus; - - - public User id(Long id) { - - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Long getId() { - return id; - } - - - public void setId(Long id) { - this.id = id; - } - - - public User username(String username) { - - this.username = username; - return this; - } - - /** - * Get username - * @return username - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_USERNAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getUsername() { - return username; - } - - - public void setUsername(String username) { - this.username = username; - } - - - public User firstName(String firstName) { - - this.firstName = firstName; - return this; - } - - /** - * Get firstName - * @return firstName - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_FIRST_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getFirstName() { - return firstName; - } - - - public void setFirstName(String firstName) { - this.firstName = firstName; - } - - - public User lastName(String lastName) { - - this.lastName = lastName; - return this; - } - - /** - * Get lastName - * @return lastName - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_LAST_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getLastName() { - return lastName; - } - - - public void setLastName(String lastName) { - this.lastName = lastName; - } - - - public User email(String email) { - - this.email = email; - return this; - } - - /** - * Get email - * @return email - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_EMAIL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getEmail() { - return email; - } - - - public void setEmail(String email) { - this.email = email; - } - - - public User password(String password) { - - this.password = password; - return this; - } - - /** - * Get password - * @return password - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_PASSWORD) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getPassword() { - return password; - } - - - public void setPassword(String password) { - this.password = password; - } - - - public User phone(String phone) { - - this.phone = phone; - return this; - } - - /** - * Get phone - * @return phone - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_PHONE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getPhone() { - return phone; - } - - - public void setPhone(String phone) { - this.phone = phone; - } - - - public User userStatus(Integer userStatus) { - - this.userStatus = userStatus; - return this; - } - - /** - * User Status - * @return userStatus - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "User Status") - @JsonProperty(JSON_PROPERTY_USER_STATUS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Integer getUserStatus() { - return userStatus; - } - - - public void setUserStatus(Integer userStatus) { - this.userStatus = userStatus; - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - User user = (User) o; - return Objects.equals(this.id, user.id) && - Objects.equals(this.username, user.username) && - Objects.equals(this.firstName, user.firstName) && - Objects.equals(this.lastName, user.lastName) && - Objects.equals(this.email, user.email) && - Objects.equals(this.password, user.password) && - Objects.equals(this.phone, user.phone) && - Objects.equals(this.userStatus, user.userStatus); - } - - @Override - public int hashCode() { - return Objects.hash(id, username, firstName, lastName, email, password, phone, userStatus); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class User {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" username: ").append(toIndentedString(username)).append("\n"); - sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); - sb.append(" lastName: ").append(toIndentedString(lastName)).append("\n"); - sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" password: ").append(toIndentedString(password)).append("\n"); - sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); - sb.append(" userStatus: ").append(toIndentedString(userStatus)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/XmlItem.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/XmlItem.java deleted file mode 100644 index 22d7ad37054..00000000000 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/XmlItem.java +++ /dev/null @@ -1,1046 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.math.BigDecimal; -import java.util.ArrayList; -import java.util.List; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - -/** - * XmlItem - */ -@JsonPropertyOrder({ - XmlItem.JSON_PROPERTY_ATTRIBUTE_STRING, - XmlItem.JSON_PROPERTY_ATTRIBUTE_NUMBER, - XmlItem.JSON_PROPERTY_ATTRIBUTE_INTEGER, - XmlItem.JSON_PROPERTY_ATTRIBUTE_BOOLEAN, - XmlItem.JSON_PROPERTY_WRAPPED_ARRAY, - XmlItem.JSON_PROPERTY_NAME_STRING, - XmlItem.JSON_PROPERTY_NAME_NUMBER, - XmlItem.JSON_PROPERTY_NAME_INTEGER, - XmlItem.JSON_PROPERTY_NAME_BOOLEAN, - XmlItem.JSON_PROPERTY_NAME_ARRAY, - XmlItem.JSON_PROPERTY_NAME_WRAPPED_ARRAY, - XmlItem.JSON_PROPERTY_PREFIX_STRING, - XmlItem.JSON_PROPERTY_PREFIX_NUMBER, - XmlItem.JSON_PROPERTY_PREFIX_INTEGER, - XmlItem.JSON_PROPERTY_PREFIX_BOOLEAN, - XmlItem.JSON_PROPERTY_PREFIX_ARRAY, - XmlItem.JSON_PROPERTY_PREFIX_WRAPPED_ARRAY, - XmlItem.JSON_PROPERTY_NAMESPACE_STRING, - XmlItem.JSON_PROPERTY_NAMESPACE_NUMBER, - XmlItem.JSON_PROPERTY_NAMESPACE_INTEGER, - XmlItem.JSON_PROPERTY_NAMESPACE_BOOLEAN, - XmlItem.JSON_PROPERTY_NAMESPACE_ARRAY, - XmlItem.JSON_PROPERTY_NAMESPACE_WRAPPED_ARRAY, - XmlItem.JSON_PROPERTY_PREFIX_NS_STRING, - XmlItem.JSON_PROPERTY_PREFIX_NS_NUMBER, - XmlItem.JSON_PROPERTY_PREFIX_NS_INTEGER, - XmlItem.JSON_PROPERTY_PREFIX_NS_BOOLEAN, - XmlItem.JSON_PROPERTY_PREFIX_NS_ARRAY, - XmlItem.JSON_PROPERTY_PREFIX_NS_WRAPPED_ARRAY -}) -@javax.annotation.concurrent.Immutable - -public class XmlItem { - public static final String JSON_PROPERTY_ATTRIBUTE_STRING = "attribute_string"; - private String attributeString; - - public static final String JSON_PROPERTY_ATTRIBUTE_NUMBER = "attribute_number"; - private BigDecimal attributeNumber; - - public static final String JSON_PROPERTY_ATTRIBUTE_INTEGER = "attribute_integer"; - private Integer attributeInteger; - - public static final String JSON_PROPERTY_ATTRIBUTE_BOOLEAN = "attribute_boolean"; - private Boolean attributeBoolean; - - public static final String JSON_PROPERTY_WRAPPED_ARRAY = "wrapped_array"; - private List wrappedArray = null; - - public static final String JSON_PROPERTY_NAME_STRING = "name_string"; - private String nameString; - - public static final String JSON_PROPERTY_NAME_NUMBER = "name_number"; - private BigDecimal nameNumber; - - public static final String JSON_PROPERTY_NAME_INTEGER = "name_integer"; - private Integer nameInteger; - - public static final String JSON_PROPERTY_NAME_BOOLEAN = "name_boolean"; - private Boolean nameBoolean; - - public static final String JSON_PROPERTY_NAME_ARRAY = "name_array"; - private List nameArray = null; - - public static final String JSON_PROPERTY_NAME_WRAPPED_ARRAY = "name_wrapped_array"; - private List nameWrappedArray = null; - - public static final String JSON_PROPERTY_PREFIX_STRING = "prefix_string"; - private String prefixString; - - public static final String JSON_PROPERTY_PREFIX_NUMBER = "prefix_number"; - private BigDecimal prefixNumber; - - public static final String JSON_PROPERTY_PREFIX_INTEGER = "prefix_integer"; - private Integer prefixInteger; - - public static final String JSON_PROPERTY_PREFIX_BOOLEAN = "prefix_boolean"; - private Boolean prefixBoolean; - - public static final String JSON_PROPERTY_PREFIX_ARRAY = "prefix_array"; - private List prefixArray = null; - - public static final String JSON_PROPERTY_PREFIX_WRAPPED_ARRAY = "prefix_wrapped_array"; - private List prefixWrappedArray = null; - - public static final String JSON_PROPERTY_NAMESPACE_STRING = "namespace_string"; - private String namespaceString; - - public static final String JSON_PROPERTY_NAMESPACE_NUMBER = "namespace_number"; - private BigDecimal namespaceNumber; - - public static final String JSON_PROPERTY_NAMESPACE_INTEGER = "namespace_integer"; - private Integer namespaceInteger; - - public static final String JSON_PROPERTY_NAMESPACE_BOOLEAN = "namespace_boolean"; - private Boolean namespaceBoolean; - - public static final String JSON_PROPERTY_NAMESPACE_ARRAY = "namespace_array"; - private List namespaceArray = null; - - public static final String JSON_PROPERTY_NAMESPACE_WRAPPED_ARRAY = "namespace_wrapped_array"; - private List namespaceWrappedArray = null; - - public static final String JSON_PROPERTY_PREFIX_NS_STRING = "prefix_ns_string"; - private String prefixNsString; - - public static final String JSON_PROPERTY_PREFIX_NS_NUMBER = "prefix_ns_number"; - private BigDecimal prefixNsNumber; - - public static final String JSON_PROPERTY_PREFIX_NS_INTEGER = "prefix_ns_integer"; - private Integer prefixNsInteger; - - public static final String JSON_PROPERTY_PREFIX_NS_BOOLEAN = "prefix_ns_boolean"; - private Boolean prefixNsBoolean; - - public static final String JSON_PROPERTY_PREFIX_NS_ARRAY = "prefix_ns_array"; - private List prefixNsArray = null; - - public static final String JSON_PROPERTY_PREFIX_NS_WRAPPED_ARRAY = "prefix_ns_wrapped_array"; - private List prefixNsWrappedArray = null; - - - public XmlItem attributeString(String attributeString) { - - this.attributeString = attributeString; - return this; - } - - /** - * Get attributeString - * @return attributeString - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "string", value = "") - @JsonProperty(JSON_PROPERTY_ATTRIBUTE_STRING) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getAttributeString() { - return attributeString; - } - - - public void setAttributeString(String attributeString) { - this.attributeString = attributeString; - } - - - public XmlItem attributeNumber(BigDecimal attributeNumber) { - - this.attributeNumber = attributeNumber; - return this; - } - - /** - * Get attributeNumber - * @return attributeNumber - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "1.234", value = "") - @JsonProperty(JSON_PROPERTY_ATTRIBUTE_NUMBER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public BigDecimal getAttributeNumber() { - return attributeNumber; - } - - - public void setAttributeNumber(BigDecimal attributeNumber) { - this.attributeNumber = attributeNumber; - } - - - public XmlItem attributeInteger(Integer attributeInteger) { - - this.attributeInteger = attributeInteger; - return this; - } - - /** - * Get attributeInteger - * @return attributeInteger - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "-2", value = "") - @JsonProperty(JSON_PROPERTY_ATTRIBUTE_INTEGER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Integer getAttributeInteger() { - return attributeInteger; - } - - - public void setAttributeInteger(Integer attributeInteger) { - this.attributeInteger = attributeInteger; - } - - - public XmlItem attributeBoolean(Boolean attributeBoolean) { - - this.attributeBoolean = attributeBoolean; - return this; - } - - /** - * Get attributeBoolean - * @return attributeBoolean - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "true", value = "") - @JsonProperty(JSON_PROPERTY_ATTRIBUTE_BOOLEAN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Boolean isAttributeBoolean() { - return attributeBoolean; - } - - - public void setAttributeBoolean(Boolean attributeBoolean) { - this.attributeBoolean = attributeBoolean; - } - - - public XmlItem wrappedArray(List wrappedArray) { - - this.wrappedArray = wrappedArray; - return this; - } - - public XmlItem addWrappedArrayItem(Integer wrappedArrayItem) { - if (this.wrappedArray == null) { - this.wrappedArray = new ArrayList(); - } - this.wrappedArray.add(wrappedArrayItem); - return this; - } - - /** - * Get wrappedArray - * @return wrappedArray - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_WRAPPED_ARRAY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public List getWrappedArray() { - return wrappedArray; - } - - - public void setWrappedArray(List wrappedArray) { - this.wrappedArray = wrappedArray; - } - - - public XmlItem nameString(String nameString) { - - this.nameString = nameString; - return this; - } - - /** - * Get nameString - * @return nameString - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "string", value = "") - @JsonProperty(JSON_PROPERTY_NAME_STRING) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getNameString() { - return nameString; - } - - - public void setNameString(String nameString) { - this.nameString = nameString; - } - - - public XmlItem nameNumber(BigDecimal nameNumber) { - - this.nameNumber = nameNumber; - return this; - } - - /** - * Get nameNumber - * @return nameNumber - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "1.234", value = "") - @JsonProperty(JSON_PROPERTY_NAME_NUMBER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public BigDecimal getNameNumber() { - return nameNumber; - } - - - public void setNameNumber(BigDecimal nameNumber) { - this.nameNumber = nameNumber; - } - - - public XmlItem nameInteger(Integer nameInteger) { - - this.nameInteger = nameInteger; - return this; - } - - /** - * Get nameInteger - * @return nameInteger - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "-2", value = "") - @JsonProperty(JSON_PROPERTY_NAME_INTEGER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Integer getNameInteger() { - return nameInteger; - } - - - public void setNameInteger(Integer nameInteger) { - this.nameInteger = nameInteger; - } - - - public XmlItem nameBoolean(Boolean nameBoolean) { - - this.nameBoolean = nameBoolean; - return this; - } - - /** - * Get nameBoolean - * @return nameBoolean - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "true", value = "") - @JsonProperty(JSON_PROPERTY_NAME_BOOLEAN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Boolean isNameBoolean() { - return nameBoolean; - } - - - public void setNameBoolean(Boolean nameBoolean) { - this.nameBoolean = nameBoolean; - } - - - public XmlItem nameArray(List nameArray) { - - this.nameArray = nameArray; - return this; - } - - public XmlItem addNameArrayItem(Integer nameArrayItem) { - if (this.nameArray == null) { - this.nameArray = new ArrayList(); - } - this.nameArray.add(nameArrayItem); - return this; - } - - /** - * Get nameArray - * @return nameArray - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_NAME_ARRAY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public List getNameArray() { - return nameArray; - } - - - public void setNameArray(List nameArray) { - this.nameArray = nameArray; - } - - - public XmlItem nameWrappedArray(List nameWrappedArray) { - - this.nameWrappedArray = nameWrappedArray; - return this; - } - - public XmlItem addNameWrappedArrayItem(Integer nameWrappedArrayItem) { - if (this.nameWrappedArray == null) { - this.nameWrappedArray = new ArrayList(); - } - this.nameWrappedArray.add(nameWrappedArrayItem); - return this; - } - - /** - * Get nameWrappedArray - * @return nameWrappedArray - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_NAME_WRAPPED_ARRAY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public List getNameWrappedArray() { - return nameWrappedArray; - } - - - public void setNameWrappedArray(List nameWrappedArray) { - this.nameWrappedArray = nameWrappedArray; - } - - - public XmlItem prefixString(String prefixString) { - - this.prefixString = prefixString; - return this; - } - - /** - * Get prefixString - * @return prefixString - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "string", value = "") - @JsonProperty(JSON_PROPERTY_PREFIX_STRING) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getPrefixString() { - return prefixString; - } - - - public void setPrefixString(String prefixString) { - this.prefixString = prefixString; - } - - - public XmlItem prefixNumber(BigDecimal prefixNumber) { - - this.prefixNumber = prefixNumber; - return this; - } - - /** - * Get prefixNumber - * @return prefixNumber - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "1.234", value = "") - @JsonProperty(JSON_PROPERTY_PREFIX_NUMBER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public BigDecimal getPrefixNumber() { - return prefixNumber; - } - - - public void setPrefixNumber(BigDecimal prefixNumber) { - this.prefixNumber = prefixNumber; - } - - - public XmlItem prefixInteger(Integer prefixInteger) { - - this.prefixInteger = prefixInteger; - return this; - } - - /** - * Get prefixInteger - * @return prefixInteger - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "-2", value = "") - @JsonProperty(JSON_PROPERTY_PREFIX_INTEGER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Integer getPrefixInteger() { - return prefixInteger; - } - - - public void setPrefixInteger(Integer prefixInteger) { - this.prefixInteger = prefixInteger; - } - - - public XmlItem prefixBoolean(Boolean prefixBoolean) { - - this.prefixBoolean = prefixBoolean; - return this; - } - - /** - * Get prefixBoolean - * @return prefixBoolean - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "true", value = "") - @JsonProperty(JSON_PROPERTY_PREFIX_BOOLEAN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Boolean isPrefixBoolean() { - return prefixBoolean; - } - - - public void setPrefixBoolean(Boolean prefixBoolean) { - this.prefixBoolean = prefixBoolean; - } - - - public XmlItem prefixArray(List prefixArray) { - - this.prefixArray = prefixArray; - return this; - } - - public XmlItem addPrefixArrayItem(Integer prefixArrayItem) { - if (this.prefixArray == null) { - this.prefixArray = new ArrayList(); - } - this.prefixArray.add(prefixArrayItem); - return this; - } - - /** - * Get prefixArray - * @return prefixArray - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_PREFIX_ARRAY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public List getPrefixArray() { - return prefixArray; - } - - - public void setPrefixArray(List prefixArray) { - this.prefixArray = prefixArray; - } - - - public XmlItem prefixWrappedArray(List prefixWrappedArray) { - - this.prefixWrappedArray = prefixWrappedArray; - return this; - } - - public XmlItem addPrefixWrappedArrayItem(Integer prefixWrappedArrayItem) { - if (this.prefixWrappedArray == null) { - this.prefixWrappedArray = new ArrayList(); - } - this.prefixWrappedArray.add(prefixWrappedArrayItem); - return this; - } - - /** - * Get prefixWrappedArray - * @return prefixWrappedArray - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_PREFIX_WRAPPED_ARRAY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public List getPrefixWrappedArray() { - return prefixWrappedArray; - } - - - public void setPrefixWrappedArray(List prefixWrappedArray) { - this.prefixWrappedArray = prefixWrappedArray; - } - - - public XmlItem namespaceString(String namespaceString) { - - this.namespaceString = namespaceString; - return this; - } - - /** - * Get namespaceString - * @return namespaceString - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "string", value = "") - @JsonProperty(JSON_PROPERTY_NAMESPACE_STRING) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getNamespaceString() { - return namespaceString; - } - - - public void setNamespaceString(String namespaceString) { - this.namespaceString = namespaceString; - } - - - public XmlItem namespaceNumber(BigDecimal namespaceNumber) { - - this.namespaceNumber = namespaceNumber; - return this; - } - - /** - * Get namespaceNumber - * @return namespaceNumber - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "1.234", value = "") - @JsonProperty(JSON_PROPERTY_NAMESPACE_NUMBER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public BigDecimal getNamespaceNumber() { - return namespaceNumber; - } - - - public void setNamespaceNumber(BigDecimal namespaceNumber) { - this.namespaceNumber = namespaceNumber; - } - - - public XmlItem namespaceInteger(Integer namespaceInteger) { - - this.namespaceInteger = namespaceInteger; - return this; - } - - /** - * Get namespaceInteger - * @return namespaceInteger - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "-2", value = "") - @JsonProperty(JSON_PROPERTY_NAMESPACE_INTEGER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Integer getNamespaceInteger() { - return namespaceInteger; - } - - - public void setNamespaceInteger(Integer namespaceInteger) { - this.namespaceInteger = namespaceInteger; - } - - - public XmlItem namespaceBoolean(Boolean namespaceBoolean) { - - this.namespaceBoolean = namespaceBoolean; - return this; - } - - /** - * Get namespaceBoolean - * @return namespaceBoolean - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "true", value = "") - @JsonProperty(JSON_PROPERTY_NAMESPACE_BOOLEAN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Boolean isNamespaceBoolean() { - return namespaceBoolean; - } - - - public void setNamespaceBoolean(Boolean namespaceBoolean) { - this.namespaceBoolean = namespaceBoolean; - } - - - public XmlItem namespaceArray(List namespaceArray) { - - this.namespaceArray = namespaceArray; - return this; - } - - public XmlItem addNamespaceArrayItem(Integer namespaceArrayItem) { - if (this.namespaceArray == null) { - this.namespaceArray = new ArrayList(); - } - this.namespaceArray.add(namespaceArrayItem); - return this; - } - - /** - * Get namespaceArray - * @return namespaceArray - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_NAMESPACE_ARRAY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public List getNamespaceArray() { - return namespaceArray; - } - - - public void setNamespaceArray(List namespaceArray) { - this.namespaceArray = namespaceArray; - } - - - public XmlItem namespaceWrappedArray(List namespaceWrappedArray) { - - this.namespaceWrappedArray = namespaceWrappedArray; - return this; - } - - public XmlItem addNamespaceWrappedArrayItem(Integer namespaceWrappedArrayItem) { - if (this.namespaceWrappedArray == null) { - this.namespaceWrappedArray = new ArrayList(); - } - this.namespaceWrappedArray.add(namespaceWrappedArrayItem); - return this; - } - - /** - * Get namespaceWrappedArray - * @return namespaceWrappedArray - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_NAMESPACE_WRAPPED_ARRAY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public List getNamespaceWrappedArray() { - return namespaceWrappedArray; - } - - - public void setNamespaceWrappedArray(List namespaceWrappedArray) { - this.namespaceWrappedArray = namespaceWrappedArray; - } - - - public XmlItem prefixNsString(String prefixNsString) { - - this.prefixNsString = prefixNsString; - return this; - } - - /** - * Get prefixNsString - * @return prefixNsString - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "string", value = "") - @JsonProperty(JSON_PROPERTY_PREFIX_NS_STRING) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getPrefixNsString() { - return prefixNsString; - } - - - public void setPrefixNsString(String prefixNsString) { - this.prefixNsString = prefixNsString; - } - - - public XmlItem prefixNsNumber(BigDecimal prefixNsNumber) { - - this.prefixNsNumber = prefixNsNumber; - return this; - } - - /** - * Get prefixNsNumber - * @return prefixNsNumber - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "1.234", value = "") - @JsonProperty(JSON_PROPERTY_PREFIX_NS_NUMBER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public BigDecimal getPrefixNsNumber() { - return prefixNsNumber; - } - - - public void setPrefixNsNumber(BigDecimal prefixNsNumber) { - this.prefixNsNumber = prefixNsNumber; - } - - - public XmlItem prefixNsInteger(Integer prefixNsInteger) { - - this.prefixNsInteger = prefixNsInteger; - return this; - } - - /** - * Get prefixNsInteger - * @return prefixNsInteger - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "-2", value = "") - @JsonProperty(JSON_PROPERTY_PREFIX_NS_INTEGER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Integer getPrefixNsInteger() { - return prefixNsInteger; - } - - - public void setPrefixNsInteger(Integer prefixNsInteger) { - this.prefixNsInteger = prefixNsInteger; - } - - - public XmlItem prefixNsBoolean(Boolean prefixNsBoolean) { - - this.prefixNsBoolean = prefixNsBoolean; - return this; - } - - /** - * Get prefixNsBoolean - * @return prefixNsBoolean - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "true", value = "") - @JsonProperty(JSON_PROPERTY_PREFIX_NS_BOOLEAN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Boolean isPrefixNsBoolean() { - return prefixNsBoolean; - } - - - public void setPrefixNsBoolean(Boolean prefixNsBoolean) { - this.prefixNsBoolean = prefixNsBoolean; - } - - - public XmlItem prefixNsArray(List prefixNsArray) { - - this.prefixNsArray = prefixNsArray; - return this; - } - - public XmlItem addPrefixNsArrayItem(Integer prefixNsArrayItem) { - if (this.prefixNsArray == null) { - this.prefixNsArray = new ArrayList(); - } - this.prefixNsArray.add(prefixNsArrayItem); - return this; - } - - /** - * Get prefixNsArray - * @return prefixNsArray - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_PREFIX_NS_ARRAY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public List getPrefixNsArray() { - return prefixNsArray; - } - - - public void setPrefixNsArray(List prefixNsArray) { - this.prefixNsArray = prefixNsArray; - } - - - public XmlItem prefixNsWrappedArray(List prefixNsWrappedArray) { - - this.prefixNsWrappedArray = prefixNsWrappedArray; - return this; - } - - public XmlItem addPrefixNsWrappedArrayItem(Integer prefixNsWrappedArrayItem) { - if (this.prefixNsWrappedArray == null) { - this.prefixNsWrappedArray = new ArrayList(); - } - this.prefixNsWrappedArray.add(prefixNsWrappedArrayItem); - return this; - } - - /** - * Get prefixNsWrappedArray - * @return prefixNsWrappedArray - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_PREFIX_NS_WRAPPED_ARRAY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public List getPrefixNsWrappedArray() { - return prefixNsWrappedArray; - } - - - public void setPrefixNsWrappedArray(List prefixNsWrappedArray) { - this.prefixNsWrappedArray = prefixNsWrappedArray; - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - XmlItem xmlItem = (XmlItem) o; - return Objects.equals(this.attributeString, xmlItem.attributeString) && - Objects.equals(this.attributeNumber, xmlItem.attributeNumber) && - Objects.equals(this.attributeInteger, xmlItem.attributeInteger) && - Objects.equals(this.attributeBoolean, xmlItem.attributeBoolean) && - Objects.equals(this.wrappedArray, xmlItem.wrappedArray) && - Objects.equals(this.nameString, xmlItem.nameString) && - Objects.equals(this.nameNumber, xmlItem.nameNumber) && - Objects.equals(this.nameInteger, xmlItem.nameInteger) && - Objects.equals(this.nameBoolean, xmlItem.nameBoolean) && - Objects.equals(this.nameArray, xmlItem.nameArray) && - Objects.equals(this.nameWrappedArray, xmlItem.nameWrappedArray) && - Objects.equals(this.prefixString, xmlItem.prefixString) && - Objects.equals(this.prefixNumber, xmlItem.prefixNumber) && - Objects.equals(this.prefixInteger, xmlItem.prefixInteger) && - Objects.equals(this.prefixBoolean, xmlItem.prefixBoolean) && - Objects.equals(this.prefixArray, xmlItem.prefixArray) && - Objects.equals(this.prefixWrappedArray, xmlItem.prefixWrappedArray) && - Objects.equals(this.namespaceString, xmlItem.namespaceString) && - Objects.equals(this.namespaceNumber, xmlItem.namespaceNumber) && - Objects.equals(this.namespaceInteger, xmlItem.namespaceInteger) && - Objects.equals(this.namespaceBoolean, xmlItem.namespaceBoolean) && - Objects.equals(this.namespaceArray, xmlItem.namespaceArray) && - Objects.equals(this.namespaceWrappedArray, xmlItem.namespaceWrappedArray) && - Objects.equals(this.prefixNsString, xmlItem.prefixNsString) && - Objects.equals(this.prefixNsNumber, xmlItem.prefixNsNumber) && - Objects.equals(this.prefixNsInteger, xmlItem.prefixNsInteger) && - Objects.equals(this.prefixNsBoolean, xmlItem.prefixNsBoolean) && - Objects.equals(this.prefixNsArray, xmlItem.prefixNsArray) && - Objects.equals(this.prefixNsWrappedArray, xmlItem.prefixNsWrappedArray); - } - - @Override - public int hashCode() { - return Objects.hash(attributeString, attributeNumber, attributeInteger, attributeBoolean, wrappedArray, nameString, nameNumber, nameInteger, nameBoolean, nameArray, nameWrappedArray, prefixString, prefixNumber, prefixInteger, prefixBoolean, prefixArray, prefixWrappedArray, namespaceString, namespaceNumber, namespaceInteger, namespaceBoolean, namespaceArray, namespaceWrappedArray, prefixNsString, prefixNsNumber, prefixNsInteger, prefixNsBoolean, prefixNsArray, prefixNsWrappedArray); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class XmlItem {\n"); - sb.append(" attributeString: ").append(toIndentedString(attributeString)).append("\n"); - sb.append(" attributeNumber: ").append(toIndentedString(attributeNumber)).append("\n"); - sb.append(" attributeInteger: ").append(toIndentedString(attributeInteger)).append("\n"); - sb.append(" attributeBoolean: ").append(toIndentedString(attributeBoolean)).append("\n"); - sb.append(" wrappedArray: ").append(toIndentedString(wrappedArray)).append("\n"); - sb.append(" nameString: ").append(toIndentedString(nameString)).append("\n"); - sb.append(" nameNumber: ").append(toIndentedString(nameNumber)).append("\n"); - sb.append(" nameInteger: ").append(toIndentedString(nameInteger)).append("\n"); - sb.append(" nameBoolean: ").append(toIndentedString(nameBoolean)).append("\n"); - sb.append(" nameArray: ").append(toIndentedString(nameArray)).append("\n"); - sb.append(" nameWrappedArray: ").append(toIndentedString(nameWrappedArray)).append("\n"); - sb.append(" prefixString: ").append(toIndentedString(prefixString)).append("\n"); - sb.append(" prefixNumber: ").append(toIndentedString(prefixNumber)).append("\n"); - sb.append(" prefixInteger: ").append(toIndentedString(prefixInteger)).append("\n"); - sb.append(" prefixBoolean: ").append(toIndentedString(prefixBoolean)).append("\n"); - sb.append(" prefixArray: ").append(toIndentedString(prefixArray)).append("\n"); - sb.append(" prefixWrappedArray: ").append(toIndentedString(prefixWrappedArray)).append("\n"); - sb.append(" namespaceString: ").append(toIndentedString(namespaceString)).append("\n"); - sb.append(" namespaceNumber: ").append(toIndentedString(namespaceNumber)).append("\n"); - sb.append(" namespaceInteger: ").append(toIndentedString(namespaceInteger)).append("\n"); - sb.append(" namespaceBoolean: ").append(toIndentedString(namespaceBoolean)).append("\n"); - sb.append(" namespaceArray: ").append(toIndentedString(namespaceArray)).append("\n"); - sb.append(" namespaceWrappedArray: ").append(toIndentedString(namespaceWrappedArray)).append("\n"); - sb.append(" prefixNsString: ").append(toIndentedString(prefixNsString)).append("\n"); - sb.append(" prefixNsNumber: ").append(toIndentedString(prefixNsNumber)).append("\n"); - sb.append(" prefixNsInteger: ").append(toIndentedString(prefixNsInteger)).append("\n"); - sb.append(" prefixNsBoolean: ").append(toIndentedString(prefixNsBoolean)).append("\n"); - sb.append(" prefixNsArray: ").append(toIndentedString(prefixNsArray)).append("\n"); - sb.append(" prefixNsWrappedArray: ").append(toIndentedString(prefixNsWrappedArray)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/StringUtilTest.java b/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/StringUtilTest.java deleted file mode 100644 index aa7c81759ec..00000000000 --- a/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/StringUtilTest.java +++ /dev/null @@ -1,33 +0,0 @@ -package org.openapitools.client; - -import org.junit.*; -import static org.junit.Assert.*; - - -public class StringUtilTest { - @Test - public void testContainsIgnoreCase() { - assertTrue(StringUtil.containsIgnoreCase(new String[]{"abc"}, "abc")); - assertTrue(StringUtil.containsIgnoreCase(new String[]{"abc"}, "ABC")); - assertTrue(StringUtil.containsIgnoreCase(new String[]{"ABC"}, "abc")); - assertTrue(StringUtil.containsIgnoreCase(new String[]{null, "abc"}, "ABC")); - assertTrue(StringUtil.containsIgnoreCase(new String[]{null, "abc"}, null)); - - assertFalse(StringUtil.containsIgnoreCase(new String[]{"abc"}, "def")); - assertFalse(StringUtil.containsIgnoreCase(new String[]{}, "ABC")); - assertFalse(StringUtil.containsIgnoreCase(new String[]{}, null)); - } - - @Test - public void testJoin() { - String[] array = {"aa", "bb", "cc"}; - assertEquals("aa,bb,cc", StringUtil.join(array, ",")); - assertEquals("aa, bb, cc", StringUtil.join(array, ", ")); - assertEquals("aabbcc", StringUtil.join(array, "")); - assertEquals("aa bb cc", StringUtil.join(array, " ")); - assertEquals("aa\nbb\ncc", StringUtil.join(array, "\n")); - - assertEquals("", StringUtil.join(new String[]{}, ",")); - assertEquals("abc", StringUtil.join(new String[]{"abc"}, ",")); - } -} diff --git a/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/api/AnotherFakeApiTest.java b/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/api/AnotherFakeApiTest.java deleted file mode 100644 index b5e26401d2f..00000000000 --- a/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/api/AnotherFakeApiTest.java +++ /dev/null @@ -1,40 +0,0 @@ -package org.openapitools.client.api; - -import org.openapitools.client.ApiClient; -import org.openapitools.client.model.Client; -import org.junit.Before; -import org.junit.Test; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * API tests for AnotherFakeApi - */ -public class AnotherFakeApiTest { - - private AnotherFakeApi api; - - @Before - public void setup() { - api = new ApiClient().buildClient(AnotherFakeApi.class); - } - - - /** - * To test special tags - * - * To test special tags and operation ID starting with number - */ - @Test - public void call123testSpecialTagsTest() { - Client body = null; - // Client response = api.call123testSpecialTags(body); - - // TODO: test validations - } - - -} diff --git a/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/api/FakeApiTest.java b/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/api/FakeApiTest.java deleted file mode 100644 index f454452f462..00000000000 --- a/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/api/FakeApiTest.java +++ /dev/null @@ -1,289 +0,0 @@ -package org.openapitools.client.api; - -import org.openapitools.client.ApiClient; -import java.math.BigDecimal; -import org.openapitools.client.model.Client; -import java.io.File; -import org.openapitools.client.model.FileSchemaTestClass; -import org.threeten.bp.LocalDate; -import org.threeten.bp.OffsetDateTime; -import org.openapitools.client.model.OuterComposite; -import org.openapitools.client.model.User; -import org.junit.Before; -import org.junit.Test; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * API tests for FakeApi - */ -public class FakeApiTest { - - private FakeApi api; - - @Before - public void setup() { - api = new ApiClient().buildClient(FakeApi.class); - } - - - /** - * - * - * Test serialization of outer boolean types - */ - @Test - public void fakeOuterBooleanSerializeTest() { - Boolean body = null; - // Boolean response = api.fakeOuterBooleanSerialize(body); - - // TODO: test validations - } - - - /** - * - * - * Test serialization of object with outer number type - */ - @Test - public void fakeOuterCompositeSerializeTest() { - OuterComposite body = null; - // OuterComposite response = api.fakeOuterCompositeSerialize(body); - - // TODO: test validations - } - - - /** - * - * - * Test serialization of outer number types - */ - @Test - public void fakeOuterNumberSerializeTest() { - BigDecimal body = null; - // BigDecimal response = api.fakeOuterNumberSerialize(body); - - // TODO: test validations - } - - - /** - * - * - * Test serialization of outer string types - */ - @Test - public void fakeOuterStringSerializeTest() { - String body = null; - // String response = api.fakeOuterStringSerialize(body); - - // TODO: test validations - } - - - /** - * - * - * For this test, the body for this request much reference a schema named `File`. - */ - @Test - public void testBodyWithFileSchemaTest() { - FileSchemaTestClass body = null; - // api.testBodyWithFileSchema(body); - - // TODO: test validations - } - - - /** - * - * - * - */ - @Test - public void testBodyWithQueryParamsTest() { - String query = null; - User body = null; - // api.testBodyWithQueryParams(query, body); - - // TODO: test validations - } - - /** - * - * - * - * - * This tests the overload of the method that uses a Map for query parameters instead of - * listing them out individually. - */ - @Test - public void testBodyWithQueryParamsTestQueryMap() { - User body = null; - FakeApi.TestBodyWithQueryParamsQueryParams queryParams = new FakeApi.TestBodyWithQueryParamsQueryParams() - .query(null); - // api.testBodyWithQueryParams(body, queryParams); - - // TODO: test validations - } - - /** - * To test \"client\" model - * - * To test \"client\" model - */ - @Test - public void testClientModelTest() { - Client body = null; - // Client response = api.testClientModel(body); - - // TODO: test validations - } - - - /** - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - * - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - */ - @Test - public void testEndpointParametersTest() { - BigDecimal number = null; - Double _double = null; - String patternWithoutDelimiter = null; - byte[] _byte = null; - Integer integer = null; - Integer int32 = null; - Long int64 = null; - Float _float = null; - String string = null; - File binary = null; - LocalDate date = null; - OffsetDateTime dateTime = null; - String password = null; - String paramCallback = null; - // api.testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback); - - // TODO: test validations - } - - - /** - * To test enum parameters - * - * To test enum parameters - */ - @Test - public void testEnumParametersTest() { - List enumHeaderStringArray = null; - String enumHeaderString = null; - List enumQueryStringArray = null; - String enumQueryString = null; - Integer enumQueryInteger = null; - Double enumQueryDouble = null; - List enumFormStringArray = null; - String enumFormString = null; - // api.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); - - // TODO: test validations - } - - /** - * To test enum parameters - * - * To test enum parameters - * - * This tests the overload of the method that uses a Map for query parameters instead of - * listing them out individually. - */ - @Test - public void testEnumParametersTestQueryMap() { - List enumHeaderStringArray = null; - String enumHeaderString = null; - List enumFormStringArray = null; - String enumFormString = null; - FakeApi.TestEnumParametersQueryParams queryParams = new FakeApi.TestEnumParametersQueryParams() - .enumQueryStringArray(null) - .enumQueryString(null) - .enumQueryInteger(null) - .enumQueryDouble(null); - // api.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumFormStringArray, enumFormString, queryParams); - - // TODO: test validations - } - - /** - * Fake endpoint to test group parameters (optional) - * - * Fake endpoint to test group parameters (optional) - */ - @Test - public void testGroupParametersTest() { - Integer requiredStringGroup = null; - Boolean requiredBooleanGroup = null; - Long requiredInt64Group = null; - Integer stringGroup = null; - Boolean booleanGroup = null; - Long int64Group = null; - // api.testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); - - // TODO: test validations - } - - /** - * Fake endpoint to test group parameters (optional) - * - * Fake endpoint to test group parameters (optional) - * - * This tests the overload of the method that uses a Map for query parameters instead of - * listing them out individually. - */ - @Test - public void testGroupParametersTestQueryMap() { - Boolean requiredBooleanGroup = null; - Boolean booleanGroup = null; - FakeApi.TestGroupParametersQueryParams queryParams = new FakeApi.TestGroupParametersQueryParams() - .requiredStringGroup(null) - .requiredInt64Group(null) - .stringGroup(null) - .int64Group(null); - // api.testGroupParameters(requiredBooleanGroup, booleanGroup, queryParams); - - // TODO: test validations - } - - /** - * test inline additionalProperties - * - * - */ - @Test - public void testInlineAdditionalPropertiesTest() { - Map param = null; - // api.testInlineAdditionalProperties(param); - - // TODO: test validations - } - - - /** - * test json serialization of form data - * - * - */ - @Test - public void testJsonFormDataTest() { - String param = null; - String param2 = null; - // api.testJsonFormData(param, param2); - - // TODO: test validations - } - - -} diff --git a/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/api/FakeClassnameTags123ApiTest.java b/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/api/FakeClassnameTags123ApiTest.java deleted file mode 100644 index badb867ce81..00000000000 --- a/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/api/FakeClassnameTags123ApiTest.java +++ /dev/null @@ -1,40 +0,0 @@ -package org.openapitools.client.api; - -import org.openapitools.client.ApiClient; -import org.openapitools.client.model.Client; -import org.junit.Before; -import org.junit.Test; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * API tests for FakeClassnameTags123Api - */ -public class FakeClassnameTags123ApiTest { - - private FakeClassnameTags123Api api; - - @Before - public void setup() { - api = new ApiClient().buildClient(FakeClassnameTags123Api.class); - } - - - /** - * To test class name in snake case - * - * To test class name in snake case - */ - @Test - public void testClassnameTest() { - Client body = null; - // Client response = api.testClassname(body); - - // TODO: test validations - } - - -} diff --git a/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/api/PetApiTest.java b/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/api/PetApiTest.java deleted file mode 100644 index b42adee44e7..00000000000 --- a/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/api/PetApiTest.java +++ /dev/null @@ -1,193 +0,0 @@ -package org.openapitools.client.api; - -import org.openapitools.client.ApiClient; -import java.io.File; -import org.openapitools.client.model.ModelApiResponse; -import org.openapitools.client.model.Pet; -import org.junit.Before; -import org.junit.Test; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * API tests for PetApi - */ -public class PetApiTest { - - private PetApi api; - - @Before - public void setup() { - api = new ApiClient().buildClient(PetApi.class); - } - - - /** - * Add a new pet to the store - * - * - */ - @Test - public void addPetTest() { - Pet body = null; - // api.addPet(body); - - // TODO: test validations - } - - - /** - * Deletes a pet - * - * - */ - @Test - public void deletePetTest() { - Long petId = null; - String apiKey = null; - // api.deletePet(petId, apiKey); - - // TODO: test validations - } - - - /** - * Finds Pets by status - * - * Multiple status values can be provided with comma separated strings - */ - @Test - public void findPetsByStatusTest() { - List status = null; - // List response = api.findPetsByStatus(status); - - // TODO: test validations - } - - /** - * Finds Pets by status - * - * Multiple status values can be provided with comma separated strings - * - * This tests the overload of the method that uses a Map for query parameters instead of - * listing them out individually. - */ - @Test - public void findPetsByStatusTestQueryMap() { - PetApi.FindPetsByStatusQueryParams queryParams = new PetApi.FindPetsByStatusQueryParams() - .status(null); - // List response = api.findPetsByStatus(queryParams); - - // TODO: test validations - } - - /** - * Finds Pets by tags - * - * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. - */ - @Test - public void findPetsByTagsTest() { - List tags = null; - // List response = api.findPetsByTags(tags); - - // TODO: test validations - } - - /** - * Finds Pets by tags - * - * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. - * - * This tests the overload of the method that uses a Map for query parameters instead of - * listing them out individually. - */ - @Test - public void findPetsByTagsTestQueryMap() { - PetApi.FindPetsByTagsQueryParams queryParams = new PetApi.FindPetsByTagsQueryParams() - .tags(null); - // List response = api.findPetsByTags(queryParams); - - // TODO: test validations - } - - /** - * Find pet by ID - * - * Returns a single pet - */ - @Test - public void getPetByIdTest() { - Long petId = null; - // Pet response = api.getPetById(petId); - - // TODO: test validations - } - - - /** - * Update an existing pet - * - * - */ - @Test - public void updatePetTest() { - Pet body = null; - // api.updatePet(body); - - // TODO: test validations - } - - - /** - * Updates a pet in the store with form data - * - * - */ - @Test - public void updatePetWithFormTest() { - Long petId = null; - String name = null; - String status = null; - // api.updatePetWithForm(petId, name, status); - - // TODO: test validations - } - - - /** - * uploads an image - * - * - */ - @Test - public void uploadFileTest() { - Long petId = null; - String additionalMetadata = null; - File file = null; - // ModelApiResponse response = api.uploadFile(petId, additionalMetadata, file); - - // TODO: test validations - } - - - /** - * uploads an image (required) - * - * - */ - @Test - public void uploadFileWithRequiredFileTest() { - Long petId = null; - File requiredFile = null; - String additionalMetadata = null; - // ModelApiResponse response = api.uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata); - - // TODO: test validations - } - - -} diff --git a/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/api/StoreApiTest.java b/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/api/StoreApiTest.java deleted file mode 100644 index 07a48ec6e63..00000000000 --- a/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/api/StoreApiTest.java +++ /dev/null @@ -1,81 +0,0 @@ -package org.openapitools.client.api; - -import org.openapitools.client.ApiClient; -import org.openapitools.client.model.Order; -import org.junit.Before; -import org.junit.Test; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * API tests for StoreApi - */ -public class StoreApiTest { - - private StoreApi api; - - @Before - public void setup() { - api = new ApiClient().buildClient(StoreApi.class); - } - - - /** - * Delete purchase order by ID - * - * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors - */ - @Test - public void deleteOrderTest() { - String orderId = null; - // api.deleteOrder(orderId); - - // TODO: test validations - } - - - /** - * Returns pet inventories by status - * - * Returns a map of status codes to quantities - */ - @Test - public void getInventoryTest() { - // Map response = api.getInventory(); - - // TODO: test validations - } - - - /** - * Find purchase order by ID - * - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions - */ - @Test - public void getOrderByIdTest() { - Long orderId = null; - // Order response = api.getOrderById(orderId); - - // TODO: test validations - } - - - /** - * Place an order for a pet - * - * - */ - @Test - public void placeOrderTest() { - Order body = null; - // Order response = api.placeOrder(body); - - // TODO: test validations - } - - -} diff --git a/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/api/UserApiTest.java b/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/api/UserApiTest.java deleted file mode 100644 index 2656fb4cc92..00000000000 --- a/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/api/UserApiTest.java +++ /dev/null @@ -1,156 +0,0 @@ -package org.openapitools.client.api; - -import org.openapitools.client.ApiClient; -import org.openapitools.client.model.User; -import org.junit.Before; -import org.junit.Test; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * API tests for UserApi - */ -public class UserApiTest { - - private UserApi api; - - @Before - public void setup() { - api = new ApiClient().buildClient(UserApi.class); - } - - - /** - * Create user - * - * This can only be done by the logged in user. - */ - @Test - public void createUserTest() { - User body = null; - // api.createUser(body); - - // TODO: test validations - } - - - /** - * Creates list of users with given input array - * - * - */ - @Test - public void createUsersWithArrayInputTest() { - List body = null; - // api.createUsersWithArrayInput(body); - - // TODO: test validations - } - - - /** - * Creates list of users with given input array - * - * - */ - @Test - public void createUsersWithListInputTest() { - List body = null; - // api.createUsersWithListInput(body); - - // TODO: test validations - } - - - /** - * Delete user - * - * This can only be done by the logged in user. - */ - @Test - public void deleteUserTest() { - String username = null; - // api.deleteUser(username); - - // TODO: test validations - } - - - /** - * Get user by user name - * - * - */ - @Test - public void getUserByNameTest() { - String username = null; - // User response = api.getUserByName(username); - - // TODO: test validations - } - - - /** - * Logs user into the system - * - * - */ - @Test - public void loginUserTest() { - String username = null; - String password = null; - // String response = api.loginUser(username, password); - - // TODO: test validations - } - - /** - * Logs user into the system - * - * - * - * This tests the overload of the method that uses a Map for query parameters instead of - * listing them out individually. - */ - @Test - public void loginUserTestQueryMap() { - UserApi.LoginUserQueryParams queryParams = new UserApi.LoginUserQueryParams() - .username(null) - .password(null); - // String response = api.loginUser(queryParams); - - // TODO: test validations - } - - /** - * Logs out current logged in user session - * - * - */ - @Test - public void logoutUserTest() { - // api.logoutUser(); - - // TODO: test validations - } - - - /** - * Updated user - * - * This can only be done by the logged in user. - */ - @Test - public void updateUserTest() { - String username = null; - User body = null; - // api.updateUser(username, body); - - // TODO: test validations - } - - -} diff --git a/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/AdditionalPropertiesAnyTypeTest.java b/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/AdditionalPropertiesAnyTypeTest.java deleted file mode 100644 index 2b0bd0bbaef..00000000000 --- a/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/AdditionalPropertiesAnyTypeTest.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 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. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.util.HashMap; -import java.util.Map; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for AdditionalPropertiesAnyType - */ -public class AdditionalPropertiesAnyTypeTest { - private final AdditionalPropertiesAnyType model = new AdditionalPropertiesAnyType(); - - /** - * Model tests for AdditionalPropertiesAnyType - */ - @Test - public void testAdditionalPropertiesAnyType() { - // TODO: test AdditionalPropertiesAnyType - } - - /** - * Test the property 'name' - */ - @Test - public void nameTest() { - // TODO: test name - } - -} diff --git a/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/AdditionalPropertiesArrayTest.java b/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/AdditionalPropertiesArrayTest.java deleted file mode 100644 index c6dd88eea82..00000000000 --- a/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/AdditionalPropertiesArrayTest.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * 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. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for AdditionalPropertiesArray - */ -public class AdditionalPropertiesArrayTest { - private final AdditionalPropertiesArray model = new AdditionalPropertiesArray(); - - /** - * Model tests for AdditionalPropertiesArray - */ - @Test - public void testAdditionalPropertiesArray() { - // TODO: test AdditionalPropertiesArray - } - - /** - * Test the property 'name' - */ - @Test - public void nameTest() { - // TODO: test name - } - -} diff --git a/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/AdditionalPropertiesBooleanTest.java b/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/AdditionalPropertiesBooleanTest.java deleted file mode 100644 index 9d474c0dd80..00000000000 --- a/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/AdditionalPropertiesBooleanTest.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 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. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.util.HashMap; -import java.util.Map; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for AdditionalPropertiesBoolean - */ -public class AdditionalPropertiesBooleanTest { - private final AdditionalPropertiesBoolean model = new AdditionalPropertiesBoolean(); - - /** - * Model tests for AdditionalPropertiesBoolean - */ - @Test - public void testAdditionalPropertiesBoolean() { - // TODO: test AdditionalPropertiesBoolean - } - - /** - * Test the property 'name' - */ - @Test - public void nameTest() { - // TODO: test name - } - -} diff --git a/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/AdditionalPropertiesClassTest.java b/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/AdditionalPropertiesClassTest.java deleted file mode 100644 index c6bcc988bf9..00000000000 --- a/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/AdditionalPropertiesClassTest.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * 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. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for AdditionalPropertiesClass - */ -public class AdditionalPropertiesClassTest { - private final AdditionalPropertiesClass model = new AdditionalPropertiesClass(); - - /** - * Model tests for AdditionalPropertiesClass - */ - @Test - public void testAdditionalPropertiesClass() { - // TODO: test AdditionalPropertiesClass - } - - /** - * Test the property 'mapProperty' - */ - @Test - public void mapPropertyTest() { - // TODO: test mapProperty - } - - /** - * Test the property 'mapOfMapProperty' - */ - @Test - public void mapOfMapPropertyTest() { - // TODO: test mapOfMapProperty - } - -} diff --git a/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/AdditionalPropertiesIntegerTest.java b/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/AdditionalPropertiesIntegerTest.java deleted file mode 100644 index bf1b1c427b6..00000000000 --- a/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/AdditionalPropertiesIntegerTest.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 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. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.util.HashMap; -import java.util.Map; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for AdditionalPropertiesInteger - */ -public class AdditionalPropertiesIntegerTest { - private final AdditionalPropertiesInteger model = new AdditionalPropertiesInteger(); - - /** - * Model tests for AdditionalPropertiesInteger - */ - @Test - public void testAdditionalPropertiesInteger() { - // TODO: test AdditionalPropertiesInteger - } - - /** - * Test the property 'name' - */ - @Test - public void nameTest() { - // TODO: test name - } - -} diff --git a/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/AdditionalPropertiesNumberTest.java b/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/AdditionalPropertiesNumberTest.java deleted file mode 100644 index b9cb6470e38..00000000000 --- a/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/AdditionalPropertiesNumberTest.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * 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. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.math.BigDecimal; -import java.util.HashMap; -import java.util.Map; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for AdditionalPropertiesNumber - */ -public class AdditionalPropertiesNumberTest { - private final AdditionalPropertiesNumber model = new AdditionalPropertiesNumber(); - - /** - * Model tests for AdditionalPropertiesNumber - */ - @Test - public void testAdditionalPropertiesNumber() { - // TODO: test AdditionalPropertiesNumber - } - - /** - * Test the property 'name' - */ - @Test - public void nameTest() { - // TODO: test name - } - -} diff --git a/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/AdditionalPropertiesObjectTest.java b/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/AdditionalPropertiesObjectTest.java deleted file mode 100644 index 3cbcb8ec3b0..00000000000 --- a/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/AdditionalPropertiesObjectTest.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 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. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.util.HashMap; -import java.util.Map; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for AdditionalPropertiesObject - */ -public class AdditionalPropertiesObjectTest { - private final AdditionalPropertiesObject model = new AdditionalPropertiesObject(); - - /** - * Model tests for AdditionalPropertiesObject - */ - @Test - public void testAdditionalPropertiesObject() { - // TODO: test AdditionalPropertiesObject - } - - /** - * Test the property 'name' - */ - @Test - public void nameTest() { - // TODO: test name - } - -} diff --git a/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/AdditionalPropertiesStringTest.java b/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/AdditionalPropertiesStringTest.java deleted file mode 100644 index 1d3c05075ea..00000000000 --- a/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/AdditionalPropertiesStringTest.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 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. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.util.HashMap; -import java.util.Map; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for AdditionalPropertiesString - */ -public class AdditionalPropertiesStringTest { - private final AdditionalPropertiesString model = new AdditionalPropertiesString(); - - /** - * Model tests for AdditionalPropertiesString - */ - @Test - public void testAdditionalPropertiesString() { - // TODO: test AdditionalPropertiesString - } - - /** - * Test the property 'name' - */ - @Test - public void nameTest() { - // TODO: test name - } - -} diff --git a/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/AnimalTest.java b/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/AnimalTest.java deleted file mode 100644 index beb02882b30..00000000000 --- a/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/AnimalTest.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * 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. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for Animal - */ -public class AnimalTest { - private final Animal model = new Animal(); - - /** - * Model tests for Animal - */ - @Test - public void testAnimal() { - // TODO: test Animal - } - - /** - * Test the property 'className' - */ - @Test - public void classNameTest() { - // TODO: test className - } - - /** - * Test the property 'color' - */ - @Test - public void colorTest() { - // TODO: test color - } - -} diff --git a/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnlyTest.java b/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnlyTest.java deleted file mode 100644 index ae7970522b1..00000000000 --- a/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnlyTest.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * 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. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.math.BigDecimal; -import java.util.ArrayList; -import java.util.List; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for ArrayOfArrayOfNumberOnly - */ -public class ArrayOfArrayOfNumberOnlyTest { - private final ArrayOfArrayOfNumberOnly model = new ArrayOfArrayOfNumberOnly(); - - /** - * Model tests for ArrayOfArrayOfNumberOnly - */ - @Test - public void testArrayOfArrayOfNumberOnly() { - // TODO: test ArrayOfArrayOfNumberOnly - } - - /** - * Test the property 'arrayArrayNumber' - */ - @Test - public void arrayArrayNumberTest() { - // TODO: test arrayArrayNumber - } - -} diff --git a/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/ArrayOfNumberOnlyTest.java b/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/ArrayOfNumberOnlyTest.java deleted file mode 100644 index 6151b7068b7..00000000000 --- a/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/ArrayOfNumberOnlyTest.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * 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. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.math.BigDecimal; -import java.util.ArrayList; -import java.util.List; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for ArrayOfNumberOnly - */ -public class ArrayOfNumberOnlyTest { - private final ArrayOfNumberOnly model = new ArrayOfNumberOnly(); - - /** - * Model tests for ArrayOfNumberOnly - */ - @Test - public void testArrayOfNumberOnly() { - // TODO: test ArrayOfNumberOnly - } - - /** - * Test the property 'arrayNumber' - */ - @Test - public void arrayNumberTest() { - // TODO: test arrayNumber - } - -} diff --git a/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/ArrayTestTest.java b/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/ArrayTestTest.java deleted file mode 100644 index 4bb62b6569a..00000000000 --- a/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/ArrayTestTest.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * 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. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.util.ArrayList; -import java.util.List; -import org.openapitools.client.model.ReadOnlyFirst; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for ArrayTest - */ -public class ArrayTestTest { - private final ArrayTest model = new ArrayTest(); - - /** - * Model tests for ArrayTest - */ - @Test - public void testArrayTest() { - // TODO: test ArrayTest - } - - /** - * Test the property 'arrayOfString' - */ - @Test - public void arrayOfStringTest() { - // TODO: test arrayOfString - } - - /** - * Test the property 'arrayArrayOfInteger' - */ - @Test - public void arrayArrayOfIntegerTest() { - // TODO: test arrayArrayOfInteger - } - - /** - * Test the property 'arrayArrayOfModel' - */ - @Test - public void arrayArrayOfModelTest() { - // TODO: test arrayArrayOfModel - } - -} diff --git a/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/BigCatAllOfTest.java b/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/BigCatAllOfTest.java deleted file mode 100644 index a9b13011f00..00000000000 --- a/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/BigCatAllOfTest.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for BigCatAllOf - */ -public class BigCatAllOfTest { - private final BigCatAllOf model = new BigCatAllOf(); - - /** - * Model tests for BigCatAllOf - */ - @Test - public void testBigCatAllOf() { - // TODO: test BigCatAllOf - } - - /** - * Test the property 'kind' - */ - @Test - public void kindTest() { - // TODO: test kind - } - -} diff --git a/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/BigCatTest.java b/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/BigCatTest.java deleted file mode 100644 index 006c8070742..00000000000 --- a/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/BigCatTest.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import org.openapitools.client.model.BigCatAllOf; -import org.openapitools.client.model.Cat; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for BigCat - */ -public class BigCatTest { - private final BigCat model = new BigCat(); - - /** - * Model tests for BigCat - */ - @Test - public void testBigCat() { - // TODO: test BigCat - } - - /** - * Test the property 'className' - */ - @Test - public void classNameTest() { - // TODO: test className - } - - /** - * Test the property 'color' - */ - @Test - public void colorTest() { - // TODO: test color - } - - /** - * Test the property 'declawed' - */ - @Test - public void declawedTest() { - // TODO: test declawed - } - - /** - * Test the property 'kind' - */ - @Test - public void kindTest() { - // TODO: test kind - } - -} diff --git a/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/CapitalizationTest.java b/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/CapitalizationTest.java deleted file mode 100644 index eae9be7938c..00000000000 --- a/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/CapitalizationTest.java +++ /dev/null @@ -1,88 +0,0 @@ -/* - * 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. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for Capitalization - */ -public class CapitalizationTest { - private final Capitalization model = new Capitalization(); - - /** - * Model tests for Capitalization - */ - @Test - public void testCapitalization() { - // TODO: test Capitalization - } - - /** - * Test the property 'smallCamel' - */ - @Test - public void smallCamelTest() { - // TODO: test smallCamel - } - - /** - * Test the property 'capitalCamel' - */ - @Test - public void capitalCamelTest() { - // TODO: test capitalCamel - } - - /** - * Test the property 'smallSnake' - */ - @Test - public void smallSnakeTest() { - // TODO: test smallSnake - } - - /** - * Test the property 'capitalSnake' - */ - @Test - public void capitalSnakeTest() { - // TODO: test capitalSnake - } - - /** - * Test the property 'scAETHFlowPoints' - */ - @Test - public void scAETHFlowPointsTest() { - // TODO: test scAETHFlowPoints - } - - /** - * Test the property 'ATT_NAME' - */ - @Test - public void ATT_NAMETest() { - // TODO: test ATT_NAME - } - -} diff --git a/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/CatAllOfTest.java b/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/CatAllOfTest.java deleted file mode 100644 index 69b226745d7..00000000000 --- a/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/CatAllOfTest.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * 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. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for CatAllOf - */ -public class CatAllOfTest { - private final CatAllOf model = new CatAllOf(); - - /** - * Model tests for CatAllOf - */ - @Test - public void testCatAllOf() { - // TODO: test CatAllOf - } - - /** - * Test the property 'declawed' - */ - @Test - public void declawedTest() { - // TODO: test declawed - } - -} diff --git a/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/CatTest.java b/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/CatTest.java deleted file mode 100644 index dcb9f2d4cae..00000000000 --- a/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/CatTest.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * 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. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import org.openapitools.client.model.Animal; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for Cat - */ -public class CatTest { - private final Cat model = new Cat(); - - /** - * Model tests for Cat - */ - @Test - public void testCat() { - // TODO: test Cat - } - - /** - * Test the property 'className' - */ - @Test - public void classNameTest() { - // TODO: test className - } - - /** - * Test the property 'color' - */ - @Test - public void colorTest() { - // TODO: test color - } - - /** - * Test the property 'declawed' - */ - @Test - public void declawedTest() { - // TODO: test declawed - } - -} diff --git a/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/CategoryTest.java b/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/CategoryTest.java deleted file mode 100644 index 1df27cf0320..00000000000 --- a/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/CategoryTest.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * 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. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for Category - */ -public class CategoryTest { - private final Category model = new Category(); - - /** - * Model tests for Category - */ - @Test - public void testCategory() { - // TODO: test Category - } - - /** - * Test the property 'id' - */ - @Test - public void idTest() { - // TODO: test id - } - - /** - * Test the property 'name' - */ - @Test - public void nameTest() { - // TODO: test name - } - -} diff --git a/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/ClassModelTest.java b/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/ClassModelTest.java deleted file mode 100644 index 04eb02f835e..00000000000 --- a/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/ClassModelTest.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * 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. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for ClassModel - */ -public class ClassModelTest { - private final ClassModel model = new ClassModel(); - - /** - * Model tests for ClassModel - */ - @Test - public void testClassModel() { - // TODO: test ClassModel - } - - /** - * Test the property 'propertyClass' - */ - @Test - public void propertyClassTest() { - // TODO: test propertyClass - } - -} diff --git a/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/ClientTest.java b/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/ClientTest.java deleted file mode 100644 index 03b6bb41a52..00000000000 --- a/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/ClientTest.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * 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. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for Client - */ -public class ClientTest { - private final Client model = new Client(); - - /** - * Model tests for Client - */ - @Test - public void testClient() { - // TODO: test Client - } - - /** - * Test the property 'client' - */ - @Test - public void clientTest() { - // TODO: test client - } - -} diff --git a/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/DogAllOfTest.java b/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/DogAllOfTest.java deleted file mode 100644 index 1b83dcefc4f..00000000000 --- a/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/DogAllOfTest.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * 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. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for DogAllOf - */ -public class DogAllOfTest { - private final DogAllOf model = new DogAllOf(); - - /** - * Model tests for DogAllOf - */ - @Test - public void testDogAllOf() { - // TODO: test DogAllOf - } - - /** - * Test the property 'breed' - */ - @Test - public void breedTest() { - // TODO: test breed - } - -} diff --git a/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/DogTest.java b/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/DogTest.java deleted file mode 100644 index 06ac28f804a..00000000000 --- a/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/DogTest.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * 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. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import org.openapitools.client.model.Animal; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for Dog - */ -public class DogTest { - private final Dog model = new Dog(); - - /** - * Model tests for Dog - */ - @Test - public void testDog() { - // TODO: test Dog - } - - /** - * Test the property 'className' - */ - @Test - public void classNameTest() { - // TODO: test className - } - - /** - * Test the property 'color' - */ - @Test - public void colorTest() { - // TODO: test color - } - - /** - * Test the property 'breed' - */ - @Test - public void breedTest() { - // TODO: test breed - } - -} diff --git a/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/EnumArraysTest.java b/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/EnumArraysTest.java deleted file mode 100644 index 11b5f01985f..00000000000 --- a/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/EnumArraysTest.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * 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. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.util.ArrayList; -import java.util.List; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for EnumArrays - */ -public class EnumArraysTest { - private final EnumArrays model = new EnumArrays(); - - /** - * Model tests for EnumArrays - */ - @Test - public void testEnumArrays() { - // TODO: test EnumArrays - } - - /** - * Test the property 'justSymbol' - */ - @Test - public void justSymbolTest() { - // TODO: test justSymbol - } - - /** - * Test the property 'arrayEnum' - */ - @Test - public void arrayEnumTest() { - // TODO: test arrayEnum - } - -} diff --git a/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/EnumClassTest.java b/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/EnumClassTest.java deleted file mode 100644 index cb51ca50c95..00000000000 --- a/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/EnumClassTest.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * 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. - */ - - -package org.openapitools.client.model; - -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for EnumClass - */ -public class EnumClassTest { - /** - * Model tests for EnumClass - */ - @Test - public void testEnumClass() { - // TODO: test EnumClass - } - -} diff --git a/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/EnumTestTest.java b/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/EnumTestTest.java deleted file mode 100644 index 13122a0cb97..00000000000 --- a/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/EnumTestTest.java +++ /dev/null @@ -1,81 +0,0 @@ -/* - * 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. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import org.openapitools.client.model.OuterEnum; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for EnumTest - */ -public class EnumTestTest { - private final EnumTest model = new EnumTest(); - - /** - * Model tests for EnumTest - */ - @Test - public void testEnumTest() { - // TODO: test EnumTest - } - - /** - * Test the property 'enumString' - */ - @Test - public void enumStringTest() { - // TODO: test enumString - } - - /** - * Test the property 'enumStringRequired' - */ - @Test - public void enumStringRequiredTest() { - // TODO: test enumStringRequired - } - - /** - * Test the property 'enumInteger' - */ - @Test - public void enumIntegerTest() { - // TODO: test enumInteger - } - - /** - * Test the property 'enumNumber' - */ - @Test - public void enumNumberTest() { - // TODO: test enumNumber - } - - /** - * Test the property 'outerEnum' - */ - @Test - public void outerEnumTest() { - // TODO: test outerEnum - } - -} diff --git a/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/FileSchemaTestClassTest.java b/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/FileSchemaTestClassTest.java deleted file mode 100644 index a6b0d8ff7b0..00000000000 --- a/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/FileSchemaTestClassTest.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * 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. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.util.ArrayList; -import java.util.List; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for FileSchemaTestClass - */ -public class FileSchemaTestClassTest { - private final FileSchemaTestClass model = new FileSchemaTestClass(); - - /** - * Model tests for FileSchemaTestClass - */ - @Test - public void testFileSchemaTestClass() { - // TODO: test FileSchemaTestClass - } - - /** - * Test the property 'file' - */ - @Test - public void fileTest() { - // TODO: test file - } - - /** - * Test the property 'files' - */ - @Test - public void filesTest() { - // TODO: test files - } - -} diff --git a/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/FormatTestTest.java b/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/FormatTestTest.java deleted file mode 100644 index 6081209ef19..00000000000 --- a/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/FormatTestTest.java +++ /dev/null @@ -1,149 +0,0 @@ -/* - * 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. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.File; -import java.math.BigDecimal; -import java.util.UUID; -import org.threeten.bp.LocalDate; -import org.threeten.bp.OffsetDateTime; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for FormatTest - */ -public class FormatTestTest { - private final FormatTest model = new FormatTest(); - - /** - * Model tests for FormatTest - */ - @Test - public void testFormatTest() { - // TODO: test FormatTest - } - - /** - * Test the property 'integer' - */ - @Test - public void integerTest() { - // TODO: test integer - } - - /** - * Test the property 'int32' - */ - @Test - public void int32Test() { - // TODO: test int32 - } - - /** - * Test the property 'int64' - */ - @Test - public void int64Test() { - // TODO: test int64 - } - - /** - * Test the property 'number' - */ - @Test - public void numberTest() { - // TODO: test number - } - - /** - * Test the property '_float' - */ - @Test - public void _floatTest() { - // TODO: test _float - } - - /** - * Test the property '_double' - */ - @Test - public void _doubleTest() { - // TODO: test _double - } - - /** - * Test the property 'string' - */ - @Test - public void stringTest() { - // TODO: test string - } - - /** - * Test the property '_byte' - */ - @Test - public void _byteTest() { - // TODO: test _byte - } - - /** - * Test the property 'binary' - */ - @Test - public void binaryTest() { - // TODO: test binary - } - - /** - * Test the property 'date' - */ - @Test - public void dateTest() { - // TODO: test date - } - - /** - * Test the property 'dateTime' - */ - @Test - public void dateTimeTest() { - // TODO: test dateTime - } - - /** - * Test the property 'uuid' - */ - @Test - public void uuidTest() { - // TODO: test uuid - } - - /** - * Test the property 'password' - */ - @Test - public void passwordTest() { - // TODO: test password - } - -} diff --git a/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/HasOnlyReadOnlyTest.java b/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/HasOnlyReadOnlyTest.java deleted file mode 100644 index 2c4b2470b98..00000000000 --- a/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/HasOnlyReadOnlyTest.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * 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. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for HasOnlyReadOnly - */ -public class HasOnlyReadOnlyTest { - private final HasOnlyReadOnly model = new HasOnlyReadOnly(); - - /** - * Model tests for HasOnlyReadOnly - */ - @Test - public void testHasOnlyReadOnly() { - // TODO: test HasOnlyReadOnly - } - - /** - * Test the property 'bar' - */ - @Test - public void barTest() { - // TODO: test bar - } - - /** - * Test the property 'foo' - */ - @Test - public void fooTest() { - // TODO: test foo - } - -} diff --git a/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/MapTestTest.java b/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/MapTestTest.java deleted file mode 100644 index 0f08d8c88f0..00000000000 --- a/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/MapTestTest.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - * 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. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for MapTest - */ -public class MapTestTest { - private final MapTest model = new MapTest(); - - /** - * Model tests for MapTest - */ - @Test - public void testMapTest() { - // TODO: test MapTest - } - - /** - * Test the property 'mapMapOfString' - */ - @Test - public void mapMapOfStringTest() { - // TODO: test mapMapOfString - } - - /** - * Test the property 'mapOfEnumString' - */ - @Test - public void mapOfEnumStringTest() { - // TODO: test mapOfEnumString - } - - /** - * Test the property 'directMap' - */ - @Test - public void directMapTest() { - // TODO: test directMap - } - - /** - * Test the property 'indirectMap' - */ - @Test - public void indirectMapTest() { - // TODO: test indirectMap - } - -} diff --git a/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java b/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java deleted file mode 100644 index c308aec0a94..00000000000 --- a/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java +++ /dev/null @@ -1,70 +0,0 @@ -/* - * 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. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.UUID; -import org.openapitools.client.model.Animal; -import org.threeten.bp.OffsetDateTime; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for MixedPropertiesAndAdditionalPropertiesClass - */ -public class MixedPropertiesAndAdditionalPropertiesClassTest { - private final MixedPropertiesAndAdditionalPropertiesClass model = new MixedPropertiesAndAdditionalPropertiesClass(); - - /** - * Model tests for MixedPropertiesAndAdditionalPropertiesClass - */ - @Test - public void testMixedPropertiesAndAdditionalPropertiesClass() { - // TODO: test MixedPropertiesAndAdditionalPropertiesClass - } - - /** - * Test the property 'uuid' - */ - @Test - public void uuidTest() { - // TODO: test uuid - } - - /** - * Test the property 'dateTime' - */ - @Test - public void dateTimeTest() { - // TODO: test dateTime - } - - /** - * Test the property 'map' - */ - @Test - public void mapTest() { - // TODO: test map - } - -} diff --git a/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/Model200ResponseTest.java b/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/Model200ResponseTest.java deleted file mode 100644 index 1ad55ca32ea..00000000000 --- a/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/Model200ResponseTest.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * 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. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for Model200Response - */ -public class Model200ResponseTest { - private final Model200Response model = new Model200Response(); - - /** - * Model tests for Model200Response - */ - @Test - public void testModel200Response() { - // TODO: test Model200Response - } - - /** - * Test the property 'name' - */ - @Test - public void nameTest() { - // TODO: test name - } - - /** - * Test the property 'propertyClass' - */ - @Test - public void propertyClassTest() { - // TODO: test propertyClass - } - -} diff --git a/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java b/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java deleted file mode 100644 index 73d28676aea..00000000000 --- a/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * 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. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for ModelApiResponse - */ -public class ModelApiResponseTest { - private final ModelApiResponse model = new ModelApiResponse(); - - /** - * Model tests for ModelApiResponse - */ - @Test - public void testModelApiResponse() { - // TODO: test ModelApiResponse - } - - /** - * Test the property 'code' - */ - @Test - public void codeTest() { - // TODO: test code - } - - /** - * Test the property 'type' - */ - @Test - public void typeTest() { - // TODO: test type - } - - /** - * Test the property 'message' - */ - @Test - public void messageTest() { - // TODO: test message - } - -} diff --git a/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/ModelReturnTest.java b/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/ModelReturnTest.java deleted file mode 100644 index b073fda0014..00000000000 --- a/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/ModelReturnTest.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * 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. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for ModelReturn - */ -public class ModelReturnTest { - private final ModelReturn model = new ModelReturn(); - - /** - * Model tests for ModelReturn - */ - @Test - public void testModelReturn() { - // TODO: test ModelReturn - } - - /** - * Test the property '_return' - */ - @Test - public void _returnTest() { - // TODO: test _return - } - -} diff --git a/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/NameTest.java b/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/NameTest.java deleted file mode 100644 index e81ebc38e65..00000000000 --- a/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/NameTest.java +++ /dev/null @@ -1,72 +0,0 @@ -/* - * 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. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for Name - */ -public class NameTest { - private final Name model = new Name(); - - /** - * Model tests for Name - */ - @Test - public void testName() { - // TODO: test Name - } - - /** - * Test the property 'name' - */ - @Test - public void nameTest() { - // TODO: test name - } - - /** - * Test the property 'snakeCase' - */ - @Test - public void snakeCaseTest() { - // TODO: test snakeCase - } - - /** - * Test the property 'property' - */ - @Test - public void propertyTest() { - // TODO: test property - } - - /** - * Test the property '_123number' - */ - @Test - public void _123numberTest() { - // TODO: test _123number - } - -} diff --git a/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/NumberOnlyTest.java b/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/NumberOnlyTest.java deleted file mode 100644 index 565c8bd0627..00000000000 --- a/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/NumberOnlyTest.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * 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. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.math.BigDecimal; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for NumberOnly - */ -public class NumberOnlyTest { - private final NumberOnly model = new NumberOnly(); - - /** - * Model tests for NumberOnly - */ - @Test - public void testNumberOnly() { - // TODO: test NumberOnly - } - - /** - * Test the property 'justNumber' - */ - @Test - public void justNumberTest() { - // TODO: test justNumber - } - -} diff --git a/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/OrderTest.java b/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/OrderTest.java deleted file mode 100644 index c2d3025a264..00000000000 --- a/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/OrderTest.java +++ /dev/null @@ -1,89 +0,0 @@ -/* - * 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. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import org.threeten.bp.OffsetDateTime; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for Order - */ -public class OrderTest { - private final Order model = new Order(); - - /** - * Model tests for Order - */ - @Test - public void testOrder() { - // TODO: test Order - } - - /** - * Test the property 'id' - */ - @Test - public void idTest() { - // TODO: test id - } - - /** - * Test the property 'petId' - */ - @Test - public void petIdTest() { - // TODO: test petId - } - - /** - * Test the property 'quantity' - */ - @Test - public void quantityTest() { - // TODO: test quantity - } - - /** - * Test the property 'shipDate' - */ - @Test - public void shipDateTest() { - // TODO: test shipDate - } - - /** - * Test the property 'status' - */ - @Test - public void statusTest() { - // TODO: test status - } - - /** - * Test the property 'complete' - */ - @Test - public void completeTest() { - // TODO: test complete - } - -} diff --git a/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/OuterCompositeTest.java b/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/OuterCompositeTest.java deleted file mode 100644 index 49b656a93fa..00000000000 --- a/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/OuterCompositeTest.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * 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. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.math.BigDecimal; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for OuterComposite - */ -public class OuterCompositeTest { - private final OuterComposite model = new OuterComposite(); - - /** - * Model tests for OuterComposite - */ - @Test - public void testOuterComposite() { - // TODO: test OuterComposite - } - - /** - * Test the property 'myNumber' - */ - @Test - public void myNumberTest() { - // TODO: test myNumber - } - - /** - * Test the property 'myString' - */ - @Test - public void myStringTest() { - // TODO: test myString - } - - /** - * Test the property 'myBoolean' - */ - @Test - public void myBooleanTest() { - // TODO: test myBoolean - } - -} diff --git a/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/OuterEnumTest.java b/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/OuterEnumTest.java deleted file mode 100644 index 61154c6d881..00000000000 --- a/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/OuterEnumTest.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * 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. - */ - - -package org.openapitools.client.model; - -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for OuterEnum - */ -public class OuterEnumTest { - /** - * Model tests for OuterEnum - */ - @Test - public void testOuterEnum() { - // TODO: test OuterEnum - } - -} diff --git a/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/PetTest.java b/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/PetTest.java deleted file mode 100644 index bf6908e4a45..00000000000 --- a/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/PetTest.java +++ /dev/null @@ -1,92 +0,0 @@ -/* - * 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. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.util.ArrayList; -import java.util.List; -import org.openapitools.client.model.Category; -import org.openapitools.client.model.Tag; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for Pet - */ -public class PetTest { - private final Pet model = new Pet(); - - /** - * Model tests for Pet - */ - @Test - public void testPet() { - // TODO: test Pet - } - - /** - * Test the property 'id' - */ - @Test - public void idTest() { - // TODO: test id - } - - /** - * Test the property 'category' - */ - @Test - public void categoryTest() { - // TODO: test category - } - - /** - * Test the property 'name' - */ - @Test - public void nameTest() { - // TODO: test name - } - - /** - * Test the property 'photoUrls' - */ - @Test - public void photoUrlsTest() { - // TODO: test photoUrls - } - - /** - * Test the property 'tags' - */ - @Test - public void tagsTest() { - // TODO: test tags - } - - /** - * Test the property 'status' - */ - @Test - public void statusTest() { - // TODO: test status - } - -} diff --git a/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/ReadOnlyFirstTest.java b/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/ReadOnlyFirstTest.java deleted file mode 100644 index e48b31a39fd..00000000000 --- a/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/ReadOnlyFirstTest.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * 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. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for ReadOnlyFirst - */ -public class ReadOnlyFirstTest { - private final ReadOnlyFirst model = new ReadOnlyFirst(); - - /** - * Model tests for ReadOnlyFirst - */ - @Test - public void testReadOnlyFirst() { - // TODO: test ReadOnlyFirst - } - - /** - * Test the property 'bar' - */ - @Test - public void barTest() { - // TODO: test bar - } - - /** - * Test the property 'baz' - */ - @Test - public void bazTest() { - // TODO: test baz - } - -} diff --git a/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/SpecialModelNameTest.java b/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/SpecialModelNameTest.java deleted file mode 100644 index 1696eee82da..00000000000 --- a/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/SpecialModelNameTest.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * 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. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for SpecialModelName - */ -public class SpecialModelNameTest { - private final SpecialModelName model = new SpecialModelName(); - - /** - * Model tests for SpecialModelName - */ - @Test - public void testSpecialModelName() { - // TODO: test SpecialModelName - } - - /** - * Test the property '$specialPropertyName' - */ - @Test - public void $specialPropertyNameTest() { - // TODO: test $specialPropertyName - } - -} diff --git a/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/TagTest.java b/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/TagTest.java deleted file mode 100644 index b37aca5fdfc..00000000000 --- a/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/TagTest.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * 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. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for Tag - */ -public class TagTest { - private final Tag model = new Tag(); - - /** - * Model tests for Tag - */ - @Test - public void testTag() { - // TODO: test Tag - } - - /** - * Test the property 'id' - */ - @Test - public void idTest() { - // TODO: test id - } - - /** - * Test the property 'name' - */ - @Test - public void nameTest() { - // TODO: test name - } - -} diff --git a/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/TypeHolderDefaultTest.java b/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/TypeHolderDefaultTest.java deleted file mode 100644 index 409076e80a3..00000000000 --- a/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/TypeHolderDefaultTest.java +++ /dev/null @@ -1,83 +0,0 @@ -/* - * 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. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.math.BigDecimal; -import java.util.ArrayList; -import java.util.List; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for TypeHolderDefault - */ -public class TypeHolderDefaultTest { - private final TypeHolderDefault model = new TypeHolderDefault(); - - /** - * Model tests for TypeHolderDefault - */ - @Test - public void testTypeHolderDefault() { - // TODO: test TypeHolderDefault - } - - /** - * Test the property 'stringItem' - */ - @Test - public void stringItemTest() { - // TODO: test stringItem - } - - /** - * Test the property 'numberItem' - */ - @Test - public void numberItemTest() { - // TODO: test numberItem - } - - /** - * Test the property 'integerItem' - */ - @Test - public void integerItemTest() { - // TODO: test integerItem - } - - /** - * Test the property 'boolItem' - */ - @Test - public void boolItemTest() { - // TODO: test boolItem - } - - /** - * Test the property 'arrayItem' - */ - @Test - public void arrayItemTest() { - // TODO: test arrayItem - } - -} diff --git a/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/TypeHolderExampleTest.java b/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/TypeHolderExampleTest.java deleted file mode 100644 index ffd8f3ddc33..00000000000 --- a/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/TypeHolderExampleTest.java +++ /dev/null @@ -1,83 +0,0 @@ -/* - * 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. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.math.BigDecimal; -import java.util.ArrayList; -import java.util.List; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for TypeHolderExample - */ -public class TypeHolderExampleTest { - private final TypeHolderExample model = new TypeHolderExample(); - - /** - * Model tests for TypeHolderExample - */ - @Test - public void testTypeHolderExample() { - // TODO: test TypeHolderExample - } - - /** - * Test the property 'stringItem' - */ - @Test - public void stringItemTest() { - // TODO: test stringItem - } - - /** - * Test the property 'numberItem' - */ - @Test - public void numberItemTest() { - // TODO: test numberItem - } - - /** - * Test the property 'integerItem' - */ - @Test - public void integerItemTest() { - // TODO: test integerItem - } - - /** - * Test the property 'boolItem' - */ - @Test - public void boolItemTest() { - // TODO: test boolItem - } - - /** - * Test the property 'arrayItem' - */ - @Test - public void arrayItemTest() { - // TODO: test arrayItem - } - -} diff --git a/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/UserTest.java b/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/UserTest.java deleted file mode 100644 index 76733c9e72f..00000000000 --- a/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/UserTest.java +++ /dev/null @@ -1,104 +0,0 @@ -/* - * 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. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for User - */ -public class UserTest { - private final User model = new User(); - - /** - * Model tests for User - */ - @Test - public void testUser() { - // TODO: test User - } - - /** - * Test the property 'id' - */ - @Test - public void idTest() { - // TODO: test id - } - - /** - * Test the property 'username' - */ - @Test - public void usernameTest() { - // TODO: test username - } - - /** - * Test the property 'firstName' - */ - @Test - public void firstNameTest() { - // TODO: test firstName - } - - /** - * Test the property 'lastName' - */ - @Test - public void lastNameTest() { - // TODO: test lastName - } - - /** - * Test the property 'email' - */ - @Test - public void emailTest() { - // TODO: test email - } - - /** - * Test the property 'password' - */ - @Test - public void passwordTest() { - // TODO: test password - } - - /** - * Test the property 'phone' - */ - @Test - public void phoneTest() { - // TODO: test phone - } - - /** - * Test the property 'userStatus' - */ - @Test - public void userStatusTest() { - // TODO: test userStatus - } - -} diff --git a/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/XmlItemTest.java b/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/XmlItemTest.java deleted file mode 100644 index 55e75391e00..00000000000 --- a/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/XmlItemTest.java +++ /dev/null @@ -1,275 +0,0 @@ -/* - * 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. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.math.BigDecimal; -import java.util.ArrayList; -import java.util.List; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for XmlItem - */ -public class XmlItemTest { - private final XmlItem model = new XmlItem(); - - /** - * Model tests for XmlItem - */ - @Test - public void testXmlItem() { - // TODO: test XmlItem - } - - /** - * Test the property 'attributeString' - */ - @Test - public void attributeStringTest() { - // TODO: test attributeString - } - - /** - * Test the property 'attributeNumber' - */ - @Test - public void attributeNumberTest() { - // TODO: test attributeNumber - } - - /** - * Test the property 'attributeInteger' - */ - @Test - public void attributeIntegerTest() { - // TODO: test attributeInteger - } - - /** - * Test the property 'attributeBoolean' - */ - @Test - public void attributeBooleanTest() { - // TODO: test attributeBoolean - } - - /** - * Test the property 'wrappedArray' - */ - @Test - public void wrappedArrayTest() { - // TODO: test wrappedArray - } - - /** - * Test the property 'nameString' - */ - @Test - public void nameStringTest() { - // TODO: test nameString - } - - /** - * Test the property 'nameNumber' - */ - @Test - public void nameNumberTest() { - // TODO: test nameNumber - } - - /** - * Test the property 'nameInteger' - */ - @Test - public void nameIntegerTest() { - // TODO: test nameInteger - } - - /** - * Test the property 'nameBoolean' - */ - @Test - public void nameBooleanTest() { - // TODO: test nameBoolean - } - - /** - * Test the property 'nameArray' - */ - @Test - public void nameArrayTest() { - // TODO: test nameArray - } - - /** - * Test the property 'nameWrappedArray' - */ - @Test - public void nameWrappedArrayTest() { - // TODO: test nameWrappedArray - } - - /** - * Test the property 'prefixString' - */ - @Test - public void prefixStringTest() { - // TODO: test prefixString - } - - /** - * Test the property 'prefixNumber' - */ - @Test - public void prefixNumberTest() { - // TODO: test prefixNumber - } - - /** - * Test the property 'prefixInteger' - */ - @Test - public void prefixIntegerTest() { - // TODO: test prefixInteger - } - - /** - * Test the property 'prefixBoolean' - */ - @Test - public void prefixBooleanTest() { - // TODO: test prefixBoolean - } - - /** - * Test the property 'prefixArray' - */ - @Test - public void prefixArrayTest() { - // TODO: test prefixArray - } - - /** - * Test the property 'prefixWrappedArray' - */ - @Test - public void prefixWrappedArrayTest() { - // TODO: test prefixWrappedArray - } - - /** - * Test the property 'namespaceString' - */ - @Test - public void namespaceStringTest() { - // TODO: test namespaceString - } - - /** - * Test the property 'namespaceNumber' - */ - @Test - public void namespaceNumberTest() { - // TODO: test namespaceNumber - } - - /** - * Test the property 'namespaceInteger' - */ - @Test - public void namespaceIntegerTest() { - // TODO: test namespaceInteger - } - - /** - * Test the property 'namespaceBoolean' - */ - @Test - public void namespaceBooleanTest() { - // TODO: test namespaceBoolean - } - - /** - * Test the property 'namespaceArray' - */ - @Test - public void namespaceArrayTest() { - // TODO: test namespaceArray - } - - /** - * Test the property 'namespaceWrappedArray' - */ - @Test - public void namespaceWrappedArrayTest() { - // TODO: test namespaceWrappedArray - } - - /** - * Test the property 'prefixNamespaceString' - */ - @Test - public void prefixNamespaceStringTest() { - // TODO: test prefixNamespaceString - } - - /** - * Test the property 'prefixNamespaceNumber' - */ - @Test - public void prefixNamespaceNumberTest() { - // TODO: test prefixNamespaceNumber - } - - /** - * Test the property 'prefixNamespaceInteger' - */ - @Test - public void prefixNamespaceIntegerTest() { - // TODO: test prefixNamespaceInteger - } - - /** - * Test the property 'prefixNamespaceBoolean' - */ - @Test - public void prefixNamespaceBooleanTest() { - // TODO: test prefixNamespaceBoolean - } - - /** - * Test the property 'prefixNamespaceArray' - */ - @Test - public void prefixNamespaceArrayTest() { - // TODO: test prefixNamespaceArray - } - - /** - * Test the property 'prefixNamespaceWrappedArray' - */ - @Test - public void prefixNamespaceWrappedArrayTest() { - // TODO: test prefixNamespaceWrappedArray - } - -} diff --git a/samples/client/petstore/java/feign10x/build.gradle b/samples/client/petstore/java/feign10x/build.gradle index 5d8ed83e60c..a45a4a21784 100644 --- a/samples/client/petstore/java/feign10x/build.gradle +++ b/samples/client/petstore/java/feign10x/build.gradle @@ -100,8 +100,8 @@ ext { jackson_databind_version = "2.10.3" jackson_databind_nullable_version = "0.2.1" jackson_threetenbp_version = "2.9.10" - feign_version = "11.0" - feign_form_version = "3.8.0" + feign_version = "9.7.0" + feign_form_version = "2.1.0" junit_version = "4.13" oltu_version = "1.0.1" } diff --git a/samples/client/petstore/java/feign10x/build.sbt b/samples/client/petstore/java/feign10x/build.sbt index ff7f74d3359..ba4786bb334 100644 --- a/samples/client/petstore/java/feign10x/build.sbt +++ b/samples/client/petstore/java/feign10x/build.sbt @@ -10,10 +10,10 @@ lazy val root = (project in file(".")). resolvers += Resolver.mavenLocal, libraryDependencies ++= Seq( "io.swagger" % "swagger-annotations" % "1.5.24" % "compile", - "io.github.openfeign" % "feign-core" % "11.0" % "compile", - "io.github.openfeign" % "feign-jackson" % "11.0" % "compile", - "io.github.openfeign" % "feign-slf4j" % "11.0" % "compile", - "io.github.openfeign.form" % "feign-form" % "3.8.0" % "compile", + "io.github.openfeign" % "feign-core" % "9.7.0" % "compile", + "io.github.openfeign" % "feign-jackson" % "9.7.0" % "compile", + "io.github.openfeign" % "feign-slf4j" % "9.7.0" % "compile", + "io.github.openfeign.form" % "feign-form" % "2.1.0" % "compile", "com.fasterxml.jackson.core" % "jackson-core" % "2.10.3" % "compile", "com.fasterxml.jackson.core" % "jackson-annotations" % "2.10.3" % "compile", "com.fasterxml.jackson.core" % "jackson-databind" % "2.10.3" % "compile", diff --git a/samples/client/petstore/java/feign10x/pom.xml b/samples/client/petstore/java/feign10x/pom.xml index 5cb786250a7..00b154e922e 100644 --- a/samples/client/petstore/java/feign10x/pom.xml +++ b/samples/client/petstore/java/feign10x/pom.xml @@ -298,8 +298,8 @@ ${java.version} ${java.version} 1.5.24 - 11.0 - 3.8.0 + 9.7.0 + 2.1.0 2.10.3 0.2.1 2.10.3 diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/auth/OAuth.java b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/auth/OAuth.java index f59ad4a94ba..d6d6fae57fb 100644 --- a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/auth/OAuth.java +++ b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/auth/OAuth.java @@ -19,7 +19,6 @@ import org.apache.oltu.oauth2.common.message.types.GrantType; import org.apache.oltu.oauth2.common.token.BasicOAuthToken; import feign.Client; -import feign.Request.HttpMethod; import feign.Request.Options; import feign.RequestInterceptor; import feign.RequestTemplate; @@ -93,7 +92,7 @@ public class OAuth implements RequestInterceptor { try { accessTokenResponse = oauthClient.accessToken(tokenRequestBuilder.buildBodyMessage()); } catch (Exception e) { - throw new RetryableException(0, e.getMessage(), HttpMethod.POST, e, null, template.request()); + throw new RetryableException(e.getMessage(), e,null); } if (accessTokenResponse != null && accessTokenResponse.getAccessToken() != null) { setAccessToken(accessTokenResponse.getAccessToken(), accessTokenResponse.getExpiresIn()); diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/ApiClient.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/ApiClient.java index a6405acc784..a4ebc69f567 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/ApiClient.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/ApiClient.java @@ -167,10 +167,20 @@ public class ApiClient { return this; } + /** + * Returns the base URL to the location where the OpenAPI document is being served. + * + * @return The base URL to the target host. + */ public String getBasePath() { return basePath; } + /** + * Sets the base URL to the location where the OpenAPI document is being served. + * + * @param basePath The base URL to the target host. + */ public ApiClient setBasePath(String basePath) { this.basePath = basePath; setOauthBasePath(basePath); @@ -1183,7 +1193,7 @@ public class ApiClient { for (String authName : authNames) { Authentication auth = authentications.get(authName); if (auth == null) { - throw new RuntimeException("Authentication undefined: " + authName); + continue; } auth.applyToParams(queryParams, headerParams, cookieParams, payload, method, uri); } diff --git a/samples/client/petstore/java/retrofit/.gitignore b/samples/client/petstore/java/retrofit/.gitignore deleted file mode 100644 index a530464afa1..00000000000 --- a/samples/client/petstore/java/retrofit/.gitignore +++ /dev/null @@ -1,21 +0,0 @@ -*.class - -# Mobile Tools for Java (J2ME) -.mtj.tmp/ - -# Package Files # -*.jar -*.war -*.ear - -# exclude jar for gradle wrapper -!gradle/wrapper/*.jar - -# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml -hs_err_pid* - -# build files -**/target -target -.gradle -build diff --git a/samples/client/petstore/java/retrofit/.openapi-generator-ignore b/samples/client/petstore/java/retrofit/.openapi-generator-ignore deleted file mode 100644 index 7484ee590a3..00000000000 --- a/samples/client/petstore/java/retrofit/.openapi-generator-ignore +++ /dev/null @@ -1,23 +0,0 @@ -# OpenAPI Generator Ignore -# Generated by openapi-generator https://github.com/openapitools/openapi-generator - -# Use this file to prevent files from being overwritten by the generator. -# The patterns follow closely to .gitignore or .dockerignore. - -# As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: -#ApiClient.cs - -# You can match any string of characters against a directory, file or extension with a single asterisk (*): -#foo/*/qux -# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux - -# You can recursively match patterns against a directory, file or extension with a double asterisk (**): -#foo/**/qux -# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux - -# You can also negate patterns with an exclamation (!). -# For example, you can ignore all files in a docs folder with the file extension .md: -#docs/*.md -# Then explicitly reverse the ignore rule for a single file: -#!docs/README.md diff --git a/samples/client/petstore/java/retrofit/.openapi-generator/FILES b/samples/client/petstore/java/retrofit/.openapi-generator/FILES deleted file mode 100644 index 2504eef391b..00000000000 --- a/samples/client/petstore/java/retrofit/.openapi-generator/FILES +++ /dev/null @@ -1,79 +0,0 @@ -.gitignore -.openapi-generator-ignore -.travis.yml -README.md -api/openapi.yaml -build.gradle -build.sbt -git_push.sh -gradle.properties -gradle/wrapper/gradle-wrapper.jar -gradle/wrapper/gradle-wrapper.properties -gradlew -gradlew.bat -pom.xml -settings.gradle -src/main/AndroidManifest.xml -src/main/java/org/openapitools/client/ApiClient.java -src/main/java/org/openapitools/client/CollectionFormats.java -src/main/java/org/openapitools/client/ServerConfiguration.java -src/main/java/org/openapitools/client/ServerVariable.java -src/main/java/org/openapitools/client/StringUtil.java -src/main/java/org/openapitools/client/api/AnotherFakeApi.java -src/main/java/org/openapitools/client/api/FakeApi.java -src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java -src/main/java/org/openapitools/client/api/PetApi.java -src/main/java/org/openapitools/client/api/StoreApi.java -src/main/java/org/openapitools/client/api/UserApi.java -src/main/java/org/openapitools/client/auth/ApiKeyAuth.java -src/main/java/org/openapitools/client/auth/HttpBasicAuth.java -src/main/java/org/openapitools/client/auth/HttpBearerAuth.java -src/main/java/org/openapitools/client/auth/OAuth.java -src/main/java/org/openapitools/client/auth/OAuthFlow.java -src/main/java/org/openapitools/client/auth/OAuthOkHttpClient.java -src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java -src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java -src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java -src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java -src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java -src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java -src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java -src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java -src/main/java/org/openapitools/client/model/Animal.java -src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java -src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java -src/main/java/org/openapitools/client/model/ArrayTest.java -src/main/java/org/openapitools/client/model/BigCat.java -src/main/java/org/openapitools/client/model/BigCatAllOf.java -src/main/java/org/openapitools/client/model/Capitalization.java -src/main/java/org/openapitools/client/model/Cat.java -src/main/java/org/openapitools/client/model/CatAllOf.java -src/main/java/org/openapitools/client/model/Category.java -src/main/java/org/openapitools/client/model/ClassModel.java -src/main/java/org/openapitools/client/model/Client.java -src/main/java/org/openapitools/client/model/Dog.java -src/main/java/org/openapitools/client/model/DogAllOf.java -src/main/java/org/openapitools/client/model/EnumArrays.java -src/main/java/org/openapitools/client/model/EnumClass.java -src/main/java/org/openapitools/client/model/EnumTest.java -src/main/java/org/openapitools/client/model/FileSchemaTestClass.java -src/main/java/org/openapitools/client/model/FormatTest.java -src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java -src/main/java/org/openapitools/client/model/MapTest.java -src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java -src/main/java/org/openapitools/client/model/Model200Response.java -src/main/java/org/openapitools/client/model/ModelApiResponse.java -src/main/java/org/openapitools/client/model/ModelReturn.java -src/main/java/org/openapitools/client/model/Name.java -src/main/java/org/openapitools/client/model/NumberOnly.java -src/main/java/org/openapitools/client/model/Order.java -src/main/java/org/openapitools/client/model/OuterComposite.java -src/main/java/org/openapitools/client/model/OuterEnum.java -src/main/java/org/openapitools/client/model/Pet.java -src/main/java/org/openapitools/client/model/ReadOnlyFirst.java -src/main/java/org/openapitools/client/model/SpecialModelName.java -src/main/java/org/openapitools/client/model/Tag.java -src/main/java/org/openapitools/client/model/TypeHolderDefault.java -src/main/java/org/openapitools/client/model/TypeHolderExample.java -src/main/java/org/openapitools/client/model/User.java -src/main/java/org/openapitools/client/model/XmlItem.java diff --git a/samples/client/petstore/java/retrofit/.openapi-generator/VERSION b/samples/client/petstore/java/retrofit/.openapi-generator/VERSION deleted file mode 100644 index d99e7162d01..00000000000 --- a/samples/client/petstore/java/retrofit/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -5.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/retrofit/.travis.yml b/samples/client/petstore/java/retrofit/.travis.yml deleted file mode 100644 index e3bdf2af1be..00000000000 --- a/samples/client/petstore/java/retrofit/.travis.yml +++ /dev/null @@ -1,22 +0,0 @@ -# -# Generated by OpenAPI Generator: https://openapi-generator.tech -# -# Ref: https://docs.travis-ci.com/user/languages/java/ -# -language: java -jdk: - - openjdk12 - - openjdk11 - - openjdk10 - - openjdk9 - - openjdk8 -before_install: - # ensure gradlew has proper permission - - chmod a+x ./gradlew -script: - # test using maven - #- mvn test - # test using gradle - - gradle test - # test using sbt - # - sbt test diff --git a/samples/client/petstore/java/retrofit/README.md b/samples/client/petstore/java/retrofit/README.md deleted file mode 100644 index 2b244223e06..00000000000 --- a/samples/client/petstore/java/retrofit/README.md +++ /dev/null @@ -1,43 +0,0 @@ -# petstore-retrofit - -## Requirements - -Building the API client library requires [Maven](https://maven.apache.org/) to be installed. - -## Installation & Usage - -To install the API client library to your local Maven repository, simply execute: - -```shell -mvn install -``` - -To deploy it to a remote Maven repository instead, configure the settings of the repository and execute: - -```shell -mvn deploy -``` - -Refer to the [official documentation](https://maven.apache.org/plugins/maven-deploy-plugin/usage.html) for more information. - -After the client library is installed/deployed, you can use it in your Maven project by adding the following to your *pom.xml*: - -```xml - - org.openapitools - petstore-retrofit - 1.0.0 - compile - - -``` - -## Recommendation - -It's recommended to create an instance of `ApiClient` per thread in a multithreaded environment to avoid any potential issues. - -## Author - - - - diff --git a/samples/client/petstore/java/retrofit/api/openapi.yaml b/samples/client/petstore/java/retrofit/api/openapi.yaml deleted file mode 100644 index a49359fd348..00000000000 --- a/samples/client/petstore/java/retrofit/api/openapi.yaml +++ /dev/null @@ -1,2187 +0,0 @@ -openapi: 3.0.1 -info: - 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: - " \' - license: - name: Apache-2.0 - url: https://www.apache.org/licenses/LICENSE-2.0.html - title: OpenAPI Petstore - version: 1.0.0 -servers: -- url: http://petstore.swagger.io:80/v2 -tags: -- description: Everything about your Pets - name: pet -- description: Access to Petstore orders - name: store -- description: Operations about user - name: user -paths: - /pet: - post: - operationId: addPet - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/Pet' - application/xml: - schema: - $ref: '#/components/schemas/Pet' - description: Pet object that needs to be added to the store - required: true - responses: - "200": - content: {} - description: successful operation - "405": - content: {} - description: Invalid input - security: - - petstore_auth: - - write:pets - - read:pets - summary: Add a new pet to the store - tags: - - pet - x-codegen-request-body-name: body - x-contentType: application/json - x-accepts: application/json - put: - operationId: updatePet - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/Pet' - application/xml: - schema: - $ref: '#/components/schemas/Pet' - description: Pet object that needs to be added to the store - required: true - responses: - "200": - content: {} - description: successful operation - "400": - content: {} - description: Invalid ID supplied - "404": - content: {} - description: Pet not found - "405": - content: {} - description: Validation exception - security: - - petstore_auth: - - write:pets - - read:pets - summary: Update an existing pet - tags: - - pet - x-codegen-request-body-name: body - x-contentType: application/json - x-accepts: application/json - /pet/findByStatus: - get: - description: Multiple status values can be provided with comma separated strings - operationId: findPetsByStatus - parameters: - - description: Status values that need to be considered for filter - explode: false - in: query - name: status - required: true - schema: - items: - default: available - enum: - - available - - pending - - sold - type: string - type: array - style: form - responses: - "200": - content: - application/xml: - schema: - items: - $ref: '#/components/schemas/Pet' - type: array - application/json: - schema: - items: - $ref: '#/components/schemas/Pet' - type: array - description: successful operation - "400": - content: {} - description: Invalid status value - security: - - petstore_auth: - - write:pets - - read:pets - summary: Finds Pets by status - tags: - - pet - x-accepts: application/json - /pet/findByTags: - get: - deprecated: true - description: Multiple tags can be provided with comma separated strings. Use - tag1, tag2, tag3 for testing. - operationId: findPetsByTags - parameters: - - description: Tags to filter by - explode: false - in: query - name: tags - required: true - schema: - items: - type: string - type: array - uniqueItems: true - style: form - responses: - "200": - content: - application/xml: - schema: - items: - $ref: '#/components/schemas/Pet' - type: array - uniqueItems: true - application/json: - schema: - items: - $ref: '#/components/schemas/Pet' - type: array - uniqueItems: true - description: successful operation - "400": - content: {} - description: Invalid tag value - security: - - petstore_auth: - - write:pets - - read:pets - summary: Finds Pets by tags - tags: - - pet - x-accepts: application/json - /pet/{petId}: - delete: - operationId: deletePet - parameters: - - in: header - name: api_key - schema: - type: string - - description: Pet id to delete - in: path - name: petId - required: true - schema: - format: int64 - type: integer - responses: - "200": - content: {} - description: successful operation - "400": - content: {} - description: Invalid pet value - security: - - petstore_auth: - - write:pets - - read:pets - summary: Deletes a pet - tags: - - pet - x-accepts: application/json - get: - description: Returns a single pet - operationId: getPetById - parameters: - - description: ID of pet to return - in: path - name: petId - required: true - schema: - format: int64 - type: integer - responses: - "200": - content: - application/xml: - schema: - $ref: '#/components/schemas/Pet' - application/json: - schema: - $ref: '#/components/schemas/Pet' - description: successful operation - "400": - content: {} - description: Invalid ID supplied - "404": - content: {} - description: Pet not found - security: - - api_key: [] - summary: Find pet by ID - tags: - - pet - x-accepts: application/json - post: - operationId: updatePetWithForm - parameters: - - description: ID of pet that needs to be updated - in: path - name: petId - required: true - schema: - format: int64 - type: integer - requestBody: - content: - application/x-www-form-urlencoded: - schema: - properties: - name: - description: Updated name of the pet - type: string - status: - description: Updated status of the pet - type: string - responses: - "405": - content: {} - description: Invalid input - security: - - petstore_auth: - - write:pets - - read:pets - summary: Updates a pet in the store with form data - tags: - - pet - x-contentType: application/x-www-form-urlencoded - x-accepts: application/json - /pet/{petId}/uploadImage: - post: - operationId: uploadFile - parameters: - - description: ID of pet to update - in: path - name: petId - required: true - schema: - format: int64 - type: integer - requestBody: - content: - multipart/form-data: - schema: - properties: - additionalMetadata: - description: Additional data to pass to server - type: string - file: - description: file to upload - format: binary - type: string - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/ApiResponse' - description: successful operation - security: - - petstore_auth: - - write:pets - - read:pets - summary: uploads an image - tags: - - pet - x-contentType: multipart/form-data - x-accepts: application/json - /store/inventory: - get: - description: Returns a map of status codes to quantities - operationId: getInventory - responses: - "200": - content: - application/json: - schema: - additionalProperties: - format: int32 - type: integer - type: object - description: successful operation - security: - - api_key: [] - summary: Returns pet inventories by status - tags: - - store - x-accepts: application/json - /store/order: - post: - operationId: placeOrder - requestBody: - content: - '*/*': - schema: - $ref: '#/components/schemas/Order' - description: order placed for purchasing the pet - required: true - responses: - "200": - content: - application/xml: - schema: - $ref: '#/components/schemas/Order' - application/json: - schema: - $ref: '#/components/schemas/Order' - description: successful operation - "400": - content: {} - description: Invalid Order - summary: Place an order for a pet - tags: - - store - x-codegen-request-body-name: body - x-contentType: '*/*' - x-accepts: application/json - /store/order/{order_id}: - delete: - description: For valid response try integer IDs with value < 1000. Anything - above 1000 or nonintegers will generate API errors - operationId: deleteOrder - parameters: - - description: ID of the order that needs to be deleted - in: path - name: order_id - required: true - schema: - type: string - responses: - "400": - content: {} - description: Invalid ID supplied - "404": - content: {} - description: Order not found - summary: Delete purchase order by ID - tags: - - store - x-accepts: application/json - get: - description: For valid response try integer IDs with value <= 5 or > 10. Other - values will generated exceptions - operationId: getOrderById - parameters: - - description: ID of pet that needs to be fetched - in: path - name: order_id - required: true - schema: - format: int64 - maximum: 5 - minimum: 1 - type: integer - responses: - "200": - content: - application/xml: - schema: - $ref: '#/components/schemas/Order' - application/json: - schema: - $ref: '#/components/schemas/Order' - description: successful operation - "400": - content: {} - description: Invalid ID supplied - "404": - content: {} - description: Order not found - summary: Find purchase order by ID - tags: - - store - x-accepts: application/json - /user: - post: - description: This can only be done by the logged in user. - operationId: createUser - requestBody: - content: - '*/*': - schema: - $ref: '#/components/schemas/User' - description: Created user object - required: true - responses: - default: - content: {} - description: successful operation - summary: Create user - tags: - - user - x-codegen-request-body-name: body - x-contentType: '*/*' - x-accepts: application/json - /user/createWithArray: - post: - operationId: createUsersWithArrayInput - requestBody: - content: - '*/*': - schema: - items: - $ref: '#/components/schemas/User' - type: array - description: List of user object - required: true - responses: - default: - content: {} - description: successful operation - summary: Creates list of users with given input array - tags: - - user - x-codegen-request-body-name: body - x-contentType: '*/*' - x-accepts: application/json - /user/createWithList: - post: - operationId: createUsersWithListInput - requestBody: - content: - '*/*': - schema: - items: - $ref: '#/components/schemas/User' - type: array - description: List of user object - required: true - responses: - default: - content: {} - description: successful operation - summary: Creates list of users with given input array - tags: - - user - x-codegen-request-body-name: body - x-contentType: '*/*' - x-accepts: application/json - /user/login: - get: - operationId: loginUser - parameters: - - description: The user name for login - in: query - name: username - required: true - schema: - type: string - - description: The password for login in clear text - in: query - name: password - required: true - schema: - type: string - responses: - "200": - content: - application/xml: - schema: - type: string - application/json: - schema: - type: string - description: successful operation - headers: - X-Rate-Limit: - description: calls per hour allowed by the user - schema: - format: int32 - type: integer - X-Expires-After: - description: date in UTC when token expires - schema: - format: date-time - type: string - "400": - content: {} - description: Invalid username/password supplied - summary: Logs user into the system - tags: - - user - x-accepts: application/json - /user/logout: - get: - operationId: logoutUser - responses: - default: - content: {} - description: successful operation - summary: Logs out current logged in user session - tags: - - user - x-accepts: application/json - /user/{username}: - delete: - description: This can only be done by the logged in user. - operationId: deleteUser - parameters: - - description: The name that needs to be deleted - in: path - name: username - required: true - schema: - type: string - responses: - "400": - content: {} - description: Invalid username supplied - "404": - content: {} - description: User not found - summary: Delete user - tags: - - user - x-accepts: application/json - get: - operationId: getUserByName - parameters: - - description: The name that needs to be fetched. Use user1 for testing. - in: path - name: username - required: true - schema: - type: string - responses: - "200": - content: - application/xml: - schema: - $ref: '#/components/schemas/User' - application/json: - schema: - $ref: '#/components/schemas/User' - description: successful operation - "400": - content: {} - description: Invalid username supplied - "404": - content: {} - description: User not found - summary: Get user by user name - tags: - - user - x-accepts: application/json - put: - description: This can only be done by the logged in user. - operationId: updateUser - parameters: - - description: name that need to be deleted - in: path - name: username - required: true - schema: - type: string - requestBody: - content: - '*/*': - schema: - $ref: '#/components/schemas/User' - description: Updated user object - required: true - responses: - "400": - content: {} - description: Invalid user supplied - "404": - content: {} - description: User not found - summary: Updated user - tags: - - user - x-codegen-request-body-name: body - x-contentType: '*/*' - x-accepts: application/json - /fake_classname_test: - patch: - description: To test class name in snake case - operationId: testClassname - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/Client' - description: client model - required: true - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/Client' - description: successful operation - security: - - api_key_query: [] - summary: To test class name in snake case - tags: - - fake_classname_tags 123#$%^ - x-codegen-request-body-name: body - x-contentType: application/json - x-accepts: application/json - /fake: - delete: - description: Fake endpoint to test group parameters (optional) - operationId: testGroupParameters - parameters: - - description: Required String in group parameters - in: query - name: required_string_group - required: true - schema: - type: integer - - description: Required Boolean in group parameters - in: header - name: required_boolean_group - required: true - schema: - type: boolean - - description: Required Integer in group parameters - in: query - name: required_int64_group - required: true - schema: - format: int64 - type: integer - - description: String in group parameters - in: query - name: string_group - schema: - type: integer - - description: Boolean in group parameters - in: header - name: boolean_group - schema: - type: boolean - - description: Integer in group parameters - in: query - name: int64_group - schema: - format: int64 - type: integer - responses: - "400": - content: {} - description: Someting wrong - summary: Fake endpoint to test group parameters (optional) - tags: - - fake - x-group-parameters: true - x-accepts: application/json - get: - description: To test enum parameters - operationId: testEnumParameters - parameters: - - description: Header parameter enum test (string array) - explode: false - in: header - name: enum_header_string_array - schema: - items: - default: $ - enum: - - '>' - - $ - type: string - type: array - style: simple - - description: Header parameter enum test (string) - in: header - name: enum_header_string - schema: - default: -efg - enum: - - _abc - - -efg - - (xyz) - type: string - - description: Query parameter enum test (string array) - explode: false - in: query - name: enum_query_string_array - schema: - items: - default: $ - enum: - - '>' - - $ - type: string - type: array - style: form - - description: Query parameter enum test (string) - in: query - name: enum_query_string - schema: - default: -efg - enum: - - _abc - - -efg - - (xyz) - type: string - - description: Query parameter enum test (double) - in: query - name: enum_query_integer - schema: - enum: - - 1 - - -2 - format: int32 - type: integer - - description: Query parameter enum test (double) - in: query - name: enum_query_double - schema: - enum: - - 1.1 - - -1.2 - format: double - type: number - requestBody: - content: - application/x-www-form-urlencoded: - schema: - properties: - enum_form_string_array: - description: Form parameter enum test (string array) - items: - default: $ - enum: - - '>' - - $ - type: string - type: array - enum_form_string: - default: -efg - description: Form parameter enum test (string) - enum: - - _abc - - -efg - - (xyz) - type: string - responses: - "400": - content: {} - description: Invalid request - "404": - content: {} - description: Not found - summary: To test enum parameters - tags: - - fake - x-contentType: application/x-www-form-urlencoded - x-accepts: application/json - patch: - description: To test "client" model - operationId: testClientModel - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/Client' - description: client model - required: true - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/Client' - description: successful operation - summary: To test "client" model - tags: - - fake - x-codegen-request-body-name: body - x-contentType: application/json - x-accepts: application/json - post: - description: |- - Fake endpoint for testing various parameters - 假端點 - 偽のエンドポイント - 가짜 엔드 포인트 - operationId: testEndpointParameters - requestBody: - content: - application/x-www-form-urlencoded: - schema: - properties: - integer: - description: None - format: int32 - maximum: 100 - minimum: 10 - type: integer - int32: - description: None - format: int32 - maximum: 200 - minimum: 20 - type: integer - int64: - description: None - format: int64 - type: integer - number: - description: None - maximum: 543.2 - minimum: 32.1 - type: number - float: - description: None - format: float - maximum: 987.6 - type: number - double: - description: None - format: double - maximum: 123.4 - minimum: 67.8 - type: number - string: - description: None - pattern: /[a-z]/i - type: string - pattern_without_delimiter: - description: None - pattern: ^[A-Z].* - type: string - byte: - description: None - format: byte - type: string - binary: - description: None - format: binary - type: string - date: - description: None - format: date - type: string - dateTime: - description: None - format: date-time - type: string - password: - description: None - format: password - maxLength: 64 - minLength: 10 - type: string - callback: - description: None - type: string - required: - - byte - - double - - number - - pattern_without_delimiter - required: true - responses: - "400": - content: {} - description: Invalid username supplied - "404": - content: {} - description: User not found - security: - - http_basic_test: [] - summary: |- - Fake endpoint for testing various parameters - 假端點 - 偽のエンドポイント - 가짜 엔드 포인트 - tags: - - fake - x-contentType: application/x-www-form-urlencoded - x-accepts: application/json - /fake/outer/number: - post: - description: Test serialization of outer number types - operationId: fakeOuterNumberSerialize - requestBody: - content: - '*/*': - schema: - $ref: '#/components/schemas/OuterNumber' - description: Input number as post body - required: false - responses: - "200": - content: - '*/*': - schema: - $ref: '#/components/schemas/OuterNumber' - description: Output number - tags: - - fake - x-codegen-request-body-name: body - x-contentType: '*/*' - x-accepts: '*/*' - /fake/outer/string: - post: - description: Test serialization of outer string types - operationId: fakeOuterStringSerialize - requestBody: - content: - '*/*': - schema: - $ref: '#/components/schemas/OuterString' - description: Input string as post body - required: false - responses: - "200": - content: - '*/*': - schema: - $ref: '#/components/schemas/OuterString' - description: Output string - tags: - - fake - x-codegen-request-body-name: body - x-contentType: '*/*' - x-accepts: '*/*' - /fake/outer/boolean: - post: - description: Test serialization of outer boolean types - operationId: fakeOuterBooleanSerialize - requestBody: - content: - '*/*': - schema: - $ref: '#/components/schemas/OuterBoolean' - description: Input boolean as post body - required: false - responses: - "200": - content: - '*/*': - schema: - $ref: '#/components/schemas/OuterBoolean' - description: Output boolean - tags: - - fake - x-codegen-request-body-name: body - x-contentType: '*/*' - x-accepts: '*/*' - /fake/outer/composite: - post: - description: Test serialization of object with outer number type - operationId: fakeOuterCompositeSerialize - requestBody: - content: - '*/*': - schema: - $ref: '#/components/schemas/OuterComposite' - description: Input composite as post body - required: false - responses: - "200": - content: - '*/*': - schema: - $ref: '#/components/schemas/OuterComposite' - description: Output composite - tags: - - fake - x-codegen-request-body-name: body - x-contentType: '*/*' - x-accepts: '*/*' - /fake/jsonFormData: - get: - operationId: testJsonFormData - requestBody: - content: - application/x-www-form-urlencoded: - schema: - properties: - param: - description: field1 - type: string - param2: - description: field2 - type: string - required: - - param - - param2 - required: true - responses: - "200": - content: {} - description: successful operation - summary: test json serialization of form data - tags: - - fake - x-contentType: application/x-www-form-urlencoded - x-accepts: application/json - /fake/inline-additionalProperties: - post: - operationId: testInlineAdditionalProperties - requestBody: - content: - application/json: - schema: - additionalProperties: - type: string - type: object - description: request body - required: true - responses: - "200": - content: {} - description: successful operation - summary: test inline additionalProperties - tags: - - fake - x-codegen-request-body-name: param - x-contentType: application/json - x-accepts: application/json - /fake/body-with-query-params: - put: - operationId: testBodyWithQueryParams - parameters: - - in: query - name: query - required: true - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/User' - required: true - responses: - "200": - content: {} - description: Success - tags: - - fake - x-codegen-request-body-name: body - x-contentType: application/json - x-accepts: application/json - /fake/create_xml_item: - post: - description: this route creates an XmlItem - operationId: createXmlItem - requestBody: - content: - application/xml: - schema: - $ref: '#/components/schemas/XmlItem' - application/xml; charset=utf-8: - schema: - $ref: '#/components/schemas/XmlItem' - application/xml; charset=utf-16: - schema: - $ref: '#/components/schemas/XmlItem' - text/xml: - schema: - $ref: '#/components/schemas/XmlItem' - text/xml; charset=utf-8: - schema: - $ref: '#/components/schemas/XmlItem' - text/xml; charset=utf-16: - schema: - $ref: '#/components/schemas/XmlItem' - description: XmlItem Body - required: true - responses: - "200": - content: {} - description: successful operation - summary: creates an XmlItem - tags: - - fake - x-codegen-request-body-name: XmlItem - x-contentType: application/xml - x-accepts: application/json - /another-fake/dummy: - patch: - description: To test special tags and operation ID starting with number - operationId: 123_test_@#$%_special_tags - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/Client' - description: client model - required: true - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/Client' - description: successful operation - summary: To test special tags - tags: - - $another-fake? - x-codegen-request-body-name: body - x-contentType: application/json - x-accepts: application/json - /fake/body-with-file-schema: - put: - description: For this test, the body for this request much reference a schema - named `File`. - operationId: testBodyWithFileSchema - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/FileSchemaTestClass' - required: true - responses: - "200": - content: {} - description: Success - tags: - - fake - x-codegen-request-body-name: body - x-contentType: application/json - x-accepts: application/json - /fake/test-query-paramters: - put: - description: To test the collection format in query parameters - operationId: testQueryParameterCollectionFormat - parameters: - - explode: false - in: query - name: pipe - required: true - schema: - items: - type: string - type: array - style: form - - in: query - name: ioutil - required: true - schema: - items: - type: string - type: array - - in: query - name: http - required: true - schema: - items: - type: string - type: array - style: spaceDelimited - - explode: false - in: query - name: url - required: true - schema: - items: - type: string - type: array - style: form - - explode: true - in: query - name: context - required: true - schema: - items: - type: string - type: array - style: form - responses: - "200": - content: {} - description: Success - tags: - - fake - x-accepts: application/json - /fake/{petId}/uploadImageWithRequiredFile: - post: - operationId: uploadFileWithRequiredFile - parameters: - - description: ID of pet to update - in: path - name: petId - required: true - schema: - format: int64 - type: integer - requestBody: - content: - multipart/form-data: - schema: - properties: - additionalMetadata: - description: Additional data to pass to server - type: string - requiredFile: - description: file to upload - format: binary - type: string - required: - - requiredFile - required: true - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/ApiResponse' - description: successful operation - security: - - petstore_auth: - - write:pets - - read:pets - summary: uploads an image (required) - tags: - - pet - x-contentType: multipart/form-data - x-accepts: application/json -components: - schemas: - Order: - example: - petId: 6 - quantity: 1 - id: 0 - shipDate: 2000-01-23T04:56:07.000+00:00 - complete: false - status: placed - properties: - id: - format: int64 - type: integer - petId: - format: int64 - type: integer - quantity: - format: int32 - type: integer - shipDate: - format: date-time - type: string - status: - description: Order Status - enum: - - placed - - approved - - delivered - type: string - complete: - default: false - type: boolean - type: object - xml: - name: Order - Category: - example: - name: default-name - id: 6 - properties: - id: - format: int64 - type: integer - name: - default: default-name - type: string - required: - - name - type: object - xml: - name: Category - User: - example: - firstName: firstName - lastName: lastName - password: password - userStatus: 6 - phone: phone - id: 0 - email: email - username: username - properties: - id: - format: int64 - type: integer - x-is-unique: true - username: - type: string - firstName: - type: string - lastName: - type: string - email: - type: string - password: - type: string - phone: - type: string - userStatus: - description: User Status - format: int32 - type: integer - type: object - xml: - name: User - Tag: - example: - name: name - id: 1 - properties: - id: - format: int64 - type: integer - name: - type: string - type: object - xml: - name: Tag - Pet: - example: - photoUrls: - - photoUrls - - photoUrls - name: doggie - id: 0 - category: - name: default-name - id: 6 - tags: - - name: name - id: 1 - - name: name - id: 1 - status: available - properties: - id: - format: int64 - type: integer - x-is-unique: true - category: - $ref: '#/components/schemas/Category' - name: - example: doggie - type: string - photoUrls: - items: - type: string - type: array - uniqueItems: true - xml: - name: photoUrl - wrapped: true - tags: - items: - $ref: '#/components/schemas/Tag' - type: array - xml: - name: tag - wrapped: true - status: - description: pet status in the store - enum: - - available - - pending - - sold - type: string - required: - - name - - photoUrls - type: object - xml: - name: Pet - ApiResponse: - example: - code: 0 - type: type - message: message - properties: - code: - format: int32 - type: integer - type: - type: string - message: - type: string - type: object - $special[model.name]: - properties: - $special[property.name]: - format: int64 - type: integer - type: object - xml: - name: $special[model.name] - Return: - description: Model for testing reserved words - properties: - return: - format: int32 - type: integer - type: object - xml: - name: Return - Name: - description: Model for testing model name same as property name - properties: - name: - format: int32 - type: integer - snake_case: - format: int32 - readOnly: true - type: integer - property: - type: string - "123Number": - readOnly: true - type: integer - required: - - name - type: object - xml: - name: Name - "200_response": - description: Model for testing model name starting with number - properties: - name: - format: int32 - type: integer - class: - type: string - type: object - xml: - name: Name - ClassModel: - description: Model for testing model with "_class" property - properties: - _class: - type: string - type: object - Dog: - allOf: - - $ref: '#/components/schemas/Animal' - - $ref: '#/components/schemas/Dog_allOf' - Cat: - allOf: - - $ref: '#/components/schemas/Animal' - - $ref: '#/components/schemas/Cat_allOf' - BigCat: - allOf: - - $ref: '#/components/schemas/Cat' - - $ref: '#/components/schemas/BigCat_allOf' - Animal: - discriminator: - propertyName: className - properties: - className: - type: string - color: - default: red - type: string - required: - - className - type: object - AnimalFarm: - items: - $ref: '#/components/schemas/Animal' - type: array - format_test: - properties: - integer: - maximum: 1E+2 - minimum: 1E+1 - type: integer - int32: - format: int32 - maximum: 2E+2 - minimum: 2E+1 - type: integer - int64: - format: int64 - type: integer - number: - maximum: 543.2 - minimum: 32.1 - type: number - float: - format: float - maximum: 987.6 - minimum: 54.3 - type: number - double: - format: double - maximum: 123.4 - minimum: 67.8 - type: number - string: - pattern: /[a-z]/i - type: string - byte: - format: byte - pattern: ^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$ - type: string - binary: - format: binary - type: string - date: - format: date - type: string - dateTime: - format: date-time - type: string - uuid: - example: 72f98069-206d-4f12-9f12-3d1e525a8e84 - format: uuid - type: string - password: - format: password - maxLength: 64 - minLength: 10 - type: string - BigDecimal: - format: number - type: string - required: - - byte - - date - - number - - password - type: object - EnumClass: - default: -efg - enum: - - _abc - - -efg - - (xyz) - type: string - Enum_Test: - properties: - enum_string: - enum: - - UPPER - - lower - - "" - type: string - enum_string_required: - enum: - - UPPER - - lower - - "" - type: string - enum_integer: - enum: - - 1 - - -1 - format: int32 - type: integer - enum_number: - enum: - - 1.1 - - -1.2 - format: double - type: number - outerEnum: - $ref: '#/components/schemas/OuterEnum' - required: - - enum_string_required - type: object - AdditionalPropertiesClass: - properties: - map_string: - additionalProperties: - type: string - type: object - map_number: - additionalProperties: - type: number - type: object - map_integer: - additionalProperties: - type: integer - type: object - map_boolean: - additionalProperties: - type: boolean - type: object - map_array_integer: - additionalProperties: - items: - type: integer - type: array - type: object - map_array_anytype: - additionalProperties: - items: - properties: {} - type: object - type: array - type: object - map_map_string: - additionalProperties: - additionalProperties: - type: string - type: object - type: object - map_map_anytype: - additionalProperties: - additionalProperties: - properties: {} - type: object - type: object - type: object - anytype_1: - properties: {} - type: object - anytype_2: - type: object - anytype_3: - properties: {} - type: object - type: object - AdditionalPropertiesString: - additionalProperties: - type: string - properties: - name: - type: string - type: object - AdditionalPropertiesInteger: - additionalProperties: - type: integer - properties: - name: - type: string - type: object - AdditionalPropertiesNumber: - additionalProperties: - type: number - properties: - name: - type: string - type: object - AdditionalPropertiesBoolean: - additionalProperties: - type: boolean - properties: - name: - type: string - type: object - AdditionalPropertiesArray: - additionalProperties: - items: - properties: {} - type: object - type: array - properties: - name: - type: string - type: object - AdditionalPropertiesObject: - additionalProperties: - additionalProperties: - properties: {} - type: object - type: object - properties: - name: - type: string - type: object - AdditionalPropertiesAnyType: - additionalProperties: - properties: {} - type: object - properties: - name: - type: string - type: object - MixedPropertiesAndAdditionalPropertiesClass: - properties: - uuid: - format: uuid - type: string - dateTime: - format: date-time - type: string - map: - additionalProperties: - $ref: '#/components/schemas/Animal' - type: object - type: object - List: - properties: - "123-list": - type: string - type: object - Client: - example: - client: client - properties: - client: - type: string - type: object - ReadOnlyFirst: - properties: - bar: - readOnly: true - type: string - baz: - type: string - type: object - hasOnlyReadOnly: - properties: - bar: - readOnly: true - type: string - foo: - readOnly: true - type: string - type: object - Capitalization: - properties: - smallCamel: - type: string - CapitalCamel: - type: string - small_Snake: - type: string - Capital_Snake: - type: string - SCA_ETH_Flow_Points: - type: string - ATT_NAME: - description: | - Name of the pet - type: string - type: object - MapTest: - properties: - map_map_of_string: - additionalProperties: - additionalProperties: - type: string - type: object - type: object - map_of_enum_string: - additionalProperties: - enum: - - UPPER - - lower - type: string - type: object - direct_map: - additionalProperties: - type: boolean - type: object - indirect_map: - additionalProperties: - type: boolean - type: object - type: object - ArrayTest: - properties: - array_of_string: - items: - type: string - type: array - array_array_of_integer: - items: - items: - format: int64 - type: integer - type: array - type: array - array_array_of_model: - items: - items: - $ref: '#/components/schemas/ReadOnlyFirst' - type: array - type: array - type: object - NumberOnly: - properties: - JustNumber: - type: number - type: object - ArrayOfNumberOnly: - properties: - ArrayNumber: - items: - type: number - type: array - type: object - ArrayOfArrayOfNumberOnly: - properties: - ArrayArrayNumber: - items: - items: - type: number - type: array - type: array - type: object - EnumArrays: - properties: - just_symbol: - enum: - - '>=' - - $ - type: string - array_enum: - items: - enum: - - fish - - crab - type: string - type: array - type: object - OuterEnum: - enum: - - placed - - approved - - delivered - type: string - OuterComposite: - example: - my_string: my_string - my_number: 0.8008281904610115 - my_boolean: true - properties: - my_number: - type: number - my_string: - type: string - my_boolean: - type: boolean - x-codegen-body-parameter-name: boolean_post_body - type: object - OuterNumber: - type: number - OuterString: - type: string - OuterBoolean: - type: boolean - x-codegen-body-parameter-name: boolean_post_body - StringBooleanMap: - additionalProperties: - type: boolean - type: object - FileSchemaTestClass: - example: - file: - sourceURI: sourceURI - files: - - sourceURI: sourceURI - - sourceURI: sourceURI - properties: - file: - $ref: '#/components/schemas/File' - files: - items: - $ref: '#/components/schemas/File' - type: array - type: object - File: - description: Must be named `File` for test. - example: - sourceURI: sourceURI - properties: - sourceURI: - description: Test capitalization - type: string - type: object - TypeHolderDefault: - properties: - string_item: - default: what - type: string - number_item: - type: number - integer_item: - type: integer - bool_item: - default: true - type: boolean - array_item: - items: - type: integer - type: array - required: - - array_item - - bool_item - - integer_item - - number_item - - string_item - type: object - TypeHolderExample: - properties: - string_item: - example: what - type: string - number_item: - example: 1.234 - type: number - float_item: - example: 1.234 - format: float - type: number - integer_item: - example: -2 - type: integer - bool_item: - example: true - type: boolean - array_item: - example: - - 0 - - 1 - - 2 - - 3 - items: - type: integer - type: array - required: - - array_item - - bool_item - - float_item - - integer_item - - number_item - - string_item - type: object - XmlItem: - properties: - attribute_string: - example: string - type: string - xml: - attribute: true - attribute_number: - example: 1.234 - type: number - xml: - attribute: true - attribute_integer: - example: -2 - type: integer - xml: - attribute: true - attribute_boolean: - example: true - type: boolean - xml: - attribute: true - wrapped_array: - items: - type: integer - type: array - xml: - wrapped: true - name_string: - example: string - type: string - xml: - name: xml_name_string - name_number: - example: 1.234 - type: number - xml: - name: xml_name_number - name_integer: - example: -2 - type: integer - xml: - name: xml_name_integer - name_boolean: - example: true - type: boolean - xml: - name: xml_name_boolean - name_array: - items: - type: integer - xml: - name: xml_name_array_item - type: array - name_wrapped_array: - items: - type: integer - xml: - name: xml_name_wrapped_array_item - type: array - xml: - name: xml_name_wrapped_array - wrapped: true - prefix_string: - example: string - type: string - xml: - prefix: ab - prefix_number: - example: 1.234 - type: number - xml: - prefix: cd - prefix_integer: - example: -2 - type: integer - xml: - prefix: ef - prefix_boolean: - example: true - type: boolean - xml: - prefix: gh - prefix_array: - items: - type: integer - xml: - prefix: ij - type: array - prefix_wrapped_array: - items: - type: integer - xml: - prefix: mn - type: array - xml: - prefix: kl - wrapped: true - namespace_string: - example: string - type: string - xml: - namespace: http://a.com/schema - namespace_number: - example: 1.234 - type: number - xml: - namespace: http://b.com/schema - namespace_integer: - example: -2 - type: integer - xml: - namespace: http://c.com/schema - namespace_boolean: - example: true - type: boolean - xml: - namespace: http://d.com/schema - namespace_array: - items: - type: integer - xml: - namespace: http://e.com/schema - type: array - namespace_wrapped_array: - items: - type: integer - xml: - namespace: http://g.com/schema - type: array - xml: - namespace: http://f.com/schema - wrapped: true - prefix_ns_string: - example: string - type: string - xml: - namespace: http://a.com/schema - prefix: a - prefix_ns_number: - example: 1.234 - type: number - xml: - namespace: http://b.com/schema - prefix: b - prefix_ns_integer: - example: -2 - type: integer - xml: - namespace: http://c.com/schema - prefix: c - prefix_ns_boolean: - example: true - type: boolean - xml: - namespace: http://d.com/schema - prefix: d - prefix_ns_array: - items: - type: integer - xml: - namespace: http://e.com/schema - prefix: e - type: array - prefix_ns_wrapped_array: - items: - type: integer - xml: - namespace: http://g.com/schema - prefix: g - type: array - xml: - namespace: http://f.com/schema - prefix: f - wrapped: true - type: object - xml: - namespace: http://a.com/schema - prefix: pre - Dog_allOf: - properties: - breed: - type: string - Cat_allOf: - properties: - declawed: - type: boolean - BigCat_allOf: - properties: - kind: - enum: - - lions - - tigers - - leopards - - jaguars - type: string - securitySchemes: - petstore_auth: - flows: - implicit: - authorizationUrl: http://petstore.swagger.io/api/oauth/dialog - scopes: - write:pets: modify pets in your account - read:pets: read your pets - type: oauth2 - api_key: - in: header - name: api_key - type: apiKey - api_key_query: - in: query - name: api_key_query - type: apiKey - http_basic_test: - scheme: basic - type: http - diff --git a/samples/client/petstore/java/retrofit/build.gradle b/samples/client/petstore/java/retrofit/build.gradle deleted file mode 100644 index 606905649a1..00000000000 --- a/samples/client/petstore/java/retrofit/build.gradle +++ /dev/null @@ -1,114 +0,0 @@ -apply plugin: 'idea' -apply plugin: 'eclipse' - -group = 'org.openapitools' -version = '1.0.0' - -buildscript { - repositories { - maven { url "https://repo1.maven.org/maven2" } - jcenter() - } - dependencies { - classpath 'com.android.tools.build:gradle:2.3.+' - classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5' - } -} - -repositories { - jcenter() -} - - -if(hasProperty('target') && target == 'android') { - - apply plugin: 'com.android.library' - apply plugin: 'com.github.dcendents.android-maven' - - android { - compileSdkVersion 25 - buildToolsVersion '25.0.2' - defaultConfig { - minSdkVersion 14 - targetSdkVersion 25 - } - compileOptions { - sourceCompatibility JavaVersion.VERSION_1_7 - targetCompatibility JavaVersion.VERSION_1_7 - } - - // Rename the aar correctly - libraryVariants.all { variant -> - variant.outputs.each { output -> - def outputFile = output.outputFile - if (outputFile != null && outputFile.name.endsWith('.aar')) { - def fileName = "${project.name}-${variant.baseName}-${version}.aar" - output.outputFile = new File(outputFile.parent, fileName) - } - } - } - - dependencies { - provided 'javax.annotation:jsr250-api:1.0' - } - } - - afterEvaluate { - android.libraryVariants.all { variant -> - def task = project.tasks.create "jar${variant.name.capitalize()}", Jar - task.description = "Create jar artifact for ${variant.name}" - task.dependsOn variant.javaCompile - task.from variant.javaCompile.destinationDir - task.destinationDir = project.file("${project.buildDir}/outputs/jar") - task.archiveName = "${project.name}-${variant.baseName}-${version}.jar" - artifacts.add('archives', task); - } - } - - task sourcesJar(type: Jar) { - from android.sourceSets.main.java.srcDirs - classifier = 'sources' - } - - artifacts { - archives sourcesJar - } - -} else { - - apply plugin: 'java' - apply plugin: 'maven' - - sourceCompatibility = JavaVersion.VERSION_1_7 - targetCompatibility = JavaVersion.VERSION_1_7 - - install { - repositories.mavenInstaller { - pom.artifactId = 'petstore-retrofit' - } - } - - task execute(type:JavaExec) { - main = System.getProperty('mainClass') - classpath = sourceSets.main.runtimeClasspath - } -} - -ext { - okhttp_version = "2.7.5" - oltu_version = "1.0.1" - retrofit_version = "1.9.0" - swagger_annotations_version = "1.5.21" - junit_version = "4.13" - jodatime_version = "2.9.3" -} - -dependencies { - compile "com.squareup.okhttp:okhttp:$okhttp_version" - compile "com.google.code.findbugs:jsr305:3.0.2" - compile "com.squareup.retrofit:retrofit:$retrofit_version" - compile "io.swagger:swagger-annotations:$swagger_annotations_version" - compile "org.apache.oltu.oauth2:org.apache.oltu.oauth2.client:$oltu_version" - compile "joda-time:joda-time:$jodatime_version" - testCompile "junit:junit:$junit_version" -} diff --git a/samples/client/petstore/java/retrofit/build.sbt b/samples/client/petstore/java/retrofit/build.sbt deleted file mode 100644 index 800255e2a2f..00000000000 --- a/samples/client/petstore/java/retrofit/build.sbt +++ /dev/null @@ -1,20 +0,0 @@ -lazy val root = (project in file(".")). - settings( - organization := "org.openapitools", - name := "petstore-retrofit", - version := "1.0.0", - scalaVersion := "2.11.4", - scalacOptions ++= Seq("-feature"), - javacOptions in compile ++= Seq("-Xlint:deprecation"), - publishArtifact in (Compile, packageDoc) := false, - resolvers += Resolver.mavenLocal, - libraryDependencies ++= Seq( - "com.squareup.okhttp" % "okhttp" % "2.7.5" % "compile", - "com.squareup.retrofit" % "retrofit" % "1.9.0" % "compile", - "io.swagger" % "swagger-annotations" % "1.5.21" % "compile", - "org.apache.oltu.oauth2" % "org.apache.oltu.oauth2.client" % "1.0.1" % "compile", - "joda-time" % "joda-time" % "2.9.3" % "compile", - "junit" % "junit" % "4.13" % "test", - "com.novocode" % "junit-interface" % "0.10" % "test" - ) - ) diff --git a/samples/client/petstore/java/retrofit/git_push.sh b/samples/client/petstore/java/retrofit/git_push.sh deleted file mode 100644 index ced3be2b0c7..00000000000 --- a/samples/client/petstore/java/retrofit/git_push.sh +++ /dev/null @@ -1,58 +0,0 @@ -#!/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 openapi-pestore-perl "minor update" "gitlab.com" - -git_user_id=$1 -git_repo_id=$2 -release_note=$3 -git_host=$4 - -if [ "$git_host" = "" ]; then - git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" -fi - -if [ "$git_user_id" = "" ]; then - git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" -fi - -if [ "$git_repo_id" = "" ]; then - git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" -fi - -if [ "$release_note" = "" ]; then - release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" -fi - -# Initialize the local directory as a Git repository -git init - -# Adds the files in the local repository and stages them for commit. -git add . - -# Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" - -# Sets the new remote -git_remote=`git remote` -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git - else - git remote add origin https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git - fi - -fi - -git pull origin master - -# Pushes (Forces) the changes in the local repository up to the remote repository -echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" -git push origin master 2>&1 | grep -v 'To https' - diff --git a/samples/client/petstore/java/retrofit/gradle.properties b/samples/client/petstore/java/retrofit/gradle.properties deleted file mode 100644 index 05644f0754a..00000000000 --- a/samples/client/petstore/java/retrofit/gradle.properties +++ /dev/null @@ -1,2 +0,0 @@ -# Uncomment to build for Android -#target = android \ No newline at end of file diff --git a/samples/client/petstore/java/retrofit/gradle/wrapper/gradle-wrapper.jar b/samples/client/petstore/java/retrofit/gradle/wrapper/gradle-wrapper.jar deleted file mode 100644 index cc4fdc293d0..00000000000 Binary files a/samples/client/petstore/java/retrofit/gradle/wrapper/gradle-wrapper.jar and /dev/null differ diff --git a/samples/client/petstore/java/retrofit/gradle/wrapper/gradle-wrapper.properties b/samples/client/petstore/java/retrofit/gradle/wrapper/gradle-wrapper.properties deleted file mode 100644 index 94920145f34..00000000000 --- a/samples/client/petstore/java/retrofit/gradle/wrapper/gradle-wrapper.properties +++ /dev/null @@ -1,5 +0,0 @@ -distributionBase=GRADLE_USER_HOME -distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.0.1-bin.zip -zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists diff --git a/samples/client/petstore/java/retrofit/gradlew b/samples/client/petstore/java/retrofit/gradlew deleted file mode 100644 index 2fe81a7d95e..00000000000 --- a/samples/client/petstore/java/retrofit/gradlew +++ /dev/null @@ -1,183 +0,0 @@ -#!/usr/bin/env sh - -# -# Copyright 2015 the original author or authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -############################################################################## -## -## Gradle start up script for UN*X -## -############################################################################## - -# Attempt to set APP_HOME -# Resolve links: $0 may be a link -PRG="$0" -# Need this for relative symlinks. -while [ -h "$PRG" ] ; do - ls=`ls -ld "$PRG"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - PRG="$link" - else - PRG=`dirname "$PRG"`"/$link" - fi -done -SAVED="`pwd`" -cd "`dirname \"$PRG\"`/" >/dev/null -APP_HOME="`pwd -P`" -cd "$SAVED" >/dev/null - -APP_NAME="Gradle" -APP_BASE_NAME=`basename "$0"` - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' - -# Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD="maximum" - -warn () { - echo "$*" -} - -die () { - echo - echo "$*" - echo - exit 1 -} - -# OS specific support (must be 'true' or 'false'). -cygwin=false -msys=false -darwin=false -nonstop=false -case "`uname`" in - CYGWIN* ) - cygwin=true - ;; - Darwin* ) - darwin=true - ;; - MINGW* ) - msys=true - ;; - NONSTOP* ) - nonstop=true - ;; -esac - -CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar - -# Determine the Java command to use to start the JVM. -if [ -n "$JAVA_HOME" ] ; then - if [ -x "$JAVA_HOME/jre/sh/java" ] ; then - # IBM's JDK on AIX uses strange locations for the executables - JAVACMD="$JAVA_HOME/jre/sh/java" - else - JAVACMD="$JAVA_HOME/bin/java" - fi - if [ ! -x "$JAVACMD" ] ; then - die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." - fi -else - JAVACMD="java" - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." -fi - -# Increase the maximum file descriptors if we can. -if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then - MAX_FD_LIMIT=`ulimit -H -n` - if [ $? -eq 0 ] ; then - if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then - MAX_FD="$MAX_FD_LIMIT" - fi - ulimit -n $MAX_FD - if [ $? -ne 0 ] ; then - warn "Could not set maximum file descriptor limit: $MAX_FD" - fi - else - warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" - fi -fi - -# For Darwin, add options to specify how the application appears in the dock -if $darwin; then - GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" -fi - -# For Cygwin or MSYS, switch paths to Windows format before running java -if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then - APP_HOME=`cygpath --path --mixed "$APP_HOME"` - CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` - JAVACMD=`cygpath --unix "$JAVACMD"` - - # We build the pattern for arguments to be converted via cygpath - ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` - SEP="" - for dir in $ROOTDIRSRAW ; do - ROOTDIRS="$ROOTDIRS$SEP$dir" - SEP="|" - done - OURCYGPATTERN="(^($ROOTDIRS))" - # Add a user-defined pattern to the cygpath arguments - if [ "$GRADLE_CYGPATTERN" != "" ] ; then - OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" - fi - # Now convert the arguments - kludge to limit ourselves to /bin/sh - i=0 - for arg in "$@" ; do - CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` - CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option - - if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition - eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` - else - eval `echo args$i`="\"$arg\"" - fi - i=`expr $i + 1` - done - case $i in - 0) set -- ;; - 1) set -- "$args0" ;; - 2) set -- "$args0" "$args1" ;; - 3) set -- "$args0" "$args1" "$args2" ;; - 4) set -- "$args0" "$args1" "$args2" "$args3" ;; - 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; - 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; - 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; - 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; - 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; - esac -fi - -# Escape application args -save () { - for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done - echo " " -} -APP_ARGS=`save "$@"` - -# Collect all arguments for the java command, following the shell quoting and substitution rules -eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" - -exec "$JAVACMD" "$@" diff --git a/samples/client/petstore/java/retrofit/gradlew.bat b/samples/client/petstore/java/retrofit/gradlew.bat deleted file mode 100644 index 9618d8d9607..00000000000 --- a/samples/client/petstore/java/retrofit/gradlew.bat +++ /dev/null @@ -1,100 +0,0 @@ -@rem -@rem Copyright 2015 the original author or authors. -@rem -@rem Licensed under the Apache License, Version 2.0 (the "License"); -@rem you may not use this file except in compliance with the License. -@rem You may obtain a copy of the License at -@rem -@rem https://www.apache.org/licenses/LICENSE-2.0 -@rem -@rem Unless required by applicable law or agreed to in writing, software -@rem distributed under the License is distributed on an "AS IS" BASIS, -@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -@rem See the License for the specific language governing permissions and -@rem limitations under the License. -@rem - -@if "%DEBUG%" == "" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto init - -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto init - -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:init -@rem Get command-line arguments, handling Windows variants - -if not "%OS%" == "Windows_NT" goto win9xME_args - -:win9xME_args -@rem Slurp the command line arguments. -set CMD_LINE_ARGS= -set _SKIP=2 - -:win9xME_args_slurp -if "x%~1" == "x" goto execute - -set CMD_LINE_ARGS=%* - -:execute -@rem Setup the command line - -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% - -:end -@rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega diff --git a/samples/client/petstore/java/retrofit/pom.xml b/samples/client/petstore/java/retrofit/pom.xml deleted file mode 100644 index 24d4971bed7..00000000000 --- a/samples/client/petstore/java/retrofit/pom.xml +++ /dev/null @@ -1,250 +0,0 @@ - - 4.0.0 - org.openapitools - petstore-retrofit - jar - petstore-retrofit - 1.0.0 - https://github.com/openapitools/openapi-generator - OpenAPI Java - - scm:git:git@github.com:openapitools/openapi-generator.git - scm:git:git@github.com:openapitools/openapi-generator.git - https://github.com/openapitools/openapi-generator - - - - - Unlicense - https://www.apache.org/licenses/LICENSE-2.0.html - repo - - - - - - OpenAPI-Generator Contributors - team@openapitools.org - OpenAPITools.org - http://openapitools.org - - - - - - - org.apache.maven.plugins - maven-enforcer-plugin - 3.0.0-M1 - - - enforce-maven - - enforce - - - - - 2.2.0 - - - - - - - - org.apache.maven.plugins - maven-surefire-plugin - 2.12 - - - - loggerPath - conf/log4j.properties - - - -Xms512m -Xmx1500m - methods - pertest - - - - maven-dependency-plugin - - - package - - copy-dependencies - - - ${project.build.directory}/lib - - - - - - - - org.apache.maven.plugins - maven-jar-plugin - 2.2 - - - - jar - test-jar - - - - - - - - - org.codehaus.mojo - build-helper-maven-plugin - 1.10 - - - add_sources - generate-sources - - add-source - - - - src/main/java - - - - - add_test_sources - generate-test-sources - - add-test-source - - - - src/test/java - - - - - - - org.apache.maven.plugins - maven-compiler-plugin - 3.6.1 - - 1.7 - 1.7 - - - - org.apache.maven.plugins - maven-javadoc-plugin - 3.1.1 - - none - - - - attach-javadocs - - jar - - - - - - org.apache.maven.plugins - maven-source-plugin - 2.2.1 - - - attach-sources - - jar-no-fork - - - - - - - - - - sign-artifacts - - - - org.apache.maven.plugins - maven-gpg-plugin - 1.5 - - - sign-artifacts - verify - - sign - - - - - - - - - - - - io.swagger - swagger-annotations - ${swagger-annotations-version} - - - - com.google.code.findbugs - jsr305 - 3.0.2 - - - com.squareup.retrofit - retrofit - ${retrofit-version} - - - org.apache.oltu.oauth2 - org.apache.oltu.oauth2.client - ${oltu-version} - - - com.squareup.okhttp - okhttp - ${okhttp-version} - - - joda-time - joda-time - ${jodatime-version} - - - - junit - junit - ${junit-version} - test - - - - UTF-8 - 1.5.21 - 1.9.0 - 2.7.5 - 2.9.9 - 1.0.1 - 1.0.0 - 4.13 - - diff --git a/samples/client/petstore/java/retrofit/settings.gradle b/samples/client/petstore/java/retrofit/settings.gradle deleted file mode 100644 index defa9ab32ba..00000000000 --- a/samples/client/petstore/java/retrofit/settings.gradle +++ /dev/null @@ -1 +0,0 @@ -rootProject.name = "petstore-retrofit" \ No newline at end of file diff --git a/samples/client/petstore/java/retrofit/src/main/AndroidManifest.xml b/samples/client/petstore/java/retrofit/src/main/AndroidManifest.xml deleted file mode 100644 index 54fbcb3da1e..00000000000 --- a/samples/client/petstore/java/retrofit/src/main/AndroidManifest.xml +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/ApiClient.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/ApiClient.java deleted file mode 100644 index b9e28485ed6..00000000000 --- a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/ApiClient.java +++ /dev/null @@ -1,426 +0,0 @@ -package org.openapitools.client; - -import java.io.ByteArrayOutputStream; -import java.io.IOException; -import java.io.InputStream; -import java.lang.reflect.Type; -import java.util.LinkedHashMap; -import java.util.Map; - -import org.apache.oltu.oauth2.client.request.OAuthClientRequest.AuthenticationRequestBuilder; -import org.apache.oltu.oauth2.client.request.OAuthClientRequest.TokenRequestBuilder; - -import org.joda.time.DateTime; -import org.joda.time.LocalDate; -import org.joda.time.format.DateTimeFormatter; -import org.joda.time.format.ISODateTimeFormat; - -import retrofit.RestAdapter; -import retrofit.client.OkClient; -import retrofit.converter.ConversionException; -import retrofit.converter.Converter; -import retrofit.converter.GsonConverter; -import retrofit.mime.TypedByteArray; -import retrofit.mime.TypedInput; -import retrofit.mime.TypedOutput; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import com.squareup.okhttp.Interceptor; -import com.squareup.okhttp.OkHttpClient; - -import org.openapitools.client.auth.HttpBasicAuth; -import org.openapitools.client.auth.HttpBearerAuth; -import org.openapitools.client.auth.ApiKeyAuth; -import org.openapitools.client.auth.OAuth; -import org.openapitools.client.auth.OAuth.AccessTokenListener; -import org.openapitools.client.auth.OAuthFlow; - -public class ApiClient { - - private Map apiAuthorizations; - private OkHttpClient okClient; - private RestAdapter.Builder adapterBuilder; - - public ApiClient() { - apiAuthorizations = new LinkedHashMap(); - createDefaultAdapter(); - } - - public ApiClient(String[] authNames) { - this(); - for(String authName : authNames) { - Interceptor auth; - if ("api_key".equals(authName)) { - auth = new ApiKeyAuth("header", "api_key"); - } else if ("api_key_query".equals(authName)) { - auth = new ApiKeyAuth("query", "api_key_query"); - } else if ("http_basic_test".equals(authName)) { - auth = new HttpBasicAuth(); - } else if ("petstore_auth".equals(authName)) { - auth = new OAuth(OAuthFlow.implicit, "http://petstore.swagger.io/api/oauth/dialog", "", "write:pets, read:pets"); - } else { - throw new RuntimeException("auth name \"" + authName + "\" not found in available auth names"); - } - addAuthorization(authName, auth); - } - } - - /** - * Basic constructor for single auth name - * @param authName Authentication name - */ - public ApiClient(String authName) { - this(new String[]{authName}); - } - - /** - * Helper constructor for single api key - * @param authName Authentication name - * @param apiKey API key - */ - public ApiClient(String authName, String apiKey) { - this(authName); - this.setApiKey(apiKey); - } - - /** - * Helper constructor for single basic auth or password oauth2 - * @param authName Authentication name - * @param username Username - * @param password Password - */ - public ApiClient(String authName, String username, String password) { - this(authName); - this.setCredentials(username, password); - } - - /** - * Helper constructor for single password oauth2 - * @param authName Authentication name - * @param clientId Client ID - * @param secret Client secret - * @param username Username - * @param password Password - */ - public ApiClient(String authName, String clientId, String secret, String username, String password) { - this(authName); - this.getTokenEndPoint() - .setClientId(clientId) - .setClientSecret(secret) - .setUsername(username) - .setPassword(password); - } - - public void createDefaultAdapter() { - Gson gson = new GsonBuilder() - .setDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZ") - .registerTypeAdapter(DateTime.class, new DateTimeTypeAdapter()) - .registerTypeAdapter(LocalDate.class, new LocalDateTypeAdapter()) - .create(); - - okClient = new OkHttpClient(); - - adapterBuilder = new RestAdapter - .Builder() - .setEndpoint("http://petstore.swagger.io:80/v2") - .setClient(new OkClient(okClient)) - .setConverter(new GsonConverterWrapper(gson)); - } - - public S createService(Class serviceClass) { - return adapterBuilder.build().create(serviceClass); - - } - - /** - * Helper method to configure the first api key found - * @param apiKey API key - */ - private void setApiKey(String apiKey) { - for(Interceptor apiAuthorization : apiAuthorizations.values()) { - if (apiAuthorization instanceof ApiKeyAuth) { - ApiKeyAuth keyAuth = (ApiKeyAuth) apiAuthorization; - keyAuth.setApiKey(apiKey); - return; - } - } - } - - /** - * Helper method to set token for the first Http Bearer authentication found. - * @param bearerToken Bearer token - */ - public void setBearerToken(String bearerToken) { - for (Interceptor apiAuthorization : apiAuthorizations.values()) { - if (apiAuthorization instanceof HttpBearerAuth) { - ((HttpBearerAuth) apiAuthorization).setBearerToken(bearerToken); - return; - } - } - } - - /** - * Helper method to configure the username/password for basic auth or password oauth - * @param username Username - * @param password Password - */ - private void setCredentials(String username, String password) { - for(Interceptor apiAuthorization : apiAuthorizations.values()) { - if (apiAuthorization instanceof HttpBasicAuth) { - HttpBasicAuth basicAuth = (HttpBasicAuth) apiAuthorization; - basicAuth.setCredentials(username, password); - return; - } - if (apiAuthorization instanceof OAuth) { - OAuth oauth = (OAuth) apiAuthorization; - oauth.getTokenRequestBuilder().setUsername(username).setPassword(password); - return; - } - } - } - - /** - * Helper method to configure the token endpoint of the first oauth found in the apiAuthorizations (there should be only one) - * @return Token request builder - */ - public TokenRequestBuilder getTokenEndPoint() { - for(Interceptor apiAuthorization : apiAuthorizations.values()) { - if (apiAuthorization instanceof OAuth) { - OAuth oauth = (OAuth) apiAuthorization; - return oauth.getTokenRequestBuilder(); - } - } - return null; - } - - /** - * Helper method to configure authorization endpoint of the first oauth found in the apiAuthorizations (there should be only one) - * @return Authentication request builder - */ - public AuthenticationRequestBuilder getAuthorizationEndPoint() { - for(Interceptor apiAuthorization : apiAuthorizations.values()) { - if (apiAuthorization instanceof OAuth) { - OAuth oauth = (OAuth) apiAuthorization; - return oauth.getAuthenticationRequestBuilder(); - } - } - return null; - } - - /** - * Helper method to pre-set the oauth access token of the first oauth found in the apiAuthorizations (there should be only one) - * @param accessToken Access token - */ - public void setAccessToken(String accessToken) { - for(Interceptor apiAuthorization : apiAuthorizations.values()) { - if (apiAuthorization instanceof OAuth) { - OAuth oauth = (OAuth) apiAuthorization; - oauth.setAccessToken(accessToken); - return; - } - } - } - - /** - * Helper method to configure the oauth accessCode/implicit flow parameters - * @param clientId Client ID - * @param clientSecret Client secret - * @param redirectURI Redirect URI - */ - public void configureAuthorizationFlow(String clientId, String clientSecret, String redirectURI) { - for(Interceptor apiAuthorization : apiAuthorizations.values()) { - if (apiAuthorization instanceof OAuth) { - OAuth oauth = (OAuth) apiAuthorization; - oauth.getTokenRequestBuilder() - .setClientId(clientId) - .setClientSecret(clientSecret) - .setRedirectURI(redirectURI); - oauth.getAuthenticationRequestBuilder() - .setClientId(clientId) - .setRedirectURI(redirectURI); - return; - } - } - } - - /** - * Configures a listener which is notified when a new access token is received. - * @param accessTokenListener Access token listener - */ - public void registerAccessTokenListener(AccessTokenListener accessTokenListener) { - for(Interceptor apiAuthorization : apiAuthorizations.values()) { - if (apiAuthorization instanceof OAuth) { - OAuth oauth = (OAuth) apiAuthorization; - oauth.registerAccessTokenListener(accessTokenListener); - return; - } - } - } - - /** - * Adds an authorization to be used by the client - * @param authName Authentication name - * @param authorization Authorization - */ - public void addAuthorization(String authName, Interceptor authorization) { - if (apiAuthorizations.containsKey(authName)) { - throw new RuntimeException("auth name \"" + authName + "\" already in api authorizations"); - } - apiAuthorizations.put(authName, authorization); - okClient.interceptors().add(authorization); - } - - public Map getApiAuthorizations() { - return apiAuthorizations; - } - - public void setApiAuthorizations(Map apiAuthorizations) { - this.apiAuthorizations = apiAuthorizations; - } - - public RestAdapter.Builder getAdapterBuilder() { - return adapterBuilder; - } - - public void setAdapterBuilder(RestAdapter.Builder adapterBuilder) { - this.adapterBuilder = adapterBuilder; - } - - public OkHttpClient getOkClient() { - return okClient; - } - - public void addAuthsToOkClient(OkHttpClient okClient) { - for(Interceptor apiAuthorization : apiAuthorizations.values()) { - okClient.interceptors().add(apiAuthorization); - } - } - - /** - * Clones the okClient given in parameter, adds the auth interceptors and uses it to configure the RestAdapter - * @param okClient OkHttp client - */ - public void configureFromOkclient(OkHttpClient okClient) { - OkHttpClient clone = okClient.clone(); - addAuthsToOkClient(clone); - adapterBuilder.setClient(new OkClient(clone)); - } -} - -/** - * This wrapper is to take care of this case: - * when the deserialization fails due to JsonParseException and the - * expected type is String, then just return the body string. - */ -class GsonConverterWrapper implements Converter { - private GsonConverter converter; - - public GsonConverterWrapper(Gson gson) { - converter = new GsonConverter(gson); - } - - @Override public Object fromBody(TypedInput body, Type type) throws ConversionException { - byte[] bodyBytes = readInBytes(body); - TypedByteArray newBody = new TypedByteArray(body.mimeType(), bodyBytes); - try { - return converter.fromBody(newBody, type); - } catch (ConversionException e) { - if (e.getCause() instanceof JsonParseException && type.equals(String.class)) { - return new String(bodyBytes); - } else { - throw e; - } - } - } - - @Override public TypedOutput toBody(Object object) { - return converter.toBody(object); - } - - private byte[] readInBytes(TypedInput body) throws ConversionException { - InputStream in = null; - try { - in = body.in(); - ByteArrayOutputStream os = new ByteArrayOutputStream(); - byte[] buffer = new byte[0xFFFF]; - for (int len; (len = in.read(buffer)) != -1;) - os.write(buffer, 0, len); - os.flush(); - return os.toByteArray(); - } catch (IOException e) { - throw new ConversionException(e); - } finally { - if (in != null) { - try { - in.close(); - } catch (IOException ignored) { - } - } - } - - } -} - -/** - * Gson TypeAdapter for Joda DateTime type - */ -class DateTimeTypeAdapter extends TypeAdapter { - - private final DateTimeFormatter parseFormatter = ISODateTimeFormat.dateOptionalTimeParser(); - private final DateTimeFormatter printFormatter = ISODateTimeFormat.dateTime(); - - @Override - public void write(JsonWriter out, DateTime date) throws IOException { - if (date == null) { - out.nullValue(); - } else { - out.value(printFormatter.print(date)); - } - } - - @Override - public DateTime read(JsonReader in) throws IOException { - switch (in.peek()) { - case NULL: - in.nextNull(); - return null; - default: - String date = in.nextString(); - return parseFormatter.parseDateTime(date); - } - } -} - -/** - * Gson TypeAdapter for Joda DateTime type - */ -class LocalDateTypeAdapter extends TypeAdapter { - - private final DateTimeFormatter formatter = ISODateTimeFormat.date(); - - @Override - public void write(JsonWriter out, LocalDate date) throws IOException { - if (date == null) { - out.nullValue(); - } else { - out.value(formatter.print(date)); - } - } - - @Override - public LocalDate read(JsonReader in) throws IOException { - switch (in.peek()) { - case NULL: - in.nextNull(); - return null; - default: - String date = in.nextString(); - return formatter.parseLocalDate(date); - } - } -} diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/CollectionFormats.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/CollectionFormats.java deleted file mode 100644 index 2283c382cc3..00000000000 --- a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/CollectionFormats.java +++ /dev/null @@ -1,99 +0,0 @@ -package org.openapitools.client; - -import java.util.Arrays; -import java.util.List; - -public class CollectionFormats { - - public static class CSVParams { - - protected List params; - - public CSVParams() { - } - - public CSVParams(List params) { - this.params = params; - } - - public CSVParams(String... params) { - this.params = Arrays.asList(params); - } - - public List getParams() { - return params; - } - - public void setParams(List params) { - this.params = params; - } - - @Override - public String toString() { - return StringUtil.join(params.toArray(new String[0]), ","); - } - - } - - public static class SPACEParams extends SSVParams { - - } - - public static class SSVParams extends CSVParams { - - public SSVParams() { - } - - public SSVParams(List params) { - super(params); - } - - public SSVParams(String... params) { - super(params); - } - - @Override - public String toString() { - return StringUtil.join(params.toArray(new String[0]), " "); - } - } - - public static class TSVParams extends CSVParams { - - public TSVParams() { - } - - public TSVParams(List params) { - super(params); - } - - public TSVParams(String... params) { - super(params); - } - - @Override - public String toString() { - return StringUtil.join( params.toArray(new String[0]), "\t"); - } - } - - public static class PIPESParams extends CSVParams { - - public PIPESParams() { - } - - public PIPESParams(List params) { - super(params); - } - - public PIPESParams(String... params) { - super(params); - } - - @Override - public String toString() { - return StringUtil.join(params.toArray(new String[0]), "|"); - } - } - -} diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/ServerConfiguration.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/ServerConfiguration.java deleted file mode 100644 index a1107a8690e..00000000000 --- a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/ServerConfiguration.java +++ /dev/null @@ -1,58 +0,0 @@ -package org.openapitools.client; - -import java.util.Map; - -/** - * Representing a Server configuration. - */ -public class ServerConfiguration { - public String URL; - public String description; - public Map variables; - - /** - * @param URL A URL to the target host. - * @param description A describtion of the host designated by the URL. - * @param variables A map between a variable name and its value. The value is used for substitution in the server's URL template. - */ - public ServerConfiguration(String URL, String description, Map variables) { - this.URL = URL; - this.description = description; - this.variables = variables; - } - - /** - * Format URL template using given variables. - * - * @param variables A map between a variable name and its value. - * @return Formatted URL. - */ - public String URL(Map variables) { - String url = this.URL; - - // go through variables and replace placeholders - for (Map.Entry variable: this.variables.entrySet()) { - String name = variable.getKey(); - ServerVariable serverVariable = variable.getValue(); - String value = serverVariable.defaultValue; - - if (variables != null && variables.containsKey(name)) { - value = variables.get(name); - if (serverVariable.enumValues.size() > 0 && !serverVariable.enumValues.contains(value)) { - throw new RuntimeException("The variable " + name + " in the server URL has invalid value " + value + "."); - } - } - url = url.replaceAll("\\{" + name + "\\}", value); - } - return url; - } - - /** - * Format URL template using default server variables. - * - * @return Formatted URL. - */ - public String URL() { - return URL(null); - } -} diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/ServerVariable.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/ServerVariable.java deleted file mode 100644 index c2f13e21666..00000000000 --- a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/ServerVariable.java +++ /dev/null @@ -1,23 +0,0 @@ -package org.openapitools.client; - -import java.util.HashSet; - -/** - * Representing a Server Variable for server URL template substitution. - */ -public class ServerVariable { - public String description; - public String defaultValue; - public HashSet enumValues = null; - - /** - * @param description A description for the server variable. - * @param defaultValue The default value to use for substitution. - * @param enumValues An enumeration of string values to be used if the substitution options are from a limited set. - */ - public ServerVariable(String description, String defaultValue, HashSet enumValues) { - this.description = description; - this.defaultValue = defaultValue; - this.enumValues = enumValues; - } -} diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/StringUtil.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/StringUtil.java deleted file mode 100644 index 747a23f5bf2..00000000000 --- a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/StringUtil.java +++ /dev/null @@ -1,83 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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. - */ - - -package org.openapitools.client; - -import java.util.Collection; -import java.util.Iterator; - - -public class StringUtil { - /** - * Check if the given array contains the given value (with case-insensitive comparison). - * - * @param array The array - * @param value The value to search - * @return true if the array contains the value - */ - public static boolean containsIgnoreCase(String[] array, String value) { - for (String str : array) { - if (value == null && str == null) { - return true; - } - if (value != null && value.equalsIgnoreCase(str)) { - return true; - } - } - return false; - } - - /** - * Join an array of strings with the given separator. - *

- * Note: This might be replaced by utility method from commons-lang or guava someday - * if one of those libraries is added as dependency. - *

- * - * @param array The array of strings - * @param separator The separator - * @return the resulting string - */ - public static String join(String[] array, String separator) { - int len = array.length; - if (len == 0) { - return ""; - } - - StringBuilder out = new StringBuilder(); - out.append(array[0]); - for (int i = 1; i < len; i++) { - out.append(separator).append(array[i]); - } - return out.toString(); - } - - /** - * Join a list of strings with the given separator. - * - * @param list The list of strings - * @param separator The separator - * @return the resulting string - */ - public static String join(Collection list, String separator) { - Iterator iterator = list.iterator(); - StringBuilder out = new StringBuilder(); - if (iterator.hasNext()) { - out.append(iterator.next()); - } - while (iterator.hasNext()) { - out.append(separator).append(iterator.next()); - } - return out.toString(); - } -} diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/api/AnotherFakeApi.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/api/AnotherFakeApi.java deleted file mode 100644 index 4e5a62778f9..00000000000 --- a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/api/AnotherFakeApi.java +++ /dev/null @@ -1,41 +0,0 @@ -package org.openapitools.client.api; - -import org.openapitools.client.CollectionFormats.*; - -import retrofit.Callback; -import retrofit.http.*; -import retrofit.mime.*; - -import org.openapitools.client.model.Client; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public interface AnotherFakeApi { - /** - * To test special tags - * Sync method - * To test special tags and operation ID starting with number - * @param body client model (required) - * @return Client - */ - - @PATCH("/another-fake/dummy") - Client call123testSpecialTags( - @retrofit.http.Body Client body - ); - - /** - * To test special tags - * Async method - * @param body client model (required) - * @param cb callback method - */ - - @PATCH("/another-fake/dummy") - void call123testSpecialTags( - @retrofit.http.Body Client body, Callback cb - ); -} diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/api/FakeApi.java deleted file mode 100644 index 1ce6dc060c2..00000000000 --- a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/api/FakeApi.java +++ /dev/null @@ -1,429 +0,0 @@ -package org.openapitools.client.api; - -import org.openapitools.client.CollectionFormats.*; - -import retrofit.Callback; -import retrofit.http.*; -import retrofit.mime.*; - -import java.math.BigDecimal; -import org.openapitools.client.model.Client; -import org.joda.time.DateTime; -import java.io.File; -import org.openapitools.client.model.FileSchemaTestClass; -import org.joda.time.LocalDate; -import org.openapitools.client.model.OuterComposite; -import org.openapitools.client.model.User; -import org.openapitools.client.model.XmlItem; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public interface FakeApi { - /** - * creates an XmlItem - * Sync method - * this route creates an XmlItem - * @param xmlItem XmlItem Body (required) - * @return Void - */ - - @POST("/fake/create_xml_item") - Void createXmlItem( - @retrofit.http.Body XmlItem xmlItem - ); - - /** - * creates an XmlItem - * Async method - * @param xmlItem XmlItem Body (required) - * @param cb callback method - */ - - @POST("/fake/create_xml_item") - void createXmlItem( - @retrofit.http.Body XmlItem xmlItem, Callback cb - ); - /** - * - * Sync method - * Test serialization of outer boolean types - * @param body Input boolean as post body (optional) - * @return Boolean - */ - - @POST("/fake/outer/boolean") - Boolean fakeOuterBooleanSerialize( - @retrofit.http.Body Boolean body - ); - - /** - * - * Async method - * @param body Input boolean as post body (optional) - * @param cb callback method - */ - - @POST("/fake/outer/boolean") - void fakeOuterBooleanSerialize( - @retrofit.http.Body Boolean body, Callback cb - ); - /** - * - * Sync method - * Test serialization of object with outer number type - * @param body Input composite as post body (optional) - * @return OuterComposite - */ - - @POST("/fake/outer/composite") - OuterComposite fakeOuterCompositeSerialize( - @retrofit.http.Body OuterComposite body - ); - - /** - * - * Async method - * @param body Input composite as post body (optional) - * @param cb callback method - */ - - @POST("/fake/outer/composite") - void fakeOuterCompositeSerialize( - @retrofit.http.Body OuterComposite body, Callback cb - ); - /** - * - * Sync method - * Test serialization of outer number types - * @param body Input number as post body (optional) - * @return BigDecimal - */ - - @POST("/fake/outer/number") - BigDecimal fakeOuterNumberSerialize( - @retrofit.http.Body BigDecimal body - ); - - /** - * - * Async method - * @param body Input number as post body (optional) - * @param cb callback method - */ - - @POST("/fake/outer/number") - void fakeOuterNumberSerialize( - @retrofit.http.Body BigDecimal body, Callback cb - ); - /** - * - * Sync method - * Test serialization of outer string types - * @param body Input string as post body (optional) - * @return String - */ - - @POST("/fake/outer/string") - String fakeOuterStringSerialize( - @retrofit.http.Body String body - ); - - /** - * - * Async method - * @param body Input string as post body (optional) - * @param cb callback method - */ - - @POST("/fake/outer/string") - void fakeOuterStringSerialize( - @retrofit.http.Body String body, Callback cb - ); - /** - * - * Sync method - * For this test, the body for this request much reference a schema named `File`. - * @param body (required) - * @return Void - */ - - @PUT("/fake/body-with-file-schema") - Void testBodyWithFileSchema( - @retrofit.http.Body FileSchemaTestClass body - ); - - /** - * - * Async method - * @param body (required) - * @param cb callback method - */ - - @PUT("/fake/body-with-file-schema") - void testBodyWithFileSchema( - @retrofit.http.Body FileSchemaTestClass body, Callback cb - ); - /** - * - * Sync method - * - * @param query (required) - * @param body (required) - * @return Void - */ - - @PUT("/fake/body-with-query-params") - Void testBodyWithQueryParams( - @retrofit.http.Query("query") String query, @retrofit.http.Body User body - ); - - /** - * - * Async method - * @param query (required) - * @param body (required) - * @param cb callback method - */ - - @PUT("/fake/body-with-query-params") - void testBodyWithQueryParams( - @retrofit.http.Query("query") String query, @retrofit.http.Body User body, Callback cb - ); - /** - * To test \"client\" model - * Sync method - * To test \"client\" model - * @param body client model (required) - * @return Client - */ - - @PATCH("/fake") - Client testClientModel( - @retrofit.http.Body Client body - ); - - /** - * To test \"client\" model - * Async method - * @param body client model (required) - * @param cb callback method - */ - - @PATCH("/fake") - void testClientModel( - @retrofit.http.Body Client body, Callback cb - ); - /** - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - * Sync method - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - * @param number None (required) - * @param _double None (required) - * @param patternWithoutDelimiter None (required) - * @param _byte None (required) - * @param integer None (optional) - * @param int32 None (optional) - * @param int64 None (optional) - * @param _float None (optional) - * @param string None (optional) - * @param binary None (optional) - * @param date None (optional) - * @param dateTime None (optional) - * @param password None (optional) - * @param paramCallback None (optional) - * @return Void - */ - - @retrofit.http.FormUrlEncoded - @POST("/fake") - Void testEndpointParameters( - @retrofit.http.Field("number") BigDecimal number, @retrofit.http.Field("double") Double _double, @retrofit.http.Field("pattern_without_delimiter") String patternWithoutDelimiter, @retrofit.http.Field("byte") byte[] _byte, @retrofit.http.Field("integer") Integer integer, @retrofit.http.Field("int32") Integer int32, @retrofit.http.Field("int64") Long int64, @retrofit.http.Field("float") Float _float, @retrofit.http.Field("string") String string, @retrofit.http.Field("binary") TypedFile binary, @retrofit.http.Field("date") LocalDate date, @retrofit.http.Field("dateTime") DateTime dateTime, @retrofit.http.Field("password") String password, @retrofit.http.Field("callback") String paramCallback - ); - - /** - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - * Async method - * @param number None (required) - * @param _double None (required) - * @param patternWithoutDelimiter None (required) - * @param _byte None (required) - * @param integer None (optional) - * @param int32 None (optional) - * @param int64 None (optional) - * @param _float None (optional) - * @param string None (optional) - * @param binary None (optional) - * @param date None (optional) - * @param dateTime None (optional) - * @param password None (optional) - * @param paramCallback None (optional) - * @param cb callback method - */ - - @retrofit.http.FormUrlEncoded - @POST("/fake") - void testEndpointParameters( - @retrofit.http.Field("number") BigDecimal number, @retrofit.http.Field("double") Double _double, @retrofit.http.Field("pattern_without_delimiter") String patternWithoutDelimiter, @retrofit.http.Field("byte") byte[] _byte, @retrofit.http.Field("integer") Integer integer, @retrofit.http.Field("int32") Integer int32, @retrofit.http.Field("int64") Long int64, @retrofit.http.Field("float") Float _float, @retrofit.http.Field("string") String string, @retrofit.http.Field("binary") TypedFile binary, @retrofit.http.Field("date") LocalDate date, @retrofit.http.Field("dateTime") DateTime dateTime, @retrofit.http.Field("password") String password, @retrofit.http.Field("callback") String paramCallback, Callback cb - ); - /** - * To test enum parameters - * Sync method - * To test enum parameters - * @param enumHeaderStringArray Header parameter enum test (string array) (optional, default to new ArrayList<String>()) - * @param enumHeaderString Header parameter enum test (string) (optional, default to -efg) - * @param enumQueryStringArray Query parameter enum test (string array) (optional, default to new ArrayList<String>()) - * @param enumQueryString Query parameter enum test (string) (optional, default to -efg) - * @param enumQueryInteger Query parameter enum test (double) (optional) - * @param enumQueryDouble Query parameter enum test (double) (optional) - * @param enumFormStringArray Form parameter enum test (string array) (optional, default to $) - * @param enumFormString Form parameter enum test (string) (optional, default to -efg) - * @return Void - */ - - @retrofit.http.FormUrlEncoded - @GET("/fake") - Void testEnumParameters( - @retrofit.http.Header("enum_header_string_array") List enumHeaderStringArray, @retrofit.http.Header("enum_header_string") String enumHeaderString, @retrofit.http.Query("enum_query_string_array") CSVParams enumQueryStringArray, @retrofit.http.Query("enum_query_string") String enumQueryString, @retrofit.http.Query("enum_query_integer") Integer enumQueryInteger, @retrofit.http.Query("enum_query_double") Double enumQueryDouble, @retrofit.http.Field("enum_form_string_array") List enumFormStringArray, @retrofit.http.Field("enum_form_string") String enumFormString - ); - - /** - * To test enum parameters - * Async method - * @param enumHeaderStringArray Header parameter enum test (string array) (optional, default to new ArrayList<String>()) - * @param enumHeaderString Header parameter enum test (string) (optional, default to -efg) - * @param enumQueryStringArray Query parameter enum test (string array) (optional, default to new ArrayList<String>()) - * @param enumQueryString Query parameter enum test (string) (optional, default to -efg) - * @param enumQueryInteger Query parameter enum test (double) (optional) - * @param enumQueryDouble Query parameter enum test (double) (optional) - * @param enumFormStringArray Form parameter enum test (string array) (optional, default to $) - * @param enumFormString Form parameter enum test (string) (optional, default to -efg) - * @param cb callback method - */ - - @retrofit.http.FormUrlEncoded - @GET("/fake") - void testEnumParameters( - @retrofit.http.Header("enum_header_string_array") List enumHeaderStringArray, @retrofit.http.Header("enum_header_string") String enumHeaderString, @retrofit.http.Query("enum_query_string_array") CSVParams enumQueryStringArray, @retrofit.http.Query("enum_query_string") String enumQueryString, @retrofit.http.Query("enum_query_integer") Integer enumQueryInteger, @retrofit.http.Query("enum_query_double") Double enumQueryDouble, @retrofit.http.Field("enum_form_string_array") List enumFormStringArray, @retrofit.http.Field("enum_form_string") String enumFormString, Callback cb - ); - /** - * Fake endpoint to test group parameters (optional) - * Sync method - * Fake endpoint to test group parameters (optional) - * @param requiredStringGroup Required String in group parameters (required) - * @param requiredBooleanGroup Required Boolean in group parameters (required) - * @param requiredInt64Group Required Integer in group parameters (required) - * @param stringGroup String in group parameters (optional) - * @param booleanGroup Boolean in group parameters (optional) - * @param int64Group Integer in group parameters (optional) - * @return Void - */ - - @DELETE("/fake") - Void testGroupParameters( - @retrofit.http.Query("required_string_group") Integer requiredStringGroup, @retrofit.http.Header("required_boolean_group") Boolean requiredBooleanGroup, @retrofit.http.Query("required_int64_group") Long requiredInt64Group, @retrofit.http.Query("string_group") Integer stringGroup, @retrofit.http.Header("boolean_group") Boolean booleanGroup, @retrofit.http.Query("int64_group") Long int64Group - ); - - /** - * Fake endpoint to test group parameters (optional) - * Async method - * @param requiredStringGroup Required String in group parameters (required) - * @param requiredBooleanGroup Required Boolean in group parameters (required) - * @param requiredInt64Group Required Integer in group parameters (required) - * @param stringGroup String in group parameters (optional) - * @param booleanGroup Boolean in group parameters (optional) - * @param int64Group Integer in group parameters (optional) - * @param cb callback method - */ - - @DELETE("/fake") - void testGroupParameters( - @retrofit.http.Query("required_string_group") Integer requiredStringGroup, @retrofit.http.Header("required_boolean_group") Boolean requiredBooleanGroup, @retrofit.http.Query("required_int64_group") Long requiredInt64Group, @retrofit.http.Query("string_group") Integer stringGroup, @retrofit.http.Header("boolean_group") Boolean booleanGroup, @retrofit.http.Query("int64_group") Long int64Group, Callback cb - ); - /** - * test inline additionalProperties - * Sync method - * - * @param param request body (required) - * @return Void - */ - - @POST("/fake/inline-additionalProperties") - Void testInlineAdditionalProperties( - @retrofit.http.Body Map param - ); - - /** - * test inline additionalProperties - * Async method - * @param param request body (required) - * @param cb callback method - */ - - @POST("/fake/inline-additionalProperties") - void testInlineAdditionalProperties( - @retrofit.http.Body Map param, Callback cb - ); - /** - * test json serialization of form data - * Sync method - * - * @param param field1 (required) - * @param param2 field2 (required) - * @return Void - */ - - @retrofit.http.FormUrlEncoded - @GET("/fake/jsonFormData") - Void testJsonFormData( - @retrofit.http.Field("param") String param, @retrofit.http.Field("param2") String param2 - ); - - /** - * test json serialization of form data - * Async method - * @param param field1 (required) - * @param param2 field2 (required) - * @param cb callback method - */ - - @retrofit.http.FormUrlEncoded - @GET("/fake/jsonFormData") - void testJsonFormData( - @retrofit.http.Field("param") String param, @retrofit.http.Field("param2") String param2, Callback cb - ); - /** - * - * Sync method - * To test the collection format in query parameters - * @param pipe (required) - * @param ioutil (required) - * @param http (required) - * @param url (required) - * @param context (required) - * @return Void - */ - - @PUT("/fake/test-query-paramters") - Void testQueryParameterCollectionFormat( - @retrofit.http.Query("pipe") CSVParams pipe, @retrofit.http.Query("ioutil") CSVParams ioutil, @retrofit.http.Query("http") SPACEParams http, @retrofit.http.Query("url") CSVParams url, @retrofit.http.Query("context") List context - ); - - /** - * - * Async method - * @param pipe (required) - * @param ioutil (required) - * @param http (required) - * @param url (required) - * @param context (required) - * @param cb callback method - */ - - @PUT("/fake/test-query-paramters") - void testQueryParameterCollectionFormat( - @retrofit.http.Query("pipe") CSVParams pipe, @retrofit.http.Query("ioutil") CSVParams ioutil, @retrofit.http.Query("http") SPACEParams http, @retrofit.http.Query("url") CSVParams url, @retrofit.http.Query("context") List context, Callback cb - ); -} diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java deleted file mode 100644 index 3b95818890a..00000000000 --- a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java +++ /dev/null @@ -1,41 +0,0 @@ -package org.openapitools.client.api; - -import org.openapitools.client.CollectionFormats.*; - -import retrofit.Callback; -import retrofit.http.*; -import retrofit.mime.*; - -import org.openapitools.client.model.Client; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public interface FakeClassnameTags123Api { - /** - * To test class name in snake case - * Sync method - * To test class name in snake case - * @param body client model (required) - * @return Client - */ - - @PATCH("/fake_classname_test") - Client testClassname( - @retrofit.http.Body Client body - ); - - /** - * To test class name in snake case - * Async method - * @param body client model (required) - * @param cb callback method - */ - - @PATCH("/fake_classname_test") - void testClassname( - @retrofit.http.Body Client body, Callback cb - ); -} diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/api/PetApi.java deleted file mode 100644 index 10313a38b77..00000000000 --- a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/api/PetApi.java +++ /dev/null @@ -1,256 +0,0 @@ -package org.openapitools.client.api; - -import org.openapitools.client.CollectionFormats.*; - -import retrofit.Callback; -import retrofit.http.*; -import retrofit.mime.*; - -import java.io.File; -import org.openapitools.client.model.ModelApiResponse; -import org.openapitools.client.model.Pet; -import java.util.Set; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public interface PetApi { - /** - * Add a new pet to the store - * Sync method - * - * @param body Pet object that needs to be added to the store (required) - * @return Void - */ - - @POST("/pet") - Void addPet( - @retrofit.http.Body Pet body - ); - - /** - * Add a new pet to the store - * Async method - * @param body Pet object that needs to be added to the store (required) - * @param cb callback method - */ - - @POST("/pet") - void addPet( - @retrofit.http.Body Pet body, Callback cb - ); - /** - * Deletes a pet - * Sync method - * - * @param petId Pet id to delete (required) - * @param apiKey (optional) - * @return Void - */ - - @DELETE("/pet/{petId}") - Void deletePet( - @retrofit.http.Path("petId") Long petId, @retrofit.http.Header("api_key") String apiKey - ); - - /** - * Deletes a pet - * Async method - * @param petId Pet id to delete (required) - * @param apiKey (optional) - * @param cb callback method - */ - - @DELETE("/pet/{petId}") - void deletePet( - @retrofit.http.Path("petId") Long petId, @retrofit.http.Header("api_key") String apiKey, Callback cb - ); - /** - * Finds Pets by status - * Sync method - * Multiple status values can be provided with comma separated strings - * @param status Status values that need to be considered for filter (required) - * @return List<Pet> - */ - - @GET("/pet/findByStatus") - List findPetsByStatus( - @retrofit.http.Query("status") CSVParams status - ); - - /** - * Finds Pets by status - * Async method - * @param status Status values that need to be considered for filter (required) - * @param cb callback method - */ - - @GET("/pet/findByStatus") - void findPetsByStatus( - @retrofit.http.Query("status") CSVParams status, Callback> cb - ); - /** - * Finds Pets by tags - * Sync method - * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. - * @param tags Tags to filter by (required) - * @return Set<Pet> - */ - - @GET("/pet/findByTags") - Set findPetsByTags( - @retrofit.http.Query("tags") CSVParams tags - ); - - /** - * Finds Pets by tags - * Async method - * @param tags Tags to filter by (required) - * @param cb callback method - */ - - @GET("/pet/findByTags") - void findPetsByTags( - @retrofit.http.Query("tags") CSVParams tags, Callback> cb - ); - /** - * Find pet by ID - * Sync method - * Returns a single pet - * @param petId ID of pet to return (required) - * @return Pet - */ - - @GET("/pet/{petId}") - Pet getPetById( - @retrofit.http.Path("petId") Long petId - ); - - /** - * Find pet by ID - * Async method - * @param petId ID of pet to return (required) - * @param cb callback method - */ - - @GET("/pet/{petId}") - void getPetById( - @retrofit.http.Path("petId") Long petId, Callback cb - ); - /** - * Update an existing pet - * Sync method - * - * @param body Pet object that needs to be added to the store (required) - * @return Void - */ - - @PUT("/pet") - Void updatePet( - @retrofit.http.Body Pet body - ); - - /** - * Update an existing pet - * Async method - * @param body Pet object that needs to be added to the store (required) - * @param cb callback method - */ - - @PUT("/pet") - void updatePet( - @retrofit.http.Body Pet body, Callback cb - ); - /** - * Updates a pet in the store with form data - * Sync method - * - * @param petId ID of pet that needs to be updated (required) - * @param name Updated name of the pet (optional) - * @param status Updated status of the pet (optional) - * @return Void - */ - - @retrofit.http.FormUrlEncoded - @POST("/pet/{petId}") - Void updatePetWithForm( - @retrofit.http.Path("petId") Long petId, @retrofit.http.Field("name") String name, @retrofit.http.Field("status") String status - ); - - /** - * Updates a pet in the store with form data - * Async method - * @param petId ID of pet that needs to be updated (required) - * @param name Updated name of the pet (optional) - * @param status Updated status of the pet (optional) - * @param cb callback method - */ - - @retrofit.http.FormUrlEncoded - @POST("/pet/{petId}") - void updatePetWithForm( - @retrofit.http.Path("petId") Long petId, @retrofit.http.Field("name") String name, @retrofit.http.Field("status") String status, Callback cb - ); - /** - * uploads an image - * Sync method - * - * @param petId ID of pet to update (required) - * @param additionalMetadata Additional data to pass to server (optional) - * @param file file to upload (optional) - * @return ModelApiResponse - */ - - @retrofit.http.Multipart - @POST("/pet/{petId}/uploadImage") - ModelApiResponse uploadFile( - @retrofit.http.Path("petId") Long petId, @retrofit.http.Part("additionalMetadata") String additionalMetadata, @retrofit.http.Part("file") TypedFile file - ); - - /** - * uploads an image - * Async method - * @param petId ID of pet to update (required) - * @param additionalMetadata Additional data to pass to server (optional) - * @param file file to upload (optional) - * @param cb callback method - */ - - @retrofit.http.Multipart - @POST("/pet/{petId}/uploadImage") - void uploadFile( - @retrofit.http.Path("petId") Long petId, @retrofit.http.Part("additionalMetadata") String additionalMetadata, @retrofit.http.Part("file") TypedFile file, Callback cb - ); - /** - * uploads an image (required) - * Sync method - * - * @param petId ID of pet to update (required) - * @param requiredFile file to upload (required) - * @param additionalMetadata Additional data to pass to server (optional) - * @return ModelApiResponse - */ - - @retrofit.http.Multipart - @POST("/fake/{petId}/uploadImageWithRequiredFile") - ModelApiResponse uploadFileWithRequiredFile( - @retrofit.http.Path("petId") Long petId, @retrofit.http.Part("requiredFile") TypedFile requiredFile, @retrofit.http.Part("additionalMetadata") String additionalMetadata - ); - - /** - * uploads an image (required) - * Async method - * @param petId ID of pet to update (required) - * @param requiredFile file to upload (required) - * @param additionalMetadata Additional data to pass to server (optional) - * @param cb callback method - */ - - @retrofit.http.Multipart - @POST("/fake/{petId}/uploadImageWithRequiredFile") - void uploadFileWithRequiredFile( - @retrofit.http.Path("petId") Long petId, @retrofit.http.Part("requiredFile") TypedFile requiredFile, @retrofit.http.Part("additionalMetadata") String additionalMetadata, Callback cb - ); -} diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/api/StoreApi.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/api/StoreApi.java deleted file mode 100644 index 7a6bea93e82..00000000000 --- a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/api/StoreApi.java +++ /dev/null @@ -1,110 +0,0 @@ -package org.openapitools.client.api; - -import org.openapitools.client.CollectionFormats.*; - -import retrofit.Callback; -import retrofit.http.*; -import retrofit.mime.*; - -import org.openapitools.client.model.Order; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public interface StoreApi { - /** - * Delete purchase order by ID - * Sync method - * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors - * @param orderId ID of the order that needs to be deleted (required) - * @return Void - */ - - @DELETE("/store/order/{order_id}") - Void deleteOrder( - @retrofit.http.Path("order_id") String orderId - ); - - /** - * Delete purchase order by ID - * Async method - * @param orderId ID of the order that needs to be deleted (required) - * @param cb callback method - */ - - @DELETE("/store/order/{order_id}") - void deleteOrder( - @retrofit.http.Path("order_id") String orderId, Callback cb - ); - /** - * Returns pet inventories by status - * Sync method - * Returns a map of status codes to quantities - * @return Map<String, Integer> - */ - - @GET("/store/inventory") - Map getInventory(); - - - /** - * Returns pet inventories by status - * Async method - * @param cb callback method - */ - - @GET("/store/inventory") - void getInventory( - Callback> cb - ); - /** - * Find purchase order by ID - * Sync method - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions - * @param orderId ID of pet that needs to be fetched (required) - * @return Order - */ - - @GET("/store/order/{order_id}") - Order getOrderById( - @retrofit.http.Path("order_id") Long orderId - ); - - /** - * Find purchase order by ID - * Async method - * @param orderId ID of pet that needs to be fetched (required) - * @param cb callback method - */ - - @GET("/store/order/{order_id}") - void getOrderById( - @retrofit.http.Path("order_id") Long orderId, Callback cb - ); - /** - * Place an order for a pet - * Sync method - * - * @param body order placed for purchasing the pet (required) - * @return Order - */ - - @POST("/store/order") - Order placeOrder( - @retrofit.http.Body Order body - ); - - /** - * Place an order for a pet - * Async method - * @param body order placed for purchasing the pet (required) - * @param cb callback method - */ - - @POST("/store/order") - void placeOrder( - @retrofit.http.Body Order body, Callback cb - ); -} diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/api/UserApi.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/api/UserApi.java deleted file mode 100644 index b8ba97a19de..00000000000 --- a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/api/UserApi.java +++ /dev/null @@ -1,210 +0,0 @@ -package org.openapitools.client.api; - -import org.openapitools.client.CollectionFormats.*; - -import retrofit.Callback; -import retrofit.http.*; -import retrofit.mime.*; - -import org.openapitools.client.model.User; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public interface UserApi { - /** - * Create user - * Sync method - * This can only be done by the logged in user. - * @param body Created user object (required) - * @return Void - */ - - @POST("/user") - Void createUser( - @retrofit.http.Body User body - ); - - /** - * Create user - * Async method - * @param body Created user object (required) - * @param cb callback method - */ - - @POST("/user") - void createUser( - @retrofit.http.Body User body, Callback cb - ); - /** - * Creates list of users with given input array - * Sync method - * - * @param body List of user object (required) - * @return Void - */ - - @POST("/user/createWithArray") - Void createUsersWithArrayInput( - @retrofit.http.Body List body - ); - - /** - * Creates list of users with given input array - * Async method - * @param body List of user object (required) - * @param cb callback method - */ - - @POST("/user/createWithArray") - void createUsersWithArrayInput( - @retrofit.http.Body List body, Callback cb - ); - /** - * Creates list of users with given input array - * Sync method - * - * @param body List of user object (required) - * @return Void - */ - - @POST("/user/createWithList") - Void createUsersWithListInput( - @retrofit.http.Body List body - ); - - /** - * Creates list of users with given input array - * Async method - * @param body List of user object (required) - * @param cb callback method - */ - - @POST("/user/createWithList") - void createUsersWithListInput( - @retrofit.http.Body List body, Callback cb - ); - /** - * Delete user - * Sync method - * This can only be done by the logged in user. - * @param username The name that needs to be deleted (required) - * @return Void - */ - - @DELETE("/user/{username}") - Void deleteUser( - @retrofit.http.Path("username") String username - ); - - /** - * Delete user - * Async method - * @param username The name that needs to be deleted (required) - * @param cb callback method - */ - - @DELETE("/user/{username}") - void deleteUser( - @retrofit.http.Path("username") String username, Callback cb - ); - /** - * Get user by user name - * Sync method - * - * @param username The name that needs to be fetched. Use user1 for testing. (required) - * @return User - */ - - @GET("/user/{username}") - User getUserByName( - @retrofit.http.Path("username") String username - ); - - /** - * Get user by user name - * Async method - * @param username The name that needs to be fetched. Use user1 for testing. (required) - * @param cb callback method - */ - - @GET("/user/{username}") - void getUserByName( - @retrofit.http.Path("username") String username, Callback cb - ); - /** - * Logs user into the system - * Sync method - * - * @param username The user name for login (required) - * @param password The password for login in clear text (required) - * @return String - */ - - @GET("/user/login") - String loginUser( - @retrofit.http.Query("username") String username, @retrofit.http.Query("password") String password - ); - - /** - * Logs user into the system - * Async method - * @param username The user name for login (required) - * @param password The password for login in clear text (required) - * @param cb callback method - */ - - @GET("/user/login") - void loginUser( - @retrofit.http.Query("username") String username, @retrofit.http.Query("password") String password, Callback cb - ); - /** - * Logs out current logged in user session - * Sync method - * - * @return Void - */ - - @GET("/user/logout") - Void logoutUser(); - - - /** - * Logs out current logged in user session - * Async method - * @param cb callback method - */ - - @GET("/user/logout") - void logoutUser( - Callback cb - ); - /** - * Updated user - * Sync method - * This can only be done by the logged in user. - * @param username name that need to be deleted (required) - * @param body Updated user object (required) - * @return Void - */ - - @PUT("/user/{username}") - Void updateUser( - @retrofit.http.Path("username") String username, @retrofit.http.Body User body - ); - - /** - * Updated user - * Async method - * @param username name that need to be deleted (required) - * @param body Updated user object (required) - * @param cb callback method - */ - - @PUT("/user/{username}") - void updateUser( - @retrofit.http.Path("username") String username, @retrofit.http.Body User body, Callback cb - ); -} diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java deleted file mode 100644 index 1d944d0e747..00000000000 --- a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java +++ /dev/null @@ -1,72 +0,0 @@ -package org.openapitools.client.auth; - -import java.io.IOException; -import java.net.URI; -import java.net.URISyntaxException; - -import com.squareup.okhttp.Interceptor; -import com.squareup.okhttp.Request; -import com.squareup.okhttp.Response; - -public class ApiKeyAuth implements Interceptor { - private final String location; - private final String paramName; - - private String apiKey; - - public ApiKeyAuth(String location, String paramName) { - this.location = location; - this.paramName = paramName; - } - - public String getLocation() { - return location; - } - - public String getParamName() { - return paramName; - } - - public String getApiKey() { - return apiKey; - } - - public void setApiKey(String apiKey) { - this.apiKey = apiKey; - } - - @Override - public Response intercept(Chain chain) throws IOException { - String paramValue; - Request request = chain.request(); - - if ("query".equals(location)) { - String newQuery = request.uri().getQuery(); - paramValue = paramName + "=" + apiKey; - if (newQuery == null) { - newQuery = paramValue; - } else { - newQuery += "&" + paramValue; - } - - URI newUri; - try { - newUri = new URI(request.uri().getScheme(), request.uri().getAuthority(), - request.uri().getPath(), newQuery, request.uri().getFragment()); - } catch (URISyntaxException e) { - throw new IOException(e); - } - - request = request.newBuilder().url(newUri.toURL()).build(); - } else if ("header".equals(location)) { - request = request.newBuilder() - .addHeader(paramName, apiKey) - .build(); - } else if ("cookie".equals(location)) { - request = request.newBuilder() - .addHeader("Cookie", String.format("%s=%s", paramName, apiKey)) - .build(); - } - return chain.proceed(request); - } -} diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/auth/HttpBasicAuth.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/auth/HttpBasicAuth.java deleted file mode 100644 index 59a24280843..00000000000 --- a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/auth/HttpBasicAuth.java +++ /dev/null @@ -1,49 +0,0 @@ -package org.openapitools.client.auth; - -import java.io.IOException; - -import com.squareup.okhttp.Credentials; -import com.squareup.okhttp.Interceptor; -import com.squareup.okhttp.Request; -import com.squareup.okhttp.Response; - -public class HttpBasicAuth implements Interceptor { - - private String username; - private String password; - - public String getUsername() { - return username; - } - - public void setUsername(String username) { - this.username = username; - } - - public String getPassword() { - return password; - } - - public void setPassword(String password) { - this.password = password; - } - - public void setCredentials(String username, String password) { - this.username = username; - this.password = password; - } - - @Override - public Response intercept(Chain chain) throws IOException { - Request request = chain.request(); - - // If the request already have an authorization (eg. Basic auth), do nothing - if (request.header("Authorization") == null) { - String credentials = Credentials.basic(username, password); - request = request.newBuilder() - .addHeader("Authorization", credentials) - .build(); - } - return chain.proceed(request); - } -} diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/auth/HttpBearerAuth.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/auth/HttpBearerAuth.java deleted file mode 100644 index 308a6a688fd..00000000000 --- a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/auth/HttpBearerAuth.java +++ /dev/null @@ -1,42 +0,0 @@ -package org.openapitools.client.auth; - -import java.io.IOException; - -import com.squareup.okhttp.Interceptor; -import com.squareup.okhttp.Request; -import com.squareup.okhttp.Response; - -public class HttpBearerAuth implements Interceptor { - private final String scheme; - private String bearerToken; - - public HttpBearerAuth(String scheme) { - this.scheme = scheme; - } - - public String getBearerToken() { - return bearerToken; - } - - public void setBearerToken(String bearerToken) { - this.bearerToken = bearerToken; - } - - @Override - public Response intercept(Chain chain) throws IOException { - Request request = chain.request(); - - // If the request already have an authorization (eg. Basic auth), do nothing - if (request.header("Authorization") == null && bearerToken != null) { - request = request.newBuilder() - .addHeader("Authorization", (scheme != null ? upperCaseBearer(scheme) + " " : "") + bearerToken) - .build(); - } - return chain.proceed(request); - } - - private static String upperCaseBearer(String scheme) { - return ("bearer".equalsIgnoreCase(scheme)) ? "Bearer" : scheme; - } - -} diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/auth/OAuth.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/auth/OAuth.java deleted file mode 100644 index d2aa0c597c4..00000000000 --- a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/auth/OAuth.java +++ /dev/null @@ -1,185 +0,0 @@ -package org.openapitools.client.auth; - -import static java.net.HttpURLConnection.HTTP_UNAUTHORIZED; -import static java.net.HttpURLConnection.HTTP_FORBIDDEN; - -import java.io.IOException; -import java.util.Map; - -import org.apache.oltu.oauth2.client.OAuthClient; -import org.apache.oltu.oauth2.client.request.OAuthBearerClientRequest; -import org.apache.oltu.oauth2.client.request.OAuthClientRequest; -import org.apache.oltu.oauth2.client.request.OAuthClientRequest.AuthenticationRequestBuilder; -import org.apache.oltu.oauth2.client.request.OAuthClientRequest.TokenRequestBuilder; -import org.apache.oltu.oauth2.client.response.OAuthJSONAccessTokenResponse; -import org.apache.oltu.oauth2.common.exception.OAuthProblemException; -import org.apache.oltu.oauth2.common.exception.OAuthSystemException; -import org.apache.oltu.oauth2.common.message.types.GrantType; -import org.apache.oltu.oauth2.common.token.BasicOAuthToken; - -import com.squareup.okhttp.Interceptor; -import com.squareup.okhttp.OkHttpClient; -import com.squareup.okhttp.Request; -import com.squareup.okhttp.Request.Builder; -import com.squareup.okhttp.Response; - -public class OAuth implements Interceptor { - - public interface AccessTokenListener { - public void notify(BasicOAuthToken token); - } - - private volatile String accessToken; - private OAuthClient oauthClient; - - private TokenRequestBuilder tokenRequestBuilder; - private AuthenticationRequestBuilder authenticationRequestBuilder; - - private AccessTokenListener accessTokenListener; - - public OAuth( OkHttpClient client, TokenRequestBuilder requestBuilder ) { - this.oauthClient = new OAuthClient(new OAuthOkHttpClient(client)); - this.tokenRequestBuilder = requestBuilder; - } - - public OAuth(TokenRequestBuilder requestBuilder ) { - this(new OkHttpClient(), requestBuilder); - } - - public OAuth(OAuthFlow flow, String authorizationUrl, String tokenUrl, String scopes) { - this(OAuthClientRequest.tokenLocation(tokenUrl).setScope(scopes)); - setFlow(flow); - authenticationRequestBuilder = OAuthClientRequest.authorizationLocation(authorizationUrl); - } - - public void setFlow(OAuthFlow flow) { - switch(flow) { - case accessCode: - case implicit: - tokenRequestBuilder.setGrantType(GrantType.AUTHORIZATION_CODE); - break; - case password: - tokenRequestBuilder.setGrantType(GrantType.PASSWORD); - break; - case application: - tokenRequestBuilder.setGrantType(GrantType.CLIENT_CREDENTIALS); - break; - default: - break; - } - } - - @Override - public Response intercept(Chain chain) - throws IOException { - - return retryingIntercept(chain, true); - } - - private Response retryingIntercept(Chain chain, boolean updateTokenAndRetryOnAuthorizationFailure) throws IOException { - Request request = chain.request(); - - // If the request already have an authorization (eg. Basic auth), do nothing - if (request.header("Authorization") != null) { - return chain.proceed(request); - } - - // If first time, get the token - OAuthClientRequest oAuthRequest; - if (getAccessToken() == null) { - updateAccessToken(null); - } - - if (getAccessToken() != null) { - // Build the request - Builder rb = request.newBuilder(); - - String requestAccessToken = new String(getAccessToken()); - try { - oAuthRequest = new OAuthBearerClientRequest(request.urlString()) - .setAccessToken(requestAccessToken) - .buildHeaderMessage(); - } catch (OAuthSystemException e) { - throw new IOException(e); - } - - for ( Map.Entry header : oAuthRequest.getHeaders().entrySet() ) { - rb.addHeader(header.getKey(), header.getValue()); - } - rb.url( oAuthRequest.getLocationUri()); - - //Execute the request - Response response = chain.proceed(rb.build()); - - // 401/403 most likely indicates that access token has expired. Unless it happens two times in a row. - if ( response != null && (response.code() == HTTP_UNAUTHORIZED || response.code() == HTTP_FORBIDDEN) && updateTokenAndRetryOnAuthorizationFailure ) { - try { - if (updateAccessToken(requestAccessToken)) { - response.body().close(); - return retryingIntercept( chain, false ); - } - } catch (Exception e) { - response.body().close(); - throw e; - } - } - return response; - } else { - return chain.proceed(chain.request()); - } - } - - /* - * Returns true if the access token has been updated - */ - public synchronized boolean updateAccessToken(String requestAccessToken) throws IOException { - if (getAccessToken() == null || getAccessToken().equals(requestAccessToken)) { - try { - OAuthJSONAccessTokenResponse accessTokenResponse = oauthClient.accessToken(this.tokenRequestBuilder.buildBodyMessage()); - if (accessTokenResponse != null && accessTokenResponse.getAccessToken() != null) { - setAccessToken(accessTokenResponse.getAccessToken()); - if (accessTokenListener != null) { - accessTokenListener.notify((BasicOAuthToken) accessTokenResponse.getOAuthToken()); - } - return !getAccessToken().equals(requestAccessToken); - } else { - return false; - } - } catch (OAuthSystemException e) { - throw new IOException(e); - } catch (OAuthProblemException e) { - throw new IOException(e); - } - } - return true; - } - - public void registerAccessTokenListener(AccessTokenListener accessTokenListener) { - this.accessTokenListener = accessTokenListener; - } - - public synchronized String getAccessToken() { - return accessToken; - } - - public synchronized void setAccessToken(String accessToken) { - this.accessToken = accessToken; - } - - public TokenRequestBuilder getTokenRequestBuilder() { - return tokenRequestBuilder; - } - - public void setTokenRequestBuilder(TokenRequestBuilder tokenRequestBuilder) { - this.tokenRequestBuilder = tokenRequestBuilder; - } - - public AuthenticationRequestBuilder getAuthenticationRequestBuilder() { - return authenticationRequestBuilder; - } - - public void setAuthenticationRequestBuilder(AuthenticationRequestBuilder authenticationRequestBuilder) { - this.authenticationRequestBuilder = authenticationRequestBuilder; - } - -} diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/auth/OAuthFlow.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/auth/OAuthFlow.java deleted file mode 100644 index b2d11ff0c4f..00000000000 --- a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/auth/OAuthFlow.java +++ /dev/null @@ -1,18 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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. - */ - - -package org.openapitools.client.auth; - -public enum OAuthFlow { - accessCode, implicit, password, application -} diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/auth/OAuthOkHttpClient.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/auth/OAuthOkHttpClient.java deleted file mode 100644 index aa5c625b51c..00000000000 --- a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/auth/OAuthOkHttpClient.java +++ /dev/null @@ -1,69 +0,0 @@ -package org.openapitools.client.auth; - -import java.io.IOException; -import java.util.Map; -import java.util.Map.Entry; - -import org.apache.oltu.oauth2.client.HttpClient; -import org.apache.oltu.oauth2.client.request.OAuthClientRequest; -import org.apache.oltu.oauth2.client.response.OAuthClientResponse; -import org.apache.oltu.oauth2.client.response.OAuthClientResponseFactory; -import org.apache.oltu.oauth2.common.exception.OAuthProblemException; -import org.apache.oltu.oauth2.common.exception.OAuthSystemException; - -import com.squareup.okhttp.MediaType; -import com.squareup.okhttp.OkHttpClient; -import com.squareup.okhttp.Request; -import com.squareup.okhttp.RequestBody; -import com.squareup.okhttp.Response; - - -public class OAuthOkHttpClient implements HttpClient { - - private OkHttpClient client; - - public OAuthOkHttpClient() { - this.client = new OkHttpClient(); - } - - public OAuthOkHttpClient(OkHttpClient client) { - this.client = client; - } - - public T execute(OAuthClientRequest request, Map headers, - String requestMethod, Class responseClass) - throws OAuthSystemException, OAuthProblemException { - - MediaType mediaType = MediaType.parse("application/json"); - Request.Builder requestBuilder = new Request.Builder().url(request.getLocationUri()); - - if(headers != null) { - for (Entry entry : headers.entrySet()) { - if (entry.getKey().equalsIgnoreCase("Content-Type")) { - mediaType = MediaType.parse(entry.getValue()); - } else { - requestBuilder.addHeader(entry.getKey(), entry.getValue()); - } - } - } - - RequestBody body = request.getBody() != null ? RequestBody.create(mediaType, request.getBody()) : null; - requestBuilder.method(requestMethod, body); - - try { - Response response = client.newCall(requestBuilder.build()).execute(); - return OAuthClientResponseFactory.createCustomResponse( - response.body().string(), - response.body().contentType().toString(), - response.code(), - responseClass); - } catch (IOException e) { - throw new OAuthSystemException(e); - } - } - - public void shutdown() { - // Nothing to do here - } - -} diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java deleted file mode 100644 index 79c169543fd..00000000000 --- a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java +++ /dev/null @@ -1,103 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; -import java.util.HashMap; -import java.util.Map; - -/** - * AdditionalPropertiesAnyType - */ - -public class AdditionalPropertiesAnyType extends HashMap { - public static final String SERIALIZED_NAME_NAME = "name"; - @SerializedName(SERIALIZED_NAME_NAME) - private String name; - - - public AdditionalPropertiesAnyType name(String name) { - - this.name = name; - return this; - } - - /** - * Get name - * @return name - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public String getName() { - return name; - } - - - public void setName(String name) { - this.name = name; - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AdditionalPropertiesAnyType additionalPropertiesAnyType = (AdditionalPropertiesAnyType) o; - return Objects.equals(this.name, additionalPropertiesAnyType.name) && - super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(name, super.hashCode()); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AdditionalPropertiesAnyType {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java deleted file mode 100644 index e16ee861f89..00000000000 --- a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java +++ /dev/null @@ -1,104 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * AdditionalPropertiesArray - */ - -public class AdditionalPropertiesArray extends HashMap { - public static final String SERIALIZED_NAME_NAME = "name"; - @SerializedName(SERIALIZED_NAME_NAME) - private String name; - - - public AdditionalPropertiesArray name(String name) { - - this.name = name; - return this; - } - - /** - * Get name - * @return name - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public String getName() { - return name; - } - - - public void setName(String name) { - this.name = name; - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AdditionalPropertiesArray additionalPropertiesArray = (AdditionalPropertiesArray) o; - return Objects.equals(this.name, additionalPropertiesArray.name) && - super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(name, super.hashCode()); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AdditionalPropertiesArray {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java deleted file mode 100644 index 29161b52aa1..00000000000 --- a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java +++ /dev/null @@ -1,103 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; -import java.util.HashMap; -import java.util.Map; - -/** - * AdditionalPropertiesBoolean - */ - -public class AdditionalPropertiesBoolean extends HashMap { - public static final String SERIALIZED_NAME_NAME = "name"; - @SerializedName(SERIALIZED_NAME_NAME) - private String name; - - - public AdditionalPropertiesBoolean name(String name) { - - this.name = name; - return this; - } - - /** - * Get name - * @return name - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public String getName() { - return name; - } - - - public void setName(String name) { - this.name = name; - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AdditionalPropertiesBoolean additionalPropertiesBoolean = (AdditionalPropertiesBoolean) o; - return Objects.equals(this.name, additionalPropertiesBoolean.name) && - super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(name, super.hashCode()); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AdditionalPropertiesBoolean {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java deleted file mode 100644 index a067b01ec97..00000000000 --- a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java +++ /dev/null @@ -1,457 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; -import java.math.BigDecimal; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * AdditionalPropertiesClass - */ - -public class AdditionalPropertiesClass { - public static final String SERIALIZED_NAME_MAP_STRING = "map_string"; - @SerializedName(SERIALIZED_NAME_MAP_STRING) - private Map mapString = null; - - public static final String SERIALIZED_NAME_MAP_NUMBER = "map_number"; - @SerializedName(SERIALIZED_NAME_MAP_NUMBER) - private Map mapNumber = null; - - public static final String SERIALIZED_NAME_MAP_INTEGER = "map_integer"; - @SerializedName(SERIALIZED_NAME_MAP_INTEGER) - private Map mapInteger = null; - - public static final String SERIALIZED_NAME_MAP_BOOLEAN = "map_boolean"; - @SerializedName(SERIALIZED_NAME_MAP_BOOLEAN) - private Map mapBoolean = null; - - public static final String SERIALIZED_NAME_MAP_ARRAY_INTEGER = "map_array_integer"; - @SerializedName(SERIALIZED_NAME_MAP_ARRAY_INTEGER) - private Map> mapArrayInteger = null; - - public static final String SERIALIZED_NAME_MAP_ARRAY_ANYTYPE = "map_array_anytype"; - @SerializedName(SERIALIZED_NAME_MAP_ARRAY_ANYTYPE) - private Map> mapArrayAnytype = null; - - public static final String SERIALIZED_NAME_MAP_MAP_STRING = "map_map_string"; - @SerializedName(SERIALIZED_NAME_MAP_MAP_STRING) - private Map> mapMapString = null; - - public static final String SERIALIZED_NAME_MAP_MAP_ANYTYPE = "map_map_anytype"; - @SerializedName(SERIALIZED_NAME_MAP_MAP_ANYTYPE) - private Map> mapMapAnytype = null; - - public static final String SERIALIZED_NAME_ANYTYPE1 = "anytype_1"; - @SerializedName(SERIALIZED_NAME_ANYTYPE1) - private Object anytype1; - - public static final String SERIALIZED_NAME_ANYTYPE2 = "anytype_2"; - @SerializedName(SERIALIZED_NAME_ANYTYPE2) - private Object anytype2; - - public static final String SERIALIZED_NAME_ANYTYPE3 = "anytype_3"; - @SerializedName(SERIALIZED_NAME_ANYTYPE3) - private Object anytype3; - - - public AdditionalPropertiesClass mapString(Map mapString) { - - this.mapString = mapString; - return this; - } - - public AdditionalPropertiesClass putMapStringItem(String key, String mapStringItem) { - if (this.mapString == null) { - this.mapString = new HashMap(); - } - this.mapString.put(key, mapStringItem); - return this; - } - - /** - * Get mapString - * @return mapString - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public Map getMapString() { - return mapString; - } - - - public void setMapString(Map mapString) { - this.mapString = mapString; - } - - - public AdditionalPropertiesClass mapNumber(Map mapNumber) { - - this.mapNumber = mapNumber; - return this; - } - - public AdditionalPropertiesClass putMapNumberItem(String key, BigDecimal mapNumberItem) { - if (this.mapNumber == null) { - this.mapNumber = new HashMap(); - } - this.mapNumber.put(key, mapNumberItem); - return this; - } - - /** - * Get mapNumber - * @return mapNumber - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public Map getMapNumber() { - return mapNumber; - } - - - public void setMapNumber(Map mapNumber) { - this.mapNumber = mapNumber; - } - - - public AdditionalPropertiesClass mapInteger(Map mapInteger) { - - this.mapInteger = mapInteger; - return this; - } - - public AdditionalPropertiesClass putMapIntegerItem(String key, Integer mapIntegerItem) { - if (this.mapInteger == null) { - this.mapInteger = new HashMap(); - } - this.mapInteger.put(key, mapIntegerItem); - return this; - } - - /** - * Get mapInteger - * @return mapInteger - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public Map getMapInteger() { - return mapInteger; - } - - - public void setMapInteger(Map mapInteger) { - this.mapInteger = mapInteger; - } - - - public AdditionalPropertiesClass mapBoolean(Map mapBoolean) { - - this.mapBoolean = mapBoolean; - return this; - } - - public AdditionalPropertiesClass putMapBooleanItem(String key, Boolean mapBooleanItem) { - if (this.mapBoolean == null) { - this.mapBoolean = new HashMap(); - } - this.mapBoolean.put(key, mapBooleanItem); - return this; - } - - /** - * Get mapBoolean - * @return mapBoolean - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public Map getMapBoolean() { - return mapBoolean; - } - - - public void setMapBoolean(Map mapBoolean) { - this.mapBoolean = mapBoolean; - } - - - public AdditionalPropertiesClass mapArrayInteger(Map> mapArrayInteger) { - - this.mapArrayInteger = mapArrayInteger; - return this; - } - - public AdditionalPropertiesClass putMapArrayIntegerItem(String key, List mapArrayIntegerItem) { - if (this.mapArrayInteger == null) { - this.mapArrayInteger = new HashMap>(); - } - this.mapArrayInteger.put(key, mapArrayIntegerItem); - return this; - } - - /** - * Get mapArrayInteger - * @return mapArrayInteger - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public Map> getMapArrayInteger() { - return mapArrayInteger; - } - - - public void setMapArrayInteger(Map> mapArrayInteger) { - this.mapArrayInteger = mapArrayInteger; - } - - - public AdditionalPropertiesClass mapArrayAnytype(Map> mapArrayAnytype) { - - this.mapArrayAnytype = mapArrayAnytype; - return this; - } - - public AdditionalPropertiesClass putMapArrayAnytypeItem(String key, List mapArrayAnytypeItem) { - if (this.mapArrayAnytype == null) { - this.mapArrayAnytype = new HashMap>(); - } - this.mapArrayAnytype.put(key, mapArrayAnytypeItem); - return this; - } - - /** - * Get mapArrayAnytype - * @return mapArrayAnytype - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public Map> getMapArrayAnytype() { - return mapArrayAnytype; - } - - - public void setMapArrayAnytype(Map> mapArrayAnytype) { - this.mapArrayAnytype = mapArrayAnytype; - } - - - public AdditionalPropertiesClass mapMapString(Map> mapMapString) { - - this.mapMapString = mapMapString; - return this; - } - - public AdditionalPropertiesClass putMapMapStringItem(String key, Map mapMapStringItem) { - if (this.mapMapString == null) { - this.mapMapString = new HashMap>(); - } - this.mapMapString.put(key, mapMapStringItem); - return this; - } - - /** - * Get mapMapString - * @return mapMapString - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public Map> getMapMapString() { - return mapMapString; - } - - - public void setMapMapString(Map> mapMapString) { - this.mapMapString = mapMapString; - } - - - public AdditionalPropertiesClass mapMapAnytype(Map> mapMapAnytype) { - - this.mapMapAnytype = mapMapAnytype; - return this; - } - - public AdditionalPropertiesClass putMapMapAnytypeItem(String key, Map mapMapAnytypeItem) { - if (this.mapMapAnytype == null) { - this.mapMapAnytype = new HashMap>(); - } - this.mapMapAnytype.put(key, mapMapAnytypeItem); - return this; - } - - /** - * Get mapMapAnytype - * @return mapMapAnytype - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public Map> getMapMapAnytype() { - return mapMapAnytype; - } - - - public void setMapMapAnytype(Map> mapMapAnytype) { - this.mapMapAnytype = mapMapAnytype; - } - - - public AdditionalPropertiesClass anytype1(Object anytype1) { - - this.anytype1 = anytype1; - return this; - } - - /** - * Get anytype1 - * @return anytype1 - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public Object getAnytype1() { - return anytype1; - } - - - public void setAnytype1(Object anytype1) { - this.anytype1 = anytype1; - } - - - public AdditionalPropertiesClass anytype2(Object anytype2) { - - this.anytype2 = anytype2; - return this; - } - - /** - * Get anytype2 - * @return anytype2 - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public Object getAnytype2() { - return anytype2; - } - - - public void setAnytype2(Object anytype2) { - this.anytype2 = anytype2; - } - - - public AdditionalPropertiesClass anytype3(Object anytype3) { - - this.anytype3 = anytype3; - return this; - } - - /** - * Get anytype3 - * @return anytype3 - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public Object getAnytype3() { - return anytype3; - } - - - public void setAnytype3(Object anytype3) { - this.anytype3 = anytype3; - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AdditionalPropertiesClass additionalPropertiesClass = (AdditionalPropertiesClass) o; - return Objects.equals(this.mapString, additionalPropertiesClass.mapString) && - Objects.equals(this.mapNumber, additionalPropertiesClass.mapNumber) && - Objects.equals(this.mapInteger, additionalPropertiesClass.mapInteger) && - Objects.equals(this.mapBoolean, additionalPropertiesClass.mapBoolean) && - Objects.equals(this.mapArrayInteger, additionalPropertiesClass.mapArrayInteger) && - Objects.equals(this.mapArrayAnytype, additionalPropertiesClass.mapArrayAnytype) && - Objects.equals(this.mapMapString, additionalPropertiesClass.mapMapString) && - Objects.equals(this.mapMapAnytype, additionalPropertiesClass.mapMapAnytype) && - Objects.equals(this.anytype1, additionalPropertiesClass.anytype1) && - Objects.equals(this.anytype2, additionalPropertiesClass.anytype2) && - Objects.equals(this.anytype3, additionalPropertiesClass.anytype3); - } - - @Override - public int hashCode() { - return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, anytype1, anytype2, anytype3); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AdditionalPropertiesClass {\n"); - sb.append(" mapString: ").append(toIndentedString(mapString)).append("\n"); - sb.append(" mapNumber: ").append(toIndentedString(mapNumber)).append("\n"); - sb.append(" mapInteger: ").append(toIndentedString(mapInteger)).append("\n"); - sb.append(" mapBoolean: ").append(toIndentedString(mapBoolean)).append("\n"); - sb.append(" mapArrayInteger: ").append(toIndentedString(mapArrayInteger)).append("\n"); - sb.append(" mapArrayAnytype: ").append(toIndentedString(mapArrayAnytype)).append("\n"); - sb.append(" mapMapString: ").append(toIndentedString(mapMapString)).append("\n"); - sb.append(" mapMapAnytype: ").append(toIndentedString(mapMapAnytype)).append("\n"); - sb.append(" anytype1: ").append(toIndentedString(anytype1)).append("\n"); - sb.append(" anytype2: ").append(toIndentedString(anytype2)).append("\n"); - sb.append(" anytype3: ").append(toIndentedString(anytype3)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java deleted file mode 100644 index 3a15ed7cd97..00000000000 --- a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java +++ /dev/null @@ -1,103 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; -import java.util.HashMap; -import java.util.Map; - -/** - * AdditionalPropertiesInteger - */ - -public class AdditionalPropertiesInteger extends HashMap { - public static final String SERIALIZED_NAME_NAME = "name"; - @SerializedName(SERIALIZED_NAME_NAME) - private String name; - - - public AdditionalPropertiesInteger name(String name) { - - this.name = name; - return this; - } - - /** - * Get name - * @return name - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public String getName() { - return name; - } - - - public void setName(String name) { - this.name = name; - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AdditionalPropertiesInteger additionalPropertiesInteger = (AdditionalPropertiesInteger) o; - return Objects.equals(this.name, additionalPropertiesInteger.name) && - super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(name, super.hashCode()); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AdditionalPropertiesInteger {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java deleted file mode 100644 index 9bc46e09991..00000000000 --- a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java +++ /dev/null @@ -1,104 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; -import java.math.BigDecimal; -import java.util.HashMap; -import java.util.Map; - -/** - * AdditionalPropertiesNumber - */ - -public class AdditionalPropertiesNumber extends HashMap { - public static final String SERIALIZED_NAME_NAME = "name"; - @SerializedName(SERIALIZED_NAME_NAME) - private String name; - - - public AdditionalPropertiesNumber name(String name) { - - this.name = name; - return this; - } - - /** - * Get name - * @return name - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public String getName() { - return name; - } - - - public void setName(String name) { - this.name = name; - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AdditionalPropertiesNumber additionalPropertiesNumber = (AdditionalPropertiesNumber) o; - return Objects.equals(this.name, additionalPropertiesNumber.name) && - super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(name, super.hashCode()); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AdditionalPropertiesNumber {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java deleted file mode 100644 index bd65f7791c5..00000000000 --- a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java +++ /dev/null @@ -1,103 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; -import java.util.HashMap; -import java.util.Map; - -/** - * AdditionalPropertiesObject - */ - -public class AdditionalPropertiesObject extends HashMap { - public static final String SERIALIZED_NAME_NAME = "name"; - @SerializedName(SERIALIZED_NAME_NAME) - private String name; - - - public AdditionalPropertiesObject name(String name) { - - this.name = name; - return this; - } - - /** - * Get name - * @return name - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public String getName() { - return name; - } - - - public void setName(String name) { - this.name = name; - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AdditionalPropertiesObject additionalPropertiesObject = (AdditionalPropertiesObject) o; - return Objects.equals(this.name, additionalPropertiesObject.name) && - super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(name, super.hashCode()); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AdditionalPropertiesObject {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java deleted file mode 100644 index cdb8afedaaf..00000000000 --- a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java +++ /dev/null @@ -1,103 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; -import java.util.HashMap; -import java.util.Map; - -/** - * AdditionalPropertiesString - */ - -public class AdditionalPropertiesString extends HashMap { - public static final String SERIALIZED_NAME_NAME = "name"; - @SerializedName(SERIALIZED_NAME_NAME) - private String name; - - - public AdditionalPropertiesString name(String name) { - - this.name = name; - return this; - } - - /** - * Get name - * @return name - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public String getName() { - return name; - } - - - public void setName(String name) { - this.name = name; - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AdditionalPropertiesString additionalPropertiesString = (AdditionalPropertiesString) o; - return Objects.equals(this.name, additionalPropertiesString.name) && - super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(name, super.hashCode()); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AdditionalPropertiesString {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/Animal.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/Animal.java deleted file mode 100644 index 4d3bf2369fb..00000000000 --- a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/Animal.java +++ /dev/null @@ -1,134 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; -import org.openapitools.client.model.BigCat; -import org.openapitools.client.model.Cat; -import org.openapitools.client.model.Dog; - -/** - * Animal - */ - - -public class Animal { - public static final String SERIALIZED_NAME_CLASS_NAME = "className"; - @SerializedName(SERIALIZED_NAME_CLASS_NAME) - protected String className; - - public static final String SERIALIZED_NAME_COLOR = "color"; - @SerializedName(SERIALIZED_NAME_COLOR) - private String color = "red"; - - public Animal() { - this.className = this.getClass().getSimpleName(); - } - - public Animal className(String className) { - - this.className = className; - return this; - } - - /** - * Get className - * @return className - **/ - @ApiModelProperty(required = true, value = "") - - public String getClassName() { - return className; - } - - - public void setClassName(String className) { - this.className = className; - } - - - public Animal color(String color) { - - this.color = color; - return this; - } - - /** - * Get color - * @return color - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public String getColor() { - return color; - } - - - public void setColor(String color) { - this.color = color; - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Animal animal = (Animal) o; - return Objects.equals(this.className, animal.className) && - Objects.equals(this.color, animal.color); - } - - @Override - public int hashCode() { - return Objects.hash(className, color); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Animal {\n"); - sb.append(" className: ").append(toIndentedString(className)).append("\n"); - sb.append(" color: ").append(toIndentedString(color)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java deleted file mode 100644 index a6dd760660d..00000000000 --- a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java +++ /dev/null @@ -1,110 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; -import java.math.BigDecimal; -import java.util.ArrayList; -import java.util.List; - -/** - * ArrayOfArrayOfNumberOnly - */ - -public class ArrayOfArrayOfNumberOnly { - public static final String SERIALIZED_NAME_ARRAY_ARRAY_NUMBER = "ArrayArrayNumber"; - @SerializedName(SERIALIZED_NAME_ARRAY_ARRAY_NUMBER) - private List> arrayArrayNumber = null; - - - public ArrayOfArrayOfNumberOnly arrayArrayNumber(List> arrayArrayNumber) { - - this.arrayArrayNumber = arrayArrayNumber; - return this; - } - - public ArrayOfArrayOfNumberOnly addArrayArrayNumberItem(List arrayArrayNumberItem) { - if (this.arrayArrayNumber == null) { - this.arrayArrayNumber = new ArrayList>(); - } - this.arrayArrayNumber.add(arrayArrayNumberItem); - return this; - } - - /** - * Get arrayArrayNumber - * @return arrayArrayNumber - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public List> getArrayArrayNumber() { - return arrayArrayNumber; - } - - - public void setArrayArrayNumber(List> arrayArrayNumber) { - this.arrayArrayNumber = arrayArrayNumber; - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ArrayOfArrayOfNumberOnly arrayOfArrayOfNumberOnly = (ArrayOfArrayOfNumberOnly) o; - return Objects.equals(this.arrayArrayNumber, arrayOfArrayOfNumberOnly.arrayArrayNumber); - } - - @Override - public int hashCode() { - return Objects.hash(arrayArrayNumber); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ArrayOfArrayOfNumberOnly {\n"); - sb.append(" arrayArrayNumber: ").append(toIndentedString(arrayArrayNumber)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java deleted file mode 100644 index 487c539d3ba..00000000000 --- a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java +++ /dev/null @@ -1,110 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; -import java.math.BigDecimal; -import java.util.ArrayList; -import java.util.List; - -/** - * ArrayOfNumberOnly - */ - -public class ArrayOfNumberOnly { - public static final String SERIALIZED_NAME_ARRAY_NUMBER = "ArrayNumber"; - @SerializedName(SERIALIZED_NAME_ARRAY_NUMBER) - private List arrayNumber = null; - - - public ArrayOfNumberOnly arrayNumber(List arrayNumber) { - - this.arrayNumber = arrayNumber; - return this; - } - - public ArrayOfNumberOnly addArrayNumberItem(BigDecimal arrayNumberItem) { - if (this.arrayNumber == null) { - this.arrayNumber = new ArrayList(); - } - this.arrayNumber.add(arrayNumberItem); - return this; - } - - /** - * Get arrayNumber - * @return arrayNumber - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public List getArrayNumber() { - return arrayNumber; - } - - - public void setArrayNumber(List arrayNumber) { - this.arrayNumber = arrayNumber; - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ArrayOfNumberOnly arrayOfNumberOnly = (ArrayOfNumberOnly) o; - return Objects.equals(this.arrayNumber, arrayOfNumberOnly.arrayNumber); - } - - @Override - public int hashCode() { - return Objects.hash(arrayNumber); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ArrayOfNumberOnly {\n"); - sb.append(" arrayNumber: ").append(toIndentedString(arrayNumber)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/ArrayTest.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/ArrayTest.java deleted file mode 100644 index 7d66ce233fe..00000000000 --- a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/ArrayTest.java +++ /dev/null @@ -1,184 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; -import org.openapitools.client.model.ReadOnlyFirst; - -/** - * ArrayTest - */ - -public class ArrayTest { - public static final String SERIALIZED_NAME_ARRAY_OF_STRING = "array_of_string"; - @SerializedName(SERIALIZED_NAME_ARRAY_OF_STRING) - private List arrayOfString = null; - - public static final String SERIALIZED_NAME_ARRAY_ARRAY_OF_INTEGER = "array_array_of_integer"; - @SerializedName(SERIALIZED_NAME_ARRAY_ARRAY_OF_INTEGER) - private List> arrayArrayOfInteger = null; - - public static final String SERIALIZED_NAME_ARRAY_ARRAY_OF_MODEL = "array_array_of_model"; - @SerializedName(SERIALIZED_NAME_ARRAY_ARRAY_OF_MODEL) - private List> arrayArrayOfModel = null; - - - public ArrayTest arrayOfString(List arrayOfString) { - - this.arrayOfString = arrayOfString; - return this; - } - - public ArrayTest addArrayOfStringItem(String arrayOfStringItem) { - if (this.arrayOfString == null) { - this.arrayOfString = new ArrayList(); - } - this.arrayOfString.add(arrayOfStringItem); - return this; - } - - /** - * Get arrayOfString - * @return arrayOfString - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public List getArrayOfString() { - return arrayOfString; - } - - - public void setArrayOfString(List arrayOfString) { - this.arrayOfString = arrayOfString; - } - - - public ArrayTest arrayArrayOfInteger(List> arrayArrayOfInteger) { - - this.arrayArrayOfInteger = arrayArrayOfInteger; - return this; - } - - public ArrayTest addArrayArrayOfIntegerItem(List arrayArrayOfIntegerItem) { - if (this.arrayArrayOfInteger == null) { - this.arrayArrayOfInteger = new ArrayList>(); - } - this.arrayArrayOfInteger.add(arrayArrayOfIntegerItem); - return this; - } - - /** - * Get arrayArrayOfInteger - * @return arrayArrayOfInteger - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public List> getArrayArrayOfInteger() { - return arrayArrayOfInteger; - } - - - public void setArrayArrayOfInteger(List> arrayArrayOfInteger) { - this.arrayArrayOfInteger = arrayArrayOfInteger; - } - - - public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) { - - this.arrayArrayOfModel = arrayArrayOfModel; - return this; - } - - public ArrayTest addArrayArrayOfModelItem(List arrayArrayOfModelItem) { - if (this.arrayArrayOfModel == null) { - this.arrayArrayOfModel = new ArrayList>(); - } - this.arrayArrayOfModel.add(arrayArrayOfModelItem); - return this; - } - - /** - * Get arrayArrayOfModel - * @return arrayArrayOfModel - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public List> getArrayArrayOfModel() { - return arrayArrayOfModel; - } - - - public void setArrayArrayOfModel(List> arrayArrayOfModel) { - this.arrayArrayOfModel = arrayArrayOfModel; - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ArrayTest arrayTest = (ArrayTest) o; - return Objects.equals(this.arrayOfString, arrayTest.arrayOfString) && - Objects.equals(this.arrayArrayOfInteger, arrayTest.arrayArrayOfInteger) && - Objects.equals(this.arrayArrayOfModel, arrayTest.arrayArrayOfModel); - } - - @Override - public int hashCode() { - return Objects.hash(arrayOfString, arrayArrayOfInteger, arrayArrayOfModel); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ArrayTest {\n"); - sb.append(" arrayOfString: ").append(toIndentedString(arrayOfString)).append("\n"); - sb.append(" arrayArrayOfInteger: ").append(toIndentedString(arrayArrayOfInteger)).append("\n"); - sb.append(" arrayArrayOfModel: ").append(toIndentedString(arrayArrayOfModel)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/BigCat.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/BigCat.java deleted file mode 100644 index d30cc70c0cf..00000000000 --- a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/BigCat.java +++ /dev/null @@ -1,158 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; -import org.openapitools.client.model.BigCatAllOf; -import org.openapitools.client.model.Cat; - -/** - * BigCat - */ - - -public class BigCat extends Cat { - /** - * Gets or Sets kind - */ - @JsonAdapter(KindEnum.Adapter.class) - public enum KindEnum { - LIONS("lions"), - - TIGERS("tigers"), - - LEOPARDS("leopards"), - - JAGUARS("jaguars"); - - private String value; - - KindEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static KindEnum fromValue(String value) { - for (KindEnum b : KindEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final KindEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public KindEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return KindEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_KIND = "kind"; - @SerializedName(SERIALIZED_NAME_KIND) - private KindEnum kind; - - public BigCat() { - this.className = this.getClass().getSimpleName(); - } - - public BigCat kind(KindEnum kind) { - - this.kind = kind; - return this; - } - - /** - * Get kind - * @return kind - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public KindEnum getKind() { - return kind; - } - - - public void setKind(KindEnum kind) { - this.kind = kind; - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BigCat bigCat = (BigCat) o; - return Objects.equals(this.kind, bigCat.kind) && - super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(kind, super.hashCode()); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BigCat {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" kind: ").append(toIndentedString(kind)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/BigCatAllOf.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/BigCatAllOf.java deleted file mode 100644 index cd2207704bd..00000000000 --- a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/BigCatAllOf.java +++ /dev/null @@ -1,150 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; - -/** - * BigCatAllOf - */ - -public class BigCatAllOf { - /** - * Gets or Sets kind - */ - @JsonAdapter(KindEnum.Adapter.class) - public enum KindEnum { - LIONS("lions"), - - TIGERS("tigers"), - - LEOPARDS("leopards"), - - JAGUARS("jaguars"); - - private String value; - - KindEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static KindEnum fromValue(String value) { - for (KindEnum b : KindEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final KindEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public KindEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return KindEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_KIND = "kind"; - @SerializedName(SERIALIZED_NAME_KIND) - private KindEnum kind; - - - public BigCatAllOf kind(KindEnum kind) { - - this.kind = kind; - return this; - } - - /** - * Get kind - * @return kind - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public KindEnum getKind() { - return kind; - } - - - public void setKind(KindEnum kind) { - this.kind = kind; - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BigCatAllOf bigCatAllOf = (BigCatAllOf) o; - return Objects.equals(this.kind, bigCatAllOf.kind); - } - - @Override - public int hashCode() { - return Objects.hash(kind); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BigCatAllOf {\n"); - sb.append(" kind: ").append(toIndentedString(kind)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/Capitalization.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/Capitalization.java deleted file mode 100644 index d4fbec81c54..00000000000 --- a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/Capitalization.java +++ /dev/null @@ -1,244 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; - -/** - * Capitalization - */ - -public class Capitalization { - public static final String SERIALIZED_NAME_SMALL_CAMEL = "smallCamel"; - @SerializedName(SERIALIZED_NAME_SMALL_CAMEL) - private String smallCamel; - - public static final String SERIALIZED_NAME_CAPITAL_CAMEL = "CapitalCamel"; - @SerializedName(SERIALIZED_NAME_CAPITAL_CAMEL) - private String capitalCamel; - - public static final String SERIALIZED_NAME_SMALL_SNAKE = "small_Snake"; - @SerializedName(SERIALIZED_NAME_SMALL_SNAKE) - private String smallSnake; - - public static final String SERIALIZED_NAME_CAPITAL_SNAKE = "Capital_Snake"; - @SerializedName(SERIALIZED_NAME_CAPITAL_SNAKE) - private String capitalSnake; - - public static final String SERIALIZED_NAME_SC_A_E_T_H_FLOW_POINTS = "SCA_ETH_Flow_Points"; - @SerializedName(SERIALIZED_NAME_SC_A_E_T_H_FLOW_POINTS) - private String scAETHFlowPoints; - - public static final String SERIALIZED_NAME_A_T_T_N_A_M_E = "ATT_NAME"; - @SerializedName(SERIALIZED_NAME_A_T_T_N_A_M_E) - private String ATT_NAME; - - - public Capitalization smallCamel(String smallCamel) { - - this.smallCamel = smallCamel; - return this; - } - - /** - * Get smallCamel - * @return smallCamel - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public String getSmallCamel() { - return smallCamel; - } - - - public void setSmallCamel(String smallCamel) { - this.smallCamel = smallCamel; - } - - - public Capitalization capitalCamel(String capitalCamel) { - - this.capitalCamel = capitalCamel; - return this; - } - - /** - * Get capitalCamel - * @return capitalCamel - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public String getCapitalCamel() { - return capitalCamel; - } - - - public void setCapitalCamel(String capitalCamel) { - this.capitalCamel = capitalCamel; - } - - - public Capitalization smallSnake(String smallSnake) { - - this.smallSnake = smallSnake; - return this; - } - - /** - * Get smallSnake - * @return smallSnake - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public String getSmallSnake() { - return smallSnake; - } - - - public void setSmallSnake(String smallSnake) { - this.smallSnake = smallSnake; - } - - - public Capitalization capitalSnake(String capitalSnake) { - - this.capitalSnake = capitalSnake; - return this; - } - - /** - * Get capitalSnake - * @return capitalSnake - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public String getCapitalSnake() { - return capitalSnake; - } - - - public void setCapitalSnake(String capitalSnake) { - this.capitalSnake = capitalSnake; - } - - - public Capitalization scAETHFlowPoints(String scAETHFlowPoints) { - - this.scAETHFlowPoints = scAETHFlowPoints; - return this; - } - - /** - * Get scAETHFlowPoints - * @return scAETHFlowPoints - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public String getScAETHFlowPoints() { - return scAETHFlowPoints; - } - - - public void setScAETHFlowPoints(String scAETHFlowPoints) { - this.scAETHFlowPoints = scAETHFlowPoints; - } - - - public Capitalization ATT_NAME(String ATT_NAME) { - - this.ATT_NAME = ATT_NAME; - return this; - } - - /** - * Name of the pet - * @return ATT_NAME - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "Name of the pet ") - - public String getATTNAME() { - return ATT_NAME; - } - - - public void setATTNAME(String ATT_NAME) { - this.ATT_NAME = ATT_NAME; - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Capitalization capitalization = (Capitalization) o; - return Objects.equals(this.smallCamel, capitalization.smallCamel) && - Objects.equals(this.capitalCamel, capitalization.capitalCamel) && - Objects.equals(this.smallSnake, capitalization.smallSnake) && - Objects.equals(this.capitalSnake, capitalization.capitalSnake) && - Objects.equals(this.scAETHFlowPoints, capitalization.scAETHFlowPoints) && - Objects.equals(this.ATT_NAME, capitalization.ATT_NAME); - } - - @Override - public int hashCode() { - return Objects.hash(smallCamel, capitalCamel, smallSnake, capitalSnake, scAETHFlowPoints, ATT_NAME); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Capitalization {\n"); - sb.append(" smallCamel: ").append(toIndentedString(smallCamel)).append("\n"); - sb.append(" capitalCamel: ").append(toIndentedString(capitalCamel)).append("\n"); - sb.append(" smallSnake: ").append(toIndentedString(smallSnake)).append("\n"); - sb.append(" capitalSnake: ").append(toIndentedString(capitalSnake)).append("\n"); - sb.append(" scAETHFlowPoints: ").append(toIndentedString(scAETHFlowPoints)).append("\n"); - sb.append(" ATT_NAME: ").append(toIndentedString(ATT_NAME)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/Cat.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/Cat.java deleted file mode 100644 index 058f627b414..00000000000 --- a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/Cat.java +++ /dev/null @@ -1,108 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; -import org.openapitools.client.model.Animal; -import org.openapitools.client.model.BigCat; -import org.openapitools.client.model.CatAllOf; - -/** - * Cat - */ - - -public class Cat extends Animal { - public static final String SERIALIZED_NAME_DECLAWED = "declawed"; - @SerializedName(SERIALIZED_NAME_DECLAWED) - private Boolean declawed; - - public Cat() { - this.className = this.getClass().getSimpleName(); - } - - public Cat declawed(Boolean declawed) { - - this.declawed = declawed; - return this; - } - - /** - * Get declawed - * @return declawed - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public Boolean getDeclawed() { - return declawed; - } - - - public void setDeclawed(Boolean declawed) { - this.declawed = declawed; - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Cat cat = (Cat) o; - return Objects.equals(this.declawed, cat.declawed) && - super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(declawed, super.hashCode()); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Cat {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" declawed: ").append(toIndentedString(declawed)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/CatAllOf.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/CatAllOf.java deleted file mode 100644 index dcd1a8e3b90..00000000000 --- a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/CatAllOf.java +++ /dev/null @@ -1,99 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; - -/** - * CatAllOf - */ - -public class CatAllOf { - public static final String SERIALIZED_NAME_DECLAWED = "declawed"; - @SerializedName(SERIALIZED_NAME_DECLAWED) - private Boolean declawed; - - - public CatAllOf declawed(Boolean declawed) { - - this.declawed = declawed; - return this; - } - - /** - * Get declawed - * @return declawed - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public Boolean getDeclawed() { - return declawed; - } - - - public void setDeclawed(Boolean declawed) { - this.declawed = declawed; - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CatAllOf catAllOf = (CatAllOf) o; - return Objects.equals(this.declawed, catAllOf.declawed); - } - - @Override - public int hashCode() { - return Objects.hash(declawed); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CatAllOf {\n"); - sb.append(" declawed: ").append(toIndentedString(declawed)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/Category.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/Category.java deleted file mode 100644 index 4d07c3a1bef..00000000000 --- a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/Category.java +++ /dev/null @@ -1,127 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; - -/** - * Category - */ - -public class Category { - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private Long id; - - public static final String SERIALIZED_NAME_NAME = "name"; - @SerializedName(SERIALIZED_NAME_NAME) - private String name = "default-name"; - - - public Category id(Long id) { - - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public Long getId() { - return id; - } - - - public void setId(Long id) { - this.id = id; - } - - - public Category name(String name) { - - this.name = name; - return this; - } - - /** - * Get name - * @return name - **/ - @ApiModelProperty(required = true, value = "") - - public String getName() { - return name; - } - - - public void setName(String name) { - this.name = name; - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Category category = (Category) o; - return Objects.equals(this.id, category.id) && - Objects.equals(this.name, category.name); - } - - @Override - public int hashCode() { - return Objects.hash(id, name); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Category {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/ClassModel.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/ClassModel.java deleted file mode 100644 index 8867bdd06bf..00000000000 --- a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/ClassModel.java +++ /dev/null @@ -1,100 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; - -/** - * Model for testing model with \"_class\" property - */ -@ApiModel(description = "Model for testing model with \"_class\" property") - -public class ClassModel { - public static final String SERIALIZED_NAME_PROPERTY_CLASS = "_class"; - @SerializedName(SERIALIZED_NAME_PROPERTY_CLASS) - private String propertyClass; - - - public ClassModel propertyClass(String propertyClass) { - - this.propertyClass = propertyClass; - return this; - } - - /** - * Get propertyClass - * @return propertyClass - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public String getPropertyClass() { - return propertyClass; - } - - - public void setPropertyClass(String propertyClass) { - this.propertyClass = propertyClass; - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ClassModel classModel = (ClassModel) o; - return Objects.equals(this.propertyClass, classModel.propertyClass); - } - - @Override - public int hashCode() { - return Objects.hash(propertyClass); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ClassModel {\n"); - sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/Client.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/Client.java deleted file mode 100644 index 25831260e09..00000000000 --- a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/Client.java +++ /dev/null @@ -1,99 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; - -/** - * Client - */ - -public class Client { - public static final String SERIALIZED_NAME_CLIENT = "client"; - @SerializedName(SERIALIZED_NAME_CLIENT) - private String client; - - - public Client client(String client) { - - this.client = client; - return this; - } - - /** - * Get client - * @return client - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public String getClient() { - return client; - } - - - public void setClient(String client) { - this.client = client; - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Client client = (Client) o; - return Objects.equals(this.client, client.client); - } - - @Override - public int hashCode() { - return Objects.hash(client); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Client {\n"); - sb.append(" client: ").append(toIndentedString(client)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/Dog.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/Dog.java deleted file mode 100644 index f80bc1ab8dc..00000000000 --- a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/Dog.java +++ /dev/null @@ -1,107 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; -import org.openapitools.client.model.Animal; -import org.openapitools.client.model.DogAllOf; - -/** - * Dog - */ - - -public class Dog extends Animal { - public static final String SERIALIZED_NAME_BREED = "breed"; - @SerializedName(SERIALIZED_NAME_BREED) - private String breed; - - public Dog() { - this.className = this.getClass().getSimpleName(); - } - - public Dog breed(String breed) { - - this.breed = breed; - return this; - } - - /** - * Get breed - * @return breed - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public String getBreed() { - return breed; - } - - - public void setBreed(String breed) { - this.breed = breed; - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Dog dog = (Dog) o; - return Objects.equals(this.breed, dog.breed) && - super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(breed, super.hashCode()); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Dog {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" breed: ").append(toIndentedString(breed)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/DogAllOf.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/DogAllOf.java deleted file mode 100644 index b945c2c33db..00000000000 --- a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/DogAllOf.java +++ /dev/null @@ -1,99 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; - -/** - * DogAllOf - */ - -public class DogAllOf { - public static final String SERIALIZED_NAME_BREED = "breed"; - @SerializedName(SERIALIZED_NAME_BREED) - private String breed; - - - public DogAllOf breed(String breed) { - - this.breed = breed; - return this; - } - - /** - * Get breed - * @return breed - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public String getBreed() { - return breed; - } - - - public void setBreed(String breed) { - this.breed = breed; - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DogAllOf dogAllOf = (DogAllOf) o; - return Objects.equals(this.breed, dogAllOf.breed); - } - - @Override - public int hashCode() { - return Objects.hash(breed); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DogAllOf {\n"); - sb.append(" breed: ").append(toIndentedString(breed)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/EnumArrays.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/EnumArrays.java deleted file mode 100644 index 2512b4cf9d5..00000000000 --- a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/EnumArrays.java +++ /dev/null @@ -1,232 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; - -/** - * EnumArrays - */ - -public class EnumArrays { - /** - * Gets or Sets justSymbol - */ - @JsonAdapter(JustSymbolEnum.Adapter.class) - public enum JustSymbolEnum { - GREATER_THAN_OR_EQUAL_TO(">="), - - DOLLAR("$"); - - private String value; - - JustSymbolEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static JustSymbolEnum fromValue(String value) { - for (JustSymbolEnum b : JustSymbolEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final JustSymbolEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public JustSymbolEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return JustSymbolEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_JUST_SYMBOL = "just_symbol"; - @SerializedName(SERIALIZED_NAME_JUST_SYMBOL) - private JustSymbolEnum justSymbol; - - /** - * Gets or Sets arrayEnum - */ - @JsonAdapter(ArrayEnumEnum.Adapter.class) - public enum ArrayEnumEnum { - FISH("fish"), - - CRAB("crab"); - - private String value; - - ArrayEnumEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static ArrayEnumEnum fromValue(String value) { - for (ArrayEnumEnum b : ArrayEnumEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final ArrayEnumEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public ArrayEnumEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return ArrayEnumEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_ARRAY_ENUM = "array_enum"; - @SerializedName(SERIALIZED_NAME_ARRAY_ENUM) - private List arrayEnum = null; - - - public EnumArrays justSymbol(JustSymbolEnum justSymbol) { - - this.justSymbol = justSymbol; - return this; - } - - /** - * Get justSymbol - * @return justSymbol - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public JustSymbolEnum getJustSymbol() { - return justSymbol; - } - - - public void setJustSymbol(JustSymbolEnum justSymbol) { - this.justSymbol = justSymbol; - } - - - public EnumArrays arrayEnum(List arrayEnum) { - - this.arrayEnum = arrayEnum; - return this; - } - - public EnumArrays addArrayEnumItem(ArrayEnumEnum arrayEnumItem) { - if (this.arrayEnum == null) { - this.arrayEnum = new ArrayList(); - } - this.arrayEnum.add(arrayEnumItem); - return this; - } - - /** - * Get arrayEnum - * @return arrayEnum - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public List getArrayEnum() { - return arrayEnum; - } - - - public void setArrayEnum(List arrayEnum) { - this.arrayEnum = arrayEnum; - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - EnumArrays enumArrays = (EnumArrays) o; - return Objects.equals(this.justSymbol, enumArrays.justSymbol) && - Objects.equals(this.arrayEnum, enumArrays.arrayEnum); - } - - @Override - public int hashCode() { - return Objects.hash(justSymbol, arrayEnum); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class EnumArrays {\n"); - sb.append(" justSymbol: ").append(toIndentedString(justSymbol)).append("\n"); - sb.append(" arrayEnum: ").append(toIndentedString(arrayEnum)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/EnumClass.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/EnumClass.java deleted file mode 100644 index b9a78241a5a..00000000000 --- a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/EnumClass.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.google.gson.annotations.SerializedName; - -import java.io.IOException; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; - -/** - * Gets or Sets EnumClass - */ -@JsonAdapter(EnumClass.Adapter.class) -public enum EnumClass { - - _ABC("_abc"), - - _EFG("-efg"), - - _XYZ_("(xyz)"); - - private String value; - - EnumClass(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static EnumClass fromValue(String value) { - for (EnumClass b : EnumClass.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final EnumClass enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public EnumClass read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return EnumClass.fromValue(value); - } - } -} - diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/EnumTest.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/EnumTest.java deleted file mode 100644 index ccbbabaa9ba..00000000000 --- a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/EnumTest.java +++ /dev/null @@ -1,407 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; -import org.openapitools.client.model.OuterEnum; - -/** - * EnumTest - */ - -public class EnumTest { - /** - * Gets or Sets enumString - */ - @JsonAdapter(EnumStringEnum.Adapter.class) - public enum EnumStringEnum { - UPPER("UPPER"), - - LOWER("lower"), - - EMPTY(""); - - private String value; - - EnumStringEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static EnumStringEnum fromValue(String value) { - for (EnumStringEnum b : EnumStringEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final EnumStringEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public EnumStringEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return EnumStringEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_ENUM_STRING = "enum_string"; - @SerializedName(SERIALIZED_NAME_ENUM_STRING) - private EnumStringEnum enumString; - - /** - * Gets or Sets enumStringRequired - */ - @JsonAdapter(EnumStringRequiredEnum.Adapter.class) - public enum EnumStringRequiredEnum { - UPPER("UPPER"), - - LOWER("lower"), - - EMPTY(""); - - private String value; - - EnumStringRequiredEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static EnumStringRequiredEnum fromValue(String value) { - for (EnumStringRequiredEnum b : EnumStringRequiredEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final EnumStringRequiredEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public EnumStringRequiredEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return EnumStringRequiredEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_ENUM_STRING_REQUIRED = "enum_string_required"; - @SerializedName(SERIALIZED_NAME_ENUM_STRING_REQUIRED) - private EnumStringRequiredEnum enumStringRequired; - - /** - * Gets or Sets enumInteger - */ - @JsonAdapter(EnumIntegerEnum.Adapter.class) - public enum EnumIntegerEnum { - NUMBER_1(1), - - NUMBER_MINUS_1(-1); - - private Integer value; - - EnumIntegerEnum(Integer value) { - this.value = value; - } - - public Integer getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static EnumIntegerEnum fromValue(Integer value) { - for (EnumIntegerEnum b : EnumIntegerEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final EnumIntegerEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public EnumIntegerEnum read(final JsonReader jsonReader) throws IOException { - Integer value = jsonReader.nextInt(); - return EnumIntegerEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_ENUM_INTEGER = "enum_integer"; - @SerializedName(SERIALIZED_NAME_ENUM_INTEGER) - private EnumIntegerEnum enumInteger; - - /** - * Gets or Sets enumNumber - */ - @JsonAdapter(EnumNumberEnum.Adapter.class) - public enum EnumNumberEnum { - NUMBER_1_DOT_1(1.1), - - NUMBER_MINUS_1_DOT_2(-1.2); - - private Double value; - - EnumNumberEnum(Double value) { - this.value = value; - } - - public Double getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static EnumNumberEnum fromValue(Double value) { - for (EnumNumberEnum b : EnumNumberEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final EnumNumberEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public EnumNumberEnum read(final JsonReader jsonReader) throws IOException { - Double value = jsonReader.nextDouble(); - return EnumNumberEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_ENUM_NUMBER = "enum_number"; - @SerializedName(SERIALIZED_NAME_ENUM_NUMBER) - private EnumNumberEnum enumNumber; - - public static final String SERIALIZED_NAME_OUTER_ENUM = "outerEnum"; - @SerializedName(SERIALIZED_NAME_OUTER_ENUM) - private OuterEnum outerEnum; - - - public EnumTest enumString(EnumStringEnum enumString) { - - this.enumString = enumString; - return this; - } - - /** - * Get enumString - * @return enumString - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public EnumStringEnum getEnumString() { - return enumString; - } - - - public void setEnumString(EnumStringEnum enumString) { - this.enumString = enumString; - } - - - public EnumTest enumStringRequired(EnumStringRequiredEnum enumStringRequired) { - - this.enumStringRequired = enumStringRequired; - return this; - } - - /** - * Get enumStringRequired - * @return enumStringRequired - **/ - @ApiModelProperty(required = true, value = "") - - public EnumStringRequiredEnum getEnumStringRequired() { - return enumStringRequired; - } - - - public void setEnumStringRequired(EnumStringRequiredEnum enumStringRequired) { - this.enumStringRequired = enumStringRequired; - } - - - public EnumTest enumInteger(EnumIntegerEnum enumInteger) { - - this.enumInteger = enumInteger; - return this; - } - - /** - * Get enumInteger - * @return enumInteger - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public EnumIntegerEnum getEnumInteger() { - return enumInteger; - } - - - public void setEnumInteger(EnumIntegerEnum enumInteger) { - this.enumInteger = enumInteger; - } - - - public EnumTest enumNumber(EnumNumberEnum enumNumber) { - - this.enumNumber = enumNumber; - return this; - } - - /** - * Get enumNumber - * @return enumNumber - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public EnumNumberEnum getEnumNumber() { - return enumNumber; - } - - - public void setEnumNumber(EnumNumberEnum enumNumber) { - this.enumNumber = enumNumber; - } - - - public EnumTest outerEnum(OuterEnum outerEnum) { - - this.outerEnum = outerEnum; - return this; - } - - /** - * Get outerEnum - * @return outerEnum - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public OuterEnum getOuterEnum() { - return outerEnum; - } - - - public void setOuterEnum(OuterEnum outerEnum) { - this.outerEnum = outerEnum; - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - EnumTest enumTest = (EnumTest) o; - return Objects.equals(this.enumString, enumTest.enumString) && - Objects.equals(this.enumStringRequired, enumTest.enumStringRequired) && - Objects.equals(this.enumInteger, enumTest.enumInteger) && - Objects.equals(this.enumNumber, enumTest.enumNumber) && - Objects.equals(this.outerEnum, enumTest.outerEnum); - } - - @Override - public int hashCode() { - return Objects.hash(enumString, enumStringRequired, enumInteger, enumNumber, outerEnum); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class EnumTest {\n"); - sb.append(" enumString: ").append(toIndentedString(enumString)).append("\n"); - sb.append(" enumStringRequired: ").append(toIndentedString(enumStringRequired)).append("\n"); - sb.append(" enumInteger: ").append(toIndentedString(enumInteger)).append("\n"); - sb.append(" enumNumber: ").append(toIndentedString(enumNumber)).append("\n"); - sb.append(" outerEnum: ").append(toIndentedString(outerEnum)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java deleted file mode 100644 index f4a15cd5b7f..00000000000 --- a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java +++ /dev/null @@ -1,138 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; - -/** - * FileSchemaTestClass - */ - -public class FileSchemaTestClass { - public static final String SERIALIZED_NAME_FILE = "file"; - @SerializedName(SERIALIZED_NAME_FILE) - private java.io.File file; - - public static final String SERIALIZED_NAME_FILES = "files"; - @SerializedName(SERIALIZED_NAME_FILES) - private List files = null; - - - public FileSchemaTestClass file(java.io.File file) { - - this.file = file; - return this; - } - - /** - * Get file - * @return file - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public java.io.File getFile() { - return file; - } - - - public void setFile(java.io.File file) { - this.file = file; - } - - - public FileSchemaTestClass files(List files) { - - this.files = files; - return this; - } - - public FileSchemaTestClass addFilesItem(java.io.File filesItem) { - if (this.files == null) { - this.files = new ArrayList(); - } - this.files.add(filesItem); - return this; - } - - /** - * Get files - * @return files - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public List getFiles() { - return files; - } - - - public void setFiles(List files) { - this.files = files; - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - FileSchemaTestClass fileSchemaTestClass = (FileSchemaTestClass) o; - return Objects.equals(this.file, fileSchemaTestClass.file) && - Objects.equals(this.files, fileSchemaTestClass.files); - } - - @Override - public int hashCode() { - return Objects.hash(file, files); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class FileSchemaTestClass {\n"); - sb.append(" file: ").append(toIndentedString(file)).append("\n"); - sb.append(" files: ").append(toIndentedString(files)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/FormatTest.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/FormatTest.java deleted file mode 100644 index cca2d4b5f2c..00000000000 --- a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/FormatTest.java +++ /dev/null @@ -1,487 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.File; -import java.io.IOException; -import java.math.BigDecimal; -import java.util.UUID; -import org.joda.time.DateTime; -import org.joda.time.LocalDate; - -/** - * FormatTest - */ - -public class FormatTest { - public static final String SERIALIZED_NAME_INTEGER = "integer"; - @SerializedName(SERIALIZED_NAME_INTEGER) - private Integer integer; - - public static final String SERIALIZED_NAME_INT32 = "int32"; - @SerializedName(SERIALIZED_NAME_INT32) - private Integer int32; - - public static final String SERIALIZED_NAME_INT64 = "int64"; - @SerializedName(SERIALIZED_NAME_INT64) - private Long int64; - - public static final String SERIALIZED_NAME_NUMBER = "number"; - @SerializedName(SERIALIZED_NAME_NUMBER) - private BigDecimal number; - - public static final String SERIALIZED_NAME_FLOAT = "float"; - @SerializedName(SERIALIZED_NAME_FLOAT) - private Float _float; - - public static final String SERIALIZED_NAME_DOUBLE = "double"; - @SerializedName(SERIALIZED_NAME_DOUBLE) - private Double _double; - - public static final String SERIALIZED_NAME_STRING = "string"; - @SerializedName(SERIALIZED_NAME_STRING) - private String string; - - public static final String SERIALIZED_NAME_BYTE = "byte"; - @SerializedName(SERIALIZED_NAME_BYTE) - private byte[] _byte; - - public static final String SERIALIZED_NAME_BINARY = "binary"; - @SerializedName(SERIALIZED_NAME_BINARY) - private File binary; - - public static final String SERIALIZED_NAME_DATE = "date"; - @SerializedName(SERIALIZED_NAME_DATE) - private LocalDate date; - - public static final String SERIALIZED_NAME_DATE_TIME = "dateTime"; - @SerializedName(SERIALIZED_NAME_DATE_TIME) - private DateTime dateTime; - - public static final String SERIALIZED_NAME_UUID = "uuid"; - @SerializedName(SERIALIZED_NAME_UUID) - private UUID uuid; - - public static final String SERIALIZED_NAME_PASSWORD = "password"; - @SerializedName(SERIALIZED_NAME_PASSWORD) - private String password; - - public static final String SERIALIZED_NAME_BIG_DECIMAL = "BigDecimal"; - @SerializedName(SERIALIZED_NAME_BIG_DECIMAL) - private BigDecimal bigDecimal; - - - public FormatTest integer(Integer integer) { - - this.integer = integer; - return this; - } - - /** - * Get integer - * minimum: 10 - * maximum: 100 - * @return integer - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public Integer getInteger() { - return integer; - } - - - public void setInteger(Integer integer) { - this.integer = integer; - } - - - public FormatTest int32(Integer int32) { - - this.int32 = int32; - return this; - } - - /** - * Get int32 - * minimum: 20 - * maximum: 200 - * @return int32 - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public Integer getInt32() { - return int32; - } - - - public void setInt32(Integer int32) { - this.int32 = int32; - } - - - public FormatTest int64(Long int64) { - - this.int64 = int64; - return this; - } - - /** - * Get int64 - * @return int64 - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public Long getInt64() { - return int64; - } - - - public void setInt64(Long int64) { - this.int64 = int64; - } - - - public FormatTest number(BigDecimal number) { - - this.number = number; - return this; - } - - /** - * Get number - * minimum: 32.1 - * maximum: 543.2 - * @return number - **/ - @ApiModelProperty(required = true, value = "") - - public BigDecimal getNumber() { - return number; - } - - - public void setNumber(BigDecimal number) { - this.number = number; - } - - - public FormatTest _float(Float _float) { - - this._float = _float; - return this; - } - - /** - * Get _float - * minimum: 54.3 - * maximum: 987.6 - * @return _float - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public Float getFloat() { - return _float; - } - - - public void setFloat(Float _float) { - this._float = _float; - } - - - public FormatTest _double(Double _double) { - - this._double = _double; - return this; - } - - /** - * Get _double - * minimum: 67.8 - * maximum: 123.4 - * @return _double - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public Double getDouble() { - return _double; - } - - - public void setDouble(Double _double) { - this._double = _double; - } - - - public FormatTest string(String string) { - - this.string = string; - return this; - } - - /** - * Get string - * @return string - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public String getString() { - return string; - } - - - public void setString(String string) { - this.string = string; - } - - - public FormatTest _byte(byte[] _byte) { - - this._byte = _byte; - return this; - } - - /** - * Get _byte - * @return _byte - **/ - @ApiModelProperty(required = true, value = "") - - public byte[] getByte() { - return _byte; - } - - - public void setByte(byte[] _byte) { - this._byte = _byte; - } - - - public FormatTest binary(File binary) { - - this.binary = binary; - return this; - } - - /** - * Get binary - * @return binary - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public File getBinary() { - return binary; - } - - - public void setBinary(File binary) { - this.binary = binary; - } - - - public FormatTest date(LocalDate date) { - - this.date = date; - return this; - } - - /** - * Get date - * @return date - **/ - @ApiModelProperty(required = true, value = "") - - public LocalDate getDate() { - return date; - } - - - public void setDate(LocalDate date) { - this.date = date; - } - - - public FormatTest dateTime(DateTime dateTime) { - - this.dateTime = dateTime; - return this; - } - - /** - * Get dateTime - * @return dateTime - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public DateTime getDateTime() { - return dateTime; - } - - - public void setDateTime(DateTime dateTime) { - this.dateTime = dateTime; - } - - - public FormatTest uuid(UUID uuid) { - - this.uuid = uuid; - return this; - } - - /** - * Get uuid - * @return uuid - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "72f98069-206d-4f12-9f12-3d1e525a8e84", value = "") - - public UUID getUuid() { - return uuid; - } - - - public void setUuid(UUID uuid) { - this.uuid = uuid; - } - - - public FormatTest password(String password) { - - this.password = password; - return this; - } - - /** - * Get password - * @return password - **/ - @ApiModelProperty(required = true, value = "") - - public String getPassword() { - return password; - } - - - public void setPassword(String password) { - this.password = password; - } - - - public FormatTest bigDecimal(BigDecimal bigDecimal) { - - this.bigDecimal = bigDecimal; - return this; - } - - /** - * Get bigDecimal - * @return bigDecimal - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public BigDecimal getBigDecimal() { - return bigDecimal; - } - - - public void setBigDecimal(BigDecimal bigDecimal) { - this.bigDecimal = bigDecimal; - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - FormatTest formatTest = (FormatTest) o; - return Objects.equals(this.integer, formatTest.integer) && - Objects.equals(this.int32, formatTest.int32) && - Objects.equals(this.int64, formatTest.int64) && - Objects.equals(this.number, formatTest.number) && - Objects.equals(this._float, formatTest._float) && - Objects.equals(this._double, formatTest._double) && - Objects.equals(this.string, formatTest.string) && - Arrays.equals(this._byte, formatTest._byte) && - Objects.equals(this.binary, formatTest.binary) && - Objects.equals(this.date, formatTest.date) && - Objects.equals(this.dateTime, formatTest.dateTime) && - Objects.equals(this.uuid, formatTest.uuid) && - Objects.equals(this.password, formatTest.password) && - Objects.equals(this.bigDecimal, formatTest.bigDecimal); - } - - @Override - public int hashCode() { - return Objects.hash(integer, int32, int64, number, _float, _double, string, Arrays.hashCode(_byte), binary, date, dateTime, uuid, password, bigDecimal); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class FormatTest {\n"); - sb.append(" integer: ").append(toIndentedString(integer)).append("\n"); - sb.append(" int32: ").append(toIndentedString(int32)).append("\n"); - sb.append(" int64: ").append(toIndentedString(int64)).append("\n"); - sb.append(" number: ").append(toIndentedString(number)).append("\n"); - sb.append(" _float: ").append(toIndentedString(_float)).append("\n"); - sb.append(" _double: ").append(toIndentedString(_double)).append("\n"); - sb.append(" string: ").append(toIndentedString(string)).append("\n"); - sb.append(" _byte: ").append(toIndentedString(_byte)).append("\n"); - sb.append(" binary: ").append(toIndentedString(binary)).append("\n"); - sb.append(" date: ").append(toIndentedString(date)).append("\n"); - sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n"); - sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); - sb.append(" password: ").append(toIndentedString(password)).append("\n"); - sb.append(" bigDecimal: ").append(toIndentedString(bigDecimal)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java deleted file mode 100644 index 8fcb2684643..00000000000 --- a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java +++ /dev/null @@ -1,110 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; - -/** - * HasOnlyReadOnly - */ - -public class HasOnlyReadOnly { - public static final String SERIALIZED_NAME_BAR = "bar"; - @SerializedName(SERIALIZED_NAME_BAR) - private String bar; - - public static final String SERIALIZED_NAME_FOO = "foo"; - @SerializedName(SERIALIZED_NAME_FOO) - private String foo; - - - /** - * Get bar - * @return bar - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public String getBar() { - return bar; - } - - - - - /** - * Get foo - * @return foo - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public String getFoo() { - return foo; - } - - - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - HasOnlyReadOnly hasOnlyReadOnly = (HasOnlyReadOnly) o; - return Objects.equals(this.bar, hasOnlyReadOnly.bar) && - Objects.equals(this.foo, hasOnlyReadOnly.foo); - } - - @Override - public int hashCode() { - return Objects.hash(bar, foo); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class HasOnlyReadOnly {\n"); - sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); - sb.append(" foo: ").append(toIndentedString(foo)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/MapTest.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/MapTest.java deleted file mode 100644 index 7dc68b0ff00..00000000000 --- a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/MapTest.java +++ /dev/null @@ -1,268 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * MapTest - */ - -public class MapTest { - public static final String SERIALIZED_NAME_MAP_MAP_OF_STRING = "map_map_of_string"; - @SerializedName(SERIALIZED_NAME_MAP_MAP_OF_STRING) - private Map> mapMapOfString = null; - - /** - * Gets or Sets inner - */ - @JsonAdapter(InnerEnum.Adapter.class) - public enum InnerEnum { - UPPER("UPPER"), - - LOWER("lower"); - - private String value; - - InnerEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static InnerEnum fromValue(String value) { - for (InnerEnum b : InnerEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final InnerEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public InnerEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return InnerEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_MAP_OF_ENUM_STRING = "map_of_enum_string"; - @SerializedName(SERIALIZED_NAME_MAP_OF_ENUM_STRING) - private Map mapOfEnumString = null; - - public static final String SERIALIZED_NAME_DIRECT_MAP = "direct_map"; - @SerializedName(SERIALIZED_NAME_DIRECT_MAP) - private Map directMap = null; - - public static final String SERIALIZED_NAME_INDIRECT_MAP = "indirect_map"; - @SerializedName(SERIALIZED_NAME_INDIRECT_MAP) - private Map indirectMap = null; - - - public MapTest mapMapOfString(Map> mapMapOfString) { - - this.mapMapOfString = mapMapOfString; - return this; - } - - public MapTest putMapMapOfStringItem(String key, Map mapMapOfStringItem) { - if (this.mapMapOfString == null) { - this.mapMapOfString = new HashMap>(); - } - this.mapMapOfString.put(key, mapMapOfStringItem); - return this; - } - - /** - * Get mapMapOfString - * @return mapMapOfString - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public Map> getMapMapOfString() { - return mapMapOfString; - } - - - public void setMapMapOfString(Map> mapMapOfString) { - this.mapMapOfString = mapMapOfString; - } - - - public MapTest mapOfEnumString(Map mapOfEnumString) { - - this.mapOfEnumString = mapOfEnumString; - return this; - } - - public MapTest putMapOfEnumStringItem(String key, InnerEnum mapOfEnumStringItem) { - if (this.mapOfEnumString == null) { - this.mapOfEnumString = new HashMap(); - } - this.mapOfEnumString.put(key, mapOfEnumStringItem); - return this; - } - - /** - * Get mapOfEnumString - * @return mapOfEnumString - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public Map getMapOfEnumString() { - return mapOfEnumString; - } - - - public void setMapOfEnumString(Map mapOfEnumString) { - this.mapOfEnumString = mapOfEnumString; - } - - - public MapTest directMap(Map directMap) { - - this.directMap = directMap; - return this; - } - - public MapTest putDirectMapItem(String key, Boolean directMapItem) { - if (this.directMap == null) { - this.directMap = new HashMap(); - } - this.directMap.put(key, directMapItem); - return this; - } - - /** - * Get directMap - * @return directMap - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public Map getDirectMap() { - return directMap; - } - - - public void setDirectMap(Map directMap) { - this.directMap = directMap; - } - - - public MapTest indirectMap(Map indirectMap) { - - this.indirectMap = indirectMap; - return this; - } - - public MapTest putIndirectMapItem(String key, Boolean indirectMapItem) { - if (this.indirectMap == null) { - this.indirectMap = new HashMap(); - } - this.indirectMap.put(key, indirectMapItem); - return this; - } - - /** - * Get indirectMap - * @return indirectMap - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public Map getIndirectMap() { - return indirectMap; - } - - - public void setIndirectMap(Map indirectMap) { - this.indirectMap = indirectMap; - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - MapTest mapTest = (MapTest) o; - return Objects.equals(this.mapMapOfString, mapTest.mapMapOfString) && - Objects.equals(this.mapOfEnumString, mapTest.mapOfEnumString) && - Objects.equals(this.directMap, mapTest.directMap) && - Objects.equals(this.indirectMap, mapTest.indirectMap); - } - - @Override - public int hashCode() { - return Objects.hash(mapMapOfString, mapOfEnumString, directMap, indirectMap); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class MapTest {\n"); - sb.append(" mapMapOfString: ").append(toIndentedString(mapMapOfString)).append("\n"); - sb.append(" mapOfEnumString: ").append(toIndentedString(mapOfEnumString)).append("\n"); - sb.append(" directMap: ").append(toIndentedString(directMap)).append("\n"); - sb.append(" indirectMap: ").append(toIndentedString(indirectMap)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java deleted file mode 100644 index 98860282e77..00000000000 --- a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ /dev/null @@ -1,171 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.UUID; -import org.joda.time.DateTime; -import org.openapitools.client.model.Animal; - -/** - * MixedPropertiesAndAdditionalPropertiesClass - */ - -public class MixedPropertiesAndAdditionalPropertiesClass { - public static final String SERIALIZED_NAME_UUID = "uuid"; - @SerializedName(SERIALIZED_NAME_UUID) - private UUID uuid; - - public static final String SERIALIZED_NAME_DATE_TIME = "dateTime"; - @SerializedName(SERIALIZED_NAME_DATE_TIME) - private DateTime dateTime; - - public static final String SERIALIZED_NAME_MAP = "map"; - @SerializedName(SERIALIZED_NAME_MAP) - private Map map = null; - - - public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) { - - this.uuid = uuid; - return this; - } - - /** - * Get uuid - * @return uuid - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public UUID getUuid() { - return uuid; - } - - - public void setUuid(UUID uuid) { - this.uuid = uuid; - } - - - public MixedPropertiesAndAdditionalPropertiesClass dateTime(DateTime dateTime) { - - this.dateTime = dateTime; - return this; - } - - /** - * Get dateTime - * @return dateTime - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public DateTime getDateTime() { - return dateTime; - } - - - public void setDateTime(DateTime dateTime) { - this.dateTime = dateTime; - } - - - public MixedPropertiesAndAdditionalPropertiesClass map(Map map) { - - this.map = map; - return this; - } - - public MixedPropertiesAndAdditionalPropertiesClass putMapItem(String key, Animal mapItem) { - if (this.map == null) { - this.map = new HashMap(); - } - this.map.put(key, mapItem); - return this; - } - - /** - * Get map - * @return map - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public Map getMap() { - return map; - } - - - public void setMap(Map map) { - this.map = map; - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - MixedPropertiesAndAdditionalPropertiesClass mixedPropertiesAndAdditionalPropertiesClass = (MixedPropertiesAndAdditionalPropertiesClass) o; - return Objects.equals(this.uuid, mixedPropertiesAndAdditionalPropertiesClass.uuid) && - Objects.equals(this.dateTime, mixedPropertiesAndAdditionalPropertiesClass.dateTime) && - Objects.equals(this.map, mixedPropertiesAndAdditionalPropertiesClass.map); - } - - @Override - public int hashCode() { - return Objects.hash(uuid, dateTime, map); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class MixedPropertiesAndAdditionalPropertiesClass {\n"); - sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); - sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n"); - sb.append(" map: ").append(toIndentedString(map)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/Model200Response.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/Model200Response.java deleted file mode 100644 index df3683dac78..00000000000 --- a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/Model200Response.java +++ /dev/null @@ -1,129 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; - -/** - * Model for testing model name starting with number - */ -@ApiModel(description = "Model for testing model name starting with number") - -public class Model200Response { - public static final String SERIALIZED_NAME_NAME = "name"; - @SerializedName(SERIALIZED_NAME_NAME) - private Integer name; - - public static final String SERIALIZED_NAME_PROPERTY_CLASS = "class"; - @SerializedName(SERIALIZED_NAME_PROPERTY_CLASS) - private String propertyClass; - - - public Model200Response name(Integer name) { - - this.name = name; - return this; - } - - /** - * Get name - * @return name - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public Integer getName() { - return name; - } - - - public void setName(Integer name) { - this.name = name; - } - - - public Model200Response propertyClass(String propertyClass) { - - this.propertyClass = propertyClass; - return this; - } - - /** - * Get propertyClass - * @return propertyClass - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public String getPropertyClass() { - return propertyClass; - } - - - public void setPropertyClass(String propertyClass) { - this.propertyClass = propertyClass; - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Model200Response _200response = (Model200Response) o; - return Objects.equals(this.name, _200response.name) && - Objects.equals(this.propertyClass, _200response.propertyClass); - } - - @Override - public int hashCode() { - return Objects.hash(name, propertyClass); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Model200Response {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/ModelApiResponse.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/ModelApiResponse.java deleted file mode 100644 index b9cf72823b2..00000000000 --- a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/ModelApiResponse.java +++ /dev/null @@ -1,157 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; - -/** - * ModelApiResponse - */ - -public class ModelApiResponse { - public static final String SERIALIZED_NAME_CODE = "code"; - @SerializedName(SERIALIZED_NAME_CODE) - private Integer code; - - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private String type; - - public static final String SERIALIZED_NAME_MESSAGE = "message"; - @SerializedName(SERIALIZED_NAME_MESSAGE) - private String message; - - - public ModelApiResponse code(Integer code) { - - this.code = code; - return this; - } - - /** - * Get code - * @return code - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public Integer getCode() { - return code; - } - - - public void setCode(Integer code) { - this.code = code; - } - - - public ModelApiResponse type(String type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public String getType() { - return type; - } - - - public void setType(String type) { - this.type = type; - } - - - public ModelApiResponse message(String message) { - - this.message = message; - return this; - } - - /** - * Get message - * @return message - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public String getMessage() { - return message; - } - - - public void setMessage(String message) { - this.message = message; - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ModelApiResponse _apiResponse = (ModelApiResponse) o; - return Objects.equals(this.code, _apiResponse.code) && - Objects.equals(this.type, _apiResponse.type) && - Objects.equals(this.message, _apiResponse.message); - } - - @Override - public int hashCode() { - return Objects.hash(code, type, message); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ModelApiResponse {\n"); - sb.append(" code: ").append(toIndentedString(code)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" message: ").append(toIndentedString(message)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/ModelReturn.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/ModelReturn.java deleted file mode 100644 index 6e9714df977..00000000000 --- a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/ModelReturn.java +++ /dev/null @@ -1,100 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; - -/** - * Model for testing reserved words - */ -@ApiModel(description = "Model for testing reserved words") - -public class ModelReturn { - public static final String SERIALIZED_NAME_RETURN = "return"; - @SerializedName(SERIALIZED_NAME_RETURN) - private Integer _return; - - - public ModelReturn _return(Integer _return) { - - this._return = _return; - return this; - } - - /** - * Get _return - * @return _return - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public Integer getReturn() { - return _return; - } - - - public void setReturn(Integer _return) { - this._return = _return; - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ModelReturn _return = (ModelReturn) o; - return Objects.equals(this._return, _return._return); - } - - @Override - public int hashCode() { - return Objects.hash(_return); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ModelReturn {\n"); - sb.append(" _return: ").append(toIndentedString(_return)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/Name.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/Name.java deleted file mode 100644 index 94117a9b0f4..00000000000 --- a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/Name.java +++ /dev/null @@ -1,168 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; - -/** - * Model for testing model name same as property name - */ -@ApiModel(description = "Model for testing model name same as property name") - -public class Name { - public static final String SERIALIZED_NAME_NAME = "name"; - @SerializedName(SERIALIZED_NAME_NAME) - private Integer name; - - public static final String SERIALIZED_NAME_SNAKE_CASE = "snake_case"; - @SerializedName(SERIALIZED_NAME_SNAKE_CASE) - private Integer snakeCase; - - public static final String SERIALIZED_NAME_PROPERTY = "property"; - @SerializedName(SERIALIZED_NAME_PROPERTY) - private String property; - - public static final String SERIALIZED_NAME_123NUMBER = "123Number"; - @SerializedName(SERIALIZED_NAME_123NUMBER) - private Integer _123number; - - - public Name name(Integer name) { - - this.name = name; - return this; - } - - /** - * Get name - * @return name - **/ - @ApiModelProperty(required = true, value = "") - - public Integer getName() { - return name; - } - - - public void setName(Integer name) { - this.name = name; - } - - - /** - * Get snakeCase - * @return snakeCase - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public Integer getSnakeCase() { - return snakeCase; - } - - - - - public Name property(String property) { - - this.property = property; - return this; - } - - /** - * Get property - * @return property - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public String getProperty() { - return property; - } - - - public void setProperty(String property) { - this.property = property; - } - - - /** - * Get _123number - * @return _123number - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public Integer get123number() { - return _123number; - } - - - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Name name = (Name) o; - return Objects.equals(this.name, name.name) && - Objects.equals(this.snakeCase, name.snakeCase) && - Objects.equals(this.property, name.property) && - Objects.equals(this._123number, name._123number); - } - - @Override - public int hashCode() { - return Objects.hash(name, snakeCase, property, _123number); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Name {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" snakeCase: ").append(toIndentedString(snakeCase)).append("\n"); - sb.append(" property: ").append(toIndentedString(property)).append("\n"); - sb.append(" _123number: ").append(toIndentedString(_123number)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/NumberOnly.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/NumberOnly.java deleted file mode 100644 index 9a55d8aa615..00000000000 --- a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/NumberOnly.java +++ /dev/null @@ -1,100 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; -import java.math.BigDecimal; - -/** - * NumberOnly - */ - -public class NumberOnly { - public static final String SERIALIZED_NAME_JUST_NUMBER = "JustNumber"; - @SerializedName(SERIALIZED_NAME_JUST_NUMBER) - private BigDecimal justNumber; - - - public NumberOnly justNumber(BigDecimal justNumber) { - - this.justNumber = justNumber; - return this; - } - - /** - * Get justNumber - * @return justNumber - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public BigDecimal getJustNumber() { - return justNumber; - } - - - public void setJustNumber(BigDecimal justNumber) { - this.justNumber = justNumber; - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - NumberOnly numberOnly = (NumberOnly) o; - return Objects.equals(this.justNumber, numberOnly.justNumber); - } - - @Override - public int hashCode() { - return Objects.hash(justNumber); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class NumberOnly {\n"); - sb.append(" justNumber: ").append(toIndentedString(justNumber)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/Order.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/Order.java deleted file mode 100644 index c759e28d5ea..00000000000 --- a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/Order.java +++ /dev/null @@ -1,294 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; -import org.joda.time.DateTime; - -/** - * Order - */ - -public class Order { - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private Long id; - - public static final String SERIALIZED_NAME_PET_ID = "petId"; - @SerializedName(SERIALIZED_NAME_PET_ID) - private Long petId; - - public static final String SERIALIZED_NAME_QUANTITY = "quantity"; - @SerializedName(SERIALIZED_NAME_QUANTITY) - private Integer quantity; - - public static final String SERIALIZED_NAME_SHIP_DATE = "shipDate"; - @SerializedName(SERIALIZED_NAME_SHIP_DATE) - private DateTime shipDate; - - /** - * Order Status - */ - @JsonAdapter(StatusEnum.Adapter.class) - public enum StatusEnum { - PLACED("placed"), - - APPROVED("approved"), - - DELIVERED("delivered"); - - private String value; - - StatusEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static StatusEnum fromValue(String value) { - for (StatusEnum b : StatusEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final StatusEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public StatusEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return StatusEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_STATUS = "status"; - @SerializedName(SERIALIZED_NAME_STATUS) - private StatusEnum status; - - public static final String SERIALIZED_NAME_COMPLETE = "complete"; - @SerializedName(SERIALIZED_NAME_COMPLETE) - private Boolean complete = false; - - - public Order id(Long id) { - - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public Long getId() { - return id; - } - - - public void setId(Long id) { - this.id = id; - } - - - public Order petId(Long petId) { - - this.petId = petId; - return this; - } - - /** - * Get petId - * @return petId - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public Long getPetId() { - return petId; - } - - - public void setPetId(Long petId) { - this.petId = petId; - } - - - public Order quantity(Integer quantity) { - - this.quantity = quantity; - return this; - } - - /** - * Get quantity - * @return quantity - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public Integer getQuantity() { - return quantity; - } - - - public void setQuantity(Integer quantity) { - this.quantity = quantity; - } - - - public Order shipDate(DateTime shipDate) { - - this.shipDate = shipDate; - return this; - } - - /** - * Get shipDate - * @return shipDate - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public DateTime getShipDate() { - return shipDate; - } - - - public void setShipDate(DateTime shipDate) { - this.shipDate = shipDate; - } - - - public Order status(StatusEnum status) { - - this.status = status; - return this; - } - - /** - * Order Status - * @return status - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "Order Status") - - public StatusEnum getStatus() { - return status; - } - - - public void setStatus(StatusEnum status) { - this.status = status; - } - - - public Order complete(Boolean complete) { - - this.complete = complete; - return this; - } - - /** - * Get complete - * @return complete - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public Boolean getComplete() { - return complete; - } - - - public void setComplete(Boolean complete) { - this.complete = complete; - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Order order = (Order) o; - return Objects.equals(this.id, order.id) && - Objects.equals(this.petId, order.petId) && - Objects.equals(this.quantity, order.quantity) && - Objects.equals(this.shipDate, order.shipDate) && - Objects.equals(this.status, order.status) && - Objects.equals(this.complete, order.complete); - } - - @Override - public int hashCode() { - return Objects.hash(id, petId, quantity, shipDate, status, complete); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Order {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); - sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); - sb.append(" shipDate: ").append(toIndentedString(shipDate)).append("\n"); - sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append(" complete: ").append(toIndentedString(complete)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/OuterComposite.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/OuterComposite.java deleted file mode 100644 index 1efe43b234b..00000000000 --- a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/OuterComposite.java +++ /dev/null @@ -1,158 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; -import java.math.BigDecimal; - -/** - * OuterComposite - */ - -public class OuterComposite { - public static final String SERIALIZED_NAME_MY_NUMBER = "my_number"; - @SerializedName(SERIALIZED_NAME_MY_NUMBER) - private BigDecimal myNumber; - - public static final String SERIALIZED_NAME_MY_STRING = "my_string"; - @SerializedName(SERIALIZED_NAME_MY_STRING) - private String myString; - - public static final String SERIALIZED_NAME_MY_BOOLEAN = "my_boolean"; - @SerializedName(SERIALIZED_NAME_MY_BOOLEAN) - private Boolean myBoolean; - - - public OuterComposite myNumber(BigDecimal myNumber) { - - this.myNumber = myNumber; - return this; - } - - /** - * Get myNumber - * @return myNumber - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public BigDecimal getMyNumber() { - return myNumber; - } - - - public void setMyNumber(BigDecimal myNumber) { - this.myNumber = myNumber; - } - - - public OuterComposite myString(String myString) { - - this.myString = myString; - return this; - } - - /** - * Get myString - * @return myString - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public String getMyString() { - return myString; - } - - - public void setMyString(String myString) { - this.myString = myString; - } - - - public OuterComposite myBoolean(Boolean myBoolean) { - - this.myBoolean = myBoolean; - return this; - } - - /** - * Get myBoolean - * @return myBoolean - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public Boolean getMyBoolean() { - return myBoolean; - } - - - public void setMyBoolean(Boolean myBoolean) { - this.myBoolean = myBoolean; - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OuterComposite outerComposite = (OuterComposite) o; - return Objects.equals(this.myNumber, outerComposite.myNumber) && - Objects.equals(this.myString, outerComposite.myString) && - Objects.equals(this.myBoolean, outerComposite.myBoolean); - } - - @Override - public int hashCode() { - return Objects.hash(myNumber, myString, myBoolean); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OuterComposite {\n"); - sb.append(" myNumber: ").append(toIndentedString(myNumber)).append("\n"); - sb.append(" myString: ").append(toIndentedString(myString)).append("\n"); - sb.append(" myBoolean: ").append(toIndentedString(myBoolean)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/OuterEnum.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/OuterEnum.java deleted file mode 100644 index bd870812102..00000000000 --- a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/OuterEnum.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.google.gson.annotations.SerializedName; - -import java.io.IOException; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; - -/** - * Gets or Sets OuterEnum - */ -@JsonAdapter(OuterEnum.Adapter.class) -public enum OuterEnum { - - PLACED("placed"), - - APPROVED("approved"), - - DELIVERED("delivered"); - - private String value; - - OuterEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static OuterEnum fromValue(String value) { - for (OuterEnum b : OuterEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final OuterEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public OuterEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return OuterEnum.fromValue(value); - } - } -} - diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/Pet.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/Pet.java deleted file mode 100644 index 4ea18b217b6..00000000000 --- a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/Pet.java +++ /dev/null @@ -1,310 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; -import java.util.ArrayList; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Set; -import org.openapitools.client.model.Category; -import org.openapitools.client.model.Tag; - -/** - * Pet - */ - -public class Pet { - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private Long id; - - public static final String SERIALIZED_NAME_CATEGORY = "category"; - @SerializedName(SERIALIZED_NAME_CATEGORY) - private Category category; - - public static final String SERIALIZED_NAME_NAME = "name"; - @SerializedName(SERIALIZED_NAME_NAME) - private String name; - - public static final String SERIALIZED_NAME_PHOTO_URLS = "photoUrls"; - @SerializedName(SERIALIZED_NAME_PHOTO_URLS) - private Set photoUrls = new LinkedHashSet(); - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private List tags = null; - - /** - * pet status in the store - */ - @JsonAdapter(StatusEnum.Adapter.class) - public enum StatusEnum { - AVAILABLE("available"), - - PENDING("pending"), - - SOLD("sold"); - - private String value; - - StatusEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static StatusEnum fromValue(String value) { - for (StatusEnum b : StatusEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final StatusEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public StatusEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return StatusEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_STATUS = "status"; - @SerializedName(SERIALIZED_NAME_STATUS) - private StatusEnum status; - - - public Pet id(Long id) { - - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public Long getId() { - return id; - } - - - public void setId(Long id) { - this.id = id; - } - - - public Pet category(Category category) { - - this.category = category; - return this; - } - - /** - * Get category - * @return category - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public Category getCategory() { - return category; - } - - - public void setCategory(Category category) { - this.category = category; - } - - - public Pet name(String name) { - - this.name = name; - return this; - } - - /** - * Get name - * @return name - **/ - @ApiModelProperty(example = "doggie", required = true, value = "") - - public String getName() { - return name; - } - - - public void setName(String name) { - this.name = name; - } - - - public Pet photoUrls(Set photoUrls) { - - this.photoUrls = photoUrls; - return this; - } - - public Pet addPhotoUrlsItem(String photoUrlsItem) { - this.photoUrls.add(photoUrlsItem); - return this; - } - - /** - * Get photoUrls - * @return photoUrls - **/ - @ApiModelProperty(required = true, value = "") - - public Set getPhotoUrls() { - return photoUrls; - } - - - public void setPhotoUrls(Set photoUrls) { - this.photoUrls = photoUrls; - } - - - public Pet tags(List tags) { - - this.tags = tags; - return this; - } - - public Pet addTagsItem(Tag tagsItem) { - if (this.tags == null) { - this.tags = new ArrayList(); - } - this.tags.add(tagsItem); - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public List getTags() { - return tags; - } - - - public void setTags(List tags) { - this.tags = tags; - } - - - public Pet status(StatusEnum status) { - - this.status = status; - return this; - } - - /** - * pet status in the store - * @return status - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "pet status in the store") - - public StatusEnum getStatus() { - return status; - } - - - public void setStatus(StatusEnum status) { - this.status = status; - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Pet pet = (Pet) o; - return Objects.equals(this.id, pet.id) && - Objects.equals(this.category, pet.category) && - Objects.equals(this.name, pet.name) && - Objects.equals(this.photoUrls, pet.photoUrls) && - Objects.equals(this.tags, pet.tags) && - Objects.equals(this.status, pet.status); - } - - @Override - public int hashCode() { - return Objects.hash(id, category, name, photoUrls, tags, status); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Pet {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" category: ").append(toIndentedString(category)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" photoUrls: ").append(toIndentedString(photoUrls)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java deleted file mode 100644 index ed0244a3ca2..00000000000 --- a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java +++ /dev/null @@ -1,119 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; - -/** - * ReadOnlyFirst - */ - -public class ReadOnlyFirst { - public static final String SERIALIZED_NAME_BAR = "bar"; - @SerializedName(SERIALIZED_NAME_BAR) - private String bar; - - public static final String SERIALIZED_NAME_BAZ = "baz"; - @SerializedName(SERIALIZED_NAME_BAZ) - private String baz; - - - /** - * Get bar - * @return bar - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public String getBar() { - return bar; - } - - - - - public ReadOnlyFirst baz(String baz) { - - this.baz = baz; - return this; - } - - /** - * Get baz - * @return baz - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public String getBaz() { - return baz; - } - - - public void setBaz(String baz) { - this.baz = baz; - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReadOnlyFirst readOnlyFirst = (ReadOnlyFirst) o; - return Objects.equals(this.bar, readOnlyFirst.bar) && - Objects.equals(this.baz, readOnlyFirst.baz); - } - - @Override - public int hashCode() { - return Objects.hash(bar, baz); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReadOnlyFirst {\n"); - sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); - sb.append(" baz: ").append(toIndentedString(baz)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/SpecialModelName.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/SpecialModelName.java deleted file mode 100644 index 3405d30ff61..00000000000 --- a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/SpecialModelName.java +++ /dev/null @@ -1,99 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; - -/** - * SpecialModelName - */ - -public class SpecialModelName { - public static final String SERIALIZED_NAME_$_SPECIAL_PROPERTY_NAME = "$special[property.name]"; - @SerializedName(SERIALIZED_NAME_$_SPECIAL_PROPERTY_NAME) - private Long $specialPropertyName; - - - public SpecialModelName $specialPropertyName(Long $specialPropertyName) { - - this.$specialPropertyName = $specialPropertyName; - return this; - } - - /** - * Get $specialPropertyName - * @return $specialPropertyName - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public Long get$SpecialPropertyName() { - return $specialPropertyName; - } - - - public void set$SpecialPropertyName(Long $specialPropertyName) { - this.$specialPropertyName = $specialPropertyName; - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SpecialModelName $specialModelName = (SpecialModelName) o; - return Objects.equals(this.$specialPropertyName, $specialModelName.$specialPropertyName); - } - - @Override - public int hashCode() { - return Objects.hash($specialPropertyName); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SpecialModelName {\n"); - sb.append(" $specialPropertyName: ").append(toIndentedString($specialPropertyName)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/Tag.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/Tag.java deleted file mode 100644 index 710e0fe54a4..00000000000 --- a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/Tag.java +++ /dev/null @@ -1,128 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; - -/** - * Tag - */ - -public class Tag { - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private Long id; - - public static final String SERIALIZED_NAME_NAME = "name"; - @SerializedName(SERIALIZED_NAME_NAME) - private String name; - - - public Tag id(Long id) { - - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public Long getId() { - return id; - } - - - public void setId(Long id) { - this.id = id; - } - - - public Tag name(String name) { - - this.name = name; - return this; - } - - /** - * Get name - * @return name - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public String getName() { - return name; - } - - - public void setName(String name) { - this.name = name; - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Tag tag = (Tag) o; - return Objects.equals(this.id, tag.id) && - Objects.equals(this.name, tag.name); - } - - @Override - public int hashCode() { - return Objects.hash(id, name); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Tag {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/TypeHolderDefault.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/TypeHolderDefault.java deleted file mode 100644 index 978cdb6f78d..00000000000 --- a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/TypeHolderDefault.java +++ /dev/null @@ -1,218 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; -import java.math.BigDecimal; -import java.util.ArrayList; -import java.util.List; - -/** - * TypeHolderDefault - */ - -public class TypeHolderDefault { - public static final String SERIALIZED_NAME_STRING_ITEM = "string_item"; - @SerializedName(SERIALIZED_NAME_STRING_ITEM) - private String stringItem = "what"; - - public static final String SERIALIZED_NAME_NUMBER_ITEM = "number_item"; - @SerializedName(SERIALIZED_NAME_NUMBER_ITEM) - private BigDecimal numberItem; - - public static final String SERIALIZED_NAME_INTEGER_ITEM = "integer_item"; - @SerializedName(SERIALIZED_NAME_INTEGER_ITEM) - private Integer integerItem; - - public static final String SERIALIZED_NAME_BOOL_ITEM = "bool_item"; - @SerializedName(SERIALIZED_NAME_BOOL_ITEM) - private Boolean boolItem = true; - - public static final String SERIALIZED_NAME_ARRAY_ITEM = "array_item"; - @SerializedName(SERIALIZED_NAME_ARRAY_ITEM) - private List arrayItem = new ArrayList(); - - - public TypeHolderDefault stringItem(String stringItem) { - - this.stringItem = stringItem; - return this; - } - - /** - * Get stringItem - * @return stringItem - **/ - @ApiModelProperty(required = true, value = "") - - public String getStringItem() { - return stringItem; - } - - - public void setStringItem(String stringItem) { - this.stringItem = stringItem; - } - - - public TypeHolderDefault numberItem(BigDecimal numberItem) { - - this.numberItem = numberItem; - return this; - } - - /** - * Get numberItem - * @return numberItem - **/ - @ApiModelProperty(required = true, value = "") - - public BigDecimal getNumberItem() { - return numberItem; - } - - - public void setNumberItem(BigDecimal numberItem) { - this.numberItem = numberItem; - } - - - public TypeHolderDefault integerItem(Integer integerItem) { - - this.integerItem = integerItem; - return this; - } - - /** - * Get integerItem - * @return integerItem - **/ - @ApiModelProperty(required = true, value = "") - - public Integer getIntegerItem() { - return integerItem; - } - - - public void setIntegerItem(Integer integerItem) { - this.integerItem = integerItem; - } - - - public TypeHolderDefault boolItem(Boolean boolItem) { - - this.boolItem = boolItem; - return this; - } - - /** - * Get boolItem - * @return boolItem - **/ - @ApiModelProperty(required = true, value = "") - - public Boolean getBoolItem() { - return boolItem; - } - - - public void setBoolItem(Boolean boolItem) { - this.boolItem = boolItem; - } - - - public TypeHolderDefault arrayItem(List arrayItem) { - - this.arrayItem = arrayItem; - return this; - } - - public TypeHolderDefault addArrayItemItem(Integer arrayItemItem) { - this.arrayItem.add(arrayItemItem); - return this; - } - - /** - * Get arrayItem - * @return arrayItem - **/ - @ApiModelProperty(required = true, value = "") - - public List getArrayItem() { - return arrayItem; - } - - - public void setArrayItem(List arrayItem) { - this.arrayItem = arrayItem; - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - TypeHolderDefault typeHolderDefault = (TypeHolderDefault) o; - return Objects.equals(this.stringItem, typeHolderDefault.stringItem) && - Objects.equals(this.numberItem, typeHolderDefault.numberItem) && - Objects.equals(this.integerItem, typeHolderDefault.integerItem) && - Objects.equals(this.boolItem, typeHolderDefault.boolItem) && - Objects.equals(this.arrayItem, typeHolderDefault.arrayItem); - } - - @Override - public int hashCode() { - return Objects.hash(stringItem, numberItem, integerItem, boolItem, arrayItem); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class TypeHolderDefault {\n"); - sb.append(" stringItem: ").append(toIndentedString(stringItem)).append("\n"); - sb.append(" numberItem: ").append(toIndentedString(numberItem)).append("\n"); - sb.append(" integerItem: ").append(toIndentedString(integerItem)).append("\n"); - sb.append(" boolItem: ").append(toIndentedString(boolItem)).append("\n"); - sb.append(" arrayItem: ").append(toIndentedString(arrayItem)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/TypeHolderExample.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/TypeHolderExample.java deleted file mode 100644 index 878b1540ee7..00000000000 --- a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/TypeHolderExample.java +++ /dev/null @@ -1,246 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; -import java.math.BigDecimal; -import java.util.ArrayList; -import java.util.List; - -/** - * TypeHolderExample - */ - -public class TypeHolderExample { - public static final String SERIALIZED_NAME_STRING_ITEM = "string_item"; - @SerializedName(SERIALIZED_NAME_STRING_ITEM) - private String stringItem; - - public static final String SERIALIZED_NAME_NUMBER_ITEM = "number_item"; - @SerializedName(SERIALIZED_NAME_NUMBER_ITEM) - private BigDecimal numberItem; - - public static final String SERIALIZED_NAME_FLOAT_ITEM = "float_item"; - @SerializedName(SERIALIZED_NAME_FLOAT_ITEM) - private Float floatItem; - - public static final String SERIALIZED_NAME_INTEGER_ITEM = "integer_item"; - @SerializedName(SERIALIZED_NAME_INTEGER_ITEM) - private Integer integerItem; - - public static final String SERIALIZED_NAME_BOOL_ITEM = "bool_item"; - @SerializedName(SERIALIZED_NAME_BOOL_ITEM) - private Boolean boolItem; - - public static final String SERIALIZED_NAME_ARRAY_ITEM = "array_item"; - @SerializedName(SERIALIZED_NAME_ARRAY_ITEM) - private List arrayItem = new ArrayList(); - - - public TypeHolderExample stringItem(String stringItem) { - - this.stringItem = stringItem; - return this; - } - - /** - * Get stringItem - * @return stringItem - **/ - @ApiModelProperty(example = "what", required = true, value = "") - - public String getStringItem() { - return stringItem; - } - - - public void setStringItem(String stringItem) { - this.stringItem = stringItem; - } - - - public TypeHolderExample numberItem(BigDecimal numberItem) { - - this.numberItem = numberItem; - return this; - } - - /** - * Get numberItem - * @return numberItem - **/ - @ApiModelProperty(example = "1.234", required = true, value = "") - - public BigDecimal getNumberItem() { - return numberItem; - } - - - public void setNumberItem(BigDecimal numberItem) { - this.numberItem = numberItem; - } - - - public TypeHolderExample floatItem(Float floatItem) { - - this.floatItem = floatItem; - return this; - } - - /** - * Get floatItem - * @return floatItem - **/ - @ApiModelProperty(example = "1.234", required = true, value = "") - - public Float getFloatItem() { - return floatItem; - } - - - public void setFloatItem(Float floatItem) { - this.floatItem = floatItem; - } - - - public TypeHolderExample integerItem(Integer integerItem) { - - this.integerItem = integerItem; - return this; - } - - /** - * Get integerItem - * @return integerItem - **/ - @ApiModelProperty(example = "-2", required = true, value = "") - - public Integer getIntegerItem() { - return integerItem; - } - - - public void setIntegerItem(Integer integerItem) { - this.integerItem = integerItem; - } - - - public TypeHolderExample boolItem(Boolean boolItem) { - - this.boolItem = boolItem; - return this; - } - - /** - * Get boolItem - * @return boolItem - **/ - @ApiModelProperty(example = "true", required = true, value = "") - - public Boolean getBoolItem() { - return boolItem; - } - - - public void setBoolItem(Boolean boolItem) { - this.boolItem = boolItem; - } - - - public TypeHolderExample arrayItem(List arrayItem) { - - this.arrayItem = arrayItem; - return this; - } - - public TypeHolderExample addArrayItemItem(Integer arrayItemItem) { - this.arrayItem.add(arrayItemItem); - return this; - } - - /** - * Get arrayItem - * @return arrayItem - **/ - @ApiModelProperty(example = "[0, 1, 2, 3]", required = true, value = "") - - public List getArrayItem() { - return arrayItem; - } - - - public void setArrayItem(List arrayItem) { - this.arrayItem = arrayItem; - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - TypeHolderExample typeHolderExample = (TypeHolderExample) o; - return Objects.equals(this.stringItem, typeHolderExample.stringItem) && - Objects.equals(this.numberItem, typeHolderExample.numberItem) && - Objects.equals(this.floatItem, typeHolderExample.floatItem) && - Objects.equals(this.integerItem, typeHolderExample.integerItem) && - Objects.equals(this.boolItem, typeHolderExample.boolItem) && - Objects.equals(this.arrayItem, typeHolderExample.arrayItem); - } - - @Override - public int hashCode() { - return Objects.hash(stringItem, numberItem, floatItem, integerItem, boolItem, arrayItem); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class TypeHolderExample {\n"); - sb.append(" stringItem: ").append(toIndentedString(stringItem)).append("\n"); - sb.append(" numberItem: ").append(toIndentedString(numberItem)).append("\n"); - sb.append(" floatItem: ").append(toIndentedString(floatItem)).append("\n"); - sb.append(" integerItem: ").append(toIndentedString(integerItem)).append("\n"); - sb.append(" boolItem: ").append(toIndentedString(boolItem)).append("\n"); - sb.append(" arrayItem: ").append(toIndentedString(arrayItem)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/User.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/User.java deleted file mode 100644 index d9111531781..00000000000 --- a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/User.java +++ /dev/null @@ -1,302 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; - -/** - * User - */ - -public class User { - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private Long id; - - public static final String SERIALIZED_NAME_USERNAME = "username"; - @SerializedName(SERIALIZED_NAME_USERNAME) - private String username; - - public static final String SERIALIZED_NAME_FIRST_NAME = "firstName"; - @SerializedName(SERIALIZED_NAME_FIRST_NAME) - private String firstName; - - public static final String SERIALIZED_NAME_LAST_NAME = "lastName"; - @SerializedName(SERIALIZED_NAME_LAST_NAME) - private String lastName; - - public static final String SERIALIZED_NAME_EMAIL = "email"; - @SerializedName(SERIALIZED_NAME_EMAIL) - private String email; - - public static final String SERIALIZED_NAME_PASSWORD = "password"; - @SerializedName(SERIALIZED_NAME_PASSWORD) - private String password; - - public static final String SERIALIZED_NAME_PHONE = "phone"; - @SerializedName(SERIALIZED_NAME_PHONE) - private String phone; - - public static final String SERIALIZED_NAME_USER_STATUS = "userStatus"; - @SerializedName(SERIALIZED_NAME_USER_STATUS) - private Integer userStatus; - - - public User id(Long id) { - - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public Long getId() { - return id; - } - - - public void setId(Long id) { - this.id = id; - } - - - public User username(String username) { - - this.username = username; - return this; - } - - /** - * Get username - * @return username - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public String getUsername() { - return username; - } - - - public void setUsername(String username) { - this.username = username; - } - - - public User firstName(String firstName) { - - this.firstName = firstName; - return this; - } - - /** - * Get firstName - * @return firstName - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public String getFirstName() { - return firstName; - } - - - public void setFirstName(String firstName) { - this.firstName = firstName; - } - - - public User lastName(String lastName) { - - this.lastName = lastName; - return this; - } - - /** - * Get lastName - * @return lastName - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public String getLastName() { - return lastName; - } - - - public void setLastName(String lastName) { - this.lastName = lastName; - } - - - public User email(String email) { - - this.email = email; - return this; - } - - /** - * Get email - * @return email - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public String getEmail() { - return email; - } - - - public void setEmail(String email) { - this.email = email; - } - - - public User password(String password) { - - this.password = password; - return this; - } - - /** - * Get password - * @return password - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public String getPassword() { - return password; - } - - - public void setPassword(String password) { - this.password = password; - } - - - public User phone(String phone) { - - this.phone = phone; - return this; - } - - /** - * Get phone - * @return phone - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public String getPhone() { - return phone; - } - - - public void setPhone(String phone) { - this.phone = phone; - } - - - public User userStatus(Integer userStatus) { - - this.userStatus = userStatus; - return this; - } - - /** - * User Status - * @return userStatus - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "User Status") - - public Integer getUserStatus() { - return userStatus; - } - - - public void setUserStatus(Integer userStatus) { - this.userStatus = userStatus; - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - User user = (User) o; - return Objects.equals(this.id, user.id) && - Objects.equals(this.username, user.username) && - Objects.equals(this.firstName, user.firstName) && - Objects.equals(this.lastName, user.lastName) && - Objects.equals(this.email, user.email) && - Objects.equals(this.password, user.password) && - Objects.equals(this.phone, user.phone) && - Objects.equals(this.userStatus, user.userStatus); - } - - @Override - public int hashCode() { - return Objects.hash(id, username, firstName, lastName, email, password, phone, userStatus); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class User {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" username: ").append(toIndentedString(username)).append("\n"); - sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); - sb.append(" lastName: ").append(toIndentedString(lastName)).append("\n"); - sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" password: ").append(toIndentedString(password)).append("\n"); - sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); - sb.append(" userStatus: ").append(toIndentedString(userStatus)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/XmlItem.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/XmlItem.java deleted file mode 100644 index ecfd0be1b31..00000000000 --- a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/XmlItem.java +++ /dev/null @@ -1,986 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; -import java.math.BigDecimal; -import java.util.ArrayList; -import java.util.List; - -/** - * XmlItem - */ - -public class XmlItem { - public static final String SERIALIZED_NAME_ATTRIBUTE_STRING = "attribute_string"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTE_STRING) - private String attributeString; - - public static final String SERIALIZED_NAME_ATTRIBUTE_NUMBER = "attribute_number"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTE_NUMBER) - private BigDecimal attributeNumber; - - public static final String SERIALIZED_NAME_ATTRIBUTE_INTEGER = "attribute_integer"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTE_INTEGER) - private Integer attributeInteger; - - public static final String SERIALIZED_NAME_ATTRIBUTE_BOOLEAN = "attribute_boolean"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTE_BOOLEAN) - private Boolean attributeBoolean; - - public static final String SERIALIZED_NAME_WRAPPED_ARRAY = "wrapped_array"; - @SerializedName(SERIALIZED_NAME_WRAPPED_ARRAY) - private List wrappedArray = null; - - public static final String SERIALIZED_NAME_NAME_STRING = "name_string"; - @SerializedName(SERIALIZED_NAME_NAME_STRING) - private String nameString; - - public static final String SERIALIZED_NAME_NAME_NUMBER = "name_number"; - @SerializedName(SERIALIZED_NAME_NAME_NUMBER) - private BigDecimal nameNumber; - - public static final String SERIALIZED_NAME_NAME_INTEGER = "name_integer"; - @SerializedName(SERIALIZED_NAME_NAME_INTEGER) - private Integer nameInteger; - - public static final String SERIALIZED_NAME_NAME_BOOLEAN = "name_boolean"; - @SerializedName(SERIALIZED_NAME_NAME_BOOLEAN) - private Boolean nameBoolean; - - public static final String SERIALIZED_NAME_NAME_ARRAY = "name_array"; - @SerializedName(SERIALIZED_NAME_NAME_ARRAY) - private List nameArray = null; - - public static final String SERIALIZED_NAME_NAME_WRAPPED_ARRAY = "name_wrapped_array"; - @SerializedName(SERIALIZED_NAME_NAME_WRAPPED_ARRAY) - private List nameWrappedArray = null; - - public static final String SERIALIZED_NAME_PREFIX_STRING = "prefix_string"; - @SerializedName(SERIALIZED_NAME_PREFIX_STRING) - private String prefixString; - - public static final String SERIALIZED_NAME_PREFIX_NUMBER = "prefix_number"; - @SerializedName(SERIALIZED_NAME_PREFIX_NUMBER) - private BigDecimal prefixNumber; - - public static final String SERIALIZED_NAME_PREFIX_INTEGER = "prefix_integer"; - @SerializedName(SERIALIZED_NAME_PREFIX_INTEGER) - private Integer prefixInteger; - - public static final String SERIALIZED_NAME_PREFIX_BOOLEAN = "prefix_boolean"; - @SerializedName(SERIALIZED_NAME_PREFIX_BOOLEAN) - private Boolean prefixBoolean; - - public static final String SERIALIZED_NAME_PREFIX_ARRAY = "prefix_array"; - @SerializedName(SERIALIZED_NAME_PREFIX_ARRAY) - private List prefixArray = null; - - public static final String SERIALIZED_NAME_PREFIX_WRAPPED_ARRAY = "prefix_wrapped_array"; - @SerializedName(SERIALIZED_NAME_PREFIX_WRAPPED_ARRAY) - private List prefixWrappedArray = null; - - public static final String SERIALIZED_NAME_NAMESPACE_STRING = "namespace_string"; - @SerializedName(SERIALIZED_NAME_NAMESPACE_STRING) - private String namespaceString; - - public static final String SERIALIZED_NAME_NAMESPACE_NUMBER = "namespace_number"; - @SerializedName(SERIALIZED_NAME_NAMESPACE_NUMBER) - private BigDecimal namespaceNumber; - - public static final String SERIALIZED_NAME_NAMESPACE_INTEGER = "namespace_integer"; - @SerializedName(SERIALIZED_NAME_NAMESPACE_INTEGER) - private Integer namespaceInteger; - - public static final String SERIALIZED_NAME_NAMESPACE_BOOLEAN = "namespace_boolean"; - @SerializedName(SERIALIZED_NAME_NAMESPACE_BOOLEAN) - private Boolean namespaceBoolean; - - public static final String SERIALIZED_NAME_NAMESPACE_ARRAY = "namespace_array"; - @SerializedName(SERIALIZED_NAME_NAMESPACE_ARRAY) - private List namespaceArray = null; - - public static final String SERIALIZED_NAME_NAMESPACE_WRAPPED_ARRAY = "namespace_wrapped_array"; - @SerializedName(SERIALIZED_NAME_NAMESPACE_WRAPPED_ARRAY) - private List namespaceWrappedArray = null; - - public static final String SERIALIZED_NAME_PREFIX_NS_STRING = "prefix_ns_string"; - @SerializedName(SERIALIZED_NAME_PREFIX_NS_STRING) - private String prefixNsString; - - public static final String SERIALIZED_NAME_PREFIX_NS_NUMBER = "prefix_ns_number"; - @SerializedName(SERIALIZED_NAME_PREFIX_NS_NUMBER) - private BigDecimal prefixNsNumber; - - public static final String SERIALIZED_NAME_PREFIX_NS_INTEGER = "prefix_ns_integer"; - @SerializedName(SERIALIZED_NAME_PREFIX_NS_INTEGER) - private Integer prefixNsInteger; - - public static final String SERIALIZED_NAME_PREFIX_NS_BOOLEAN = "prefix_ns_boolean"; - @SerializedName(SERIALIZED_NAME_PREFIX_NS_BOOLEAN) - private Boolean prefixNsBoolean; - - public static final String SERIALIZED_NAME_PREFIX_NS_ARRAY = "prefix_ns_array"; - @SerializedName(SERIALIZED_NAME_PREFIX_NS_ARRAY) - private List prefixNsArray = null; - - public static final String SERIALIZED_NAME_PREFIX_NS_WRAPPED_ARRAY = "prefix_ns_wrapped_array"; - @SerializedName(SERIALIZED_NAME_PREFIX_NS_WRAPPED_ARRAY) - private List prefixNsWrappedArray = null; - - - public XmlItem attributeString(String attributeString) { - - this.attributeString = attributeString; - return this; - } - - /** - * Get attributeString - * @return attributeString - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "string", value = "") - - public String getAttributeString() { - return attributeString; - } - - - public void setAttributeString(String attributeString) { - this.attributeString = attributeString; - } - - - public XmlItem attributeNumber(BigDecimal attributeNumber) { - - this.attributeNumber = attributeNumber; - return this; - } - - /** - * Get attributeNumber - * @return attributeNumber - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "1.234", value = "") - - public BigDecimal getAttributeNumber() { - return attributeNumber; - } - - - public void setAttributeNumber(BigDecimal attributeNumber) { - this.attributeNumber = attributeNumber; - } - - - public XmlItem attributeInteger(Integer attributeInteger) { - - this.attributeInteger = attributeInteger; - return this; - } - - /** - * Get attributeInteger - * @return attributeInteger - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "-2", value = "") - - public Integer getAttributeInteger() { - return attributeInteger; - } - - - public void setAttributeInteger(Integer attributeInteger) { - this.attributeInteger = attributeInteger; - } - - - public XmlItem attributeBoolean(Boolean attributeBoolean) { - - this.attributeBoolean = attributeBoolean; - return this; - } - - /** - * Get attributeBoolean - * @return attributeBoolean - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "true", value = "") - - public Boolean getAttributeBoolean() { - return attributeBoolean; - } - - - public void setAttributeBoolean(Boolean attributeBoolean) { - this.attributeBoolean = attributeBoolean; - } - - - public XmlItem wrappedArray(List wrappedArray) { - - this.wrappedArray = wrappedArray; - return this; - } - - public XmlItem addWrappedArrayItem(Integer wrappedArrayItem) { - if (this.wrappedArray == null) { - this.wrappedArray = new ArrayList(); - } - this.wrappedArray.add(wrappedArrayItem); - return this; - } - - /** - * Get wrappedArray - * @return wrappedArray - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public List getWrappedArray() { - return wrappedArray; - } - - - public void setWrappedArray(List wrappedArray) { - this.wrappedArray = wrappedArray; - } - - - public XmlItem nameString(String nameString) { - - this.nameString = nameString; - return this; - } - - /** - * Get nameString - * @return nameString - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "string", value = "") - - public String getNameString() { - return nameString; - } - - - public void setNameString(String nameString) { - this.nameString = nameString; - } - - - public XmlItem nameNumber(BigDecimal nameNumber) { - - this.nameNumber = nameNumber; - return this; - } - - /** - * Get nameNumber - * @return nameNumber - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "1.234", value = "") - - public BigDecimal getNameNumber() { - return nameNumber; - } - - - public void setNameNumber(BigDecimal nameNumber) { - this.nameNumber = nameNumber; - } - - - public XmlItem nameInteger(Integer nameInteger) { - - this.nameInteger = nameInteger; - return this; - } - - /** - * Get nameInteger - * @return nameInteger - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "-2", value = "") - - public Integer getNameInteger() { - return nameInteger; - } - - - public void setNameInteger(Integer nameInteger) { - this.nameInteger = nameInteger; - } - - - public XmlItem nameBoolean(Boolean nameBoolean) { - - this.nameBoolean = nameBoolean; - return this; - } - - /** - * Get nameBoolean - * @return nameBoolean - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "true", value = "") - - public Boolean getNameBoolean() { - return nameBoolean; - } - - - public void setNameBoolean(Boolean nameBoolean) { - this.nameBoolean = nameBoolean; - } - - - public XmlItem nameArray(List nameArray) { - - this.nameArray = nameArray; - return this; - } - - public XmlItem addNameArrayItem(Integer nameArrayItem) { - if (this.nameArray == null) { - this.nameArray = new ArrayList(); - } - this.nameArray.add(nameArrayItem); - return this; - } - - /** - * Get nameArray - * @return nameArray - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public List getNameArray() { - return nameArray; - } - - - public void setNameArray(List nameArray) { - this.nameArray = nameArray; - } - - - public XmlItem nameWrappedArray(List nameWrappedArray) { - - this.nameWrappedArray = nameWrappedArray; - return this; - } - - public XmlItem addNameWrappedArrayItem(Integer nameWrappedArrayItem) { - if (this.nameWrappedArray == null) { - this.nameWrappedArray = new ArrayList(); - } - this.nameWrappedArray.add(nameWrappedArrayItem); - return this; - } - - /** - * Get nameWrappedArray - * @return nameWrappedArray - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public List getNameWrappedArray() { - return nameWrappedArray; - } - - - public void setNameWrappedArray(List nameWrappedArray) { - this.nameWrappedArray = nameWrappedArray; - } - - - public XmlItem prefixString(String prefixString) { - - this.prefixString = prefixString; - return this; - } - - /** - * Get prefixString - * @return prefixString - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "string", value = "") - - public String getPrefixString() { - return prefixString; - } - - - public void setPrefixString(String prefixString) { - this.prefixString = prefixString; - } - - - public XmlItem prefixNumber(BigDecimal prefixNumber) { - - this.prefixNumber = prefixNumber; - return this; - } - - /** - * Get prefixNumber - * @return prefixNumber - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "1.234", value = "") - - public BigDecimal getPrefixNumber() { - return prefixNumber; - } - - - public void setPrefixNumber(BigDecimal prefixNumber) { - this.prefixNumber = prefixNumber; - } - - - public XmlItem prefixInteger(Integer prefixInteger) { - - this.prefixInteger = prefixInteger; - return this; - } - - /** - * Get prefixInteger - * @return prefixInteger - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "-2", value = "") - - public Integer getPrefixInteger() { - return prefixInteger; - } - - - public void setPrefixInteger(Integer prefixInteger) { - this.prefixInteger = prefixInteger; - } - - - public XmlItem prefixBoolean(Boolean prefixBoolean) { - - this.prefixBoolean = prefixBoolean; - return this; - } - - /** - * Get prefixBoolean - * @return prefixBoolean - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "true", value = "") - - public Boolean getPrefixBoolean() { - return prefixBoolean; - } - - - public void setPrefixBoolean(Boolean prefixBoolean) { - this.prefixBoolean = prefixBoolean; - } - - - public XmlItem prefixArray(List prefixArray) { - - this.prefixArray = prefixArray; - return this; - } - - public XmlItem addPrefixArrayItem(Integer prefixArrayItem) { - if (this.prefixArray == null) { - this.prefixArray = new ArrayList(); - } - this.prefixArray.add(prefixArrayItem); - return this; - } - - /** - * Get prefixArray - * @return prefixArray - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public List getPrefixArray() { - return prefixArray; - } - - - public void setPrefixArray(List prefixArray) { - this.prefixArray = prefixArray; - } - - - public XmlItem prefixWrappedArray(List prefixWrappedArray) { - - this.prefixWrappedArray = prefixWrappedArray; - return this; - } - - public XmlItem addPrefixWrappedArrayItem(Integer prefixWrappedArrayItem) { - if (this.prefixWrappedArray == null) { - this.prefixWrappedArray = new ArrayList(); - } - this.prefixWrappedArray.add(prefixWrappedArrayItem); - return this; - } - - /** - * Get prefixWrappedArray - * @return prefixWrappedArray - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public List getPrefixWrappedArray() { - return prefixWrappedArray; - } - - - public void setPrefixWrappedArray(List prefixWrappedArray) { - this.prefixWrappedArray = prefixWrappedArray; - } - - - public XmlItem namespaceString(String namespaceString) { - - this.namespaceString = namespaceString; - return this; - } - - /** - * Get namespaceString - * @return namespaceString - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "string", value = "") - - public String getNamespaceString() { - return namespaceString; - } - - - public void setNamespaceString(String namespaceString) { - this.namespaceString = namespaceString; - } - - - public XmlItem namespaceNumber(BigDecimal namespaceNumber) { - - this.namespaceNumber = namespaceNumber; - return this; - } - - /** - * Get namespaceNumber - * @return namespaceNumber - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "1.234", value = "") - - public BigDecimal getNamespaceNumber() { - return namespaceNumber; - } - - - public void setNamespaceNumber(BigDecimal namespaceNumber) { - this.namespaceNumber = namespaceNumber; - } - - - public XmlItem namespaceInteger(Integer namespaceInteger) { - - this.namespaceInteger = namespaceInteger; - return this; - } - - /** - * Get namespaceInteger - * @return namespaceInteger - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "-2", value = "") - - public Integer getNamespaceInteger() { - return namespaceInteger; - } - - - public void setNamespaceInteger(Integer namespaceInteger) { - this.namespaceInteger = namespaceInteger; - } - - - public XmlItem namespaceBoolean(Boolean namespaceBoolean) { - - this.namespaceBoolean = namespaceBoolean; - return this; - } - - /** - * Get namespaceBoolean - * @return namespaceBoolean - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "true", value = "") - - public Boolean getNamespaceBoolean() { - return namespaceBoolean; - } - - - public void setNamespaceBoolean(Boolean namespaceBoolean) { - this.namespaceBoolean = namespaceBoolean; - } - - - public XmlItem namespaceArray(List namespaceArray) { - - this.namespaceArray = namespaceArray; - return this; - } - - public XmlItem addNamespaceArrayItem(Integer namespaceArrayItem) { - if (this.namespaceArray == null) { - this.namespaceArray = new ArrayList(); - } - this.namespaceArray.add(namespaceArrayItem); - return this; - } - - /** - * Get namespaceArray - * @return namespaceArray - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public List getNamespaceArray() { - return namespaceArray; - } - - - public void setNamespaceArray(List namespaceArray) { - this.namespaceArray = namespaceArray; - } - - - public XmlItem namespaceWrappedArray(List namespaceWrappedArray) { - - this.namespaceWrappedArray = namespaceWrappedArray; - return this; - } - - public XmlItem addNamespaceWrappedArrayItem(Integer namespaceWrappedArrayItem) { - if (this.namespaceWrappedArray == null) { - this.namespaceWrappedArray = new ArrayList(); - } - this.namespaceWrappedArray.add(namespaceWrappedArrayItem); - return this; - } - - /** - * Get namespaceWrappedArray - * @return namespaceWrappedArray - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public List getNamespaceWrappedArray() { - return namespaceWrappedArray; - } - - - public void setNamespaceWrappedArray(List namespaceWrappedArray) { - this.namespaceWrappedArray = namespaceWrappedArray; - } - - - public XmlItem prefixNsString(String prefixNsString) { - - this.prefixNsString = prefixNsString; - return this; - } - - /** - * Get prefixNsString - * @return prefixNsString - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "string", value = "") - - public String getPrefixNsString() { - return prefixNsString; - } - - - public void setPrefixNsString(String prefixNsString) { - this.prefixNsString = prefixNsString; - } - - - public XmlItem prefixNsNumber(BigDecimal prefixNsNumber) { - - this.prefixNsNumber = prefixNsNumber; - return this; - } - - /** - * Get prefixNsNumber - * @return prefixNsNumber - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "1.234", value = "") - - public BigDecimal getPrefixNsNumber() { - return prefixNsNumber; - } - - - public void setPrefixNsNumber(BigDecimal prefixNsNumber) { - this.prefixNsNumber = prefixNsNumber; - } - - - public XmlItem prefixNsInteger(Integer prefixNsInteger) { - - this.prefixNsInteger = prefixNsInteger; - return this; - } - - /** - * Get prefixNsInteger - * @return prefixNsInteger - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "-2", value = "") - - public Integer getPrefixNsInteger() { - return prefixNsInteger; - } - - - public void setPrefixNsInteger(Integer prefixNsInteger) { - this.prefixNsInteger = prefixNsInteger; - } - - - public XmlItem prefixNsBoolean(Boolean prefixNsBoolean) { - - this.prefixNsBoolean = prefixNsBoolean; - return this; - } - - /** - * Get prefixNsBoolean - * @return prefixNsBoolean - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "true", value = "") - - public Boolean getPrefixNsBoolean() { - return prefixNsBoolean; - } - - - public void setPrefixNsBoolean(Boolean prefixNsBoolean) { - this.prefixNsBoolean = prefixNsBoolean; - } - - - public XmlItem prefixNsArray(List prefixNsArray) { - - this.prefixNsArray = prefixNsArray; - return this; - } - - public XmlItem addPrefixNsArrayItem(Integer prefixNsArrayItem) { - if (this.prefixNsArray == null) { - this.prefixNsArray = new ArrayList(); - } - this.prefixNsArray.add(prefixNsArrayItem); - return this; - } - - /** - * Get prefixNsArray - * @return prefixNsArray - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public List getPrefixNsArray() { - return prefixNsArray; - } - - - public void setPrefixNsArray(List prefixNsArray) { - this.prefixNsArray = prefixNsArray; - } - - - public XmlItem prefixNsWrappedArray(List prefixNsWrappedArray) { - - this.prefixNsWrappedArray = prefixNsWrappedArray; - return this; - } - - public XmlItem addPrefixNsWrappedArrayItem(Integer prefixNsWrappedArrayItem) { - if (this.prefixNsWrappedArray == null) { - this.prefixNsWrappedArray = new ArrayList(); - } - this.prefixNsWrappedArray.add(prefixNsWrappedArrayItem); - return this; - } - - /** - * Get prefixNsWrappedArray - * @return prefixNsWrappedArray - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public List getPrefixNsWrappedArray() { - return prefixNsWrappedArray; - } - - - public void setPrefixNsWrappedArray(List prefixNsWrappedArray) { - this.prefixNsWrappedArray = prefixNsWrappedArray; - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - XmlItem xmlItem = (XmlItem) o; - return Objects.equals(this.attributeString, xmlItem.attributeString) && - Objects.equals(this.attributeNumber, xmlItem.attributeNumber) && - Objects.equals(this.attributeInteger, xmlItem.attributeInteger) && - Objects.equals(this.attributeBoolean, xmlItem.attributeBoolean) && - Objects.equals(this.wrappedArray, xmlItem.wrappedArray) && - Objects.equals(this.nameString, xmlItem.nameString) && - Objects.equals(this.nameNumber, xmlItem.nameNumber) && - Objects.equals(this.nameInteger, xmlItem.nameInteger) && - Objects.equals(this.nameBoolean, xmlItem.nameBoolean) && - Objects.equals(this.nameArray, xmlItem.nameArray) && - Objects.equals(this.nameWrappedArray, xmlItem.nameWrappedArray) && - Objects.equals(this.prefixString, xmlItem.prefixString) && - Objects.equals(this.prefixNumber, xmlItem.prefixNumber) && - Objects.equals(this.prefixInteger, xmlItem.prefixInteger) && - Objects.equals(this.prefixBoolean, xmlItem.prefixBoolean) && - Objects.equals(this.prefixArray, xmlItem.prefixArray) && - Objects.equals(this.prefixWrappedArray, xmlItem.prefixWrappedArray) && - Objects.equals(this.namespaceString, xmlItem.namespaceString) && - Objects.equals(this.namespaceNumber, xmlItem.namespaceNumber) && - Objects.equals(this.namespaceInteger, xmlItem.namespaceInteger) && - Objects.equals(this.namespaceBoolean, xmlItem.namespaceBoolean) && - Objects.equals(this.namespaceArray, xmlItem.namespaceArray) && - Objects.equals(this.namespaceWrappedArray, xmlItem.namespaceWrappedArray) && - Objects.equals(this.prefixNsString, xmlItem.prefixNsString) && - Objects.equals(this.prefixNsNumber, xmlItem.prefixNsNumber) && - Objects.equals(this.prefixNsInteger, xmlItem.prefixNsInteger) && - Objects.equals(this.prefixNsBoolean, xmlItem.prefixNsBoolean) && - Objects.equals(this.prefixNsArray, xmlItem.prefixNsArray) && - Objects.equals(this.prefixNsWrappedArray, xmlItem.prefixNsWrappedArray); - } - - @Override - public int hashCode() { - return Objects.hash(attributeString, attributeNumber, attributeInteger, attributeBoolean, wrappedArray, nameString, nameNumber, nameInteger, nameBoolean, nameArray, nameWrappedArray, prefixString, prefixNumber, prefixInteger, prefixBoolean, prefixArray, prefixWrappedArray, namespaceString, namespaceNumber, namespaceInteger, namespaceBoolean, namespaceArray, namespaceWrappedArray, prefixNsString, prefixNsNumber, prefixNsInteger, prefixNsBoolean, prefixNsArray, prefixNsWrappedArray); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class XmlItem {\n"); - sb.append(" attributeString: ").append(toIndentedString(attributeString)).append("\n"); - sb.append(" attributeNumber: ").append(toIndentedString(attributeNumber)).append("\n"); - sb.append(" attributeInteger: ").append(toIndentedString(attributeInteger)).append("\n"); - sb.append(" attributeBoolean: ").append(toIndentedString(attributeBoolean)).append("\n"); - sb.append(" wrappedArray: ").append(toIndentedString(wrappedArray)).append("\n"); - sb.append(" nameString: ").append(toIndentedString(nameString)).append("\n"); - sb.append(" nameNumber: ").append(toIndentedString(nameNumber)).append("\n"); - sb.append(" nameInteger: ").append(toIndentedString(nameInteger)).append("\n"); - sb.append(" nameBoolean: ").append(toIndentedString(nameBoolean)).append("\n"); - sb.append(" nameArray: ").append(toIndentedString(nameArray)).append("\n"); - sb.append(" nameWrappedArray: ").append(toIndentedString(nameWrappedArray)).append("\n"); - sb.append(" prefixString: ").append(toIndentedString(prefixString)).append("\n"); - sb.append(" prefixNumber: ").append(toIndentedString(prefixNumber)).append("\n"); - sb.append(" prefixInteger: ").append(toIndentedString(prefixInteger)).append("\n"); - sb.append(" prefixBoolean: ").append(toIndentedString(prefixBoolean)).append("\n"); - sb.append(" prefixArray: ").append(toIndentedString(prefixArray)).append("\n"); - sb.append(" prefixWrappedArray: ").append(toIndentedString(prefixWrappedArray)).append("\n"); - sb.append(" namespaceString: ").append(toIndentedString(namespaceString)).append("\n"); - sb.append(" namespaceNumber: ").append(toIndentedString(namespaceNumber)).append("\n"); - sb.append(" namespaceInteger: ").append(toIndentedString(namespaceInteger)).append("\n"); - sb.append(" namespaceBoolean: ").append(toIndentedString(namespaceBoolean)).append("\n"); - sb.append(" namespaceArray: ").append(toIndentedString(namespaceArray)).append("\n"); - sb.append(" namespaceWrappedArray: ").append(toIndentedString(namespaceWrappedArray)).append("\n"); - sb.append(" prefixNsString: ").append(toIndentedString(prefixNsString)).append("\n"); - sb.append(" prefixNsNumber: ").append(toIndentedString(prefixNsNumber)).append("\n"); - sb.append(" prefixNsInteger: ").append(toIndentedString(prefixNsInteger)).append("\n"); - sb.append(" prefixNsBoolean: ").append(toIndentedString(prefixNsBoolean)).append("\n"); - sb.append(" prefixNsArray: ").append(toIndentedString(prefixNsArray)).append("\n"); - sb.append(" prefixNsWrappedArray: ").append(toIndentedString(prefixNsWrappedArray)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/api/AnotherFakeApiTest.java b/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/api/AnotherFakeApiTest.java deleted file mode 100644 index 8097cda4101..00000000000 --- a/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/api/AnotherFakeApiTest.java +++ /dev/null @@ -1,39 +0,0 @@ -package org.openapitools.client.api; - -import org.openapitools.client.ApiClient; -import org.openapitools.client.model.Client; -import org.junit.Before; -import org.junit.Test; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * API tests for AnotherFakeApi - */ -public class AnotherFakeApiTest { - - private AnotherFakeApi api; - - @Before - public void setup() { - api = new ApiClient().createService(AnotherFakeApi.class); - } - - - /** - * To test special tags - * - * To test special tags - */ - @Test - public void testSpecialTagsTest() { - Client client = null; - // Client response = api.testSpecialTags(client); - - // TODO: test validations - } - -} diff --git a/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/api/FakeApiTest.java b/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/api/FakeApiTest.java deleted file mode 100644 index d055e54ede9..00000000000 --- a/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/api/FakeApiTest.java +++ /dev/null @@ -1,216 +0,0 @@ -package org.openapitools.client.api; - -import org.openapitools.client.ApiClient; -import java.math.BigDecimal; -import org.openapitools.client.model.Client; -import org.joda.time.DateTime; -import java.io.File; -import org.openapitools.client.model.FileSchemaTestClass; -import org.joda.time.LocalDate; -import org.openapitools.client.model.OuterComposite; -import org.openapitools.client.model.User; -import org.junit.Before; -import org.junit.Test; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * API tests for FakeApi - */ -public class FakeApiTest { - - private FakeApi api; - - @Before - public void setup() { - api = new ApiClient().createService(FakeApi.class); - } - - - /** - * - * - * Test serialization of outer boolean types - */ - @Test - public void fakeOuterBooleanSerializeTest() { - Boolean body = null; - // Boolean response = api.fakeOuterBooleanSerialize(body); - - // TODO: test validations - } - - /** - * - * - * Test serialization of object with outer number type - */ - @Test - public void fakeOuterCompositeSerializeTest() { - OuterComposite outerComposite = null; - // OuterComposite response = api.fakeOuterCompositeSerialize(outerComposite); - - // TODO: test validations - } - - /** - * - * - * Test serialization of outer number types - */ - @Test - public void fakeOuterNumberSerializeTest() { - BigDecimal body = null; - // BigDecimal response = api.fakeOuterNumberSerialize(body); - - // TODO: test validations - } - - /** - * - * - * Test serialization of outer string types - */ - @Test - public void fakeOuterStringSerializeTest() { - String body = null; - // String response = api.fakeOuterStringSerialize(body); - - // TODO: test validations - } - - /** - * - * - * For this test, the body for this request much reference a schema named `File`. - */ - @Test - public void testBodyWithFileSchemaTest() { - FileSchemaTestClass fileSchemaTestClass = null; - // api.testBodyWithFileSchema(fileSchemaTestClass); - - // TODO: test validations - } - - /** - * - * - * - */ - @Test - public void testBodyWithQueryParamsTest() { - String query = null; - User user = null; - // api.testBodyWithQueryParams(query, user); - - // TODO: test validations - } - - /** - * To test \"client\" model - * - * To test \"client\" model - */ - @Test - public void testClientModelTest() { - Client client = null; - // Client response = api.testClientModel(client); - - // TODO: test validations - } - - /** - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - * - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - */ - @Test - public void testEndpointParametersTest() { - BigDecimal number = null; - Double _double = null; - String patternWithoutDelimiter = null; - byte[] _byte = null; - Integer integer = null; - Integer int32 = null; - Long int64 = null; - Float _float = null; - String string = null; - File binary = null; - LocalDate date = null; - DateTime dateTime = null; - String password = null; - String paramCallback = null; - // api.testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback); - - // TODO: test validations - } - - /** - * To test enum parameters - * - * To test enum parameters - */ - @Test - public void testEnumParametersTest() { - List enumHeaderStringArray = null; - String enumHeaderString = null; - List enumQueryStringArray = null; - String enumQueryString = null; - Integer enumQueryInteger = null; - Double enumQueryDouble = null; - List enumFormStringArray = null; - String enumFormString = null; - // api.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); - - // TODO: test validations - } - - /** - * Fake endpoint to test group parameters (optional) - * - * Fake endpoint to test group parameters (optional) - */ - @Test - public void testGroupParametersTest() { - Integer requiredStringGroup = null; - Boolean requiredBooleanGroup = null; - Long requiredInt64Group = null; - Integer stringGroup = null; - Boolean booleanGroup = null; - Long int64Group = null; - // api.testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); - - // TODO: test validations - } - - /** - * test inline additionalProperties - * - * - */ - @Test - public void testInlineAdditionalPropertiesTest() { - Map requestBody = null; - // api.testInlineAdditionalProperties(requestBody); - - // TODO: test validations - } - - /** - * test json serialization of form data - * - * - */ - @Test - public void testJsonFormDataTest() { - String param = null; - String param2 = null; - // api.testJsonFormData(param, param2); - - // TODO: test validations - } - -} diff --git a/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/api/FakeClassnameTags123ApiTest.java b/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/api/FakeClassnameTags123ApiTest.java deleted file mode 100644 index 97a046dfd75..00000000000 --- a/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/api/FakeClassnameTags123ApiTest.java +++ /dev/null @@ -1,39 +0,0 @@ -package org.openapitools.client.api; - -import org.openapitools.client.ApiClient; -import org.openapitools.client.model.Client; -import org.junit.Before; -import org.junit.Test; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * API tests for FakeClassnameTags123Api - */ -public class FakeClassnameTags123ApiTest { - - private FakeClassnameTags123Api api; - - @Before - public void setup() { - api = new ApiClient().createService(FakeClassnameTags123Api.class); - } - - - /** - * To test class name in snake case - * - * To test class name in snake case - */ - @Test - public void testClassnameTest() { - Client client = null; - // Client response = api.testClassname(client); - - // TODO: test validations - } - -} diff --git a/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/api/PetApiTest.java b/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/api/PetApiTest.java deleted file mode 100644 index a8c246b20df..00000000000 --- a/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/api/PetApiTest.java +++ /dev/null @@ -1,137 +0,0 @@ -package org.openapitools.client.api; - -import org.openapitools.client.ApiClient; -import java.io.File; -import org.openapitools.client.model.ModelApiResponse; -import org.openapitools.client.model.Pet; -import org.junit.Before; -import org.junit.Test; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * API tests for PetApi - */ -public class PetApiTest { - - private PetApi api; - - @Before - public void setup() { - api = new ApiClient().createService(PetApi.class); - } - - - /** - * Add a new pet to the store - * - * - */ - @Test - public void addPetTest() { - Pet pet = null; - // api.addPet(pet); - - // TODO: test validations - } - - /** - * Deletes a pet - * - * - */ - @Test - public void deletePetTest() { - Long petId = null; - String apiKey = null; - // api.deletePet(petId, apiKey); - - // TODO: test validations - } - - /** - * Finds Pets by status - * - * Multiple status values can be provided with comma separated strings - */ - @Test - public void findPetsByStatusTest() { - List status = null; - // List response = api.findPetsByStatus(status); - - // TODO: test validations - } - - /** - * Finds Pets by tags - * - * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. - */ - @Test - public void findPetsByTagsTest() { - List tags = null; - // List response = api.findPetsByTags(tags); - - // TODO: test validations - } - - /** - * Find pet by ID - * - * Returns a single pet - */ - @Test - public void getPetByIdTest() { - Long petId = null; - // Pet response = api.getPetById(petId); - - // TODO: test validations - } - - /** - * Update an existing pet - * - * - */ - @Test - public void updatePetTest() { - Pet pet = null; - // api.updatePet(pet); - - // TODO: test validations - } - - /** - * Updates a pet in the store with form data - * - * - */ - @Test - public void updatePetWithFormTest() { - Long petId = null; - String name = null; - String status = null; - // api.updatePetWithForm(petId, name, status); - - // TODO: test validations - } - - /** - * uploads an image - * - * - */ - @Test - public void uploadFileTest() { - Long petId = null; - String additionalMetadata = null; - File file = null; - // ModelApiResponse response = api.uploadFile(petId, additionalMetadata, file); - - // TODO: test validations - } - -} diff --git a/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/api/StoreApiTest.java b/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/api/StoreApiTest.java deleted file mode 100644 index 1df591a0ece..00000000000 --- a/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/api/StoreApiTest.java +++ /dev/null @@ -1,77 +0,0 @@ -package org.openapitools.client.api; - -import org.openapitools.client.ApiClient; -import org.openapitools.client.model.Order; -import org.junit.Before; -import org.junit.Test; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * API tests for StoreApi - */ -public class StoreApiTest { - - private StoreApi api; - - @Before - public void setup() { - api = new ApiClient().createService(StoreApi.class); - } - - - /** - * Delete purchase order by ID - * - * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors - */ - @Test - public void deleteOrderTest() { - String orderId = null; - // api.deleteOrder(orderId); - - // TODO: test validations - } - - /** - * Returns pet inventories by status - * - * Returns a map of status codes to quantities - */ - @Test - public void getInventoryTest() { - // Map response = api.getInventory(); - - // TODO: test validations - } - - /** - * Find purchase order by ID - * - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions - */ - @Test - public void getOrderByIdTest() { - Long orderId = null; - // Order response = api.getOrderById(orderId); - - // TODO: test validations - } - - /** - * Place an order for a pet - * - * - */ - @Test - public void placeOrderTest() { - Order order = null; - // Order response = api.placeOrder(order); - - // TODO: test validations - } - -} diff --git a/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/api/UserApiTest.java b/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/api/UserApiTest.java deleted file mode 100644 index 4c24ea8a6e6..00000000000 --- a/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/api/UserApiTest.java +++ /dev/null @@ -1,131 +0,0 @@ -package org.openapitools.client.api; - -import org.openapitools.client.ApiClient; -import org.openapitools.client.model.User; -import org.junit.Before; -import org.junit.Test; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * API tests for UserApi - */ -public class UserApiTest { - - private UserApi api; - - @Before - public void setup() { - api = new ApiClient().createService(UserApi.class); - } - - - /** - * Create user - * - * This can only be done by the logged in user. - */ - @Test - public void createUserTest() { - User user = null; - // api.createUser(user); - - // TODO: test validations - } - - /** - * Creates list of users with given input array - * - * - */ - @Test - public void createUsersWithArrayInputTest() { - List user = null; - // api.createUsersWithArrayInput(user); - - // TODO: test validations - } - - /** - * Creates list of users with given input array - * - * - */ - @Test - public void createUsersWithListInputTest() { - List user = null; - // api.createUsersWithListInput(user); - - // TODO: test validations - } - - /** - * Delete user - * - * This can only be done by the logged in user. - */ - @Test - public void deleteUserTest() { - String username = null; - // api.deleteUser(username); - - // TODO: test validations - } - - /** - * Get user by user name - * - * - */ - @Test - public void getUserByNameTest() { - String username = null; - // User response = api.getUserByName(username); - - // TODO: test validations - } - - /** - * Logs user into the system - * - * - */ - @Test - public void loginUserTest() { - String username = null; - String password = null; - // String response = api.loginUser(username, password); - - // TODO: test validations - } - - /** - * Logs out current logged in user session - * - * - */ - @Test - public void logoutUserTest() { - // api.logoutUser(); - - // TODO: test validations - } - - /** - * Updated user - * - * This can only be done by the logged in user. - */ - @Test - public void updateUserTest() { - String username = null; - User user = null; - // api.updateUser(username, user); - - // TODO: test validations - } - -} diff --git a/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/model/AdditionalPropertiesAnyTypeTest.java b/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/model/AdditionalPropertiesAnyTypeTest.java deleted file mode 100644 index 656f0577161..00000000000 --- a/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/model/AdditionalPropertiesAnyTypeTest.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * 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. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; -import java.util.HashMap; -import java.util.Map; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for AdditionalPropertiesAnyType - */ -public class AdditionalPropertiesAnyTypeTest { - private final AdditionalPropertiesAnyType model = new AdditionalPropertiesAnyType(); - - /** - * Model tests for AdditionalPropertiesAnyType - */ - @Test - public void testAdditionalPropertiesAnyType() { - // TODO: test AdditionalPropertiesAnyType - } - - /** - * Test the property 'name' - */ - @Test - public void nameTest() { - // TODO: test name - } - -} diff --git a/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/model/AdditionalPropertiesArrayTest.java b/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/model/AdditionalPropertiesArrayTest.java deleted file mode 100644 index 4c5bdc4ffad..00000000000 --- a/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/model/AdditionalPropertiesArrayTest.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * 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. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for AdditionalPropertiesArray - */ -public class AdditionalPropertiesArrayTest { - private final AdditionalPropertiesArray model = new AdditionalPropertiesArray(); - - /** - * Model tests for AdditionalPropertiesArray - */ - @Test - public void testAdditionalPropertiesArray() { - // TODO: test AdditionalPropertiesArray - } - - /** - * Test the property 'name' - */ - @Test - public void nameTest() { - // TODO: test name - } - -} diff --git a/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/model/AdditionalPropertiesBooleanTest.java b/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/model/AdditionalPropertiesBooleanTest.java deleted file mode 100644 index de976999c63..00000000000 --- a/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/model/AdditionalPropertiesBooleanTest.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * 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. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; -import java.util.HashMap; -import java.util.Map; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for AdditionalPropertiesBoolean - */ -public class AdditionalPropertiesBooleanTest { - private final AdditionalPropertiesBoolean model = new AdditionalPropertiesBoolean(); - - /** - * Model tests for AdditionalPropertiesBoolean - */ - @Test - public void testAdditionalPropertiesBoolean() { - // TODO: test AdditionalPropertiesBoolean - } - - /** - * Test the property 'name' - */ - @Test - public void nameTest() { - // TODO: test name - } - -} diff --git a/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/model/AdditionalPropertiesClassTest.java b/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/model/AdditionalPropertiesClassTest.java deleted file mode 100644 index 3c18ad38c7e..00000000000 --- a/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/model/AdditionalPropertiesClassTest.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * 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. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for AdditionalPropertiesClass - */ -public class AdditionalPropertiesClassTest { - private final AdditionalPropertiesClass model = new AdditionalPropertiesClass(); - - /** - * Model tests for AdditionalPropertiesClass - */ - @Test - public void testAdditionalPropertiesClass() { - // TODO: test AdditionalPropertiesClass - } - - /** - * Test the property 'mapProperty' - */ - @Test - public void mapPropertyTest() { - // TODO: test mapProperty - } - - /** - * Test the property 'mapOfMapProperty' - */ - @Test - public void mapOfMapPropertyTest() { - // TODO: test mapOfMapProperty - } - -} diff --git a/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/model/AdditionalPropertiesIntegerTest.java b/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/model/AdditionalPropertiesIntegerTest.java deleted file mode 100644 index 712e0c131b1..00000000000 --- a/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/model/AdditionalPropertiesIntegerTest.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * 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. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; -import java.util.HashMap; -import java.util.Map; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for AdditionalPropertiesInteger - */ -public class AdditionalPropertiesIntegerTest { - private final AdditionalPropertiesInteger model = new AdditionalPropertiesInteger(); - - /** - * Model tests for AdditionalPropertiesInteger - */ - @Test - public void testAdditionalPropertiesInteger() { - // TODO: test AdditionalPropertiesInteger - } - - /** - * Test the property 'name' - */ - @Test - public void nameTest() { - // TODO: test name - } - -} diff --git a/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/model/AdditionalPropertiesNumberTest.java b/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/model/AdditionalPropertiesNumberTest.java deleted file mode 100644 index a2039fa83a5..00000000000 --- a/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/model/AdditionalPropertiesNumberTest.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * 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. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; -import java.math.BigDecimal; -import java.util.HashMap; -import java.util.Map; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for AdditionalPropertiesNumber - */ -public class AdditionalPropertiesNumberTest { - private final AdditionalPropertiesNumber model = new AdditionalPropertiesNumber(); - - /** - * Model tests for AdditionalPropertiesNumber - */ - @Test - public void testAdditionalPropertiesNumber() { - // TODO: test AdditionalPropertiesNumber - } - - /** - * Test the property 'name' - */ - @Test - public void nameTest() { - // TODO: test name - } - -} diff --git a/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/model/AdditionalPropertiesObjectTest.java b/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/model/AdditionalPropertiesObjectTest.java deleted file mode 100644 index 3c9fe9323b8..00000000000 --- a/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/model/AdditionalPropertiesObjectTest.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * 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. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; -import java.util.HashMap; -import java.util.Map; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for AdditionalPropertiesObject - */ -public class AdditionalPropertiesObjectTest { - private final AdditionalPropertiesObject model = new AdditionalPropertiesObject(); - - /** - * Model tests for AdditionalPropertiesObject - */ - @Test - public void testAdditionalPropertiesObject() { - // TODO: test AdditionalPropertiesObject - } - - /** - * Test the property 'name' - */ - @Test - public void nameTest() { - // TODO: test name - } - -} diff --git a/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/model/AdditionalPropertiesStringTest.java b/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/model/AdditionalPropertiesStringTest.java deleted file mode 100644 index 3a3942ab84d..00000000000 --- a/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/model/AdditionalPropertiesStringTest.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * 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. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; -import java.util.HashMap; -import java.util.Map; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for AdditionalPropertiesString - */ -public class AdditionalPropertiesStringTest { - private final AdditionalPropertiesString model = new AdditionalPropertiesString(); - - /** - * Model tests for AdditionalPropertiesString - */ - @Test - public void testAdditionalPropertiesString() { - // TODO: test AdditionalPropertiesString - } - - /** - * Test the property 'name' - */ - @Test - public void nameTest() { - // TODO: test name - } - -} diff --git a/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/model/AnimalTest.java b/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/model/AnimalTest.java deleted file mode 100644 index 30ed464f5e1..00000000000 --- a/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/model/AnimalTest.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * 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. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for Animal - */ -public class AnimalTest { - private final Animal model = new Animal(); - - /** - * Model tests for Animal - */ - @Test - public void testAnimal() { - // TODO: test Animal - } - - /** - * Test the property 'className' - */ - @Test - public void classNameTest() { - // TODO: test className - } - - /** - * Test the property 'color' - */ - @Test - public void colorTest() { - // TODO: test color - } - -} diff --git a/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnlyTest.java b/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnlyTest.java deleted file mode 100644 index 70947526050..00000000000 --- a/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnlyTest.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * 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. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; -import java.math.BigDecimal; -import java.util.ArrayList; -import java.util.List; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for ArrayOfArrayOfNumberOnly - */ -public class ArrayOfArrayOfNumberOnlyTest { - private final ArrayOfArrayOfNumberOnly model = new ArrayOfArrayOfNumberOnly(); - - /** - * Model tests for ArrayOfArrayOfNumberOnly - */ - @Test - public void testArrayOfArrayOfNumberOnly() { - // TODO: test ArrayOfArrayOfNumberOnly - } - - /** - * Test the property 'arrayArrayNumber' - */ - @Test - public void arrayArrayNumberTest() { - // TODO: test arrayArrayNumber - } - -} diff --git a/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/model/ArrayOfNumberOnlyTest.java b/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/model/ArrayOfNumberOnlyTest.java deleted file mode 100644 index 2f88d6ad4b9..00000000000 --- a/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/model/ArrayOfNumberOnlyTest.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * 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. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; -import java.math.BigDecimal; -import java.util.ArrayList; -import java.util.List; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for ArrayOfNumberOnly - */ -public class ArrayOfNumberOnlyTest { - private final ArrayOfNumberOnly model = new ArrayOfNumberOnly(); - - /** - * Model tests for ArrayOfNumberOnly - */ - @Test - public void testArrayOfNumberOnly() { - // TODO: test ArrayOfNumberOnly - } - - /** - * Test the property 'arrayNumber' - */ - @Test - public void arrayNumberTest() { - // TODO: test arrayNumber - } - -} diff --git a/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/model/ArrayTestTest.java b/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/model/ArrayTestTest.java deleted file mode 100644 index 3182aa65481..00000000000 --- a/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/model/ArrayTestTest.java +++ /dev/null @@ -1,70 +0,0 @@ -/* - * 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. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; -import org.openapitools.client.model.ReadOnlyFirst; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for ArrayTest - */ -public class ArrayTestTest { - private final ArrayTest model = new ArrayTest(); - - /** - * Model tests for ArrayTest - */ - @Test - public void testArrayTest() { - // TODO: test ArrayTest - } - - /** - * Test the property 'arrayOfString' - */ - @Test - public void arrayOfStringTest() { - // TODO: test arrayOfString - } - - /** - * Test the property 'arrayArrayOfInteger' - */ - @Test - public void arrayArrayOfIntegerTest() { - // TODO: test arrayArrayOfInteger - } - - /** - * Test the property 'arrayArrayOfModel' - */ - @Test - public void arrayArrayOfModelTest() { - // TODO: test arrayArrayOfModel - } - -} diff --git a/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/model/BigCatAllOfTest.java b/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/model/BigCatAllOfTest.java deleted file mode 100644 index f7f725106d1..00000000000 --- a/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/model/BigCatAllOfTest.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for BigCatAllOf - */ -public class BigCatAllOfTest { - private final BigCatAllOf model = new BigCatAllOf(); - - /** - * Model tests for BigCatAllOf - */ - @Test - public void testBigCatAllOf() { - // TODO: test BigCatAllOf - } - - /** - * Test the property 'kind' - */ - @Test - public void kindTest() { - // TODO: test kind - } - -} diff --git a/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/model/BigCatTest.java b/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/model/BigCatTest.java deleted file mode 100644 index 0cb50249725..00000000000 --- a/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/model/BigCatTest.java +++ /dev/null @@ -1,77 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; -import org.openapitools.client.model.BigCatAllOf; -import org.openapitools.client.model.Cat; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for BigCat - */ -public class BigCatTest { - private final BigCat model = new BigCat(); - - /** - * Model tests for BigCat - */ - @Test - public void testBigCat() { - // TODO: test BigCat - } - - /** - * Test the property 'className' - */ - @Test - public void classNameTest() { - // TODO: test className - } - - /** - * Test the property 'color' - */ - @Test - public void colorTest() { - // TODO: test color - } - - /** - * Test the property 'declawed' - */ - @Test - public void declawedTest() { - // TODO: test declawed - } - - /** - * Test the property 'kind' - */ - @Test - public void kindTest() { - // TODO: test kind - } - -} diff --git a/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/model/CapitalizationTest.java b/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/model/CapitalizationTest.java deleted file mode 100644 index 1d029ba7c50..00000000000 --- a/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/model/CapitalizationTest.java +++ /dev/null @@ -1,91 +0,0 @@ -/* - * 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. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for Capitalization - */ -public class CapitalizationTest { - private final Capitalization model = new Capitalization(); - - /** - * Model tests for Capitalization - */ - @Test - public void testCapitalization() { - // TODO: test Capitalization - } - - /** - * Test the property 'smallCamel' - */ - @Test - public void smallCamelTest() { - // TODO: test smallCamel - } - - /** - * Test the property 'capitalCamel' - */ - @Test - public void capitalCamelTest() { - // TODO: test capitalCamel - } - - /** - * Test the property 'smallSnake' - */ - @Test - public void smallSnakeTest() { - // TODO: test smallSnake - } - - /** - * Test the property 'capitalSnake' - */ - @Test - public void capitalSnakeTest() { - // TODO: test capitalSnake - } - - /** - * Test the property 'scAETHFlowPoints' - */ - @Test - public void scAETHFlowPointsTest() { - // TODO: test scAETHFlowPoints - } - - /** - * Test the property 'ATT_NAME' - */ - @Test - public void ATT_NAMETest() { - // TODO: test ATT_NAME - } - -} diff --git a/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/model/CatAllOfTest.java b/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/model/CatAllOfTest.java deleted file mode 100644 index 0473dc929e5..00000000000 --- a/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/model/CatAllOfTest.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * 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. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for CatAllOf - */ -public class CatAllOfTest { - private final CatAllOf model = new CatAllOf(); - - /** - * Model tests for CatAllOf - */ - @Test - public void testCatAllOf() { - // TODO: test CatAllOf - } - - /** - * Test the property 'declawed' - */ - @Test - public void declawedTest() { - // TODO: test declawed - } - -} diff --git a/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/model/CatTest.java b/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/model/CatTest.java deleted file mode 100644 index 718bb5b6baf..00000000000 --- a/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/model/CatTest.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * 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. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; -import org.openapitools.client.model.Animal; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for Cat - */ -public class CatTest { - private final Cat model = new Cat(); - - /** - * Model tests for Cat - */ - @Test - public void testCat() { - // TODO: test Cat - } - - /** - * Test the property 'className' - */ - @Test - public void classNameTest() { - // TODO: test className - } - - /** - * Test the property 'color' - */ - @Test - public void colorTest() { - // TODO: test color - } - - /** - * Test the property 'declawed' - */ - @Test - public void declawedTest() { - // TODO: test declawed - } - -} diff --git a/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/model/CategoryTest.java b/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/model/CategoryTest.java deleted file mode 100644 index 79374c54e6f..00000000000 --- a/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/model/CategoryTest.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * 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. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for Category - */ -public class CategoryTest { - private final Category model = new Category(); - - /** - * Model tests for Category - */ - @Test - public void testCategory() { - // TODO: test Category - } - - /** - * Test the property 'id' - */ - @Test - public void idTest() { - // TODO: test id - } - - /** - * Test the property 'name' - */ - @Test - public void nameTest() { - // TODO: test name - } - -} diff --git a/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/model/ClassModelTest.java b/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/model/ClassModelTest.java deleted file mode 100644 index 4c66db89c4f..00000000000 --- a/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/model/ClassModelTest.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * 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. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for ClassModel - */ -public class ClassModelTest { - private final ClassModel model = new ClassModel(); - - /** - * Model tests for ClassModel - */ - @Test - public void testClassModel() { - // TODO: test ClassModel - } - - /** - * Test the property 'propertyClass' - */ - @Test - public void propertyClassTest() { - // TODO: test propertyClass - } - -} diff --git a/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/model/ClientTest.java b/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/model/ClientTest.java deleted file mode 100644 index 1a9f6d6fc9e..00000000000 --- a/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/model/ClientTest.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * 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. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for Client - */ -public class ClientTest { - private final Client model = new Client(); - - /** - * Model tests for Client - */ - @Test - public void testClient() { - // TODO: test Client - } - - /** - * Test the property 'client' - */ - @Test - public void clientTest() { - // TODO: test client - } - -} diff --git a/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/model/DogAllOfTest.java b/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/model/DogAllOfTest.java deleted file mode 100644 index 7780c14a386..00000000000 --- a/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/model/DogAllOfTest.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * 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. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for DogAllOf - */ -public class DogAllOfTest { - private final DogAllOf model = new DogAllOf(); - - /** - * Model tests for DogAllOf - */ - @Test - public void testDogAllOf() { - // TODO: test DogAllOf - } - - /** - * Test the property 'breed' - */ - @Test - public void breedTest() { - // TODO: test breed - } - -} diff --git a/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/model/DogTest.java b/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/model/DogTest.java deleted file mode 100644 index 8392c174564..00000000000 --- a/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/model/DogTest.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * 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. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; -import org.openapitools.client.model.Animal; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for Dog - */ -public class DogTest { - private final Dog model = new Dog(); - - /** - * Model tests for Dog - */ - @Test - public void testDog() { - // TODO: test Dog - } - - /** - * Test the property 'className' - */ - @Test - public void classNameTest() { - // TODO: test className - } - - /** - * Test the property 'color' - */ - @Test - public void colorTest() { - // TODO: test color - } - - /** - * Test the property 'breed' - */ - @Test - public void breedTest() { - // TODO: test breed - } - -} diff --git a/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/model/EnumArraysTest.java b/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/model/EnumArraysTest.java deleted file mode 100644 index a116bb028fc..00000000000 --- a/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/model/EnumArraysTest.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * 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. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for EnumArrays - */ -public class EnumArraysTest { - private final EnumArrays model = new EnumArrays(); - - /** - * Model tests for EnumArrays - */ - @Test - public void testEnumArrays() { - // TODO: test EnumArrays - } - - /** - * Test the property 'justSymbol' - */ - @Test - public void justSymbolTest() { - // TODO: test justSymbol - } - - /** - * Test the property 'arrayEnum' - */ - @Test - public void arrayEnumTest() { - // TODO: test arrayEnum - } - -} diff --git a/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/model/EnumClassTest.java b/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/model/EnumClassTest.java deleted file mode 100644 index 97855ba723a..00000000000 --- a/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/model/EnumClassTest.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * 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. - */ - - -package org.openapitools.client.model; - -import com.google.gson.annotations.SerializedName; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for EnumClass - */ -public class EnumClassTest { - /** - * Model tests for EnumClass - */ - @Test - public void testEnumClass() { - // TODO: test EnumClass - } - -} diff --git a/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/model/EnumTestTest.java b/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/model/EnumTestTest.java deleted file mode 100644 index d43e3cace6d..00000000000 --- a/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/model/EnumTestTest.java +++ /dev/null @@ -1,84 +0,0 @@ -/* - * 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. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; -import org.openapitools.client.model.OuterEnum; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for EnumTest - */ -public class EnumTestTest { - private final EnumTest model = new EnumTest(); - - /** - * Model tests for EnumTest - */ - @Test - public void testEnumTest() { - // TODO: test EnumTest - } - - /** - * Test the property 'enumString' - */ - @Test - public void enumStringTest() { - // TODO: test enumString - } - - /** - * Test the property 'enumStringRequired' - */ - @Test - public void enumStringRequiredTest() { - // TODO: test enumStringRequired - } - - /** - * Test the property 'enumInteger' - */ - @Test - public void enumIntegerTest() { - // TODO: test enumInteger - } - - /** - * Test the property 'enumNumber' - */ - @Test - public void enumNumberTest() { - // TODO: test enumNumber - } - - /** - * Test the property 'outerEnum' - */ - @Test - public void outerEnumTest() { - // TODO: test outerEnum - } - -} diff --git a/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/model/FileSchemaTestClassTest.java b/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/model/FileSchemaTestClassTest.java deleted file mode 100644 index a960673c616..00000000000 --- a/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/model/FileSchemaTestClassTest.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * 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. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for FileSchemaTestClass - */ -public class FileSchemaTestClassTest { - private final FileSchemaTestClass model = new FileSchemaTestClass(); - - /** - * Model tests for FileSchemaTestClass - */ - @Test - public void testFileSchemaTestClass() { - // TODO: test FileSchemaTestClass - } - - /** - * Test the property 'file' - */ - @Test - public void fileTest() { - // TODO: test file - } - - /** - * Test the property 'files' - */ - @Test - public void filesTest() { - // TODO: test files - } - -} diff --git a/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/model/FormatTestTest.java b/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/model/FormatTestTest.java deleted file mode 100644 index 94195eeb9ee..00000000000 --- a/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/model/FormatTestTest.java +++ /dev/null @@ -1,152 +0,0 @@ -/* - * 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. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.File; -import java.io.IOException; -import java.math.BigDecimal; -import java.util.UUID; -import org.joda.time.DateTime; -import org.joda.time.LocalDate; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for FormatTest - */ -public class FormatTestTest { - private final FormatTest model = new FormatTest(); - - /** - * Model tests for FormatTest - */ - @Test - public void testFormatTest() { - // TODO: test FormatTest - } - - /** - * Test the property 'integer' - */ - @Test - public void integerTest() { - // TODO: test integer - } - - /** - * Test the property 'int32' - */ - @Test - public void int32Test() { - // TODO: test int32 - } - - /** - * Test the property 'int64' - */ - @Test - public void int64Test() { - // TODO: test int64 - } - - /** - * Test the property 'number' - */ - @Test - public void numberTest() { - // TODO: test number - } - - /** - * Test the property '_float' - */ - @Test - public void _floatTest() { - // TODO: test _float - } - - /** - * Test the property '_double' - */ - @Test - public void _doubleTest() { - // TODO: test _double - } - - /** - * Test the property 'string' - */ - @Test - public void stringTest() { - // TODO: test string - } - - /** - * Test the property '_byte' - */ - @Test - public void _byteTest() { - // TODO: test _byte - } - - /** - * Test the property 'binary' - */ - @Test - public void binaryTest() { - // TODO: test binary - } - - /** - * Test the property 'date' - */ - @Test - public void dateTest() { - // TODO: test date - } - - /** - * Test the property 'dateTime' - */ - @Test - public void dateTimeTest() { - // TODO: test dateTime - } - - /** - * Test the property 'uuid' - */ - @Test - public void uuidTest() { - // TODO: test uuid - } - - /** - * Test the property 'password' - */ - @Test - public void passwordTest() { - // TODO: test password - } - -} diff --git a/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/model/HasOnlyReadOnlyTest.java b/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/model/HasOnlyReadOnlyTest.java deleted file mode 100644 index d854c0c9daf..00000000000 --- a/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/model/HasOnlyReadOnlyTest.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * 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. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for HasOnlyReadOnly - */ -public class HasOnlyReadOnlyTest { - private final HasOnlyReadOnly model = new HasOnlyReadOnly(); - - /** - * Model tests for HasOnlyReadOnly - */ - @Test - public void testHasOnlyReadOnly() { - // TODO: test HasOnlyReadOnly - } - - /** - * Test the property 'bar' - */ - @Test - public void barTest() { - // TODO: test bar - } - - /** - * Test the property 'foo' - */ - @Test - public void fooTest() { - // TODO: test foo - } - -} diff --git a/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/model/MapTestTest.java b/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/model/MapTestTest.java deleted file mode 100644 index 9f78d486659..00000000000 --- a/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/model/MapTestTest.java +++ /dev/null @@ -1,78 +0,0 @@ -/* - * 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. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for MapTest - */ -public class MapTestTest { - private final MapTest model = new MapTest(); - - /** - * Model tests for MapTest - */ - @Test - public void testMapTest() { - // TODO: test MapTest - } - - /** - * Test the property 'mapMapOfString' - */ - @Test - public void mapMapOfStringTest() { - // TODO: test mapMapOfString - } - - /** - * Test the property 'mapOfEnumString' - */ - @Test - public void mapOfEnumStringTest() { - // TODO: test mapOfEnumString - } - - /** - * Test the property 'directMap' - */ - @Test - public void directMapTest() { - // TODO: test directMap - } - - /** - * Test the property 'indirectMap' - */ - @Test - public void indirectMapTest() { - // TODO: test indirectMap - } - -} diff --git a/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java b/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java deleted file mode 100644 index fc071c82dc7..00000000000 --- a/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java +++ /dev/null @@ -1,73 +0,0 @@ -/* - * 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. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.UUID; -import org.joda.time.DateTime; -import org.openapitools.client.model.Animal; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for MixedPropertiesAndAdditionalPropertiesClass - */ -public class MixedPropertiesAndAdditionalPropertiesClassTest { - private final MixedPropertiesAndAdditionalPropertiesClass model = new MixedPropertiesAndAdditionalPropertiesClass(); - - /** - * Model tests for MixedPropertiesAndAdditionalPropertiesClass - */ - @Test - public void testMixedPropertiesAndAdditionalPropertiesClass() { - // TODO: test MixedPropertiesAndAdditionalPropertiesClass - } - - /** - * Test the property 'uuid' - */ - @Test - public void uuidTest() { - // TODO: test uuid - } - - /** - * Test the property 'dateTime' - */ - @Test - public void dateTimeTest() { - // TODO: test dateTime - } - - /** - * Test the property 'map' - */ - @Test - public void mapTest() { - // TODO: test map - } - -} diff --git a/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/model/Model200ResponseTest.java b/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/model/Model200ResponseTest.java deleted file mode 100644 index dcea5877334..00000000000 --- a/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/model/Model200ResponseTest.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * 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. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for Model200Response - */ -public class Model200ResponseTest { - private final Model200Response model = new Model200Response(); - - /** - * Model tests for Model200Response - */ - @Test - public void testModel200Response() { - // TODO: test Model200Response - } - - /** - * Test the property 'name' - */ - @Test - public void nameTest() { - // TODO: test name - } - - /** - * Test the property 'propertyClass' - */ - @Test - public void propertyClassTest() { - // TODO: test propertyClass - } - -} diff --git a/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java b/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java deleted file mode 100644 index 46b8648fdcc..00000000000 --- a/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * 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. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for ModelApiResponse - */ -public class ModelApiResponseTest { - private final ModelApiResponse model = new ModelApiResponse(); - - /** - * Model tests for ModelApiResponse - */ - @Test - public void testModelApiResponse() { - // TODO: test ModelApiResponse - } - - /** - * Test the property 'code' - */ - @Test - public void codeTest() { - // TODO: test code - } - - /** - * Test the property 'type' - */ - @Test - public void typeTest() { - // TODO: test type - } - - /** - * Test the property 'message' - */ - @Test - public void messageTest() { - // TODO: test message - } - -} diff --git a/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/model/ModelReturnTest.java b/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/model/ModelReturnTest.java deleted file mode 100644 index 4135ead5686..00000000000 --- a/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/model/ModelReturnTest.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * 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. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for ModelReturn - */ -public class ModelReturnTest { - private final ModelReturn model = new ModelReturn(); - - /** - * Model tests for ModelReturn - */ - @Test - public void testModelReturn() { - // TODO: test ModelReturn - } - - /** - * Test the property '_return' - */ - @Test - public void _returnTest() { - // TODO: test _return - } - -} diff --git a/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/model/NameTest.java b/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/model/NameTest.java deleted file mode 100644 index bdc04b000c1..00000000000 --- a/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/model/NameTest.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - * 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. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for Name - */ -public class NameTest { - private final Name model = new Name(); - - /** - * Model tests for Name - */ - @Test - public void testName() { - // TODO: test Name - } - - /** - * Test the property 'name' - */ - @Test - public void nameTest() { - // TODO: test name - } - - /** - * Test the property 'snakeCase' - */ - @Test - public void snakeCaseTest() { - // TODO: test snakeCase - } - - /** - * Test the property 'property' - */ - @Test - public void propertyTest() { - // TODO: test property - } - - /** - * Test the property '_123number' - */ - @Test - public void _123numberTest() { - // TODO: test _123number - } - -} diff --git a/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/model/NumberOnlyTest.java b/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/model/NumberOnlyTest.java deleted file mode 100644 index 214a6d4538d..00000000000 --- a/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/model/NumberOnlyTest.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * 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. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; -import java.math.BigDecimal; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for NumberOnly - */ -public class NumberOnlyTest { - private final NumberOnly model = new NumberOnly(); - - /** - * Model tests for NumberOnly - */ - @Test - public void testNumberOnly() { - // TODO: test NumberOnly - } - - /** - * Test the property 'justNumber' - */ - @Test - public void justNumberTest() { - // TODO: test justNumber - } - -} diff --git a/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/model/OrderTest.java b/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/model/OrderTest.java deleted file mode 100644 index 6af24df542b..00000000000 --- a/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/model/OrderTest.java +++ /dev/null @@ -1,92 +0,0 @@ -/* - * 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. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; -import org.joda.time.DateTime; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for Order - */ -public class OrderTest { - private final Order model = new Order(); - - /** - * Model tests for Order - */ - @Test - public void testOrder() { - // TODO: test Order - } - - /** - * Test the property 'id' - */ - @Test - public void idTest() { - // TODO: test id - } - - /** - * Test the property 'petId' - */ - @Test - public void petIdTest() { - // TODO: test petId - } - - /** - * Test the property 'quantity' - */ - @Test - public void quantityTest() { - // TODO: test quantity - } - - /** - * Test the property 'shipDate' - */ - @Test - public void shipDateTest() { - // TODO: test shipDate - } - - /** - * Test the property 'status' - */ - @Test - public void statusTest() { - // TODO: test status - } - - /** - * Test the property 'complete' - */ - @Test - public void completeTest() { - // TODO: test complete - } - -} diff --git a/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/model/OuterCompositeTest.java b/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/model/OuterCompositeTest.java deleted file mode 100644 index 710bfedd580..00000000000 --- a/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/model/OuterCompositeTest.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * 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. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; -import java.math.BigDecimal; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for OuterComposite - */ -public class OuterCompositeTest { - private final OuterComposite model = new OuterComposite(); - - /** - * Model tests for OuterComposite - */ - @Test - public void testOuterComposite() { - // TODO: test OuterComposite - } - - /** - * Test the property 'myNumber' - */ - @Test - public void myNumberTest() { - // TODO: test myNumber - } - - /** - * Test the property 'myString' - */ - @Test - public void myStringTest() { - // TODO: test myString - } - - /** - * Test the property 'myBoolean' - */ - @Test - public void myBooleanTest() { - // TODO: test myBoolean - } - -} diff --git a/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/model/OuterEnumTest.java b/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/model/OuterEnumTest.java deleted file mode 100644 index 064f84b3ff6..00000000000 --- a/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/model/OuterEnumTest.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * 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. - */ - - -package org.openapitools.client.model; - -import com.google.gson.annotations.SerializedName; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for OuterEnum - */ -public class OuterEnumTest { - /** - * Model tests for OuterEnum - */ - @Test - public void testOuterEnum() { - // TODO: test OuterEnum - } - -} diff --git a/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/model/PetTest.java b/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/model/PetTest.java deleted file mode 100644 index 4e8e4c65827..00000000000 --- a/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/model/PetTest.java +++ /dev/null @@ -1,95 +0,0 @@ -/* - * 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. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; -import org.openapitools.client.model.Category; -import org.openapitools.client.model.Tag; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for Pet - */ -public class PetTest { - private final Pet model = new Pet(); - - /** - * Model tests for Pet - */ - @Test - public void testPet() { - // TODO: test Pet - } - - /** - * Test the property 'id' - */ - @Test - public void idTest() { - // TODO: test id - } - - /** - * Test the property 'category' - */ - @Test - public void categoryTest() { - // TODO: test category - } - - /** - * Test the property 'name' - */ - @Test - public void nameTest() { - // TODO: test name - } - - /** - * Test the property 'photoUrls' - */ - @Test - public void photoUrlsTest() { - // TODO: test photoUrls - } - - /** - * Test the property 'tags' - */ - @Test - public void tagsTest() { - // TODO: test tags - } - - /** - * Test the property 'status' - */ - @Test - public void statusTest() { - // TODO: test status - } - -} diff --git a/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/model/ReadOnlyFirstTest.java b/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/model/ReadOnlyFirstTest.java deleted file mode 100644 index c89b608f609..00000000000 --- a/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/model/ReadOnlyFirstTest.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * 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. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for ReadOnlyFirst - */ -public class ReadOnlyFirstTest { - private final ReadOnlyFirst model = new ReadOnlyFirst(); - - /** - * Model tests for ReadOnlyFirst - */ - @Test - public void testReadOnlyFirst() { - // TODO: test ReadOnlyFirst - } - - /** - * Test the property 'bar' - */ - @Test - public void barTest() { - // TODO: test bar - } - - /** - * Test the property 'baz' - */ - @Test - public void bazTest() { - // TODO: test baz - } - -} diff --git a/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/model/SpecialModelNameTest.java b/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/model/SpecialModelNameTest.java deleted file mode 100644 index d058c884e49..00000000000 --- a/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/model/SpecialModelNameTest.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * 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. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for SpecialModelName - */ -public class SpecialModelNameTest { - private final SpecialModelName model = new SpecialModelName(); - - /** - * Model tests for SpecialModelName - */ - @Test - public void testSpecialModelName() { - // TODO: test SpecialModelName - } - - /** - * Test the property '$specialPropertyName' - */ - @Test - public void $specialPropertyNameTest() { - // TODO: test $specialPropertyName - } - -} diff --git a/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/model/TagTest.java b/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/model/TagTest.java deleted file mode 100644 index 27acc7ce8e7..00000000000 --- a/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/model/TagTest.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * 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. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for Tag - */ -public class TagTest { - private final Tag model = new Tag(); - - /** - * Model tests for Tag - */ - @Test - public void testTag() { - // TODO: test Tag - } - - /** - * Test the property 'id' - */ - @Test - public void idTest() { - // TODO: test id - } - - /** - * Test the property 'name' - */ - @Test - public void nameTest() { - // TODO: test name - } - -} diff --git a/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/model/TypeHolderDefaultTest.java b/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/model/TypeHolderDefaultTest.java deleted file mode 100644 index f120407395a..00000000000 --- a/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/model/TypeHolderDefaultTest.java +++ /dev/null @@ -1,86 +0,0 @@ -/* - * 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. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; -import java.math.BigDecimal; -import java.util.ArrayList; -import java.util.List; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for TypeHolderDefault - */ -public class TypeHolderDefaultTest { - private final TypeHolderDefault model = new TypeHolderDefault(); - - /** - * Model tests for TypeHolderDefault - */ - @Test - public void testTypeHolderDefault() { - // TODO: test TypeHolderDefault - } - - /** - * Test the property 'stringItem' - */ - @Test - public void stringItemTest() { - // TODO: test stringItem - } - - /** - * Test the property 'numberItem' - */ - @Test - public void numberItemTest() { - // TODO: test numberItem - } - - /** - * Test the property 'integerItem' - */ - @Test - public void integerItemTest() { - // TODO: test integerItem - } - - /** - * Test the property 'boolItem' - */ - @Test - public void boolItemTest() { - // TODO: test boolItem - } - - /** - * Test the property 'arrayItem' - */ - @Test - public void arrayItemTest() { - // TODO: test arrayItem - } - -} diff --git a/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/model/TypeHolderExampleTest.java b/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/model/TypeHolderExampleTest.java deleted file mode 100644 index 5e99dff0cae..00000000000 --- a/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/model/TypeHolderExampleTest.java +++ /dev/null @@ -1,86 +0,0 @@ -/* - * 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. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; -import java.math.BigDecimal; -import java.util.ArrayList; -import java.util.List; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for TypeHolderExample - */ -public class TypeHolderExampleTest { - private final TypeHolderExample model = new TypeHolderExample(); - - /** - * Model tests for TypeHolderExample - */ - @Test - public void testTypeHolderExample() { - // TODO: test TypeHolderExample - } - - /** - * Test the property 'stringItem' - */ - @Test - public void stringItemTest() { - // TODO: test stringItem - } - - /** - * Test the property 'numberItem' - */ - @Test - public void numberItemTest() { - // TODO: test numberItem - } - - /** - * Test the property 'integerItem' - */ - @Test - public void integerItemTest() { - // TODO: test integerItem - } - - /** - * Test the property 'boolItem' - */ - @Test - public void boolItemTest() { - // TODO: test boolItem - } - - /** - * Test the property 'arrayItem' - */ - @Test - public void arrayItemTest() { - // TODO: test arrayItem - } - -} diff --git a/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/model/UserTest.java b/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/model/UserTest.java deleted file mode 100644 index da1c9bda4b5..00000000000 --- a/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/model/UserTest.java +++ /dev/null @@ -1,107 +0,0 @@ -/* - * 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. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for User - */ -public class UserTest { - private final User model = new User(); - - /** - * Model tests for User - */ - @Test - public void testUser() { - // TODO: test User - } - - /** - * Test the property 'id' - */ - @Test - public void idTest() { - // TODO: test id - } - - /** - * Test the property 'username' - */ - @Test - public void usernameTest() { - // TODO: test username - } - - /** - * Test the property 'firstName' - */ - @Test - public void firstNameTest() { - // TODO: test firstName - } - - /** - * Test the property 'lastName' - */ - @Test - public void lastNameTest() { - // TODO: test lastName - } - - /** - * Test the property 'email' - */ - @Test - public void emailTest() { - // TODO: test email - } - - /** - * Test the property 'password' - */ - @Test - public void passwordTest() { - // TODO: test password - } - - /** - * Test the property 'phone' - */ - @Test - public void phoneTest() { - // TODO: test phone - } - - /** - * Test the property 'userStatus' - */ - @Test - public void userStatusTest() { - // TODO: test userStatus - } - -} diff --git a/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/model/XmlItemTest.java b/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/model/XmlItemTest.java deleted file mode 100644 index 5e861e18621..00000000000 --- a/samples/client/petstore/java/retrofit/src/test/java/org/openapitools/client/model/XmlItemTest.java +++ /dev/null @@ -1,278 +0,0 @@ -/* - * 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. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; -import java.math.BigDecimal; -import java.util.ArrayList; -import java.util.List; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for XmlItem - */ -public class XmlItemTest { - private final XmlItem model = new XmlItem(); - - /** - * Model tests for XmlItem - */ - @Test - public void testXmlItem() { - // TODO: test XmlItem - } - - /** - * Test the property 'attributeString' - */ - @Test - public void attributeStringTest() { - // TODO: test attributeString - } - - /** - * Test the property 'attributeNumber' - */ - @Test - public void attributeNumberTest() { - // TODO: test attributeNumber - } - - /** - * Test the property 'attributeInteger' - */ - @Test - public void attributeIntegerTest() { - // TODO: test attributeInteger - } - - /** - * Test the property 'attributeBoolean' - */ - @Test - public void attributeBooleanTest() { - // TODO: test attributeBoolean - } - - /** - * Test the property 'wrappedArray' - */ - @Test - public void wrappedArrayTest() { - // TODO: test wrappedArray - } - - /** - * Test the property 'nameString' - */ - @Test - public void nameStringTest() { - // TODO: test nameString - } - - /** - * Test the property 'nameNumber' - */ - @Test - public void nameNumberTest() { - // TODO: test nameNumber - } - - /** - * Test the property 'nameInteger' - */ - @Test - public void nameIntegerTest() { - // TODO: test nameInteger - } - - /** - * Test the property 'nameBoolean' - */ - @Test - public void nameBooleanTest() { - // TODO: test nameBoolean - } - - /** - * Test the property 'nameArray' - */ - @Test - public void nameArrayTest() { - // TODO: test nameArray - } - - /** - * Test the property 'nameWrappedArray' - */ - @Test - public void nameWrappedArrayTest() { - // TODO: test nameWrappedArray - } - - /** - * Test the property 'prefixString' - */ - @Test - public void prefixStringTest() { - // TODO: test prefixString - } - - /** - * Test the property 'prefixNumber' - */ - @Test - public void prefixNumberTest() { - // TODO: test prefixNumber - } - - /** - * Test the property 'prefixInteger' - */ - @Test - public void prefixIntegerTest() { - // TODO: test prefixInteger - } - - /** - * Test the property 'prefixBoolean' - */ - @Test - public void prefixBooleanTest() { - // TODO: test prefixBoolean - } - - /** - * Test the property 'prefixArray' - */ - @Test - public void prefixArrayTest() { - // TODO: test prefixArray - } - - /** - * Test the property 'prefixWrappedArray' - */ - @Test - public void prefixWrappedArrayTest() { - // TODO: test prefixWrappedArray - } - - /** - * Test the property 'namespaceString' - */ - @Test - public void namespaceStringTest() { - // TODO: test namespaceString - } - - /** - * Test the property 'namespaceNumber' - */ - @Test - public void namespaceNumberTest() { - // TODO: test namespaceNumber - } - - /** - * Test the property 'namespaceInteger' - */ - @Test - public void namespaceIntegerTest() { - // TODO: test namespaceInteger - } - - /** - * Test the property 'namespaceBoolean' - */ - @Test - public void namespaceBooleanTest() { - // TODO: test namespaceBoolean - } - - /** - * Test the property 'namespaceArray' - */ - @Test - public void namespaceArrayTest() { - // TODO: test namespaceArray - } - - /** - * Test the property 'namespaceWrappedArray' - */ - @Test - public void namespaceWrappedArrayTest() { - // TODO: test namespaceWrappedArray - } - - /** - * Test the property 'prefixNamespaceString' - */ - @Test - public void prefixNamespaceStringTest() { - // TODO: test prefixNamespaceString - } - - /** - * Test the property 'prefixNamespaceNumber' - */ - @Test - public void prefixNamespaceNumberTest() { - // TODO: test prefixNamespaceNumber - } - - /** - * Test the property 'prefixNamespaceInteger' - */ - @Test - public void prefixNamespaceIntegerTest() { - // TODO: test prefixNamespaceInteger - } - - /** - * Test the property 'prefixNamespaceBoolean' - */ - @Test - public void prefixNamespaceBooleanTest() { - // TODO: test prefixNamespaceBoolean - } - - /** - * Test the property 'prefixNamespaceArray' - */ - @Test - public void prefixNamespaceArrayTest() { - // TODO: test prefixNamespaceArray - } - - /** - * Test the property 'prefixNamespaceWrappedArray' - */ - @Test - public void prefixNamespaceWrappedArrayTest() { - // TODO: test prefixNamespaceWrappedArray - } - -} diff --git a/samples/client/petstore/python-experimental/petstore_api/model_utils.py b/samples/client/petstore/python-experimental/petstore_api/model_utils.py index 91225e19fcb..982115862d6 100644 --- a/samples/client/petstore/python-experimental/petstore_api/model_utils.py +++ b/samples/client/petstore/python-experimental/petstore_api/model_utils.py @@ -138,16 +138,8 @@ class OpenApiModel(object): # pick a new schema/class to instantiate because a discriminator # propertyName value was passed in - # Build a list containing all oneOf and anyOf descendants. - oneof_anyof_classes = None - if cls._composed_schemas is not None: - oneof_anyof_classes = ( - cls._composed_schemas.get('oneOf', ()) + - cls._composed_schemas.get('anyOf', ())) - if (oneof_anyof_classes and none_type in oneof_anyof_classes and - len(args) == 1 and args[0] is None): - # The input data is the 'null' value AND one of the oneOf/anyOf children - # is the 'null' type (which is introduced in OAS schema >= 3.1). + if len(args) == 1 and args[0] is None and is_type_nullable(cls): + # The input data is the 'null' value and the type is nullable. return None visited_composed_classes = kwargs.get('_visited_composed_classes', ()) @@ -155,26 +147,22 @@ class OpenApiModel(object): cls.discriminator is None or cls in visited_composed_classes ): - # This openapi schema (cls) does not have a discriminator - # Or we have already visited this class before and are sure that we - # want to instantiate it this time. + # Use case 1: this openapi schema (cls) does not have a discriminator + # Use case 2: we have already visited this class before and are sure that we + # want to instantiate it this time. We have visited this class deserializing + # a payload with a discriminator. During that process we traveled through + # this class but did not make an instance of it. Now we are making an + # instance of a composed class which contains cls in it, so this time make an instance of cls. # - # If we are making an instance of a composed schema Descendent - # which allOf includes Ancestor, then Ancestor contains - # a discriminator that includes Descendent. - # So if we make an instance of Descendent, we have to make an - # instance of Ancestor to hold the allOf properties. - # This code detects that use case and makes the instance of Ancestor - # For example: - # When making an instance of Dog, _visited_composed_classes = (Dog,) - # then we make an instance of Animal to include in dog._composed_instances - # so when we are here, cls is Animal - # cls.discriminator != None - # cls not in _visited_composed_classes - # new_cls = Dog - # but we know we know that we already have Dog - # because it is in visited_composed_classes - # so make Animal here + # Here's an example of use case 2: If Animal has a discriminator + # petType and we pass in "Dog", and the class Dog + # allOf includes Animal, we move through Animal + # once using the discriminator, and pick Dog. + # Then in the composed schema dog Dog, we will make an instance of the + # Animal class (because Dal has allOf: Animal) but this time we won't travel + # through Animal's discriminator because we passed in + # _visited_composed_classes = (Animal,) + return super(OpenApiModel, cls).__new__(cls) # Get the name and value of the discriminator property. @@ -213,9 +201,30 @@ class OpenApiModel(object): ) if new_cls in visited_composed_classes: - # if we are coming from the chosen new_cls use cls instead + # if we are making an instance of a composed schema Descendent + # which allOf includes Ancestor, then Ancestor contains + # a discriminator that includes Descendent. + # So if we make an instance of Descendent, we have to make an + # instance of Ancestor to hold the allOf properties. + # This code detects that use case and makes the instance of Ancestor + # For example: + # When making an instance of Dog, _visited_composed_classes = (Dog,) + # then we make an instance of Animal to include in dog._composed_instances + # so when we are here, cls is Animal + # cls.discriminator != None + # cls not in _visited_composed_classes + # new_cls = Dog + # but we know we know that we already have Dog + # because it is in visited_composed_classes + # so make Animal here return super(OpenApiModel, cls).__new__(cls) + # Build a list containing all oneOf and anyOf descendants. + oneof_anyof_classes = None + if cls._composed_schemas is not None: + oneof_anyof_classes = ( + cls._composed_schemas.get('oneOf', ()) + + cls._composed_schemas.get('anyOf', ())) oneof_anyof_child = new_cls in oneof_anyof_classes kwargs['_visited_composed_classes'] = visited_composed_classes + (cls,) @@ -1033,18 +1042,20 @@ def get_discriminator_class(model_class, used_model_class = class_name_to_discr_class.get(discr_value) if used_model_class is None: # We didn't find a discriminated class in class_name_to_discr_class. + # So look in the ancestor or descendant discriminators # The discriminator mapping may exist in a descendant (anyOf, oneOf) # or ancestor (allOf). - # Ancestor example: in the "Dog -> Mammal -> Chordate -> Animal" + # Ancestor example: in the GrandparentAnimal -> ParentPet -> ChildCat # hierarchy, the discriminator mappings may be defined at any level - # in the hieararchy. - # Descendant example: a schema is oneOf[Plant, Mammal], and each - # oneOf child may itself be an allOf with some arbitrary hierarchy, - # and a graph traversal is required to find the discriminator. - composed_children = model_class._composed_schemas.get('oneOf', ()) + \ - model_class._composed_schemas.get('anyOf', ()) + \ - model_class._composed_schemas.get('allOf', ()) - for cls in composed_children: + # in the hierarchy. + # Descendant example: mammal -> whale/zebra/Pig -> BasquePig/DanishPig + # if we try to make BasquePig from mammal, we need to travel through + # the oneOf descendant discriminators to find BasquePig + descendant_classes = model_class._composed_schemas.get('oneOf', ()) + \ + model_class._composed_schemas.get('anyOf', ()) + ancestor_classes = model_class._composed_schemas.get('allOf', ()) + possible_classes = descendant_classes + ancestor_classes + for cls in possible_classes: # Check if the schema has inherited discriminators. if hasattr(cls, 'discriminator') and cls.discriminator is not None: used_model_class = get_discriminator_class( @@ -1204,8 +1215,10 @@ def is_type_nullable(input_type): """ if input_type is none_type: return True + if issubclass(input_type, OpenApiModel) and input_type._nullable: + return True if issubclass(input_type, ModelComposed): - # If oneOf/anyOf, check if the 'null' type is one of the allowed types. + # If oneOf/anyOf, check if the 'null' type is one of the allowed types. for t in input_type._composed_schemas.get('oneOf', ()): if is_type_nullable(t): return True for t in input_type._composed_schemas.get('anyOf', ()): diff --git a/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_any_type.py b/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_any_type.py index 4475d61d6f2..7ea7b1f807b 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_any_type.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_any_type.py @@ -18,6 +18,7 @@ import six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -66,6 +67,8 @@ class AdditionalPropertiesAnyType(ModelNormal): additional_properties_type = (bool, date, datetime, dict, float, int, list, str,) # noqa: E501 + _nullable = False + @cached_property def openapi_types(): """ @@ -100,7 +103,7 @@ class AdditionalPropertiesAnyType(ModelNormal): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """additional_properties_any_type.AdditionalPropertiesAnyType - a model defined in OpenAPI Keyword Args: @@ -137,6 +140,22 @@ class AdditionalPropertiesAnyType(ModelNormal): name (str): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_array.py b/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_array.py index 4a0da3ef8bc..5dc25499eaf 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_array.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_array.py @@ -18,6 +18,7 @@ import six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -66,6 +67,8 @@ class AdditionalPropertiesArray(ModelNormal): additional_properties_type = ([bool, date, datetime, dict, float, int, list, str],) # noqa: E501 + _nullable = False + @cached_property def openapi_types(): """ @@ -100,7 +103,7 @@ class AdditionalPropertiesArray(ModelNormal): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """additional_properties_array.AdditionalPropertiesArray - a model defined in OpenAPI Keyword Args: @@ -137,6 +140,22 @@ class AdditionalPropertiesArray(ModelNormal): name (str): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_boolean.py b/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_boolean.py index 93b052b54c1..ae3b7cd9dc0 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_boolean.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_boolean.py @@ -18,6 +18,7 @@ import six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -66,6 +67,8 @@ class AdditionalPropertiesBoolean(ModelNormal): additional_properties_type = (bool,) # noqa: E501 + _nullable = False + @cached_property def openapi_types(): """ @@ -100,7 +103,7 @@ class AdditionalPropertiesBoolean(ModelNormal): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """additional_properties_boolean.AdditionalPropertiesBoolean - a model defined in OpenAPI Keyword Args: @@ -137,6 +140,22 @@ class AdditionalPropertiesBoolean(ModelNormal): name (str): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_class.py b/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_class.py index 6064f3ffd09..1b98c5f06e5 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_class.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_class.py @@ -18,6 +18,7 @@ import six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -66,6 +67,8 @@ class AdditionalPropertiesClass(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ @@ -120,7 +123,7 @@ class AdditionalPropertiesClass(ModelNormal): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """additional_properties_class.AdditionalPropertiesClass - a model defined in OpenAPI Keyword Args: @@ -167,6 +170,22 @@ class AdditionalPropertiesClass(ModelNormal): anytype_3 (bool, date, datetime, dict, float, int, list, str): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_integer.py b/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_integer.py index e58c456a32f..005c26263ab 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_integer.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_integer.py @@ -18,6 +18,7 @@ import six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -66,6 +67,8 @@ class AdditionalPropertiesInteger(ModelNormal): additional_properties_type = (int,) # noqa: E501 + _nullable = False + @cached_property def openapi_types(): """ @@ -100,7 +103,7 @@ class AdditionalPropertiesInteger(ModelNormal): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """additional_properties_integer.AdditionalPropertiesInteger - a model defined in OpenAPI Keyword Args: @@ -137,6 +140,22 @@ class AdditionalPropertiesInteger(ModelNormal): name (str): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_number.py b/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_number.py index bda68b94168..fca97fca089 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_number.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_number.py @@ -18,6 +18,7 @@ import six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -66,6 +67,8 @@ class AdditionalPropertiesNumber(ModelNormal): additional_properties_type = (float,) # noqa: E501 + _nullable = False + @cached_property def openapi_types(): """ @@ -100,7 +103,7 @@ class AdditionalPropertiesNumber(ModelNormal): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """additional_properties_number.AdditionalPropertiesNumber - a model defined in OpenAPI Keyword Args: @@ -137,6 +140,22 @@ class AdditionalPropertiesNumber(ModelNormal): name (str): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_object.py b/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_object.py index 49e2428be06..03ca022e6f8 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_object.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_object.py @@ -18,6 +18,7 @@ import six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -66,6 +67,8 @@ class AdditionalPropertiesObject(ModelNormal): additional_properties_type = ({str: (bool, date, datetime, dict, float, int, list, str,)},) # noqa: E501 + _nullable = False + @cached_property def openapi_types(): """ @@ -100,7 +103,7 @@ class AdditionalPropertiesObject(ModelNormal): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """additional_properties_object.AdditionalPropertiesObject - a model defined in OpenAPI Keyword Args: @@ -137,6 +140,22 @@ class AdditionalPropertiesObject(ModelNormal): name (str): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_string.py b/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_string.py index 8f1b0c0857e..7144f66699b 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_string.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_string.py @@ -18,6 +18,7 @@ import six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -66,6 +67,8 @@ class AdditionalPropertiesString(ModelNormal): additional_properties_type = (str,) # noqa: E501 + _nullable = False + @cached_property def openapi_types(): """ @@ -100,7 +103,7 @@ class AdditionalPropertiesString(ModelNormal): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """additional_properties_string.AdditionalPropertiesString - a model defined in OpenAPI Keyword Args: @@ -137,6 +140,22 @@ class AdditionalPropertiesString(ModelNormal): name (str): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/client/petstore/python-experimental/petstore_api/models/animal.py b/samples/client/petstore/python-experimental/petstore_api/models/animal.py index 7e4a748fdc3..641c9c16e27 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/animal.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/animal.py @@ -18,6 +18,7 @@ import six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -76,6 +77,8 @@ class Animal(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ @@ -118,7 +121,7 @@ class Animal(ModelNormal): ]) @convert_js_args_to_python_args - def __init__(self, class_name, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, class_name, *args, **kwargs): # noqa: E501 """animal.Animal - a model defined in OpenAPI Args: @@ -158,6 +161,22 @@ class Animal(ModelNormal): color (str): [optional] if omitted the server will use the default value of 'red' # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/client/petstore/python-experimental/petstore_api/models/api_response.py b/samples/client/petstore/python-experimental/petstore_api/models/api_response.py index 3b49eaca1d2..c921519b878 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/api_response.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/api_response.py @@ -18,6 +18,7 @@ import six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -66,6 +67,8 @@ class ApiResponse(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ @@ -104,7 +107,7 @@ class ApiResponse(ModelNormal): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """api_response.ApiResponse - a model defined in OpenAPI Keyword Args: @@ -143,6 +146,22 @@ class ApiResponse(ModelNormal): message (str): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/client/petstore/python-experimental/petstore_api/models/array_of_array_of_number_only.py b/samples/client/petstore/python-experimental/petstore_api/models/array_of_array_of_number_only.py index 298cfdebb36..b9f52d6ba7b 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/array_of_array_of_number_only.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/array_of_array_of_number_only.py @@ -18,6 +18,7 @@ import six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -66,6 +67,8 @@ class ArrayOfArrayOfNumberOnly(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ @@ -100,7 +103,7 @@ class ArrayOfArrayOfNumberOnly(ModelNormal): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """array_of_array_of_number_only.ArrayOfArrayOfNumberOnly - a model defined in OpenAPI Keyword Args: @@ -137,6 +140,22 @@ class ArrayOfArrayOfNumberOnly(ModelNormal): array_array_number ([[float]]): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/client/petstore/python-experimental/petstore_api/models/array_of_number_only.py b/samples/client/petstore/python-experimental/petstore_api/models/array_of_number_only.py index 756bb0f5fb9..45021fef4c5 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/array_of_number_only.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/array_of_number_only.py @@ -18,6 +18,7 @@ import six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -66,6 +67,8 @@ class ArrayOfNumberOnly(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ @@ -100,7 +103,7 @@ class ArrayOfNumberOnly(ModelNormal): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """array_of_number_only.ArrayOfNumberOnly - a model defined in OpenAPI Keyword Args: @@ -137,6 +140,22 @@ class ArrayOfNumberOnly(ModelNormal): array_number ([float]): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/client/petstore/python-experimental/petstore_api/models/array_test.py b/samples/client/petstore/python-experimental/petstore_api/models/array_test.py index 25396bbcf21..0eed8d05461 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/array_test.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/array_test.py @@ -18,6 +18,7 @@ import six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -71,6 +72,8 @@ class ArrayTest(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ @@ -109,7 +112,7 @@ class ArrayTest(ModelNormal): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """array_test.ArrayTest - a model defined in OpenAPI Keyword Args: @@ -148,6 +151,22 @@ class ArrayTest(ModelNormal): array_array_of_model ([[read_only_first.ReadOnlyFirst]]): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/client/petstore/python-experimental/petstore_api/models/capitalization.py b/samples/client/petstore/python-experimental/petstore_api/models/capitalization.py index 2f519f66bb8..06745009d8b 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/capitalization.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/capitalization.py @@ -18,6 +18,7 @@ import six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -66,6 +67,8 @@ class Capitalization(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ @@ -110,7 +113,7 @@ class Capitalization(ModelNormal): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """capitalization.Capitalization - a model defined in OpenAPI Keyword Args: @@ -152,6 +155,22 @@ class Capitalization(ModelNormal): att_name (str): Name of the pet . [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/client/petstore/python-experimental/petstore_api/models/cat.py b/samples/client/petstore/python-experimental/petstore_api/models/cat.py index d32b2ebf81e..9620612169b 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/cat.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/cat.py @@ -18,6 +18,7 @@ import six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -76,6 +77,8 @@ class Cat(ModelComposed): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ @@ -119,7 +122,7 @@ class Cat(ModelComposed): ]) @convert_js_args_to_python_args - def __init__(self, class_name, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, class_name, *args, **kwargs): # noqa: E501 """cat.Cat - a model defined in OpenAPI Args: @@ -160,6 +163,22 @@ class Cat(ModelComposed): color (str): [optional] if omitted the server will use the default value of 'red' # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/client/petstore/python-experimental/petstore_api/models/cat_all_of.py b/samples/client/petstore/python-experimental/petstore_api/models/cat_all_of.py index 855371673ac..49ae9462f49 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/cat_all_of.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/cat_all_of.py @@ -18,6 +18,7 @@ import six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -66,6 +67,8 @@ class CatAllOf(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ @@ -100,7 +103,7 @@ class CatAllOf(ModelNormal): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """cat_all_of.CatAllOf - a model defined in OpenAPI Keyword Args: @@ -137,6 +140,22 @@ class CatAllOf(ModelNormal): declawed (bool): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/client/petstore/python-experimental/petstore_api/models/category.py b/samples/client/petstore/python-experimental/petstore_api/models/category.py index 35eb224e17a..16e4a33d4f0 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/category.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/category.py @@ -18,6 +18,7 @@ import six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -66,6 +67,8 @@ class Category(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ @@ -102,7 +105,7 @@ class Category(ModelNormal): ]) @convert_js_args_to_python_args - def __init__(self, name='default-name', _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """category.Category - a model defined in OpenAPI Args: @@ -142,6 +145,23 @@ class Category(ModelNormal): id (int): [optional] # noqa: E501 """ + name = kwargs.get('name', 'default-name') + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/client/petstore/python-experimental/petstore_api/models/child.py b/samples/client/petstore/python-experimental/petstore_api/models/child.py index d1dfadd0f21..7be69a7d528 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/child.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/child.py @@ -18,6 +18,7 @@ import six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -76,6 +77,8 @@ class Child(ModelComposed): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ @@ -115,7 +118,7 @@ class Child(ModelComposed): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """child.Child - a model defined in OpenAPI Keyword Args: @@ -154,6 +157,22 @@ class Child(ModelComposed): inter_net (bool): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/client/petstore/python-experimental/petstore_api/models/child_all_of.py b/samples/client/petstore/python-experimental/petstore_api/models/child_all_of.py index 96f0ecc7705..26e6018acf7 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/child_all_of.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/child_all_of.py @@ -18,6 +18,7 @@ import six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -66,6 +67,8 @@ class ChildAllOf(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ @@ -100,7 +103,7 @@ class ChildAllOf(ModelNormal): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """child_all_of.ChildAllOf - a model defined in OpenAPI Keyword Args: @@ -137,6 +140,22 @@ class ChildAllOf(ModelNormal): inter_net (bool): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/client/petstore/python-experimental/petstore_api/models/child_cat.py b/samples/client/petstore/python-experimental/petstore_api/models/child_cat.py index 3d79c435841..873c3bc76cf 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/child_cat.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/child_cat.py @@ -18,6 +18,7 @@ import six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -76,6 +77,8 @@ class ChildCat(ModelComposed): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ @@ -117,7 +120,7 @@ class ChildCat(ModelComposed): ]) @convert_js_args_to_python_args - def __init__(self, pet_type, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, pet_type, *args, **kwargs): # noqa: E501 """child_cat.ChildCat - a model defined in OpenAPI Args: @@ -157,6 +160,22 @@ class ChildCat(ModelComposed): name (str): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/client/petstore/python-experimental/petstore_api/models/child_cat_all_of.py b/samples/client/petstore/python-experimental/petstore_api/models/child_cat_all_of.py index f159c32fd86..1ddf92fb122 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/child_cat_all_of.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/child_cat_all_of.py @@ -18,6 +18,7 @@ import six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -66,6 +67,8 @@ class ChildCatAllOf(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ @@ -100,7 +103,7 @@ class ChildCatAllOf(ModelNormal): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """child_cat_all_of.ChildCatAllOf - a model defined in OpenAPI Keyword Args: @@ -137,6 +140,22 @@ class ChildCatAllOf(ModelNormal): name (str): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/client/petstore/python-experimental/petstore_api/models/child_dog.py b/samples/client/petstore/python-experimental/petstore_api/models/child_dog.py index d747e269486..a49f042cf74 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/child_dog.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/child_dog.py @@ -18,6 +18,7 @@ import six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -76,6 +77,8 @@ class ChildDog(ModelComposed): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ @@ -117,7 +120,7 @@ class ChildDog(ModelComposed): ]) @convert_js_args_to_python_args - def __init__(self, pet_type, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, pet_type, *args, **kwargs): # noqa: E501 """child_dog.ChildDog - a model defined in OpenAPI Args: @@ -157,6 +160,22 @@ class ChildDog(ModelComposed): bark (str): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/client/petstore/python-experimental/petstore_api/models/child_dog_all_of.py b/samples/client/petstore/python-experimental/petstore_api/models/child_dog_all_of.py index b7d46f365ea..7ba37f9908f 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/child_dog_all_of.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/child_dog_all_of.py @@ -18,6 +18,7 @@ import six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -66,6 +67,8 @@ class ChildDogAllOf(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ @@ -100,7 +103,7 @@ class ChildDogAllOf(ModelNormal): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """child_dog_all_of.ChildDogAllOf - a model defined in OpenAPI Keyword Args: @@ -137,6 +140,22 @@ class ChildDogAllOf(ModelNormal): bark (str): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/client/petstore/python-experimental/petstore_api/models/child_lizard.py b/samples/client/petstore/python-experimental/petstore_api/models/child_lizard.py index 8a7df71181a..0f11243a249 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/child_lizard.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/child_lizard.py @@ -18,6 +18,7 @@ import six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -76,6 +77,8 @@ class ChildLizard(ModelComposed): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ @@ -117,7 +120,7 @@ class ChildLizard(ModelComposed): ]) @convert_js_args_to_python_args - def __init__(self, pet_type, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, pet_type, *args, **kwargs): # noqa: E501 """child_lizard.ChildLizard - a model defined in OpenAPI Args: @@ -157,6 +160,22 @@ class ChildLizard(ModelComposed): loves_rocks (bool): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/client/petstore/python-experimental/petstore_api/models/child_lizard_all_of.py b/samples/client/petstore/python-experimental/petstore_api/models/child_lizard_all_of.py index 949343e858e..78b69edb872 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/child_lizard_all_of.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/child_lizard_all_of.py @@ -18,6 +18,7 @@ import six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -66,6 +67,8 @@ class ChildLizardAllOf(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ @@ -100,7 +103,7 @@ class ChildLizardAllOf(ModelNormal): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """child_lizard_all_of.ChildLizardAllOf - a model defined in OpenAPI Keyword Args: @@ -137,6 +140,22 @@ class ChildLizardAllOf(ModelNormal): loves_rocks (bool): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/client/petstore/python-experimental/petstore_api/models/class_model.py b/samples/client/petstore/python-experimental/petstore_api/models/class_model.py index 6244421e601..fc88f68e3f5 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/class_model.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/class_model.py @@ -18,6 +18,7 @@ import six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -66,6 +67,8 @@ class ClassModel(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ @@ -100,7 +103,7 @@ class ClassModel(ModelNormal): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """class_model.ClassModel - a model defined in OpenAPI Keyword Args: @@ -137,6 +140,22 @@ class ClassModel(ModelNormal): _class (str): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/client/petstore/python-experimental/petstore_api/models/client.py b/samples/client/petstore/python-experimental/petstore_api/models/client.py index f5c6854bbae..fa99b07fa32 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/client.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/client.py @@ -18,6 +18,7 @@ import six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -66,6 +67,8 @@ class Client(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ @@ -100,7 +103,7 @@ class Client(ModelNormal): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """client.Client - a model defined in OpenAPI Keyword Args: @@ -137,6 +140,22 @@ class Client(ModelNormal): client (str): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/client/petstore/python-experimental/petstore_api/models/dog.py b/samples/client/petstore/python-experimental/petstore_api/models/dog.py index c4dfd08695d..f9b93eebc78 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/dog.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/dog.py @@ -18,6 +18,7 @@ import six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -76,6 +77,8 @@ class Dog(ModelComposed): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ @@ -119,7 +122,7 @@ class Dog(ModelComposed): ]) @convert_js_args_to_python_args - def __init__(self, class_name, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, class_name, *args, **kwargs): # noqa: E501 """dog.Dog - a model defined in OpenAPI Args: @@ -160,6 +163,22 @@ class Dog(ModelComposed): color (str): [optional] if omitted the server will use the default value of 'red' # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/client/petstore/python-experimental/petstore_api/models/dog_all_of.py b/samples/client/petstore/python-experimental/petstore_api/models/dog_all_of.py index fe4e3ebe28d..0d053aca2a6 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/dog_all_of.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/dog_all_of.py @@ -18,6 +18,7 @@ import six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -66,6 +67,8 @@ class DogAllOf(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ @@ -100,7 +103,7 @@ class DogAllOf(ModelNormal): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """dog_all_of.DogAllOf - a model defined in OpenAPI Keyword Args: @@ -137,6 +140,22 @@ class DogAllOf(ModelNormal): breed (str): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/client/petstore/python-experimental/petstore_api/models/enum_arrays.py b/samples/client/petstore/python-experimental/petstore_api/models/enum_arrays.py index fd06d3eb384..a1999044974 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/enum_arrays.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/enum_arrays.py @@ -18,6 +18,7 @@ import six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -74,6 +75,8 @@ class EnumArrays(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ @@ -110,7 +113,7 @@ class EnumArrays(ModelNormal): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """enum_arrays.EnumArrays - a model defined in OpenAPI Keyword Args: @@ -148,6 +151,22 @@ class EnumArrays(ModelNormal): array_enum ([str]): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/client/petstore/python-experimental/petstore_api/models/enum_class.py b/samples/client/petstore/python-experimental/petstore_api/models/enum_class.py index 6e59d0162be..3fa95b69d0c 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/enum_class.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/enum_class.py @@ -18,6 +18,7 @@ import six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -67,6 +68,8 @@ class EnumClass(ModelSimple): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ @@ -97,7 +100,7 @@ class EnumClass(ModelSimple): ]) @convert_js_args_to_python_args - def __init__(self, value='-efg', _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """enum_class.EnumClass - a model defined in OpenAPI Args: @@ -136,6 +139,23 @@ class EnumClass(ModelSimple): _visited_composed_classes = (Animal,) """ + value = kwargs.get('value', '-efg') + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/client/petstore/python-experimental/petstore_api/models/enum_test.py b/samples/client/petstore/python-experimental/petstore_api/models/enum_test.py index cfbcf63229a..71cf60fd482 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/enum_test.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/enum_test.py @@ -18,6 +18,7 @@ import six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -89,6 +90,8 @@ class EnumTest(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ @@ -131,7 +134,7 @@ class EnumTest(ModelNormal): ]) @convert_js_args_to_python_args - def __init__(self, enum_string_required, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, enum_string_required, *args, **kwargs): # noqa: E501 """enum_test.EnumTest - a model defined in OpenAPI Args: @@ -174,6 +177,22 @@ class EnumTest(ModelNormal): outer_enum (outer_enum.OuterEnum): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/client/petstore/python-experimental/petstore_api/models/file.py b/samples/client/petstore/python-experimental/petstore_api/models/file.py index 873052db9ac..0152f8d8c66 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/file.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/file.py @@ -18,6 +18,7 @@ import six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -66,6 +67,8 @@ class File(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ @@ -100,7 +103,7 @@ class File(ModelNormal): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """file.File - a model defined in OpenAPI Keyword Args: @@ -137,6 +140,22 @@ class File(ModelNormal): source_uri (str): Test capitalization. [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/client/petstore/python-experimental/petstore_api/models/file_schema_test_class.py b/samples/client/petstore/python-experimental/petstore_api/models/file_schema_test_class.py index 32dd82773dd..79e5638ccc9 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/file_schema_test_class.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/file_schema_test_class.py @@ -18,6 +18,7 @@ import six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -71,6 +72,8 @@ class FileSchemaTestClass(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ @@ -107,7 +110,7 @@ class FileSchemaTestClass(ModelNormal): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """file_schema_test_class.FileSchemaTestClass - a model defined in OpenAPI Keyword Args: @@ -145,6 +148,22 @@ class FileSchemaTestClass(ModelNormal): files ([file.File]): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/client/petstore/python-experimental/petstore_api/models/format_test.py b/samples/client/petstore/python-experimental/petstore_api/models/format_test.py index d69c311f316..7c598ae4382 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/format_test.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/format_test.py @@ -18,6 +18,7 @@ import six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -101,6 +102,8 @@ class FormatTest(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ @@ -159,7 +162,7 @@ class FormatTest(ModelNormal): ]) @convert_js_args_to_python_args - def __init__(self, number, byte, date, password, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, number, byte, date, password, *args, **kwargs): # noqa: E501 """format_test.FormatTest - a model defined in OpenAPI Args: @@ -210,6 +213,22 @@ class FormatTest(ModelNormal): uuid (str): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/client/petstore/python-experimental/petstore_api/models/grandparent.py b/samples/client/petstore/python-experimental/petstore_api/models/grandparent.py index 8949eed490e..3097bef04b8 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/grandparent.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/grandparent.py @@ -18,6 +18,7 @@ import six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -66,6 +67,8 @@ class Grandparent(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ @@ -100,7 +103,7 @@ class Grandparent(ModelNormal): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """grandparent.Grandparent - a model defined in OpenAPI Keyword Args: @@ -137,6 +140,22 @@ class Grandparent(ModelNormal): radio_waves (bool): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/client/petstore/python-experimental/petstore_api/models/grandparent_animal.py b/samples/client/petstore/python-experimental/petstore_api/models/grandparent_animal.py index bf6396bb859..54dc5be641d 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/grandparent_animal.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/grandparent_animal.py @@ -18,6 +18,7 @@ import six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -86,6 +87,8 @@ class GrandparentAnimal(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ @@ -128,7 +131,7 @@ class GrandparentAnimal(ModelNormal): ]) @convert_js_args_to_python_args - def __init__(self, pet_type, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, pet_type, *args, **kwargs): # noqa: E501 """grandparent_animal.GrandparentAnimal - a model defined in OpenAPI Args: @@ -167,6 +170,22 @@ class GrandparentAnimal(ModelNormal): _visited_composed_classes = (Animal,) """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/client/petstore/python-experimental/petstore_api/models/has_only_read_only.py b/samples/client/petstore/python-experimental/petstore_api/models/has_only_read_only.py index a80d49539b3..eeb685139cb 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/has_only_read_only.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/has_only_read_only.py @@ -18,6 +18,7 @@ import six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -66,6 +67,8 @@ class HasOnlyReadOnly(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ @@ -102,7 +105,7 @@ class HasOnlyReadOnly(ModelNormal): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """has_only_read_only.HasOnlyReadOnly - a model defined in OpenAPI Keyword Args: @@ -140,6 +143,22 @@ class HasOnlyReadOnly(ModelNormal): foo (str): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/client/petstore/python-experimental/petstore_api/models/list.py b/samples/client/petstore/python-experimental/petstore_api/models/list.py index 93acc4dd8de..9499f26c7b1 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/list.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/list.py @@ -18,6 +18,7 @@ import six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -66,6 +67,8 @@ class List(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ @@ -100,7 +103,7 @@ class List(ModelNormal): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """list.List - a model defined in OpenAPI Keyword Args: @@ -137,6 +140,22 @@ class List(ModelNormal): _123_list (str): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/client/petstore/python-experimental/petstore_api/models/map_test.py b/samples/client/petstore/python-experimental/petstore_api/models/map_test.py index 1d58629e43b..45be8a1fecf 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/map_test.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/map_test.py @@ -18,6 +18,7 @@ import six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -75,6 +76,8 @@ class MapTest(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ @@ -115,7 +118,7 @@ class MapTest(ModelNormal): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """map_test.MapTest - a model defined in OpenAPI Keyword Args: @@ -155,6 +158,22 @@ class MapTest(ModelNormal): indirect_map (string_boolean_map.StringBooleanMap): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/client/petstore/python-experimental/petstore_api/models/mixed_properties_and_additional_properties_class.py b/samples/client/petstore/python-experimental/petstore_api/models/mixed_properties_and_additional_properties_class.py index bbae3d50a07..0e584ebd43e 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/mixed_properties_and_additional_properties_class.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/mixed_properties_and_additional_properties_class.py @@ -18,6 +18,7 @@ import six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -71,6 +72,8 @@ class MixedPropertiesAndAdditionalPropertiesClass(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ @@ -109,7 +112,7 @@ class MixedPropertiesAndAdditionalPropertiesClass(ModelNormal): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """mixed_properties_and_additional_properties_class.MixedPropertiesAndAdditionalPropertiesClass - a model defined in OpenAPI Keyword Args: @@ -148,6 +151,22 @@ class MixedPropertiesAndAdditionalPropertiesClass(ModelNormal): map ({str: (animal.Animal,)}): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/client/petstore/python-experimental/petstore_api/models/model200_response.py b/samples/client/petstore/python-experimental/petstore_api/models/model200_response.py index bbbe72bd1ce..54cc1fa338d 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/model200_response.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/model200_response.py @@ -18,6 +18,7 @@ import six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -66,6 +67,8 @@ class Model200Response(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ @@ -102,7 +105,7 @@ class Model200Response(ModelNormal): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """model200_response.Model200Response - a model defined in OpenAPI Keyword Args: @@ -140,6 +143,22 @@ class Model200Response(ModelNormal): _class (str): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/client/petstore/python-experimental/petstore_api/models/model_return.py b/samples/client/petstore/python-experimental/petstore_api/models/model_return.py index 80a187b13fb..cf7415f0bd7 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/model_return.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/model_return.py @@ -18,6 +18,7 @@ import six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -66,6 +67,8 @@ class ModelReturn(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ @@ -100,7 +103,7 @@ class ModelReturn(ModelNormal): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """model_return.ModelReturn - a model defined in OpenAPI Keyword Args: @@ -137,6 +140,22 @@ class ModelReturn(ModelNormal): _return (int): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/client/petstore/python-experimental/petstore_api/models/name.py b/samples/client/petstore/python-experimental/petstore_api/models/name.py index 96d4ffd69f8..33a95baafcf 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/name.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/name.py @@ -18,6 +18,7 @@ import six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -66,6 +67,8 @@ class Name(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ @@ -106,7 +109,7 @@ class Name(ModelNormal): ]) @convert_js_args_to_python_args - def __init__(self, name, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, name, *args, **kwargs): # noqa: E501 """name.Name - a model defined in OpenAPI Args: @@ -148,6 +151,22 @@ class Name(ModelNormal): _123_number (int): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/client/petstore/python-experimental/petstore_api/models/number_only.py b/samples/client/petstore/python-experimental/petstore_api/models/number_only.py index 5e84c5a16f4..305da1d7538 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/number_only.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/number_only.py @@ -18,6 +18,7 @@ import six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -66,6 +67,8 @@ class NumberOnly(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ @@ -100,7 +103,7 @@ class NumberOnly(ModelNormal): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """number_only.NumberOnly - a model defined in OpenAPI Keyword Args: @@ -137,6 +140,22 @@ class NumberOnly(ModelNormal): just_number (float): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/client/petstore/python-experimental/petstore_api/models/order.py b/samples/client/petstore/python-experimental/petstore_api/models/order.py index 535fe7cd996..ddc3332d66d 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/order.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/order.py @@ -18,6 +18,7 @@ import six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -71,6 +72,8 @@ class Order(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ @@ -115,7 +118,7 @@ class Order(ModelNormal): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """order.Order - a model defined in OpenAPI Keyword Args: @@ -157,6 +160,22 @@ class Order(ModelNormal): complete (bool): [optional] if omitted the server will use the default value of False # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/client/petstore/python-experimental/petstore_api/models/outer_composite.py b/samples/client/petstore/python-experimental/petstore_api/models/outer_composite.py index b5c41308122..a64cbe37592 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/outer_composite.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/outer_composite.py @@ -18,6 +18,7 @@ import six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -71,6 +72,8 @@ class OuterComposite(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ @@ -109,7 +112,7 @@ class OuterComposite(ModelNormal): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """outer_composite.OuterComposite - a model defined in OpenAPI Keyword Args: @@ -148,6 +151,22 @@ class OuterComposite(ModelNormal): my_boolean (bool): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/client/petstore/python-experimental/petstore_api/models/outer_enum.py b/samples/client/petstore/python-experimental/petstore_api/models/outer_enum.py index 8a30abf9a21..013f6bdd112 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/outer_enum.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/outer_enum.py @@ -18,6 +18,7 @@ import six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -67,6 +68,8 @@ class OuterEnum(ModelSimple): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ @@ -97,7 +100,7 @@ class OuterEnum(ModelSimple): ]) @convert_js_args_to_python_args - def __init__(self, value, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, value, *args, **kwargs): # noqa: E501 """outer_enum.OuterEnum - a model defined in OpenAPI Args: @@ -136,6 +139,22 @@ class OuterEnum(ModelSimple): _visited_composed_classes = (Animal,) """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/client/petstore/python-experimental/petstore_api/models/outer_number.py b/samples/client/petstore/python-experimental/petstore_api/models/outer_number.py index 5633050812e..a6384cf9f5f 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/outer_number.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/outer_number.py @@ -18,6 +18,7 @@ import six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -66,6 +67,8 @@ class OuterNumber(ModelSimple): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ @@ -96,7 +99,7 @@ class OuterNumber(ModelSimple): ]) @convert_js_args_to_python_args - def __init__(self, value, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, value, *args, **kwargs): # noqa: E501 """outer_number.OuterNumber - a model defined in OpenAPI Args: @@ -135,6 +138,22 @@ class OuterNumber(ModelSimple): _visited_composed_classes = (Animal,) """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/client/petstore/python-experimental/petstore_api/models/parent.py b/samples/client/petstore/python-experimental/petstore_api/models/parent.py index a64fd034a35..5d33beb6979 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/parent.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/parent.py @@ -18,6 +18,7 @@ import six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -76,6 +77,8 @@ class Parent(ModelComposed): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ @@ -113,7 +116,7 @@ class Parent(ModelComposed): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """parent.Parent - a model defined in OpenAPI Keyword Args: @@ -151,6 +154,22 @@ class Parent(ModelComposed): tele_vision (bool): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/client/petstore/python-experimental/petstore_api/models/parent_all_of.py b/samples/client/petstore/python-experimental/petstore_api/models/parent_all_of.py index d65ad906ef5..28d5f073931 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/parent_all_of.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/parent_all_of.py @@ -18,6 +18,7 @@ import six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -66,6 +67,8 @@ class ParentAllOf(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ @@ -100,7 +103,7 @@ class ParentAllOf(ModelNormal): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """parent_all_of.ParentAllOf - a model defined in OpenAPI Keyword Args: @@ -137,6 +140,22 @@ class ParentAllOf(ModelNormal): tele_vision (bool): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/client/petstore/python-experimental/petstore_api/models/parent_pet.py b/samples/client/petstore/python-experimental/petstore_api/models/parent_pet.py index 5f709f6947b..4635ac94780 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/parent_pet.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/parent_pet.py @@ -18,6 +18,7 @@ import six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -86,6 +87,8 @@ class ParentPet(ModelComposed): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ @@ -128,7 +131,7 @@ class ParentPet(ModelComposed): ]) @convert_js_args_to_python_args - def __init__(self, pet_type, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, pet_type, *args, **kwargs): # noqa: E501 """parent_pet.ParentPet - a model defined in OpenAPI Args: @@ -167,6 +170,22 @@ class ParentPet(ModelComposed): _visited_composed_classes = (Animal,) """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/client/petstore/python-experimental/petstore_api/models/pet.py b/samples/client/petstore/python-experimental/petstore_api/models/pet.py index 7ca5ab6d224..c93acd53c96 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/pet.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/pet.py @@ -18,6 +18,7 @@ import six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -81,6 +82,8 @@ class Pet(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ @@ -125,7 +128,7 @@ class Pet(ModelNormal): ]) @convert_js_args_to_python_args - def __init__(self, name, photo_urls, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, name, photo_urls, *args, **kwargs): # noqa: E501 """pet.Pet - a model defined in OpenAPI Args: @@ -169,6 +172,22 @@ class Pet(ModelNormal): status (str): pet status in the store. [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/client/petstore/python-experimental/petstore_api/models/player.py b/samples/client/petstore/python-experimental/petstore_api/models/player.py index 97031d2b9d7..d65e53c2e5f 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/player.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/player.py @@ -18,6 +18,7 @@ import six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -66,6 +67,8 @@ class Player(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ @@ -102,7 +105,7 @@ class Player(ModelNormal): ]) @convert_js_args_to_python_args - def __init__(self, name, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, name, *args, **kwargs): # noqa: E501 """player.Player - a model defined in OpenAPI Args: @@ -142,6 +145,22 @@ class Player(ModelNormal): enemy_player (Player): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/client/petstore/python-experimental/petstore_api/models/read_only_first.py b/samples/client/petstore/python-experimental/petstore_api/models/read_only_first.py index d5f4f1bfba4..691d789a92e 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/read_only_first.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/read_only_first.py @@ -18,6 +18,7 @@ import six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -66,6 +67,8 @@ class ReadOnlyFirst(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ @@ -102,7 +105,7 @@ class ReadOnlyFirst(ModelNormal): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """read_only_first.ReadOnlyFirst - a model defined in OpenAPI Keyword Args: @@ -140,6 +143,22 @@ class ReadOnlyFirst(ModelNormal): baz (str): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/client/petstore/python-experimental/petstore_api/models/special_model_name.py b/samples/client/petstore/python-experimental/petstore_api/models/special_model_name.py index 0f168298d2a..6e2b80cbe90 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/special_model_name.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/special_model_name.py @@ -18,6 +18,7 @@ import six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -66,6 +67,8 @@ class SpecialModelName(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ @@ -100,7 +103,7 @@ class SpecialModelName(ModelNormal): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """special_model_name.SpecialModelName - a model defined in OpenAPI Keyword Args: @@ -137,6 +140,22 @@ class SpecialModelName(ModelNormal): special_property_name (int): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/client/petstore/python-experimental/petstore_api/models/string_boolean_map.py b/samples/client/petstore/python-experimental/petstore_api/models/string_boolean_map.py index ba0938507be..8351ad04e2d 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/string_boolean_map.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/string_boolean_map.py @@ -18,6 +18,7 @@ import six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -66,6 +67,8 @@ class StringBooleanMap(ModelNormal): additional_properties_type = (bool,) # noqa: E501 + _nullable = False + @cached_property def openapi_types(): """ @@ -98,7 +101,7 @@ class StringBooleanMap(ModelNormal): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """string_boolean_map.StringBooleanMap - a model defined in OpenAPI Keyword Args: @@ -134,6 +137,22 @@ class StringBooleanMap(ModelNormal): _visited_composed_classes = (Animal,) """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/client/petstore/python-experimental/petstore_api/models/tag.py b/samples/client/petstore/python-experimental/petstore_api/models/tag.py index 9580c1e1f9d..ee10817f138 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/tag.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/tag.py @@ -18,6 +18,7 @@ import six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -66,6 +67,8 @@ class Tag(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ @@ -104,7 +107,7 @@ class Tag(ModelNormal): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """tag.Tag - a model defined in OpenAPI Keyword Args: @@ -143,6 +146,22 @@ class Tag(ModelNormal): full_name (str): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/client/petstore/python-experimental/petstore_api/models/type_holder_default.py b/samples/client/petstore/python-experimental/petstore_api/models/type_holder_default.py index 3f9c2da12fc..da92e2cb8ad 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/type_holder_default.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/type_holder_default.py @@ -18,6 +18,7 @@ import six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -66,6 +67,8 @@ class TypeHolderDefault(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ @@ -112,7 +115,7 @@ class TypeHolderDefault(ModelNormal): ]) @convert_js_args_to_python_args - def __init__(self, array_item, string_item='what', number_item=1.234, integer_item=-2, bool_item=True, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, array_item, *args, **kwargs): # noqa: E501 """type_holder_default.TypeHolderDefault - a model defined in OpenAPI Args: @@ -157,6 +160,26 @@ class TypeHolderDefault(ModelNormal): datetime_item (datetime): [optional] # noqa: E501 """ + string_item = kwargs.get('string_item', 'what') + number_item = kwargs.get('number_item', 1.234) + integer_item = kwargs.get('integer_item', -2) + bool_item = kwargs.get('bool_item', True) + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/client/petstore/python-experimental/petstore_api/models/type_holder_example.py b/samples/client/petstore/python-experimental/petstore_api/models/type_holder_example.py index fea5ee3378d..4253a0ce725 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/type_holder_example.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/type_holder_example.py @@ -18,6 +18,7 @@ import six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -75,6 +76,8 @@ class TypeHolderExample(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ @@ -117,7 +120,7 @@ class TypeHolderExample(ModelNormal): ]) @convert_js_args_to_python_args - def __init__(self, bool_item, array_item, string_item='what', number_item=1.234, integer_item=-2, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, bool_item, array_item, *args, **kwargs): # noqa: E501 """type_holder_example.TypeHolderExample - a model defined in OpenAPI Args: @@ -160,6 +163,25 @@ class TypeHolderExample(ModelNormal): _visited_composed_classes = (Animal,) """ + string_item = kwargs.get('string_item', 'what') + number_item = kwargs.get('number_item', 1.234) + integer_item = kwargs.get('integer_item', -2) + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/client/petstore/python-experimental/petstore_api/models/user.py b/samples/client/petstore/python-experimental/petstore_api/models/user.py index dc92564ae1d..6c6dcd1d28b 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/user.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/user.py @@ -18,6 +18,7 @@ import six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -66,6 +67,8 @@ class User(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ @@ -114,7 +117,7 @@ class User(ModelNormal): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """user.User - a model defined in OpenAPI Keyword Args: @@ -158,6 +161,22 @@ class User(ModelNormal): user_status (int): User Status. [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/client/petstore/python-experimental/petstore_api/models/xml_item.py b/samples/client/petstore/python-experimental/petstore_api/models/xml_item.py index 71529af241f..dc48355d3ce 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/xml_item.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/xml_item.py @@ -18,6 +18,7 @@ import six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -66,6 +67,8 @@ class XmlItem(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ @@ -156,7 +159,7 @@ class XmlItem(ModelNormal): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """xml_item.XmlItem - a model defined in OpenAPI Keyword Args: @@ -221,6 +224,22 @@ class XmlItem(ModelNormal): prefix_ns_wrapped_array ([int]): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/client/petstore/ruby-faraday/.rubocop.yml b/samples/client/petstore/ruby-faraday/.rubocop.yml index df46058490d..d32b2b1cdab 100644 --- a/samples/client/petstore/ruby-faraday/.rubocop.yml +++ b/samples/client/petstore/ruby-faraday/.rubocop.yml @@ -113,7 +113,7 @@ Layout/SpaceInsideParens: # EnforcedStyle: single_quotes # Detect hard tabs, no hard tabs. -Layout/Tab: +Layout/IndentationStyle: Enabled: true # Blank lines should not have any spaces. diff --git a/samples/client/petstore/ruby/.rubocop.yml b/samples/client/petstore/ruby/.rubocop.yml index df46058490d..d32b2b1cdab 100644 --- a/samples/client/petstore/ruby/.rubocop.yml +++ b/samples/client/petstore/ruby/.rubocop.yml @@ -113,7 +113,7 @@ Layout/SpaceInsideParens: # EnforcedStyle: single_quotes # Detect hard tabs, no hard tabs. -Layout/Tab: +Layout/IndentationStyle: Enabled: true # Blank lines should not have any spaces. diff --git a/samples/client/petstore/rust/hyper/fileResponseTest/.openapi-generator/FILES b/samples/client/petstore/rust/hyper/fileResponseTest/.openapi-generator/FILES new file mode 100644 index 00000000000..d85f759b592 --- /dev/null +++ b/samples/client/petstore/rust/hyper/fileResponseTest/.openapi-generator/FILES @@ -0,0 +1,13 @@ +.gitignore +.travis.yml +Cargo.toml +README.md +docs/DefaultApi.md +git_push.sh +src/apis/client.rs +src/apis/configuration.rs +src/apis/default_api.rs +src/apis/mod.rs +src/apis/request.rs +src/lib.rs +src/models/mod.rs diff --git a/samples/client/petstore/rust/hyper/fileResponseTest/Cargo.toml b/samples/client/petstore/rust/hyper/fileResponseTest/Cargo.toml index f78404453cf..808f425995b 100644 --- a/samples/client/petstore/rust/hyper/fileResponseTest/Cargo.toml +++ b/samples/client/petstore/rust/hyper/fileResponseTest/Cargo.toml @@ -2,6 +2,7 @@ name = "fileResponseTest-hyper" version = "1.0.0" authors = ["OpenAPI Generator team and contributors"] +edition = "2018" [dependencies] serde = "^1.0" diff --git a/samples/client/petstore/rust/hyper/petstore/.openapi-generator/FILES b/samples/client/petstore/rust/hyper/petstore/.openapi-generator/FILES new file mode 100644 index 00000000000..a670589b33e --- /dev/null +++ b/samples/client/petstore/rust/hyper/petstore/.openapi-generator/FILES @@ -0,0 +1,29 @@ +.gitignore +.travis.yml +Cargo.toml +README.md +docs/ApiResponse.md +docs/Category.md +docs/Order.md +docs/Pet.md +docs/PetApi.md +docs/StoreApi.md +docs/Tag.md +docs/User.md +docs/UserApi.md +git_push.sh +src/apis/client.rs +src/apis/configuration.rs +src/apis/mod.rs +src/apis/pet_api.rs +src/apis/request.rs +src/apis/store_api.rs +src/apis/user_api.rs +src/lib.rs +src/models/api_response.rs +src/models/category.rs +src/models/mod.rs +src/models/order.rs +src/models/pet.rs +src/models/tag.rs +src/models/user.rs diff --git a/samples/client/petstore/rust/hyper/petstore/Cargo.toml b/samples/client/petstore/rust/hyper/petstore/Cargo.toml index 67fc43707a9..7c7314a7a36 100644 --- a/samples/client/petstore/rust/hyper/petstore/Cargo.toml +++ b/samples/client/petstore/rust/hyper/petstore/Cargo.toml @@ -2,6 +2,7 @@ name = "petstore-hyper" version = "1.0.0" authors = ["OpenAPI Generator team and contributors"] +edition = "2018" [dependencies] serde = "^1.0" diff --git a/samples/client/petstore/rust/hyper/rust-test/.openapi-generator/FILES b/samples/client/petstore/rust/hyper/rust-test/.openapi-generator/FILES new file mode 100644 index 00000000000..22f11c2df5b --- /dev/null +++ b/samples/client/petstore/rust/hyper/rust-test/.openapi-generator/FILES @@ -0,0 +1,15 @@ +.gitignore +.travis.yml +Cargo.toml +README.md +docs/DefaultApi.md +docs/TypeTesting.md +git_push.sh +src/apis/client.rs +src/apis/configuration.rs +src/apis/default_api.rs +src/apis/mod.rs +src/apis/request.rs +src/lib.rs +src/models/mod.rs +src/models/type_testing.rs diff --git a/samples/client/petstore/rust/hyper/rust-test/Cargo.toml b/samples/client/petstore/rust/hyper/rust-test/Cargo.toml index 0e17417c3d2..4a39ba0c5fb 100644 --- a/samples/client/petstore/rust/hyper/rust-test/Cargo.toml +++ b/samples/client/petstore/rust/hyper/rust-test/Cargo.toml @@ -2,6 +2,7 @@ name = "rust-test-hyper" version = "1.0.0" authors = ["OpenAPI Generator team and contributors"] +edition = "2018" [dependencies] serde = "^1.0" diff --git a/samples/client/petstore/rust/reqwest/fileResponseTest/.openapi-generator/FILES b/samples/client/petstore/rust/reqwest/fileResponseTest/.openapi-generator/FILES new file mode 100644 index 00000000000..eb0b5839042 --- /dev/null +++ b/samples/client/petstore/rust/reqwest/fileResponseTest/.openapi-generator/FILES @@ -0,0 +1,12 @@ +.gitignore +.travis.yml +Cargo.toml +README.md +docs/DefaultApi.md +git_push.sh +src/apis/client.rs +src/apis/configuration.rs +src/apis/default_api.rs +src/apis/mod.rs +src/lib.rs +src/models/mod.rs diff --git a/samples/client/petstore/rust/reqwest/fileResponseTest/Cargo.toml b/samples/client/petstore/rust/reqwest/fileResponseTest/Cargo.toml index 97c0f07897b..67a75586797 100644 --- a/samples/client/petstore/rust/reqwest/fileResponseTest/Cargo.toml +++ b/samples/client/petstore/rust/reqwest/fileResponseTest/Cargo.toml @@ -2,6 +2,7 @@ name = "fileResponseTest-reqwest" version = "1.0.0" authors = ["OpenAPI Generator team and contributors"] +edition = "2018" [dependencies] serde = "^1.0" diff --git a/samples/client/petstore/rust/reqwest/fileResponseTest/src/apis/default_api.rs b/samples/client/petstore/rust/reqwest/fileResponseTest/src/apis/default_api.rs index 0624eff6fdd..e20a276940a 100644 --- a/samples/client/petstore/rust/reqwest/fileResponseTest/src/apis/default_api.rs +++ b/samples/client/petstore/rust/reqwest/fileResponseTest/src/apis/default_api.rs @@ -8,9 +8,9 @@ * Generated by: https://openapi-generator.tech */ +#[allow(unused_imports)] use std::rc::Rc; use std::borrow::Borrow; -#[allow(unused_imports)] use std::option::Option; use reqwest; @@ -46,7 +46,6 @@ impl DefaultApi for DefaultApiClient { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); } - // send request let req = req_builder.build()?; let mut resp = client.execute(req)?; if resp.status().is_success() { diff --git a/samples/client/petstore/rust/reqwest/fileResponseTest/src/apis/mod.rs b/samples/client/petstore/rust/reqwest/fileResponseTest/src/apis/mod.rs index 45f21f672e9..68e16d25dd7 100644 --- a/samples/client/petstore/rust/reqwest/fileResponseTest/src/apis/mod.rs +++ b/samples/client/petstore/rust/reqwest/fileResponseTest/src/apis/mod.rs @@ -41,5 +41,5 @@ pub fn urlencode>(s: T) -> String { mod default_api; pub use self::default_api::{ DefaultApi, DefaultApiClient }; -pub mod configuration; pub mod client; +pub mod configuration; diff --git a/samples/client/petstore/rust/reqwest/petstore-async/.gitignore b/samples/client/petstore/rust/reqwest/petstore-async/.gitignore new file mode 100644 index 00000000000..6aa106405a4 --- /dev/null +++ b/samples/client/petstore/rust/reqwest/petstore-async/.gitignore @@ -0,0 +1,3 @@ +/target/ +**/*.rs.bk +Cargo.lock diff --git a/samples/client/petstore/java/feign/.openapi-generator-ignore b/samples/client/petstore/rust/reqwest/petstore-async/.openapi-generator-ignore similarity index 100% rename from samples/client/petstore/java/feign/.openapi-generator-ignore rename to samples/client/petstore/rust/reqwest/petstore-async/.openapi-generator-ignore diff --git a/samples/client/petstore/rust/reqwest/petstore-async/.openapi-generator/FILES b/samples/client/petstore/rust/reqwest/petstore-async/.openapi-generator/FILES new file mode 100644 index 00000000000..611ac7b6dd7 --- /dev/null +++ b/samples/client/petstore/rust/reqwest/petstore-async/.openapi-generator/FILES @@ -0,0 +1,27 @@ +.gitignore +.travis.yml +Cargo.toml +README.md +docs/ApiResponse.md +docs/Category.md +docs/Order.md +docs/Pet.md +docs/PetApi.md +docs/StoreApi.md +docs/Tag.md +docs/User.md +docs/UserApi.md +git_push.sh +src/apis/configuration.rs +src/apis/mod.rs +src/apis/pet_api.rs +src/apis/store_api.rs +src/apis/user_api.rs +src/lib.rs +src/models/api_response.rs +src/models/category.rs +src/models/mod.rs +src/models/order.rs +src/models/pet.rs +src/models/tag.rs +src/models/user.rs diff --git a/samples/client/petstore/java/feign/.openapi-generator/VERSION b/samples/client/petstore/rust/reqwest/petstore-async/.openapi-generator/VERSION similarity index 100% rename from samples/client/petstore/java/feign/.openapi-generator/VERSION rename to samples/client/petstore/rust/reqwest/petstore-async/.openapi-generator/VERSION diff --git a/samples/client/petstore/rust/reqwest/petstore-async/.travis.yml b/samples/client/petstore/rust/reqwest/petstore-async/.travis.yml new file mode 100644 index 00000000000..22761ba7ee1 --- /dev/null +++ b/samples/client/petstore/rust/reqwest/petstore-async/.travis.yml @@ -0,0 +1 @@ +language: rust diff --git a/samples/client/petstore/rust/reqwest/petstore-async/Cargo.toml b/samples/client/petstore/rust/reqwest/petstore-async/Cargo.toml new file mode 100644 index 00000000000..18eb264f99c --- /dev/null +++ b/samples/client/petstore/rust/reqwest/petstore-async/Cargo.toml @@ -0,0 +1,17 @@ +[package] +name = "petstore-reqwest-async" +version = "1.0.0" +authors = ["OpenAPI Generator team and contributors"] +edition = "2018" + +[dependencies] +serde = "^1.0" +serde_derive = "^1.0" +serde_json = "^1.0" +url = "1.5" +[dependencies.reqwest] +version = "^0.10" +default-features = false +features = ["json"] + +[dev-dependencies] diff --git a/samples/client/petstore/rust/reqwest/petstore-async/README.md b/samples/client/petstore/rust/reqwest/petstore-async/README.md new file mode 100644 index 00000000000..4a3e0251107 --- /dev/null +++ b/samples/client/petstore/rust/reqwest/petstore-async/README.md @@ -0,0 +1,68 @@ +# Rust API client for petstore-reqwest-async + +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: 1.0.0 +- Build package: org.openapitools.codegen.languages.RustClientCodegen + +## Installation + +Put the package under your project folder and add the following to `Cargo.toml` under `[dependencies]`: + +``` + openapi = { path = "./generated" } +``` + +## Documentation for API Endpoints + +All URIs are relative to *http://petstore.swagger.io/v2* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*PetApi* | [**add_pet**](docs/PetApi.md#add_pet) | **post** /pet | Add a new pet to the store +*PetApi* | [**delete_pet**](docs/PetApi.md#delete_pet) | **delete** /pet/{petId} | Deletes a pet +*PetApi* | [**find_pets_by_status**](docs/PetApi.md#find_pets_by_status) | **get** /pet/findByStatus | Finds Pets by status +*PetApi* | [**find_pets_by_tags**](docs/PetApi.md#find_pets_by_tags) | **get** /pet/findByTags | Finds Pets by tags +*PetApi* | [**get_pet_by_id**](docs/PetApi.md#get_pet_by_id) | **get** /pet/{petId} | Find pet by ID +*PetApi* | [**update_pet**](docs/PetApi.md#update_pet) | **put** /pet | Update an existing pet +*PetApi* | [**update_pet_with_form**](docs/PetApi.md#update_pet_with_form) | **post** /pet/{petId} | Updates a pet in the store with form data +*PetApi* | [**upload_file**](docs/PetApi.md#upload_file) | **post** /pet/{petId}/uploadImage | uploads an image +*StoreApi* | [**delete_order**](docs/StoreApi.md#delete_order) | **delete** /store/order/{orderId} | Delete purchase order by ID +*StoreApi* | [**get_inventory**](docs/StoreApi.md#get_inventory) | **get** /store/inventory | Returns pet inventories by status +*StoreApi* | [**get_order_by_id**](docs/StoreApi.md#get_order_by_id) | **get** /store/order/{orderId} | Find purchase order by ID +*StoreApi* | [**place_order**](docs/StoreApi.md#place_order) | **post** /store/order | Place an order for a pet +*UserApi* | [**create_user**](docs/UserApi.md#create_user) | **post** /user | Create user +*UserApi* | [**create_users_with_array_input**](docs/UserApi.md#create_users_with_array_input) | **post** /user/createWithArray | Creates list of users with given input array +*UserApi* | [**create_users_with_list_input**](docs/UserApi.md#create_users_with_list_input) | **post** /user/createWithList | Creates list of users with given input array +*UserApi* | [**delete_user**](docs/UserApi.md#delete_user) | **delete** /user/{username} | Delete user +*UserApi* | [**get_user_by_name**](docs/UserApi.md#get_user_by_name) | **get** /user/{username} | Get user by user name +*UserApi* | [**login_user**](docs/UserApi.md#login_user) | **get** /user/login | Logs user into the system +*UserApi* | [**logout_user**](docs/UserApi.md#logout_user) | **get** /user/logout | Logs out current logged in user session +*UserApi* | [**update_user**](docs/UserApi.md#update_user) | **put** /user/{username} | Updated user + + +## Documentation For Models + + - [ApiResponse](docs/ApiResponse.md) + - [Category](docs/Category.md) + - [Order](docs/Order.md) + - [Pet](docs/Pet.md) + - [Tag](docs/Tag.md) + - [User](docs/User.md) + + +To get access to the crate's generated documentation, use: + +``` +cargo doc --open +``` + +## Author + + + diff --git a/samples/client/petstore/rust/reqwest/petstore-async/docs/ApiResponse.md b/samples/client/petstore/rust/reqwest/petstore-async/docs/ApiResponse.md new file mode 100644 index 00000000000..97128a87d97 --- /dev/null +++ b/samples/client/petstore/rust/reqwest/petstore-async/docs/ApiResponse.md @@ -0,0 +1,13 @@ +# ApiResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | Option<**i32**> | | [optional] +**_type** | Option<**String**> | | [optional] +**message** | Option<**String**> | | [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/rust/reqwest/petstore-async/docs/Category.md b/samples/client/petstore/rust/reqwest/petstore-async/docs/Category.md new file mode 100644 index 00000000000..1cf67347c05 --- /dev/null +++ b/samples/client/petstore/rust/reqwest/petstore-async/docs/Category.md @@ -0,0 +1,12 @@ +# Category + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | Option<**i64**> | | [optional] +**name** | Option<**String**> | | [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/rust/reqwest/petstore-async/docs/Order.md b/samples/client/petstore/rust/reqwest/petstore-async/docs/Order.md new file mode 100644 index 00000000000..d9a09c39743 --- /dev/null +++ b/samples/client/petstore/rust/reqwest/petstore-async/docs/Order.md @@ -0,0 +1,16 @@ +# Order + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | Option<**i64**> | | [optional] +**pet_id** | Option<**i64**> | | [optional] +**quantity** | Option<**i32**> | | [optional] +**ship_date** | Option<**String**> | | [optional] +**status** | Option<**String**> | Order Status | [optional] +**complete** | Option<**bool**> | | [optional][default to false] + +[[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/rust/reqwest/petstore-async/docs/Pet.md b/samples/client/petstore/rust/reqwest/petstore-async/docs/Pet.md new file mode 100644 index 00000000000..27886889d1d --- /dev/null +++ b/samples/client/petstore/rust/reqwest/petstore-async/docs/Pet.md @@ -0,0 +1,16 @@ +# Pet + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | Option<**i64**> | | [optional] +**category** | Option<[**crate::models::Category**](Category.md)> | | [optional] +**name** | **String** | | +**photo_urls** | **Vec** | | +**tags** | Option<[**Vec**](Tag.md)> | | [optional] +**status** | Option<**String**> | pet status in the store | [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/rust/reqwest/petstore-async/docs/PetApi.md b/samples/client/petstore/rust/reqwest/petstore-async/docs/PetApi.md new file mode 100644 index 00000000000..4716e752b66 --- /dev/null +++ b/samples/client/petstore/rust/reqwest/petstore-async/docs/PetApi.md @@ -0,0 +1,251 @@ +# \PetApi + +All URIs are relative to *http://petstore.swagger.io/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**add_pet**](PetApi.md#add_pet) | **post** /pet | Add a new pet to the store +[**delete_pet**](PetApi.md#delete_pet) | **delete** /pet/{petId} | Deletes a pet +[**find_pets_by_status**](PetApi.md#find_pets_by_status) | **get** /pet/findByStatus | Finds Pets by status +[**find_pets_by_tags**](PetApi.md#find_pets_by_tags) | **get** /pet/findByTags | Finds Pets by tags +[**get_pet_by_id**](PetApi.md#get_pet_by_id) | **get** /pet/{petId} | Find pet by ID +[**update_pet**](PetApi.md#update_pet) | **put** /pet | Update an existing pet +[**update_pet_with_form**](PetApi.md#update_pet_with_form) | **post** /pet/{petId} | Updates a pet in the store with form data +[**upload_file**](PetApi.md#upload_file) | **post** /pet/{petId}/uploadImage | uploads an image + + + +## add_pet + +> add_pet(body) +Add a new pet to the store + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**body** | [**Pet**](Pet.md) | Pet object that needs to be added to the store | [required] | + +### Return type + + (empty response body) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + +- **Content-Type**: application/json, application/xml +- **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) + + +## delete_pet + +> delete_pet(pet_id, api_key) +Deletes a pet + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**pet_id** | **i64** | Pet id to delete | [required] | +**api_key** | Option<**String**> | | | + +### Return type + + (empty response body) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **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) + + +## find_pets_by_status + +> Vec find_pets_by_status(status) +Finds Pets by status + +Multiple status values can be provided with comma separated strings + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**status** | [**Vec**](String.md) | Status values that need to be considered for filter | [required] | + +### Return type + +[**Vec**](Pet.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/xml, 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) + + +## find_pets_by_tags + +> Vec find_pets_by_tags(tags) +Finds Pets by tags + +Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**tags** | [**Vec**](String.md) | Tags to filter by | [required] | + +### Return type + +[**Vec**](Pet.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/xml, 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) + + +## get_pet_by_id + +> crate::models::Pet get_pet_by_id(pet_id) +Find pet by ID + +Returns a single pet + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**pet_id** | **i64** | ID of pet to return | [required] | + +### Return type + +[**crate::models::Pet**](Pet.md) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/xml, 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) + + +## update_pet + +> update_pet(body) +Update an existing pet + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**body** | [**Pet**](Pet.md) | Pet object that needs to be added to the store | [required] | + +### Return type + + (empty response body) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + +- **Content-Type**: application/json, application/xml +- **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) + + +## update_pet_with_form + +> update_pet_with_form(pet_id, name, status) +Updates a pet in the store with form data + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**pet_id** | **i64** | ID of pet that needs to be updated | [required] | +**name** | Option<**String**> | Updated name of the pet | | +**status** | Option<**String**> | Updated status of the pet | | + +### Return type + + (empty response body) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **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) + + +## upload_file + +> crate::models::ApiResponse upload_file(pet_id, additional_metadata, file) +uploads an image + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**pet_id** | **i64** | ID of pet to update | [required] | +**additional_metadata** | Option<**String**> | Additional data to pass to server | | +**file** | Option<**std::path::PathBuf**> | file to upload | | + +### Return type + +[**crate::models::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/rust/reqwest/petstore-async/docs/StoreApi.md b/samples/client/petstore/rust/reqwest/petstore-async/docs/StoreApi.md new file mode 100644 index 00000000000..a310b538315 --- /dev/null +++ b/samples/client/petstore/rust/reqwest/petstore-async/docs/StoreApi.md @@ -0,0 +1,127 @@ +# \StoreApi + +All URIs are relative to *http://petstore.swagger.io/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**delete_order**](StoreApi.md#delete_order) | **delete** /store/order/{orderId} | Delete purchase order by ID +[**get_inventory**](StoreApi.md#get_inventory) | **get** /store/inventory | Returns pet inventories by status +[**get_order_by_id**](StoreApi.md#get_order_by_id) | **get** /store/order/{orderId} | Find purchase order by ID +[**place_order**](StoreApi.md#place_order) | **post** /store/order | Place an order for a pet + + + +## delete_order + +> delete_order(order_id) +Delete purchase order by ID + +For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**order_id** | **String** | ID of the order that needs to be deleted | [required] | + +### Return type + + (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **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) + + +## get_inventory + +> ::std::collections::HashMap get_inventory() +Returns pet inventories by status + +Returns a map of status codes to quantities + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +**::std::collections::HashMap** + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **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) + + +## get_order_by_id + +> crate::models::Order get_order_by_id(order_id) +Find purchase order by ID + +For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**order_id** | **i64** | ID of pet that needs to be fetched | [required] | + +### Return type + +[**crate::models::Order**](Order.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/xml, 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) + + +## place_order + +> crate::models::Order place_order(body) +Place an order for a pet + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**body** | [**Order**](Order.md) | order placed for purchasing the pet | [required] | + +### Return type + +[**crate::models::Order**](Order.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/xml, 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/rust/reqwest/petstore-async/docs/Tag.md b/samples/client/petstore/rust/reqwest/petstore-async/docs/Tag.md new file mode 100644 index 00000000000..7bf71ab0e9d --- /dev/null +++ b/samples/client/petstore/rust/reqwest/petstore-async/docs/Tag.md @@ -0,0 +1,12 @@ +# Tag + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | Option<**i64**> | | [optional] +**name** | Option<**String**> | | [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/rust/reqwest/petstore-async/docs/User.md b/samples/client/petstore/rust/reqwest/petstore-async/docs/User.md new file mode 100644 index 00000000000..2e6abda42b3 --- /dev/null +++ b/samples/client/petstore/rust/reqwest/petstore-async/docs/User.md @@ -0,0 +1,18 @@ +# User + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | Option<**i64**> | | [optional] +**username** | Option<**String**> | | [optional] +**first_name** | Option<**String**> | | [optional] +**last_name** | Option<**String**> | | [optional] +**email** | Option<**String**> | | [optional] +**password** | Option<**String**> | | [optional] +**phone** | Option<**String**> | | [optional] +**user_status** | Option<**i32**> | User Status | [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/rust/reqwest/petstore-async/docs/UserApi.md b/samples/client/petstore/rust/reqwest/petstore-async/docs/UserApi.md new file mode 100644 index 00000000000..a6268f251a6 --- /dev/null +++ b/samples/client/petstore/rust/reqwest/petstore-async/docs/UserApi.md @@ -0,0 +1,245 @@ +# \UserApi + +All URIs are relative to *http://petstore.swagger.io/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_user**](UserApi.md#create_user) | **post** /user | Create user +[**create_users_with_array_input**](UserApi.md#create_users_with_array_input) | **post** /user/createWithArray | Creates list of users with given input array +[**create_users_with_list_input**](UserApi.md#create_users_with_list_input) | **post** /user/createWithList | Creates list of users with given input array +[**delete_user**](UserApi.md#delete_user) | **delete** /user/{username} | Delete user +[**get_user_by_name**](UserApi.md#get_user_by_name) | **get** /user/{username} | Get user by user name +[**login_user**](UserApi.md#login_user) | **get** /user/login | Logs user into the system +[**logout_user**](UserApi.md#logout_user) | **get** /user/logout | Logs out current logged in user session +[**update_user**](UserApi.md#update_user) | **put** /user/{username} | Updated user + + + +## create_user + +> create_user(body) +Create user + +This can only be done by the logged in user. + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**body** | [**User**](User.md) | Created user object | [required] | + +### Return type + + (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **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) + + +## create_users_with_array_input + +> create_users_with_array_input(body) +Creates list of users with given input array + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**body** | [**Vec**](User.md) | List of user object | [required] | + +### Return type + + (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **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) + + +## create_users_with_list_input + +> create_users_with_list_input(body) +Creates list of users with given input array + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**body** | [**Vec**](User.md) | List of user object | [required] | + +### Return type + + (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **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) + + +## delete_user + +> delete_user(username) +Delete user + +This can only be done by the logged in user. + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**username** | **String** | The name that needs to be deleted | [required] | + +### Return type + + (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **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) + + +## get_user_by_name + +> crate::models::User get_user_by_name(username) +Get user by user name + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**username** | **String** | The name that needs to be fetched. Use user1 for testing. | [required] | + +### Return type + +[**crate::models::User**](User.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/xml, 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) + + +## login_user + +> String login_user(username, password) +Logs user into the system + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**username** | **String** | The user name for login | [required] | +**password** | **String** | The password for login in clear text | [required] | + +### Return type + +**String** + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/xml, 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) + + +## logout_user + +> logout_user() +Logs out current logged in user session + +### Parameters + +This endpoint does not need any parameter. + +### Return type + + (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **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) + + +## update_user + +> update_user(username, body) +Updated user + +This can only be done by the logged in user. + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**username** | **String** | name that need to be deleted | [required] | +**body** | [**User**](User.md) | Updated user object | [required] | + +### Return type + + (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **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) + diff --git a/samples/client/petstore/java/feign/git_push.sh b/samples/client/petstore/rust/reqwest/petstore-async/git_push.sh similarity index 100% rename from samples/client/petstore/java/feign/git_push.sh rename to samples/client/petstore/rust/reqwest/petstore-async/git_push.sh diff --git a/samples/client/petstore/rust/reqwest/petstore-async/src/apis/configuration.rs b/samples/client/petstore/rust/reqwest/petstore-async/src/apis/configuration.rs new file mode 100644 index 00000000000..4194f7a52d1 --- /dev/null +++ b/samples/client/petstore/rust/reqwest/petstore-async/src/apis/configuration.rs @@ -0,0 +1,50 @@ +/* + * 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. + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + + +use reqwest; + +pub struct Configuration { + pub base_path: String, + pub user_agent: Option, + pub client: reqwest::Client, + pub basic_auth: Option, + pub oauth_access_token: Option, + pub bearer_access_token: Option, + pub api_key: Option, + // TODO: take an oauth2 token source, similar to the go one +} + +pub type BasicAuth = (String, Option); + +pub struct ApiKey { + pub prefix: Option, + pub key: String, +} + +impl Configuration { + pub fn new() -> Configuration { + Configuration::default() + } +} + +impl Default for Configuration { + fn default() -> Self { + Configuration { + base_path: "http://petstore.swagger.io/v2".to_owned(), + user_agent: Some("OpenAPI-Generator/1.0.0/rust".to_owned()), + client: reqwest::Client::new(), + basic_auth: None, + oauth_access_token: None, + bearer_access_token: None, + api_key: None, + } + } +} diff --git a/samples/client/petstore/rust/reqwest/petstore-async/src/apis/mod.rs b/samples/client/petstore/rust/reqwest/petstore-async/src/apis/mod.rs new file mode 100644 index 00000000000..d5094fdc85d --- /dev/null +++ b/samples/client/petstore/rust/reqwest/petstore-async/src/apis/mod.rs @@ -0,0 +1,65 @@ +use reqwest; +use serde_json; + +#[derive(Debug, Clone)] +pub struct ResponseErrorContent { + pub status: reqwest::StatusCode, + pub content: String, + pub entity: Option, +} + +#[derive(Debug)] +pub enum Error { + Reqwest(reqwest::Error), + Serde(serde_json::Error), + Io(std::io::Error), + ResponseError(ResponseErrorContent), +} + +impl From for Error { + fn from(e: reqwest::Error) -> Self { + Error::Reqwest(e) + } +} + +impl From for Error { + fn from(e: serde_json::Error) -> Self { + Error::Serde(e) + } +} + +impl From for Error { + fn from(e: std::io::Error) -> Self { + Error::Io(e) + } +} + +pub fn urlencode>(s: T) -> String { + ::url::form_urlencoded::byte_serialize(s.as_ref().as_bytes()).collect() +} + +mod pet_api; +pub use self::pet_api::{ add_pet }; +pub use self::pet_api::{ delete_pet }; +pub use self::pet_api::{ find_pets_by_status }; +pub use self::pet_api::{ find_pets_by_tags }; +pub use self::pet_api::{ get_pet_by_id }; +pub use self::pet_api::{ update_pet }; +pub use self::pet_api::{ update_pet_with_form }; +pub use self::pet_api::{ upload_file }; +mod store_api; +pub use self::store_api::{ delete_order }; +pub use self::store_api::{ get_inventory }; +pub use self::store_api::{ get_order_by_id }; +pub use self::store_api::{ place_order }; +mod user_api; +pub use self::user_api::{ create_user }; +pub use self::user_api::{ create_users_with_array_input }; +pub use self::user_api::{ create_users_with_list_input }; +pub use self::user_api::{ delete_user }; +pub use self::user_api::{ get_user_by_name }; +pub use self::user_api::{ login_user }; +pub use self::user_api::{ logout_user }; +pub use self::user_api::{ update_user }; + +pub mod configuration; diff --git a/samples/client/petstore/rust/reqwest/petstore-async/src/apis/pet_api.rs b/samples/client/petstore/rust/reqwest/petstore-async/src/apis/pet_api.rs new file mode 100644 index 00000000000..7611ba5eb9b --- /dev/null +++ b/samples/client/petstore/rust/reqwest/petstore-async/src/apis/pet_api.rs @@ -0,0 +1,254 @@ +/* + * 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. + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +#[allow(unused_imports)] +use std::rc::Rc; +use std::borrow::Borrow; +use std::option::Option; + +use reqwest; + +use super::{Error, configuration}; + + + pub async fn add_pet(configuration: &configuration::Configuration, body: crate::models::Pet) -> Result<(), Error> { + let client = &configuration.client; + + let uri_str = format!("{}/pet", configuration.base_path); + let mut req_builder = client.post(uri_str.as_str()); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.oauth_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + req_builder = req_builder.json(&body); + + let req = req_builder.build()?; + let mut resp = client.execute(req).await?; + if resp.status().is_success() { + Ok(()) + } else { + let status = resp.status(); + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + let error = crate::apis::ResponseErrorContent { status, content, entity }; + Err(Error::ResponseError(error)) + } + } + + pub async fn delete_pet(configuration: &configuration::Configuration, pet_id: i64, api_key: Option<&str>) -> Result<(), Error> { + let client = &configuration.client; + + let uri_str = format!("{}/pet/{petId}", configuration.base_path, petId=pet_id); + let mut req_builder = client.delete(uri_str.as_str()); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(param_value) = api_key { + req_builder = req_builder.header("api_key", param_value.to_string()); + } + if let Some(ref token) = configuration.oauth_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let mut resp = client.execute(req).await?; + if resp.status().is_success() { + Ok(()) + } else { + let status = resp.status(); + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + let error = crate::apis::ResponseErrorContent { status, content, entity }; + Err(Error::ResponseError(error)) + } + } + + pub async fn find_pets_by_status(configuration: &configuration::Configuration, status: Vec) -> Result, Error> { + let client = &configuration.client; + + let uri_str = format!("{}/pet/findByStatus", configuration.base_path); + let mut req_builder = client.get(uri_str.as_str()); + + req_builder = req_builder.query(&[("status", &status.into_iter().map(|p| p.to_string()).collect::>().join(",").to_string())]); + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.oauth_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let mut resp = client.execute(req).await?; + if resp.status().is_success() { + Ok(resp.json::>().await?) + } else { + let status = resp.status(); + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + let error = crate::apis::ResponseErrorContent { status, content, entity }; + Err(Error::ResponseError(error)) + } + } + + pub async fn find_pets_by_tags(configuration: &configuration::Configuration, tags: Vec) -> Result, Error> { + let client = &configuration.client; + + let uri_str = format!("{}/pet/findByTags", configuration.base_path); + let mut req_builder = client.get(uri_str.as_str()); + + req_builder = req_builder.query(&[("tags", &tags.into_iter().map(|p| p.to_string()).collect::>().join(",").to_string())]); + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.oauth_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let mut resp = client.execute(req).await?; + if resp.status().is_success() { + Ok(resp.json::>().await?) + } else { + let status = resp.status(); + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + let error = crate::apis::ResponseErrorContent { status, content, entity }; + Err(Error::ResponseError(error)) + } + } + + pub async fn get_pet_by_id(configuration: &configuration::Configuration, pet_id: i64) -> Result { + let client = &configuration.client; + + let uri_str = format!("{}/pet/{petId}", configuration.base_path, petId=pet_id); + let mut req_builder = client.get(uri_str.as_str()); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("api_key", val); + }; + + let req = req_builder.build()?; + let mut resp = client.execute(req).await?; + if resp.status().is_success() { + Ok(resp.json::().await?) + } else { + let status = resp.status(); + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + let error = crate::apis::ResponseErrorContent { status, content, entity }; + Err(Error::ResponseError(error)) + } + } + + pub async fn update_pet(configuration: &configuration::Configuration, body: crate::models::Pet) -> Result<(), Error> { + let client = &configuration.client; + + let uri_str = format!("{}/pet", configuration.base_path); + let mut req_builder = client.put(uri_str.as_str()); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.oauth_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + req_builder = req_builder.json(&body); + + let req = req_builder.build()?; + let mut resp = client.execute(req).await?; + if resp.status().is_success() { + Ok(()) + } else { + let status = resp.status(); + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + let error = crate::apis::ResponseErrorContent { status, content, entity }; + Err(Error::ResponseError(error)) + } + } + + pub async fn update_pet_with_form(configuration: &configuration::Configuration, pet_id: i64, name: Option<&str>, status: Option<&str>) -> Result<(), Error> { + let client = &configuration.client; + + let uri_str = format!("{}/pet/{petId}", configuration.base_path, petId=pet_id); + let mut req_builder = client.post(uri_str.as_str()); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.oauth_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + let mut form_params = std::collections::HashMap::new(); + if let Some(param_value) = name { + form_params.insert("name", param_value.to_string()); + } + if let Some(param_value) = status { + form_params.insert("status", param_value.to_string()); + } + req_builder = req_builder.form(&form_params); + + let req = req_builder.build()?; + let mut resp = client.execute(req).await?; + if resp.status().is_success() { + Ok(()) + } else { + let status = resp.status(); + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + let error = crate::apis::ResponseErrorContent { status, content, entity }; + Err(Error::ResponseError(error)) + } + } + + pub async fn upload_file(configuration: &configuration::Configuration, pet_id: i64, additional_metadata: Option<&str>, file: Option) -> Result { + let client = &configuration.client; + + let uri_str = format!("{}/pet/{petId}/uploadImage", configuration.base_path, petId=pet_id); + let mut req_builder = client.post(uri_str.as_str()); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.oauth_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + let mut form = reqwest::multipart::Form::new(); + if let Some(param_value) = additional_metadata { + form = form.text("additionalMetadata", param_value.to_string()); + } + // TODO: support file upload for 'file' parameter + req_builder = req_builder.multipart(form); + + let req = req_builder.build()?; + let mut resp = client.execute(req).await?; + if resp.status().is_success() { + Ok(resp.json::().await?) + } else { + let status = resp.status(); + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + let error = crate::apis::ResponseErrorContent { status, content, entity }; + Err(Error::ResponseError(error)) + } + } + diff --git a/samples/client/petstore/rust/reqwest/petstore-async/src/apis/store_api.rs b/samples/client/petstore/rust/reqwest/petstore-async/src/apis/store_api.rs new file mode 100644 index 00000000000..fd47da210aa --- /dev/null +++ b/samples/client/petstore/rust/reqwest/petstore-async/src/apis/store_api.rs @@ -0,0 +1,121 @@ +/* + * 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. + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +#[allow(unused_imports)] +use std::rc::Rc; +use std::borrow::Borrow; +use std::option::Option; + +use reqwest; + +use super::{Error, configuration}; + + + pub async fn delete_order(configuration: &configuration::Configuration, order_id: &str) -> Result<(), Error> { + let client = &configuration.client; + + let uri_str = format!("{}/store/order/{orderId}", configuration.base_path, orderId=crate::apis::urlencode(order_id)); + let mut req_builder = client.delete(uri_str.as_str()); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + + let req = req_builder.build()?; + let mut resp = client.execute(req).await?; + if resp.status().is_success() { + Ok(()) + } else { + let status = resp.status(); + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + let error = crate::apis::ResponseErrorContent { status, content, entity }; + Err(Error::ResponseError(error)) + } + } + + pub async fn get_inventory(configuration: &configuration::Configuration, ) -> Result<::std::collections::HashMap, Error> { + let client = &configuration.client; + + let uri_str = format!("{}/store/inventory", configuration.base_path); + let mut req_builder = client.get(uri_str.as_str()); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("api_key", val); + }; + + let req = req_builder.build()?; + let mut resp = client.execute(req).await?; + if resp.status().is_success() { + Ok(resp.json::<::std::collections::HashMap>().await?) + } else { + let status = resp.status(); + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + let error = crate::apis::ResponseErrorContent { status, content, entity }; + Err(Error::ResponseError(error)) + } + } + + pub async fn get_order_by_id(configuration: &configuration::Configuration, order_id: i64) -> Result { + let client = &configuration.client; + + let uri_str = format!("{}/store/order/{orderId}", configuration.base_path, orderId=order_id); + let mut req_builder = client.get(uri_str.as_str()); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + + let req = req_builder.build()?; + let mut resp = client.execute(req).await?; + if resp.status().is_success() { + Ok(resp.json::().await?) + } else { + let status = resp.status(); + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + let error = crate::apis::ResponseErrorContent { status, content, entity }; + Err(Error::ResponseError(error)) + } + } + + pub async fn place_order(configuration: &configuration::Configuration, body: crate::models::Order) -> Result { + let client = &configuration.client; + + let uri_str = format!("{}/store/order", configuration.base_path); + let mut req_builder = client.post(uri_str.as_str()); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + req_builder = req_builder.json(&body); + + let req = req_builder.build()?; + let mut resp = client.execute(req).await?; + if resp.status().is_success() { + Ok(resp.json::().await?) + } else { + let status = resp.status(); + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + let error = crate::apis::ResponseErrorContent { status, content, entity }; + Err(Error::ResponseError(error)) + } + } + diff --git a/samples/client/petstore/rust/reqwest/petstore-async/src/apis/user_api.rs b/samples/client/petstore/rust/reqwest/petstore-async/src/apis/user_api.rs new file mode 100644 index 00000000000..4f3c5b46cd9 --- /dev/null +++ b/samples/client/petstore/rust/reqwest/petstore-async/src/apis/user_api.rs @@ -0,0 +1,210 @@ +/* + * 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. + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +#[allow(unused_imports)] +use std::rc::Rc; +use std::borrow::Borrow; +use std::option::Option; + +use reqwest; + +use super::{Error, configuration}; + + + pub async fn create_user(configuration: &configuration::Configuration, body: crate::models::User) -> Result<(), Error> { + let client = &configuration.client; + + let uri_str = format!("{}/user", configuration.base_path); + let mut req_builder = client.post(uri_str.as_str()); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + req_builder = req_builder.json(&body); + + let req = req_builder.build()?; + let mut resp = client.execute(req).await?; + if resp.status().is_success() { + Ok(()) + } else { + let status = resp.status(); + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + let error = crate::apis::ResponseErrorContent { status, content, entity }; + Err(Error::ResponseError(error)) + } + } + + pub async fn create_users_with_array_input(configuration: &configuration::Configuration, body: Vec) -> Result<(), Error> { + let client = &configuration.client; + + let uri_str = format!("{}/user/createWithArray", configuration.base_path); + let mut req_builder = client.post(uri_str.as_str()); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + req_builder = req_builder.json(&body); + + let req = req_builder.build()?; + let mut resp = client.execute(req).await?; + if resp.status().is_success() { + Ok(()) + } else { + let status = resp.status(); + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + let error = crate::apis::ResponseErrorContent { status, content, entity }; + Err(Error::ResponseError(error)) + } + } + + pub async fn create_users_with_list_input(configuration: &configuration::Configuration, body: Vec) -> Result<(), Error> { + let client = &configuration.client; + + let uri_str = format!("{}/user/createWithList", configuration.base_path); + let mut req_builder = client.post(uri_str.as_str()); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + req_builder = req_builder.json(&body); + + let req = req_builder.build()?; + let mut resp = client.execute(req).await?; + if resp.status().is_success() { + Ok(()) + } else { + let status = resp.status(); + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + let error = crate::apis::ResponseErrorContent { status, content, entity }; + Err(Error::ResponseError(error)) + } + } + + pub async fn delete_user(configuration: &configuration::Configuration, username: &str) -> Result<(), Error> { + let client = &configuration.client; + + let uri_str = format!("{}/user/{username}", configuration.base_path, username=crate::apis::urlencode(username)); + let mut req_builder = client.delete(uri_str.as_str()); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + + let req = req_builder.build()?; + let mut resp = client.execute(req).await?; + if resp.status().is_success() { + Ok(()) + } else { + let status = resp.status(); + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + let error = crate::apis::ResponseErrorContent { status, content, entity }; + Err(Error::ResponseError(error)) + } + } + + pub async fn get_user_by_name(configuration: &configuration::Configuration, username: &str) -> Result { + let client = &configuration.client; + + let uri_str = format!("{}/user/{username}", configuration.base_path, username=crate::apis::urlencode(username)); + let mut req_builder = client.get(uri_str.as_str()); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + + let req = req_builder.build()?; + let mut resp = client.execute(req).await?; + if resp.status().is_success() { + Ok(resp.json::().await?) + } else { + let status = resp.status(); + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + let error = crate::apis::ResponseErrorContent { status, content, entity }; + Err(Error::ResponseError(error)) + } + } + + pub async fn login_user(configuration: &configuration::Configuration, username: &str, password: &str) -> Result { + let client = &configuration.client; + + let uri_str = format!("{}/user/login", configuration.base_path); + let mut req_builder = client.get(uri_str.as_str()); + + req_builder = req_builder.query(&[("username", &username.to_string())]); + req_builder = req_builder.query(&[("password", &password.to_string())]); + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + + let req = req_builder.build()?; + let mut resp = client.execute(req).await?; + if resp.status().is_success() { + Ok(resp.json::().await?) + } else { + let status = resp.status(); + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + let error = crate::apis::ResponseErrorContent { status, content, entity }; + Err(Error::ResponseError(error)) + } + } + + pub async fn logout_user(configuration: &configuration::Configuration, ) -> Result<(), Error> { + let client = &configuration.client; + + let uri_str = format!("{}/user/logout", configuration.base_path); + let mut req_builder = client.get(uri_str.as_str()); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + + let req = req_builder.build()?; + let mut resp = client.execute(req).await?; + if resp.status().is_success() { + Ok(()) + } else { + let status = resp.status(); + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + let error = crate::apis::ResponseErrorContent { status, content, entity }; + Err(Error::ResponseError(error)) + } + } + + pub async fn update_user(configuration: &configuration::Configuration, username: &str, body: crate::models::User) -> Result<(), Error> { + let client = &configuration.client; + + let uri_str = format!("{}/user/{username}", configuration.base_path, username=crate::apis::urlencode(username)); + let mut req_builder = client.put(uri_str.as_str()); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + req_builder = req_builder.json(&body); + + let req = req_builder.build()?; + let mut resp = client.execute(req).await?; + if resp.status().is_success() { + Ok(()) + } else { + let status = resp.status(); + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + let error = crate::apis::ResponseErrorContent { status, content, entity }; + Err(Error::ResponseError(error)) + } + } + diff --git a/samples/client/petstore/rust/reqwest/petstore-async/src/lib.rs b/samples/client/petstore/rust/reqwest/petstore-async/src/lib.rs new file mode 100644 index 00000000000..c1dd666f795 --- /dev/null +++ b/samples/client/petstore/rust/reqwest/petstore-async/src/lib.rs @@ -0,0 +1,10 @@ +#[macro_use] +extern crate serde_derive; + +extern crate serde; +extern crate serde_json; +extern crate url; +extern crate reqwest; + +pub mod apis; +pub mod models; diff --git a/samples/client/petstore/rust/reqwest/petstore-async/src/models/api_response.rs b/samples/client/petstore/rust/reqwest/petstore-async/src/models/api_response.rs new file mode 100644 index 00000000000..16c49d8d61d --- /dev/null +++ b/samples/client/petstore/rust/reqwest/petstore-async/src/models/api_response.rs @@ -0,0 +1,36 @@ +/* + * 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. + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +/// ApiResponse : Describes the result of uploading an image resource + + + +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct ApiResponse { + #[serde(rename = "code", skip_serializing_if = "Option::is_none")] + pub code: Option, + #[serde(rename = "type", skip_serializing_if = "Option::is_none")] + pub _type: Option, + #[serde(rename = "message", skip_serializing_if = "Option::is_none")] + pub message: Option, +} + +impl ApiResponse { + /// Describes the result of uploading an image resource + pub fn new() -> ApiResponse { + ApiResponse { + code: None, + _type: None, + message: None, + } + } +} + + diff --git a/samples/client/petstore/rust/reqwest/petstore-async/src/models/category.rs b/samples/client/petstore/rust/reqwest/petstore-async/src/models/category.rs new file mode 100644 index 00000000000..ed937ac261d --- /dev/null +++ b/samples/client/petstore/rust/reqwest/petstore-async/src/models/category.rs @@ -0,0 +1,33 @@ +/* + * 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. + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +/// Category : A category for a pet + + + +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct Category { + #[serde(rename = "id", skip_serializing_if = "Option::is_none")] + pub id: Option, + #[serde(rename = "name", skip_serializing_if = "Option::is_none")] + pub name: Option, +} + +impl Category { + /// A category for a pet + pub fn new() -> Category { + Category { + id: None, + name: None, + } + } +} + + diff --git a/samples/client/petstore/rust/reqwest/petstore-async/src/models/mod.rs b/samples/client/petstore/rust/reqwest/petstore-async/src/models/mod.rs new file mode 100644 index 00000000000..1baf2f7528e --- /dev/null +++ b/samples/client/petstore/rust/reqwest/petstore-async/src/models/mod.rs @@ -0,0 +1,12 @@ +pub mod api_response; +pub use self::api_response::ApiResponse; +pub mod category; +pub use self::category::Category; +pub mod order; +pub use self::order::Order; +pub mod pet; +pub use self::pet::Pet; +pub mod tag; +pub use self::tag::Tag; +pub mod user; +pub use self::user::User; diff --git a/samples/client/petstore/rust/reqwest/petstore-async/src/models/order.rs b/samples/client/petstore/rust/reqwest/petstore-async/src/models/order.rs new file mode 100644 index 00000000000..c64eae6d4ff --- /dev/null +++ b/samples/client/petstore/rust/reqwest/petstore-async/src/models/order.rs @@ -0,0 +1,56 @@ +/* + * 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. + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +/// Order : An order for a pets from the pet store + + + +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct Order { + #[serde(rename = "id", skip_serializing_if = "Option::is_none")] + pub id: Option, + #[serde(rename = "petId", skip_serializing_if = "Option::is_none")] + pub pet_id: Option, + #[serde(rename = "quantity", skip_serializing_if = "Option::is_none")] + pub quantity: Option, + #[serde(rename = "shipDate", skip_serializing_if = "Option::is_none")] + pub ship_date: Option, + /// Order Status + #[serde(rename = "status", skip_serializing_if = "Option::is_none")] + pub status: Option, + #[serde(rename = "complete", skip_serializing_if = "Option::is_none")] + pub complete: Option, +} + +impl Order { + /// An order for a pets from the pet store + pub fn new() -> Order { + Order { + id: None, + pet_id: None, + quantity: None, + ship_date: None, + status: None, + complete: None, + } + } +} + +/// Order Status +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum Status { + #[serde(rename = "placed")] + Placed, + #[serde(rename = "approved")] + Approved, + #[serde(rename = "delivered")] + Delivered, +} + diff --git a/samples/client/petstore/rust/reqwest/petstore-async/src/models/pet.rs b/samples/client/petstore/rust/reqwest/petstore-async/src/models/pet.rs new file mode 100644 index 00000000000..36c9d22c069 --- /dev/null +++ b/samples/client/petstore/rust/reqwest/petstore-async/src/models/pet.rs @@ -0,0 +1,56 @@ +/* + * 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. + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +/// Pet : A pet for sale in the pet store + + + +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct Pet { + #[serde(rename = "id", skip_serializing_if = "Option::is_none")] + pub id: Option, + #[serde(rename = "category", skip_serializing_if = "Option::is_none")] + pub category: Option, + #[serde(rename = "name")] + pub name: String, + #[serde(rename = "photoUrls")] + pub photo_urls: Vec, + #[serde(rename = "tags", skip_serializing_if = "Option::is_none")] + pub tags: Option>, + /// pet status in the store + #[serde(rename = "status", skip_serializing_if = "Option::is_none")] + pub status: Option, +} + +impl Pet { + /// A pet for sale in the pet store + pub fn new(name: String, photo_urls: Vec) -> Pet { + Pet { + id: None, + category: None, + name, + photo_urls, + tags: None, + status: None, + } + } +} + +/// pet status in the store +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum Status { + #[serde(rename = "available")] + Available, + #[serde(rename = "pending")] + Pending, + #[serde(rename = "sold")] + Sold, +} + diff --git a/samples/client/petstore/rust/reqwest/petstore-async/src/models/tag.rs b/samples/client/petstore/rust/reqwest/petstore-async/src/models/tag.rs new file mode 100644 index 00000000000..e0ae6e9efcc --- /dev/null +++ b/samples/client/petstore/rust/reqwest/petstore-async/src/models/tag.rs @@ -0,0 +1,33 @@ +/* + * 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. + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +/// Tag : A tag for a pet + + + +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct Tag { + #[serde(rename = "id", skip_serializing_if = "Option::is_none")] + pub id: Option, + #[serde(rename = "name", skip_serializing_if = "Option::is_none")] + pub name: Option, +} + +impl Tag { + /// A tag for a pet + pub fn new() -> Tag { + Tag { + id: None, + name: None, + } + } +} + + diff --git a/samples/client/petstore/rust/reqwest/petstore-async/src/models/user.rs b/samples/client/petstore/rust/reqwest/petstore-async/src/models/user.rs new file mode 100644 index 00000000000..360df3b9ec3 --- /dev/null +++ b/samples/client/petstore/rust/reqwest/petstore-async/src/models/user.rs @@ -0,0 +1,52 @@ +/* + * 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. + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +/// User : A User who is purchasing from the pet store + + + +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct User { + #[serde(rename = "id", skip_serializing_if = "Option::is_none")] + pub id: Option, + #[serde(rename = "username", skip_serializing_if = "Option::is_none")] + pub username: Option, + #[serde(rename = "firstName", skip_serializing_if = "Option::is_none")] + pub first_name: Option, + #[serde(rename = "lastName", skip_serializing_if = "Option::is_none")] + pub last_name: Option, + #[serde(rename = "email", skip_serializing_if = "Option::is_none")] + pub email: Option, + #[serde(rename = "password", skip_serializing_if = "Option::is_none")] + pub password: Option, + #[serde(rename = "phone", skip_serializing_if = "Option::is_none")] + pub phone: Option, + /// User Status + #[serde(rename = "userStatus", skip_serializing_if = "Option::is_none")] + pub user_status: Option, +} + +impl User { + /// A User who is purchasing from the pet store + pub fn new() -> User { + User { + id: None, + username: None, + first_name: None, + last_name: None, + email: None, + password: None, + phone: None, + user_status: None, + } + } +} + + diff --git a/samples/client/petstore/rust/reqwest/petstore-async/tests/pet_tests.rs b/samples/client/petstore/rust/reqwest/petstore-async/tests/pet_tests.rs new file mode 100644 index 00000000000..50829ebaa3e --- /dev/null +++ b/samples/client/petstore/rust/reqwest/petstore-async/tests/pet_tests.rs @@ -0,0 +1,34 @@ +extern crate petstore_reqwest_async; +//use petstore_reqwest_async::apis::PetApi; +//use petstore_reqwest_async::apis::PetApiClient; +use petstore_reqwest_async::apis::configuration; +//use petstore_reqwest::apis::PetApiUpdatePetWithFormParams; +use petstore_reqwest_async::models::{Pet}; +use std::option::Option; +use std::rc::Rc; + +#[test] +fn test_pet() { + let config = configuration::Configuration::new(); + //let pet_api_client = PetApiClient::new(Rc::new(config)); + + // create pet object + let photo_urls = vec!["https://11".to_string(), "https://22".to_string()]; + let mut new_pet = Pet::new("Rust Pet".to_string(), photo_urls); + new_pet.id = Option::Some(8787); + + // add pet + let _add_result = petstore_reqwest_async::apis::add_pet(&config, new_pet); + + // get pet + let pet_result = petstore_reqwest_async::apis::get_pet_by_id(&config, 8787); + + let _pet_result = match pet_result { + Ok(pet) => { + assert_eq!(pet.id, Option::Some(8787)); + assert_eq!(pet.name, "Rust Pet"); + assert_eq!(pet.photo_urls, vec!["https://11".to_string(), "https://22".to_string()]); + }, + Err(error) => println!("error: {:?}", error), + }; +} diff --git a/samples/client/petstore/rust/reqwest/petstore/.openapi-generator/FILES b/samples/client/petstore/rust/reqwest/petstore/.openapi-generator/FILES new file mode 100644 index 00000000000..05a32e57f1d --- /dev/null +++ b/samples/client/petstore/rust/reqwest/petstore/.openapi-generator/FILES @@ -0,0 +1,28 @@ +.gitignore +.travis.yml +Cargo.toml +README.md +docs/ApiResponse.md +docs/Category.md +docs/Order.md +docs/Pet.md +docs/PetApi.md +docs/StoreApi.md +docs/Tag.md +docs/User.md +docs/UserApi.md +git_push.sh +src/apis/client.rs +src/apis/configuration.rs +src/apis/mod.rs +src/apis/pet_api.rs +src/apis/store_api.rs +src/apis/user_api.rs +src/lib.rs +src/models/api_response.rs +src/models/category.rs +src/models/mod.rs +src/models/order.rs +src/models/pet.rs +src/models/tag.rs +src/models/user.rs diff --git a/samples/client/petstore/rust/reqwest/petstore/Cargo.toml b/samples/client/petstore/rust/reqwest/petstore/Cargo.toml index 7a2aed735ea..bd9b1402d11 100644 --- a/samples/client/petstore/rust/reqwest/petstore/Cargo.toml +++ b/samples/client/petstore/rust/reqwest/petstore/Cargo.toml @@ -2,6 +2,7 @@ name = "petstore-reqwest" version = "1.0.0" authors = ["OpenAPI Generator team and contributors"] +edition = "2018" [dependencies] serde = "^1.0" diff --git a/samples/client/petstore/typescript-angular-v4/npm/pom.xml b/samples/client/petstore/rust/reqwest/petstore/pom.xml similarity index 61% rename from samples/client/petstore/typescript-angular-v4/npm/pom.xml rename to samples/client/petstore/rust/reqwest/petstore/pom.xml index 6fb9db53459..0a4e79b04b2 100644 --- a/samples/client/petstore/typescript-angular-v4/npm/pom.xml +++ b/samples/client/petstore/rust/reqwest/petstore/pom.xml @@ -1,10 +1,10 @@ 4.0.0 org.openapitools - TSAngular4PestoreClientTests + RustReqwestClientTests pom 1.0-SNAPSHOT - TS Angular 4 Petstore Client Tests + Rust Reqwest Petstore Client @@ -27,29 +27,15 @@ 1.2.1 - npm-install - pre-integration-test - - exec - - - npm - - install - - - - - npm-run-build + bundle-test integration-test exec - npm + cargo - run - build + test diff --git a/samples/client/petstore/rust/reqwest/petstore/src/apis/mod.rs b/samples/client/petstore/rust/reqwest/petstore/src/apis/mod.rs index e108d3e6093..5951c1bdd81 100644 --- a/samples/client/petstore/rust/reqwest/petstore/src/apis/mod.rs +++ b/samples/client/petstore/rust/reqwest/petstore/src/apis/mod.rs @@ -45,5 +45,5 @@ pub use self::store_api::{ StoreApi, StoreApiClient }; mod user_api; pub use self::user_api::{ UserApi, UserApiClient }; -pub mod configuration; pub mod client; +pub mod configuration; diff --git a/samples/client/petstore/rust/reqwest/petstore/src/apis/pet_api.rs b/samples/client/petstore/rust/reqwest/petstore/src/apis/pet_api.rs index 691461345d0..110aea402e9 100644 --- a/samples/client/petstore/rust/reqwest/petstore/src/apis/pet_api.rs +++ b/samples/client/petstore/rust/reqwest/petstore/src/apis/pet_api.rs @@ -8,9 +8,9 @@ * Generated by: https://openapi-generator.tech */ +#[allow(unused_imports)] use std::rc::Rc; use std::borrow::Borrow; -#[allow(unused_imports)] use std::option::Option; use reqwest; @@ -57,7 +57,6 @@ impl PetApi for PetApiClient { }; req_builder = req_builder.json(&body); - // send request let req = req_builder.build()?; let mut resp = client.execute(req)?; if resp.status().is_success() { @@ -88,7 +87,6 @@ impl PetApi for PetApiClient { req_builder = req_builder.bearer_auth(token.to_owned()); }; - // send request let req = req_builder.build()?; let mut resp = client.execute(req)?; if resp.status().is_success() { @@ -117,7 +115,6 @@ impl PetApi for PetApiClient { req_builder = req_builder.bearer_auth(token.to_owned()); }; - // send request let req = req_builder.build()?; let mut resp = client.execute(req)?; if resp.status().is_success() { @@ -146,7 +143,6 @@ impl PetApi for PetApiClient { req_builder = req_builder.bearer_auth(token.to_owned()); }; - // send request let req = req_builder.build()?; let mut resp = client.execute(req)?; if resp.status().is_success() { @@ -179,7 +175,6 @@ impl PetApi for PetApiClient { req_builder = req_builder.header("api_key", val); }; - // send request let req = req_builder.build()?; let mut resp = client.execute(req)?; if resp.status().is_success() { @@ -208,7 +203,6 @@ impl PetApi for PetApiClient { }; req_builder = req_builder.json(&body); - // send request let req = req_builder.build()?; let mut resp = client.execute(req)?; if resp.status().is_success() { @@ -244,7 +238,6 @@ impl PetApi for PetApiClient { } req_builder = req_builder.form(&form_params); - // send request let req = req_builder.build()?; let mut resp = client.execute(req)?; if resp.status().is_success() { @@ -280,7 +273,6 @@ impl PetApi for PetApiClient { } req_builder = req_builder.multipart(form); - // send request let req = req_builder.build()?; let mut resp = client.execute(req)?; if resp.status().is_success() { diff --git a/samples/client/petstore/rust/reqwest/petstore/src/apis/store_api.rs b/samples/client/petstore/rust/reqwest/petstore/src/apis/store_api.rs index 3e3542fbf7c..49f625c6e4a 100644 --- a/samples/client/petstore/rust/reqwest/petstore/src/apis/store_api.rs +++ b/samples/client/petstore/rust/reqwest/petstore/src/apis/store_api.rs @@ -8,9 +8,9 @@ * Generated by: https://openapi-generator.tech */ +#[allow(unused_imports)] use std::rc::Rc; use std::borrow::Borrow; -#[allow(unused_imports)] use std::option::Option; use reqwest; @@ -49,7 +49,6 @@ impl StoreApi for StoreApiClient { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); } - // send request let req = req_builder.build()?; let mut resp = client.execute(req)?; if resp.status().is_success() { @@ -82,7 +81,6 @@ impl StoreApi for StoreApiClient { req_builder = req_builder.header("api_key", val); }; - // send request let req = req_builder.build()?; let mut resp = client.execute(req)?; if resp.status().is_success() { @@ -107,7 +105,6 @@ impl StoreApi for StoreApiClient { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); } - // send request let req = req_builder.build()?; let mut resp = client.execute(req)?; if resp.status().is_success() { @@ -133,7 +130,6 @@ impl StoreApi for StoreApiClient { } req_builder = req_builder.json(&body); - // send request let req = req_builder.build()?; let mut resp = client.execute(req)?; if resp.status().is_success() { diff --git a/samples/client/petstore/rust/reqwest/petstore/src/apis/user_api.rs b/samples/client/petstore/rust/reqwest/petstore/src/apis/user_api.rs index c117ff0111b..3bb552cd84a 100644 --- a/samples/client/petstore/rust/reqwest/petstore/src/apis/user_api.rs +++ b/samples/client/petstore/rust/reqwest/petstore/src/apis/user_api.rs @@ -8,9 +8,9 @@ * Generated by: https://openapi-generator.tech */ +#[allow(unused_imports)] use std::rc::Rc; use std::borrow::Borrow; -#[allow(unused_imports)] use std::option::Option; use reqwest; @@ -54,7 +54,6 @@ impl UserApi for UserApiClient { } req_builder = req_builder.json(&body); - // send request let req = req_builder.build()?; let mut resp = client.execute(req)?; if resp.status().is_success() { @@ -80,7 +79,6 @@ impl UserApi for UserApiClient { } req_builder = req_builder.json(&body); - // send request let req = req_builder.build()?; let mut resp = client.execute(req)?; if resp.status().is_success() { @@ -106,7 +104,6 @@ impl UserApi for UserApiClient { } req_builder = req_builder.json(&body); - // send request let req = req_builder.build()?; let mut resp = client.execute(req)?; if resp.status().is_success() { @@ -131,7 +128,6 @@ impl UserApi for UserApiClient { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); } - // send request let req = req_builder.build()?; let mut resp = client.execute(req)?; if resp.status().is_success() { @@ -156,7 +152,6 @@ impl UserApi for UserApiClient { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); } - // send request let req = req_builder.build()?; let mut resp = client.execute(req)?; if resp.status().is_success() { @@ -183,7 +178,6 @@ impl UserApi for UserApiClient { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); } - // send request let req = req_builder.build()?; let mut resp = client.execute(req)?; if resp.status().is_success() { @@ -208,7 +202,6 @@ impl UserApi for UserApiClient { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); } - // send request let req = req_builder.build()?; let mut resp = client.execute(req)?; if resp.status().is_success() { @@ -234,7 +227,6 @@ impl UserApi for UserApiClient { } req_builder = req_builder.json(&body); - // send request let req = req_builder.build()?; let mut resp = client.execute(req)?; if resp.status().is_success() { diff --git a/samples/client/petstore/rust/reqwest/petstore/tests/pet_tests.rs b/samples/client/petstore/rust/reqwest/petstore/tests/pet_tests.rs new file mode 100644 index 00000000000..61d26eae449 --- /dev/null +++ b/samples/client/petstore/rust/reqwest/petstore/tests/pet_tests.rs @@ -0,0 +1,34 @@ +extern crate petstore_reqwest; +use petstore_reqwest::apis::PetApi; +use petstore_reqwest::apis::PetApiClient; +use petstore_reqwest::apis::configuration; +//use petstore_reqwest::apis::PetApiUpdatePetWithFormParams; +use petstore_reqwest::models::{Pet}; +use std::option::Option; +use std::rc::Rc; + +#[test] +fn test_pet() { + let config = configuration::Configuration::new(); + let pet_api_client = PetApiClient::new(Rc::new(config)); + + // create pet object + let photo_urls = vec!["https://11".to_string(), "https://22".to_string()]; + let mut new_pet = Pet::new("Rust Pet".to_string(), photo_urls); + new_pet.id = Option::Some(8787); + + // add pet + let _add_result = pet_api_client.add_pet(new_pet); + + // get pet + let pet_result = pet_api_client.get_pet_by_id(8787); + + let _pet_result = match pet_result { + Ok(pet) => { + assert_eq!(pet.id, Option::Some(8787)); + assert_eq!(pet.name, "Rust Pet"); + assert_eq!(pet.photo_urls, vec!["https://11".to_string(), "https://22".to_string()]); + }, + Err(error) => println!("error: {:?}", error), + }; +} diff --git a/samples/client/petstore/rust/reqwest/rust-test/.openapi-generator/FILES b/samples/client/petstore/rust/reqwest/rust-test/.openapi-generator/FILES new file mode 100644 index 00000000000..1f6d4ae8571 --- /dev/null +++ b/samples/client/petstore/rust/reqwest/rust-test/.openapi-generator/FILES @@ -0,0 +1,14 @@ +.gitignore +.travis.yml +Cargo.toml +README.md +docs/DefaultApi.md +docs/TypeTesting.md +git_push.sh +src/apis/client.rs +src/apis/configuration.rs +src/apis/default_api.rs +src/apis/mod.rs +src/lib.rs +src/models/mod.rs +src/models/type_testing.rs diff --git a/samples/client/petstore/rust/reqwest/rust-test/Cargo.toml b/samples/client/petstore/rust/reqwest/rust-test/Cargo.toml index 60c968a7cf2..1c36153fd79 100644 --- a/samples/client/petstore/rust/reqwest/rust-test/Cargo.toml +++ b/samples/client/petstore/rust/reqwest/rust-test/Cargo.toml @@ -2,6 +2,7 @@ name = "rust-test-reqwest" version = "1.0.0" authors = ["OpenAPI Generator team and contributors"] +edition = "2018" [dependencies] serde = "^1.0" diff --git a/samples/client/petstore/rust/reqwest/rust-test/src/apis/default_api.rs b/samples/client/petstore/rust/reqwest/rust-test/src/apis/default_api.rs index 1861d76aeb3..e65d80b2272 100644 --- a/samples/client/petstore/rust/reqwest/rust-test/src/apis/default_api.rs +++ b/samples/client/petstore/rust/reqwest/rust-test/src/apis/default_api.rs @@ -8,9 +8,9 @@ * Generated by: https://openapi-generator.tech */ +#[allow(unused_imports)] use std::rc::Rc; use std::borrow::Borrow; -#[allow(unused_imports)] use std::option::Option; use reqwest; @@ -46,7 +46,6 @@ impl DefaultApi for DefaultApiClient { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); } - // send request let req = req_builder.build()?; let mut resp = client.execute(req)?; if resp.status().is_success() { diff --git a/samples/client/petstore/rust/reqwest/rust-test/src/apis/mod.rs b/samples/client/petstore/rust/reqwest/rust-test/src/apis/mod.rs index 45f21f672e9..68e16d25dd7 100644 --- a/samples/client/petstore/rust/reqwest/rust-test/src/apis/mod.rs +++ b/samples/client/petstore/rust/reqwest/rust-test/src/apis/mod.rs @@ -41,5 +41,5 @@ pub fn urlencode>(s: T) -> String { mod default_api; pub use self::default_api::{ DefaultApi, DefaultApiClient }; -pub mod configuration; pub mod client; +pub mod configuration; diff --git a/samples/client/petstore/typescript-angular-v2/default/.gitignore b/samples/client/petstore/typescript-angular-v2/default/.gitignore deleted file mode 100644 index 149b5765472..00000000000 --- a/samples/client/petstore/typescript-angular-v2/default/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -wwwroot/*.js -node_modules -typings -dist diff --git a/samples/client/petstore/typescript-angular-v2/default/.openapi-generator-ignore b/samples/client/petstore/typescript-angular-v2/default/.openapi-generator-ignore deleted file mode 100644 index 7484ee590a3..00000000000 --- a/samples/client/petstore/typescript-angular-v2/default/.openapi-generator-ignore +++ /dev/null @@ -1,23 +0,0 @@ -# OpenAPI Generator Ignore -# Generated by openapi-generator https://github.com/openapitools/openapi-generator - -# Use this file to prevent files from being overwritten by the generator. -# The patterns follow closely to .gitignore or .dockerignore. - -# As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: -#ApiClient.cs - -# You can match any string of characters against a directory, file or extension with a single asterisk (*): -#foo/*/qux -# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux - -# You can recursively match patterns against a directory, file or extension with a double asterisk (**): -#foo/**/qux -# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux - -# You can also negate patterns with an exclamation (!). -# For example, you can ignore all files in a docs folder with the file extension .md: -#docs/*.md -# Then explicitly reverse the ignore rule for a single file: -#!docs/README.md diff --git a/samples/client/petstore/typescript-angular-v2/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v2/default/.openapi-generator/VERSION deleted file mode 100644 index d99e7162d01..00000000000 --- a/samples/client/petstore/typescript-angular-v2/default/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -5.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v2/default/README.md b/samples/client/petstore/typescript-angular-v2/default/README.md deleted file mode 100644 index b9bb2dbb680..00000000000 --- a/samples/client/petstore/typescript-angular-v2/default/README.md +++ /dev/null @@ -1,201 +0,0 @@ -## @ - -### Building - -To install the required dependencies and to build the typescript sources run: -``` -npm install -npm run build -``` - -### publishing - -First build the package then run ```npm publish``` - -### consuming - -Navigate to the folder of your consuming project and run one of next commands. - -_published:_ - -``` -npm install @ --save -``` - -_without publishing (not recommended):_ - -``` -npm install PATH_TO_GENERATED_PACKAGE/-.tgz --save -``` - -_It's important to take the tgz file, otherwise you'll get trouble with links on windows_ - -_using `npm link`:_ - -In PATH_TO_GENERATED_PACKAGE: -``` -npm link -``` - -In your project: -``` -npm link -``` - -__Note for Windows users:__ The Angular CLI has troubles to use linked npm packages. -Please refer to this issue https://github.com/angular/angular-cli/issues/8284 for a solution / workaround. -Published packages are not effected by this issue. - - -#### General usage - -In your Angular project: - - -``` -// without configuring providers -import { ApiModule } from ''; - -import { HttpModule } from '@angular/http'; - -@NgModule({ - imports: [ - ApiModule, - HttpModule - ], - declarations: [ AppComponent ], - providers: [], - bootstrap: [ AppComponent ] -}) -export class AppModule {} -``` - -``` -// configuring providers -import { ApiModule, Configuration, ConfigurationParameters } from ''; - -export function apiConfigFactory (): Configuration => { - const params: ConfigurationParameters = { - // set configuration parameters here. - } - return new Configuration(params); -} - -@NgModule({ - imports: [ ApiModule.forRoot(apiConfigFactory) ], - declarations: [ AppComponent ], - providers: [], - bootstrap: [ AppComponent ] -}) -export class AppModule {} -``` - -``` -// configuring providers with an authentication service that manages your access tokens -import { ApiModule, Configuration } from ''; - -@NgModule({ - imports: [ ApiModule ], - declarations: [ AppComponent ], - providers: [ - { - provide: Configuration, - useFactory: (authService: AuthService) => new Configuration( - { - basePath: environment.apiUrl, - accessToken: authService.getAccessToken.bind(authService) - } - ), - deps: [AuthService], - multi: false - } - ], - bootstrap: [ AppComponent ] -}) -export class AppModule {} -``` - -``` -import { DefaultApi } from ''; - -export class AppComponent { - constructor(private apiGateway: DefaultApi) { } -} -``` - -Note: The ApiModule is restricted to being instantiated once app wide. -This is to ensure that all services are treated as singletons. - -#### Using multiple OpenAPI files / APIs / ApiModules -In order to use multiple `ApiModules` generated from different OpenAPI files, -you can create an alias name when importing the modules -in order to avoid naming conflicts: -``` -import { ApiModule } from 'my-api-path'; -import { ApiModule as OtherApiModule } from 'my-other-api-path'; - -import { HttpModule } from '@angular/http'; - -@NgModule({ - imports: [ - ApiModule, - OtherApiModule, - HttpModule - ] -}) -export class AppModule { - -} -``` - - -### Set service base path -If different than the generated base path, during app bootstrap, you can provide the base path to your service. - -``` -import { BASE_PATH } from ''; - -bootstrap(AppComponent, [ - { provide: BASE_PATH, useValue: 'https://your-web-service.com' }, -]); -``` -or - -``` -import { BASE_PATH } from ''; - -@NgModule({ - imports: [], - declarations: [ AppComponent ], - providers: [ provide: BASE_PATH, useValue: 'https://your-web-service.com' ], - bootstrap: [ AppComponent ] -}) -export class AppModule {} -``` - - -#### Using @angular/cli -First extend your `src/environments/*.ts` files by adding the corresponding base path: - -``` -export const environment = { - production: false, - API_BASE_PATH: 'http://127.0.0.1:8080' -}; -``` - -In the src/app/app.module.ts: -``` -import { BASE_PATH } from ''; -import { environment } from '../environments/environment'; - -@NgModule({ - declarations: [ - AppComponent - ], - imports: [ ], - providers: [{ provide: BASE_PATH, useValue: environment.API_BASE_PATH }], - bootstrap: [ AppComponent ] -}) -export class AppModule { } -``` diff --git a/samples/client/petstore/typescript-angular-v2/default/api.module.ts b/samples/client/petstore/typescript-angular-v2/default/api.module.ts deleted file mode 100644 index d321b1180de..00000000000 --- a/samples/client/petstore/typescript-angular-v2/default/api.module.ts +++ /dev/null @@ -1,37 +0,0 @@ -import { NgModule, ModuleWithProviders, SkipSelf, Optional } from '@angular/core'; -import { Configuration } from './configuration'; - -import { Http } from '@angular/http'; - -import { PetService } from './api/pet.service'; -import { StoreService } from './api/store.service'; -import { UserService } from './api/user.service'; - -@NgModule({ - imports: [], - declarations: [], - exports: [], - providers: [ - PetService, - StoreService, - UserService ] -}) -export class ApiModule { - public static forRoot(configurationFactory: () => Configuration): ModuleWithProviders { - return { - ngModule: ApiModule, - providers: [ { provide: Configuration, useFactory: configurationFactory } ] - }; - } - - constructor( @Optional() @SkipSelf() parentModule: ApiModule, - @Optional() http: Http) { - if (parentModule) { - throw new Error('ApiModule is already loaded. Import in your base AppModule only.'); - } - if (!http) { - throw new Error('You need to import the HttpModule in your AppModule! \n' + - 'See also https://github.com/angular/angular/issues/20575'); - } - } -} diff --git a/samples/client/petstore/typescript-angular-v2/default/api/api.ts b/samples/client/petstore/typescript-angular-v2/default/api/api.ts deleted file mode 100644 index 8e44b64083d..00000000000 --- a/samples/client/petstore/typescript-angular-v2/default/api/api.ts +++ /dev/null @@ -1,7 +0,0 @@ -export * from './pet.service'; -import { PetService } from './pet.service'; -export * from './store.service'; -import { StoreService } from './store.service'; -export * from './user.service'; -import { UserService } from './user.service'; -export const APIS = [PetService, StoreService, UserService]; diff --git a/samples/client/petstore/typescript-angular-v2/default/api/pet.service.ts b/samples/client/petstore/typescript-angular-v2/default/api/pet.service.ts deleted file mode 100644 index 128c4d58bf7..00000000000 --- a/samples/client/petstore/typescript-angular-v2/default/api/pet.service.ts +++ /dev/null @@ -1,714 +0,0 @@ -/** - * 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. - * - * The version of the OpenAPI document: 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. - */ -/* tslint:disable:no-unused-variable member-ordering */ - -import { Inject, Injectable, Optional } from '@angular/core'; -import { Http, Headers, URLSearchParams, - RequestMethod, RequestOptions, RequestOptionsArgs, - Response, ResponseContentType, QueryEncoder } from '@angular/http'; -import { CustomQueryEncoderHelper } from '../encoder'; -import { Observable } from 'rxjs/Observable'; -import '../rxjs-operators'; - -import { ApiResponse } from '../model/models'; -import { Pet } from '../model/models'; - -import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; -import { Configuration } from '../configuration'; - - - -@Injectable() -export class PetService { - - protected basePath = 'http://petstore.swagger.io/v2'; - public defaultHeaders = new Headers(); - public configuration = new Configuration(); - public encoder: QueryEncoder; - - constructor(protected http: Http, @Optional()@Inject(BASE_PATH) basePath: string, @Optional() configuration: Configuration) { - if (configuration) { - this.configuration = configuration; - } - if (typeof this.configuration.basePath !== 'string') { - if (typeof basePath !== 'string') { - basePath = this.basePath; - } - this.configuration.basePath = basePath; - } - this.encoder = this.configuration.encoder || new CustomQueryEncoderHelper(); - } - - /** - * @param consumes string[] mime-types - * @return true: consumes contains 'multipart/form-data', false: otherwise - */ - private canConsumeForm(consumes: string[]): boolean { - const form = 'multipart/form-data'; - for (const consume of consumes) { - if (form === consume) { - return true; - } - } - return false; - } - - /** - * - * @summary Add a new pet to the store - - * @param body Pet object that needs to be added to the store - */ - public addPet(body: Pet, extraHttpRequestParams?: RequestOptionsArgs): Observable<{}> { - return this.addPetWithHttpInfo(body, extraHttpRequestParams) - .map((response: Response) => { - if (response.status === 204) { - return undefined; - } else { - return response.json() || {}; - } - }); - } - - /** - * - * @summary Deletes a pet - - * @param petId Pet id to delete - * @param apiKey - */ - public deletePet(petId: number, apiKey?: string, extraHttpRequestParams?: RequestOptionsArgs): Observable<{}> { - return this.deletePetWithHttpInfo(petId, apiKey, extraHttpRequestParams) - .map((response: Response) => { - if (response.status === 204) { - return undefined; - } else { - return response.json() || {}; - } - }); - } - - /** - * Multiple status values can be provided with comma separated strings - * @summary Finds Pets by status - - * @param status Status values that need to be considered for filter - */ - public findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, extraHttpRequestParams?: RequestOptionsArgs): Observable> { - return this.findPetsByStatusWithHttpInfo(status, extraHttpRequestParams) - .map((response: Response) => { - if (response.status === 204) { - return undefined; - } else { - return response.json() || {}; - } - }); - } - - /** - * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. - * @summary Finds Pets by tags - - * @param tags Tags to filter by - */ - public findPetsByTags(tags: Array, extraHttpRequestParams?: RequestOptionsArgs): Observable> { - return this.findPetsByTagsWithHttpInfo(tags, extraHttpRequestParams) - .map((response: Response) => { - if (response.status === 204) { - return undefined; - } else { - return response.json() || {}; - } - }); - } - - /** - * Returns a single pet - * @summary Find pet by ID - - * @param petId ID of pet to return - */ - public getPetById(petId: number, extraHttpRequestParams?: RequestOptionsArgs): Observable { - return this.getPetByIdWithHttpInfo(petId, extraHttpRequestParams) - .map((response: Response) => { - if (response.status === 204) { - return undefined; - } else { - return response.json() || {}; - } - }); - } - - /** - * - * @summary Update an existing pet - - * @param body Pet object that needs to be added to the store - */ - public updatePet(body: Pet, extraHttpRequestParams?: RequestOptionsArgs): Observable<{}> { - return this.updatePetWithHttpInfo(body, extraHttpRequestParams) - .map((response: Response) => { - if (response.status === 204) { - return undefined; - } else { - return response.json() || {}; - } - }); - } - - /** - * - * @summary Updates a pet in the store with form data - - * @param petId ID of pet that needs to be updated - * @param name Updated name of the pet - * @param status Updated status of the pet - */ - public updatePetWithForm(petId: number, name?: string, status?: string, extraHttpRequestParams?: RequestOptionsArgs): Observable<{}> { - return this.updatePetWithFormWithHttpInfo(petId, name, status, extraHttpRequestParams) - .map((response: Response) => { - if (response.status === 204) { - return undefined; - } else { - return response.json() || {}; - } - }); - } - - /** - * - * @summary uploads an image - - * @param petId ID of pet to update - * @param additionalMetadata Additional data to pass to server - * @param file file to upload - */ - public uploadFile(petId: number, additionalMetadata?: string, file?: Blob, extraHttpRequestParams?: RequestOptionsArgs): Observable { - return this.uploadFileWithHttpInfo(petId, additionalMetadata, file, extraHttpRequestParams) - .map((response: Response) => { - if (response.status === 204) { - return undefined; - } else { - return response.json() || {}; - } - }); - } - - - private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams { - if (typeof value === "object" && value instanceof Date === false) { - this.addToHttpParamsRecursive(httpParams, value); - } else { - this.addToHttpParamsRecursive(httpParams, value, key); - } - return httpParams; - } - - private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams { - if (value == null) { - return httpParams; - } - - if (typeof value === "object") { - if (Array.isArray(value)) { - (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); - } else if (value instanceof Date) { - if (key != null) { - httpParams.append(key, - (value as Date).toISOString().substr(0, 10)); - } else { - throw Error("key may not be null if value is Date"); - } - } else { - Object.keys(value).forEach( k => this.addToHttpParamsRecursive( - httpParams, value[k], key != null ? `${key}.${k}` : k)); - } - } else if (key != null) { - httpParams.append(key, value); - } else { - throw Error("key may not be null if value is not object or array"); - } - return httpParams; - } - - /** - * Add a new pet to the store - * @param body Pet object that needs to be added to the store - */ - public addPetWithHttpInfo(body: Pet, extraHttpRequestParams?: RequestOptionsArgs, options?: {httpHeaderAccept?: undefined}): Observable { - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling addPet.'); - } - - let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845 - - // authentication (petstore_auth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers.set('Authorization', 'Bearer ' + accessToken); - } - - let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; - if (httpHeaderAcceptSelected === undefined) { - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - ]; - httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); - } - if (httpHeaderAcceptSelected !== undefined) { - headers.set('Accept', httpHeaderAcceptSelected); - } - - - // to determine the Content-Type header - const consumes: string[] = [ - 'application/json', - 'application/xml' - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers.set('Content-Type', httpContentTypeSelected); - } - - let requestOptions: RequestOptionsArgs = new RequestOptions({ - method: RequestMethod.Post, - headers: headers, - body: body == null ? '' : JSON.stringify(body), // https://github.com/angular/angular/issues/10612 - responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, - withCredentials:this.configuration.withCredentials - }); - // issues#4037 - if (extraHttpRequestParams) { - requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); - } - - return this.http.request(`${this.configuration.basePath}/pet`, requestOptions); - } - - /** - * Deletes a pet - * @param petId Pet id to delete - * @param apiKey - */ - public deletePetWithHttpInfo(petId: number, apiKey?: string, extraHttpRequestParams?: RequestOptionsArgs, options?: {httpHeaderAccept?: undefined}): Observable { - if (petId === null || petId === undefined) { - throw new Error('Required parameter petId was null or undefined when calling deletePet.'); - } - - let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845 - if (apiKey !== undefined && apiKey !== null) { - headers.set('api_key', String(apiKey)); - } - - // authentication (petstore_auth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers.set('Authorization', 'Bearer ' + accessToken); - } - - let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; - if (httpHeaderAcceptSelected === undefined) { - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - ]; - httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); - } - if (httpHeaderAcceptSelected !== undefined) { - headers.set('Accept', httpHeaderAcceptSelected); - } - - - let requestOptions: RequestOptionsArgs = new RequestOptions({ - method: RequestMethod.Delete, - headers: headers, - responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, - withCredentials:this.configuration.withCredentials - }); - // issues#4037 - if (extraHttpRequestParams) { - requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); - } - - return this.http.request(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}`, requestOptions); - } - - /** - * 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 - */ - public findPetsByStatusWithHttpInfo(status: Array<'available' | 'pending' | 'sold'>, extraHttpRequestParams?: RequestOptionsArgs, options?: {httpHeaderAccept?: 'application/xml' | 'application/json'}): Observable { - if (status === null || status === undefined) { - throw new Error('Required parameter status was null or undefined when calling findPetsByStatus.'); - } - - let queryParameters = new URLSearchParams('', this.encoder); - if (status) { - this.addToHttpParams(queryParameters, - status.join(COLLECTION_FORMATS['csv']), 'status'); - } - - let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845 - - // authentication (petstore_auth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers.set('Authorization', 'Bearer ' + accessToken); - } - - let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; - if (httpHeaderAcceptSelected === undefined) { - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/xml', - 'application/json' - ]; - httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); - } - if (httpHeaderAcceptSelected !== undefined) { - headers.set('Accept', httpHeaderAcceptSelected); - } - - - let requestOptions: RequestOptionsArgs = new RequestOptions({ - method: RequestMethod.Get, - headers: headers, - responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, - search: queryParameters, - withCredentials:this.configuration.withCredentials - }); - // issues#4037 - if (extraHttpRequestParams) { - requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); - } - - return this.http.request(`${this.configuration.basePath}/pet/findByStatus`, requestOptions); - } - - /** - * 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 - */ - public findPetsByTagsWithHttpInfo(tags: Array, extraHttpRequestParams?: RequestOptionsArgs, options?: {httpHeaderAccept?: 'application/xml' | 'application/json'}): Observable { - if (tags === null || tags === undefined) { - throw new Error('Required parameter tags was null or undefined when calling findPetsByTags.'); - } - - let queryParameters = new URLSearchParams('', this.encoder); - if (tags) { - this.addToHttpParams(queryParameters, - tags.join(COLLECTION_FORMATS['csv']), 'tags'); - } - - let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845 - - // authentication (petstore_auth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers.set('Authorization', 'Bearer ' + accessToken); - } - - let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; - if (httpHeaderAcceptSelected === undefined) { - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/xml', - 'application/json' - ]; - httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); - } - if (httpHeaderAcceptSelected !== undefined) { - headers.set('Accept', httpHeaderAcceptSelected); - } - - - let requestOptions: RequestOptionsArgs = new RequestOptions({ - method: RequestMethod.Get, - headers: headers, - responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, - search: queryParameters, - withCredentials:this.configuration.withCredentials - }); - // issues#4037 - if (extraHttpRequestParams) { - requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); - } - - return this.http.request(`${this.configuration.basePath}/pet/findByTags`, requestOptions); - } - - /** - * Find pet by ID - * Returns a single pet - * @param petId ID of pet to return - */ - public getPetByIdWithHttpInfo(petId: number, extraHttpRequestParams?: RequestOptionsArgs, options?: {httpHeaderAccept?: 'application/xml' | 'application/json'}): Observable { - if (petId === null || petId === undefined) { - throw new Error('Required parameter petId was null or undefined when calling getPetById.'); - } - - let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845 - - // authentication (api_key) required - if (this.configuration.apiKeys) { - const key: string | undefined = this.configuration.apiKeys["api_key"] || this.configuration.apiKeys["api_key"]; - if (key) { - headers.set('api_key', key); - } - } - - let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; - if (httpHeaderAcceptSelected === undefined) { - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/xml', - 'application/json' - ]; - httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); - } - if (httpHeaderAcceptSelected !== undefined) { - headers.set('Accept', httpHeaderAcceptSelected); - } - - - let requestOptions: RequestOptionsArgs = new RequestOptions({ - method: RequestMethod.Get, - headers: headers, - responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, - withCredentials:this.configuration.withCredentials - }); - // issues#4037 - if (extraHttpRequestParams) { - requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); - } - - return this.http.request(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}`, requestOptions); - } - - /** - * Update an existing pet - * @param body Pet object that needs to be added to the store - */ - public updatePetWithHttpInfo(body: Pet, extraHttpRequestParams?: RequestOptionsArgs, options?: {httpHeaderAccept?: undefined}): Observable { - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling updatePet.'); - } - - let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845 - - // authentication (petstore_auth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers.set('Authorization', 'Bearer ' + accessToken); - } - - let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; - if (httpHeaderAcceptSelected === undefined) { - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - ]; - httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); - } - if (httpHeaderAcceptSelected !== undefined) { - headers.set('Accept', httpHeaderAcceptSelected); - } - - - // to determine the Content-Type header - const consumes: string[] = [ - 'application/json', - 'application/xml' - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers.set('Content-Type', httpContentTypeSelected); - } - - let requestOptions: RequestOptionsArgs = new RequestOptions({ - method: RequestMethod.Put, - headers: headers, - body: body == null ? '' : JSON.stringify(body), // https://github.com/angular/angular/issues/10612 - responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, - withCredentials:this.configuration.withCredentials - }); - // issues#4037 - if (extraHttpRequestParams) { - requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); - } - - return this.http.request(`${this.configuration.basePath}/pet`, requestOptions); - } - - /** - * Updates a pet in the store with form data - * @param petId ID of pet that needs to be updated - * @param name Updated name of the pet - * @param status Updated status of the pet - */ - public updatePetWithFormWithHttpInfo(petId: number, name?: string, status?: string, extraHttpRequestParams?: RequestOptionsArgs, options?: {httpHeaderAccept?: undefined}): Observable { - if (petId === null || petId === undefined) { - throw new Error('Required parameter petId was null or undefined when calling updatePetWithForm.'); - } - - let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845 - - // authentication (petstore_auth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers.set('Authorization', 'Bearer ' + accessToken); - } - - let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; - if (httpHeaderAcceptSelected === undefined) { - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - ]; - httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); - } - if (httpHeaderAcceptSelected !== undefined) { - headers.set('Accept', httpHeaderAcceptSelected); - } - - // to determine the Content-Type header - const consumes: string[] = [ - 'application/x-www-form-urlencoded' - ]; - - const canConsumeForm = this.canConsumeForm(consumes); - - let formParams: { append(param: string, value: any): any; }; - let useForm = false; - let convertFormParamsToString = false; - if (useForm) { - formParams = new FormData(); - } else { - // TODO: this fails if a parameter is a file, the api can't consume "multipart/form-data" and a blob is passed. - convertFormParamsToString = true; - formParams = new URLSearchParams('', this.encoder); - // set the content-type explicitly to avoid having it set to 'text/plain' - headers.set('Content-Type', 'application/x-www-form-urlencoded;charset=UTF-8'); - } - - if (name !== undefined) { - formParams.append('name', name); - } - if (status !== undefined) { - formParams.append('status', status); - } - - let requestOptions: RequestOptionsArgs = new RequestOptions({ - method: RequestMethod.Post, - headers: headers, - body: convertFormParamsToString ? formParams.toString() : formParams, - responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, - withCredentials:this.configuration.withCredentials - }); - // issues#4037 - if (extraHttpRequestParams) { - requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); - } - - return this.http.request(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}`, requestOptions); - } - - /** - * uploads an image - * @param petId ID of pet to update - * @param additionalMetadata Additional data to pass to server - * @param file file to upload - */ - public uploadFileWithHttpInfo(petId: number, additionalMetadata?: string, file?: Blob, extraHttpRequestParams?: RequestOptionsArgs, options?: {httpHeaderAccept?: 'application/json'}): Observable { - if (petId === null || petId === undefined) { - throw new Error('Required parameter petId was null or undefined when calling uploadFile.'); - } - - let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845 - - // authentication (petstore_auth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers.set('Authorization', 'Bearer ' + accessToken); - } - - let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; - if (httpHeaderAcceptSelected === undefined) { - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); - } - if (httpHeaderAcceptSelected !== undefined) { - headers.set('Accept', httpHeaderAcceptSelected); - } - - // to determine the Content-Type header - const consumes: string[] = [ - 'multipart/form-data' - ]; - - const canConsumeForm = this.canConsumeForm(consumes); - - let formParams: { append(param: string, value: any): any; }; - let useForm = false; - let convertFormParamsToString = false; - // use FormData to transmit files using content-type "multipart/form-data" - // see https://stackoverflow.com/questions/4007969/application-x-www-form-urlencoded-or-multipart-form-data - useForm = canConsumeForm; - if (useForm) { - formParams = new FormData(); - } else { - // TODO: this fails if a parameter is a file, the api can't consume "multipart/form-data" and a blob is passed. - convertFormParamsToString = true; - formParams = new URLSearchParams('', this.encoder); - // set the content-type explicitly to avoid having it set to 'text/plain' - headers.set('Content-Type', 'application/x-www-form-urlencoded;charset=UTF-8'); - } - - if (additionalMetadata !== undefined) { - formParams.append('additionalMetadata', additionalMetadata); - } - if (file !== undefined) { - formParams.append('file', file); - } - - let requestOptions: RequestOptionsArgs = new RequestOptions({ - method: RequestMethod.Post, - headers: headers, - body: convertFormParamsToString ? formParams.toString() : formParams, - responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, - withCredentials:this.configuration.withCredentials - }); - // issues#4037 - if (extraHttpRequestParams) { - requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); - } - - return this.http.request(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}/uploadImage`, requestOptions); - } - -} diff --git a/samples/client/petstore/typescript-angular-v2/default/api/store.service.ts b/samples/client/petstore/typescript-angular-v2/default/api/store.service.ts deleted file mode 100644 index 839adc05718..00000000000 --- a/samples/client/petstore/typescript-angular-v2/default/api/store.service.ts +++ /dev/null @@ -1,324 +0,0 @@ -/** - * 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. - * - * The version of the OpenAPI document: 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. - */ -/* tslint:disable:no-unused-variable member-ordering */ - -import { Inject, Injectable, Optional } from '@angular/core'; -import { Http, Headers, URLSearchParams, - RequestMethod, RequestOptions, RequestOptionsArgs, - Response, ResponseContentType, QueryEncoder } from '@angular/http'; -import { CustomQueryEncoderHelper } from '../encoder'; -import { Observable } from 'rxjs/Observable'; -import '../rxjs-operators'; - -import { Order } from '../model/models'; - -import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; -import { Configuration } from '../configuration'; - - - -@Injectable() -export class StoreService { - - protected basePath = 'http://petstore.swagger.io/v2'; - public defaultHeaders = new Headers(); - public configuration = new Configuration(); - public encoder: QueryEncoder; - - constructor(protected http: Http, @Optional()@Inject(BASE_PATH) basePath: string, @Optional() configuration: Configuration) { - if (configuration) { - this.configuration = configuration; - } - if (typeof this.configuration.basePath !== 'string') { - if (typeof basePath !== 'string') { - basePath = this.basePath; - } - this.configuration.basePath = basePath; - } - this.encoder = this.configuration.encoder || new CustomQueryEncoderHelper(); - } - - - /** - * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors - * @summary Delete purchase order by ID - - * @param orderId ID of the order that needs to be deleted - */ - public deleteOrder(orderId: string, extraHttpRequestParams?: RequestOptionsArgs): Observable<{}> { - return this.deleteOrderWithHttpInfo(orderId, extraHttpRequestParams) - .map((response: Response) => { - if (response.status === 204) { - return undefined; - } else { - return response.json() || {}; - } - }); - } - - /** - * Returns a map of status codes to quantities - * @summary Returns pet inventories by status - - */ - public getInventory(extraHttpRequestParams?: RequestOptionsArgs): Observable<{ [key: string]: number; }> { - return this.getInventoryWithHttpInfo(extraHttpRequestParams) - .map((response: Response) => { - if (response.status === 204) { - return undefined; - } else { - return response.json() || {}; - } - }); - } - - /** - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions - * @summary Find purchase order by ID - - * @param orderId ID of pet that needs to be fetched - */ - public getOrderById(orderId: number, extraHttpRequestParams?: RequestOptionsArgs): Observable { - return this.getOrderByIdWithHttpInfo(orderId, extraHttpRequestParams) - .map((response: Response) => { - if (response.status === 204) { - return undefined; - } else { - return response.json() || {}; - } - }); - } - - /** - * - * @summary Place an order for a pet - - * @param body order placed for purchasing the pet - */ - public placeOrder(body: Order, extraHttpRequestParams?: RequestOptionsArgs): Observable { - return this.placeOrderWithHttpInfo(body, extraHttpRequestParams) - .map((response: Response) => { - if (response.status === 204) { - return undefined; - } else { - return response.json() || {}; - } - }); - } - - - private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams { - if (typeof value === "object" && value instanceof Date === false) { - this.addToHttpParamsRecursive(httpParams, value); - } else { - this.addToHttpParamsRecursive(httpParams, value, key); - } - return httpParams; - } - - private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams { - if (value == null) { - return httpParams; - } - - if (typeof value === "object") { - if (Array.isArray(value)) { - (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); - } else if (value instanceof Date) { - if (key != null) { - httpParams.append(key, - (value as Date).toISOString().substr(0, 10)); - } else { - throw Error("key may not be null if value is Date"); - } - } else { - Object.keys(value).forEach( k => this.addToHttpParamsRecursive( - httpParams, value[k], key != null ? `${key}.${k}` : k)); - } - } else if (key != null) { - httpParams.append(key, value); - } else { - throw Error("key may not be null if value is not object or array"); - } - return httpParams; - } - - /** - * Delete purchase order by ID - * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors - * @param orderId ID of the order that needs to be deleted - */ - public deleteOrderWithHttpInfo(orderId: string, extraHttpRequestParams?: RequestOptionsArgs, options?: {httpHeaderAccept?: undefined}): Observable { - if (orderId === null || orderId === undefined) { - throw new Error('Required parameter orderId was null or undefined when calling deleteOrder.'); - } - - let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845 - - let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; - if (httpHeaderAcceptSelected === undefined) { - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - ]; - httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); - } - if (httpHeaderAcceptSelected !== undefined) { - headers.set('Accept', httpHeaderAcceptSelected); - } - - - let requestOptions: RequestOptionsArgs = new RequestOptions({ - method: RequestMethod.Delete, - headers: headers, - responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, - withCredentials:this.configuration.withCredentials - }); - // issues#4037 - if (extraHttpRequestParams) { - requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); - } - - return this.http.request(`${this.configuration.basePath}/store/order/${encodeURIComponent(String(orderId))}`, requestOptions); - } - - /** - * Returns pet inventories by status - * Returns a map of status codes to quantities - */ - public getInventoryWithHttpInfo(extraHttpRequestParams?: RequestOptionsArgs, options?: {httpHeaderAccept?: 'application/json'}): Observable { - - let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845 - - // authentication (api_key) required - if (this.configuration.apiKeys) { - const key: string | undefined = this.configuration.apiKeys["api_key"] || this.configuration.apiKeys["api_key"]; - if (key) { - headers.set('api_key', key); - } - } - - let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; - if (httpHeaderAcceptSelected === undefined) { - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); - } - if (httpHeaderAcceptSelected !== undefined) { - headers.set('Accept', httpHeaderAcceptSelected); - } - - - let requestOptions: RequestOptionsArgs = new RequestOptions({ - method: RequestMethod.Get, - headers: headers, - responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, - withCredentials:this.configuration.withCredentials - }); - // issues#4037 - if (extraHttpRequestParams) { - requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); - } - - return this.http.request(`${this.configuration.basePath}/store/inventory`, requestOptions); - } - - /** - * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions - * @param orderId ID of pet that needs to be fetched - */ - public getOrderByIdWithHttpInfo(orderId: number, extraHttpRequestParams?: RequestOptionsArgs, options?: {httpHeaderAccept?: 'application/xml' | 'application/json'}): Observable { - if (orderId === null || orderId === undefined) { - throw new Error('Required parameter orderId was null or undefined when calling getOrderById.'); - } - - let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845 - - let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; - if (httpHeaderAcceptSelected === undefined) { - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/xml', - 'application/json' - ]; - httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); - } - if (httpHeaderAcceptSelected !== undefined) { - headers.set('Accept', httpHeaderAcceptSelected); - } - - - let requestOptions: RequestOptionsArgs = new RequestOptions({ - method: RequestMethod.Get, - headers: headers, - responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, - withCredentials:this.configuration.withCredentials - }); - // issues#4037 - if (extraHttpRequestParams) { - requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); - } - - return this.http.request(`${this.configuration.basePath}/store/order/${encodeURIComponent(String(orderId))}`, requestOptions); - } - - /** - * Place an order for a pet - * @param body order placed for purchasing the pet - */ - public placeOrderWithHttpInfo(body: Order, extraHttpRequestParams?: RequestOptionsArgs, options?: {httpHeaderAccept?: 'application/xml' | 'application/json'}): Observable { - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling placeOrder.'); - } - - let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845 - - let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; - if (httpHeaderAcceptSelected === undefined) { - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/xml', - 'application/json' - ]; - httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); - } - if (httpHeaderAcceptSelected !== undefined) { - headers.set('Accept', httpHeaderAcceptSelected); - } - - - // to determine the Content-Type header - const consumes: string[] = [ - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers.set('Content-Type', httpContentTypeSelected); - } - - let requestOptions: RequestOptionsArgs = new RequestOptions({ - method: RequestMethod.Post, - headers: headers, - body: body == null ? '' : JSON.stringify(body), // https://github.com/angular/angular/issues/10612 - responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, - withCredentials:this.configuration.withCredentials - }); - // issues#4037 - if (extraHttpRequestParams) { - requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); - } - - return this.http.request(`${this.configuration.basePath}/store/order`, requestOptions); - } - -} diff --git a/samples/client/petstore/typescript-angular-v2/default/api/user.service.ts b/samples/client/petstore/typescript-angular-v2/default/api/user.service.ts deleted file mode 100644 index 710aeb4230f..00000000000 --- a/samples/client/petstore/typescript-angular-v2/default/api/user.service.ts +++ /dev/null @@ -1,579 +0,0 @@ -/** - * 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. - * - * The version of the OpenAPI document: 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. - */ -/* tslint:disable:no-unused-variable member-ordering */ - -import { Inject, Injectable, Optional } from '@angular/core'; -import { Http, Headers, URLSearchParams, - RequestMethod, RequestOptions, RequestOptionsArgs, - Response, ResponseContentType, QueryEncoder } from '@angular/http'; -import { CustomQueryEncoderHelper } from '../encoder'; -import { Observable } from 'rxjs/Observable'; -import '../rxjs-operators'; - -import { User } from '../model/models'; - -import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; -import { Configuration } from '../configuration'; - - - -@Injectable() -export class UserService { - - protected basePath = 'http://petstore.swagger.io/v2'; - public defaultHeaders = new Headers(); - public configuration = new Configuration(); - public encoder: QueryEncoder; - - constructor(protected http: Http, @Optional()@Inject(BASE_PATH) basePath: string, @Optional() configuration: Configuration) { - if (configuration) { - this.configuration = configuration; - } - if (typeof this.configuration.basePath !== 'string') { - if (typeof basePath !== 'string') { - basePath = this.basePath; - } - this.configuration.basePath = basePath; - } - this.encoder = this.configuration.encoder || new CustomQueryEncoderHelper(); - } - - - /** - * This can only be done by the logged in user. - * @summary Create user - - * @param body Created user object - */ - public createUser(body: User, extraHttpRequestParams?: RequestOptionsArgs): Observable<{}> { - return this.createUserWithHttpInfo(body, extraHttpRequestParams) - .map((response: Response) => { - if (response.status === 204) { - return undefined; - } else { - return response.json() || {}; - } - }); - } - - /** - * - * @summary Creates list of users with given input array - - * @param body List of user object - */ - public createUsersWithArrayInput(body: Array, extraHttpRequestParams?: RequestOptionsArgs): Observable<{}> { - return this.createUsersWithArrayInputWithHttpInfo(body, extraHttpRequestParams) - .map((response: Response) => { - if (response.status === 204) { - return undefined; - } else { - return response.json() || {}; - } - }); - } - - /** - * - * @summary Creates list of users with given input array - - * @param body List of user object - */ - public createUsersWithListInput(body: Array, extraHttpRequestParams?: RequestOptionsArgs): Observable<{}> { - return this.createUsersWithListInputWithHttpInfo(body, extraHttpRequestParams) - .map((response: Response) => { - if (response.status === 204) { - return undefined; - } else { - return response.json() || {}; - } - }); - } - - /** - * This can only be done by the logged in user. - * @summary Delete user - - * @param username The name that needs to be deleted - */ - public deleteUser(username: string, extraHttpRequestParams?: RequestOptionsArgs): Observable<{}> { - return this.deleteUserWithHttpInfo(username, extraHttpRequestParams) - .map((response: Response) => { - if (response.status === 204) { - return undefined; - } else { - return response.json() || {}; - } - }); - } - - /** - * - * @summary Get user by user name - - * @param username The name that needs to be fetched. Use user1 for testing. - */ - public getUserByName(username: string, extraHttpRequestParams?: RequestOptionsArgs): Observable { - return this.getUserByNameWithHttpInfo(username, extraHttpRequestParams) - .map((response: Response) => { - if (response.status === 204) { - return undefined; - } else { - return response.json() || {}; - } - }); - } - - /** - * - * @summary Logs user into the system - - * @param username The user name for login - * @param password The password for login in clear text - */ - public loginUser(username: string, password: string, extraHttpRequestParams?: RequestOptionsArgs): Observable { - return this.loginUserWithHttpInfo(username, password, extraHttpRequestParams) - .map((response: Response) => { - if (response.status === 204) { - return undefined; - } else { - return response.json() || {}; - } - }); - } - - /** - * - * @summary Logs out current logged in user session - - */ - public logoutUser(extraHttpRequestParams?: RequestOptionsArgs): Observable<{}> { - return this.logoutUserWithHttpInfo(extraHttpRequestParams) - .map((response: Response) => { - if (response.status === 204) { - return undefined; - } else { - return response.json() || {}; - } - }); - } - - /** - * This can only be done by the logged in user. - * @summary Updated user - - * @param username name that need to be deleted - * @param body Updated user object - */ - public updateUser(username: string, body: User, extraHttpRequestParams?: RequestOptionsArgs): Observable<{}> { - return this.updateUserWithHttpInfo(username, body, extraHttpRequestParams) - .map((response: Response) => { - if (response.status === 204) { - return undefined; - } else { - return response.json() || {}; - } - }); - } - - - private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams { - if (typeof value === "object" && value instanceof Date === false) { - this.addToHttpParamsRecursive(httpParams, value); - } else { - this.addToHttpParamsRecursive(httpParams, value, key); - } - return httpParams; - } - - private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams { - if (value == null) { - return httpParams; - } - - if (typeof value === "object") { - if (Array.isArray(value)) { - (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); - } else if (value instanceof Date) { - if (key != null) { - httpParams.append(key, - (value as Date).toISOString().substr(0, 10)); - } else { - throw Error("key may not be null if value is Date"); - } - } else { - Object.keys(value).forEach( k => this.addToHttpParamsRecursive( - httpParams, value[k], key != null ? `${key}.${k}` : k)); - } - } else if (key != null) { - httpParams.append(key, value); - } else { - throw Error("key may not be null if value is not object or array"); - } - return httpParams; - } - - /** - * Create user - * This can only be done by the logged in user. - * @param body Created user object - */ - public createUserWithHttpInfo(body: User, extraHttpRequestParams?: RequestOptionsArgs, options?: {httpHeaderAccept?: undefined}): Observable { - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling createUser.'); - } - - let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845 - - let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; - if (httpHeaderAcceptSelected === undefined) { - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - ]; - httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); - } - if (httpHeaderAcceptSelected !== undefined) { - headers.set('Accept', httpHeaderAcceptSelected); - } - - - // to determine the Content-Type header - const consumes: string[] = [ - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers.set('Content-Type', httpContentTypeSelected); - } - - let requestOptions: RequestOptionsArgs = new RequestOptions({ - method: RequestMethod.Post, - headers: headers, - body: body == null ? '' : JSON.stringify(body), // https://github.com/angular/angular/issues/10612 - responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, - withCredentials:this.configuration.withCredentials - }); - // issues#4037 - if (extraHttpRequestParams) { - requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); - } - - return this.http.request(`${this.configuration.basePath}/user`, requestOptions); - } - - /** - * Creates list of users with given input array - * @param body List of user object - */ - public createUsersWithArrayInputWithHttpInfo(body: Array, extraHttpRequestParams?: RequestOptionsArgs, options?: {httpHeaderAccept?: undefined}): Observable { - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling createUsersWithArrayInput.'); - } - - let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845 - - let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; - if (httpHeaderAcceptSelected === undefined) { - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - ]; - httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); - } - if (httpHeaderAcceptSelected !== undefined) { - headers.set('Accept', httpHeaderAcceptSelected); - } - - - // to determine the Content-Type header - const consumes: string[] = [ - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers.set('Content-Type', httpContentTypeSelected); - } - - let requestOptions: RequestOptionsArgs = new RequestOptions({ - method: RequestMethod.Post, - headers: headers, - body: body == null ? '' : JSON.stringify(body), // https://github.com/angular/angular/issues/10612 - responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, - withCredentials:this.configuration.withCredentials - }); - // issues#4037 - if (extraHttpRequestParams) { - requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); - } - - return this.http.request(`${this.configuration.basePath}/user/createWithArray`, requestOptions); - } - - /** - * Creates list of users with given input array - * @param body List of user object - */ - public createUsersWithListInputWithHttpInfo(body: Array, extraHttpRequestParams?: RequestOptionsArgs, options?: {httpHeaderAccept?: undefined}): Observable { - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling createUsersWithListInput.'); - } - - let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845 - - let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; - if (httpHeaderAcceptSelected === undefined) { - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - ]; - httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); - } - if (httpHeaderAcceptSelected !== undefined) { - headers.set('Accept', httpHeaderAcceptSelected); - } - - - // to determine the Content-Type header - const consumes: string[] = [ - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers.set('Content-Type', httpContentTypeSelected); - } - - let requestOptions: RequestOptionsArgs = new RequestOptions({ - method: RequestMethod.Post, - headers: headers, - body: body == null ? '' : JSON.stringify(body), // https://github.com/angular/angular/issues/10612 - responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, - withCredentials:this.configuration.withCredentials - }); - // issues#4037 - if (extraHttpRequestParams) { - requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); - } - - return this.http.request(`${this.configuration.basePath}/user/createWithList`, requestOptions); - } - - /** - * Delete user - * This can only be done by the logged in user. - * @param username The name that needs to be deleted - */ - public deleteUserWithHttpInfo(username: string, extraHttpRequestParams?: RequestOptionsArgs, options?: {httpHeaderAccept?: undefined}): Observable { - if (username === null || username === undefined) { - throw new Error('Required parameter username was null or undefined when calling deleteUser.'); - } - - let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845 - - let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; - if (httpHeaderAcceptSelected === undefined) { - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - ]; - httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); - } - if (httpHeaderAcceptSelected !== undefined) { - headers.set('Accept', httpHeaderAcceptSelected); - } - - - let requestOptions: RequestOptionsArgs = new RequestOptions({ - method: RequestMethod.Delete, - headers: headers, - responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, - withCredentials:this.configuration.withCredentials - }); - // issues#4037 - if (extraHttpRequestParams) { - requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); - } - - return this.http.request(`${this.configuration.basePath}/user/${encodeURIComponent(String(username))}`, requestOptions); - } - - /** - * Get user by user name - * @param username The name that needs to be fetched. Use user1 for testing. - */ - public getUserByNameWithHttpInfo(username: string, extraHttpRequestParams?: RequestOptionsArgs, options?: {httpHeaderAccept?: 'application/xml' | 'application/json'}): Observable { - if (username === null || username === undefined) { - throw new Error('Required parameter username was null or undefined when calling getUserByName.'); - } - - let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845 - - let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; - if (httpHeaderAcceptSelected === undefined) { - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/xml', - 'application/json' - ]; - httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); - } - if (httpHeaderAcceptSelected !== undefined) { - headers.set('Accept', httpHeaderAcceptSelected); - } - - - let requestOptions: RequestOptionsArgs = new RequestOptions({ - method: RequestMethod.Get, - headers: headers, - responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, - withCredentials:this.configuration.withCredentials - }); - // issues#4037 - if (extraHttpRequestParams) { - requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); - } - - return this.http.request(`${this.configuration.basePath}/user/${encodeURIComponent(String(username))}`, requestOptions); - } - - /** - * Logs user into the system - * @param username The user name for login - * @param password The password for login in clear text - */ - public loginUserWithHttpInfo(username: string, password: string, extraHttpRequestParams?: RequestOptionsArgs, options?: {httpHeaderAccept?: 'application/xml' | 'application/json'}): Observable { - if (username === null || username === undefined) { - throw new Error('Required parameter username was null or undefined when calling loginUser.'); - } - if (password === null || password === undefined) { - throw new Error('Required parameter password was null or undefined when calling loginUser.'); - } - - let queryParameters = new URLSearchParams('', this.encoder); - if (username !== undefined && username !== null) { - this.addToHttpParams(queryParameters, - username, 'username'); - } - if (password !== undefined && password !== null) { - this.addToHttpParams(queryParameters, - password, 'password'); - } - - let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845 - - let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; - if (httpHeaderAcceptSelected === undefined) { - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/xml', - 'application/json' - ]; - httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); - } - if (httpHeaderAcceptSelected !== undefined) { - headers.set('Accept', httpHeaderAcceptSelected); - } - - - let requestOptions: RequestOptionsArgs = new RequestOptions({ - method: RequestMethod.Get, - headers: headers, - responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, - search: queryParameters, - withCredentials:this.configuration.withCredentials - }); - // issues#4037 - if (extraHttpRequestParams) { - requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); - } - - return this.http.request(`${this.configuration.basePath}/user/login`, requestOptions); - } - - /** - * Logs out current logged in user session - */ - public logoutUserWithHttpInfo(extraHttpRequestParams?: RequestOptionsArgs, options?: {httpHeaderAccept?: undefined}): Observable { - - let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845 - - let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; - if (httpHeaderAcceptSelected === undefined) { - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - ]; - httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); - } - if (httpHeaderAcceptSelected !== undefined) { - headers.set('Accept', httpHeaderAcceptSelected); - } - - - let requestOptions: RequestOptionsArgs = new RequestOptions({ - method: RequestMethod.Get, - headers: headers, - responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, - withCredentials:this.configuration.withCredentials - }); - // issues#4037 - if (extraHttpRequestParams) { - requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); - } - - return this.http.request(`${this.configuration.basePath}/user/logout`, requestOptions); - } - - /** - * Updated user - * This can only be done by the logged in user. - * @param username name that need to be deleted - * @param body Updated user object - */ - public updateUserWithHttpInfo(username: string, body: User, extraHttpRequestParams?: RequestOptionsArgs, options?: {httpHeaderAccept?: undefined}): Observable { - if (username === null || username === undefined) { - throw new Error('Required parameter username was null or undefined when calling updateUser.'); - } - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling updateUser.'); - } - - let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845 - - let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; - if (httpHeaderAcceptSelected === undefined) { - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - ]; - httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); - } - if (httpHeaderAcceptSelected !== undefined) { - headers.set('Accept', httpHeaderAcceptSelected); - } - - - // to determine the Content-Type header - const consumes: string[] = [ - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers.set('Content-Type', httpContentTypeSelected); - } - - let requestOptions: RequestOptionsArgs = new RequestOptions({ - method: RequestMethod.Put, - headers: headers, - body: body == null ? '' : JSON.stringify(body), // https://github.com/angular/angular/issues/10612 - responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, - withCredentials:this.configuration.withCredentials - }); - // issues#4037 - if (extraHttpRequestParams) { - requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); - } - - return this.http.request(`${this.configuration.basePath}/user/${encodeURIComponent(String(username))}`, requestOptions); - } - -} diff --git a/samples/client/petstore/typescript-angular-v2/default/configuration.ts b/samples/client/petstore/typescript-angular-v2/default/configuration.ts deleted file mode 100644 index a442747dfc1..00000000000 --- a/samples/client/petstore/typescript-angular-v2/default/configuration.ts +++ /dev/null @@ -1,84 +0,0 @@ -import { QueryEncoder } from '@angular/http'; - -export interface ConfigurationParameters { - apiKeys?: {[ key: string ]: string}; - username?: string; - password?: string; - accessToken?: string | (() => string); - basePath?: string; - withCredentials?: boolean; - encoder?: QueryEncoder; -} - -export class Configuration { - apiKeys?: {[ key: string ]: string}; - username?: string; - password?: string; - accessToken?: string | (() => string); - basePath?: string; - withCredentials?: boolean; - encoder?: QueryEncoder; - - constructor(configurationParameters: ConfigurationParameters = {}) { - this.apiKeys = configurationParameters.apiKeys; - this.username = configurationParameters.username; - this.password = configurationParameters.password; - this.accessToken = configurationParameters.accessToken; - this.basePath = configurationParameters.basePath; - this.withCredentials = configurationParameters.withCredentials; - this.encoder = configurationParameters.encoder; - } - - /** - * Select the correct content-type to use for a request. - * Uses {@link Configuration#isJsonMime} to determine the correct content-type. - * If no content type is found return the first found type if the contentTypes is not empty - * @param contentTypes - the array of content types that are available for selection - * @returns the selected content-type or undefined if no selection could be made. - */ - public selectHeaderContentType (contentTypes: string[]): string | undefined { - if (contentTypes.length === 0) { - return undefined; - } - - const type = contentTypes.find((x: string) => this.isJsonMime(x)); - if (type === undefined) { - return contentTypes[0]; - } - return type; - } - - /** - * Select the correct accept content-type to use for a request. - * Uses {@link Configuration#isJsonMime} to determine the correct accept content-type. - * If no content type is found return the first found type if the contentTypes is not empty - * @param accepts - the array of content types that are available for selection. - * @returns the selected content-type or undefined if no selection could be made. - */ - public selectHeaderAccept(accepts: string[]): string | undefined { - if (accepts.length === 0) { - return undefined; - } - - const type = accepts.find((x: string) => this.isJsonMime(x)); - if (type === undefined) { - return accepts[0]; - } - return type; - } - - /** - * Check if the given MIME is a JSON MIME. - * JSON MIME examples: - * application/json - * application/json; charset=UTF8 - * APPLICATION/JSON - * application/vnd.company+json - * @param mime - MIME (Multipurpose Internet Mail Extensions) - * @return True if the given MIME is JSON, false otherwise. - */ - public isJsonMime(mime: string): boolean { - const jsonMime: RegExp = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i'); - return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json'); - } -} diff --git a/samples/client/petstore/typescript-angular-v2/default/encoder.ts b/samples/client/petstore/typescript-angular-v2/default/encoder.ts deleted file mode 100644 index a0221503f9c..00000000000 --- a/samples/client/petstore/typescript-angular-v2/default/encoder.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { QueryEncoder } from '@angular/http'; - -/** - * Custom QueryEncoder - * Fix plus sign (+) not encoding, so sent as blank space - * See: https://github.com/angular/angular/issues/11058#issuecomment-247367318 - */ -export class CustomQueryEncoderHelper extends QueryEncoder { - encodeKey(k: string): string { - k = super.encodeKey(k); - return k.replace(/\+/gi, '%2B'); - } - encodeValue(v: string): string { - v = super.encodeValue(v); - return v.replace(/\+/gi, '%2B'); - } -} - diff --git a/samples/client/petstore/typescript-angular-v2/default/git_push.sh b/samples/client/petstore/typescript-angular-v2/default/git_push.sh deleted file mode 100644 index ced3be2b0c7..00000000000 --- a/samples/client/petstore/typescript-angular-v2/default/git_push.sh +++ /dev/null @@ -1,58 +0,0 @@ -#!/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 openapi-pestore-perl "minor update" "gitlab.com" - -git_user_id=$1 -git_repo_id=$2 -release_note=$3 -git_host=$4 - -if [ "$git_host" = "" ]; then - git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" -fi - -if [ "$git_user_id" = "" ]; then - git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" -fi - -if [ "$git_repo_id" = "" ]; then - git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" -fi - -if [ "$release_note" = "" ]; then - release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" -fi - -# Initialize the local directory as a Git repository -git init - -# Adds the files in the local repository and stages them for commit. -git add . - -# Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" - -# Sets the new remote -git_remote=`git remote` -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git - else - git remote add origin https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git - fi - -fi - -git pull origin master - -# Pushes (Forces) the changes in the local repository up to the remote repository -echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" -git push origin master 2>&1 | grep -v 'To https' - diff --git a/samples/client/petstore/typescript-angular-v2/default/index.ts b/samples/client/petstore/typescript-angular-v2/default/index.ts deleted file mode 100644 index c312b70fa3e..00000000000 --- a/samples/client/petstore/typescript-angular-v2/default/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -export * from './api/api'; -export * from './model/models'; -export * from './variables'; -export * from './configuration'; -export * from './api.module'; \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v2/default/model/apiResponse.ts b/samples/client/petstore/typescript-angular-v2/default/model/apiResponse.ts deleted file mode 100644 index 682ba478921..00000000000 --- a/samples/client/petstore/typescript-angular-v2/default/model/apiResponse.ts +++ /dev/null @@ -1,22 +0,0 @@ -/** - * 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. - * - * The version of the OpenAPI document: 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. - */ - - -/** - * Describes the result of uploading an image resource - */ -export interface ApiResponse { - code?: number; - type?: string; - message?: string; -} - diff --git a/samples/client/petstore/typescript-angular-v2/default/model/category.ts b/samples/client/petstore/typescript-angular-v2/default/model/category.ts deleted file mode 100644 index b988b6827a0..00000000000 --- a/samples/client/petstore/typescript-angular-v2/default/model/category.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * 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. - * - * The version of the OpenAPI document: 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. - */ - - -/** - * A category for a pet - */ -export interface Category { - id?: number; - name?: string; -} - diff --git a/samples/client/petstore/typescript-angular-v2/default/model/models.ts b/samples/client/petstore/typescript-angular-v2/default/model/models.ts deleted file mode 100644 index 8607c5dabd0..00000000000 --- a/samples/client/petstore/typescript-angular-v2/default/model/models.ts +++ /dev/null @@ -1,6 +0,0 @@ -export * from './apiResponse'; -export * from './category'; -export * from './order'; -export * from './pet'; -export * from './tag'; -export * from './user'; diff --git a/samples/client/petstore/typescript-angular-v2/default/model/order.ts b/samples/client/petstore/typescript-angular-v2/default/model/order.ts deleted file mode 100644 index a29bebe4906..00000000000 --- a/samples/client/petstore/typescript-angular-v2/default/model/order.ts +++ /dev/null @@ -1,37 +0,0 @@ -/** - * 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. - * - * The version of the OpenAPI document: 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. - */ - - -/** - * An order for a pets from the pet store - */ -export interface Order { - id?: number; - petId?: number; - quantity?: number; - shipDate?: string; - /** - * Order Status - */ - status?: Order.StatusEnum; - complete?: boolean; -} -export namespace Order { - export type StatusEnum = 'placed' | 'approved' | 'delivered'; - export const StatusEnum = { - Placed: 'placed' as StatusEnum, - Approved: 'approved' as StatusEnum, - Delivered: 'delivered' as StatusEnum - }; -} - - diff --git a/samples/client/petstore/typescript-angular-v2/default/model/pet.ts b/samples/client/petstore/typescript-angular-v2/default/model/pet.ts deleted file mode 100644 index e0404395f91..00000000000 --- a/samples/client/petstore/typescript-angular-v2/default/model/pet.ts +++ /dev/null @@ -1,39 +0,0 @@ -/** - * 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. - * - * The version of the OpenAPI document: 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 { Category } from './category'; -import { Tag } from './tag'; - - -/** - * A pet for sale in the pet store - */ -export interface Pet { - id?: number; - category?: Category; - name: string; - photoUrls: Array; - tags?: Array; - /** - * pet status in the store - */ - status?: Pet.StatusEnum; -} -export namespace Pet { - export type StatusEnum = 'available' | 'pending' | 'sold'; - export const StatusEnum = { - Available: 'available' as StatusEnum, - Pending: 'pending' as StatusEnum, - Sold: 'sold' as StatusEnum - }; -} - - diff --git a/samples/client/petstore/typescript-angular-v2/default/model/tag.ts b/samples/client/petstore/typescript-angular-v2/default/model/tag.ts deleted file mode 100644 index b6ff210e8df..00000000000 --- a/samples/client/petstore/typescript-angular-v2/default/model/tag.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * 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. - * - * The version of the OpenAPI document: 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. - */ - - -/** - * A tag for a pet - */ -export interface Tag { - id?: number; - name?: string; -} - diff --git a/samples/client/petstore/typescript-angular-v2/default/model/user.ts b/samples/client/petstore/typescript-angular-v2/default/model/user.ts deleted file mode 100644 index fce51005300..00000000000 --- a/samples/client/petstore/typescript-angular-v2/default/model/user.ts +++ /dev/null @@ -1,30 +0,0 @@ -/** - * 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. - * - * The version of the OpenAPI document: 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. - */ - - -/** - * A User who is purchasing from the pet store - */ -export interface User { - id?: number; - username?: string; - firstName?: string; - lastName?: string; - email?: string; - password?: string; - phone?: string; - /** - * User Status - */ - userStatus?: number; -} - diff --git a/samples/client/petstore/typescript-angular-v2/default/rxjs-operators.ts b/samples/client/petstore/typescript-angular-v2/default/rxjs-operators.ts deleted file mode 100644 index 5659cd0694f..00000000000 --- a/samples/client/petstore/typescript-angular-v2/default/rxjs-operators.ts +++ /dev/null @@ -1,11 +0,0 @@ -// RxJS imports according to https://angular.io/docs/ts/latest/guide/server-communication.html#!#rxjs - -// See node_module/rxjs/Rxjs.js -// Import just the rxjs statics and operators we need for THIS app. - -// Statics -import 'rxjs/add/observable/throw'; - -// Operators -import 'rxjs/add/operator/catch'; -import 'rxjs/add/operator/map'; diff --git a/samples/client/petstore/typescript-angular-v2/default/variables.ts b/samples/client/petstore/typescript-angular-v2/default/variables.ts deleted file mode 100644 index 29b7e5b1d71..00000000000 --- a/samples/client/petstore/typescript-angular-v2/default/variables.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { OpaqueToken } from '@angular/core'; - -export const BASE_PATH = new OpaqueToken('basePath'); -export const COLLECTION_FORMATS = { - 'csv': ',', - 'tsv': ' ', - 'ssv': ' ', - 'pipes': '|' -} diff --git a/samples/client/petstore/typescript-angular-v2/npm/.gitignore b/samples/client/petstore/typescript-angular-v2/npm/.gitignore deleted file mode 100644 index 149b5765472..00000000000 --- a/samples/client/petstore/typescript-angular-v2/npm/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -wwwroot/*.js -node_modules -typings -dist diff --git a/samples/client/petstore/typescript-angular-v2/npm/.openapi-generator-ignore b/samples/client/petstore/typescript-angular-v2/npm/.openapi-generator-ignore deleted file mode 100644 index 7484ee590a3..00000000000 --- a/samples/client/petstore/typescript-angular-v2/npm/.openapi-generator-ignore +++ /dev/null @@ -1,23 +0,0 @@ -# OpenAPI Generator Ignore -# Generated by openapi-generator https://github.com/openapitools/openapi-generator - -# Use this file to prevent files from being overwritten by the generator. -# The patterns follow closely to .gitignore or .dockerignore. - -# As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: -#ApiClient.cs - -# You can match any string of characters against a directory, file or extension with a single asterisk (*): -#foo/*/qux -# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux - -# You can recursively match patterns against a directory, file or extension with a double asterisk (**): -#foo/**/qux -# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux - -# You can also negate patterns with an exclamation (!). -# For example, you can ignore all files in a docs folder with the file extension .md: -#docs/*.md -# Then explicitly reverse the ignore rule for a single file: -#!docs/README.md diff --git a/samples/client/petstore/typescript-angular-v2/npm/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v2/npm/.openapi-generator/VERSION deleted file mode 100644 index d99e7162d01..00000000000 --- a/samples/client/petstore/typescript-angular-v2/npm/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -5.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v2/npm/README.md b/samples/client/petstore/typescript-angular-v2/npm/README.md deleted file mode 100644 index 45fe3db5a38..00000000000 --- a/samples/client/petstore/typescript-angular-v2/npm/README.md +++ /dev/null @@ -1,201 +0,0 @@ -## @openapitools/angular2-typescript-petstore@0.0.1 - -### Building - -To install the required dependencies and to build the typescript sources run: -``` -npm install -npm run build -``` - -### publishing - -First build the package then run ```npm publish``` - -### consuming - -Navigate to the folder of your consuming project and run one of next commands. - -_published:_ - -``` -npm install @openapitools/angular2-typescript-petstore@0.0.1 --save -``` - -_without publishing (not recommended):_ - -``` -npm install PATH_TO_GENERATED_PACKAGE/@openapitools/angular2-typescript-petstore-0.0.1.tgz --save -``` - -_It's important to take the tgz file, otherwise you'll get trouble with links on windows_ - -_using `npm link`:_ - -In PATH_TO_GENERATED_PACKAGE: -``` -npm link -``` - -In your project: -``` -npm link @openapitools/angular2-typescript-petstore -``` - -__Note for Windows users:__ The Angular CLI has troubles to use linked npm packages. -Please refer to this issue https://github.com/angular/angular-cli/issues/8284 for a solution / workaround. -Published packages are not effected by this issue. - - -#### General usage - -In your Angular project: - - -``` -// without configuring providers -import { ApiModule } from '@openapitools/angular2-typescript-petstore'; - -import { HttpModule } from '@angular/http'; - -@NgModule({ - imports: [ - ApiModule, - HttpModule - ], - declarations: [ AppComponent ], - providers: [], - bootstrap: [ AppComponent ] -}) -export class AppModule {} -``` - -``` -// configuring providers -import { ApiModule, Configuration, ConfigurationParameters } from '@openapitools/angular2-typescript-petstore'; - -export function apiConfigFactory (): Configuration => { - const params: ConfigurationParameters = { - // set configuration parameters here. - } - return new Configuration(params); -} - -@NgModule({ - imports: [ ApiModule.forRoot(apiConfigFactory) ], - declarations: [ AppComponent ], - providers: [], - bootstrap: [ AppComponent ] -}) -export class AppModule {} -``` - -``` -// configuring providers with an authentication service that manages your access tokens -import { ApiModule, Configuration } from '@openapitools/angular2-typescript-petstore'; - -@NgModule({ - imports: [ ApiModule ], - declarations: [ AppComponent ], - providers: [ - { - provide: Configuration, - useFactory: (authService: AuthService) => new Configuration( - { - basePath: environment.apiUrl, - accessToken: authService.getAccessToken.bind(authService) - } - ), - deps: [AuthService], - multi: false - } - ], - bootstrap: [ AppComponent ] -}) -export class AppModule {} -``` - -``` -import { DefaultApi } from '@openapitools/angular2-typescript-petstore'; - -export class AppComponent { - constructor(private apiGateway: DefaultApi) { } -} -``` - -Note: The ApiModule is restricted to being instantiated once app wide. -This is to ensure that all services are treated as singletons. - -#### Using multiple OpenAPI files / APIs / ApiModules -In order to use multiple `ApiModules` generated from different OpenAPI files, -you can create an alias name when importing the modules -in order to avoid naming conflicts: -``` -import { ApiModule } from 'my-api-path'; -import { ApiModule as OtherApiModule } from 'my-other-api-path'; - -import { HttpModule } from '@angular/http'; - -@NgModule({ - imports: [ - ApiModule, - OtherApiModule, - HttpModule - ] -}) -export class AppModule { - -} -``` - - -### Set service base path -If different than the generated base path, during app bootstrap, you can provide the base path to your service. - -``` -import { BASE_PATH } from '@openapitools/angular2-typescript-petstore'; - -bootstrap(AppComponent, [ - { provide: BASE_PATH, useValue: 'https://your-web-service.com' }, -]); -``` -or - -``` -import { BASE_PATH } from '@openapitools/angular2-typescript-petstore'; - -@NgModule({ - imports: [], - declarations: [ AppComponent ], - providers: [ provide: BASE_PATH, useValue: 'https://your-web-service.com' ], - bootstrap: [ AppComponent ] -}) -export class AppModule {} -``` - - -#### Using @angular/cli -First extend your `src/environments/*.ts` files by adding the corresponding base path: - -``` -export const environment = { - production: false, - API_BASE_PATH: 'http://127.0.0.1:8080' -}; -``` - -In the src/app/app.module.ts: -``` -import { BASE_PATH } from '@openapitools/angular2-typescript-petstore'; -import { environment } from '../environments/environment'; - -@NgModule({ - declarations: [ - AppComponent - ], - imports: [ ], - providers: [{ provide: BASE_PATH, useValue: environment.API_BASE_PATH }], - bootstrap: [ AppComponent ] -}) -export class AppModule { } -``` diff --git a/samples/client/petstore/typescript-angular-v2/npm/api.module.ts b/samples/client/petstore/typescript-angular-v2/npm/api.module.ts deleted file mode 100644 index d321b1180de..00000000000 --- a/samples/client/petstore/typescript-angular-v2/npm/api.module.ts +++ /dev/null @@ -1,37 +0,0 @@ -import { NgModule, ModuleWithProviders, SkipSelf, Optional } from '@angular/core'; -import { Configuration } from './configuration'; - -import { Http } from '@angular/http'; - -import { PetService } from './api/pet.service'; -import { StoreService } from './api/store.service'; -import { UserService } from './api/user.service'; - -@NgModule({ - imports: [], - declarations: [], - exports: [], - providers: [ - PetService, - StoreService, - UserService ] -}) -export class ApiModule { - public static forRoot(configurationFactory: () => Configuration): ModuleWithProviders { - return { - ngModule: ApiModule, - providers: [ { provide: Configuration, useFactory: configurationFactory } ] - }; - } - - constructor( @Optional() @SkipSelf() parentModule: ApiModule, - @Optional() http: Http) { - if (parentModule) { - throw new Error('ApiModule is already loaded. Import in your base AppModule only.'); - } - if (!http) { - throw new Error('You need to import the HttpModule in your AppModule! \n' + - 'See also https://github.com/angular/angular/issues/20575'); - } - } -} diff --git a/samples/client/petstore/typescript-angular-v2/npm/api/api.ts b/samples/client/petstore/typescript-angular-v2/npm/api/api.ts deleted file mode 100644 index 8e44b64083d..00000000000 --- a/samples/client/petstore/typescript-angular-v2/npm/api/api.ts +++ /dev/null @@ -1,7 +0,0 @@ -export * from './pet.service'; -import { PetService } from './pet.service'; -export * from './store.service'; -import { StoreService } from './store.service'; -export * from './user.service'; -import { UserService } from './user.service'; -export const APIS = [PetService, StoreService, UserService]; diff --git a/samples/client/petstore/typescript-angular-v2/npm/api/pet.service.ts b/samples/client/petstore/typescript-angular-v2/npm/api/pet.service.ts deleted file mode 100644 index 128c4d58bf7..00000000000 --- a/samples/client/petstore/typescript-angular-v2/npm/api/pet.service.ts +++ /dev/null @@ -1,714 +0,0 @@ -/** - * 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. - * - * The version of the OpenAPI document: 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. - */ -/* tslint:disable:no-unused-variable member-ordering */ - -import { Inject, Injectable, Optional } from '@angular/core'; -import { Http, Headers, URLSearchParams, - RequestMethod, RequestOptions, RequestOptionsArgs, - Response, ResponseContentType, QueryEncoder } from '@angular/http'; -import { CustomQueryEncoderHelper } from '../encoder'; -import { Observable } from 'rxjs/Observable'; -import '../rxjs-operators'; - -import { ApiResponse } from '../model/models'; -import { Pet } from '../model/models'; - -import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; -import { Configuration } from '../configuration'; - - - -@Injectable() -export class PetService { - - protected basePath = 'http://petstore.swagger.io/v2'; - public defaultHeaders = new Headers(); - public configuration = new Configuration(); - public encoder: QueryEncoder; - - constructor(protected http: Http, @Optional()@Inject(BASE_PATH) basePath: string, @Optional() configuration: Configuration) { - if (configuration) { - this.configuration = configuration; - } - if (typeof this.configuration.basePath !== 'string') { - if (typeof basePath !== 'string') { - basePath = this.basePath; - } - this.configuration.basePath = basePath; - } - this.encoder = this.configuration.encoder || new CustomQueryEncoderHelper(); - } - - /** - * @param consumes string[] mime-types - * @return true: consumes contains 'multipart/form-data', false: otherwise - */ - private canConsumeForm(consumes: string[]): boolean { - const form = 'multipart/form-data'; - for (const consume of consumes) { - if (form === consume) { - return true; - } - } - return false; - } - - /** - * - * @summary Add a new pet to the store - - * @param body Pet object that needs to be added to the store - */ - public addPet(body: Pet, extraHttpRequestParams?: RequestOptionsArgs): Observable<{}> { - return this.addPetWithHttpInfo(body, extraHttpRequestParams) - .map((response: Response) => { - if (response.status === 204) { - return undefined; - } else { - return response.json() || {}; - } - }); - } - - /** - * - * @summary Deletes a pet - - * @param petId Pet id to delete - * @param apiKey - */ - public deletePet(petId: number, apiKey?: string, extraHttpRequestParams?: RequestOptionsArgs): Observable<{}> { - return this.deletePetWithHttpInfo(petId, apiKey, extraHttpRequestParams) - .map((response: Response) => { - if (response.status === 204) { - return undefined; - } else { - return response.json() || {}; - } - }); - } - - /** - * Multiple status values can be provided with comma separated strings - * @summary Finds Pets by status - - * @param status Status values that need to be considered for filter - */ - public findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, extraHttpRequestParams?: RequestOptionsArgs): Observable> { - return this.findPetsByStatusWithHttpInfo(status, extraHttpRequestParams) - .map((response: Response) => { - if (response.status === 204) { - return undefined; - } else { - return response.json() || {}; - } - }); - } - - /** - * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. - * @summary Finds Pets by tags - - * @param tags Tags to filter by - */ - public findPetsByTags(tags: Array, extraHttpRequestParams?: RequestOptionsArgs): Observable> { - return this.findPetsByTagsWithHttpInfo(tags, extraHttpRequestParams) - .map((response: Response) => { - if (response.status === 204) { - return undefined; - } else { - return response.json() || {}; - } - }); - } - - /** - * Returns a single pet - * @summary Find pet by ID - - * @param petId ID of pet to return - */ - public getPetById(petId: number, extraHttpRequestParams?: RequestOptionsArgs): Observable { - return this.getPetByIdWithHttpInfo(petId, extraHttpRequestParams) - .map((response: Response) => { - if (response.status === 204) { - return undefined; - } else { - return response.json() || {}; - } - }); - } - - /** - * - * @summary Update an existing pet - - * @param body Pet object that needs to be added to the store - */ - public updatePet(body: Pet, extraHttpRequestParams?: RequestOptionsArgs): Observable<{}> { - return this.updatePetWithHttpInfo(body, extraHttpRequestParams) - .map((response: Response) => { - if (response.status === 204) { - return undefined; - } else { - return response.json() || {}; - } - }); - } - - /** - * - * @summary Updates a pet in the store with form data - - * @param petId ID of pet that needs to be updated - * @param name Updated name of the pet - * @param status Updated status of the pet - */ - public updatePetWithForm(petId: number, name?: string, status?: string, extraHttpRequestParams?: RequestOptionsArgs): Observable<{}> { - return this.updatePetWithFormWithHttpInfo(petId, name, status, extraHttpRequestParams) - .map((response: Response) => { - if (response.status === 204) { - return undefined; - } else { - return response.json() || {}; - } - }); - } - - /** - * - * @summary uploads an image - - * @param petId ID of pet to update - * @param additionalMetadata Additional data to pass to server - * @param file file to upload - */ - public uploadFile(petId: number, additionalMetadata?: string, file?: Blob, extraHttpRequestParams?: RequestOptionsArgs): Observable { - return this.uploadFileWithHttpInfo(petId, additionalMetadata, file, extraHttpRequestParams) - .map((response: Response) => { - if (response.status === 204) { - return undefined; - } else { - return response.json() || {}; - } - }); - } - - - private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams { - if (typeof value === "object" && value instanceof Date === false) { - this.addToHttpParamsRecursive(httpParams, value); - } else { - this.addToHttpParamsRecursive(httpParams, value, key); - } - return httpParams; - } - - private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams { - if (value == null) { - return httpParams; - } - - if (typeof value === "object") { - if (Array.isArray(value)) { - (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); - } else if (value instanceof Date) { - if (key != null) { - httpParams.append(key, - (value as Date).toISOString().substr(0, 10)); - } else { - throw Error("key may not be null if value is Date"); - } - } else { - Object.keys(value).forEach( k => this.addToHttpParamsRecursive( - httpParams, value[k], key != null ? `${key}.${k}` : k)); - } - } else if (key != null) { - httpParams.append(key, value); - } else { - throw Error("key may not be null if value is not object or array"); - } - return httpParams; - } - - /** - * Add a new pet to the store - * @param body Pet object that needs to be added to the store - */ - public addPetWithHttpInfo(body: Pet, extraHttpRequestParams?: RequestOptionsArgs, options?: {httpHeaderAccept?: undefined}): Observable { - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling addPet.'); - } - - let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845 - - // authentication (petstore_auth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers.set('Authorization', 'Bearer ' + accessToken); - } - - let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; - if (httpHeaderAcceptSelected === undefined) { - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - ]; - httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); - } - if (httpHeaderAcceptSelected !== undefined) { - headers.set('Accept', httpHeaderAcceptSelected); - } - - - // to determine the Content-Type header - const consumes: string[] = [ - 'application/json', - 'application/xml' - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers.set('Content-Type', httpContentTypeSelected); - } - - let requestOptions: RequestOptionsArgs = new RequestOptions({ - method: RequestMethod.Post, - headers: headers, - body: body == null ? '' : JSON.stringify(body), // https://github.com/angular/angular/issues/10612 - responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, - withCredentials:this.configuration.withCredentials - }); - // issues#4037 - if (extraHttpRequestParams) { - requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); - } - - return this.http.request(`${this.configuration.basePath}/pet`, requestOptions); - } - - /** - * Deletes a pet - * @param petId Pet id to delete - * @param apiKey - */ - public deletePetWithHttpInfo(petId: number, apiKey?: string, extraHttpRequestParams?: RequestOptionsArgs, options?: {httpHeaderAccept?: undefined}): Observable { - if (petId === null || petId === undefined) { - throw new Error('Required parameter petId was null or undefined when calling deletePet.'); - } - - let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845 - if (apiKey !== undefined && apiKey !== null) { - headers.set('api_key', String(apiKey)); - } - - // authentication (petstore_auth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers.set('Authorization', 'Bearer ' + accessToken); - } - - let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; - if (httpHeaderAcceptSelected === undefined) { - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - ]; - httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); - } - if (httpHeaderAcceptSelected !== undefined) { - headers.set('Accept', httpHeaderAcceptSelected); - } - - - let requestOptions: RequestOptionsArgs = new RequestOptions({ - method: RequestMethod.Delete, - headers: headers, - responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, - withCredentials:this.configuration.withCredentials - }); - // issues#4037 - if (extraHttpRequestParams) { - requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); - } - - return this.http.request(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}`, requestOptions); - } - - /** - * 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 - */ - public findPetsByStatusWithHttpInfo(status: Array<'available' | 'pending' | 'sold'>, extraHttpRequestParams?: RequestOptionsArgs, options?: {httpHeaderAccept?: 'application/xml' | 'application/json'}): Observable { - if (status === null || status === undefined) { - throw new Error('Required parameter status was null or undefined when calling findPetsByStatus.'); - } - - let queryParameters = new URLSearchParams('', this.encoder); - if (status) { - this.addToHttpParams(queryParameters, - status.join(COLLECTION_FORMATS['csv']), 'status'); - } - - let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845 - - // authentication (petstore_auth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers.set('Authorization', 'Bearer ' + accessToken); - } - - let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; - if (httpHeaderAcceptSelected === undefined) { - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/xml', - 'application/json' - ]; - httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); - } - if (httpHeaderAcceptSelected !== undefined) { - headers.set('Accept', httpHeaderAcceptSelected); - } - - - let requestOptions: RequestOptionsArgs = new RequestOptions({ - method: RequestMethod.Get, - headers: headers, - responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, - search: queryParameters, - withCredentials:this.configuration.withCredentials - }); - // issues#4037 - if (extraHttpRequestParams) { - requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); - } - - return this.http.request(`${this.configuration.basePath}/pet/findByStatus`, requestOptions); - } - - /** - * 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 - */ - public findPetsByTagsWithHttpInfo(tags: Array, extraHttpRequestParams?: RequestOptionsArgs, options?: {httpHeaderAccept?: 'application/xml' | 'application/json'}): Observable { - if (tags === null || tags === undefined) { - throw new Error('Required parameter tags was null or undefined when calling findPetsByTags.'); - } - - let queryParameters = new URLSearchParams('', this.encoder); - if (tags) { - this.addToHttpParams(queryParameters, - tags.join(COLLECTION_FORMATS['csv']), 'tags'); - } - - let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845 - - // authentication (petstore_auth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers.set('Authorization', 'Bearer ' + accessToken); - } - - let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; - if (httpHeaderAcceptSelected === undefined) { - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/xml', - 'application/json' - ]; - httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); - } - if (httpHeaderAcceptSelected !== undefined) { - headers.set('Accept', httpHeaderAcceptSelected); - } - - - let requestOptions: RequestOptionsArgs = new RequestOptions({ - method: RequestMethod.Get, - headers: headers, - responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, - search: queryParameters, - withCredentials:this.configuration.withCredentials - }); - // issues#4037 - if (extraHttpRequestParams) { - requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); - } - - return this.http.request(`${this.configuration.basePath}/pet/findByTags`, requestOptions); - } - - /** - * Find pet by ID - * Returns a single pet - * @param petId ID of pet to return - */ - public getPetByIdWithHttpInfo(petId: number, extraHttpRequestParams?: RequestOptionsArgs, options?: {httpHeaderAccept?: 'application/xml' | 'application/json'}): Observable { - if (petId === null || petId === undefined) { - throw new Error('Required parameter petId was null or undefined when calling getPetById.'); - } - - let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845 - - // authentication (api_key) required - if (this.configuration.apiKeys) { - const key: string | undefined = this.configuration.apiKeys["api_key"] || this.configuration.apiKeys["api_key"]; - if (key) { - headers.set('api_key', key); - } - } - - let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; - if (httpHeaderAcceptSelected === undefined) { - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/xml', - 'application/json' - ]; - httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); - } - if (httpHeaderAcceptSelected !== undefined) { - headers.set('Accept', httpHeaderAcceptSelected); - } - - - let requestOptions: RequestOptionsArgs = new RequestOptions({ - method: RequestMethod.Get, - headers: headers, - responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, - withCredentials:this.configuration.withCredentials - }); - // issues#4037 - if (extraHttpRequestParams) { - requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); - } - - return this.http.request(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}`, requestOptions); - } - - /** - * Update an existing pet - * @param body Pet object that needs to be added to the store - */ - public updatePetWithHttpInfo(body: Pet, extraHttpRequestParams?: RequestOptionsArgs, options?: {httpHeaderAccept?: undefined}): Observable { - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling updatePet.'); - } - - let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845 - - // authentication (petstore_auth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers.set('Authorization', 'Bearer ' + accessToken); - } - - let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; - if (httpHeaderAcceptSelected === undefined) { - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - ]; - httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); - } - if (httpHeaderAcceptSelected !== undefined) { - headers.set('Accept', httpHeaderAcceptSelected); - } - - - // to determine the Content-Type header - const consumes: string[] = [ - 'application/json', - 'application/xml' - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers.set('Content-Type', httpContentTypeSelected); - } - - let requestOptions: RequestOptionsArgs = new RequestOptions({ - method: RequestMethod.Put, - headers: headers, - body: body == null ? '' : JSON.stringify(body), // https://github.com/angular/angular/issues/10612 - responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, - withCredentials:this.configuration.withCredentials - }); - // issues#4037 - if (extraHttpRequestParams) { - requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); - } - - return this.http.request(`${this.configuration.basePath}/pet`, requestOptions); - } - - /** - * Updates a pet in the store with form data - * @param petId ID of pet that needs to be updated - * @param name Updated name of the pet - * @param status Updated status of the pet - */ - public updatePetWithFormWithHttpInfo(petId: number, name?: string, status?: string, extraHttpRequestParams?: RequestOptionsArgs, options?: {httpHeaderAccept?: undefined}): Observable { - if (petId === null || petId === undefined) { - throw new Error('Required parameter petId was null or undefined when calling updatePetWithForm.'); - } - - let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845 - - // authentication (petstore_auth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers.set('Authorization', 'Bearer ' + accessToken); - } - - let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; - if (httpHeaderAcceptSelected === undefined) { - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - ]; - httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); - } - if (httpHeaderAcceptSelected !== undefined) { - headers.set('Accept', httpHeaderAcceptSelected); - } - - // to determine the Content-Type header - const consumes: string[] = [ - 'application/x-www-form-urlencoded' - ]; - - const canConsumeForm = this.canConsumeForm(consumes); - - let formParams: { append(param: string, value: any): any; }; - let useForm = false; - let convertFormParamsToString = false; - if (useForm) { - formParams = new FormData(); - } else { - // TODO: this fails if a parameter is a file, the api can't consume "multipart/form-data" and a blob is passed. - convertFormParamsToString = true; - formParams = new URLSearchParams('', this.encoder); - // set the content-type explicitly to avoid having it set to 'text/plain' - headers.set('Content-Type', 'application/x-www-form-urlencoded;charset=UTF-8'); - } - - if (name !== undefined) { - formParams.append('name', name); - } - if (status !== undefined) { - formParams.append('status', status); - } - - let requestOptions: RequestOptionsArgs = new RequestOptions({ - method: RequestMethod.Post, - headers: headers, - body: convertFormParamsToString ? formParams.toString() : formParams, - responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, - withCredentials:this.configuration.withCredentials - }); - // issues#4037 - if (extraHttpRequestParams) { - requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); - } - - return this.http.request(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}`, requestOptions); - } - - /** - * uploads an image - * @param petId ID of pet to update - * @param additionalMetadata Additional data to pass to server - * @param file file to upload - */ - public uploadFileWithHttpInfo(petId: number, additionalMetadata?: string, file?: Blob, extraHttpRequestParams?: RequestOptionsArgs, options?: {httpHeaderAccept?: 'application/json'}): Observable { - if (petId === null || petId === undefined) { - throw new Error('Required parameter petId was null or undefined when calling uploadFile.'); - } - - let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845 - - // authentication (petstore_auth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers.set('Authorization', 'Bearer ' + accessToken); - } - - let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; - if (httpHeaderAcceptSelected === undefined) { - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); - } - if (httpHeaderAcceptSelected !== undefined) { - headers.set('Accept', httpHeaderAcceptSelected); - } - - // to determine the Content-Type header - const consumes: string[] = [ - 'multipart/form-data' - ]; - - const canConsumeForm = this.canConsumeForm(consumes); - - let formParams: { append(param: string, value: any): any; }; - let useForm = false; - let convertFormParamsToString = false; - // use FormData to transmit files using content-type "multipart/form-data" - // see https://stackoverflow.com/questions/4007969/application-x-www-form-urlencoded-or-multipart-form-data - useForm = canConsumeForm; - if (useForm) { - formParams = new FormData(); - } else { - // TODO: this fails if a parameter is a file, the api can't consume "multipart/form-data" and a blob is passed. - convertFormParamsToString = true; - formParams = new URLSearchParams('', this.encoder); - // set the content-type explicitly to avoid having it set to 'text/plain' - headers.set('Content-Type', 'application/x-www-form-urlencoded;charset=UTF-8'); - } - - if (additionalMetadata !== undefined) { - formParams.append('additionalMetadata', additionalMetadata); - } - if (file !== undefined) { - formParams.append('file', file); - } - - let requestOptions: RequestOptionsArgs = new RequestOptions({ - method: RequestMethod.Post, - headers: headers, - body: convertFormParamsToString ? formParams.toString() : formParams, - responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, - withCredentials:this.configuration.withCredentials - }); - // issues#4037 - if (extraHttpRequestParams) { - requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); - } - - return this.http.request(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}/uploadImage`, requestOptions); - } - -} diff --git a/samples/client/petstore/typescript-angular-v2/npm/api/store.service.ts b/samples/client/petstore/typescript-angular-v2/npm/api/store.service.ts deleted file mode 100644 index 839adc05718..00000000000 --- a/samples/client/petstore/typescript-angular-v2/npm/api/store.service.ts +++ /dev/null @@ -1,324 +0,0 @@ -/** - * 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. - * - * The version of the OpenAPI document: 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. - */ -/* tslint:disable:no-unused-variable member-ordering */ - -import { Inject, Injectable, Optional } from '@angular/core'; -import { Http, Headers, URLSearchParams, - RequestMethod, RequestOptions, RequestOptionsArgs, - Response, ResponseContentType, QueryEncoder } from '@angular/http'; -import { CustomQueryEncoderHelper } from '../encoder'; -import { Observable } from 'rxjs/Observable'; -import '../rxjs-operators'; - -import { Order } from '../model/models'; - -import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; -import { Configuration } from '../configuration'; - - - -@Injectable() -export class StoreService { - - protected basePath = 'http://petstore.swagger.io/v2'; - public defaultHeaders = new Headers(); - public configuration = new Configuration(); - public encoder: QueryEncoder; - - constructor(protected http: Http, @Optional()@Inject(BASE_PATH) basePath: string, @Optional() configuration: Configuration) { - if (configuration) { - this.configuration = configuration; - } - if (typeof this.configuration.basePath !== 'string') { - if (typeof basePath !== 'string') { - basePath = this.basePath; - } - this.configuration.basePath = basePath; - } - this.encoder = this.configuration.encoder || new CustomQueryEncoderHelper(); - } - - - /** - * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors - * @summary Delete purchase order by ID - - * @param orderId ID of the order that needs to be deleted - */ - public deleteOrder(orderId: string, extraHttpRequestParams?: RequestOptionsArgs): Observable<{}> { - return this.deleteOrderWithHttpInfo(orderId, extraHttpRequestParams) - .map((response: Response) => { - if (response.status === 204) { - return undefined; - } else { - return response.json() || {}; - } - }); - } - - /** - * Returns a map of status codes to quantities - * @summary Returns pet inventories by status - - */ - public getInventory(extraHttpRequestParams?: RequestOptionsArgs): Observable<{ [key: string]: number; }> { - return this.getInventoryWithHttpInfo(extraHttpRequestParams) - .map((response: Response) => { - if (response.status === 204) { - return undefined; - } else { - return response.json() || {}; - } - }); - } - - /** - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions - * @summary Find purchase order by ID - - * @param orderId ID of pet that needs to be fetched - */ - public getOrderById(orderId: number, extraHttpRequestParams?: RequestOptionsArgs): Observable { - return this.getOrderByIdWithHttpInfo(orderId, extraHttpRequestParams) - .map((response: Response) => { - if (response.status === 204) { - return undefined; - } else { - return response.json() || {}; - } - }); - } - - /** - * - * @summary Place an order for a pet - - * @param body order placed for purchasing the pet - */ - public placeOrder(body: Order, extraHttpRequestParams?: RequestOptionsArgs): Observable { - return this.placeOrderWithHttpInfo(body, extraHttpRequestParams) - .map((response: Response) => { - if (response.status === 204) { - return undefined; - } else { - return response.json() || {}; - } - }); - } - - - private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams { - if (typeof value === "object" && value instanceof Date === false) { - this.addToHttpParamsRecursive(httpParams, value); - } else { - this.addToHttpParamsRecursive(httpParams, value, key); - } - return httpParams; - } - - private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams { - if (value == null) { - return httpParams; - } - - if (typeof value === "object") { - if (Array.isArray(value)) { - (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); - } else if (value instanceof Date) { - if (key != null) { - httpParams.append(key, - (value as Date).toISOString().substr(0, 10)); - } else { - throw Error("key may not be null if value is Date"); - } - } else { - Object.keys(value).forEach( k => this.addToHttpParamsRecursive( - httpParams, value[k], key != null ? `${key}.${k}` : k)); - } - } else if (key != null) { - httpParams.append(key, value); - } else { - throw Error("key may not be null if value is not object or array"); - } - return httpParams; - } - - /** - * Delete purchase order by ID - * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors - * @param orderId ID of the order that needs to be deleted - */ - public deleteOrderWithHttpInfo(orderId: string, extraHttpRequestParams?: RequestOptionsArgs, options?: {httpHeaderAccept?: undefined}): Observable { - if (orderId === null || orderId === undefined) { - throw new Error('Required parameter orderId was null or undefined when calling deleteOrder.'); - } - - let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845 - - let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; - if (httpHeaderAcceptSelected === undefined) { - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - ]; - httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); - } - if (httpHeaderAcceptSelected !== undefined) { - headers.set('Accept', httpHeaderAcceptSelected); - } - - - let requestOptions: RequestOptionsArgs = new RequestOptions({ - method: RequestMethod.Delete, - headers: headers, - responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, - withCredentials:this.configuration.withCredentials - }); - // issues#4037 - if (extraHttpRequestParams) { - requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); - } - - return this.http.request(`${this.configuration.basePath}/store/order/${encodeURIComponent(String(orderId))}`, requestOptions); - } - - /** - * Returns pet inventories by status - * Returns a map of status codes to quantities - */ - public getInventoryWithHttpInfo(extraHttpRequestParams?: RequestOptionsArgs, options?: {httpHeaderAccept?: 'application/json'}): Observable { - - let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845 - - // authentication (api_key) required - if (this.configuration.apiKeys) { - const key: string | undefined = this.configuration.apiKeys["api_key"] || this.configuration.apiKeys["api_key"]; - if (key) { - headers.set('api_key', key); - } - } - - let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; - if (httpHeaderAcceptSelected === undefined) { - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); - } - if (httpHeaderAcceptSelected !== undefined) { - headers.set('Accept', httpHeaderAcceptSelected); - } - - - let requestOptions: RequestOptionsArgs = new RequestOptions({ - method: RequestMethod.Get, - headers: headers, - responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, - withCredentials:this.configuration.withCredentials - }); - // issues#4037 - if (extraHttpRequestParams) { - requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); - } - - return this.http.request(`${this.configuration.basePath}/store/inventory`, requestOptions); - } - - /** - * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions - * @param orderId ID of pet that needs to be fetched - */ - public getOrderByIdWithHttpInfo(orderId: number, extraHttpRequestParams?: RequestOptionsArgs, options?: {httpHeaderAccept?: 'application/xml' | 'application/json'}): Observable { - if (orderId === null || orderId === undefined) { - throw new Error('Required parameter orderId was null or undefined when calling getOrderById.'); - } - - let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845 - - let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; - if (httpHeaderAcceptSelected === undefined) { - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/xml', - 'application/json' - ]; - httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); - } - if (httpHeaderAcceptSelected !== undefined) { - headers.set('Accept', httpHeaderAcceptSelected); - } - - - let requestOptions: RequestOptionsArgs = new RequestOptions({ - method: RequestMethod.Get, - headers: headers, - responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, - withCredentials:this.configuration.withCredentials - }); - // issues#4037 - if (extraHttpRequestParams) { - requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); - } - - return this.http.request(`${this.configuration.basePath}/store/order/${encodeURIComponent(String(orderId))}`, requestOptions); - } - - /** - * Place an order for a pet - * @param body order placed for purchasing the pet - */ - public placeOrderWithHttpInfo(body: Order, extraHttpRequestParams?: RequestOptionsArgs, options?: {httpHeaderAccept?: 'application/xml' | 'application/json'}): Observable { - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling placeOrder.'); - } - - let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845 - - let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; - if (httpHeaderAcceptSelected === undefined) { - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/xml', - 'application/json' - ]; - httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); - } - if (httpHeaderAcceptSelected !== undefined) { - headers.set('Accept', httpHeaderAcceptSelected); - } - - - // to determine the Content-Type header - const consumes: string[] = [ - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers.set('Content-Type', httpContentTypeSelected); - } - - let requestOptions: RequestOptionsArgs = new RequestOptions({ - method: RequestMethod.Post, - headers: headers, - body: body == null ? '' : JSON.stringify(body), // https://github.com/angular/angular/issues/10612 - responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, - withCredentials:this.configuration.withCredentials - }); - // issues#4037 - if (extraHttpRequestParams) { - requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); - } - - return this.http.request(`${this.configuration.basePath}/store/order`, requestOptions); - } - -} diff --git a/samples/client/petstore/typescript-angular-v2/npm/api/user.service.ts b/samples/client/petstore/typescript-angular-v2/npm/api/user.service.ts deleted file mode 100644 index 710aeb4230f..00000000000 --- a/samples/client/petstore/typescript-angular-v2/npm/api/user.service.ts +++ /dev/null @@ -1,579 +0,0 @@ -/** - * 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. - * - * The version of the OpenAPI document: 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. - */ -/* tslint:disable:no-unused-variable member-ordering */ - -import { Inject, Injectable, Optional } from '@angular/core'; -import { Http, Headers, URLSearchParams, - RequestMethod, RequestOptions, RequestOptionsArgs, - Response, ResponseContentType, QueryEncoder } from '@angular/http'; -import { CustomQueryEncoderHelper } from '../encoder'; -import { Observable } from 'rxjs/Observable'; -import '../rxjs-operators'; - -import { User } from '../model/models'; - -import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; -import { Configuration } from '../configuration'; - - - -@Injectable() -export class UserService { - - protected basePath = 'http://petstore.swagger.io/v2'; - public defaultHeaders = new Headers(); - public configuration = new Configuration(); - public encoder: QueryEncoder; - - constructor(protected http: Http, @Optional()@Inject(BASE_PATH) basePath: string, @Optional() configuration: Configuration) { - if (configuration) { - this.configuration = configuration; - } - if (typeof this.configuration.basePath !== 'string') { - if (typeof basePath !== 'string') { - basePath = this.basePath; - } - this.configuration.basePath = basePath; - } - this.encoder = this.configuration.encoder || new CustomQueryEncoderHelper(); - } - - - /** - * This can only be done by the logged in user. - * @summary Create user - - * @param body Created user object - */ - public createUser(body: User, extraHttpRequestParams?: RequestOptionsArgs): Observable<{}> { - return this.createUserWithHttpInfo(body, extraHttpRequestParams) - .map((response: Response) => { - if (response.status === 204) { - return undefined; - } else { - return response.json() || {}; - } - }); - } - - /** - * - * @summary Creates list of users with given input array - - * @param body List of user object - */ - public createUsersWithArrayInput(body: Array, extraHttpRequestParams?: RequestOptionsArgs): Observable<{}> { - return this.createUsersWithArrayInputWithHttpInfo(body, extraHttpRequestParams) - .map((response: Response) => { - if (response.status === 204) { - return undefined; - } else { - return response.json() || {}; - } - }); - } - - /** - * - * @summary Creates list of users with given input array - - * @param body List of user object - */ - public createUsersWithListInput(body: Array, extraHttpRequestParams?: RequestOptionsArgs): Observable<{}> { - return this.createUsersWithListInputWithHttpInfo(body, extraHttpRequestParams) - .map((response: Response) => { - if (response.status === 204) { - return undefined; - } else { - return response.json() || {}; - } - }); - } - - /** - * This can only be done by the logged in user. - * @summary Delete user - - * @param username The name that needs to be deleted - */ - public deleteUser(username: string, extraHttpRequestParams?: RequestOptionsArgs): Observable<{}> { - return this.deleteUserWithHttpInfo(username, extraHttpRequestParams) - .map((response: Response) => { - if (response.status === 204) { - return undefined; - } else { - return response.json() || {}; - } - }); - } - - /** - * - * @summary Get user by user name - - * @param username The name that needs to be fetched. Use user1 for testing. - */ - public getUserByName(username: string, extraHttpRequestParams?: RequestOptionsArgs): Observable { - return this.getUserByNameWithHttpInfo(username, extraHttpRequestParams) - .map((response: Response) => { - if (response.status === 204) { - return undefined; - } else { - return response.json() || {}; - } - }); - } - - /** - * - * @summary Logs user into the system - - * @param username The user name for login - * @param password The password for login in clear text - */ - public loginUser(username: string, password: string, extraHttpRequestParams?: RequestOptionsArgs): Observable { - return this.loginUserWithHttpInfo(username, password, extraHttpRequestParams) - .map((response: Response) => { - if (response.status === 204) { - return undefined; - } else { - return response.json() || {}; - } - }); - } - - /** - * - * @summary Logs out current logged in user session - - */ - public logoutUser(extraHttpRequestParams?: RequestOptionsArgs): Observable<{}> { - return this.logoutUserWithHttpInfo(extraHttpRequestParams) - .map((response: Response) => { - if (response.status === 204) { - return undefined; - } else { - return response.json() || {}; - } - }); - } - - /** - * This can only be done by the logged in user. - * @summary Updated user - - * @param username name that need to be deleted - * @param body Updated user object - */ - public updateUser(username: string, body: User, extraHttpRequestParams?: RequestOptionsArgs): Observable<{}> { - return this.updateUserWithHttpInfo(username, body, extraHttpRequestParams) - .map((response: Response) => { - if (response.status === 204) { - return undefined; - } else { - return response.json() || {}; - } - }); - } - - - private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams { - if (typeof value === "object" && value instanceof Date === false) { - this.addToHttpParamsRecursive(httpParams, value); - } else { - this.addToHttpParamsRecursive(httpParams, value, key); - } - return httpParams; - } - - private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams { - if (value == null) { - return httpParams; - } - - if (typeof value === "object") { - if (Array.isArray(value)) { - (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); - } else if (value instanceof Date) { - if (key != null) { - httpParams.append(key, - (value as Date).toISOString().substr(0, 10)); - } else { - throw Error("key may not be null if value is Date"); - } - } else { - Object.keys(value).forEach( k => this.addToHttpParamsRecursive( - httpParams, value[k], key != null ? `${key}.${k}` : k)); - } - } else if (key != null) { - httpParams.append(key, value); - } else { - throw Error("key may not be null if value is not object or array"); - } - return httpParams; - } - - /** - * Create user - * This can only be done by the logged in user. - * @param body Created user object - */ - public createUserWithHttpInfo(body: User, extraHttpRequestParams?: RequestOptionsArgs, options?: {httpHeaderAccept?: undefined}): Observable { - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling createUser.'); - } - - let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845 - - let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; - if (httpHeaderAcceptSelected === undefined) { - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - ]; - httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); - } - if (httpHeaderAcceptSelected !== undefined) { - headers.set('Accept', httpHeaderAcceptSelected); - } - - - // to determine the Content-Type header - const consumes: string[] = [ - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers.set('Content-Type', httpContentTypeSelected); - } - - let requestOptions: RequestOptionsArgs = new RequestOptions({ - method: RequestMethod.Post, - headers: headers, - body: body == null ? '' : JSON.stringify(body), // https://github.com/angular/angular/issues/10612 - responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, - withCredentials:this.configuration.withCredentials - }); - // issues#4037 - if (extraHttpRequestParams) { - requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); - } - - return this.http.request(`${this.configuration.basePath}/user`, requestOptions); - } - - /** - * Creates list of users with given input array - * @param body List of user object - */ - public createUsersWithArrayInputWithHttpInfo(body: Array, extraHttpRequestParams?: RequestOptionsArgs, options?: {httpHeaderAccept?: undefined}): Observable { - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling createUsersWithArrayInput.'); - } - - let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845 - - let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; - if (httpHeaderAcceptSelected === undefined) { - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - ]; - httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); - } - if (httpHeaderAcceptSelected !== undefined) { - headers.set('Accept', httpHeaderAcceptSelected); - } - - - // to determine the Content-Type header - const consumes: string[] = [ - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers.set('Content-Type', httpContentTypeSelected); - } - - let requestOptions: RequestOptionsArgs = new RequestOptions({ - method: RequestMethod.Post, - headers: headers, - body: body == null ? '' : JSON.stringify(body), // https://github.com/angular/angular/issues/10612 - responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, - withCredentials:this.configuration.withCredentials - }); - // issues#4037 - if (extraHttpRequestParams) { - requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); - } - - return this.http.request(`${this.configuration.basePath}/user/createWithArray`, requestOptions); - } - - /** - * Creates list of users with given input array - * @param body List of user object - */ - public createUsersWithListInputWithHttpInfo(body: Array, extraHttpRequestParams?: RequestOptionsArgs, options?: {httpHeaderAccept?: undefined}): Observable { - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling createUsersWithListInput.'); - } - - let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845 - - let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; - if (httpHeaderAcceptSelected === undefined) { - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - ]; - httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); - } - if (httpHeaderAcceptSelected !== undefined) { - headers.set('Accept', httpHeaderAcceptSelected); - } - - - // to determine the Content-Type header - const consumes: string[] = [ - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers.set('Content-Type', httpContentTypeSelected); - } - - let requestOptions: RequestOptionsArgs = new RequestOptions({ - method: RequestMethod.Post, - headers: headers, - body: body == null ? '' : JSON.stringify(body), // https://github.com/angular/angular/issues/10612 - responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, - withCredentials:this.configuration.withCredentials - }); - // issues#4037 - if (extraHttpRequestParams) { - requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); - } - - return this.http.request(`${this.configuration.basePath}/user/createWithList`, requestOptions); - } - - /** - * Delete user - * This can only be done by the logged in user. - * @param username The name that needs to be deleted - */ - public deleteUserWithHttpInfo(username: string, extraHttpRequestParams?: RequestOptionsArgs, options?: {httpHeaderAccept?: undefined}): Observable { - if (username === null || username === undefined) { - throw new Error('Required parameter username was null or undefined when calling deleteUser.'); - } - - let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845 - - let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; - if (httpHeaderAcceptSelected === undefined) { - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - ]; - httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); - } - if (httpHeaderAcceptSelected !== undefined) { - headers.set('Accept', httpHeaderAcceptSelected); - } - - - let requestOptions: RequestOptionsArgs = new RequestOptions({ - method: RequestMethod.Delete, - headers: headers, - responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, - withCredentials:this.configuration.withCredentials - }); - // issues#4037 - if (extraHttpRequestParams) { - requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); - } - - return this.http.request(`${this.configuration.basePath}/user/${encodeURIComponent(String(username))}`, requestOptions); - } - - /** - * Get user by user name - * @param username The name that needs to be fetched. Use user1 for testing. - */ - public getUserByNameWithHttpInfo(username: string, extraHttpRequestParams?: RequestOptionsArgs, options?: {httpHeaderAccept?: 'application/xml' | 'application/json'}): Observable { - if (username === null || username === undefined) { - throw new Error('Required parameter username was null or undefined when calling getUserByName.'); - } - - let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845 - - let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; - if (httpHeaderAcceptSelected === undefined) { - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/xml', - 'application/json' - ]; - httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); - } - if (httpHeaderAcceptSelected !== undefined) { - headers.set('Accept', httpHeaderAcceptSelected); - } - - - let requestOptions: RequestOptionsArgs = new RequestOptions({ - method: RequestMethod.Get, - headers: headers, - responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, - withCredentials:this.configuration.withCredentials - }); - // issues#4037 - if (extraHttpRequestParams) { - requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); - } - - return this.http.request(`${this.configuration.basePath}/user/${encodeURIComponent(String(username))}`, requestOptions); - } - - /** - * Logs user into the system - * @param username The user name for login - * @param password The password for login in clear text - */ - public loginUserWithHttpInfo(username: string, password: string, extraHttpRequestParams?: RequestOptionsArgs, options?: {httpHeaderAccept?: 'application/xml' | 'application/json'}): Observable { - if (username === null || username === undefined) { - throw new Error('Required parameter username was null or undefined when calling loginUser.'); - } - if (password === null || password === undefined) { - throw new Error('Required parameter password was null or undefined when calling loginUser.'); - } - - let queryParameters = new URLSearchParams('', this.encoder); - if (username !== undefined && username !== null) { - this.addToHttpParams(queryParameters, - username, 'username'); - } - if (password !== undefined && password !== null) { - this.addToHttpParams(queryParameters, - password, 'password'); - } - - let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845 - - let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; - if (httpHeaderAcceptSelected === undefined) { - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/xml', - 'application/json' - ]; - httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); - } - if (httpHeaderAcceptSelected !== undefined) { - headers.set('Accept', httpHeaderAcceptSelected); - } - - - let requestOptions: RequestOptionsArgs = new RequestOptions({ - method: RequestMethod.Get, - headers: headers, - responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, - search: queryParameters, - withCredentials:this.configuration.withCredentials - }); - // issues#4037 - if (extraHttpRequestParams) { - requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); - } - - return this.http.request(`${this.configuration.basePath}/user/login`, requestOptions); - } - - /** - * Logs out current logged in user session - */ - public logoutUserWithHttpInfo(extraHttpRequestParams?: RequestOptionsArgs, options?: {httpHeaderAccept?: undefined}): Observable { - - let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845 - - let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; - if (httpHeaderAcceptSelected === undefined) { - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - ]; - httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); - } - if (httpHeaderAcceptSelected !== undefined) { - headers.set('Accept', httpHeaderAcceptSelected); - } - - - let requestOptions: RequestOptionsArgs = new RequestOptions({ - method: RequestMethod.Get, - headers: headers, - responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, - withCredentials:this.configuration.withCredentials - }); - // issues#4037 - if (extraHttpRequestParams) { - requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); - } - - return this.http.request(`${this.configuration.basePath}/user/logout`, requestOptions); - } - - /** - * Updated user - * This can only be done by the logged in user. - * @param username name that need to be deleted - * @param body Updated user object - */ - public updateUserWithHttpInfo(username: string, body: User, extraHttpRequestParams?: RequestOptionsArgs, options?: {httpHeaderAccept?: undefined}): Observable { - if (username === null || username === undefined) { - throw new Error('Required parameter username was null or undefined when calling updateUser.'); - } - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling updateUser.'); - } - - let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845 - - let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; - if (httpHeaderAcceptSelected === undefined) { - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - ]; - httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); - } - if (httpHeaderAcceptSelected !== undefined) { - headers.set('Accept', httpHeaderAcceptSelected); - } - - - // to determine the Content-Type header - const consumes: string[] = [ - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers.set('Content-Type', httpContentTypeSelected); - } - - let requestOptions: RequestOptionsArgs = new RequestOptions({ - method: RequestMethod.Put, - headers: headers, - body: body == null ? '' : JSON.stringify(body), // https://github.com/angular/angular/issues/10612 - responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, - withCredentials:this.configuration.withCredentials - }); - // issues#4037 - if (extraHttpRequestParams) { - requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); - } - - return this.http.request(`${this.configuration.basePath}/user/${encodeURIComponent(String(username))}`, requestOptions); - } - -} diff --git a/samples/client/petstore/typescript-angular-v2/npm/configuration.ts b/samples/client/petstore/typescript-angular-v2/npm/configuration.ts deleted file mode 100644 index a442747dfc1..00000000000 --- a/samples/client/petstore/typescript-angular-v2/npm/configuration.ts +++ /dev/null @@ -1,84 +0,0 @@ -import { QueryEncoder } from '@angular/http'; - -export interface ConfigurationParameters { - apiKeys?: {[ key: string ]: string}; - username?: string; - password?: string; - accessToken?: string | (() => string); - basePath?: string; - withCredentials?: boolean; - encoder?: QueryEncoder; -} - -export class Configuration { - apiKeys?: {[ key: string ]: string}; - username?: string; - password?: string; - accessToken?: string | (() => string); - basePath?: string; - withCredentials?: boolean; - encoder?: QueryEncoder; - - constructor(configurationParameters: ConfigurationParameters = {}) { - this.apiKeys = configurationParameters.apiKeys; - this.username = configurationParameters.username; - this.password = configurationParameters.password; - this.accessToken = configurationParameters.accessToken; - this.basePath = configurationParameters.basePath; - this.withCredentials = configurationParameters.withCredentials; - this.encoder = configurationParameters.encoder; - } - - /** - * Select the correct content-type to use for a request. - * Uses {@link Configuration#isJsonMime} to determine the correct content-type. - * If no content type is found return the first found type if the contentTypes is not empty - * @param contentTypes - the array of content types that are available for selection - * @returns the selected content-type or undefined if no selection could be made. - */ - public selectHeaderContentType (contentTypes: string[]): string | undefined { - if (contentTypes.length === 0) { - return undefined; - } - - const type = contentTypes.find((x: string) => this.isJsonMime(x)); - if (type === undefined) { - return contentTypes[0]; - } - return type; - } - - /** - * Select the correct accept content-type to use for a request. - * Uses {@link Configuration#isJsonMime} to determine the correct accept content-type. - * If no content type is found return the first found type if the contentTypes is not empty - * @param accepts - the array of content types that are available for selection. - * @returns the selected content-type or undefined if no selection could be made. - */ - public selectHeaderAccept(accepts: string[]): string | undefined { - if (accepts.length === 0) { - return undefined; - } - - const type = accepts.find((x: string) => this.isJsonMime(x)); - if (type === undefined) { - return accepts[0]; - } - return type; - } - - /** - * Check if the given MIME is a JSON MIME. - * JSON MIME examples: - * application/json - * application/json; charset=UTF8 - * APPLICATION/JSON - * application/vnd.company+json - * @param mime - MIME (Multipurpose Internet Mail Extensions) - * @return True if the given MIME is JSON, false otherwise. - */ - public isJsonMime(mime: string): boolean { - const jsonMime: RegExp = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i'); - return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json'); - } -} diff --git a/samples/client/petstore/typescript-angular-v2/npm/encoder.ts b/samples/client/petstore/typescript-angular-v2/npm/encoder.ts deleted file mode 100644 index a0221503f9c..00000000000 --- a/samples/client/petstore/typescript-angular-v2/npm/encoder.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { QueryEncoder } from '@angular/http'; - -/** - * Custom QueryEncoder - * Fix plus sign (+) not encoding, so sent as blank space - * See: https://github.com/angular/angular/issues/11058#issuecomment-247367318 - */ -export class CustomQueryEncoderHelper extends QueryEncoder { - encodeKey(k: string): string { - k = super.encodeKey(k); - return k.replace(/\+/gi, '%2B'); - } - encodeValue(v: string): string { - v = super.encodeValue(v); - return v.replace(/\+/gi, '%2B'); - } -} - diff --git a/samples/client/petstore/typescript-angular-v2/npm/git_push.sh b/samples/client/petstore/typescript-angular-v2/npm/git_push.sh deleted file mode 100644 index ced3be2b0c7..00000000000 --- a/samples/client/petstore/typescript-angular-v2/npm/git_push.sh +++ /dev/null @@ -1,58 +0,0 @@ -#!/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 openapi-pestore-perl "minor update" "gitlab.com" - -git_user_id=$1 -git_repo_id=$2 -release_note=$3 -git_host=$4 - -if [ "$git_host" = "" ]; then - git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" -fi - -if [ "$git_user_id" = "" ]; then - git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" -fi - -if [ "$git_repo_id" = "" ]; then - git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" -fi - -if [ "$release_note" = "" ]; then - release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" -fi - -# Initialize the local directory as a Git repository -git init - -# Adds the files in the local repository and stages them for commit. -git add . - -# Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" - -# Sets the new remote -git_remote=`git remote` -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git - else - git remote add origin https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git - fi - -fi - -git pull origin master - -# Pushes (Forces) the changes in the local repository up to the remote repository -echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" -git push origin master 2>&1 | grep -v 'To https' - diff --git a/samples/client/petstore/typescript-angular-v2/npm/index.ts b/samples/client/petstore/typescript-angular-v2/npm/index.ts deleted file mode 100644 index c312b70fa3e..00000000000 --- a/samples/client/petstore/typescript-angular-v2/npm/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -export * from './api/api'; -export * from './model/models'; -export * from './variables'; -export * from './configuration'; -export * from './api.module'; \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v2/npm/model/apiResponse.ts b/samples/client/petstore/typescript-angular-v2/npm/model/apiResponse.ts deleted file mode 100644 index 682ba478921..00000000000 --- a/samples/client/petstore/typescript-angular-v2/npm/model/apiResponse.ts +++ /dev/null @@ -1,22 +0,0 @@ -/** - * 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. - * - * The version of the OpenAPI document: 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. - */ - - -/** - * Describes the result of uploading an image resource - */ -export interface ApiResponse { - code?: number; - type?: string; - message?: string; -} - diff --git a/samples/client/petstore/typescript-angular-v2/npm/model/category.ts b/samples/client/petstore/typescript-angular-v2/npm/model/category.ts deleted file mode 100644 index b988b6827a0..00000000000 --- a/samples/client/petstore/typescript-angular-v2/npm/model/category.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * 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. - * - * The version of the OpenAPI document: 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. - */ - - -/** - * A category for a pet - */ -export interface Category { - id?: number; - name?: string; -} - diff --git a/samples/client/petstore/typescript-angular-v2/npm/model/models.ts b/samples/client/petstore/typescript-angular-v2/npm/model/models.ts deleted file mode 100644 index 8607c5dabd0..00000000000 --- a/samples/client/petstore/typescript-angular-v2/npm/model/models.ts +++ /dev/null @@ -1,6 +0,0 @@ -export * from './apiResponse'; -export * from './category'; -export * from './order'; -export * from './pet'; -export * from './tag'; -export * from './user'; diff --git a/samples/client/petstore/typescript-angular-v2/npm/model/order.ts b/samples/client/petstore/typescript-angular-v2/npm/model/order.ts deleted file mode 100644 index a29bebe4906..00000000000 --- a/samples/client/petstore/typescript-angular-v2/npm/model/order.ts +++ /dev/null @@ -1,37 +0,0 @@ -/** - * 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. - * - * The version of the OpenAPI document: 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. - */ - - -/** - * An order for a pets from the pet store - */ -export interface Order { - id?: number; - petId?: number; - quantity?: number; - shipDate?: string; - /** - * Order Status - */ - status?: Order.StatusEnum; - complete?: boolean; -} -export namespace Order { - export type StatusEnum = 'placed' | 'approved' | 'delivered'; - export const StatusEnum = { - Placed: 'placed' as StatusEnum, - Approved: 'approved' as StatusEnum, - Delivered: 'delivered' as StatusEnum - }; -} - - diff --git a/samples/client/petstore/typescript-angular-v2/npm/model/pet.ts b/samples/client/petstore/typescript-angular-v2/npm/model/pet.ts deleted file mode 100644 index e0404395f91..00000000000 --- a/samples/client/petstore/typescript-angular-v2/npm/model/pet.ts +++ /dev/null @@ -1,39 +0,0 @@ -/** - * 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. - * - * The version of the OpenAPI document: 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 { Category } from './category'; -import { Tag } from './tag'; - - -/** - * A pet for sale in the pet store - */ -export interface Pet { - id?: number; - category?: Category; - name: string; - photoUrls: Array; - tags?: Array; - /** - * pet status in the store - */ - status?: Pet.StatusEnum; -} -export namespace Pet { - export type StatusEnum = 'available' | 'pending' | 'sold'; - export const StatusEnum = { - Available: 'available' as StatusEnum, - Pending: 'pending' as StatusEnum, - Sold: 'sold' as StatusEnum - }; -} - - diff --git a/samples/client/petstore/typescript-angular-v2/npm/model/tag.ts b/samples/client/petstore/typescript-angular-v2/npm/model/tag.ts deleted file mode 100644 index b6ff210e8df..00000000000 --- a/samples/client/petstore/typescript-angular-v2/npm/model/tag.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * 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. - * - * The version of the OpenAPI document: 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. - */ - - -/** - * A tag for a pet - */ -export interface Tag { - id?: number; - name?: string; -} - diff --git a/samples/client/petstore/typescript-angular-v2/npm/model/user.ts b/samples/client/petstore/typescript-angular-v2/npm/model/user.ts deleted file mode 100644 index fce51005300..00000000000 --- a/samples/client/petstore/typescript-angular-v2/npm/model/user.ts +++ /dev/null @@ -1,30 +0,0 @@ -/** - * 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. - * - * The version of the OpenAPI document: 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. - */ - - -/** - * A User who is purchasing from the pet store - */ -export interface User { - id?: number; - username?: string; - firstName?: string; - lastName?: string; - email?: string; - password?: string; - phone?: string; - /** - * User Status - */ - userStatus?: number; -} - diff --git a/samples/client/petstore/typescript-angular-v2/npm/package-lock.json b/samples/client/petstore/typescript-angular-v2/npm/package-lock.json deleted file mode 100644 index e75509b0294..00000000000 --- a/samples/client/petstore/typescript-angular-v2/npm/package-lock.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "name": "@swagger/angular2-typescript-petstore", - "version": "0.0.1", - "lockfileVersion": 1, - "dependencies": { - "@angular/common": { - "version": "2.4.10", - "resolved": "https://registry.npmjs.org/@angular/common/-/common-2.4.10.tgz", - "integrity": "sha1-o6aC0iKPow7CPdDrV8joh/uiaZc=", - "dev": true - }, - "@angular/compiler": { - "version": "2.4.10", - "resolved": "https://registry.npmjs.org/@angular/compiler/-/compiler-2.4.10.tgz", - "integrity": "sha1-9R/TSCCyoCx8th+89JhzxYBW+ww=", - "dev": true - }, - "@angular/core": { - "version": "2.4.10", - "resolved": "https://registry.npmjs.org/@angular/core/-/core-2.4.10.tgz", - "integrity": "sha1-C4MgplBlll2ZhkWx9c0892m0Qeo=", - "dev": true - }, - "@angular/http": { - "version": "2.4.10", - "resolved": "https://registry.npmjs.org/@angular/http/-/http-2.4.10.tgz", - "integrity": "sha1-/2vq3ls5yYnr8jk8SbNO69Q+lVU=", - "dev": true - }, - "@angular/platform-browser": { - "version": "2.4.10", - "resolved": "https://registry.npmjs.org/@angular/platform-browser/-/platform-browser-2.4.10.tgz", - "integrity": "sha1-y/JWCBSPtP/vlsxQBbpdez4JOQY=", - "dev": true - }, - "reflect-metadata": { - "version": "0.1.10", - "resolved": "https://registry.npmjs.org/reflect-metadata/-/reflect-metadata-0.1.10.tgz", - "integrity": "sha1-tPg3BEFqytiZiMmxVjXUfgO5NEo=", - "dev": true - }, - "rxjs": { - "version": "5.4.2", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-5.4.2.tgz", - "integrity": "sha1-KjI2/L8D31e64G/Wly/ZnlwI/Pc=", - "dev": true - }, - "symbol-observable": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.0.4.tgz", - "integrity": "sha1-Kb9hXUqnEhvdiYsi1LP5vE4qoD0=", - "dev": true - }, - "typescript": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-2.4.1.tgz", - "integrity": "sha1-w8yxbdqgsjFN4DHn5v7onlujRrw=", - "dev": true - }, - "zone.js": { - "version": "0.7.8", - "resolved": "https://registry.npmjs.org/zone.js/-/zone.js-0.7.8.tgz", - "integrity": "sha1-Tz/og01EWX8mOQU6D6Q43zT//e0=", - "dev": true - } - } -} diff --git a/samples/client/petstore/typescript-angular-v2/npm/package.json b/samples/client/petstore/typescript-angular-v2/npm/package.json deleted file mode 100644 index 675cc34b14d..00000000000 --- a/samples/client/petstore/typescript-angular-v2/npm/package.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "name": "@openapitools/angular2-typescript-petstore", - "version": "0.0.1", - "description": "OpenAPI client for @openapitools/angular2-typescript-petstore", - "author": "OpenAPI-Generator Contributors", - "keywords": [ - "openapi-client", - "openapi-generator" - ], - "license": "Unlicense", - "main": "dist/index.js", - "module": "dist/index.js", - "typings": "dist/index.d.ts", - "scripts": { - "build": "ngc && npm pack" - }, - "peerDependencies": { - "@angular/core": "^2.0.0", - "@angular/http": "^2.0.0", - "@angular/common": "^2.0.0", - "@angular/compiler": "^2.0.0", - "core-js": "^2.4.0", - "reflect-metadata": "^0.1.3", - "rxjs": "^5.4.0" - }, - "devDependencies": { - "@angular/common": "^2.0.0", - "@angular/compiler": "^2.0.0", - "@angular/compiler-cli": "^2.0.0", - "@angular/core": "^2.0.0", - "@angular/http": "^2.0.0", - "@angular/platform-browser": "^2.0.0", - "reflect-metadata": "^0.1.3", - "rxjs": "^5.4.0", - "typescript": ">=2.1.5 <2.8.0", - "zone.js": "^0.7.6" - }, - "publishConfig": { - "registry": "https://skimdb.npmjs.com/registry" - } -} diff --git a/samples/client/petstore/typescript-angular-v2/npm/pom.xml b/samples/client/petstore/typescript-angular-v2/npm/pom.xml deleted file mode 100644 index 813fbfca88e..00000000000 --- a/samples/client/petstore/typescript-angular-v2/npm/pom.xml +++ /dev/null @@ -1,60 +0,0 @@ - - 4.0.0 - org.openapitools - TSAngular2PestoreClientTests - pom - 1.0-SNAPSHOT - TS Angular 2 Petstore Client Tests - - - - maven-dependency-plugin - - - package - - copy-dependencies - - - ${project.build.directory} - - - - - - org.codehaus.mojo - exec-maven-plugin - 1.2.1 - - - npm-install - pre-integration-test - - exec - - - npm - - install - - - - - npm-run-build - integration-test - - exec - - - npm - - run - build - - - - - - - - diff --git a/samples/client/petstore/typescript-angular-v2/npm/rxjs-operators.ts b/samples/client/petstore/typescript-angular-v2/npm/rxjs-operators.ts deleted file mode 100644 index 5659cd0694f..00000000000 --- a/samples/client/petstore/typescript-angular-v2/npm/rxjs-operators.ts +++ /dev/null @@ -1,11 +0,0 @@ -// RxJS imports according to https://angular.io/docs/ts/latest/guide/server-communication.html#!#rxjs - -// See node_module/rxjs/Rxjs.js -// Import just the rxjs statics and operators we need for THIS app. - -// Statics -import 'rxjs/add/observable/throw'; - -// Operators -import 'rxjs/add/operator/catch'; -import 'rxjs/add/operator/map'; diff --git a/samples/client/petstore/typescript-angular-v2/npm/tsconfig.json b/samples/client/petstore/typescript-angular-v2/npm/tsconfig.json deleted file mode 100644 index cc7ead72600..00000000000 --- a/samples/client/petstore/typescript-angular-v2/npm/tsconfig.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "compilerOptions": { - "emitDecoratorMetadata": true, - "experimentalDecorators": true, - "noImplicitAny": false, - "suppressImplicitAnyIndexErrors": true, - "target": "es5", - "module": "commonjs", - "moduleResolution": "node", - "removeComments": true, - "sourceMap": true, - "outDir": "./dist", - "noLib": false, - "declaration": true, - "lib": [ "es6", "dom" ], - "typeRoots": [ - "node_modules/@types" - ] - }, - "exclude": [ - "node_modules", - "dist" - ], - "filesGlob": [ - "./model/*.ts", - "./api/*.ts" - ], - "angularCompilerOptions": { - "genDir": "dist", - "skipTemplateCodegen": true - } -} diff --git a/samples/client/petstore/typescript-angular-v2/npm/variables.ts b/samples/client/petstore/typescript-angular-v2/npm/variables.ts deleted file mode 100644 index 29b7e5b1d71..00000000000 --- a/samples/client/petstore/typescript-angular-v2/npm/variables.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { OpaqueToken } from '@angular/core'; - -export const BASE_PATH = new OpaqueToken('basePath'); -export const COLLECTION_FORMATS = { - 'csv': ',', - 'tsv': ' ', - 'ssv': ' ', - 'pipes': '|' -} diff --git a/samples/client/petstore/typescript-angular-v2/with-interfaces/.gitignore b/samples/client/petstore/typescript-angular-v2/with-interfaces/.gitignore deleted file mode 100644 index 149b5765472..00000000000 --- a/samples/client/petstore/typescript-angular-v2/with-interfaces/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -wwwroot/*.js -node_modules -typings -dist diff --git a/samples/client/petstore/typescript-angular-v2/with-interfaces/.openapi-generator-ignore b/samples/client/petstore/typescript-angular-v2/with-interfaces/.openapi-generator-ignore deleted file mode 100644 index 7484ee590a3..00000000000 --- a/samples/client/petstore/typescript-angular-v2/with-interfaces/.openapi-generator-ignore +++ /dev/null @@ -1,23 +0,0 @@ -# OpenAPI Generator Ignore -# Generated by openapi-generator https://github.com/openapitools/openapi-generator - -# Use this file to prevent files from being overwritten by the generator. -# The patterns follow closely to .gitignore or .dockerignore. - -# As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: -#ApiClient.cs - -# You can match any string of characters against a directory, file or extension with a single asterisk (*): -#foo/*/qux -# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux - -# You can recursively match patterns against a directory, file or extension with a double asterisk (**): -#foo/**/qux -# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux - -# You can also negate patterns with an exclamation (!). -# For example, you can ignore all files in a docs folder with the file extension .md: -#docs/*.md -# Then explicitly reverse the ignore rule for a single file: -#!docs/README.md diff --git a/samples/client/petstore/typescript-angular-v2/with-interfaces/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v2/with-interfaces/.openapi-generator/VERSION deleted file mode 100644 index d99e7162d01..00000000000 --- a/samples/client/petstore/typescript-angular-v2/with-interfaces/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -5.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v2/with-interfaces/README.md b/samples/client/petstore/typescript-angular-v2/with-interfaces/README.md deleted file mode 100644 index b9bb2dbb680..00000000000 --- a/samples/client/petstore/typescript-angular-v2/with-interfaces/README.md +++ /dev/null @@ -1,201 +0,0 @@ -## @ - -### Building - -To install the required dependencies and to build the typescript sources run: -``` -npm install -npm run build -``` - -### publishing - -First build the package then run ```npm publish``` - -### consuming - -Navigate to the folder of your consuming project and run one of next commands. - -_published:_ - -``` -npm install @ --save -``` - -_without publishing (not recommended):_ - -``` -npm install PATH_TO_GENERATED_PACKAGE/-.tgz --save -``` - -_It's important to take the tgz file, otherwise you'll get trouble with links on windows_ - -_using `npm link`:_ - -In PATH_TO_GENERATED_PACKAGE: -``` -npm link -``` - -In your project: -``` -npm link -``` - -__Note for Windows users:__ The Angular CLI has troubles to use linked npm packages. -Please refer to this issue https://github.com/angular/angular-cli/issues/8284 for a solution / workaround. -Published packages are not effected by this issue. - - -#### General usage - -In your Angular project: - - -``` -// without configuring providers -import { ApiModule } from ''; - -import { HttpModule } from '@angular/http'; - -@NgModule({ - imports: [ - ApiModule, - HttpModule - ], - declarations: [ AppComponent ], - providers: [], - bootstrap: [ AppComponent ] -}) -export class AppModule {} -``` - -``` -// configuring providers -import { ApiModule, Configuration, ConfigurationParameters } from ''; - -export function apiConfigFactory (): Configuration => { - const params: ConfigurationParameters = { - // set configuration parameters here. - } - return new Configuration(params); -} - -@NgModule({ - imports: [ ApiModule.forRoot(apiConfigFactory) ], - declarations: [ AppComponent ], - providers: [], - bootstrap: [ AppComponent ] -}) -export class AppModule {} -``` - -``` -// configuring providers with an authentication service that manages your access tokens -import { ApiModule, Configuration } from ''; - -@NgModule({ - imports: [ ApiModule ], - declarations: [ AppComponent ], - providers: [ - { - provide: Configuration, - useFactory: (authService: AuthService) => new Configuration( - { - basePath: environment.apiUrl, - accessToken: authService.getAccessToken.bind(authService) - } - ), - deps: [AuthService], - multi: false - } - ], - bootstrap: [ AppComponent ] -}) -export class AppModule {} -``` - -``` -import { DefaultApi } from ''; - -export class AppComponent { - constructor(private apiGateway: DefaultApi) { } -} -``` - -Note: The ApiModule is restricted to being instantiated once app wide. -This is to ensure that all services are treated as singletons. - -#### Using multiple OpenAPI files / APIs / ApiModules -In order to use multiple `ApiModules` generated from different OpenAPI files, -you can create an alias name when importing the modules -in order to avoid naming conflicts: -``` -import { ApiModule } from 'my-api-path'; -import { ApiModule as OtherApiModule } from 'my-other-api-path'; - -import { HttpModule } from '@angular/http'; - -@NgModule({ - imports: [ - ApiModule, - OtherApiModule, - HttpModule - ] -}) -export class AppModule { - -} -``` - - -### Set service base path -If different than the generated base path, during app bootstrap, you can provide the base path to your service. - -``` -import { BASE_PATH } from ''; - -bootstrap(AppComponent, [ - { provide: BASE_PATH, useValue: 'https://your-web-service.com' }, -]); -``` -or - -``` -import { BASE_PATH } from ''; - -@NgModule({ - imports: [], - declarations: [ AppComponent ], - providers: [ provide: BASE_PATH, useValue: 'https://your-web-service.com' ], - bootstrap: [ AppComponent ] -}) -export class AppModule {} -``` - - -#### Using @angular/cli -First extend your `src/environments/*.ts` files by adding the corresponding base path: - -``` -export const environment = { - production: false, - API_BASE_PATH: 'http://127.0.0.1:8080' -}; -``` - -In the src/app/app.module.ts: -``` -import { BASE_PATH } from ''; -import { environment } from '../environments/environment'; - -@NgModule({ - declarations: [ - AppComponent - ], - imports: [ ], - providers: [{ provide: BASE_PATH, useValue: environment.API_BASE_PATH }], - bootstrap: [ AppComponent ] -}) -export class AppModule { } -``` diff --git a/samples/client/petstore/typescript-angular-v2/with-interfaces/api.module.ts b/samples/client/petstore/typescript-angular-v2/with-interfaces/api.module.ts deleted file mode 100644 index d321b1180de..00000000000 --- a/samples/client/petstore/typescript-angular-v2/with-interfaces/api.module.ts +++ /dev/null @@ -1,37 +0,0 @@ -import { NgModule, ModuleWithProviders, SkipSelf, Optional } from '@angular/core'; -import { Configuration } from './configuration'; - -import { Http } from '@angular/http'; - -import { PetService } from './api/pet.service'; -import { StoreService } from './api/store.service'; -import { UserService } from './api/user.service'; - -@NgModule({ - imports: [], - declarations: [], - exports: [], - providers: [ - PetService, - StoreService, - UserService ] -}) -export class ApiModule { - public static forRoot(configurationFactory: () => Configuration): ModuleWithProviders { - return { - ngModule: ApiModule, - providers: [ { provide: Configuration, useFactory: configurationFactory } ] - }; - } - - constructor( @Optional() @SkipSelf() parentModule: ApiModule, - @Optional() http: Http) { - if (parentModule) { - throw new Error('ApiModule is already loaded. Import in your base AppModule only.'); - } - if (!http) { - throw new Error('You need to import the HttpModule in your AppModule! \n' + - 'See also https://github.com/angular/angular/issues/20575'); - } - } -} diff --git a/samples/client/petstore/typescript-angular-v2/with-interfaces/api/api.ts b/samples/client/petstore/typescript-angular-v2/with-interfaces/api/api.ts deleted file mode 100644 index 948c44a4cf0..00000000000 --- a/samples/client/petstore/typescript-angular-v2/with-interfaces/api/api.ts +++ /dev/null @@ -1,10 +0,0 @@ -export * from './pet.service'; -import { PetService } from './pet.service'; -export * from './pet.serviceInterface' -export * from './store.service'; -import { StoreService } from './store.service'; -export * from './store.serviceInterface' -export * from './user.service'; -import { UserService } from './user.service'; -export * from './user.serviceInterface' -export const APIS = [PetService, StoreService, UserService]; diff --git a/samples/client/petstore/typescript-angular-v2/with-interfaces/api/pet.service.ts b/samples/client/petstore/typescript-angular-v2/with-interfaces/api/pet.service.ts deleted file mode 100644 index 086bd8e2a1f..00000000000 --- a/samples/client/petstore/typescript-angular-v2/with-interfaces/api/pet.service.ts +++ /dev/null @@ -1,717 +0,0 @@ -/** - * 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. - * - * The version of the OpenAPI document: 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. - */ -/* tslint:disable:no-unused-variable member-ordering */ - -import { Inject, Injectable, Optional } from '@angular/core'; -import { Http, Headers, URLSearchParams, - RequestMethod, RequestOptions, RequestOptionsArgs, - Response, ResponseContentType, QueryEncoder } from '@angular/http'; -import { CustomQueryEncoderHelper } from '../encoder'; -import { Observable } from 'rxjs/Observable'; -import '../rxjs-operators'; - -import { ApiResponse } from '../model/models'; -import { Pet } from '../model/models'; - -import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; -import { Configuration } from '../configuration'; -import { - PetServiceInterface -} from './pet.serviceInterface'; - - - -@Injectable() -export class PetService implements PetServiceInterface { - - protected basePath = 'http://petstore.swagger.io/v2'; - public defaultHeaders = new Headers(); - public configuration = new Configuration(); - public encoder: QueryEncoder; - - constructor(protected http: Http, @Optional()@Inject(BASE_PATH) basePath: string, @Optional() configuration: Configuration) { - if (configuration) { - this.configuration = configuration; - } - if (typeof this.configuration.basePath !== 'string') { - if (typeof basePath !== 'string') { - basePath = this.basePath; - } - this.configuration.basePath = basePath; - } - this.encoder = this.configuration.encoder || new CustomQueryEncoderHelper(); - } - - /** - * @param consumes string[] mime-types - * @return true: consumes contains 'multipart/form-data', false: otherwise - */ - private canConsumeForm(consumes: string[]): boolean { - const form = 'multipart/form-data'; - for (const consume of consumes) { - if (form === consume) { - return true; - } - } - return false; - } - - /** - * - * @summary Add a new pet to the store - - * @param body Pet object that needs to be added to the store - */ - public addPet(body: Pet, extraHttpRequestParams?: RequestOptionsArgs): Observable<{}> { - return this.addPetWithHttpInfo(body, extraHttpRequestParams) - .map((response: Response) => { - if (response.status === 204) { - return undefined; - } else { - return response.json() || {}; - } - }); - } - - /** - * - * @summary Deletes a pet - - * @param petId Pet id to delete - * @param apiKey - */ - public deletePet(petId: number, apiKey?: string, extraHttpRequestParams?: RequestOptionsArgs): Observable<{}> { - return this.deletePetWithHttpInfo(petId, apiKey, extraHttpRequestParams) - .map((response: Response) => { - if (response.status === 204) { - return undefined; - } else { - return response.json() || {}; - } - }); - } - - /** - * Multiple status values can be provided with comma separated strings - * @summary Finds Pets by status - - * @param status Status values that need to be considered for filter - */ - public findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, extraHttpRequestParams?: RequestOptionsArgs): Observable> { - return this.findPetsByStatusWithHttpInfo(status, extraHttpRequestParams) - .map((response: Response) => { - if (response.status === 204) { - return undefined; - } else { - return response.json() || {}; - } - }); - } - - /** - * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. - * @summary Finds Pets by tags - - * @param tags Tags to filter by - */ - public findPetsByTags(tags: Array, extraHttpRequestParams?: RequestOptionsArgs): Observable> { - return this.findPetsByTagsWithHttpInfo(tags, extraHttpRequestParams) - .map((response: Response) => { - if (response.status === 204) { - return undefined; - } else { - return response.json() || {}; - } - }); - } - - /** - * Returns a single pet - * @summary Find pet by ID - - * @param petId ID of pet to return - */ - public getPetById(petId: number, extraHttpRequestParams?: RequestOptionsArgs): Observable { - return this.getPetByIdWithHttpInfo(petId, extraHttpRequestParams) - .map((response: Response) => { - if (response.status === 204) { - return undefined; - } else { - return response.json() || {}; - } - }); - } - - /** - * - * @summary Update an existing pet - - * @param body Pet object that needs to be added to the store - */ - public updatePet(body: Pet, extraHttpRequestParams?: RequestOptionsArgs): Observable<{}> { - return this.updatePetWithHttpInfo(body, extraHttpRequestParams) - .map((response: Response) => { - if (response.status === 204) { - return undefined; - } else { - return response.json() || {}; - } - }); - } - - /** - * - * @summary Updates a pet in the store with form data - - * @param petId ID of pet that needs to be updated - * @param name Updated name of the pet - * @param status Updated status of the pet - */ - public updatePetWithForm(petId: number, name?: string, status?: string, extraHttpRequestParams?: RequestOptionsArgs): Observable<{}> { - return this.updatePetWithFormWithHttpInfo(petId, name, status, extraHttpRequestParams) - .map((response: Response) => { - if (response.status === 204) { - return undefined; - } else { - return response.json() || {}; - } - }); - } - - /** - * - * @summary uploads an image - - * @param petId ID of pet to update - * @param additionalMetadata Additional data to pass to server - * @param file file to upload - */ - public uploadFile(petId: number, additionalMetadata?: string, file?: Blob, extraHttpRequestParams?: RequestOptionsArgs): Observable { - return this.uploadFileWithHttpInfo(petId, additionalMetadata, file, extraHttpRequestParams) - .map((response: Response) => { - if (response.status === 204) { - return undefined; - } else { - return response.json() || {}; - } - }); - } - - - private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams { - if (typeof value === "object" && value instanceof Date === false) { - this.addToHttpParamsRecursive(httpParams, value); - } else { - this.addToHttpParamsRecursive(httpParams, value, key); - } - return httpParams; - } - - private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams { - if (value == null) { - return httpParams; - } - - if (typeof value === "object") { - if (Array.isArray(value)) { - (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); - } else if (value instanceof Date) { - if (key != null) { - httpParams.append(key, - (value as Date).toISOString().substr(0, 10)); - } else { - throw Error("key may not be null if value is Date"); - } - } else { - Object.keys(value).forEach( k => this.addToHttpParamsRecursive( - httpParams, value[k], key != null ? `${key}.${k}` : k)); - } - } else if (key != null) { - httpParams.append(key, value); - } else { - throw Error("key may not be null if value is not object or array"); - } - return httpParams; - } - - /** - * Add a new pet to the store - * @param body Pet object that needs to be added to the store - */ - public addPetWithHttpInfo(body: Pet, extraHttpRequestParams?: RequestOptionsArgs, options?: {httpHeaderAccept?: undefined}): Observable { - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling addPet.'); - } - - let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845 - - // authentication (petstore_auth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers.set('Authorization', 'Bearer ' + accessToken); - } - - let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; - if (httpHeaderAcceptSelected === undefined) { - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - ]; - httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); - } - if (httpHeaderAcceptSelected !== undefined) { - headers.set('Accept', httpHeaderAcceptSelected); - } - - - // to determine the Content-Type header - const consumes: string[] = [ - 'application/json', - 'application/xml' - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers.set('Content-Type', httpContentTypeSelected); - } - - let requestOptions: RequestOptionsArgs = new RequestOptions({ - method: RequestMethod.Post, - headers: headers, - body: body == null ? '' : JSON.stringify(body), // https://github.com/angular/angular/issues/10612 - responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, - withCredentials:this.configuration.withCredentials - }); - // issues#4037 - if (extraHttpRequestParams) { - requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); - } - - return this.http.request(`${this.configuration.basePath}/pet`, requestOptions); - } - - /** - * Deletes a pet - * @param petId Pet id to delete - * @param apiKey - */ - public deletePetWithHttpInfo(petId: number, apiKey?: string, extraHttpRequestParams?: RequestOptionsArgs, options?: {httpHeaderAccept?: undefined}): Observable { - if (petId === null || petId === undefined) { - throw new Error('Required parameter petId was null or undefined when calling deletePet.'); - } - - let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845 - if (apiKey !== undefined && apiKey !== null) { - headers.set('api_key', String(apiKey)); - } - - // authentication (petstore_auth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers.set('Authorization', 'Bearer ' + accessToken); - } - - let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; - if (httpHeaderAcceptSelected === undefined) { - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - ]; - httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); - } - if (httpHeaderAcceptSelected !== undefined) { - headers.set('Accept', httpHeaderAcceptSelected); - } - - - let requestOptions: RequestOptionsArgs = new RequestOptions({ - method: RequestMethod.Delete, - headers: headers, - responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, - withCredentials:this.configuration.withCredentials - }); - // issues#4037 - if (extraHttpRequestParams) { - requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); - } - - return this.http.request(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}`, requestOptions); - } - - /** - * 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 - */ - public findPetsByStatusWithHttpInfo(status: Array<'available' | 'pending' | 'sold'>, extraHttpRequestParams?: RequestOptionsArgs, options?: {httpHeaderAccept?: 'application/xml' | 'application/json'}): Observable { - if (status === null || status === undefined) { - throw new Error('Required parameter status was null or undefined when calling findPetsByStatus.'); - } - - let queryParameters = new URLSearchParams('', this.encoder); - if (status) { - this.addToHttpParams(queryParameters, - status.join(COLLECTION_FORMATS['csv']), 'status'); - } - - let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845 - - // authentication (petstore_auth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers.set('Authorization', 'Bearer ' + accessToken); - } - - let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; - if (httpHeaderAcceptSelected === undefined) { - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/xml', - 'application/json' - ]; - httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); - } - if (httpHeaderAcceptSelected !== undefined) { - headers.set('Accept', httpHeaderAcceptSelected); - } - - - let requestOptions: RequestOptionsArgs = new RequestOptions({ - method: RequestMethod.Get, - headers: headers, - responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, - search: queryParameters, - withCredentials:this.configuration.withCredentials - }); - // issues#4037 - if (extraHttpRequestParams) { - requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); - } - - return this.http.request(`${this.configuration.basePath}/pet/findByStatus`, requestOptions); - } - - /** - * 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 - */ - public findPetsByTagsWithHttpInfo(tags: Array, extraHttpRequestParams?: RequestOptionsArgs, options?: {httpHeaderAccept?: 'application/xml' | 'application/json'}): Observable { - if (tags === null || tags === undefined) { - throw new Error('Required parameter tags was null or undefined when calling findPetsByTags.'); - } - - let queryParameters = new URLSearchParams('', this.encoder); - if (tags) { - this.addToHttpParams(queryParameters, - tags.join(COLLECTION_FORMATS['csv']), 'tags'); - } - - let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845 - - // authentication (petstore_auth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers.set('Authorization', 'Bearer ' + accessToken); - } - - let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; - if (httpHeaderAcceptSelected === undefined) { - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/xml', - 'application/json' - ]; - httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); - } - if (httpHeaderAcceptSelected !== undefined) { - headers.set('Accept', httpHeaderAcceptSelected); - } - - - let requestOptions: RequestOptionsArgs = new RequestOptions({ - method: RequestMethod.Get, - headers: headers, - responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, - search: queryParameters, - withCredentials:this.configuration.withCredentials - }); - // issues#4037 - if (extraHttpRequestParams) { - requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); - } - - return this.http.request(`${this.configuration.basePath}/pet/findByTags`, requestOptions); - } - - /** - * Find pet by ID - * Returns a single pet - * @param petId ID of pet to return - */ - public getPetByIdWithHttpInfo(petId: number, extraHttpRequestParams?: RequestOptionsArgs, options?: {httpHeaderAccept?: 'application/xml' | 'application/json'}): Observable { - if (petId === null || petId === undefined) { - throw new Error('Required parameter petId was null or undefined when calling getPetById.'); - } - - let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845 - - // authentication (api_key) required - if (this.configuration.apiKeys) { - const key: string | undefined = this.configuration.apiKeys["api_key"] || this.configuration.apiKeys["api_key"]; - if (key) { - headers.set('api_key', key); - } - } - - let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; - if (httpHeaderAcceptSelected === undefined) { - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/xml', - 'application/json' - ]; - httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); - } - if (httpHeaderAcceptSelected !== undefined) { - headers.set('Accept', httpHeaderAcceptSelected); - } - - - let requestOptions: RequestOptionsArgs = new RequestOptions({ - method: RequestMethod.Get, - headers: headers, - responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, - withCredentials:this.configuration.withCredentials - }); - // issues#4037 - if (extraHttpRequestParams) { - requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); - } - - return this.http.request(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}`, requestOptions); - } - - /** - * Update an existing pet - * @param body Pet object that needs to be added to the store - */ - public updatePetWithHttpInfo(body: Pet, extraHttpRequestParams?: RequestOptionsArgs, options?: {httpHeaderAccept?: undefined}): Observable { - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling updatePet.'); - } - - let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845 - - // authentication (petstore_auth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers.set('Authorization', 'Bearer ' + accessToken); - } - - let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; - if (httpHeaderAcceptSelected === undefined) { - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - ]; - httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); - } - if (httpHeaderAcceptSelected !== undefined) { - headers.set('Accept', httpHeaderAcceptSelected); - } - - - // to determine the Content-Type header - const consumes: string[] = [ - 'application/json', - 'application/xml' - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers.set('Content-Type', httpContentTypeSelected); - } - - let requestOptions: RequestOptionsArgs = new RequestOptions({ - method: RequestMethod.Put, - headers: headers, - body: body == null ? '' : JSON.stringify(body), // https://github.com/angular/angular/issues/10612 - responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, - withCredentials:this.configuration.withCredentials - }); - // issues#4037 - if (extraHttpRequestParams) { - requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); - } - - return this.http.request(`${this.configuration.basePath}/pet`, requestOptions); - } - - /** - * Updates a pet in the store with form data - * @param petId ID of pet that needs to be updated - * @param name Updated name of the pet - * @param status Updated status of the pet - */ - public updatePetWithFormWithHttpInfo(petId: number, name?: string, status?: string, extraHttpRequestParams?: RequestOptionsArgs, options?: {httpHeaderAccept?: undefined}): Observable { - if (petId === null || petId === undefined) { - throw new Error('Required parameter petId was null or undefined when calling updatePetWithForm.'); - } - - let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845 - - // authentication (petstore_auth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers.set('Authorization', 'Bearer ' + accessToken); - } - - let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; - if (httpHeaderAcceptSelected === undefined) { - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - ]; - httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); - } - if (httpHeaderAcceptSelected !== undefined) { - headers.set('Accept', httpHeaderAcceptSelected); - } - - // to determine the Content-Type header - const consumes: string[] = [ - 'application/x-www-form-urlencoded' - ]; - - const canConsumeForm = this.canConsumeForm(consumes); - - let formParams: { append(param: string, value: any): any; }; - let useForm = false; - let convertFormParamsToString = false; - if (useForm) { - formParams = new FormData(); - } else { - // TODO: this fails if a parameter is a file, the api can't consume "multipart/form-data" and a blob is passed. - convertFormParamsToString = true; - formParams = new URLSearchParams('', this.encoder); - // set the content-type explicitly to avoid having it set to 'text/plain' - headers.set('Content-Type', 'application/x-www-form-urlencoded;charset=UTF-8'); - } - - if (name !== undefined) { - formParams.append('name', name); - } - if (status !== undefined) { - formParams.append('status', status); - } - - let requestOptions: RequestOptionsArgs = new RequestOptions({ - method: RequestMethod.Post, - headers: headers, - body: convertFormParamsToString ? formParams.toString() : formParams, - responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, - withCredentials:this.configuration.withCredentials - }); - // issues#4037 - if (extraHttpRequestParams) { - requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); - } - - return this.http.request(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}`, requestOptions); - } - - /** - * uploads an image - * @param petId ID of pet to update - * @param additionalMetadata Additional data to pass to server - * @param file file to upload - */ - public uploadFileWithHttpInfo(petId: number, additionalMetadata?: string, file?: Blob, extraHttpRequestParams?: RequestOptionsArgs, options?: {httpHeaderAccept?: 'application/json'}): Observable { - if (petId === null || petId === undefined) { - throw new Error('Required parameter petId was null or undefined when calling uploadFile.'); - } - - let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845 - - // authentication (petstore_auth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers.set('Authorization', 'Bearer ' + accessToken); - } - - let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; - if (httpHeaderAcceptSelected === undefined) { - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); - } - if (httpHeaderAcceptSelected !== undefined) { - headers.set('Accept', httpHeaderAcceptSelected); - } - - // to determine the Content-Type header - const consumes: string[] = [ - 'multipart/form-data' - ]; - - const canConsumeForm = this.canConsumeForm(consumes); - - let formParams: { append(param: string, value: any): any; }; - let useForm = false; - let convertFormParamsToString = false; - // use FormData to transmit files using content-type "multipart/form-data" - // see https://stackoverflow.com/questions/4007969/application-x-www-form-urlencoded-or-multipart-form-data - useForm = canConsumeForm; - if (useForm) { - formParams = new FormData(); - } else { - // TODO: this fails if a parameter is a file, the api can't consume "multipart/form-data" and a blob is passed. - convertFormParamsToString = true; - formParams = new URLSearchParams('', this.encoder); - // set the content-type explicitly to avoid having it set to 'text/plain' - headers.set('Content-Type', 'application/x-www-form-urlencoded;charset=UTF-8'); - } - - if (additionalMetadata !== undefined) { - formParams.append('additionalMetadata', additionalMetadata); - } - if (file !== undefined) { - formParams.append('file', file); - } - - let requestOptions: RequestOptionsArgs = new RequestOptions({ - method: RequestMethod.Post, - headers: headers, - body: convertFormParamsToString ? formParams.toString() : formParams, - responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, - withCredentials:this.configuration.withCredentials - }); - // issues#4037 - if (extraHttpRequestParams) { - requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); - } - - return this.http.request(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}/uploadImage`, requestOptions); - } - -} diff --git a/samples/client/petstore/typescript-angular-v2/with-interfaces/api/pet.serviceInterface.ts b/samples/client/petstore/typescript-angular-v2/with-interfaces/api/pet.serviceInterface.ts deleted file mode 100644 index d9b47a3c480..00000000000 --- a/samples/client/petstore/typescript-angular-v2/with-interfaces/api/pet.serviceInterface.ts +++ /dev/null @@ -1,90 +0,0 @@ -/** - * 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. - * - * The version of the OpenAPI document: 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 { Headers } from '@angular/http'; - -import { Observable } from 'rxjs/Observable'; - -import { ApiResponse } from '../model/models'; -import { Pet } from '../model/models'; - - -import { Configuration } from '../configuration'; - - - -export interface PetServiceInterface { - defaultHeaders: Headers; - configuration: Configuration; - [others: string]: any; - - /** - * Add a new pet to the store - * - * @param body Pet object that needs to be added to the store - */ - addPet(body: Pet, extraHttpRequestParams?: any): Observable<{}>; - - /** - * Deletes a pet - * - * @param petId Pet id to delete - * @param apiKey - */ - deletePet(petId: number, apiKey?: string, extraHttpRequestParams?: any): Observable<{}>; - - /** - * 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 - */ - findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, extraHttpRequestParams?: any): Observable>; - - /** - * 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 - */ - findPetsByTags(tags: Array, extraHttpRequestParams?: any): Observable>; - - /** - * Find pet by ID - * Returns a single pet - * @param petId ID of pet to return - */ - getPetById(petId: number, extraHttpRequestParams?: any): Observable; - - /** - * Update an existing pet - * - * @param body Pet object that needs to be added to the store - */ - updatePet(body: Pet, extraHttpRequestParams?: any): Observable<{}>; - - /** - * Updates a pet in the store with form data - * - * @param petId ID of pet that needs to be updated - * @param name Updated name of the pet - * @param status Updated status of the pet - */ - updatePetWithForm(petId: number, name?: string, status?: string, extraHttpRequestParams?: any): Observable<{}>; - - /** - * uploads an image - * - * @param petId ID of pet to update - * @param additionalMetadata Additional data to pass to server - * @param file file to upload - */ - uploadFile(petId: number, additionalMetadata?: string, file?: Blob, extraHttpRequestParams?: any): Observable; - -} diff --git a/samples/client/petstore/typescript-angular-v2/with-interfaces/api/store.service.ts b/samples/client/petstore/typescript-angular-v2/with-interfaces/api/store.service.ts deleted file mode 100644 index ead1cdc159c..00000000000 --- a/samples/client/petstore/typescript-angular-v2/with-interfaces/api/store.service.ts +++ /dev/null @@ -1,327 +0,0 @@ -/** - * 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. - * - * The version of the OpenAPI document: 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. - */ -/* tslint:disable:no-unused-variable member-ordering */ - -import { Inject, Injectable, Optional } from '@angular/core'; -import { Http, Headers, URLSearchParams, - RequestMethod, RequestOptions, RequestOptionsArgs, - Response, ResponseContentType, QueryEncoder } from '@angular/http'; -import { CustomQueryEncoderHelper } from '../encoder'; -import { Observable } from 'rxjs/Observable'; -import '../rxjs-operators'; - -import { Order } from '../model/models'; - -import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; -import { Configuration } from '../configuration'; -import { - StoreServiceInterface -} from './store.serviceInterface'; - - - -@Injectable() -export class StoreService implements StoreServiceInterface { - - protected basePath = 'http://petstore.swagger.io/v2'; - public defaultHeaders = new Headers(); - public configuration = new Configuration(); - public encoder: QueryEncoder; - - constructor(protected http: Http, @Optional()@Inject(BASE_PATH) basePath: string, @Optional() configuration: Configuration) { - if (configuration) { - this.configuration = configuration; - } - if (typeof this.configuration.basePath !== 'string') { - if (typeof basePath !== 'string') { - basePath = this.basePath; - } - this.configuration.basePath = basePath; - } - this.encoder = this.configuration.encoder || new CustomQueryEncoderHelper(); - } - - - /** - * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors - * @summary Delete purchase order by ID - - * @param orderId ID of the order that needs to be deleted - */ - public deleteOrder(orderId: string, extraHttpRequestParams?: RequestOptionsArgs): Observable<{}> { - return this.deleteOrderWithHttpInfo(orderId, extraHttpRequestParams) - .map((response: Response) => { - if (response.status === 204) { - return undefined; - } else { - return response.json() || {}; - } - }); - } - - /** - * Returns a map of status codes to quantities - * @summary Returns pet inventories by status - - */ - public getInventory(extraHttpRequestParams?: RequestOptionsArgs): Observable<{ [key: string]: number; }> { - return this.getInventoryWithHttpInfo(extraHttpRequestParams) - .map((response: Response) => { - if (response.status === 204) { - return undefined; - } else { - return response.json() || {}; - } - }); - } - - /** - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions - * @summary Find purchase order by ID - - * @param orderId ID of pet that needs to be fetched - */ - public getOrderById(orderId: number, extraHttpRequestParams?: RequestOptionsArgs): Observable { - return this.getOrderByIdWithHttpInfo(orderId, extraHttpRequestParams) - .map((response: Response) => { - if (response.status === 204) { - return undefined; - } else { - return response.json() || {}; - } - }); - } - - /** - * - * @summary Place an order for a pet - - * @param body order placed for purchasing the pet - */ - public placeOrder(body: Order, extraHttpRequestParams?: RequestOptionsArgs): Observable { - return this.placeOrderWithHttpInfo(body, extraHttpRequestParams) - .map((response: Response) => { - if (response.status === 204) { - return undefined; - } else { - return response.json() || {}; - } - }); - } - - - private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams { - if (typeof value === "object" && value instanceof Date === false) { - this.addToHttpParamsRecursive(httpParams, value); - } else { - this.addToHttpParamsRecursive(httpParams, value, key); - } - return httpParams; - } - - private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams { - if (value == null) { - return httpParams; - } - - if (typeof value === "object") { - if (Array.isArray(value)) { - (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); - } else if (value instanceof Date) { - if (key != null) { - httpParams.append(key, - (value as Date).toISOString().substr(0, 10)); - } else { - throw Error("key may not be null if value is Date"); - } - } else { - Object.keys(value).forEach( k => this.addToHttpParamsRecursive( - httpParams, value[k], key != null ? `${key}.${k}` : k)); - } - } else if (key != null) { - httpParams.append(key, value); - } else { - throw Error("key may not be null if value is not object or array"); - } - return httpParams; - } - - /** - * Delete purchase order by ID - * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors - * @param orderId ID of the order that needs to be deleted - */ - public deleteOrderWithHttpInfo(orderId: string, extraHttpRequestParams?: RequestOptionsArgs, options?: {httpHeaderAccept?: undefined}): Observable { - if (orderId === null || orderId === undefined) { - throw new Error('Required parameter orderId was null or undefined when calling deleteOrder.'); - } - - let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845 - - let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; - if (httpHeaderAcceptSelected === undefined) { - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - ]; - httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); - } - if (httpHeaderAcceptSelected !== undefined) { - headers.set('Accept', httpHeaderAcceptSelected); - } - - - let requestOptions: RequestOptionsArgs = new RequestOptions({ - method: RequestMethod.Delete, - headers: headers, - responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, - withCredentials:this.configuration.withCredentials - }); - // issues#4037 - if (extraHttpRequestParams) { - requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); - } - - return this.http.request(`${this.configuration.basePath}/store/order/${encodeURIComponent(String(orderId))}`, requestOptions); - } - - /** - * Returns pet inventories by status - * Returns a map of status codes to quantities - */ - public getInventoryWithHttpInfo(extraHttpRequestParams?: RequestOptionsArgs, options?: {httpHeaderAccept?: 'application/json'}): Observable { - - let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845 - - // authentication (api_key) required - if (this.configuration.apiKeys) { - const key: string | undefined = this.configuration.apiKeys["api_key"] || this.configuration.apiKeys["api_key"]; - if (key) { - headers.set('api_key', key); - } - } - - let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; - if (httpHeaderAcceptSelected === undefined) { - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); - } - if (httpHeaderAcceptSelected !== undefined) { - headers.set('Accept', httpHeaderAcceptSelected); - } - - - let requestOptions: RequestOptionsArgs = new RequestOptions({ - method: RequestMethod.Get, - headers: headers, - responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, - withCredentials:this.configuration.withCredentials - }); - // issues#4037 - if (extraHttpRequestParams) { - requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); - } - - return this.http.request(`${this.configuration.basePath}/store/inventory`, requestOptions); - } - - /** - * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions - * @param orderId ID of pet that needs to be fetched - */ - public getOrderByIdWithHttpInfo(orderId: number, extraHttpRequestParams?: RequestOptionsArgs, options?: {httpHeaderAccept?: 'application/xml' | 'application/json'}): Observable { - if (orderId === null || orderId === undefined) { - throw new Error('Required parameter orderId was null or undefined when calling getOrderById.'); - } - - let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845 - - let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; - if (httpHeaderAcceptSelected === undefined) { - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/xml', - 'application/json' - ]; - httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); - } - if (httpHeaderAcceptSelected !== undefined) { - headers.set('Accept', httpHeaderAcceptSelected); - } - - - let requestOptions: RequestOptionsArgs = new RequestOptions({ - method: RequestMethod.Get, - headers: headers, - responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, - withCredentials:this.configuration.withCredentials - }); - // issues#4037 - if (extraHttpRequestParams) { - requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); - } - - return this.http.request(`${this.configuration.basePath}/store/order/${encodeURIComponent(String(orderId))}`, requestOptions); - } - - /** - * Place an order for a pet - * @param body order placed for purchasing the pet - */ - public placeOrderWithHttpInfo(body: Order, extraHttpRequestParams?: RequestOptionsArgs, options?: {httpHeaderAccept?: 'application/xml' | 'application/json'}): Observable { - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling placeOrder.'); - } - - let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845 - - let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; - if (httpHeaderAcceptSelected === undefined) { - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/xml', - 'application/json' - ]; - httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); - } - if (httpHeaderAcceptSelected !== undefined) { - headers.set('Accept', httpHeaderAcceptSelected); - } - - - // to determine the Content-Type header - const consumes: string[] = [ - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers.set('Content-Type', httpContentTypeSelected); - } - - let requestOptions: RequestOptionsArgs = new RequestOptions({ - method: RequestMethod.Post, - headers: headers, - body: body == null ? '' : JSON.stringify(body), // https://github.com/angular/angular/issues/10612 - responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, - withCredentials:this.configuration.withCredentials - }); - // issues#4037 - if (extraHttpRequestParams) { - requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); - } - - return this.http.request(`${this.configuration.basePath}/store/order`, requestOptions); - } - -} diff --git a/samples/client/petstore/typescript-angular-v2/with-interfaces/api/store.serviceInterface.ts b/samples/client/petstore/typescript-angular-v2/with-interfaces/api/store.serviceInterface.ts deleted file mode 100644 index 07102421434..00000000000 --- a/samples/client/petstore/typescript-angular-v2/with-interfaces/api/store.serviceInterface.ts +++ /dev/null @@ -1,55 +0,0 @@ -/** - * 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. - * - * The version of the OpenAPI document: 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 { Headers } from '@angular/http'; - -import { Observable } from 'rxjs/Observable'; - -import { Order } from '../model/models'; - - -import { Configuration } from '../configuration'; - - - -export interface StoreServiceInterface { - defaultHeaders: Headers; - configuration: Configuration; - [others: string]: any; - - /** - * Delete purchase order by ID - * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors - * @param orderId ID of the order that needs to be deleted - */ - deleteOrder(orderId: string, extraHttpRequestParams?: any): Observable<{}>; - - /** - * Returns pet inventories by status - * Returns a map of status codes to quantities - */ - getInventory(extraHttpRequestParams?: any): Observable<{ [key: string]: number; }>; - - /** - * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions - * @param orderId ID of pet that needs to be fetched - */ - getOrderById(orderId: number, extraHttpRequestParams?: any): Observable; - - /** - * Place an order for a pet - * - * @param body order placed for purchasing the pet - */ - placeOrder(body: Order, extraHttpRequestParams?: any): Observable; - -} diff --git a/samples/client/petstore/typescript-angular-v2/with-interfaces/api/user.service.ts b/samples/client/petstore/typescript-angular-v2/with-interfaces/api/user.service.ts deleted file mode 100644 index 768b31b7f46..00000000000 --- a/samples/client/petstore/typescript-angular-v2/with-interfaces/api/user.service.ts +++ /dev/null @@ -1,582 +0,0 @@ -/** - * 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. - * - * The version of the OpenAPI document: 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. - */ -/* tslint:disable:no-unused-variable member-ordering */ - -import { Inject, Injectable, Optional } from '@angular/core'; -import { Http, Headers, URLSearchParams, - RequestMethod, RequestOptions, RequestOptionsArgs, - Response, ResponseContentType, QueryEncoder } from '@angular/http'; -import { CustomQueryEncoderHelper } from '../encoder'; -import { Observable } from 'rxjs/Observable'; -import '../rxjs-operators'; - -import { User } from '../model/models'; - -import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; -import { Configuration } from '../configuration'; -import { - UserServiceInterface -} from './user.serviceInterface'; - - - -@Injectable() -export class UserService implements UserServiceInterface { - - protected basePath = 'http://petstore.swagger.io/v2'; - public defaultHeaders = new Headers(); - public configuration = new Configuration(); - public encoder: QueryEncoder; - - constructor(protected http: Http, @Optional()@Inject(BASE_PATH) basePath: string, @Optional() configuration: Configuration) { - if (configuration) { - this.configuration = configuration; - } - if (typeof this.configuration.basePath !== 'string') { - if (typeof basePath !== 'string') { - basePath = this.basePath; - } - this.configuration.basePath = basePath; - } - this.encoder = this.configuration.encoder || new CustomQueryEncoderHelper(); - } - - - /** - * This can only be done by the logged in user. - * @summary Create user - - * @param body Created user object - */ - public createUser(body: User, extraHttpRequestParams?: RequestOptionsArgs): Observable<{}> { - return this.createUserWithHttpInfo(body, extraHttpRequestParams) - .map((response: Response) => { - if (response.status === 204) { - return undefined; - } else { - return response.json() || {}; - } - }); - } - - /** - * - * @summary Creates list of users with given input array - - * @param body List of user object - */ - public createUsersWithArrayInput(body: Array, extraHttpRequestParams?: RequestOptionsArgs): Observable<{}> { - return this.createUsersWithArrayInputWithHttpInfo(body, extraHttpRequestParams) - .map((response: Response) => { - if (response.status === 204) { - return undefined; - } else { - return response.json() || {}; - } - }); - } - - /** - * - * @summary Creates list of users with given input array - - * @param body List of user object - */ - public createUsersWithListInput(body: Array, extraHttpRequestParams?: RequestOptionsArgs): Observable<{}> { - return this.createUsersWithListInputWithHttpInfo(body, extraHttpRequestParams) - .map((response: Response) => { - if (response.status === 204) { - return undefined; - } else { - return response.json() || {}; - } - }); - } - - /** - * This can only be done by the logged in user. - * @summary Delete user - - * @param username The name that needs to be deleted - */ - public deleteUser(username: string, extraHttpRequestParams?: RequestOptionsArgs): Observable<{}> { - return this.deleteUserWithHttpInfo(username, extraHttpRequestParams) - .map((response: Response) => { - if (response.status === 204) { - return undefined; - } else { - return response.json() || {}; - } - }); - } - - /** - * - * @summary Get user by user name - - * @param username The name that needs to be fetched. Use user1 for testing. - */ - public getUserByName(username: string, extraHttpRequestParams?: RequestOptionsArgs): Observable { - return this.getUserByNameWithHttpInfo(username, extraHttpRequestParams) - .map((response: Response) => { - if (response.status === 204) { - return undefined; - } else { - return response.json() || {}; - } - }); - } - - /** - * - * @summary Logs user into the system - - * @param username The user name for login - * @param password The password for login in clear text - */ - public loginUser(username: string, password: string, extraHttpRequestParams?: RequestOptionsArgs): Observable { - return this.loginUserWithHttpInfo(username, password, extraHttpRequestParams) - .map((response: Response) => { - if (response.status === 204) { - return undefined; - } else { - return response.json() || {}; - } - }); - } - - /** - * - * @summary Logs out current logged in user session - - */ - public logoutUser(extraHttpRequestParams?: RequestOptionsArgs): Observable<{}> { - return this.logoutUserWithHttpInfo(extraHttpRequestParams) - .map((response: Response) => { - if (response.status === 204) { - return undefined; - } else { - return response.json() || {}; - } - }); - } - - /** - * This can only be done by the logged in user. - * @summary Updated user - - * @param username name that need to be deleted - * @param body Updated user object - */ - public updateUser(username: string, body: User, extraHttpRequestParams?: RequestOptionsArgs): Observable<{}> { - return this.updateUserWithHttpInfo(username, body, extraHttpRequestParams) - .map((response: Response) => { - if (response.status === 204) { - return undefined; - } else { - return response.json() || {}; - } - }); - } - - - private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams { - if (typeof value === "object" && value instanceof Date === false) { - this.addToHttpParamsRecursive(httpParams, value); - } else { - this.addToHttpParamsRecursive(httpParams, value, key); - } - return httpParams; - } - - private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams { - if (value == null) { - return httpParams; - } - - if (typeof value === "object") { - if (Array.isArray(value)) { - (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); - } else if (value instanceof Date) { - if (key != null) { - httpParams.append(key, - (value as Date).toISOString().substr(0, 10)); - } else { - throw Error("key may not be null if value is Date"); - } - } else { - Object.keys(value).forEach( k => this.addToHttpParamsRecursive( - httpParams, value[k], key != null ? `${key}.${k}` : k)); - } - } else if (key != null) { - httpParams.append(key, value); - } else { - throw Error("key may not be null if value is not object or array"); - } - return httpParams; - } - - /** - * Create user - * This can only be done by the logged in user. - * @param body Created user object - */ - public createUserWithHttpInfo(body: User, extraHttpRequestParams?: RequestOptionsArgs, options?: {httpHeaderAccept?: undefined}): Observable { - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling createUser.'); - } - - let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845 - - let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; - if (httpHeaderAcceptSelected === undefined) { - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - ]; - httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); - } - if (httpHeaderAcceptSelected !== undefined) { - headers.set('Accept', httpHeaderAcceptSelected); - } - - - // to determine the Content-Type header - const consumes: string[] = [ - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers.set('Content-Type', httpContentTypeSelected); - } - - let requestOptions: RequestOptionsArgs = new RequestOptions({ - method: RequestMethod.Post, - headers: headers, - body: body == null ? '' : JSON.stringify(body), // https://github.com/angular/angular/issues/10612 - responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, - withCredentials:this.configuration.withCredentials - }); - // issues#4037 - if (extraHttpRequestParams) { - requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); - } - - return this.http.request(`${this.configuration.basePath}/user`, requestOptions); - } - - /** - * Creates list of users with given input array - * @param body List of user object - */ - public createUsersWithArrayInputWithHttpInfo(body: Array, extraHttpRequestParams?: RequestOptionsArgs, options?: {httpHeaderAccept?: undefined}): Observable { - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling createUsersWithArrayInput.'); - } - - let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845 - - let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; - if (httpHeaderAcceptSelected === undefined) { - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - ]; - httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); - } - if (httpHeaderAcceptSelected !== undefined) { - headers.set('Accept', httpHeaderAcceptSelected); - } - - - // to determine the Content-Type header - const consumes: string[] = [ - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers.set('Content-Type', httpContentTypeSelected); - } - - let requestOptions: RequestOptionsArgs = new RequestOptions({ - method: RequestMethod.Post, - headers: headers, - body: body == null ? '' : JSON.stringify(body), // https://github.com/angular/angular/issues/10612 - responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, - withCredentials:this.configuration.withCredentials - }); - // issues#4037 - if (extraHttpRequestParams) { - requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); - } - - return this.http.request(`${this.configuration.basePath}/user/createWithArray`, requestOptions); - } - - /** - * Creates list of users with given input array - * @param body List of user object - */ - public createUsersWithListInputWithHttpInfo(body: Array, extraHttpRequestParams?: RequestOptionsArgs, options?: {httpHeaderAccept?: undefined}): Observable { - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling createUsersWithListInput.'); - } - - let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845 - - let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; - if (httpHeaderAcceptSelected === undefined) { - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - ]; - httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); - } - if (httpHeaderAcceptSelected !== undefined) { - headers.set('Accept', httpHeaderAcceptSelected); - } - - - // to determine the Content-Type header - const consumes: string[] = [ - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers.set('Content-Type', httpContentTypeSelected); - } - - let requestOptions: RequestOptionsArgs = new RequestOptions({ - method: RequestMethod.Post, - headers: headers, - body: body == null ? '' : JSON.stringify(body), // https://github.com/angular/angular/issues/10612 - responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, - withCredentials:this.configuration.withCredentials - }); - // issues#4037 - if (extraHttpRequestParams) { - requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); - } - - return this.http.request(`${this.configuration.basePath}/user/createWithList`, requestOptions); - } - - /** - * Delete user - * This can only be done by the logged in user. - * @param username The name that needs to be deleted - */ - public deleteUserWithHttpInfo(username: string, extraHttpRequestParams?: RequestOptionsArgs, options?: {httpHeaderAccept?: undefined}): Observable { - if (username === null || username === undefined) { - throw new Error('Required parameter username was null or undefined when calling deleteUser.'); - } - - let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845 - - let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; - if (httpHeaderAcceptSelected === undefined) { - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - ]; - httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); - } - if (httpHeaderAcceptSelected !== undefined) { - headers.set('Accept', httpHeaderAcceptSelected); - } - - - let requestOptions: RequestOptionsArgs = new RequestOptions({ - method: RequestMethod.Delete, - headers: headers, - responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, - withCredentials:this.configuration.withCredentials - }); - // issues#4037 - if (extraHttpRequestParams) { - requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); - } - - return this.http.request(`${this.configuration.basePath}/user/${encodeURIComponent(String(username))}`, requestOptions); - } - - /** - * Get user by user name - * @param username The name that needs to be fetched. Use user1 for testing. - */ - public getUserByNameWithHttpInfo(username: string, extraHttpRequestParams?: RequestOptionsArgs, options?: {httpHeaderAccept?: 'application/xml' | 'application/json'}): Observable { - if (username === null || username === undefined) { - throw new Error('Required parameter username was null or undefined when calling getUserByName.'); - } - - let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845 - - let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; - if (httpHeaderAcceptSelected === undefined) { - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/xml', - 'application/json' - ]; - httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); - } - if (httpHeaderAcceptSelected !== undefined) { - headers.set('Accept', httpHeaderAcceptSelected); - } - - - let requestOptions: RequestOptionsArgs = new RequestOptions({ - method: RequestMethod.Get, - headers: headers, - responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, - withCredentials:this.configuration.withCredentials - }); - // issues#4037 - if (extraHttpRequestParams) { - requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); - } - - return this.http.request(`${this.configuration.basePath}/user/${encodeURIComponent(String(username))}`, requestOptions); - } - - /** - * Logs user into the system - * @param username The user name for login - * @param password The password for login in clear text - */ - public loginUserWithHttpInfo(username: string, password: string, extraHttpRequestParams?: RequestOptionsArgs, options?: {httpHeaderAccept?: 'application/xml' | 'application/json'}): Observable { - if (username === null || username === undefined) { - throw new Error('Required parameter username was null or undefined when calling loginUser.'); - } - if (password === null || password === undefined) { - throw new Error('Required parameter password was null or undefined when calling loginUser.'); - } - - let queryParameters = new URLSearchParams('', this.encoder); - if (username !== undefined && username !== null) { - this.addToHttpParams(queryParameters, - username, 'username'); - } - if (password !== undefined && password !== null) { - this.addToHttpParams(queryParameters, - password, 'password'); - } - - let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845 - - let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; - if (httpHeaderAcceptSelected === undefined) { - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/xml', - 'application/json' - ]; - httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); - } - if (httpHeaderAcceptSelected !== undefined) { - headers.set('Accept', httpHeaderAcceptSelected); - } - - - let requestOptions: RequestOptionsArgs = new RequestOptions({ - method: RequestMethod.Get, - headers: headers, - responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, - search: queryParameters, - withCredentials:this.configuration.withCredentials - }); - // issues#4037 - if (extraHttpRequestParams) { - requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); - } - - return this.http.request(`${this.configuration.basePath}/user/login`, requestOptions); - } - - /** - * Logs out current logged in user session - */ - public logoutUserWithHttpInfo(extraHttpRequestParams?: RequestOptionsArgs, options?: {httpHeaderAccept?: undefined}): Observable { - - let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845 - - let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; - if (httpHeaderAcceptSelected === undefined) { - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - ]; - httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); - } - if (httpHeaderAcceptSelected !== undefined) { - headers.set('Accept', httpHeaderAcceptSelected); - } - - - let requestOptions: RequestOptionsArgs = new RequestOptions({ - method: RequestMethod.Get, - headers: headers, - responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, - withCredentials:this.configuration.withCredentials - }); - // issues#4037 - if (extraHttpRequestParams) { - requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); - } - - return this.http.request(`${this.configuration.basePath}/user/logout`, requestOptions); - } - - /** - * Updated user - * This can only be done by the logged in user. - * @param username name that need to be deleted - * @param body Updated user object - */ - public updateUserWithHttpInfo(username: string, body: User, extraHttpRequestParams?: RequestOptionsArgs, options?: {httpHeaderAccept?: undefined}): Observable { - if (username === null || username === undefined) { - throw new Error('Required parameter username was null or undefined when calling updateUser.'); - } - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling updateUser.'); - } - - let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845 - - let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; - if (httpHeaderAcceptSelected === undefined) { - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - ]; - httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); - } - if (httpHeaderAcceptSelected !== undefined) { - headers.set('Accept', httpHeaderAcceptSelected); - } - - - // to determine the Content-Type header - const consumes: string[] = [ - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers.set('Content-Type', httpContentTypeSelected); - } - - let requestOptions: RequestOptionsArgs = new RequestOptions({ - method: RequestMethod.Put, - headers: headers, - body: body == null ? '' : JSON.stringify(body), // https://github.com/angular/angular/issues/10612 - responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, - withCredentials:this.configuration.withCredentials - }); - // issues#4037 - if (extraHttpRequestParams) { - requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); - } - - return this.http.request(`${this.configuration.basePath}/user/${encodeURIComponent(String(username))}`, requestOptions); - } - -} diff --git a/samples/client/petstore/typescript-angular-v2/with-interfaces/api/user.serviceInterface.ts b/samples/client/petstore/typescript-angular-v2/with-interfaces/api/user.serviceInterface.ts deleted file mode 100644 index 4122dcaae40..00000000000 --- a/samples/client/petstore/typescript-angular-v2/with-interfaces/api/user.serviceInterface.ts +++ /dev/null @@ -1,85 +0,0 @@ -/** - * 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. - * - * The version of the OpenAPI document: 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 { Headers } from '@angular/http'; - -import { Observable } from 'rxjs/Observable'; - -import { User } from '../model/models'; - - -import { Configuration } from '../configuration'; - - - -export interface UserServiceInterface { - defaultHeaders: Headers; - configuration: Configuration; - [others: string]: any; - - /** - * Create user - * This can only be done by the logged in user. - * @param body Created user object - */ - createUser(body: User, extraHttpRequestParams?: any): Observable<{}>; - - /** - * Creates list of users with given input array - * - * @param body List of user object - */ - createUsersWithArrayInput(body: Array, extraHttpRequestParams?: any): Observable<{}>; - - /** - * Creates list of users with given input array - * - * @param body List of user object - */ - createUsersWithListInput(body: Array, extraHttpRequestParams?: any): Observable<{}>; - - /** - * Delete user - * This can only be done by the logged in user. - * @param username The name that needs to be deleted - */ - deleteUser(username: string, extraHttpRequestParams?: any): Observable<{}>; - - /** - * Get user by user name - * - * @param username The name that needs to be fetched. Use user1 for testing. - */ - getUserByName(username: string, extraHttpRequestParams?: any): Observable; - - /** - * Logs user into the system - * - * @param username The user name for login - * @param password The password for login in clear text - */ - loginUser(username: string, password: string, extraHttpRequestParams?: any): Observable; - - /** - * Logs out current logged in user session - * - */ - logoutUser(extraHttpRequestParams?: any): Observable<{}>; - - /** - * Updated user - * This can only be done by the logged in user. - * @param username name that need to be deleted - * @param body Updated user object - */ - updateUser(username: string, body: User, extraHttpRequestParams?: any): Observable<{}>; - -} diff --git a/samples/client/petstore/typescript-angular-v2/with-interfaces/configuration.ts b/samples/client/petstore/typescript-angular-v2/with-interfaces/configuration.ts deleted file mode 100644 index a442747dfc1..00000000000 --- a/samples/client/petstore/typescript-angular-v2/with-interfaces/configuration.ts +++ /dev/null @@ -1,84 +0,0 @@ -import { QueryEncoder } from '@angular/http'; - -export interface ConfigurationParameters { - apiKeys?: {[ key: string ]: string}; - username?: string; - password?: string; - accessToken?: string | (() => string); - basePath?: string; - withCredentials?: boolean; - encoder?: QueryEncoder; -} - -export class Configuration { - apiKeys?: {[ key: string ]: string}; - username?: string; - password?: string; - accessToken?: string | (() => string); - basePath?: string; - withCredentials?: boolean; - encoder?: QueryEncoder; - - constructor(configurationParameters: ConfigurationParameters = {}) { - this.apiKeys = configurationParameters.apiKeys; - this.username = configurationParameters.username; - this.password = configurationParameters.password; - this.accessToken = configurationParameters.accessToken; - this.basePath = configurationParameters.basePath; - this.withCredentials = configurationParameters.withCredentials; - this.encoder = configurationParameters.encoder; - } - - /** - * Select the correct content-type to use for a request. - * Uses {@link Configuration#isJsonMime} to determine the correct content-type. - * If no content type is found return the first found type if the contentTypes is not empty - * @param contentTypes - the array of content types that are available for selection - * @returns the selected content-type or undefined if no selection could be made. - */ - public selectHeaderContentType (contentTypes: string[]): string | undefined { - if (contentTypes.length === 0) { - return undefined; - } - - const type = contentTypes.find((x: string) => this.isJsonMime(x)); - if (type === undefined) { - return contentTypes[0]; - } - return type; - } - - /** - * Select the correct accept content-type to use for a request. - * Uses {@link Configuration#isJsonMime} to determine the correct accept content-type. - * If no content type is found return the first found type if the contentTypes is not empty - * @param accepts - the array of content types that are available for selection. - * @returns the selected content-type or undefined if no selection could be made. - */ - public selectHeaderAccept(accepts: string[]): string | undefined { - if (accepts.length === 0) { - return undefined; - } - - const type = accepts.find((x: string) => this.isJsonMime(x)); - if (type === undefined) { - return accepts[0]; - } - return type; - } - - /** - * Check if the given MIME is a JSON MIME. - * JSON MIME examples: - * application/json - * application/json; charset=UTF8 - * APPLICATION/JSON - * application/vnd.company+json - * @param mime - MIME (Multipurpose Internet Mail Extensions) - * @return True if the given MIME is JSON, false otherwise. - */ - public isJsonMime(mime: string): boolean { - const jsonMime: RegExp = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i'); - return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json'); - } -} diff --git a/samples/client/petstore/typescript-angular-v2/with-interfaces/encoder.ts b/samples/client/petstore/typescript-angular-v2/with-interfaces/encoder.ts deleted file mode 100644 index a0221503f9c..00000000000 --- a/samples/client/petstore/typescript-angular-v2/with-interfaces/encoder.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { QueryEncoder } from '@angular/http'; - -/** - * Custom QueryEncoder - * Fix plus sign (+) not encoding, so sent as blank space - * See: https://github.com/angular/angular/issues/11058#issuecomment-247367318 - */ -export class CustomQueryEncoderHelper extends QueryEncoder { - encodeKey(k: string): string { - k = super.encodeKey(k); - return k.replace(/\+/gi, '%2B'); - } - encodeValue(v: string): string { - v = super.encodeValue(v); - return v.replace(/\+/gi, '%2B'); - } -} - diff --git a/samples/client/petstore/typescript-angular-v2/with-interfaces/git_push.sh b/samples/client/petstore/typescript-angular-v2/with-interfaces/git_push.sh deleted file mode 100644 index ced3be2b0c7..00000000000 --- a/samples/client/petstore/typescript-angular-v2/with-interfaces/git_push.sh +++ /dev/null @@ -1,58 +0,0 @@ -#!/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 openapi-pestore-perl "minor update" "gitlab.com" - -git_user_id=$1 -git_repo_id=$2 -release_note=$3 -git_host=$4 - -if [ "$git_host" = "" ]; then - git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" -fi - -if [ "$git_user_id" = "" ]; then - git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" -fi - -if [ "$git_repo_id" = "" ]; then - git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" -fi - -if [ "$release_note" = "" ]; then - release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" -fi - -# Initialize the local directory as a Git repository -git init - -# Adds the files in the local repository and stages them for commit. -git add . - -# Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" - -# Sets the new remote -git_remote=`git remote` -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git - else - git remote add origin https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git - fi - -fi - -git pull origin master - -# Pushes (Forces) the changes in the local repository up to the remote repository -echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" -git push origin master 2>&1 | grep -v 'To https' - diff --git a/samples/client/petstore/typescript-angular-v2/with-interfaces/index.ts b/samples/client/petstore/typescript-angular-v2/with-interfaces/index.ts deleted file mode 100644 index c312b70fa3e..00000000000 --- a/samples/client/petstore/typescript-angular-v2/with-interfaces/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -export * from './api/api'; -export * from './model/models'; -export * from './variables'; -export * from './configuration'; -export * from './api.module'; \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v2/with-interfaces/model/apiResponse.ts b/samples/client/petstore/typescript-angular-v2/with-interfaces/model/apiResponse.ts deleted file mode 100644 index 682ba478921..00000000000 --- a/samples/client/petstore/typescript-angular-v2/with-interfaces/model/apiResponse.ts +++ /dev/null @@ -1,22 +0,0 @@ -/** - * 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. - * - * The version of the OpenAPI document: 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. - */ - - -/** - * Describes the result of uploading an image resource - */ -export interface ApiResponse { - code?: number; - type?: string; - message?: string; -} - diff --git a/samples/client/petstore/typescript-angular-v2/with-interfaces/model/category.ts b/samples/client/petstore/typescript-angular-v2/with-interfaces/model/category.ts deleted file mode 100644 index b988b6827a0..00000000000 --- a/samples/client/petstore/typescript-angular-v2/with-interfaces/model/category.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * 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. - * - * The version of the OpenAPI document: 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. - */ - - -/** - * A category for a pet - */ -export interface Category { - id?: number; - name?: string; -} - diff --git a/samples/client/petstore/typescript-angular-v2/with-interfaces/model/models.ts b/samples/client/petstore/typescript-angular-v2/with-interfaces/model/models.ts deleted file mode 100644 index 8607c5dabd0..00000000000 --- a/samples/client/petstore/typescript-angular-v2/with-interfaces/model/models.ts +++ /dev/null @@ -1,6 +0,0 @@ -export * from './apiResponse'; -export * from './category'; -export * from './order'; -export * from './pet'; -export * from './tag'; -export * from './user'; diff --git a/samples/client/petstore/typescript-angular-v2/with-interfaces/model/order.ts b/samples/client/petstore/typescript-angular-v2/with-interfaces/model/order.ts deleted file mode 100644 index a29bebe4906..00000000000 --- a/samples/client/petstore/typescript-angular-v2/with-interfaces/model/order.ts +++ /dev/null @@ -1,37 +0,0 @@ -/** - * 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. - * - * The version of the OpenAPI document: 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. - */ - - -/** - * An order for a pets from the pet store - */ -export interface Order { - id?: number; - petId?: number; - quantity?: number; - shipDate?: string; - /** - * Order Status - */ - status?: Order.StatusEnum; - complete?: boolean; -} -export namespace Order { - export type StatusEnum = 'placed' | 'approved' | 'delivered'; - export const StatusEnum = { - Placed: 'placed' as StatusEnum, - Approved: 'approved' as StatusEnum, - Delivered: 'delivered' as StatusEnum - }; -} - - diff --git a/samples/client/petstore/typescript-angular-v2/with-interfaces/model/pet.ts b/samples/client/petstore/typescript-angular-v2/with-interfaces/model/pet.ts deleted file mode 100644 index e0404395f91..00000000000 --- a/samples/client/petstore/typescript-angular-v2/with-interfaces/model/pet.ts +++ /dev/null @@ -1,39 +0,0 @@ -/** - * 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. - * - * The version of the OpenAPI document: 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 { Category } from './category'; -import { Tag } from './tag'; - - -/** - * A pet for sale in the pet store - */ -export interface Pet { - id?: number; - category?: Category; - name: string; - photoUrls: Array; - tags?: Array; - /** - * pet status in the store - */ - status?: Pet.StatusEnum; -} -export namespace Pet { - export type StatusEnum = 'available' | 'pending' | 'sold'; - export const StatusEnum = { - Available: 'available' as StatusEnum, - Pending: 'pending' as StatusEnum, - Sold: 'sold' as StatusEnum - }; -} - - diff --git a/samples/client/petstore/typescript-angular-v2/with-interfaces/model/tag.ts b/samples/client/petstore/typescript-angular-v2/with-interfaces/model/tag.ts deleted file mode 100644 index b6ff210e8df..00000000000 --- a/samples/client/petstore/typescript-angular-v2/with-interfaces/model/tag.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * 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. - * - * The version of the OpenAPI document: 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. - */ - - -/** - * A tag for a pet - */ -export interface Tag { - id?: number; - name?: string; -} - diff --git a/samples/client/petstore/typescript-angular-v2/with-interfaces/model/user.ts b/samples/client/petstore/typescript-angular-v2/with-interfaces/model/user.ts deleted file mode 100644 index fce51005300..00000000000 --- a/samples/client/petstore/typescript-angular-v2/with-interfaces/model/user.ts +++ /dev/null @@ -1,30 +0,0 @@ -/** - * 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. - * - * The version of the OpenAPI document: 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. - */ - - -/** - * A User who is purchasing from the pet store - */ -export interface User { - id?: number; - username?: string; - firstName?: string; - lastName?: string; - email?: string; - password?: string; - phone?: string; - /** - * User Status - */ - userStatus?: number; -} - diff --git a/samples/client/petstore/typescript-angular-v2/with-interfaces/rxjs-operators.ts b/samples/client/petstore/typescript-angular-v2/with-interfaces/rxjs-operators.ts deleted file mode 100644 index 5659cd0694f..00000000000 --- a/samples/client/petstore/typescript-angular-v2/with-interfaces/rxjs-operators.ts +++ /dev/null @@ -1,11 +0,0 @@ -// RxJS imports according to https://angular.io/docs/ts/latest/guide/server-communication.html#!#rxjs - -// See node_module/rxjs/Rxjs.js -// Import just the rxjs statics and operators we need for THIS app. - -// Statics -import 'rxjs/add/observable/throw'; - -// Operators -import 'rxjs/add/operator/catch'; -import 'rxjs/add/operator/map'; diff --git a/samples/client/petstore/typescript-angular-v2/with-interfaces/variables.ts b/samples/client/petstore/typescript-angular-v2/with-interfaces/variables.ts deleted file mode 100644 index 29b7e5b1d71..00000000000 --- a/samples/client/petstore/typescript-angular-v2/with-interfaces/variables.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { OpaqueToken } from '@angular/core'; - -export const BASE_PATH = new OpaqueToken('basePath'); -export const COLLECTION_FORMATS = { - 'csv': ',', - 'tsv': ' ', - 'ssv': ' ', - 'pipes': '|' -} diff --git a/samples/client/petstore/typescript-angular-v4.3/npm/.gitignore b/samples/client/petstore/typescript-angular-v4.3/npm/.gitignore deleted file mode 100644 index 149b5765472..00000000000 --- a/samples/client/petstore/typescript-angular-v4.3/npm/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -wwwroot/*.js -node_modules -typings -dist diff --git a/samples/client/petstore/typescript-angular-v4.3/npm/.openapi-generator-ignore b/samples/client/petstore/typescript-angular-v4.3/npm/.openapi-generator-ignore deleted file mode 100644 index 7484ee590a3..00000000000 --- a/samples/client/petstore/typescript-angular-v4.3/npm/.openapi-generator-ignore +++ /dev/null @@ -1,23 +0,0 @@ -# OpenAPI Generator Ignore -# Generated by openapi-generator https://github.com/openapitools/openapi-generator - -# Use this file to prevent files from being overwritten by the generator. -# The patterns follow closely to .gitignore or .dockerignore. - -# As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: -#ApiClient.cs - -# You can match any string of characters against a directory, file or extension with a single asterisk (*): -#foo/*/qux -# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux - -# You can recursively match patterns against a directory, file or extension with a double asterisk (**): -#foo/**/qux -# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux - -# You can also negate patterns with an exclamation (!). -# For example, you can ignore all files in a docs folder with the file extension .md: -#docs/*.md -# Then explicitly reverse the ignore rule for a single file: -#!docs/README.md diff --git a/samples/client/petstore/typescript-angular-v4.3/npm/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v4.3/npm/.openapi-generator/VERSION deleted file mode 100644 index d99e7162d01..00000000000 --- a/samples/client/petstore/typescript-angular-v4.3/npm/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -5.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v4.3/npm/README.md b/samples/client/petstore/typescript-angular-v4.3/npm/README.md deleted file mode 100644 index 336f6661565..00000000000 --- a/samples/client/petstore/typescript-angular-v4.3/npm/README.md +++ /dev/null @@ -1,205 +0,0 @@ -## @openapitools/angular2-typescript-petstore@0.0.1 - -### Building - -To install the required dependencies and to build the typescript sources run: -``` -npm install -npm run build -``` - -### publishing - -First build the package then run ```npm publish dist``` (don't forget to specify the `dist` folder!) - -### consuming - -Navigate to the folder of your consuming project and run one of next commands. - -_published:_ - -``` -npm install @openapitools/angular2-typescript-petstore@0.0.1 --save -``` - -_without publishing (not recommended):_ - -``` -npm install PATH_TO_GENERATED_PACKAGE/dist.tgz --save -``` - -_It's important to take the tgz file, otherwise you'll get trouble with links on windows_ - -_using `npm link`:_ - -In PATH_TO_GENERATED_PACKAGE/dist: -``` -npm link -``` - -In your project: -``` -npm link @openapitools/angular2-typescript-petstore -``` - -__Note for Windows users:__ The Angular CLI has troubles to use linked npm packages. -Please refer to this issue https://github.com/angular/angular-cli/issues/8284 for a solution / workaround. -Published packages are not effected by this issue. - - -#### General usage - -In your Angular project: - - -``` -// without configuring providers -import { ApiModule } from '@openapitools/angular2-typescript-petstore'; -import { HttpClientModule } from '@angular/common/http'; - - -@NgModule({ - imports: [ - ApiModule, - // make sure to import the HttpClientModule in the AppModule only, - // see https://github.com/angular/angular/issues/20575 - HttpClientModule - ], - declarations: [ AppComponent ], - providers: [], - bootstrap: [ AppComponent ] -}) -export class AppModule {} -``` - -``` -// configuring providers -import { ApiModule, Configuration, ConfigurationParameters } from '@openapitools/angular2-typescript-petstore'; - -export function apiConfigFactory (): Configuration => { - const params: ConfigurationParameters = { - // set configuration parameters here. - } - return new Configuration(params); -} - -@NgModule({ - imports: [ ApiModule.forRoot(apiConfigFactory) ], - declarations: [ AppComponent ], - providers: [], - bootstrap: [ AppComponent ] -}) -export class AppModule {} -``` - -``` -// configuring providers with an authentication service that manages your access tokens -import { ApiModule, Configuration } from '@openapitools/angular2-typescript-petstore'; - -@NgModule({ - imports: [ ApiModule ], - declarations: [ AppComponent ], - providers: [ - { - provide: Configuration, - useFactory: (authService: AuthService) => new Configuration( - { - basePath: environment.apiUrl, - accessToken: authService.getAccessToken.bind(authService) - } - ), - deps: [AuthService], - multi: false - } - ], - bootstrap: [ AppComponent ] -}) -export class AppModule {} -``` - -``` -import { DefaultApi } from '@openapitools/angular2-typescript-petstore'; - -export class AppComponent { - constructor(private apiGateway: DefaultApi) { } -} -``` - -Note: The ApiModule is restricted to being instantiated once app wide. -This is to ensure that all services are treated as singletons. - -#### Using multiple OpenAPI files / APIs / ApiModules -In order to use multiple `ApiModules` generated from different OpenAPI files, -you can create an alias name when importing the modules -in order to avoid naming conflicts: -``` -import { ApiModule } from 'my-api-path'; -import { ApiModule as OtherApiModule } from 'my-other-api-path'; -import { HttpClientModule } from '@angular/common/http'; - - -@NgModule({ - imports: [ - ApiModule, - OtherApiModule, - // make sure to import the HttpClientModule in the AppModule only, - // see https://github.com/angular/angular/issues/20575 - HttpClientModule - ] -}) -export class AppModule { - -} -``` - - -### Set service base path -If different than the generated base path, during app bootstrap, you can provide the base path to your service. - -``` -import { BASE_PATH } from '@openapitools/angular2-typescript-petstore'; - -bootstrap(AppComponent, [ - { provide: BASE_PATH, useValue: 'https://your-web-service.com' }, -]); -``` -or - -``` -import { BASE_PATH } from '@openapitools/angular2-typescript-petstore'; - -@NgModule({ - imports: [], - declarations: [ AppComponent ], - providers: [ provide: BASE_PATH, useValue: 'https://your-web-service.com' ], - bootstrap: [ AppComponent ] -}) -export class AppModule {} -``` - - -#### Using @angular/cli -First extend your `src/environments/*.ts` files by adding the corresponding base path: - -``` -export const environment = { - production: false, - API_BASE_PATH: 'http://127.0.0.1:8080' -}; -``` - -In the src/app/app.module.ts: -``` -import { BASE_PATH } from '@openapitools/angular2-typescript-petstore'; -import { environment } from '../environments/environment'; - -@NgModule({ - declarations: [ - AppComponent - ], - imports: [ ], - providers: [{ provide: BASE_PATH, useValue: environment.API_BASE_PATH }], - bootstrap: [ AppComponent ] -}) -export class AppModule { } -``` diff --git a/samples/client/petstore/typescript-angular-v4.3/npm/api.module.ts b/samples/client/petstore/typescript-angular-v4.3/npm/api.module.ts deleted file mode 100644 index 8487243a83b..00000000000 --- a/samples/client/petstore/typescript-angular-v4.3/npm/api.module.ts +++ /dev/null @@ -1,37 +0,0 @@ -import { NgModule, ModuleWithProviders, SkipSelf, Optional } from '@angular/core'; -import { Configuration } from './configuration'; -import { HttpClient } from '@angular/common/http'; - - -import { PetService } from './api/pet.service'; -import { StoreService } from './api/store.service'; -import { UserService } from './api/user.service'; - -@NgModule({ - imports: [], - declarations: [], - exports: [], - providers: [ - PetService, - StoreService, - UserService ] -}) -export class ApiModule { - public static forRoot(configurationFactory: () => Configuration): ModuleWithProviders { - return { - ngModule: ApiModule, - providers: [ { provide: Configuration, useFactory: configurationFactory } ] - }; - } - - constructor( @Optional() @SkipSelf() parentModule: ApiModule, - @Optional() http: HttpClient) { - if (parentModule) { - throw new Error('ApiModule is already loaded. Import in your base AppModule only.'); - } - if (!http) { - throw new Error('You need to import the HttpClientModule in your AppModule! \n' + - 'See also https://github.com/angular/angular/issues/20575'); - } - } -} diff --git a/samples/client/petstore/typescript-angular-v4.3/npm/api/api.ts b/samples/client/petstore/typescript-angular-v4.3/npm/api/api.ts deleted file mode 100644 index 8e44b64083d..00000000000 --- a/samples/client/petstore/typescript-angular-v4.3/npm/api/api.ts +++ /dev/null @@ -1,7 +0,0 @@ -export * from './pet.service'; -import { PetService } from './pet.service'; -export * from './store.service'; -import { StoreService } from './store.service'; -export * from './user.service'; -import { UserService } from './user.service'; -export const APIS = [PetService, StoreService, UserService]; diff --git a/samples/client/petstore/typescript-angular-v4.3/npm/api/pet.service.ts b/samples/client/petstore/typescript-angular-v4.3/npm/api/pet.service.ts deleted file mode 100644 index 8b42e025da4..00000000000 --- a/samples/client/petstore/typescript-angular-v4.3/npm/api/pet.service.ts +++ /dev/null @@ -1,619 +0,0 @@ -/** - * 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. - * - * The version of the OpenAPI document: 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. - */ -/* tslint:disable:no-unused-variable member-ordering */ - -import { Inject, Injectable, Optional } from '@angular/core'; -import { HttpClient, HttpHeaders, HttpParams, - HttpResponse, HttpEvent, HttpParameterCodec } from '@angular/common/http'; -import { CustomHttpParameterCodec } from '../encoder'; -import { Observable } from 'rxjs/Observable'; - -import { ApiResponse } from '../model/models'; -import { Pet } from '../model/models'; - -import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; -import { Configuration } from '../configuration'; - - - -@Injectable() -export class PetService { - - protected basePath = 'http://petstore.swagger.io/v2'; - public defaultHeaders = new HttpHeaders(); - public configuration = new Configuration(); - public encoder: HttpParameterCodec; - - constructor(protected httpClient: HttpClient, @Optional()@Inject(BASE_PATH) basePath: string, @Optional() configuration: Configuration) { - if (configuration) { - this.configuration = configuration; - } - if (typeof this.configuration.basePath !== 'string') { - if (typeof basePath !== 'string') { - basePath = this.basePath; - } - this.configuration.basePath = basePath; - } - this.encoder = this.configuration.encoder || new CustomHttpParameterCodec(); - } - - /** - * @param consumes string[] mime-types - * @return true: consumes contains 'multipart/form-data', false: otherwise - */ - private canConsumeForm(consumes: string[]): boolean { - const form = 'multipart/form-data'; - for (const consume of consumes) { - if (form === consume) { - return true; - } - } - return false; - } - - - private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams { - if (typeof value === "object" && value instanceof Date === false) { - httpParams = this.addToHttpParamsRecursive(httpParams, value); - } else { - httpParams = this.addToHttpParamsRecursive(httpParams, value, key); - } - return httpParams; - } - - private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams { - if (value == null) { - return httpParams; - } - - if (typeof value === "object") { - if (Array.isArray(value)) { - (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); - } else if (value instanceof Date) { - if (key != null) { - httpParams = httpParams.append(key, - (value as Date).toISOString().substr(0, 10)); - } else { - throw Error("key may not be null if value is Date"); - } - } else { - Object.keys(value).forEach( k => httpParams = this.addToHttpParamsRecursive( - httpParams, value[k], key != null ? `${key}.${k}` : k)); - } - } else if (key != null) { - httpParams = httpParams.append(key, value); - } else { - throw Error("key may not be null if value is not object or array"); - } - return httpParams; - } - - /** - * Add a new pet to the store - * @param body Pet object that needs to be added to the store - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public addPet(body: Pet, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined}): Observable; - public addPet(body: Pet, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined}): Observable>; - public addPet(body: Pet, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined}): Observable>; - public addPet(body: Pet, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined}): Observable { - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling addPet.'); - } - - let headers = this.defaultHeaders; - - // authentication (petstore_auth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - - let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; - if (httpHeaderAcceptSelected === undefined) { - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - ]; - httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); - } - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - // to determine the Content-Type header - const consumes: string[] = [ - 'application/json', - 'application/xml' - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - let responseType: 'text' | 'json' = 'json'; - if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { - responseType = 'text'; - } - - return this.httpClient.post(`${this.configuration.basePath}/pet`, - body, - { - responseType: responseType, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Deletes a pet - * @param petId Pet id to delete - * @param apiKey - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public deletePet(petId: number, apiKey?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined}): Observable; - public deletePet(petId: number, apiKey?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined}): Observable>; - public deletePet(petId: number, apiKey?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined}): Observable>; - public deletePet(petId: number, apiKey?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined}): Observable { - if (petId === null || petId === undefined) { - throw new Error('Required parameter petId was null or undefined when calling deletePet.'); - } - - let headers = this.defaultHeaders; - if (apiKey !== undefined && apiKey !== null) { - headers = headers.set('api_key', String(apiKey)); - } - - // authentication (petstore_auth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - - let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; - if (httpHeaderAcceptSelected === undefined) { - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - ]; - httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); - } - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - let responseType: 'text' | 'json' = 'json'; - if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { - responseType = 'text'; - } - - return this.httpClient.delete(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}`, - { - responseType: responseType, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * 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 - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json'}): Observable>; - public findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json'}): Observable>>; - public findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json'}): Observable>>; - public findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/xml' | 'application/json'}): Observable { - if (status === null || status === undefined) { - throw new Error('Required parameter status was null or undefined when calling findPetsByStatus.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (status) { - queryParameters = this.addToHttpParams(queryParameters, - status.join(COLLECTION_FORMATS['csv']), 'status'); - } - - let headers = this.defaultHeaders; - - // authentication (petstore_auth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - - let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; - if (httpHeaderAcceptSelected === undefined) { - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/xml', - 'application/json' - ]; - httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); - } - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - let responseType: 'text' | 'json' = 'json'; - if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { - responseType = 'text'; - } - - return this.httpClient.get>(`${this.configuration.basePath}/pet/findByStatus`, - { - params: queryParameters, - responseType: responseType, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * 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 - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public findPetsByTags(tags: Array, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json'}): Observable>; - public findPetsByTags(tags: Array, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json'}): Observable>>; - public findPetsByTags(tags: Array, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json'}): Observable>>; - public findPetsByTags(tags: Array, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/xml' | 'application/json'}): Observable { - if (tags === null || tags === undefined) { - throw new Error('Required parameter tags was null or undefined when calling findPetsByTags.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (tags) { - queryParameters = this.addToHttpParams(queryParameters, - tags.join(COLLECTION_FORMATS['csv']), 'tags'); - } - - let headers = this.defaultHeaders; - - // authentication (petstore_auth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - - let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; - if (httpHeaderAcceptSelected === undefined) { - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/xml', - 'application/json' - ]; - httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); - } - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - let responseType: 'text' | 'json' = 'json'; - if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { - responseType = 'text'; - } - - return this.httpClient.get>(`${this.configuration.basePath}/pet/findByTags`, - { - params: queryParameters, - responseType: responseType, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Find pet by ID - * Returns a single pet - * @param petId ID of pet to return - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getPetById(petId: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json'}): Observable; - public getPetById(petId: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json'}): Observable>; - public getPetById(petId: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json'}): Observable>; - public getPetById(petId: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/xml' | 'application/json'}): Observable { - if (petId === null || petId === undefined) { - throw new Error('Required parameter petId was null or undefined when calling getPetById.'); - } - - let headers = this.defaultHeaders; - - // authentication (api_key) required - if (this.configuration.apiKeys) { - const key: string | undefined = this.configuration.apiKeys["api_key"] || this.configuration.apiKeys["api_key"]; - if (key) { - headers = headers.set('api_key', key); - } - } - - let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; - if (httpHeaderAcceptSelected === undefined) { - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/xml', - 'application/json' - ]; - httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); - } - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - let responseType: 'text' | 'json' = 'json'; - if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { - responseType = 'text'; - } - - return this.httpClient.get(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}`, - { - responseType: responseType, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Update an existing pet - * @param body Pet object that needs to be added to the store - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public updatePet(body: Pet, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined}): Observable; - public updatePet(body: Pet, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined}): Observable>; - public updatePet(body: Pet, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined}): Observable>; - public updatePet(body: Pet, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined}): Observable { - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling updatePet.'); - } - - let headers = this.defaultHeaders; - - // authentication (petstore_auth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - - let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; - if (httpHeaderAcceptSelected === undefined) { - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - ]; - httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); - } - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - // to determine the Content-Type header - const consumes: string[] = [ - 'application/json', - 'application/xml' - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - let responseType: 'text' | 'json' = 'json'; - if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { - responseType = 'text'; - } - - return this.httpClient.put(`${this.configuration.basePath}/pet`, - body, - { - responseType: responseType, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Updates a pet in the store with form data - * @param petId ID of pet that needs to be updated - * @param name Updated name of the pet - * @param status Updated status of the pet - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public updatePetWithForm(petId: number, name?: string, status?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined}): Observable; - public updatePetWithForm(petId: number, name?: string, status?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined}): Observable>; - public updatePetWithForm(petId: number, name?: string, status?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined}): Observable>; - public updatePetWithForm(petId: number, name?: string, status?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined}): Observable { - if (petId === null || petId === undefined) { - throw new Error('Required parameter petId was null or undefined when calling updatePetWithForm.'); - } - - let headers = this.defaultHeaders; - - // authentication (petstore_auth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - - let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; - if (httpHeaderAcceptSelected === undefined) { - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - ]; - httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); - } - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - // to determine the Content-Type header - const consumes: string[] = [ - 'application/x-www-form-urlencoded' - ]; - - const canConsumeForm = this.canConsumeForm(consumes); - - let formParams: { append(param: string, value: any): any; }; - let useForm = false; - let convertFormParamsToString = false; - if (useForm) { - formParams = new FormData(); - } else { - formParams = new HttpParams({encoder: this.encoder}); - } - - if (name !== undefined) { - formParams = formParams.append('name', name) as any || formParams; - } - if (status !== undefined) { - formParams = formParams.append('status', status) as any || formParams; - } - - let responseType: 'text' | 'json' = 'json'; - if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { - responseType = 'text'; - } - - return this.httpClient.post(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}`, - convertFormParamsToString ? formParams.toString() : formParams, - { - responseType: responseType, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * uploads an image - * @param petId ID of pet to update - * @param additionalMetadata Additional data to pass to server - * @param file file to upload - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public uploadFile(petId: number, additionalMetadata?: string, file?: Blob, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable; - public uploadFile(petId: number, additionalMetadata?: string, file?: Blob, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable>; - public uploadFile(petId: number, additionalMetadata?: string, file?: Blob, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable>; - public uploadFile(petId: number, additionalMetadata?: string, file?: Blob, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable { - if (petId === null || petId === undefined) { - throw new Error('Required parameter petId was null or undefined when calling uploadFile.'); - } - - let headers = this.defaultHeaders; - - // authentication (petstore_auth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - - let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; - if (httpHeaderAcceptSelected === undefined) { - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); - } - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - // to determine the Content-Type header - const consumes: string[] = [ - 'multipart/form-data' - ]; - - const canConsumeForm = this.canConsumeForm(consumes); - - let formParams: { append(param: string, value: any): any; }; - let useForm = false; - let convertFormParamsToString = false; - // use FormData to transmit files using content-type "multipart/form-data" - // see https://stackoverflow.com/questions/4007969/application-x-www-form-urlencoded-or-multipart-form-data - useForm = canConsumeForm; - if (useForm) { - formParams = new FormData(); - } else { - formParams = new HttpParams({encoder: this.encoder}); - } - - if (additionalMetadata !== undefined) { - formParams = formParams.append('additionalMetadata', additionalMetadata) as any || formParams; - } - if (file !== undefined) { - formParams = formParams.append('file', file) as any || formParams; - } - - let responseType: 'text' | 'json' = 'json'; - if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { - responseType = 'text'; - } - - return this.httpClient.post(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}/uploadImage`, - convertFormParamsToString ? formParams.toString() : formParams, - { - responseType: responseType, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - -} diff --git a/samples/client/petstore/typescript-angular-v4.3/npm/api/store.service.ts b/samples/client/petstore/typescript-angular-v4.3/npm/api/store.service.ts deleted file mode 100644 index 2b7f36b3d93..00000000000 --- a/samples/client/petstore/typescript-angular-v4.3/npm/api/store.service.ts +++ /dev/null @@ -1,283 +0,0 @@ -/** - * 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. - * - * The version of the OpenAPI document: 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. - */ -/* tslint:disable:no-unused-variable member-ordering */ - -import { Inject, Injectable, Optional } from '@angular/core'; -import { HttpClient, HttpHeaders, HttpParams, - HttpResponse, HttpEvent, HttpParameterCodec } from '@angular/common/http'; -import { CustomHttpParameterCodec } from '../encoder'; -import { Observable } from 'rxjs/Observable'; - -import { Order } from '../model/models'; - -import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; -import { Configuration } from '../configuration'; - - - -@Injectable() -export class StoreService { - - protected basePath = 'http://petstore.swagger.io/v2'; - public defaultHeaders = new HttpHeaders(); - public configuration = new Configuration(); - public encoder: HttpParameterCodec; - - constructor(protected httpClient: HttpClient, @Optional()@Inject(BASE_PATH) basePath: string, @Optional() configuration: Configuration) { - if (configuration) { - this.configuration = configuration; - } - if (typeof this.configuration.basePath !== 'string') { - if (typeof basePath !== 'string') { - basePath = this.basePath; - } - this.configuration.basePath = basePath; - } - this.encoder = this.configuration.encoder || new CustomHttpParameterCodec(); - } - - - - private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams { - if (typeof value === "object" && value instanceof Date === false) { - httpParams = this.addToHttpParamsRecursive(httpParams, value); - } else { - httpParams = this.addToHttpParamsRecursive(httpParams, value, key); - } - return httpParams; - } - - private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams { - if (value == null) { - return httpParams; - } - - if (typeof value === "object") { - if (Array.isArray(value)) { - (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); - } else if (value instanceof Date) { - if (key != null) { - httpParams = httpParams.append(key, - (value as Date).toISOString().substr(0, 10)); - } else { - throw Error("key may not be null if value is Date"); - } - } else { - Object.keys(value).forEach( k => httpParams = this.addToHttpParamsRecursive( - httpParams, value[k], key != null ? `${key}.${k}` : k)); - } - } else if (key != null) { - httpParams = httpParams.append(key, value); - } else { - throw Error("key may not be null if value is not object or array"); - } - return httpParams; - } - - /** - * Delete purchase order by ID - * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors - * @param orderId ID of the order that needs to be deleted - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public deleteOrder(orderId: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined}): Observable; - public deleteOrder(orderId: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined}): Observable>; - public deleteOrder(orderId: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined}): Observable>; - public deleteOrder(orderId: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined}): Observable { - if (orderId === null || orderId === undefined) { - throw new Error('Required parameter orderId was null or undefined when calling deleteOrder.'); - } - - let headers = this.defaultHeaders; - - let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; - if (httpHeaderAcceptSelected === undefined) { - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - ]; - httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); - } - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - let responseType: 'text' | 'json' = 'json'; - if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { - responseType = 'text'; - } - - return this.httpClient.delete(`${this.configuration.basePath}/store/order/${encodeURIComponent(String(orderId))}`, - { - responseType: responseType, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Returns pet inventories by status - * Returns a map of status codes to quantities - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getInventory(observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<{ [key: string]: number; }>; - public getInventory(observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable>; - public getInventory(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable>; - public getInventory(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable { - - let headers = this.defaultHeaders; - - // authentication (api_key) required - if (this.configuration.apiKeys) { - const key: string | undefined = this.configuration.apiKeys["api_key"] || this.configuration.apiKeys["api_key"]; - if (key) { - headers = headers.set('api_key', key); - } - } - - let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; - if (httpHeaderAcceptSelected === undefined) { - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); - } - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - let responseType: 'text' | 'json' = 'json'; - if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { - responseType = 'text'; - } - - return this.httpClient.get<{ [key: string]: number; }>(`${this.configuration.basePath}/store/inventory`, - { - responseType: responseType, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions - * @param orderId ID of pet that needs to be fetched - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getOrderById(orderId: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json'}): Observable; - public getOrderById(orderId: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json'}): Observable>; - public getOrderById(orderId: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json'}): Observable>; - public getOrderById(orderId: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/xml' | 'application/json'}): Observable { - if (orderId === null || orderId === undefined) { - throw new Error('Required parameter orderId was null or undefined when calling getOrderById.'); - } - - let headers = this.defaultHeaders; - - let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; - if (httpHeaderAcceptSelected === undefined) { - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/xml', - 'application/json' - ]; - httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); - } - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - let responseType: 'text' | 'json' = 'json'; - if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { - responseType = 'text'; - } - - return this.httpClient.get(`${this.configuration.basePath}/store/order/${encodeURIComponent(String(orderId))}`, - { - responseType: responseType, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Place an order for a pet - * @param body order placed for purchasing the pet - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public placeOrder(body: Order, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json'}): Observable; - public placeOrder(body: Order, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json'}): Observable>; - public placeOrder(body: Order, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json'}): Observable>; - public placeOrder(body: Order, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/xml' | 'application/json'}): Observable { - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling placeOrder.'); - } - - let headers = this.defaultHeaders; - - let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; - if (httpHeaderAcceptSelected === undefined) { - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/xml', - 'application/json' - ]; - httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); - } - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - // to determine the Content-Type header - const consumes: string[] = [ - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - let responseType: 'text' | 'json' = 'json'; - if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { - responseType = 'text'; - } - - return this.httpClient.post(`${this.configuration.basePath}/store/order`, - body, - { - responseType: responseType, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - -} diff --git a/samples/client/petstore/typescript-angular-v4.3/npm/api/user.service.ts b/samples/client/petstore/typescript-angular-v4.3/npm/api/user.service.ts deleted file mode 100644 index a804d609ba2..00000000000 --- a/samples/client/petstore/typescript-angular-v4.3/npm/api/user.service.ts +++ /dev/null @@ -1,496 +0,0 @@ -/** - * 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. - * - * The version of the OpenAPI document: 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. - */ -/* tslint:disable:no-unused-variable member-ordering */ - -import { Inject, Injectable, Optional } from '@angular/core'; -import { HttpClient, HttpHeaders, HttpParams, - HttpResponse, HttpEvent, HttpParameterCodec } from '@angular/common/http'; -import { CustomHttpParameterCodec } from '../encoder'; -import { Observable } from 'rxjs/Observable'; - -import { User } from '../model/models'; - -import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; -import { Configuration } from '../configuration'; - - - -@Injectable() -export class UserService { - - protected basePath = 'http://petstore.swagger.io/v2'; - public defaultHeaders = new HttpHeaders(); - public configuration = new Configuration(); - public encoder: HttpParameterCodec; - - constructor(protected httpClient: HttpClient, @Optional()@Inject(BASE_PATH) basePath: string, @Optional() configuration: Configuration) { - if (configuration) { - this.configuration = configuration; - } - if (typeof this.configuration.basePath !== 'string') { - if (typeof basePath !== 'string') { - basePath = this.basePath; - } - this.configuration.basePath = basePath; - } - this.encoder = this.configuration.encoder || new CustomHttpParameterCodec(); - } - - - - private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams { - if (typeof value === "object" && value instanceof Date === false) { - httpParams = this.addToHttpParamsRecursive(httpParams, value); - } else { - httpParams = this.addToHttpParamsRecursive(httpParams, value, key); - } - return httpParams; - } - - private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams { - if (value == null) { - return httpParams; - } - - if (typeof value === "object") { - if (Array.isArray(value)) { - (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); - } else if (value instanceof Date) { - if (key != null) { - httpParams = httpParams.append(key, - (value as Date).toISOString().substr(0, 10)); - } else { - throw Error("key may not be null if value is Date"); - } - } else { - Object.keys(value).forEach( k => httpParams = this.addToHttpParamsRecursive( - httpParams, value[k], key != null ? `${key}.${k}` : k)); - } - } else if (key != null) { - httpParams = httpParams.append(key, value); - } else { - throw Error("key may not be null if value is not object or array"); - } - return httpParams; - } - - /** - * Create user - * This can only be done by the logged in user. - * @param body Created user object - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public createUser(body: User, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined}): Observable; - public createUser(body: User, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined}): Observable>; - public createUser(body: User, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined}): Observable>; - public createUser(body: User, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined}): Observable { - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling createUser.'); - } - - let headers = this.defaultHeaders; - - let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; - if (httpHeaderAcceptSelected === undefined) { - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - ]; - httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); - } - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - // to determine the Content-Type header - const consumes: string[] = [ - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - let responseType: 'text' | 'json' = 'json'; - if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { - responseType = 'text'; - } - - return this.httpClient.post(`${this.configuration.basePath}/user`, - body, - { - responseType: responseType, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Creates list of users with given input array - * @param body List of user object - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public createUsersWithArrayInput(body: Array, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined}): Observable; - public createUsersWithArrayInput(body: Array, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined}): Observable>; - public createUsersWithArrayInput(body: Array, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined}): Observable>; - public createUsersWithArrayInput(body: Array, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined}): Observable { - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling createUsersWithArrayInput.'); - } - - let headers = this.defaultHeaders; - - let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; - if (httpHeaderAcceptSelected === undefined) { - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - ]; - httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); - } - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - // to determine the Content-Type header - const consumes: string[] = [ - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - let responseType: 'text' | 'json' = 'json'; - if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { - responseType = 'text'; - } - - return this.httpClient.post(`${this.configuration.basePath}/user/createWithArray`, - body, - { - responseType: responseType, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Creates list of users with given input array - * @param body List of user object - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public createUsersWithListInput(body: Array, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined}): Observable; - public createUsersWithListInput(body: Array, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined}): Observable>; - public createUsersWithListInput(body: Array, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined}): Observable>; - public createUsersWithListInput(body: Array, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined}): Observable { - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling createUsersWithListInput.'); - } - - let headers = this.defaultHeaders; - - let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; - if (httpHeaderAcceptSelected === undefined) { - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - ]; - httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); - } - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - // to determine the Content-Type header - const consumes: string[] = [ - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - let responseType: 'text' | 'json' = 'json'; - if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { - responseType = 'text'; - } - - return this.httpClient.post(`${this.configuration.basePath}/user/createWithList`, - body, - { - responseType: responseType, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Delete user - * This can only be done by the logged in user. - * @param username The name that needs to be deleted - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public deleteUser(username: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined}): Observable; - public deleteUser(username: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined}): Observable>; - public deleteUser(username: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined}): Observable>; - public deleteUser(username: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined}): Observable { - if (username === null || username === undefined) { - throw new Error('Required parameter username was null or undefined when calling deleteUser.'); - } - - let headers = this.defaultHeaders; - - let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; - if (httpHeaderAcceptSelected === undefined) { - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - ]; - httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); - } - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - let responseType: 'text' | 'json' = 'json'; - if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { - responseType = 'text'; - } - - return this.httpClient.delete(`${this.configuration.basePath}/user/${encodeURIComponent(String(username))}`, - { - responseType: responseType, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Get user by user name - * @param username The name that needs to be fetched. Use user1 for testing. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getUserByName(username: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json'}): Observable; - public getUserByName(username: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json'}): Observable>; - public getUserByName(username: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json'}): Observable>; - public getUserByName(username: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/xml' | 'application/json'}): Observable { - if (username === null || username === undefined) { - throw new Error('Required parameter username was null or undefined when calling getUserByName.'); - } - - let headers = this.defaultHeaders; - - let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; - if (httpHeaderAcceptSelected === undefined) { - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/xml', - 'application/json' - ]; - httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); - } - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - let responseType: 'text' | 'json' = 'json'; - if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { - responseType = 'text'; - } - - return this.httpClient.get(`${this.configuration.basePath}/user/${encodeURIComponent(String(username))}`, - { - responseType: responseType, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Logs user into the system - * @param username The user name for login - * @param password The password for login in clear text - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public loginUser(username: string, password: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json'}): Observable; - public loginUser(username: string, password: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json'}): Observable>; - public loginUser(username: string, password: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json'}): Observable>; - public loginUser(username: string, password: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/xml' | 'application/json'}): Observable { - if (username === null || username === undefined) { - throw new Error('Required parameter username was null or undefined when calling loginUser.'); - } - if (password === null || password === undefined) { - throw new Error('Required parameter password was null or undefined when calling loginUser.'); - } - - let queryParameters = new HttpParams({encoder: this.encoder}); - if (username !== undefined && username !== null) { - queryParameters = this.addToHttpParams(queryParameters, - username, 'username'); - } - if (password !== undefined && password !== null) { - queryParameters = this.addToHttpParams(queryParameters, - password, 'password'); - } - - let headers = this.defaultHeaders; - - let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; - if (httpHeaderAcceptSelected === undefined) { - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/xml', - 'application/json' - ]; - httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); - } - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - let responseType: 'text' | 'json' = 'json'; - if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { - responseType = 'text'; - } - - return this.httpClient.get(`${this.configuration.basePath}/user/login`, - { - params: queryParameters, - responseType: responseType, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Logs out current logged in user session - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public logoutUser(observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined}): Observable; - public logoutUser(observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined}): Observable>; - public logoutUser(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined}): Observable>; - public logoutUser(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined}): Observable { - - let headers = this.defaultHeaders; - - let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; - if (httpHeaderAcceptSelected === undefined) { - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - ]; - httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); - } - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - let responseType: 'text' | 'json' = 'json'; - if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { - responseType = 'text'; - } - - return this.httpClient.get(`${this.configuration.basePath}/user/logout`, - { - responseType: responseType, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Updated user - * This can only be done by the logged in user. - * @param username name that need to be deleted - * @param body Updated user object - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public updateUser(username: string, body: User, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined}): Observable; - public updateUser(username: string, body: User, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined}): Observable>; - public updateUser(username: string, body: User, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined}): Observable>; - public updateUser(username: string, body: User, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined}): Observable { - if (username === null || username === undefined) { - throw new Error('Required parameter username was null or undefined when calling updateUser.'); - } - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling updateUser.'); - } - - let headers = this.defaultHeaders; - - let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; - if (httpHeaderAcceptSelected === undefined) { - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - ]; - httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); - } - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - - // to determine the Content-Type header - const consumes: string[] = [ - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - let responseType: 'text' | 'json' = 'json'; - if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { - responseType = 'text'; - } - - return this.httpClient.put(`${this.configuration.basePath}/user/${encodeURIComponent(String(username))}`, - body, - { - responseType: responseType, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - -} diff --git a/samples/client/petstore/typescript-angular-v4.3/npm/configuration.ts b/samples/client/petstore/typescript-angular-v4.3/npm/configuration.ts deleted file mode 100644 index c038bbc9478..00000000000 --- a/samples/client/petstore/typescript-angular-v4.3/npm/configuration.ts +++ /dev/null @@ -1,84 +0,0 @@ -import { HttpParameterCodec } from '@angular/common/http'; - -export interface ConfigurationParameters { - apiKeys?: {[ key: string ]: string}; - username?: string; - password?: string; - accessToken?: string | (() => string); - basePath?: string; - withCredentials?: boolean; - encoder?: HttpParameterCodec; -} - -export class Configuration { - apiKeys?: {[ key: string ]: string}; - username?: string; - password?: string; - accessToken?: string | (() => string); - basePath?: string; - withCredentials?: boolean; - encoder?: HttpParameterCodec; - - constructor(configurationParameters: ConfigurationParameters = {}) { - this.apiKeys = configurationParameters.apiKeys; - this.username = configurationParameters.username; - this.password = configurationParameters.password; - this.accessToken = configurationParameters.accessToken; - this.basePath = configurationParameters.basePath; - this.withCredentials = configurationParameters.withCredentials; - this.encoder = configurationParameters.encoder; - } - - /** - * Select the correct content-type to use for a request. - * Uses {@link Configuration#isJsonMime} to determine the correct content-type. - * If no content type is found return the first found type if the contentTypes is not empty - * @param contentTypes - the array of content types that are available for selection - * @returns the selected content-type or undefined if no selection could be made. - */ - public selectHeaderContentType (contentTypes: string[]): string | undefined { - if (contentTypes.length === 0) { - return undefined; - } - - const type = contentTypes.find((x: string) => this.isJsonMime(x)); - if (type === undefined) { - return contentTypes[0]; - } - return type; - } - - /** - * Select the correct accept content-type to use for a request. - * Uses {@link Configuration#isJsonMime} to determine the correct accept content-type. - * If no content type is found return the first found type if the contentTypes is not empty - * @param accepts - the array of content types that are available for selection. - * @returns the selected content-type or undefined if no selection could be made. - */ - public selectHeaderAccept(accepts: string[]): string | undefined { - if (accepts.length === 0) { - return undefined; - } - - const type = accepts.find((x: string) => this.isJsonMime(x)); - if (type === undefined) { - return accepts[0]; - } - return type; - } - - /** - * Check if the given MIME is a JSON MIME. - * JSON MIME examples: - * application/json - * application/json; charset=UTF8 - * APPLICATION/JSON - * application/vnd.company+json - * @param mime - MIME (Multipurpose Internet Mail Extensions) - * @return True if the given MIME is JSON, false otherwise. - */ - public isJsonMime(mime: string): boolean { - const jsonMime: RegExp = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i'); - return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json'); - } -} diff --git a/samples/client/petstore/typescript-angular-v4.3/npm/encoder.ts b/samples/client/petstore/typescript-angular-v4.3/npm/encoder.ts deleted file mode 100644 index cbefb4a6dd9..00000000000 --- a/samples/client/petstore/typescript-angular-v4.3/npm/encoder.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { HttpParameterCodec } from '@angular/common/http'; - -/** - * Custom HttpParameterCodec - * Workaround for https://github.com/angular/angular/issues/18261 - */ -export class CustomHttpParameterCodec implements HttpParameterCodec { - encodeKey(k: string): string { - return encodeURIComponent(k); - } - encodeValue(v: string): string { - return encodeURIComponent(v); - } - decodeKey(k: string): string { - return decodeURIComponent(k); - } - decodeValue(v: string): string { - return decodeURIComponent(v); - } -} - diff --git a/samples/client/petstore/typescript-angular-v4.3/npm/git_push.sh b/samples/client/petstore/typescript-angular-v4.3/npm/git_push.sh deleted file mode 100644 index ced3be2b0c7..00000000000 --- a/samples/client/petstore/typescript-angular-v4.3/npm/git_push.sh +++ /dev/null @@ -1,58 +0,0 @@ -#!/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 openapi-pestore-perl "minor update" "gitlab.com" - -git_user_id=$1 -git_repo_id=$2 -release_note=$3 -git_host=$4 - -if [ "$git_host" = "" ]; then - git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" -fi - -if [ "$git_user_id" = "" ]; then - git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" -fi - -if [ "$git_repo_id" = "" ]; then - git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" -fi - -if [ "$release_note" = "" ]; then - release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" -fi - -# Initialize the local directory as a Git repository -git init - -# Adds the files in the local repository and stages them for commit. -git add . - -# Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" - -# Sets the new remote -git_remote=`git remote` -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git - else - git remote add origin https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git - fi - -fi - -git pull origin master - -# Pushes (Forces) the changes in the local repository up to the remote repository -echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" -git push origin master 2>&1 | grep -v 'To https' - diff --git a/samples/client/petstore/typescript-angular-v4.3/npm/index.ts b/samples/client/petstore/typescript-angular-v4.3/npm/index.ts deleted file mode 100644 index c312b70fa3e..00000000000 --- a/samples/client/petstore/typescript-angular-v4.3/npm/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -export * from './api/api'; -export * from './model/models'; -export * from './variables'; -export * from './configuration'; -export * from './api.module'; \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v4.3/npm/model/apiResponse.ts b/samples/client/petstore/typescript-angular-v4.3/npm/model/apiResponse.ts deleted file mode 100644 index 682ba478921..00000000000 --- a/samples/client/petstore/typescript-angular-v4.3/npm/model/apiResponse.ts +++ /dev/null @@ -1,22 +0,0 @@ -/** - * 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. - * - * The version of the OpenAPI document: 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. - */ - - -/** - * Describes the result of uploading an image resource - */ -export interface ApiResponse { - code?: number; - type?: string; - message?: string; -} - diff --git a/samples/client/petstore/typescript-angular-v4.3/npm/model/category.ts b/samples/client/petstore/typescript-angular-v4.3/npm/model/category.ts deleted file mode 100644 index b988b6827a0..00000000000 --- a/samples/client/petstore/typescript-angular-v4.3/npm/model/category.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * 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. - * - * The version of the OpenAPI document: 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. - */ - - -/** - * A category for a pet - */ -export interface Category { - id?: number; - name?: string; -} - diff --git a/samples/client/petstore/typescript-angular-v4.3/npm/model/models.ts b/samples/client/petstore/typescript-angular-v4.3/npm/model/models.ts deleted file mode 100644 index 8607c5dabd0..00000000000 --- a/samples/client/petstore/typescript-angular-v4.3/npm/model/models.ts +++ /dev/null @@ -1,6 +0,0 @@ -export * from './apiResponse'; -export * from './category'; -export * from './order'; -export * from './pet'; -export * from './tag'; -export * from './user'; diff --git a/samples/client/petstore/typescript-angular-v4.3/npm/model/order.ts b/samples/client/petstore/typescript-angular-v4.3/npm/model/order.ts deleted file mode 100644 index a29bebe4906..00000000000 --- a/samples/client/petstore/typescript-angular-v4.3/npm/model/order.ts +++ /dev/null @@ -1,37 +0,0 @@ -/** - * 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. - * - * The version of the OpenAPI document: 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. - */ - - -/** - * An order for a pets from the pet store - */ -export interface Order { - id?: number; - petId?: number; - quantity?: number; - shipDate?: string; - /** - * Order Status - */ - status?: Order.StatusEnum; - complete?: boolean; -} -export namespace Order { - export type StatusEnum = 'placed' | 'approved' | 'delivered'; - export const StatusEnum = { - Placed: 'placed' as StatusEnum, - Approved: 'approved' as StatusEnum, - Delivered: 'delivered' as StatusEnum - }; -} - - diff --git a/samples/client/petstore/typescript-angular-v4.3/npm/model/pet.ts b/samples/client/petstore/typescript-angular-v4.3/npm/model/pet.ts deleted file mode 100644 index e0404395f91..00000000000 --- a/samples/client/petstore/typescript-angular-v4.3/npm/model/pet.ts +++ /dev/null @@ -1,39 +0,0 @@ -/** - * 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. - * - * The version of the OpenAPI document: 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 { Category } from './category'; -import { Tag } from './tag'; - - -/** - * A pet for sale in the pet store - */ -export interface Pet { - id?: number; - category?: Category; - name: string; - photoUrls: Array; - tags?: Array; - /** - * pet status in the store - */ - status?: Pet.StatusEnum; -} -export namespace Pet { - export type StatusEnum = 'available' | 'pending' | 'sold'; - export const StatusEnum = { - Available: 'available' as StatusEnum, - Pending: 'pending' as StatusEnum, - Sold: 'sold' as StatusEnum - }; -} - - diff --git a/samples/client/petstore/typescript-angular-v4.3/npm/model/tag.ts b/samples/client/petstore/typescript-angular-v4.3/npm/model/tag.ts deleted file mode 100644 index b6ff210e8df..00000000000 --- a/samples/client/petstore/typescript-angular-v4.3/npm/model/tag.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * 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. - * - * The version of the OpenAPI document: 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. - */ - - -/** - * A tag for a pet - */ -export interface Tag { - id?: number; - name?: string; -} - diff --git a/samples/client/petstore/typescript-angular-v4.3/npm/model/user.ts b/samples/client/petstore/typescript-angular-v4.3/npm/model/user.ts deleted file mode 100644 index fce51005300..00000000000 --- a/samples/client/petstore/typescript-angular-v4.3/npm/model/user.ts +++ /dev/null @@ -1,30 +0,0 @@ -/** - * 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. - * - * The version of the OpenAPI document: 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. - */ - - -/** - * A User who is purchasing from the pet store - */ -export interface User { - id?: number; - username?: string; - firstName?: string; - lastName?: string; - email?: string; - password?: string; - phone?: string; - /** - * User Status - */ - userStatus?: number; -} - diff --git a/samples/client/petstore/typescript-angular-v4.3/npm/ng-package.json b/samples/client/petstore/typescript-angular-v4.3/npm/ng-package.json deleted file mode 100644 index 3b17900dc9c..00000000000 --- a/samples/client/petstore/typescript-angular-v4.3/npm/ng-package.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "$schema": "./node_modules/ng-packagr/ng-package.schema.json", - "lib": { - "entryFile": "index.ts" - } -} diff --git a/samples/client/petstore/typescript-angular-v4.3/npm/package-lock.json b/samples/client/petstore/typescript-angular-v4.3/npm/package-lock.json deleted file mode 100644 index 4bb6693b6c6..00000000000 --- a/samples/client/petstore/typescript-angular-v4.3/npm/package-lock.json +++ /dev/null @@ -1,4145 +0,0 @@ -{ - "name": "@swagger/angular2-typescript-petstore", - "version": "0.0.1", - "lockfileVersion": 1, - "requires": true, - "dependencies": { - "@angular/common": { - "version": "4.4.6", - "resolved": "https://registry.npmjs.org/@angular/common/-/common-4.4.6.tgz", - "integrity": "sha1-S4FCByTggooOg5uVpV6xp+g5GPI=", - "dev": true, - "requires": { - "tslib": "^1.7.1" - } - }, - "@angular/compiler": { - "version": "4.4.6", - "resolved": "https://registry.npmjs.org/@angular/compiler/-/compiler-4.4.6.tgz", - "integrity": "sha1-LuH68lt1fh0SiXkHS+f65SmzvCA=", - "dev": true, - "requires": { - "tslib": "^1.7.1" - } - }, - "@angular/compiler-cli": { - "version": "4.4.7", - "resolved": "https://registry.npmjs.org/@angular/compiler-cli/-/compiler-cli-4.4.7.tgz", - "integrity": "sha512-vzphs9galtMV29CW+ihp6v0HwSQrjAFqs04swqt9o0jEJET6/mPi1EFjJRNZiFn6ghh6lxUPr3vThy7CrSNxHg==", - "dev": true, - "requires": { - "@angular/tsc-wrapped": "4.4.7", - "minimist": "^1.2.0", - "reflect-metadata": "^0.1.2" - } - }, - "@angular/core": { - "version": "4.4.6", - "resolved": "https://registry.npmjs.org/@angular/core/-/core-4.4.6.tgz", - "integrity": "sha1-EwMf0Q3P5DiHVBmzjyESCVi8I1Q=", - "dev": true, - "requires": { - "tslib": "^1.7.1" - } - }, - "@angular/http": { - "version": "4.4.6", - "resolved": "https://registry.npmjs.org/@angular/http/-/http-4.4.6.tgz", - "integrity": "sha1-CvaAxnEL3AJtlA4iXP0PalwAXQw=", - "dev": true, - "requires": { - "tslib": "^1.7.1" - } - }, - "@angular/platform-browser": { - "version": "4.4.6", - "resolved": "https://registry.npmjs.org/@angular/platform-browser/-/platform-browser-4.4.6.tgz", - "integrity": "sha1-qYOcVH4bZU+h0kqJeAyLpquNzOA=", - "dev": true, - "requires": { - "tslib": "^1.7.1" - } - }, - "@angular/tsc-wrapped": { - "version": "4.4.7", - "resolved": "https://registry.npmjs.org/@angular/tsc-wrapped/-/tsc-wrapped-4.4.7.tgz", - "integrity": "sha512-R9w7sTU+HSTMPOa4NgvPL753qB6aqnPc1AVh2rwSl5FOpLS/AeeyzIhRnBsVXGrZrTcBQVLp/Cxg1oUSXE2k4Q==", - "dev": true, - "requires": { - "tsickle": "^0.21.0" - } - }, - "@ngtools/json-schema": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@ngtools/json-schema/-/json-schema-1.1.0.tgz", - "integrity": "sha1-w6DFRNYjkqzCgTpCyKDcb1j4aSI=", - "dev": true - }, - "abbrev": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", - "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", - "dev": true - }, - "acorn": { - "version": "5.6.2", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.6.2.tgz", - "integrity": "sha512-zUzo1E5dI2Ey8+82egfnttyMlMZ2y0D8xOCO3PNPPlYXpl8NZvF6Qk9L9BEtJs+43FqEmfBViDqc5d1ckRDguw==", - "dev": true - }, - "ajv": { - "version": "4.11.8", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-4.11.8.tgz", - "integrity": "sha1-gv+wKynmYq5TvcIK8VlHcGc5xTY=", - "dev": true, - "requires": { - "co": "^4.6.0", - "json-stable-stringify": "^1.0.1" - } - }, - "amdefine": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", - "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=", - "dev": true - }, - "ansi-gray": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/ansi-gray/-/ansi-gray-0.1.1.tgz", - "integrity": "sha1-KWLPVOyXksSFEKPetSRDaGHvclE=", - "dev": true, - "requires": { - "ansi-wrap": "0.1.0" - } - }, - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", - "dev": true - }, - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "ansi-wrap": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/ansi-wrap/-/ansi-wrap-0.1.0.tgz", - "integrity": "sha1-qCJQ3bABXponyoLoLqYDu/pF768=", - "dev": true - }, - "anymatch": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-1.3.2.tgz", - "integrity": "sha512-0XNayC8lTHQ2OI8aljNCN3sSx6hsr/1+rlcDAotXJR7C1oZZHCNsfpbKwMjRA3Uqb5tF1Rae2oloTr4xpq+WjA==", - "dev": true, - "requires": { - "micromatch": "^2.1.5", - "normalize-path": "^2.0.0" - } - }, - "aproba": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", - "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==", - "dev": true - }, - "are-we-there-yet": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz", - "integrity": "sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w==", - "dev": true, - "requires": { - "delegates": "^1.0.0", - "readable-stream": "^2.0.6" - } - }, - "arr-diff": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz", - "integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=", - "dev": true, - "requires": { - "arr-flatten": "^1.0.1" - } - }, - "arr-flatten": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", - "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", - "dev": true - }, - "array-differ": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/array-differ/-/array-differ-1.0.0.tgz", - "integrity": "sha1-7/UuN1gknTO+QCuLuOVkuytdQDE=", - "dev": true - }, - "array-filter": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/array-filter/-/array-filter-0.0.1.tgz", - "integrity": "sha1-fajPLiZijtcygDWB/SH2fKzS7uw=", - "dev": true - }, - "array-find-index": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz", - "integrity": "sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E=", - "dev": true - }, - "array-map": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/array-map/-/array-map-0.0.0.tgz", - "integrity": "sha1-iKK6tz0c97zVwbEYoAP2b2ZfpmI=", - "dev": true - }, - "array-reduce": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/array-reduce/-/array-reduce-0.0.0.tgz", - "integrity": "sha1-FziZ0//Rx9k4PkR5Ul2+J4yrXys=", - "dev": true - }, - "array-uniq": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz", - "integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=", - "dev": true - }, - "array-unique": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz", - "integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=", - "dev": true - }, - "arrify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", - "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=", - "dev": true - }, - "asap": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", - "integrity": "sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY=", - "dev": true, - "optional": true - }, - "asn1": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.3.tgz", - "integrity": "sha1-2sh4dxPJlmhJ/IGAd36+nB3fO4Y=", - "dev": true - }, - "assert-plus": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-0.2.0.tgz", - "integrity": "sha1-104bh+ev/A24qttwIfP+SBAasjQ=", - "dev": true - }, - "ast-types": { - "version": "0.9.6", - "resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.9.6.tgz", - "integrity": "sha1-ECyenpAF0+fjgpvwxPok7oYu6bk=", - "dev": true - }, - "async": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/async/-/async-2.6.1.tgz", - "integrity": "sha512-fNEiL2+AZt6AlAw/29Cr0UDe4sRAHCpEHh54WMz+Bb7QfNcFw4h3loofyJpLeQs4Yx7yuqu/2dLgM5hKOs6HlQ==", - "dev": true, - "requires": { - "lodash": "^4.17.10" - } - }, - "async-each": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.1.tgz", - "integrity": "sha1-GdOGodntxufByF04iu28xW0zYC0=", - "dev": true - }, - "async-foreach": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/async-foreach/-/async-foreach-0.1.3.tgz", - "integrity": "sha1-NhIfhFwFeBct5Bmpfb6x0W7DRUI=", - "dev": true - }, - "asynckit": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", - "dev": true - }, - "autoprefixer": { - "version": "7.2.6", - "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-7.2.6.tgz", - "integrity": "sha512-Iq8TRIB+/9eQ8rbGhcP7ct5cYb/3qjNYAR2SnzLCEcwF6rvVOax8+9+fccgXk4bEhQGjOZd5TLhsksmAdsbGqQ==", - "dev": true, - "requires": { - "browserslist": "^2.11.3", - "caniuse-lite": "^1.0.30000805", - "normalize-range": "^0.1.2", - "num2fraction": "^1.2.2", - "postcss": "^6.0.17", - "postcss-value-parser": "^3.2.3" - } - }, - "aws-sign2": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.6.0.tgz", - "integrity": "sha1-FDQt0428yU0OW4fXY81jYSwOeU8=", - "dev": true - }, - "aws4": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.7.0.tgz", - "integrity": "sha512-32NDda82rhwD9/JBCCkB+MRYDp0oSvlo2IL6rQWA10PQi7tDUM3eqMSltXmY+Oyl/7N3P3qNtAlv7X0d9bI28w==", - "dev": true - }, - "babel-runtime": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz", - "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", - "dev": true, - "requires": { - "core-js": "^2.4.0", - "regenerator-runtime": "^0.11.0" - } - }, - "balanced-match": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", - "dev": true - }, - "bcrypt-pbkdf": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz", - "integrity": "sha1-Y7xdy2EzG5K8Bf1SiVPDNGKgb40=", - "dev": true, - "optional": true, - "requires": { - "tweetnacl": "^0.14.3" - } - }, - "beeper": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/beeper/-/beeper-1.1.1.tgz", - "integrity": "sha1-5tXqjF2tABMEpwsiY4RH9pyy+Ak=", - "dev": true - }, - "binary-extensions": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.11.0.tgz", - "integrity": "sha1-RqoXUftqL5PuXmibsQh9SxTGwgU=", - "dev": true - }, - "block-stream": { - "version": "0.0.9", - "resolved": "https://registry.npmjs.org/block-stream/-/block-stream-0.0.9.tgz", - "integrity": "sha1-E+v+d4oDIFz+A3UUgeu0szAMEmo=", - "dev": true, - "requires": { - "inherits": "~2.0.0" - } - }, - "boom": { - "version": "2.10.1", - "resolved": "https://registry.npmjs.org/boom/-/boom-2.10.1.tgz", - "integrity": "sha1-OciRjO/1eZ+D+UkqhI9iWt0Mdm8=", - "dev": true, - "requires": { - "hoek": "2.x.x" - } - }, - "brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "braces": { - "version": "1.8.5", - "resolved": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz", - "integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=", - "dev": true, - "requires": { - "expand-range": "^1.8.1", - "preserve": "^0.2.0", - "repeat-element": "^1.1.2" - } - }, - "browserslist": { - "version": "2.11.3", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-2.11.3.tgz", - "integrity": "sha512-yWu5cXT7Av6mVwzWc8lMsJMHWn4xyjSuGYi4IozbVTLUOEYPSagUB8kiMDUHA1fS3zjr8nkxkn9jdvug4BBRmA==", - "dev": true, - "requires": { - "caniuse-lite": "^1.0.30000792", - "electron-to-chromium": "^1.3.30" - } - }, - "buffer-crc32": { - "version": "0.2.13", - "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", - "integrity": "sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI=", - "dev": true - }, - "builtin-modules": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", - "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=", - "dev": true - }, - "camelcase": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz", - "integrity": "sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8=", - "dev": true - }, - "camelcase-keys": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz", - "integrity": "sha1-MIvur/3ygRkFHvodkyITyRuPkuc=", - "dev": true, - "requires": { - "camelcase": "^2.0.0", - "map-obj": "^1.0.0" - } - }, - "caniuse-lite": { - "version": "1.0.30000853", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000853.tgz", - "integrity": "sha512-vMrE8BED4MJC9IhDJKP8ok6bJUfn5+YHvxwXMYfiPqQOJ3r2B9ihcArlUnXu6yPWf7b3jHqiEBwXZEbrbiFUqg==", - "dev": true - }, - "caseless": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", - "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=", - "dev": true - }, - "chalk": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", - "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "chokidar": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-1.7.0.tgz", - "integrity": "sha1-eY5ol3gVHIB2tLNg5e3SjNortGg=", - "dev": true, - "requires": { - "anymatch": "^1.3.0", - "async-each": "^1.0.0", - "fsevents": "^1.0.0", - "glob-parent": "^2.0.0", - "inherits": "^2.0.1", - "is-binary-path": "^1.0.0", - "is-glob": "^2.0.0", - "path-is-absolute": "^1.0.0", - "readdirp": "^2.0.0" - } - }, - "cliui": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", - "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", - "dev": true, - "requires": { - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1", - "wrap-ansi": "^2.0.0" - } - }, - "clone": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", - "integrity": "sha1-2jCcwmPfFZlMaIypAheco8fNfH4=", - "dev": true - }, - "clone-stats": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/clone-stats/-/clone-stats-0.0.1.tgz", - "integrity": "sha1-uI+UqCzzi4eR1YBG6kAprYjKmdE=", - "dev": true - }, - "co": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", - "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=", - "dev": true - }, - "code-point-at": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", - "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", - "dev": true - }, - "color-convert": { - "version": "1.9.2", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.2.tgz", - "integrity": "sha512-3NUJZdhMhcdPn8vJ9v2UQJoH0qqoGUkYTgFEPZaPjEtwmmKUfNV46zZmgB2M5M4DCEQHMaCfWHCxiBflLm04Tg==", - "dev": true, - "requires": { - "color-name": "1.1.1" - } - }, - "color-name": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.1.tgz", - "integrity": "sha1-SxQVMEz1ACjqgWQ2Q72C6gWANok=", - "dev": true - }, - "color-support": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz", - "integrity": "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==", - "dev": true - }, - "combined-stream": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.6.tgz", - "integrity": "sha1-cj599ugBrFYTETp+RFqbactjKBg=", - "dev": true, - "requires": { - "delayed-stream": "~1.0.0" - } - }, - "commander": { - "version": "2.15.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.15.1.tgz", - "integrity": "sha512-VlfT9F3V0v+jr4yxPc5gg9s62/fIVWsd2Bk2iD435um1NlGMYdVCq+MjcXnhYq2icNOizHr1kK+5TI6H0Hy0ag==", - "dev": true - }, - "concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", - "dev": true - }, - "console-control-strings": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", - "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=", - "dev": true - }, - "convert-source-map": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.5.1.tgz", - "integrity": "sha1-uCeAl7m8IpNl3lxiz1/K7YtVmeU=", - "dev": true - }, - "core-js": { - "version": "2.5.7", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.7.tgz", - "integrity": "sha512-RszJCAxg/PP6uzXVXL6BsxSXx/B05oJAQ2vkJRjyjrEcNVycaqOmNb5OTxZPE3xa5gwZduqza6L9JOCenh/Ecw==", - "dev": true - }, - "core-util-is": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", - "dev": true - }, - "cpx": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/cpx/-/cpx-1.5.0.tgz", - "integrity": "sha1-GFvgGFEdhycN7czCkxceN2VauI8=", - "dev": true, - "requires": { - "babel-runtime": "^6.9.2", - "chokidar": "^1.6.0", - "duplexer": "^0.1.1", - "glob": "^7.0.5", - "glob2base": "^0.0.12", - "minimatch": "^3.0.2", - "mkdirp": "^0.5.1", - "resolve": "^1.1.7", - "safe-buffer": "^5.0.1", - "shell-quote": "^1.6.1", - "subarg": "^1.0.0" - } - }, - "cross-spawn": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-3.0.1.tgz", - "integrity": "sha1-ElYDfsufDF9549bvE14wdwGEuYI=", - "dev": true, - "requires": { - "lru-cache": "^4.0.1", - "which": "^1.2.9" - } - }, - "cryptiles": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-2.0.5.tgz", - "integrity": "sha1-O9/s3GCBR8HGcgL6KR59ylnqo7g=", - "dev": true, - "requires": { - "boom": "2.x.x" - } - }, - "css-parse": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/css-parse/-/css-parse-1.7.0.tgz", - "integrity": "sha1-Mh9s9zeCpv91ERE5D8BeLGV9jJs=", - "dev": true - }, - "currently-unhandled": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz", - "integrity": "sha1-mI3zP+qxke95mmE2nddsF635V+o=", - "dev": true, - "requires": { - "array-find-index": "^1.0.1" - } - }, - "dashdash": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", - "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", - "dev": true, - "requires": { - "assert-plus": "^1.0.0" - }, - "dependencies": { - "assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", - "dev": true - } - } - }, - "dateformat": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-2.2.0.tgz", - "integrity": "sha1-QGXiATz5+5Ft39gu+1Bq1MZ2kGI=", - "dev": true - }, - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "decamelize": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", - "dev": true - }, - "delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", - "dev": true - }, - "delegates": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", - "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=", - "dev": true - }, - "diff": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", - "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", - "dev": true - }, - "duplexer": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.1.tgz", - "integrity": "sha1-rOb/gIwc5mtX0ev5eXessCM0z8E=", - "dev": true - }, - "duplexer2": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.0.2.tgz", - "integrity": "sha1-xhTc9n4vsUmVqRcR5aYX6KYKMds=", - "dev": true, - "requires": { - "readable-stream": "~1.1.9" - }, - "dependencies": { - "isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", - "dev": true - }, - "readable-stream": { - "version": "1.1.14", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", - "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "0.0.1", - "string_decoder": "~0.10.x" - } - }, - "string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", - "dev": true - } - } - }, - "duplexify": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.6.0.tgz", - "integrity": "sha512-fO3Di4tBKJpYTFHAxTU00BcfWMY9w24r/x21a6rZRbsD/ToUgGxsMbiGRmB7uVAXeGKXD9MwiLZa5E97EVgIRQ==", - "dev": true, - "requires": { - "end-of-stream": "^1.0.0", - "inherits": "^2.0.1", - "readable-stream": "^2.0.0", - "stream-shift": "^1.0.0" - } - }, - "ecc-jsbn": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz", - "integrity": "sha1-D8c6ntXw1Tw4GTOYUj735UN3dQU=", - "dev": true, - "optional": true, - "requires": { - "jsbn": "~0.1.0" - } - }, - "electron-to-chromium": { - "version": "1.3.48", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.48.tgz", - "integrity": "sha1-07DYWTgUBE4JLs4hCPw6ya6kuQA=", - "dev": true - }, - "end-of-stream": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.1.tgz", - "integrity": "sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q==", - "dev": true, - "requires": { - "once": "^1.4.0" - } - }, - "errno": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.7.tgz", - "integrity": "sha512-MfrRBDWzIWifgq6tJj60gkAwtLNb6sQPlcFrSOflcP1aFmmruKQ2wRnze/8V6kgyz7H3FF8Npzv78mZ7XLLflg==", - "dev": true, - "optional": true, - "requires": { - "prr": "~1.0.1" - } - }, - "error-ex": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.1.tgz", - "integrity": "sha1-+FWobOYa3E6GIcPNoh56dhLDqNw=", - "dev": true, - "requires": { - "is-arrayish": "^0.2.1" - } - }, - "es6-promise": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-3.3.1.tgz", - "integrity": "sha1-oIzd6EzNvzTQJ6FFG8kdS80ophM=", - "dev": true - }, - "es6-templates": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/es6-templates/-/es6-templates-0.2.3.tgz", - "integrity": "sha1-XLmsn7He1usSOTQrgdeSu7QHjuQ=", - "dev": true, - "requires": { - "recast": "~0.11.12", - "through": "~2.3.6" - } - }, - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", - "dev": true - }, - "esprima": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-3.1.3.tgz", - "integrity": "sha1-/cpRzuYTOJXjyI1TXOSdv/YqRjM=", - "dev": true - }, - "estree-walker": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-0.5.2.tgz", - "integrity": "sha512-XpCnW/AE10ws/kDAs37cngSkvgIR8aN3G0MS85m7dUpuK2EREo9VJ00uvw6Dg/hXEpfsE1I1TvJOJr+Z+TL+ig==", - "dev": true - }, - "expand-brackets": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-0.1.5.tgz", - "integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=", - "dev": true, - "requires": { - "is-posix-bracket": "^0.1.0" - } - }, - "expand-range": { - "version": "1.8.2", - "resolved": "https://registry.npmjs.org/expand-range/-/expand-range-1.8.2.tgz", - "integrity": "sha1-opnv/TNf4nIeuujiV+x5ZE/IUzc=", - "dev": true, - "requires": { - "fill-range": "^2.1.0" - } - }, - "extend": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz", - "integrity": "sha1-p1Xqe8Gt/MWjHOfnYtuq3F5jZEQ=", - "dev": true - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - }, - "extglob": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz", - "integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=", - "dev": true, - "requires": { - "is-extglob": "^1.0.0" - } - }, - "extsprintf": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", - "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=", - "dev": true - }, - "fancy-log": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/fancy-log/-/fancy-log-1.3.2.tgz", - "integrity": "sha1-9BEl49hPLn2JpD0G2VjI94vha+E=", - "dev": true, - "requires": { - "ansi-gray": "^0.1.1", - "color-support": "^1.1.3", - "time-stamp": "^1.0.0" - } - }, - "filename-regex": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/filename-regex/-/filename-regex-2.0.1.tgz", - "integrity": "sha1-wcS5vuPglyXdsQa3XB4wH+LxiyY=", - "dev": true - }, - "fill-range": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-2.2.4.tgz", - "integrity": "sha512-cnrcCbj01+j2gTG921VZPnHbjmdAf8oQV/iGeV2kZxGSyfYjjTyY79ErsK1WJWMpw6DaApEX72binqJE+/d+5Q==", - "dev": true, - "requires": { - "is-number": "^2.1.0", - "isobject": "^2.0.0", - "randomatic": "^3.0.0", - "repeat-element": "^1.1.2", - "repeat-string": "^1.5.2" - } - }, - "find-index": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/find-index/-/find-index-0.1.1.tgz", - "integrity": "sha1-Z101iyyjiS15Whq0cjL4tuLg3eQ=", - "dev": true - }, - "find-up": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", - "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", - "dev": true, - "requires": { - "path-exists": "^2.0.0", - "pinkie-promise": "^2.0.0" - } - }, - "first-chunk-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/first-chunk-stream/-/first-chunk-stream-1.0.0.tgz", - "integrity": "sha1-Wb+1DNkF9g18OUzT2ayqtOatk04=", - "dev": true - }, - "for-in": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", - "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", - "dev": true - }, - "for-own": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/for-own/-/for-own-0.1.5.tgz", - "integrity": "sha1-UmXGgaTylNq78XyVCbZ2OqhFEM4=", - "dev": true, - "requires": { - "for-in": "^1.0.1" - } - }, - "forever-agent": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", - "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=", - "dev": true - }, - "form-data": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.1.4.tgz", - "integrity": "sha1-M8GDrPGTJ27KqYFDpp6Uv+4XUNE=", - "dev": true, - "requires": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.5", - "mime-types": "^2.1.12" - } - }, - "fs-extra": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-4.0.3.tgz", - "integrity": "sha512-q6rbdDd1o2mAnQreO7YADIxf/Whx4AHBiRf6d+/cVT8h44ss+lHgxf1FemcqDnQt9X3ct4McHr+JMGlYSsK7Cg==", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" - } - }, - "fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", - "dev": true - }, - "fsevents": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.4.tgz", - "integrity": "sha512-z8H8/diyk76B7q5wg+Ud0+CqzcAF3mBBI/bA5ne5zrRUUIvNkJY//D3BqyH571KuAC4Nr7Rw7CjWX4r0y9DvNg==", - "dev": true, - "optional": true, - "requires": { - "nan": "^2.9.2", - "node-pre-gyp": "^0.10.0" - }, - "dependencies": { - "abbrev": { - "version": "1.1.1", - "bundled": true, - "dev": true, - "optional": true - }, - "ansi-regex": { - "version": "2.1.1", - "bundled": true, - "dev": true - }, - "aproba": { - "version": "1.2.0", - "bundled": true, - "dev": true, - "optional": true - }, - "are-we-there-yet": { - "version": "1.1.4", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "delegates": "^1.0.0", - "readable-stream": "^2.0.6" - } - }, - "balanced-match": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "brace-expansion": { - "version": "1.1.11", - "bundled": true, - "dev": true, - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "chownr": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "code-point-at": { - "version": "1.1.0", - "bundled": true, - "dev": true - }, - "concat-map": { - "version": "0.0.1", - "bundled": true, - "dev": true - }, - "console-control-strings": { - "version": "1.1.0", - "bundled": true, - "dev": true - }, - "core-util-is": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "debug": { - "version": "2.6.9", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "ms": "2.0.0" - } - }, - "deep-extend": { - "version": "0.5.1", - "bundled": true, - "dev": true, - "optional": true - }, - "delegates": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "detect-libc": { - "version": "1.0.3", - "bundled": true, - "dev": true, - "optional": true - }, - "fs-minipass": { - "version": "1.2.5", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "minipass": "^2.2.1" - } - }, - "fs.realpath": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "gauge": { - "version": "2.7.4", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "aproba": "^1.0.3", - "console-control-strings": "^1.0.0", - "has-unicode": "^2.0.0", - "object-assign": "^4.1.0", - "signal-exit": "^3.0.0", - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1", - "wide-align": "^1.1.0" - } - }, - "glob": { - "version": "7.1.2", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "has-unicode": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "iconv-lite": { - "version": "0.4.21", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "safer-buffer": "^2.1.0" - } - }, - "ignore-walk": { - "version": "3.0.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "minimatch": "^3.0.4" - } - }, - "inflight": { - "version": "1.0.6", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.3", - "bundled": true, - "dev": true - }, - "ini": { - "version": "1.3.5", - "bundled": true, - "dev": true, - "optional": true - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "number-is-nan": "^1.0.0" - } - }, - "isarray": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "minimatch": { - "version": "3.0.4", - "bundled": true, - "dev": true, - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "minimist": { - "version": "0.0.8", - "bundled": true, - "dev": true - }, - "minipass": { - "version": "2.2.4", - "bundled": true, - "dev": true, - "requires": { - "safe-buffer": "^5.1.1", - "yallist": "^3.0.0" - } - }, - "minizlib": { - "version": "1.1.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "minipass": "^2.2.1" - } - }, - "mkdirp": { - "version": "0.5.1", - "bundled": true, - "dev": true, - "requires": { - "minimist": "0.0.8" - } - }, - "ms": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "needle": { - "version": "2.2.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "debug": "^2.1.2", - "iconv-lite": "^0.4.4", - "sax": "^1.2.4" - } - }, - "node-pre-gyp": { - "version": "0.10.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "detect-libc": "^1.0.2", - "mkdirp": "^0.5.1", - "needle": "^2.2.0", - "nopt": "^4.0.1", - "npm-packlist": "^1.1.6", - "npmlog": "^4.0.2", - "rc": "^1.1.7", - "rimraf": "^2.6.1", - "semver": "^5.3.0", - "tar": "^4" - } - }, - "nopt": { - "version": "4.0.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "abbrev": "1", - "osenv": "^0.1.4" - } - }, - "npm-bundled": { - "version": "1.0.3", - "bundled": true, - "dev": true, - "optional": true - }, - "npm-packlist": { - "version": "1.1.10", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "ignore-walk": "^3.0.1", - "npm-bundled": "^1.0.1" - } - }, - "npmlog": { - "version": "4.1.2", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "are-we-there-yet": "~1.1.2", - "console-control-strings": "~1.1.0", - "gauge": "~2.7.3", - "set-blocking": "~2.0.0" - } - }, - "number-is-nan": { - "version": "1.0.1", - "bundled": true, - "dev": true - }, - "object-assign": { - "version": "4.1.1", - "bundled": true, - "dev": true, - "optional": true - }, - "once": { - "version": "1.4.0", - "bundled": true, - "dev": true, - "requires": { - "wrappy": "1" - } - }, - "os-homedir": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "os-tmpdir": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "osenv": { - "version": "0.1.5", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "os-homedir": "^1.0.0", - "os-tmpdir": "^1.0.0" - } - }, - "path-is-absolute": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "process-nextick-args": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "rc": { - "version": "1.2.7", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "deep-extend": "^0.5.1", - "ini": "~1.3.0", - "minimist": "^1.2.0", - "strip-json-comments": "~2.0.1" - }, - "dependencies": { - "minimist": { - "version": "1.2.0", - "bundled": true, - "dev": true, - "optional": true - } - } - }, - "readable-stream": { - "version": "2.3.6", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "rimraf": { - "version": "2.6.2", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "glob": "^7.0.5" - } - }, - "safe-buffer": { - "version": "5.1.1", - "bundled": true, - "dev": true - }, - "safer-buffer": { - "version": "2.1.2", - "bundled": true, - "dev": true, - "optional": true - }, - "sax": { - "version": "1.2.4", - "bundled": true, - "dev": true, - "optional": true - }, - "semver": { - "version": "5.5.0", - "bundled": true, - "dev": true, - "optional": true - }, - "set-blocking": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "signal-exit": { - "version": "3.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "string-width": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - } - }, - "string_decoder": { - "version": "1.1.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "safe-buffer": "~5.1.0" - } - }, - "strip-ansi": { - "version": "3.0.1", - "bundled": true, - "dev": true, - "requires": { - "ansi-regex": "^2.0.0" - } - }, - "strip-json-comments": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "tar": { - "version": "4.4.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "chownr": "^1.0.1", - "fs-minipass": "^1.2.5", - "minipass": "^2.2.4", - "minizlib": "^1.1.0", - "mkdirp": "^0.5.0", - "safe-buffer": "^5.1.1", - "yallist": "^3.0.2" - } - }, - "util-deprecate": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "wide-align": { - "version": "1.1.2", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "string-width": "^1.0.2" - } - }, - "wrappy": { - "version": "1.0.2", - "bundled": true, - "dev": true - }, - "yallist": { - "version": "3.0.2", - "bundled": true, - "dev": true - } - } - }, - "fstream": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.11.tgz", - "integrity": "sha1-XB+x8RdHcRTwYyoOtLcbPLD9MXE=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "inherits": "~2.0.0", - "mkdirp": ">=0.5 0", - "rimraf": "2" - } - }, - "gauge": { - "version": "2.7.4", - "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz", - "integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=", - "dev": true, - "requires": { - "aproba": "^1.0.3", - "console-control-strings": "^1.0.0", - "has-unicode": "^2.0.0", - "object-assign": "^4.1.0", - "signal-exit": "^3.0.0", - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1", - "wide-align": "^1.1.0" - }, - "dependencies": { - "object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", - "dev": true - } - } - }, - "gaze": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/gaze/-/gaze-1.1.3.tgz", - "integrity": "sha512-BRdNm8hbWzFzWHERTrejLqwHDfS4GibPoq5wjTPIoJHoBtKGPg3xAFfxmM+9ztbXelxcf2hwQcaz1PtmFeue8g==", - "dev": true, - "requires": { - "globule": "^1.0.0" - } - }, - "generate-function": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/generate-function/-/generate-function-2.0.0.tgz", - "integrity": "sha1-aFj+fAlpt9TpCTM3ZHrHn2DfvnQ=", - "dev": true - }, - "generate-object-property": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/generate-object-property/-/generate-object-property-1.2.0.tgz", - "integrity": "sha1-nA4cQDCM6AT0eDYYuTf6iPmdUNA=", - "dev": true, - "requires": { - "is-property": "^1.0.0" - } - }, - "get-caller-file": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.2.tgz", - "integrity": "sha1-9wLmMSfn4jHBYKgMFVSstw1QR+U=", - "dev": true - }, - "get-stdin": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz", - "integrity": "sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4=", - "dev": true - }, - "getpass": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", - "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", - "dev": true, - "requires": { - "assert-plus": "^1.0.0" - }, - "dependencies": { - "assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", - "dev": true - } - } - }, - "glob": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", - "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", - "dev": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "glob-base": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/glob-base/-/glob-base-0.3.0.tgz", - "integrity": "sha1-27Fk9iIbHAscz4Kuoyi0l98Oo8Q=", - "dev": true, - "requires": { - "glob-parent": "^2.0.0", - "is-glob": "^2.0.0" - } - }, - "glob-parent": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz", - "integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=", - "dev": true, - "requires": { - "is-glob": "^2.0.0" - } - }, - "glob-stream": { - "version": "5.3.5", - "resolved": "https://registry.npmjs.org/glob-stream/-/glob-stream-5.3.5.tgz", - "integrity": "sha1-pVZlqajM3EGRWofHAeMtTgFvrSI=", - "dev": true, - "requires": { - "extend": "^3.0.0", - "glob": "^5.0.3", - "glob-parent": "^3.0.0", - "micromatch": "^2.3.7", - "ordered-read-streams": "^0.3.0", - "through2": "^0.6.0", - "to-absolute-glob": "^0.1.1", - "unique-stream": "^2.0.2" - }, - "dependencies": { - "glob": { - "version": "5.0.15", - "resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz", - "integrity": "sha1-G8k2ueAvSmA/zCIuz3Yz0wuLk7E=", - "dev": true, - "requires": { - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "2 || 3", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "glob-parent": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", - "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", - "dev": true, - "requires": { - "is-glob": "^3.1.0", - "path-dirname": "^1.0.0" - } - }, - "is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", - "dev": true - }, - "is-glob": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", - "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", - "dev": true, - "requires": { - "is-extglob": "^2.1.0" - } - }, - "isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", - "dev": true - }, - "readable-stream": { - "version": "1.0.34", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", - "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "0.0.1", - "string_decoder": "~0.10.x" - } - }, - "string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", - "dev": true - }, - "through2": { - "version": "0.6.5", - "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz", - "integrity": "sha1-QaucZ7KdVyCQcUEOHXp6lozTrUg=", - "dev": true, - "requires": { - "readable-stream": ">=1.0.33-1 <1.1.0-0", - "xtend": ">=4.0.0 <4.1.0-0" - } - } - } - }, - "glob2base": { - "version": "0.0.12", - "resolved": "https://registry.npmjs.org/glob2base/-/glob2base-0.0.12.tgz", - "integrity": "sha1-nUGbPijxLoOjYhZKJ3BVkiycDVY=", - "dev": true, - "requires": { - "find-index": "^0.1.1" - } - }, - "globule": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/globule/-/globule-1.2.1.tgz", - "integrity": "sha512-g7QtgWF4uYSL5/dn71WxubOrS7JVGCnFPEnoeChJmBnyR9Mw8nGoEwOgJL/RC2Te0WhbsEUCejfH8SZNJ+adYQ==", - "dev": true, - "requires": { - "glob": "~7.1.1", - "lodash": "~4.17.10", - "minimatch": "~3.0.2" - } - }, - "glogg": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/glogg/-/glogg-1.0.1.tgz", - "integrity": "sha512-ynYqXLoluBKf9XGR1gA59yEJisIL7YHEH4xr3ZziHB5/yl4qWfaK8Js9jGe6gBGCSCKVqiyO30WnRZADvemUNw==", - "dev": true, - "requires": { - "sparkles": "^1.0.0" - } - }, - "graceful-fs": { - "version": "4.1.11", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", - "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=", - "dev": true - }, - "gulp-inline-ng2-template": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/gulp-inline-ng2-template/-/gulp-inline-ng2-template-4.1.0.tgz", - "integrity": "sha1-Yfq1mmaUXDegxIOLXnk9ZwjpHf0=", - "dev": true, - "requires": { - "async": "^2.0.0-rc.5", - "clone": "~1.0.2", - "es6-templates": "~0.2.2", - "extend": "~3.0.0", - "gulp-util": "~3.0.6", - "isarray": "0.0.1", - "through2": "~2.0.0" - }, - "dependencies": { - "isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", - "dev": true - } - } - }, - "gulp-sourcemaps": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/gulp-sourcemaps/-/gulp-sourcemaps-1.6.0.tgz", - "integrity": "sha1-uG/zSdgBzrVuHZ59x7vLS33uYAw=", - "dev": true, - "requires": { - "convert-source-map": "^1.1.1", - "graceful-fs": "^4.1.2", - "strip-bom": "^2.0.0", - "through2": "^2.0.0", - "vinyl": "^1.0.0" - }, - "dependencies": { - "vinyl": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-1.2.0.tgz", - "integrity": "sha1-XIgDbPVl5d8FVYv8kR+GVt8hiIQ=", - "dev": true, - "requires": { - "clone": "^1.0.0", - "clone-stats": "^0.0.1", - "replace-ext": "0.0.1" - } - } - } - }, - "gulp-util": { - "version": "3.0.8", - "resolved": "https://registry.npmjs.org/gulp-util/-/gulp-util-3.0.8.tgz", - "integrity": "sha1-AFTh50RQLifATBh8PsxQXdVLu08=", - "dev": true, - "requires": { - "array-differ": "^1.0.0", - "array-uniq": "^1.0.2", - "beeper": "^1.0.0", - "chalk": "^1.0.0", - "dateformat": "^2.0.0", - "fancy-log": "^1.1.0", - "gulplog": "^1.0.0", - "has-gulplog": "^0.1.0", - "lodash._reescape": "^3.0.0", - "lodash._reevaluate": "^3.0.0", - "lodash._reinterpolate": "^3.0.0", - "lodash.template": "^3.0.0", - "minimist": "^1.1.0", - "multipipe": "^0.1.2", - "object-assign": "^3.0.0", - "replace-ext": "0.0.1", - "through2": "^2.0.0", - "vinyl": "^0.5.0" - }, - "dependencies": { - "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", - "dev": true - }, - "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", - "dev": true, - "requires": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" - } - }, - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", - "dev": true - } - } - }, - "gulplog": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/gulplog/-/gulplog-1.0.0.tgz", - "integrity": "sha1-4oxNRdBey77YGDY86PnFkmIp/+U=", - "dev": true, - "requires": { - "glogg": "^1.0.0" - } - }, - "har-schema": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-1.0.5.tgz", - "integrity": "sha1-0mMTX0MwfALGAq/I/pWXDAFRNp4=", - "dev": true - }, - "har-validator": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-4.2.1.tgz", - "integrity": "sha1-M0gdDxu/9gDdID11gSpqX7oALio=", - "dev": true, - "requires": { - "ajv": "^4.9.1", - "har-schema": "^1.0.5" - } - }, - "has-ansi": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", - "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", - "dev": true, - "requires": { - "ansi-regex": "^2.0.0" - } - }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true - }, - "has-gulplog": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/has-gulplog/-/has-gulplog-0.1.0.tgz", - "integrity": "sha1-ZBTIKRNpfaUVkDl9r7EvIpZ4Ec4=", - "dev": true, - "requires": { - "sparkles": "^1.0.0" - } - }, - "has-unicode": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", - "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=", - "dev": true - }, - "hawk": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/hawk/-/hawk-3.1.3.tgz", - "integrity": "sha1-B4REvXwWQLD+VA0sm3PVlnjo4cQ=", - "dev": true, - "requires": { - "boom": "2.x.x", - "cryptiles": "2.x.x", - "hoek": "2.x.x", - "sntp": "1.x.x" - } - }, - "hoek": { - "version": "2.16.3", - "resolved": "https://registry.npmjs.org/hoek/-/hoek-2.16.3.tgz", - "integrity": "sha1-ILt0A9POo5jpHcRxCo/xuCdKJe0=", - "dev": true - }, - "homedir-polyfill": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.1.tgz", - "integrity": "sha1-TCu8inWJmP7r9e1oWA921GdotLw=", - "dev": true, - "requires": { - "parse-passwd": "^1.0.0" - } - }, - "hosted-git-info": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.6.0.tgz", - "integrity": "sha512-lIbgIIQA3lz5XaB6vxakj6sDHADJiZadYEJB+FgA+C4nubM1NwcuvUr9EJPmnH1skZqpqUzWborWo8EIUi0Sdw==", - "dev": true - }, - "http-signature": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.1.1.tgz", - "integrity": "sha1-33LiZwZs0Kxn+3at+OE0qPvPkb8=", - "dev": true, - "requires": { - "assert-plus": "^0.2.0", - "jsprim": "^1.2.2", - "sshpk": "^1.7.0" - } - }, - "image-size": { - "version": "0.5.5", - "resolved": "https://registry.npmjs.org/image-size/-/image-size-0.5.5.tgz", - "integrity": "sha1-Cd/Uq50g4p6xw+gLiZA3jfnjy5w=", - "dev": true, - "optional": true - }, - "in-publish": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/in-publish/-/in-publish-2.0.0.tgz", - "integrity": "sha1-4g/146KvwmkDILbcVSaCqcf631E=", - "dev": true - }, - "indent-string": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-2.1.0.tgz", - "integrity": "sha1-ji1INIdCEhtKghi3oTfppSBJ3IA=", - "dev": true, - "requires": { - "repeating": "^2.0.0" - } - }, - "inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", - "dev": true, - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", - "dev": true - }, - "invert-kv": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", - "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=", - "dev": true - }, - "is-arrayish": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", - "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", - "dev": true - }, - "is-binary-path": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz", - "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", - "dev": true, - "requires": { - "binary-extensions": "^1.0.0" - } - }, - "is-buffer": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", - "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", - "dev": true - }, - "is-builtin-module": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz", - "integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=", - "dev": true, - "requires": { - "builtin-modules": "^1.0.0" - } - }, - "is-dotfile": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/is-dotfile/-/is-dotfile-1.0.3.tgz", - "integrity": "sha1-pqLzL/0t+wT1yiXs0Pa4PPeYoeE=", - "dev": true - }, - "is-equal-shallow": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz", - "integrity": "sha1-IjgJj8Ih3gvPpdnqxMRdY4qhxTQ=", - "dev": true, - "requires": { - "is-primitive": "^2.0.0" - } - }, - "is-extendable": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", - "dev": true - }, - "is-extglob": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", - "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", - "dev": true - }, - "is-finite": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.0.2.tgz", - "integrity": "sha1-zGZ3aVYCvlUO8R6LSqYwU0K20Ko=", - "dev": true, - "requires": { - "number-is-nan": "^1.0.0" - } - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", - "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", - "dev": true, - "requires": { - "number-is-nan": "^1.0.0" - } - }, - "is-glob": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", - "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", - "dev": true, - "requires": { - "is-extglob": "^1.0.0" - } - }, - "is-module": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-module/-/is-module-1.0.0.tgz", - "integrity": "sha1-Mlj7afeMFNW4FdZkM2tM/7ZEFZE=", - "dev": true - }, - "is-my-ip-valid": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-my-ip-valid/-/is-my-ip-valid-1.0.0.tgz", - "integrity": "sha512-gmh/eWXROncUzRnIa1Ubrt5b8ep/MGSnfAUI3aRp+sqTCs1tv1Isl8d8F6JmkN3dXKc3ehZMrtiPN9eL03NuaQ==", - "dev": true - }, - "is-my-json-valid": { - "version": "2.17.2", - "resolved": "https://registry.npmjs.org/is-my-json-valid/-/is-my-json-valid-2.17.2.tgz", - "integrity": "sha512-IBhBslgngMQN8DDSppmgDv7RNrlFotuuDsKcrCP3+HbFaVivIBU7u9oiiErw8sH4ynx3+gOGQ3q2otkgiSi6kg==", - "dev": true, - "requires": { - "generate-function": "^2.0.0", - "generate-object-property": "^1.1.0", - "is-my-ip-valid": "^1.0.0", - "jsonpointer": "^4.0.0", - "xtend": "^4.0.0" - } - }, - "is-number": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-2.1.0.tgz", - "integrity": "sha1-Afy7s5NGOlSPL0ZszhbezknbkI8=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - } - }, - "is-posix-bracket": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz", - "integrity": "sha1-MzTceXdDaOkvAW5vvAqI9c1ua8Q=", - "dev": true - }, - "is-primitive": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-primitive/-/is-primitive-2.0.0.tgz", - "integrity": "sha1-IHurkWOEmcB7Kt8kCkGochADRXU=", - "dev": true - }, - "is-property": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz", - "integrity": "sha1-V/4cTkhHTt1lsJkR8msc1Ald2oQ=", - "dev": true - }, - "is-stream": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", - "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", - "dev": true - }, - "is-typedarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", - "dev": true - }, - "is-utf8": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", - "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=", - "dev": true - }, - "is-valid-glob": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/is-valid-glob/-/is-valid-glob-0.3.0.tgz", - "integrity": "sha1-1LVcafUYhvm2XHDWwmItN+KfSP4=", - "dev": true - }, - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", - "dev": true - }, - "isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", - "dev": true - }, - "isobject": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", - "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", - "dev": true, - "requires": { - "isarray": "1.0.0" - } - }, - "isstream": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", - "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=", - "dev": true - }, - "js-base64": { - "version": "2.4.5", - "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.4.5.tgz", - "integrity": "sha512-aUnNwqMOXw3yvErjMPSQu6qIIzUmT1e5KcU1OZxRDU1g/am6mzBvcrmLAYwzmB59BHPrh5/tKaiF4OPhqRWESQ==", - "dev": true - }, - "jsbn": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", - "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", - "dev": true, - "optional": true - }, - "json-schema": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", - "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=", - "dev": true - }, - "json-stable-stringify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz", - "integrity": "sha1-mnWdOcXy/1A/1TAGRu1EX4jE+a8=", - "dev": true, - "requires": { - "jsonify": "~0.0.0" - } - }, - "json-stringify-safe": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", - "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", - "dev": true - }, - "jsonfile": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", - "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.6" - } - }, - "jsonify": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz", - "integrity": "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=", - "dev": true - }, - "jsonpointer": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/jsonpointer/-/jsonpointer-4.0.1.tgz", - "integrity": "sha1-T9kss04OnbPInIYi7PUfm5eMbLk=", - "dev": true - }, - "jsprim": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", - "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", - "dev": true, - "requires": { - "assert-plus": "1.0.0", - "extsprintf": "1.3.0", - "json-schema": "0.2.3", - "verror": "1.10.0" - }, - "dependencies": { - "assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", - "dev": true - } - } - }, - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - }, - "lazystream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/lazystream/-/lazystream-1.0.0.tgz", - "integrity": "sha1-9plf4PggOS9hOWvolGJAe7dxaOQ=", - "dev": true, - "requires": { - "readable-stream": "^2.0.5" - } - }, - "lcid": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", - "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", - "dev": true, - "requires": { - "invert-kv": "^1.0.0" - } - }, - "less": { - "version": "2.7.3", - "resolved": "https://registry.npmjs.org/less/-/less-2.7.3.tgz", - "integrity": "sha512-KPdIJKWcEAb02TuJtaLrhue0krtRLoRoo7x6BNJIBelO00t/CCdJQUnHW5V34OnHMWzIktSalJxRO+FvytQlCQ==", - "dev": true, - "requires": { - "errno": "^0.1.1", - "graceful-fs": "^4.1.2", - "image-size": "~0.5.0", - "mime": "^1.2.11", - "mkdirp": "^0.5.0", - "promise": "^7.1.1", - "request": "2.81.0", - "source-map": "^0.5.3" - } - }, - "load-json-file": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", - "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "parse-json": "^2.2.0", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0", - "strip-bom": "^2.0.0" - } - }, - "lodash": { - "version": "4.17.10", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.10.tgz", - "integrity": "sha512-UejweD1pDoXu+AD825lWwp4ZGtSwgnpZxb3JDViD7StjQz+Nb/6l093lx4OQ0foGWNRoc19mWy7BzL+UAK2iVg==", - "dev": true - }, - "lodash._basecopy": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/lodash._basecopy/-/lodash._basecopy-3.0.1.tgz", - "integrity": "sha1-jaDmqHbPNEwK2KVIghEd08XHyjY=", - "dev": true - }, - "lodash._basetostring": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/lodash._basetostring/-/lodash._basetostring-3.0.1.tgz", - "integrity": "sha1-0YYdh3+CSlL2aYMtyvPuFVZqB9U=", - "dev": true - }, - "lodash._basevalues": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/lodash._basevalues/-/lodash._basevalues-3.0.0.tgz", - "integrity": "sha1-W3dXYoAr3j0yl1A+JjAIIP32Ybc=", - "dev": true - }, - "lodash._getnative": { - "version": "3.9.1", - "resolved": "https://registry.npmjs.org/lodash._getnative/-/lodash._getnative-3.9.1.tgz", - "integrity": "sha1-VwvH3t5G1hzc3mh9ZdPuy6o6r/U=", - "dev": true - }, - "lodash._isiterateecall": { - "version": "3.0.9", - "resolved": "https://registry.npmjs.org/lodash._isiterateecall/-/lodash._isiterateecall-3.0.9.tgz", - "integrity": "sha1-UgOte6Ql+uhCRg5pbbnPPmqsBXw=", - "dev": true - }, - "lodash._reescape": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/lodash._reescape/-/lodash._reescape-3.0.0.tgz", - "integrity": "sha1-Kx1vXf4HyKNVdT5fJ/rH8c3hYWo=", - "dev": true - }, - "lodash._reevaluate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/lodash._reevaluate/-/lodash._reevaluate-3.0.0.tgz", - "integrity": "sha1-WLx0xAZklTrgsSTYBpltrKQx4u0=", - "dev": true - }, - "lodash._reinterpolate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz", - "integrity": "sha1-DM8tiRZq8Ds2Y8eWU4t1rG4RTZ0=", - "dev": true - }, - "lodash._root": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/lodash._root/-/lodash._root-3.0.1.tgz", - "integrity": "sha1-+6HEUkwZ7ppfgTa0YJ8BfPTe1pI=", - "dev": true - }, - "lodash.assign": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/lodash.assign/-/lodash.assign-4.2.0.tgz", - "integrity": "sha1-DZnzzNem0mHRm9rrkkUAXShYCOc=", - "dev": true - }, - "lodash.clonedeep": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", - "integrity": "sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=", - "dev": true - }, - "lodash.escape": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/lodash.escape/-/lodash.escape-3.2.0.tgz", - "integrity": "sha1-mV7g3BjBtIzJLv+ucaEKq1tIdpg=", - "dev": true, - "requires": { - "lodash._root": "^3.0.0" - } - }, - "lodash.isarguments": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz", - "integrity": "sha1-L1c9hcaiQon/AGY7SRwdM4/zRYo=", - "dev": true - }, - "lodash.isarray": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/lodash.isarray/-/lodash.isarray-3.0.4.tgz", - "integrity": "sha1-eeTriMNqgSKvhvhEqpvNhRtfu1U=", - "dev": true - }, - "lodash.isequal": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz", - "integrity": "sha1-QVxEePK8wwEgwizhDtMib30+GOA=", - "dev": true - }, - "lodash.keys": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/lodash.keys/-/lodash.keys-3.1.2.tgz", - "integrity": "sha1-TbwEcrFWvlCgsoaFXRvQsMZWCYo=", - "dev": true, - "requires": { - "lodash._getnative": "^3.0.0", - "lodash.isarguments": "^3.0.0", - "lodash.isarray": "^3.0.0" - } - }, - "lodash.mergewith": { - "version": "4.6.1", - "resolved": "https://registry.npmjs.org/lodash.mergewith/-/lodash.mergewith-4.6.1.tgz", - "integrity": "sha512-eWw5r+PYICtEBgrBE5hhlT6aAa75f411bgDz/ZL2KZqYV03USvucsxcHUIlGTDTECs1eunpI7HOV7U+WLDvNdQ==", - "dev": true - }, - "lodash.restparam": { - "version": "3.6.1", - "resolved": "https://registry.npmjs.org/lodash.restparam/-/lodash.restparam-3.6.1.tgz", - "integrity": "sha1-k2pOMJ7zMKdkXtQUWYbIWuWyCAU=", - "dev": true - }, - "lodash.template": { - "version": "3.6.2", - "resolved": "https://registry.npmjs.org/lodash.template/-/lodash.template-3.6.2.tgz", - "integrity": "sha1-+M3sxhaaJVvpCYrosMU9N4kx0U8=", - "dev": true, - "requires": { - "lodash._basecopy": "^3.0.0", - "lodash._basetostring": "^3.0.0", - "lodash._basevalues": "^3.0.0", - "lodash._isiterateecall": "^3.0.0", - "lodash._reinterpolate": "^3.0.0", - "lodash.escape": "^3.0.0", - "lodash.keys": "^3.0.0", - "lodash.restparam": "^3.0.0", - "lodash.templatesettings": "^3.0.0" - } - }, - "lodash.templatesettings": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/lodash.templatesettings/-/lodash.templatesettings-3.1.1.tgz", - "integrity": "sha1-+zB4RHU7Zrnxr6VOJix0UwfbqOU=", - "dev": true, - "requires": { - "lodash._reinterpolate": "^3.0.0", - "lodash.escape": "^3.0.0" - } - }, - "loud-rejection": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/loud-rejection/-/loud-rejection-1.6.0.tgz", - "integrity": "sha1-W0b4AUft7leIcPCG0Eghz5mOVR8=", - "dev": true, - "requires": { - "currently-unhandled": "^0.4.1", - "signal-exit": "^3.0.0" - } - }, - "lru-cache": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.3.tgz", - "integrity": "sha512-fFEhvcgzuIoJVUF8fYr5KR0YqxD238zgObTps31YdADwPPAp82a4M8TrckkWyx7ekNlf9aBcVn81cFwwXngrJA==", - "dev": true, - "requires": { - "pseudomap": "^1.0.2", - "yallist": "^2.1.2" - } - }, - "magic-string": { - "version": "0.22.5", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.22.5.tgz", - "integrity": "sha512-oreip9rJZkzvA8Qzk9HFs8fZGF/u7H/gtrE8EN6RjKJ9kh2HlC+yQ2QezifqTZfGyiuAV0dRv5a+y/8gBb1m9w==", - "dev": true, - "requires": { - "vlq": "^0.2.2" - } - }, - "make-error": { - "version": "1.3.4", - "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.4.tgz", - "integrity": "sha512-0Dab5btKVPhibSalc9QGXb559ED7G7iLjFXBaj9Wq8O3vorueR5K5jaE3hkG6ZQINyhA/JgG6Qk4qdFQjsYV6g==", - "dev": true - }, - "map-obj": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", - "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=", - "dev": true - }, - "math-random": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/math-random/-/math-random-1.0.1.tgz", - "integrity": "sha1-izqsWIuKZuSXXjzepn97sylgH6w=", - "dev": true - }, - "meow": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/meow/-/meow-3.7.0.tgz", - "integrity": "sha1-cstmi0JSKCkKu/qFaJJYcwioAfs=", - "dev": true, - "requires": { - "camelcase-keys": "^2.0.0", - "decamelize": "^1.1.2", - "loud-rejection": "^1.0.0", - "map-obj": "^1.0.1", - "minimist": "^1.1.3", - "normalize-package-data": "^2.3.4", - "object-assign": "^4.0.1", - "read-pkg-up": "^1.0.1", - "redent": "^1.0.0", - "trim-newlines": "^1.0.0" - }, - "dependencies": { - "object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", - "dev": true - } - } - }, - "merge-stream": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-1.0.1.tgz", - "integrity": "sha1-QEEgLVCKNCugAXQAjfDCUbjBNeE=", - "dev": true, - "requires": { - "readable-stream": "^2.0.1" - } - }, - "micromatch": { - "version": "2.3.11", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz", - "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=", - "dev": true, - "requires": { - "arr-diff": "^2.0.0", - "array-unique": "^0.2.1", - "braces": "^1.8.2", - "expand-brackets": "^0.1.4", - "extglob": "^0.3.1", - "filename-regex": "^2.0.0", - "is-extglob": "^1.0.0", - "is-glob": "^2.0.1", - "kind-of": "^3.0.2", - "normalize-path": "^2.0.1", - "object.omit": "^2.0.0", - "parse-glob": "^3.0.4", - "regex-cache": "^0.4.2" - } - }, - "mime": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", - "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", - "dev": true, - "optional": true - }, - "mime-db": { - "version": "1.33.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.33.0.tgz", - "integrity": "sha512-BHJ/EKruNIqJf/QahvxwQZXKygOQ256myeN/Ew+THcAa5q+PjyTTMMeNQC4DZw5AwfvelsUrA6B67NKMqXDbzQ==", - "dev": true - }, - "mime-types": { - "version": "2.1.18", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.18.tgz", - "integrity": "sha512-lc/aahn+t4/SWV/qcmumYjymLsWfN3ELhpmVuUFjgsORruuZPVSwAQryq+HHGvO/SI2KVX26bx+En+zhM8g8hQ==", - "dev": true, - "requires": { - "mime-db": "~1.33.0" - } - }, - "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "dev": true, - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", - "dev": true - }, - "mkdirp": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", - "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", - "dev": true, - "requires": { - "minimist": "0.0.8" - }, - "dependencies": { - "minimist": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", - "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", - "dev": true - } - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - }, - "multipipe": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/multipipe/-/multipipe-0.1.2.tgz", - "integrity": "sha1-Ko8t33Du1WTf8tV/HhoTfZ8FB4s=", - "dev": true, - "requires": { - "duplexer2": "0.0.2" - } - }, - "nan": { - "version": "2.10.0", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.10.0.tgz", - "integrity": "sha512-bAdJv7fBLhWC+/Bls0Oza+mvTaNQtP+1RyhhhvD95pgUJz6XM5IzgmxOkItJ9tkoCiplvAnXI1tNmmUD/eScyA==", - "dev": true - }, - "ng-packagr": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/ng-packagr/-/ng-packagr-1.7.0.tgz", - "integrity": "sha512-A7TX80ZNTCZYnhLCdSzuW+iXfeOkJ1yH3EwSdbxC546ztvpqBXoIG6ytTJsOskMi9R1uFn2P7wcqA8+MdxfNZg==", - "dev": true, - "requires": { - "@angular/tsc-wrapped": "^4.4.5", - "@ngtools/json-schema": "^1.1.0", - "autoprefixer": "^7.1.1", - "browserslist": "^2.1.5", - "commander": "^2.11.0", - "cpx": "^1.5.0", - "fs-extra": "^4.0.2", - "glob": "^7.1.2", - "gulp-inline-ng2-template": "^4.0.0", - "less": "^2.7.2", - "lodash": "^4.17.4", - "node-sass": "^4.5.3", - "postcss": "^6.0.2", - "read-file": "^0.2.0", - "rimraf": "^2.6.1", - "rollup": "^0.51.0", - "rollup-plugin-commonjs": "^8.2.1", - "rollup-plugin-node-resolve": "^3.0.0", - "sorcery": "^0.10.0", - "stylus": "^0.54.5", - "ts-node": "^3.0.4", - "uglify-js": "^3.0.7", - "vinyl-fs": "^2.4.4" - } - }, - "node-gyp": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-3.7.0.tgz", - "integrity": "sha512-qDQE/Ft9xXP6zphwx4sD0t+VhwV7yFaloMpfbL2QnnDZcyaiakWlLdtFGGQfTAwpFHdpbRhRxVhIHN1OKAjgbg==", - "dev": true, - "requires": { - "fstream": "^1.0.0", - "glob": "^7.0.3", - "graceful-fs": "^4.1.2", - "mkdirp": "^0.5.0", - "nopt": "2 || 3", - "npmlog": "0 || 1 || 2 || 3 || 4", - "osenv": "0", - "request": ">=2.9.0 <2.82.0", - "rimraf": "2", - "semver": "~5.3.0", - "tar": "^2.0.0", - "which": "1" - }, - "dependencies": { - "semver": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.3.0.tgz", - "integrity": "sha1-myzl094C0XxgEq0yaqa00M9U+U8=", - "dev": true - } - } - }, - "node-sass": { - "version": "4.9.0", - "resolved": "https://registry.npmjs.org/node-sass/-/node-sass-4.9.0.tgz", - "integrity": "sha512-QFHfrZl6lqRU3csypwviz2XLgGNOoWQbo2GOvtsfQqOfL4cy1BtWnhx/XUeAO9LT3ahBzSRXcEO6DdvAH9DzSg==", - "dev": true, - "requires": { - "async-foreach": "^0.1.3", - "chalk": "^1.1.1", - "cross-spawn": "^3.0.0", - "gaze": "^1.0.0", - "get-stdin": "^4.0.1", - "glob": "^7.0.3", - "in-publish": "^2.0.0", - "lodash.assign": "^4.2.0", - "lodash.clonedeep": "^4.3.2", - "lodash.mergewith": "^4.6.0", - "meow": "^3.7.0", - "mkdirp": "^0.5.1", - "nan": "^2.10.0", - "node-gyp": "^3.3.1", - "npmlog": "^4.0.0", - "request": "~2.79.0", - "sass-graph": "^2.2.4", - "stdout-stream": "^1.4.0", - "true-case-path": "^1.0.2" - }, - "dependencies": { - "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", - "dev": true - }, - "caseless": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.11.0.tgz", - "integrity": "sha1-cVuW6phBWTzDMGeSP17GDr2k99c=", - "dev": true - }, - "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", - "dev": true, - "requires": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" - } - }, - "har-validator": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-2.0.6.tgz", - "integrity": "sha1-zcvAgYgmWtEZtqWnyKtw7s+10n0=", - "dev": true, - "requires": { - "chalk": "^1.1.1", - "commander": "^2.9.0", - "is-my-json-valid": "^2.12.4", - "pinkie-promise": "^2.0.0" - } - }, - "qs": { - "version": "6.3.2", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.3.2.tgz", - "integrity": "sha1-51vV9uJoEioqDgvaYwslUMFmUCw=", - "dev": true - }, - "request": { - "version": "2.79.0", - "resolved": "https://registry.npmjs.org/request/-/request-2.79.0.tgz", - "integrity": "sha1-Tf5b9r6LjNw3/Pk+BLZVd3InEN4=", - "dev": true, - "requires": { - "aws-sign2": "~0.6.0", - "aws4": "^1.2.1", - "caseless": "~0.11.0", - "combined-stream": "~1.0.5", - "extend": "~3.0.0", - "forever-agent": "~0.6.1", - "form-data": "~2.1.1", - "har-validator": "~2.0.6", - "hawk": "~3.1.3", - "http-signature": "~1.1.0", - "is-typedarray": "~1.0.0", - "isstream": "~0.1.2", - "json-stringify-safe": "~5.0.1", - "mime-types": "~2.1.7", - "oauth-sign": "~0.8.1", - "qs": "~6.3.0", - "stringstream": "~0.0.4", - "tough-cookie": "~2.3.0", - "tunnel-agent": "~0.4.1", - "uuid": "^3.0.0" - } - }, - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", - "dev": true - }, - "tunnel-agent": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.4.3.tgz", - "integrity": "sha1-Y3PbdpCf5XDgjXNYM2Xtgop07us=", - "dev": true - } - } - }, - "nopt": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz", - "integrity": "sha1-xkZdvwirzU2zWTF/eaxopkayj/k=", - "dev": true, - "requires": { - "abbrev": "1" - } - }, - "normalize-package-data": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.4.0.tgz", - "integrity": "sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw==", - "dev": true, - "requires": { - "hosted-git-info": "^2.1.4", - "is-builtin-module": "^1.0.0", - "semver": "2 || 3 || 4 || 5", - "validate-npm-package-license": "^3.0.1" - } - }, - "normalize-path": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", - "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", - "dev": true, - "requires": { - "remove-trailing-separator": "^1.0.1" - } - }, - "normalize-range": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/normalize-range/-/normalize-range-0.1.2.tgz", - "integrity": "sha1-LRDAa9/TEuqXd2laTShDlFa3WUI=", - "dev": true - }, - "npmlog": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz", - "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==", - "dev": true, - "requires": { - "are-we-there-yet": "~1.1.2", - "console-control-strings": "~1.1.0", - "gauge": "~2.7.3", - "set-blocking": "~2.0.0" - } - }, - "num2fraction": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/num2fraction/-/num2fraction-1.2.2.tgz", - "integrity": "sha1-b2gragJ6Tp3fpFZM0lidHU5mnt4=", - "dev": true - }, - "number-is-nan": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", - "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", - "dev": true - }, - "oauth-sign": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.8.2.tgz", - "integrity": "sha1-Rqarfwrq2N6unsBWV4C31O/rnUM=", - "dev": true - }, - "object-assign": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-3.0.0.tgz", - "integrity": "sha1-m+3VygiXlJvKR+f/QIBi1Un1h/I=", - "dev": true - }, - "object.omit": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/object.omit/-/object.omit-2.0.1.tgz", - "integrity": "sha1-Gpx0SCnznbuFjHbKNXmuKlTr0fo=", - "dev": true, - "requires": { - "for-own": "^0.1.4", - "is-extendable": "^0.1.1" - } - }, - "once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", - "dev": true, - "requires": { - "wrappy": "1" - } - }, - "ordered-read-streams": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/ordered-read-streams/-/ordered-read-streams-0.3.0.tgz", - "integrity": "sha1-cTfmmzKYuzQiR6G77jiByA4v14s=", - "dev": true, - "requires": { - "is-stream": "^1.0.1", - "readable-stream": "^2.0.1" - } - }, - "os-homedir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", - "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", - "dev": true - }, - "os-locale": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", - "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=", - "dev": true, - "requires": { - "lcid": "^1.0.0" - } - }, - "os-tmpdir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", - "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", - "dev": true - }, - "osenv": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.5.tgz", - "integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==", - "dev": true, - "requires": { - "os-homedir": "^1.0.0", - "os-tmpdir": "^1.0.0" - } - }, - "parse-glob": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/parse-glob/-/parse-glob-3.0.4.tgz", - "integrity": "sha1-ssN2z7EfNVE7rdFz7wu246OIORw=", - "dev": true, - "requires": { - "glob-base": "^0.3.0", - "is-dotfile": "^1.0.0", - "is-extglob": "^1.0.0", - "is-glob": "^2.0.0" - } - }, - "parse-json": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", - "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", - "dev": true, - "requires": { - "error-ex": "^1.2.0" - } - }, - "parse-passwd": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/parse-passwd/-/parse-passwd-1.0.0.tgz", - "integrity": "sha1-bVuTSkVpk7I9N/QKOC1vFmao5cY=", - "dev": true - }, - "path-dirname": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz", - "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=", - "dev": true - }, - "path-exists": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", - "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", - "dev": true, - "requires": { - "pinkie-promise": "^2.0.0" - } - }, - "path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", - "dev": true - }, - "path-parse": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.5.tgz", - "integrity": "sha1-PBrfhx6pzWyUMbbqK9dKD/BVxME=", - "dev": true - }, - "path-type": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", - "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0" - } - }, - "performance-now": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-0.2.0.tgz", - "integrity": "sha1-M+8wxcd9TqIcWlOGnZG1bY8lVeU=", - "dev": true - }, - "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", - "dev": true - }, - "pinkie": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", - "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=", - "dev": true - }, - "pinkie-promise": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", - "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", - "dev": true, - "requires": { - "pinkie": "^2.0.0" - } - }, - "postcss": { - "version": "6.0.22", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.22.tgz", - "integrity": "sha512-Toc9lLoUASwGqxBSJGTVcOQiDqjK+Z2XlWBg+IgYwQMY9vA2f7iMpXVc1GpPcfTSyM5lkxNo0oDwDRO+wm7XHA==", - "dev": true, - "requires": { - "chalk": "^2.4.1", - "source-map": "^0.6.1", - "supports-color": "^5.4.0" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } - } - }, - "postcss-value-parser": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.0.tgz", - "integrity": "sha1-h/OPnxj3dKSrTIojL1xc6IcqnRU=", - "dev": true - }, - "preserve": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/preserve/-/preserve-0.2.0.tgz", - "integrity": "sha1-gV7R9uvGWSb4ZbMQwHE7yzMVzks=", - "dev": true - }, - "private": { - "version": "0.1.8", - "resolved": "https://registry.npmjs.org/private/-/private-0.1.8.tgz", - "integrity": "sha512-VvivMrbvd2nKkiG38qjULzlc+4Vx4wm/whI9pQD35YrARNnhxeiRktSOhSukRLFNlzg6Br/cJPet5J/u19r/mg==", - "dev": true - }, - "process-nextick-args": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", - "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==", - "dev": true - }, - "promise": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/promise/-/promise-7.3.1.tgz", - "integrity": "sha512-nolQXZ/4L+bP/UGlkfaIujX9BKxGwmQ9OT4mOt5yvy8iK1h3wqTEJCijzGANTCCl9nWjY41juyAn2K3Q1hLLTg==", - "dev": true, - "optional": true, - "requires": { - "asap": "~2.0.3" - } - }, - "prr": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz", - "integrity": "sha1-0/wRS6BplaRexok/SEzrHXj19HY=", - "dev": true, - "optional": true - }, - "pseudomap": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", - "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=", - "dev": true - }, - "punycode": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", - "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", - "dev": true - }, - "qs": { - "version": "6.4.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.4.0.tgz", - "integrity": "sha1-E+JtKK1rD/qpExLNO/cI7TUecjM=", - "dev": true - }, - "randomatic": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/randomatic/-/randomatic-3.0.0.tgz", - "integrity": "sha512-VdxFOIEY3mNO5PtSRkkle/hPJDHvQhK21oa73K4yAc9qmp6N429gAyF1gZMOTMeS0/AYzaV/2Trcef+NaIonSA==", - "dev": true, - "requires": { - "is-number": "^4.0.0", - "kind-of": "^6.0.0", - "math-random": "^1.0.1" - }, - "dependencies": { - "is-number": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-4.0.0.tgz", - "integrity": "sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ==", - "dev": true - }, - "kind-of": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", - "dev": true - } - } - }, - "read-file": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/read-file/-/read-file-0.2.0.tgz", - "integrity": "sha1-cMa6+IQux9FUD5gf0Oau1Mgb1UU=", - "dev": true - }, - "read-pkg": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", - "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", - "dev": true, - "requires": { - "load-json-file": "^1.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^1.0.0" - } - }, - "read-pkg-up": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", - "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", - "dev": true, - "requires": { - "find-up": "^1.0.0", - "read-pkg": "^1.0.0" - } - }, - "readable-stream": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", - "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "readdirp": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.1.0.tgz", - "integrity": "sha1-TtCtBg3zBzMAxIRANz9y0cxkLXg=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "minimatch": "^3.0.2", - "readable-stream": "^2.0.2", - "set-immediate-shim": "^1.0.1" - } - }, - "recast": { - "version": "0.11.23", - "resolved": "https://registry.npmjs.org/recast/-/recast-0.11.23.tgz", - "integrity": "sha1-RR/TAEqx5N+bTktmN2sqIZEkYtM=", - "dev": true, - "requires": { - "ast-types": "0.9.6", - "esprima": "~3.1.0", - "private": "~0.1.5", - "source-map": "~0.5.0" - } - }, - "redent": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/redent/-/redent-1.0.0.tgz", - "integrity": "sha1-z5Fqsf1fHxbfsggi3W7H9zDCr94=", - "dev": true, - "requires": { - "indent-string": "^2.1.0", - "strip-indent": "^1.0.1" - } - }, - "reflect-metadata": { - "version": "0.1.10", - "resolved": "https://registry.npmjs.org/reflect-metadata/-/reflect-metadata-0.1.10.tgz", - "integrity": "sha1-tPg3BEFqytiZiMmxVjXUfgO5NEo=", - "dev": true - }, - "regenerator-runtime": { - "version": "0.11.1", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz", - "integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==", - "dev": true - }, - "regex-cache": { - "version": "0.4.4", - "resolved": "https://registry.npmjs.org/regex-cache/-/regex-cache-0.4.4.tgz", - "integrity": "sha512-nVIZwtCjkC9YgvWkpM55B5rBhBYRZhAaJbgcFYXXsHnbZ9UZI9nnVWYZpBlCqv9ho2eZryPnWrZGsOdPwVWXWQ==", - "dev": true, - "requires": { - "is-equal-shallow": "^0.1.3" - } - }, - "remove-trailing-separator": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", - "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=", - "dev": true - }, - "repeat-element": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.2.tgz", - "integrity": "sha1-7wiaF40Ug7quTZPrmLT55OEdmQo=", - "dev": true - }, - "repeat-string": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", - "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", - "dev": true - }, - "repeating": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz", - "integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=", - "dev": true, - "requires": { - "is-finite": "^1.0.0" - } - }, - "replace-ext": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-0.0.1.tgz", - "integrity": "sha1-KbvZIHinOfC8zitO5B6DeVNSKSQ=", - "dev": true - }, - "request": { - "version": "2.81.0", - "resolved": "https://registry.npmjs.org/request/-/request-2.81.0.tgz", - "integrity": "sha1-xpKJRqDgbF+Nb4qTM0af/aRimKA=", - "dev": true, - "requires": { - "aws-sign2": "~0.6.0", - "aws4": "^1.2.1", - "caseless": "~0.12.0", - "combined-stream": "~1.0.5", - "extend": "~3.0.0", - "forever-agent": "~0.6.1", - "form-data": "~2.1.1", - "har-validator": "~4.2.1", - "hawk": "~3.1.3", - "http-signature": "~1.1.0", - "is-typedarray": "~1.0.0", - "isstream": "~0.1.2", - "json-stringify-safe": "~5.0.1", - "mime-types": "~2.1.7", - "oauth-sign": "~0.8.1", - "performance-now": "^0.2.0", - "qs": "~6.4.0", - "safe-buffer": "^5.0.1", - "stringstream": "~0.0.4", - "tough-cookie": "~2.3.0", - "tunnel-agent": "^0.6.0", - "uuid": "^3.0.0" - } - }, - "require-directory": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", - "dev": true - }, - "require-main-filename": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz", - "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=", - "dev": true - }, - "resolve": { - "version": "1.7.1", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.7.1.tgz", - "integrity": "sha512-c7rwLofp8g1U+h1KNyHL/jicrKg1Ek4q+Lr33AL65uZTinUZHe30D5HlyN5V9NW0JX1D5dXQ4jqW5l7Sy/kGfw==", - "dev": true, - "requires": { - "path-parse": "^1.0.5" - } - }, - "rimraf": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", - "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", - "dev": true, - "requires": { - "glob": "^7.0.5" - } - }, - "rollup": { - "version": "0.51.8", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-0.51.8.tgz", - "integrity": "sha512-e7FwWxqb4vhdonmwRH06nqC9wR6h1kZojK2D+lN1xjiB8FDtAKgy7o+r8fCXVzQZ1ZCdcVlls3mTq5g6u38Jew==", - "dev": true - }, - "rollup-plugin-commonjs": { - "version": "8.4.1", - "resolved": "https://registry.npmjs.org/rollup-plugin-commonjs/-/rollup-plugin-commonjs-8.4.1.tgz", - "integrity": "sha512-mg+WuD+jlwoo8bJtW3Mvx7Tz6TsIdMsdhuvCnDMoyjh0oxsVgsjB/N0X984RJCWwc5IIiqNVJhXeeITcc73++A==", - "dev": true, - "requires": { - "acorn": "^5.2.1", - "estree-walker": "^0.5.0", - "magic-string": "^0.22.4", - "resolve": "^1.4.0", - "rollup-pluginutils": "^2.0.1" - } - }, - "rollup-plugin-node-resolve": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/rollup-plugin-node-resolve/-/rollup-plugin-node-resolve-3.3.0.tgz", - "integrity": "sha512-9zHGr3oUJq6G+X0oRMYlzid9fXicBdiydhwGChdyeNRGPcN/majtegApRKHLR5drboUvEWU+QeUmGTyEZQs3WA==", - "dev": true, - "requires": { - "builtin-modules": "^2.0.0", - "is-module": "^1.0.0", - "resolve": "^1.1.6" - }, - "dependencies": { - "builtin-modules": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-2.0.0.tgz", - "integrity": "sha512-3U5kUA5VPsRUA3nofm/BXX7GVHKfxz0hOBAPxXrIvHzlDRkQVqEn6yi8QJegxl4LzOHLdvb7XF5dVawa/VVYBg==", - "dev": true - } - } - }, - "rollup-pluginutils": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/rollup-pluginutils/-/rollup-pluginutils-2.3.0.tgz", - "integrity": "sha512-xB6hsRsjdJdIYWEyYUJy/3ki5g69wrf0luHPGNK3ZSocV6HLNfio59l3dZ3TL4xUwEKgROhFi9jOCt6c5gfUWw==", - "dev": true, - "requires": { - "estree-walker": "^0.5.2", - "micromatch": "^2.3.11" - } - }, - "rxjs": { - "version": "5.5.2", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-5.5.2.tgz", - "integrity": "sha512-oRYoIKWBU3Ic37fLA5VJu31VqQO4bWubRntcHSJ+cwaDQBwdnZ9x4zmhJfm/nFQ2E82/I4loSioHnACamrKGgA==", - "dev": true, - "requires": { - "symbol-observable": "^1.0.1" - } - }, - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true - }, - "safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", - "dev": true - }, - "sander": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/sander/-/sander-0.5.1.tgz", - "integrity": "sha1-dB4kXiMfB8r7b98PEzrfohalAq0=", - "dev": true, - "requires": { - "es6-promise": "^3.1.2", - "graceful-fs": "^4.1.3", - "mkdirp": "^0.5.1", - "rimraf": "^2.5.2" - } - }, - "sass-graph": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/sass-graph/-/sass-graph-2.2.4.tgz", - "integrity": "sha1-E/vWPNHK8JCLn9k0dq1DpR0eC0k=", - "dev": true, - "requires": { - "glob": "^7.0.0", - "lodash": "^4.0.0", - "scss-tokenizer": "^0.2.3", - "yargs": "^7.0.0" - } - }, - "sax": { - "version": "0.5.8", - "resolved": "https://registry.npmjs.org/sax/-/sax-0.5.8.tgz", - "integrity": "sha1-1HLbIo6zMcJQaw6MFVJK25OdEsE=", - "dev": true - }, - "scss-tokenizer": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/scss-tokenizer/-/scss-tokenizer-0.2.3.tgz", - "integrity": "sha1-jrBtualyMzOCTT9VMGQRSYR85dE=", - "dev": true, - "requires": { - "js-base64": "^2.1.8", - "source-map": "^0.4.2" - }, - "dependencies": { - "source-map": { - "version": "0.4.4", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz", - "integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=", - "dev": true, - "requires": { - "amdefine": ">=0.0.4" - } - } - } - }, - "semver": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.0.tgz", - "integrity": "sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA==", - "dev": true - }, - "set-blocking": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", - "dev": true - }, - "set-immediate-shim": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz", - "integrity": "sha1-SysbJ+uAip+NzEgaWOXlb1mfP2E=", - "dev": true - }, - "shell-quote": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.6.1.tgz", - "integrity": "sha1-9HgZSczkAmlxJ0MOo7PFR29IF2c=", - "dev": true, - "requires": { - "array-filter": "~0.0.0", - "array-map": "~0.0.0", - "array-reduce": "~0.0.0", - "jsonify": "~0.0.0" - } - }, - "signal-exit": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", - "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", - "dev": true - }, - "sntp": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/sntp/-/sntp-1.0.9.tgz", - "integrity": "sha1-ZUEYTMkK7qbG57NeJlkIJEPGYZg=", - "dev": true, - "requires": { - "hoek": "2.x.x" - } - }, - "sorcery": { - "version": "0.10.0", - "resolved": "https://registry.npmjs.org/sorcery/-/sorcery-0.10.0.tgz", - "integrity": "sha1-iukK19fLBfxZ8asMY3hF1cFaUrc=", - "dev": true, - "requires": { - "buffer-crc32": "^0.2.5", - "minimist": "^1.2.0", - "sander": "^0.5.0", - "sourcemap-codec": "^1.3.0" - } - }, - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "dev": true - }, - "source-map-support": { - "version": "0.4.18", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.4.18.tgz", - "integrity": "sha512-try0/JqxPLF9nOjvSta7tVondkP5dwgyLDjVoyMDlmjugT2lRZ1OfsrYTkCd2hkDnJTKRbO/Rl3orm8vlsUzbA==", - "dev": true, - "requires": { - "source-map": "^0.5.6" - } - }, - "sourcemap-codec": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.1.tgz", - "integrity": "sha512-hX1eNBNuilj8yfFnECh0DzLgwKpBLMIvmhgEhixXNui8lMLBInTI8Kyxt++RwJnMNu7cAUo635L2+N1TxMJCzA==", - "dev": true - }, - "sparkles": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/sparkles/-/sparkles-1.0.1.tgz", - "integrity": "sha512-dSO0DDYUahUt/0/pD/Is3VIm5TGJjludZ0HVymmhYF6eNA53PVLhnUk0znSYbH8IYBuJdCE+1luR22jNLMaQdw==", - "dev": true - }, - "spdx-correct": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.0.0.tgz", - "integrity": "sha512-N19o9z5cEyc8yQQPukRCZ9EUmb4HUpnrmaL/fxS2pBo2jbfcFRVuFZ/oFC+vZz0MNNk0h80iMn5/S6qGZOL5+g==", - "dev": true, - "requires": { - "spdx-expression-parse": "^3.0.0", - "spdx-license-ids": "^3.0.0" - } - }, - "spdx-exceptions": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.1.0.tgz", - "integrity": "sha512-4K1NsmrlCU1JJgUrtgEeTVyfx8VaYea9J9LvARxhbHtVtohPs/gFGG5yy49beySjlIMhhXZ4QqujIZEfS4l6Cg==", - "dev": true - }, - "spdx-expression-parse": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz", - "integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==", - "dev": true, - "requires": { - "spdx-exceptions": "^2.1.0", - "spdx-license-ids": "^3.0.0" - } - }, - "spdx-license-ids": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.0.tgz", - "integrity": "sha512-2+EPwgbnmOIl8HjGBXXMd9NAu02vLjOO1nWw4kmeRDFyHn+M/ETfHxQUK0oXg8ctgVnl9t3rosNVsZ1jG61nDA==", - "dev": true - }, - "sshpk": { - "version": "1.14.2", - "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.14.2.tgz", - "integrity": "sha1-xvxhZIo9nE52T9P8306hBeSSupg=", - "dev": true, - "requires": { - "asn1": "~0.2.3", - "assert-plus": "^1.0.0", - "bcrypt-pbkdf": "^1.0.0", - "dashdash": "^1.12.0", - "ecc-jsbn": "~0.1.1", - "getpass": "^0.1.1", - "jsbn": "~0.1.0", - "safer-buffer": "^2.0.2", - "tweetnacl": "~0.14.0" - }, - "dependencies": { - "assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", - "dev": true - } - } - }, - "stdout-stream": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/stdout-stream/-/stdout-stream-1.4.0.tgz", - "integrity": "sha1-osfIWH5U2UJ+qe2zrD8s1SLfN4s=", - "dev": true, - "requires": { - "readable-stream": "^2.0.1" - } - }, - "stream-shift": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.0.tgz", - "integrity": "sha1-1cdSgl5TZ+eG944Y5EXqIjoVWVI=", - "dev": true - }, - "string-width": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", - "dev": true, - "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - } - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dev": true, - "requires": { - "safe-buffer": "~5.1.0" - } - }, - "stringstream": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.6.tgz", - "integrity": "sha512-87GEBAkegbBcweToUrdzf3eLhWNg06FJTebl4BVJz/JgWy8CvEr9dRtX5qWphiynMSQlxxi+QqN0z5T32SLlhA==", - "dev": true - }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", - "dev": true, - "requires": { - "ansi-regex": "^2.0.0" - } - }, - "strip-bom": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", - "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", - "dev": true, - "requires": { - "is-utf8": "^0.2.0" - } - }, - "strip-bom-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/strip-bom-stream/-/strip-bom-stream-1.0.0.tgz", - "integrity": "sha1-5xRDmFd9Uaa+0PoZlPoF9D/ZiO4=", - "dev": true, - "requires": { - "first-chunk-stream": "^1.0.0", - "strip-bom": "^2.0.0" - } - }, - "strip-indent": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-1.0.1.tgz", - "integrity": "sha1-DHlipq3vp7vUrDZkYKY4VSrhoKI=", - "dev": true, - "requires": { - "get-stdin": "^4.0.1" - } - }, - "strip-json-comments": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", - "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", - "dev": true - }, - "stylus": { - "version": "0.54.5", - "resolved": "https://registry.npmjs.org/stylus/-/stylus-0.54.5.tgz", - "integrity": "sha1-QrlWCTHKcJDOhRWnmLqeaqPW3Hk=", - "dev": true, - "requires": { - "css-parse": "1.7.x", - "debug": "*", - "glob": "7.0.x", - "mkdirp": "0.5.x", - "sax": "0.5.x", - "source-map": "0.1.x" - }, - "dependencies": { - "glob": { - "version": "7.0.6", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.0.6.tgz", - "integrity": "sha1-IRuvr0nlJbjNkyYNFKsTYVKz9Xo=", - "dev": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.2", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "source-map": { - "version": "0.1.43", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.1.43.tgz", - "integrity": "sha1-wkvBRspRfBRx9drL4lcbK3+eM0Y=", - "dev": true, - "requires": { - "amdefine": ">=0.0.4" - } - } - } - }, - "subarg": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/subarg/-/subarg-1.0.0.tgz", - "integrity": "sha1-9izxdYHplrSPyWVpn1TAauJouNI=", - "dev": true, - "requires": { - "minimist": "^1.1.0" - } - }, - "supports-color": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz", - "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - }, - "symbol-observable": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.0.4.tgz", - "integrity": "sha1-Kb9hXUqnEhvdiYsi1LP5vE4qoD0=", - "dev": true - }, - "tar": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/tar/-/tar-2.2.1.tgz", - "integrity": "sha1-jk0qJWwOIYXGsYrWlK7JaLg8sdE=", - "dev": true, - "requires": { - "block-stream": "*", - "fstream": "^1.0.2", - "inherits": "2" - } - }, - "through": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", - "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", - "dev": true - }, - "through2": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.3.tgz", - "integrity": "sha1-AARWmzfHx0ujnEPzzteNGtlBQL4=", - "dev": true, - "requires": { - "readable-stream": "^2.1.5", - "xtend": "~4.0.1" - } - }, - "through2-filter": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/through2-filter/-/through2-filter-2.0.0.tgz", - "integrity": "sha1-YLxVoNrLdghdsfna6Zq0P4PWIuw=", - "dev": true, - "requires": { - "through2": "~2.0.0", - "xtend": "~4.0.0" - } - }, - "time-stamp": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/time-stamp/-/time-stamp-1.1.0.tgz", - "integrity": "sha1-dkpaEa9QVhkhsTPztE5hhofg9cM=", - "dev": true - }, - "to-absolute-glob": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/to-absolute-glob/-/to-absolute-glob-0.1.1.tgz", - "integrity": "sha1-HN+kcqnvUMI57maZm2YsoOs5k38=", - "dev": true, - "requires": { - "extend-shallow": "^2.0.1" - } - }, - "tough-cookie": { - "version": "2.3.4", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.4.tgz", - "integrity": "sha512-TZ6TTfI5NtZnuyy/Kecv+CnoROnyXn2DN97LontgQpCwsX2XyLYCC0ENhYkehSOwAp8rTQKc/NUIF7BkQ5rKLA==", - "dev": true, - "requires": { - "punycode": "^1.4.1" - } - }, - "trim-newlines": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-1.0.0.tgz", - "integrity": "sha1-WIeWa7WCpFA6QetST301ARgVphM=", - "dev": true - }, - "true-case-path": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/true-case-path/-/true-case-path-1.0.2.tgz", - "integrity": "sha1-fskRMJJHZsf1c74wIMNPj9/QDWI=", - "dev": true, - "requires": { - "glob": "^6.0.4" - }, - "dependencies": { - "glob": { - "version": "6.0.4", - "resolved": "https://registry.npmjs.org/glob/-/glob-6.0.4.tgz", - "integrity": "sha1-DwiGD2oVUSey+t1PnOJLGqtuTSI=", - "dev": true, - "requires": { - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "2 || 3", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - } - } - }, - "ts-node": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-3.3.0.tgz", - "integrity": "sha1-wTxqMCTjC+EYDdUwOPwgkonUv2k=", - "dev": true, - "requires": { - "arrify": "^1.0.0", - "chalk": "^2.0.0", - "diff": "^3.1.0", - "make-error": "^1.1.1", - "minimist": "^1.2.0", - "mkdirp": "^0.5.1", - "source-map-support": "^0.4.0", - "tsconfig": "^6.0.0", - "v8flags": "^3.0.0", - "yn": "^2.0.0" - } - }, - "tsconfig": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/tsconfig/-/tsconfig-6.0.0.tgz", - "integrity": "sha1-aw6DdgA9evGGT434+J3QBZ/80DI=", - "dev": true, - "requires": { - "strip-bom": "^3.0.0", - "strip-json-comments": "^2.0.0" - }, - "dependencies": { - "strip-bom": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", - "dev": true - } - } - }, - "tsickle": { - "version": "0.21.6", - "resolved": "https://registry.npmjs.org/tsickle/-/tsickle-0.21.6.tgz", - "integrity": "sha1-U7Abl5xcE/2xOvs/uVgXflmRWI0=", - "dev": true, - "requires": { - "minimist": "^1.2.0", - "mkdirp": "^0.5.1", - "source-map": "^0.5.6", - "source-map-support": "^0.4.2" - } - }, - "tslib": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.8.0.tgz", - "integrity": "sha512-ymKWWZJST0/CkgduC2qkzjMOWr4bouhuURNXCn/inEX0L57BnRG6FhX76o7FOnsjHazCjfU2LKeSrlS2sIKQJg==", - "dev": true - }, - "tunnel-agent": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", - "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", - "dev": true, - "requires": { - "safe-buffer": "^5.0.1" - } - }, - "tweetnacl": { - "version": "0.14.5", - "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", - "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", - "dev": true, - "optional": true - }, - "typescript": { - "version": "2.5.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-2.5.3.tgz", - "integrity": "sha512-ptLSQs2S4QuS6/OD1eAKG+S5G8QQtrU5RT32JULdZQtM1L3WTi34Wsu48Yndzi8xsObRAB9RPt/KhA9wlpEF6w==", - "dev": true - }, - "uglify-js": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.4.0.tgz", - "integrity": "sha512-Jcf5naPkX3rVPSQpRn9Vm6Rr572I1gTtR9LnqKgXjmOgfYQ/QS0V2WRStFR53Bdj520M66aCZqt9uzYXgtGrJQ==", - "dev": true, - "requires": { - "commander": "~2.15.0", - "source-map": "~0.6.1" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } - } - }, - "unique-stream": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/unique-stream/-/unique-stream-2.2.1.tgz", - "integrity": "sha1-WqADz76Uxf+GbE59ZouxxNuts2k=", - "dev": true, - "requires": { - "json-stable-stringify": "^1.0.0", - "through2-filter": "^2.0.0" - } - }, - "universalify": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.1.tgz", - "integrity": "sha1-+nG63UQ3r0wUiEHjs7Fl+enlkLc=", - "dev": true - }, - "util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", - "dev": true - }, - "uuid": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.2.1.tgz", - "integrity": "sha512-jZnMwlb9Iku/O3smGWvZhauCf6cvvpKi4BKRiliS3cxnI+Gz9j5MEpTz2UFuXiKPJocb7gnsLHwiS05ige5BEA==", - "dev": true - }, - "v8flags": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/v8flags/-/v8flags-3.1.1.tgz", - "integrity": "sha512-iw/1ViSEaff8NJ3HLyEjawk/8hjJib3E7pvG4pddVXfUg1983s3VGsiClDjhK64MQVDGqc1Q8r18S4VKQZS9EQ==", - "dev": true, - "requires": { - "homedir-polyfill": "^1.0.1" - } - }, - "vali-date": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/vali-date/-/vali-date-1.0.0.tgz", - "integrity": "sha1-G5BKWWCfsyjvB4E4Qgk09rhnCaY=", - "dev": true - }, - "validate-npm-package-license": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.3.tgz", - "integrity": "sha512-63ZOUnL4SIXj4L0NixR3L1lcjO38crAbgrTpl28t8jjrfuiOBL5Iygm+60qPs/KsZGzPNg6Smnc/oY16QTjF0g==", - "dev": true, - "requires": { - "spdx-correct": "^3.0.0", - "spdx-expression-parse": "^3.0.0" - } - }, - "verror": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", - "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", - "dev": true, - "requires": { - "assert-plus": "^1.0.0", - "core-util-is": "1.0.2", - "extsprintf": "^1.2.0" - }, - "dependencies": { - "assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", - "dev": true - } - } - }, - "vinyl": { - "version": "0.5.3", - "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-0.5.3.tgz", - "integrity": "sha1-sEVbOPxeDPMNQyUTLkYZcMIJHN4=", - "dev": true, - "requires": { - "clone": "^1.0.0", - "clone-stats": "^0.0.1", - "replace-ext": "0.0.1" - } - }, - "vinyl-fs": { - "version": "2.4.4", - "resolved": "https://registry.npmjs.org/vinyl-fs/-/vinyl-fs-2.4.4.tgz", - "integrity": "sha1-vm/zJwy1Xf19MGNkDegfJddTIjk=", - "dev": true, - "requires": { - "duplexify": "^3.2.0", - "glob-stream": "^5.3.2", - "graceful-fs": "^4.0.0", - "gulp-sourcemaps": "1.6.0", - "is-valid-glob": "^0.3.0", - "lazystream": "^1.0.0", - "lodash.isequal": "^4.0.0", - "merge-stream": "^1.0.0", - "mkdirp": "^0.5.0", - "object-assign": "^4.0.0", - "readable-stream": "^2.0.4", - "strip-bom": "^2.0.0", - "strip-bom-stream": "^1.0.0", - "through2": "^2.0.0", - "through2-filter": "^2.0.0", - "vali-date": "^1.0.0", - "vinyl": "^1.0.0" - }, - "dependencies": { - "object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", - "dev": true - }, - "vinyl": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-1.2.0.tgz", - "integrity": "sha1-XIgDbPVl5d8FVYv8kR+GVt8hiIQ=", - "dev": true, - "requires": { - "clone": "^1.0.0", - "clone-stats": "^0.0.1", - "replace-ext": "0.0.1" - } - } - } - }, - "vlq": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/vlq/-/vlq-0.2.3.tgz", - "integrity": "sha512-DRibZL6DsNhIgYQ+wNdWDL2SL3bKPlVrRiBqV5yuMm++op8W4kGFtaQfCs4KEJn0wBZcHVHJ3eoywX8983k1ow==", - "dev": true - }, - "which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", - "dev": true, - "requires": { - "isexe": "^2.0.0" - } - }, - "which-module": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/which-module/-/which-module-1.0.0.tgz", - "integrity": "sha1-u6Y8qGGUiZT/MHc2CJ47lgJsKk8=", - "dev": true - }, - "wide-align": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", - "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", - "dev": true, - "requires": { - "string-width": "^1.0.2 || 2" - } - }, - "wrap-ansi": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", - "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", - "dev": true, - "requires": { - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1" - } - }, - "wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", - "dev": true - }, - "xtend": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", - "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=", - "dev": true - }, - "y18n": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz", - "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=", - "dev": true - }, - "yallist": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", - "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=", - "dev": true - }, - "yargs": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-7.1.0.tgz", - "integrity": "sha1-a6MY6xaWFyf10oT46gA+jWFU0Mg=", - "dev": true, - "requires": { - "camelcase": "^3.0.0", - "cliui": "^3.2.0", - "decamelize": "^1.1.1", - "get-caller-file": "^1.0.1", - "os-locale": "^1.4.0", - "read-pkg-up": "^1.0.1", - "require-directory": "^2.1.1", - "require-main-filename": "^1.0.1", - "set-blocking": "^2.0.0", - "string-width": "^1.0.2", - "which-module": "^1.0.0", - "y18n": "^3.2.1", - "yargs-parser": "^5.0.0" - }, - "dependencies": { - "camelcase": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz", - "integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo=", - "dev": true - } - } - }, - "yargs-parser": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-5.0.0.tgz", - "integrity": "sha1-J17PDX/+Bcd+ZOfIbkzZS/DhIoo=", - "dev": true, - "requires": { - "camelcase": "^3.0.0" - }, - "dependencies": { - "camelcase": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz", - "integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo=", - "dev": true - } - } - }, - "yn": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/yn/-/yn-2.0.0.tgz", - "integrity": "sha1-5a2ryKz0CPY4X8dklWhMiOavaJo=", - "dev": true - }, - "zone.js": { - "version": "0.7.8", - "resolved": "https://registry.npmjs.org/zone.js/-/zone.js-0.7.8.tgz", - "integrity": "sha1-Tz/og01EWX8mOQU6D6Q43zT//e0=", - "dev": true - } - } -} diff --git a/samples/client/petstore/typescript-angular-v4.3/npm/package.json b/samples/client/petstore/typescript-angular-v4.3/npm/package.json deleted file mode 100644 index 55560fbce94..00000000000 --- a/samples/client/petstore/typescript-angular-v4.3/npm/package.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "name": "@openapitools/angular2-typescript-petstore", - "version": "0.0.1", - "description": "OpenAPI client for @openapitools/angular2-typescript-petstore", - "author": "OpenAPI-Generator Contributors", - "keywords": [ - "openapi-client", - "openapi-generator" - ], - "license": "Unlicense", - "scripts": { - "build": "ng-packagr -p ng-package.json" - }, - "peerDependencies": { - "@angular/core": "^4.3.0", - "@angular/common": "^4.3.0", - "@angular/compiler": "^4.3.0", - "core-js": "^2.4.0", - "reflect-metadata": "^0.1.3", - "rxjs": "^5.4.0" - }, - "devDependencies": { - "@angular/common": "^4.3.0", - "@angular/compiler": "^4.3.0", - "@angular/compiler-cli": "^4.3.0", - "@angular/core": "^4.3.0", - "@angular/platform-browser": "^4.3.0", - "ng-packagr": "^1.6.0", - "reflect-metadata": "^0.1.3", - "rxjs": "^5.4.0", - "typescript": ">=2.1.5 <2.8.0", - "zone.js": "^0.7.6" - }, - "publishConfig": { - "registry": "https://skimdb.npmjs.com/registry" - } -} diff --git a/samples/client/petstore/typescript-angular-v4.3/npm/pom.xml b/samples/client/petstore/typescript-angular-v4.3/npm/pom.xml deleted file mode 100644 index 5d48e6a3e73..00000000000 --- a/samples/client/petstore/typescript-angular-v4.3/npm/pom.xml +++ /dev/null @@ -1,60 +0,0 @@ - - 4.0.0 - org.openapitools - TSAngular43PestoreClientTests - pom - 1.0-SNAPSHOT - TS Angular 4.3 Petstore Client Tests - - - - maven-dependency-plugin - - - package - - copy-dependencies - - - ${project.build.directory} - - - - - - org.codehaus.mojo - exec-maven-plugin - 1.2.1 - - - npm-install - pre-integration-test - - exec - - - npm - - install - - - - - npm-run-build - integration-test - - exec - - - npm - - run - build - - - - - - - - diff --git a/samples/client/petstore/typescript-angular-v4.3/npm/rxjs-operators.ts b/samples/client/petstore/typescript-angular-v4.3/npm/rxjs-operators.ts deleted file mode 100644 index 5659cd0694f..00000000000 --- a/samples/client/petstore/typescript-angular-v4.3/npm/rxjs-operators.ts +++ /dev/null @@ -1,11 +0,0 @@ -// RxJS imports according to https://angular.io/docs/ts/latest/guide/server-communication.html#!#rxjs - -// See node_module/rxjs/Rxjs.js -// Import just the rxjs statics and operators we need for THIS app. - -// Statics -import 'rxjs/add/observable/throw'; - -// Operators -import 'rxjs/add/operator/catch'; -import 'rxjs/add/operator/map'; diff --git a/samples/client/petstore/typescript-angular-v4.3/npm/tsconfig.json b/samples/client/petstore/typescript-angular-v4.3/npm/tsconfig.json deleted file mode 100644 index c01ebe255d4..00000000000 --- a/samples/client/petstore/typescript-angular-v4.3/npm/tsconfig.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "compilerOptions": { - "emitDecoratorMetadata": true, - "experimentalDecorators": true, - "noImplicitAny": false, - "suppressImplicitAnyIndexErrors": true, - "target": "es5", - "module": "commonjs", - "moduleResolution": "node", - "removeComments": true, - "sourceMap": true, - "outDir": "./dist", - "noLib": false, - "declaration": true, - "lib": [ "es6", "dom" ], - "typeRoots": [ - "node_modules/@types" - ] - }, - "exclude": [ - "node_modules", - "dist" - ], - "filesGlob": [ - "./model/*.ts", - "./api/*.ts" - ] -} diff --git a/samples/client/petstore/typescript-angular-v4.3/npm/variables.ts b/samples/client/petstore/typescript-angular-v4.3/npm/variables.ts deleted file mode 100644 index 6fe58549f39..00000000000 --- a/samples/client/petstore/typescript-angular-v4.3/npm/variables.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { InjectionToken } from '@angular/core'; - -export const BASE_PATH = new InjectionToken('basePath'); -export const COLLECTION_FORMATS = { - 'csv': ',', - 'tsv': ' ', - 'ssv': ' ', - 'pipes': '|' -} diff --git a/samples/client/petstore/typescript-angular-v4/npm/.gitignore b/samples/client/petstore/typescript-angular-v4/npm/.gitignore deleted file mode 100644 index 149b5765472..00000000000 --- a/samples/client/petstore/typescript-angular-v4/npm/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -wwwroot/*.js -node_modules -typings -dist diff --git a/samples/client/petstore/typescript-angular-v4/npm/.openapi-generator-ignore b/samples/client/petstore/typescript-angular-v4/npm/.openapi-generator-ignore deleted file mode 100644 index 7484ee590a3..00000000000 --- a/samples/client/petstore/typescript-angular-v4/npm/.openapi-generator-ignore +++ /dev/null @@ -1,23 +0,0 @@ -# OpenAPI Generator Ignore -# Generated by openapi-generator https://github.com/openapitools/openapi-generator - -# Use this file to prevent files from being overwritten by the generator. -# The patterns follow closely to .gitignore or .dockerignore. - -# As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: -#ApiClient.cs - -# You can match any string of characters against a directory, file or extension with a single asterisk (*): -#foo/*/qux -# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux - -# You can recursively match patterns against a directory, file or extension with a double asterisk (**): -#foo/**/qux -# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux - -# You can also negate patterns with an exclamation (!). -# For example, you can ignore all files in a docs folder with the file extension .md: -#docs/*.md -# Then explicitly reverse the ignore rule for a single file: -#!docs/README.md diff --git a/samples/client/petstore/typescript-angular-v4/npm/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v4/npm/.openapi-generator/VERSION deleted file mode 100644 index d99e7162d01..00000000000 --- a/samples/client/petstore/typescript-angular-v4/npm/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -5.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v4/npm/README.md b/samples/client/petstore/typescript-angular-v4/npm/README.md deleted file mode 100644 index 790d0e9f282..00000000000 --- a/samples/client/petstore/typescript-angular-v4/npm/README.md +++ /dev/null @@ -1,201 +0,0 @@ -## @openapitools/angular2-typescript-petstore@0.0.1 - -### Building - -To install the required dependencies and to build the typescript sources run: -``` -npm install -npm run build -``` - -### publishing - -First build the package then run ```npm publish dist``` (don't forget to specify the `dist` folder!) - -### consuming - -Navigate to the folder of your consuming project and run one of next commands. - -_published:_ - -``` -npm install @openapitools/angular2-typescript-petstore@0.0.1 --save -``` - -_without publishing (not recommended):_ - -``` -npm install PATH_TO_GENERATED_PACKAGE/dist.tgz --save -``` - -_It's important to take the tgz file, otherwise you'll get trouble with links on windows_ - -_using `npm link`:_ - -In PATH_TO_GENERATED_PACKAGE/dist: -``` -npm link -``` - -In your project: -``` -npm link @openapitools/angular2-typescript-petstore -``` - -__Note for Windows users:__ The Angular CLI has troubles to use linked npm packages. -Please refer to this issue https://github.com/angular/angular-cli/issues/8284 for a solution / workaround. -Published packages are not effected by this issue. - - -#### General usage - -In your Angular project: - - -``` -// without configuring providers -import { ApiModule } from '@openapitools/angular2-typescript-petstore'; - -import { HttpModule } from '@angular/http'; - -@NgModule({ - imports: [ - ApiModule, - HttpModule - ], - declarations: [ AppComponent ], - providers: [], - bootstrap: [ AppComponent ] -}) -export class AppModule {} -``` - -``` -// configuring providers -import { ApiModule, Configuration, ConfigurationParameters } from '@openapitools/angular2-typescript-petstore'; - -export function apiConfigFactory (): Configuration => { - const params: ConfigurationParameters = { - // set configuration parameters here. - } - return new Configuration(params); -} - -@NgModule({ - imports: [ ApiModule.forRoot(apiConfigFactory) ], - declarations: [ AppComponent ], - providers: [], - bootstrap: [ AppComponent ] -}) -export class AppModule {} -``` - -``` -// configuring providers with an authentication service that manages your access tokens -import { ApiModule, Configuration } from '@openapitools/angular2-typescript-petstore'; - -@NgModule({ - imports: [ ApiModule ], - declarations: [ AppComponent ], - providers: [ - { - provide: Configuration, - useFactory: (authService: AuthService) => new Configuration( - { - basePath: environment.apiUrl, - accessToken: authService.getAccessToken.bind(authService) - } - ), - deps: [AuthService], - multi: false - } - ], - bootstrap: [ AppComponent ] -}) -export class AppModule {} -``` - -``` -import { DefaultApi } from '@openapitools/angular2-typescript-petstore'; - -export class AppComponent { - constructor(private apiGateway: DefaultApi) { } -} -``` - -Note: The ApiModule is restricted to being instantiated once app wide. -This is to ensure that all services are treated as singletons. - -#### Using multiple OpenAPI files / APIs / ApiModules -In order to use multiple `ApiModules` generated from different OpenAPI files, -you can create an alias name when importing the modules -in order to avoid naming conflicts: -``` -import { ApiModule } from 'my-api-path'; -import { ApiModule as OtherApiModule } from 'my-other-api-path'; - -import { HttpModule } from '@angular/http'; - -@NgModule({ - imports: [ - ApiModule, - OtherApiModule, - HttpModule - ] -}) -export class AppModule { - -} -``` - - -### Set service base path -If different than the generated base path, during app bootstrap, you can provide the base path to your service. - -``` -import { BASE_PATH } from '@openapitools/angular2-typescript-petstore'; - -bootstrap(AppComponent, [ - { provide: BASE_PATH, useValue: 'https://your-web-service.com' }, -]); -``` -or - -``` -import { BASE_PATH } from '@openapitools/angular2-typescript-petstore'; - -@NgModule({ - imports: [], - declarations: [ AppComponent ], - providers: [ provide: BASE_PATH, useValue: 'https://your-web-service.com' ], - bootstrap: [ AppComponent ] -}) -export class AppModule {} -``` - - -#### Using @angular/cli -First extend your `src/environments/*.ts` files by adding the corresponding base path: - -``` -export const environment = { - production: false, - API_BASE_PATH: 'http://127.0.0.1:8080' -}; -``` - -In the src/app/app.module.ts: -``` -import { BASE_PATH } from '@openapitools/angular2-typescript-petstore'; -import { environment } from '../environments/environment'; - -@NgModule({ - declarations: [ - AppComponent - ], - imports: [ ], - providers: [{ provide: BASE_PATH, useValue: environment.API_BASE_PATH }], - bootstrap: [ AppComponent ] -}) -export class AppModule { } -``` diff --git a/samples/client/petstore/typescript-angular-v4/npm/api.module.ts b/samples/client/petstore/typescript-angular-v4/npm/api.module.ts deleted file mode 100644 index d321b1180de..00000000000 --- a/samples/client/petstore/typescript-angular-v4/npm/api.module.ts +++ /dev/null @@ -1,37 +0,0 @@ -import { NgModule, ModuleWithProviders, SkipSelf, Optional } from '@angular/core'; -import { Configuration } from './configuration'; - -import { Http } from '@angular/http'; - -import { PetService } from './api/pet.service'; -import { StoreService } from './api/store.service'; -import { UserService } from './api/user.service'; - -@NgModule({ - imports: [], - declarations: [], - exports: [], - providers: [ - PetService, - StoreService, - UserService ] -}) -export class ApiModule { - public static forRoot(configurationFactory: () => Configuration): ModuleWithProviders { - return { - ngModule: ApiModule, - providers: [ { provide: Configuration, useFactory: configurationFactory } ] - }; - } - - constructor( @Optional() @SkipSelf() parentModule: ApiModule, - @Optional() http: Http) { - if (parentModule) { - throw new Error('ApiModule is already loaded. Import in your base AppModule only.'); - } - if (!http) { - throw new Error('You need to import the HttpModule in your AppModule! \n' + - 'See also https://github.com/angular/angular/issues/20575'); - } - } -} diff --git a/samples/client/petstore/typescript-angular-v4/npm/api/api.ts b/samples/client/petstore/typescript-angular-v4/npm/api/api.ts deleted file mode 100644 index 8e44b64083d..00000000000 --- a/samples/client/petstore/typescript-angular-v4/npm/api/api.ts +++ /dev/null @@ -1,7 +0,0 @@ -export * from './pet.service'; -import { PetService } from './pet.service'; -export * from './store.service'; -import { StoreService } from './store.service'; -export * from './user.service'; -import { UserService } from './user.service'; -export const APIS = [PetService, StoreService, UserService]; diff --git a/samples/client/petstore/typescript-angular-v4/npm/api/pet.service.ts b/samples/client/petstore/typescript-angular-v4/npm/api/pet.service.ts deleted file mode 100644 index 128c4d58bf7..00000000000 --- a/samples/client/petstore/typescript-angular-v4/npm/api/pet.service.ts +++ /dev/null @@ -1,714 +0,0 @@ -/** - * 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. - * - * The version of the OpenAPI document: 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. - */ -/* tslint:disable:no-unused-variable member-ordering */ - -import { Inject, Injectable, Optional } from '@angular/core'; -import { Http, Headers, URLSearchParams, - RequestMethod, RequestOptions, RequestOptionsArgs, - Response, ResponseContentType, QueryEncoder } from '@angular/http'; -import { CustomQueryEncoderHelper } from '../encoder'; -import { Observable } from 'rxjs/Observable'; -import '../rxjs-operators'; - -import { ApiResponse } from '../model/models'; -import { Pet } from '../model/models'; - -import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; -import { Configuration } from '../configuration'; - - - -@Injectable() -export class PetService { - - protected basePath = 'http://petstore.swagger.io/v2'; - public defaultHeaders = new Headers(); - public configuration = new Configuration(); - public encoder: QueryEncoder; - - constructor(protected http: Http, @Optional()@Inject(BASE_PATH) basePath: string, @Optional() configuration: Configuration) { - if (configuration) { - this.configuration = configuration; - } - if (typeof this.configuration.basePath !== 'string') { - if (typeof basePath !== 'string') { - basePath = this.basePath; - } - this.configuration.basePath = basePath; - } - this.encoder = this.configuration.encoder || new CustomQueryEncoderHelper(); - } - - /** - * @param consumes string[] mime-types - * @return true: consumes contains 'multipart/form-data', false: otherwise - */ - private canConsumeForm(consumes: string[]): boolean { - const form = 'multipart/form-data'; - for (const consume of consumes) { - if (form === consume) { - return true; - } - } - return false; - } - - /** - * - * @summary Add a new pet to the store - - * @param body Pet object that needs to be added to the store - */ - public addPet(body: Pet, extraHttpRequestParams?: RequestOptionsArgs): Observable<{}> { - return this.addPetWithHttpInfo(body, extraHttpRequestParams) - .map((response: Response) => { - if (response.status === 204) { - return undefined; - } else { - return response.json() || {}; - } - }); - } - - /** - * - * @summary Deletes a pet - - * @param petId Pet id to delete - * @param apiKey - */ - public deletePet(petId: number, apiKey?: string, extraHttpRequestParams?: RequestOptionsArgs): Observable<{}> { - return this.deletePetWithHttpInfo(petId, apiKey, extraHttpRequestParams) - .map((response: Response) => { - if (response.status === 204) { - return undefined; - } else { - return response.json() || {}; - } - }); - } - - /** - * Multiple status values can be provided with comma separated strings - * @summary Finds Pets by status - - * @param status Status values that need to be considered for filter - */ - public findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, extraHttpRequestParams?: RequestOptionsArgs): Observable> { - return this.findPetsByStatusWithHttpInfo(status, extraHttpRequestParams) - .map((response: Response) => { - if (response.status === 204) { - return undefined; - } else { - return response.json() || {}; - } - }); - } - - /** - * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. - * @summary Finds Pets by tags - - * @param tags Tags to filter by - */ - public findPetsByTags(tags: Array, extraHttpRequestParams?: RequestOptionsArgs): Observable> { - return this.findPetsByTagsWithHttpInfo(tags, extraHttpRequestParams) - .map((response: Response) => { - if (response.status === 204) { - return undefined; - } else { - return response.json() || {}; - } - }); - } - - /** - * Returns a single pet - * @summary Find pet by ID - - * @param petId ID of pet to return - */ - public getPetById(petId: number, extraHttpRequestParams?: RequestOptionsArgs): Observable { - return this.getPetByIdWithHttpInfo(petId, extraHttpRequestParams) - .map((response: Response) => { - if (response.status === 204) { - return undefined; - } else { - return response.json() || {}; - } - }); - } - - /** - * - * @summary Update an existing pet - - * @param body Pet object that needs to be added to the store - */ - public updatePet(body: Pet, extraHttpRequestParams?: RequestOptionsArgs): Observable<{}> { - return this.updatePetWithHttpInfo(body, extraHttpRequestParams) - .map((response: Response) => { - if (response.status === 204) { - return undefined; - } else { - return response.json() || {}; - } - }); - } - - /** - * - * @summary Updates a pet in the store with form data - - * @param petId ID of pet that needs to be updated - * @param name Updated name of the pet - * @param status Updated status of the pet - */ - public updatePetWithForm(petId: number, name?: string, status?: string, extraHttpRequestParams?: RequestOptionsArgs): Observable<{}> { - return this.updatePetWithFormWithHttpInfo(petId, name, status, extraHttpRequestParams) - .map((response: Response) => { - if (response.status === 204) { - return undefined; - } else { - return response.json() || {}; - } - }); - } - - /** - * - * @summary uploads an image - - * @param petId ID of pet to update - * @param additionalMetadata Additional data to pass to server - * @param file file to upload - */ - public uploadFile(petId: number, additionalMetadata?: string, file?: Blob, extraHttpRequestParams?: RequestOptionsArgs): Observable { - return this.uploadFileWithHttpInfo(petId, additionalMetadata, file, extraHttpRequestParams) - .map((response: Response) => { - if (response.status === 204) { - return undefined; - } else { - return response.json() || {}; - } - }); - } - - - private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams { - if (typeof value === "object" && value instanceof Date === false) { - this.addToHttpParamsRecursive(httpParams, value); - } else { - this.addToHttpParamsRecursive(httpParams, value, key); - } - return httpParams; - } - - private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams { - if (value == null) { - return httpParams; - } - - if (typeof value === "object") { - if (Array.isArray(value)) { - (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); - } else if (value instanceof Date) { - if (key != null) { - httpParams.append(key, - (value as Date).toISOString().substr(0, 10)); - } else { - throw Error("key may not be null if value is Date"); - } - } else { - Object.keys(value).forEach( k => this.addToHttpParamsRecursive( - httpParams, value[k], key != null ? `${key}.${k}` : k)); - } - } else if (key != null) { - httpParams.append(key, value); - } else { - throw Error("key may not be null if value is not object or array"); - } - return httpParams; - } - - /** - * Add a new pet to the store - * @param body Pet object that needs to be added to the store - */ - public addPetWithHttpInfo(body: Pet, extraHttpRequestParams?: RequestOptionsArgs, options?: {httpHeaderAccept?: undefined}): Observable { - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling addPet.'); - } - - let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845 - - // authentication (petstore_auth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers.set('Authorization', 'Bearer ' + accessToken); - } - - let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; - if (httpHeaderAcceptSelected === undefined) { - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - ]; - httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); - } - if (httpHeaderAcceptSelected !== undefined) { - headers.set('Accept', httpHeaderAcceptSelected); - } - - - // to determine the Content-Type header - const consumes: string[] = [ - 'application/json', - 'application/xml' - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers.set('Content-Type', httpContentTypeSelected); - } - - let requestOptions: RequestOptionsArgs = new RequestOptions({ - method: RequestMethod.Post, - headers: headers, - body: body == null ? '' : JSON.stringify(body), // https://github.com/angular/angular/issues/10612 - responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, - withCredentials:this.configuration.withCredentials - }); - // issues#4037 - if (extraHttpRequestParams) { - requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); - } - - return this.http.request(`${this.configuration.basePath}/pet`, requestOptions); - } - - /** - * Deletes a pet - * @param petId Pet id to delete - * @param apiKey - */ - public deletePetWithHttpInfo(petId: number, apiKey?: string, extraHttpRequestParams?: RequestOptionsArgs, options?: {httpHeaderAccept?: undefined}): Observable { - if (petId === null || petId === undefined) { - throw new Error('Required parameter petId was null or undefined when calling deletePet.'); - } - - let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845 - if (apiKey !== undefined && apiKey !== null) { - headers.set('api_key', String(apiKey)); - } - - // authentication (petstore_auth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers.set('Authorization', 'Bearer ' + accessToken); - } - - let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; - if (httpHeaderAcceptSelected === undefined) { - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - ]; - httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); - } - if (httpHeaderAcceptSelected !== undefined) { - headers.set('Accept', httpHeaderAcceptSelected); - } - - - let requestOptions: RequestOptionsArgs = new RequestOptions({ - method: RequestMethod.Delete, - headers: headers, - responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, - withCredentials:this.configuration.withCredentials - }); - // issues#4037 - if (extraHttpRequestParams) { - requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); - } - - return this.http.request(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}`, requestOptions); - } - - /** - * 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 - */ - public findPetsByStatusWithHttpInfo(status: Array<'available' | 'pending' | 'sold'>, extraHttpRequestParams?: RequestOptionsArgs, options?: {httpHeaderAccept?: 'application/xml' | 'application/json'}): Observable { - if (status === null || status === undefined) { - throw new Error('Required parameter status was null or undefined when calling findPetsByStatus.'); - } - - let queryParameters = new URLSearchParams('', this.encoder); - if (status) { - this.addToHttpParams(queryParameters, - status.join(COLLECTION_FORMATS['csv']), 'status'); - } - - let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845 - - // authentication (petstore_auth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers.set('Authorization', 'Bearer ' + accessToken); - } - - let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; - if (httpHeaderAcceptSelected === undefined) { - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/xml', - 'application/json' - ]; - httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); - } - if (httpHeaderAcceptSelected !== undefined) { - headers.set('Accept', httpHeaderAcceptSelected); - } - - - let requestOptions: RequestOptionsArgs = new RequestOptions({ - method: RequestMethod.Get, - headers: headers, - responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, - search: queryParameters, - withCredentials:this.configuration.withCredentials - }); - // issues#4037 - if (extraHttpRequestParams) { - requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); - } - - return this.http.request(`${this.configuration.basePath}/pet/findByStatus`, requestOptions); - } - - /** - * 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 - */ - public findPetsByTagsWithHttpInfo(tags: Array, extraHttpRequestParams?: RequestOptionsArgs, options?: {httpHeaderAccept?: 'application/xml' | 'application/json'}): Observable { - if (tags === null || tags === undefined) { - throw new Error('Required parameter tags was null or undefined when calling findPetsByTags.'); - } - - let queryParameters = new URLSearchParams('', this.encoder); - if (tags) { - this.addToHttpParams(queryParameters, - tags.join(COLLECTION_FORMATS['csv']), 'tags'); - } - - let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845 - - // authentication (petstore_auth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers.set('Authorization', 'Bearer ' + accessToken); - } - - let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; - if (httpHeaderAcceptSelected === undefined) { - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/xml', - 'application/json' - ]; - httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); - } - if (httpHeaderAcceptSelected !== undefined) { - headers.set('Accept', httpHeaderAcceptSelected); - } - - - let requestOptions: RequestOptionsArgs = new RequestOptions({ - method: RequestMethod.Get, - headers: headers, - responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, - search: queryParameters, - withCredentials:this.configuration.withCredentials - }); - // issues#4037 - if (extraHttpRequestParams) { - requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); - } - - return this.http.request(`${this.configuration.basePath}/pet/findByTags`, requestOptions); - } - - /** - * Find pet by ID - * Returns a single pet - * @param petId ID of pet to return - */ - public getPetByIdWithHttpInfo(petId: number, extraHttpRequestParams?: RequestOptionsArgs, options?: {httpHeaderAccept?: 'application/xml' | 'application/json'}): Observable { - if (petId === null || petId === undefined) { - throw new Error('Required parameter petId was null or undefined when calling getPetById.'); - } - - let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845 - - // authentication (api_key) required - if (this.configuration.apiKeys) { - const key: string | undefined = this.configuration.apiKeys["api_key"] || this.configuration.apiKeys["api_key"]; - if (key) { - headers.set('api_key', key); - } - } - - let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; - if (httpHeaderAcceptSelected === undefined) { - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/xml', - 'application/json' - ]; - httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); - } - if (httpHeaderAcceptSelected !== undefined) { - headers.set('Accept', httpHeaderAcceptSelected); - } - - - let requestOptions: RequestOptionsArgs = new RequestOptions({ - method: RequestMethod.Get, - headers: headers, - responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, - withCredentials:this.configuration.withCredentials - }); - // issues#4037 - if (extraHttpRequestParams) { - requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); - } - - return this.http.request(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}`, requestOptions); - } - - /** - * Update an existing pet - * @param body Pet object that needs to be added to the store - */ - public updatePetWithHttpInfo(body: Pet, extraHttpRequestParams?: RequestOptionsArgs, options?: {httpHeaderAccept?: undefined}): Observable { - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling updatePet.'); - } - - let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845 - - // authentication (petstore_auth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers.set('Authorization', 'Bearer ' + accessToken); - } - - let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; - if (httpHeaderAcceptSelected === undefined) { - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - ]; - httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); - } - if (httpHeaderAcceptSelected !== undefined) { - headers.set('Accept', httpHeaderAcceptSelected); - } - - - // to determine the Content-Type header - const consumes: string[] = [ - 'application/json', - 'application/xml' - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers.set('Content-Type', httpContentTypeSelected); - } - - let requestOptions: RequestOptionsArgs = new RequestOptions({ - method: RequestMethod.Put, - headers: headers, - body: body == null ? '' : JSON.stringify(body), // https://github.com/angular/angular/issues/10612 - responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, - withCredentials:this.configuration.withCredentials - }); - // issues#4037 - if (extraHttpRequestParams) { - requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); - } - - return this.http.request(`${this.configuration.basePath}/pet`, requestOptions); - } - - /** - * Updates a pet in the store with form data - * @param petId ID of pet that needs to be updated - * @param name Updated name of the pet - * @param status Updated status of the pet - */ - public updatePetWithFormWithHttpInfo(petId: number, name?: string, status?: string, extraHttpRequestParams?: RequestOptionsArgs, options?: {httpHeaderAccept?: undefined}): Observable { - if (petId === null || petId === undefined) { - throw new Error('Required parameter petId was null or undefined when calling updatePetWithForm.'); - } - - let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845 - - // authentication (petstore_auth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers.set('Authorization', 'Bearer ' + accessToken); - } - - let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; - if (httpHeaderAcceptSelected === undefined) { - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - ]; - httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); - } - if (httpHeaderAcceptSelected !== undefined) { - headers.set('Accept', httpHeaderAcceptSelected); - } - - // to determine the Content-Type header - const consumes: string[] = [ - 'application/x-www-form-urlencoded' - ]; - - const canConsumeForm = this.canConsumeForm(consumes); - - let formParams: { append(param: string, value: any): any; }; - let useForm = false; - let convertFormParamsToString = false; - if (useForm) { - formParams = new FormData(); - } else { - // TODO: this fails if a parameter is a file, the api can't consume "multipart/form-data" and a blob is passed. - convertFormParamsToString = true; - formParams = new URLSearchParams('', this.encoder); - // set the content-type explicitly to avoid having it set to 'text/plain' - headers.set('Content-Type', 'application/x-www-form-urlencoded;charset=UTF-8'); - } - - if (name !== undefined) { - formParams.append('name', name); - } - if (status !== undefined) { - formParams.append('status', status); - } - - let requestOptions: RequestOptionsArgs = new RequestOptions({ - method: RequestMethod.Post, - headers: headers, - body: convertFormParamsToString ? formParams.toString() : formParams, - responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, - withCredentials:this.configuration.withCredentials - }); - // issues#4037 - if (extraHttpRequestParams) { - requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); - } - - return this.http.request(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}`, requestOptions); - } - - /** - * uploads an image - * @param petId ID of pet to update - * @param additionalMetadata Additional data to pass to server - * @param file file to upload - */ - public uploadFileWithHttpInfo(petId: number, additionalMetadata?: string, file?: Blob, extraHttpRequestParams?: RequestOptionsArgs, options?: {httpHeaderAccept?: 'application/json'}): Observable { - if (petId === null || petId === undefined) { - throw new Error('Required parameter petId was null or undefined when calling uploadFile.'); - } - - let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845 - - // authentication (petstore_auth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers.set('Authorization', 'Bearer ' + accessToken); - } - - let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; - if (httpHeaderAcceptSelected === undefined) { - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); - } - if (httpHeaderAcceptSelected !== undefined) { - headers.set('Accept', httpHeaderAcceptSelected); - } - - // to determine the Content-Type header - const consumes: string[] = [ - 'multipart/form-data' - ]; - - const canConsumeForm = this.canConsumeForm(consumes); - - let formParams: { append(param: string, value: any): any; }; - let useForm = false; - let convertFormParamsToString = false; - // use FormData to transmit files using content-type "multipart/form-data" - // see https://stackoverflow.com/questions/4007969/application-x-www-form-urlencoded-or-multipart-form-data - useForm = canConsumeForm; - if (useForm) { - formParams = new FormData(); - } else { - // TODO: this fails if a parameter is a file, the api can't consume "multipart/form-data" and a blob is passed. - convertFormParamsToString = true; - formParams = new URLSearchParams('', this.encoder); - // set the content-type explicitly to avoid having it set to 'text/plain' - headers.set('Content-Type', 'application/x-www-form-urlencoded;charset=UTF-8'); - } - - if (additionalMetadata !== undefined) { - formParams.append('additionalMetadata', additionalMetadata); - } - if (file !== undefined) { - formParams.append('file', file); - } - - let requestOptions: RequestOptionsArgs = new RequestOptions({ - method: RequestMethod.Post, - headers: headers, - body: convertFormParamsToString ? formParams.toString() : formParams, - responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, - withCredentials:this.configuration.withCredentials - }); - // issues#4037 - if (extraHttpRequestParams) { - requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); - } - - return this.http.request(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}/uploadImage`, requestOptions); - } - -} diff --git a/samples/client/petstore/typescript-angular-v4/npm/api/store.service.ts b/samples/client/petstore/typescript-angular-v4/npm/api/store.service.ts deleted file mode 100644 index 839adc05718..00000000000 --- a/samples/client/petstore/typescript-angular-v4/npm/api/store.service.ts +++ /dev/null @@ -1,324 +0,0 @@ -/** - * 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. - * - * The version of the OpenAPI document: 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. - */ -/* tslint:disable:no-unused-variable member-ordering */ - -import { Inject, Injectable, Optional } from '@angular/core'; -import { Http, Headers, URLSearchParams, - RequestMethod, RequestOptions, RequestOptionsArgs, - Response, ResponseContentType, QueryEncoder } from '@angular/http'; -import { CustomQueryEncoderHelper } from '../encoder'; -import { Observable } from 'rxjs/Observable'; -import '../rxjs-operators'; - -import { Order } from '../model/models'; - -import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; -import { Configuration } from '../configuration'; - - - -@Injectable() -export class StoreService { - - protected basePath = 'http://petstore.swagger.io/v2'; - public defaultHeaders = new Headers(); - public configuration = new Configuration(); - public encoder: QueryEncoder; - - constructor(protected http: Http, @Optional()@Inject(BASE_PATH) basePath: string, @Optional() configuration: Configuration) { - if (configuration) { - this.configuration = configuration; - } - if (typeof this.configuration.basePath !== 'string') { - if (typeof basePath !== 'string') { - basePath = this.basePath; - } - this.configuration.basePath = basePath; - } - this.encoder = this.configuration.encoder || new CustomQueryEncoderHelper(); - } - - - /** - * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors - * @summary Delete purchase order by ID - - * @param orderId ID of the order that needs to be deleted - */ - public deleteOrder(orderId: string, extraHttpRequestParams?: RequestOptionsArgs): Observable<{}> { - return this.deleteOrderWithHttpInfo(orderId, extraHttpRequestParams) - .map((response: Response) => { - if (response.status === 204) { - return undefined; - } else { - return response.json() || {}; - } - }); - } - - /** - * Returns a map of status codes to quantities - * @summary Returns pet inventories by status - - */ - public getInventory(extraHttpRequestParams?: RequestOptionsArgs): Observable<{ [key: string]: number; }> { - return this.getInventoryWithHttpInfo(extraHttpRequestParams) - .map((response: Response) => { - if (response.status === 204) { - return undefined; - } else { - return response.json() || {}; - } - }); - } - - /** - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions - * @summary Find purchase order by ID - - * @param orderId ID of pet that needs to be fetched - */ - public getOrderById(orderId: number, extraHttpRequestParams?: RequestOptionsArgs): Observable { - return this.getOrderByIdWithHttpInfo(orderId, extraHttpRequestParams) - .map((response: Response) => { - if (response.status === 204) { - return undefined; - } else { - return response.json() || {}; - } - }); - } - - /** - * - * @summary Place an order for a pet - - * @param body order placed for purchasing the pet - */ - public placeOrder(body: Order, extraHttpRequestParams?: RequestOptionsArgs): Observable { - return this.placeOrderWithHttpInfo(body, extraHttpRequestParams) - .map((response: Response) => { - if (response.status === 204) { - return undefined; - } else { - return response.json() || {}; - } - }); - } - - - private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams { - if (typeof value === "object" && value instanceof Date === false) { - this.addToHttpParamsRecursive(httpParams, value); - } else { - this.addToHttpParamsRecursive(httpParams, value, key); - } - return httpParams; - } - - private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams { - if (value == null) { - return httpParams; - } - - if (typeof value === "object") { - if (Array.isArray(value)) { - (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); - } else if (value instanceof Date) { - if (key != null) { - httpParams.append(key, - (value as Date).toISOString().substr(0, 10)); - } else { - throw Error("key may not be null if value is Date"); - } - } else { - Object.keys(value).forEach( k => this.addToHttpParamsRecursive( - httpParams, value[k], key != null ? `${key}.${k}` : k)); - } - } else if (key != null) { - httpParams.append(key, value); - } else { - throw Error("key may not be null if value is not object or array"); - } - return httpParams; - } - - /** - * Delete purchase order by ID - * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors - * @param orderId ID of the order that needs to be deleted - */ - public deleteOrderWithHttpInfo(orderId: string, extraHttpRequestParams?: RequestOptionsArgs, options?: {httpHeaderAccept?: undefined}): Observable { - if (orderId === null || orderId === undefined) { - throw new Error('Required parameter orderId was null or undefined when calling deleteOrder.'); - } - - let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845 - - let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; - if (httpHeaderAcceptSelected === undefined) { - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - ]; - httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); - } - if (httpHeaderAcceptSelected !== undefined) { - headers.set('Accept', httpHeaderAcceptSelected); - } - - - let requestOptions: RequestOptionsArgs = new RequestOptions({ - method: RequestMethod.Delete, - headers: headers, - responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, - withCredentials:this.configuration.withCredentials - }); - // issues#4037 - if (extraHttpRequestParams) { - requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); - } - - return this.http.request(`${this.configuration.basePath}/store/order/${encodeURIComponent(String(orderId))}`, requestOptions); - } - - /** - * Returns pet inventories by status - * Returns a map of status codes to quantities - */ - public getInventoryWithHttpInfo(extraHttpRequestParams?: RequestOptionsArgs, options?: {httpHeaderAccept?: 'application/json'}): Observable { - - let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845 - - // authentication (api_key) required - if (this.configuration.apiKeys) { - const key: string | undefined = this.configuration.apiKeys["api_key"] || this.configuration.apiKeys["api_key"]; - if (key) { - headers.set('api_key', key); - } - } - - let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; - if (httpHeaderAcceptSelected === undefined) { - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); - } - if (httpHeaderAcceptSelected !== undefined) { - headers.set('Accept', httpHeaderAcceptSelected); - } - - - let requestOptions: RequestOptionsArgs = new RequestOptions({ - method: RequestMethod.Get, - headers: headers, - responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, - withCredentials:this.configuration.withCredentials - }); - // issues#4037 - if (extraHttpRequestParams) { - requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); - } - - return this.http.request(`${this.configuration.basePath}/store/inventory`, requestOptions); - } - - /** - * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions - * @param orderId ID of pet that needs to be fetched - */ - public getOrderByIdWithHttpInfo(orderId: number, extraHttpRequestParams?: RequestOptionsArgs, options?: {httpHeaderAccept?: 'application/xml' | 'application/json'}): Observable { - if (orderId === null || orderId === undefined) { - throw new Error('Required parameter orderId was null or undefined when calling getOrderById.'); - } - - let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845 - - let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; - if (httpHeaderAcceptSelected === undefined) { - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/xml', - 'application/json' - ]; - httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); - } - if (httpHeaderAcceptSelected !== undefined) { - headers.set('Accept', httpHeaderAcceptSelected); - } - - - let requestOptions: RequestOptionsArgs = new RequestOptions({ - method: RequestMethod.Get, - headers: headers, - responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, - withCredentials:this.configuration.withCredentials - }); - // issues#4037 - if (extraHttpRequestParams) { - requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); - } - - return this.http.request(`${this.configuration.basePath}/store/order/${encodeURIComponent(String(orderId))}`, requestOptions); - } - - /** - * Place an order for a pet - * @param body order placed for purchasing the pet - */ - public placeOrderWithHttpInfo(body: Order, extraHttpRequestParams?: RequestOptionsArgs, options?: {httpHeaderAccept?: 'application/xml' | 'application/json'}): Observable { - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling placeOrder.'); - } - - let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845 - - let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; - if (httpHeaderAcceptSelected === undefined) { - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/xml', - 'application/json' - ]; - httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); - } - if (httpHeaderAcceptSelected !== undefined) { - headers.set('Accept', httpHeaderAcceptSelected); - } - - - // to determine the Content-Type header - const consumes: string[] = [ - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers.set('Content-Type', httpContentTypeSelected); - } - - let requestOptions: RequestOptionsArgs = new RequestOptions({ - method: RequestMethod.Post, - headers: headers, - body: body == null ? '' : JSON.stringify(body), // https://github.com/angular/angular/issues/10612 - responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, - withCredentials:this.configuration.withCredentials - }); - // issues#4037 - if (extraHttpRequestParams) { - requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); - } - - return this.http.request(`${this.configuration.basePath}/store/order`, requestOptions); - } - -} diff --git a/samples/client/petstore/typescript-angular-v4/npm/api/user.service.ts b/samples/client/petstore/typescript-angular-v4/npm/api/user.service.ts deleted file mode 100644 index 710aeb4230f..00000000000 --- a/samples/client/petstore/typescript-angular-v4/npm/api/user.service.ts +++ /dev/null @@ -1,579 +0,0 @@ -/** - * 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. - * - * The version of the OpenAPI document: 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. - */ -/* tslint:disable:no-unused-variable member-ordering */ - -import { Inject, Injectable, Optional } from '@angular/core'; -import { Http, Headers, URLSearchParams, - RequestMethod, RequestOptions, RequestOptionsArgs, - Response, ResponseContentType, QueryEncoder } from '@angular/http'; -import { CustomQueryEncoderHelper } from '../encoder'; -import { Observable } from 'rxjs/Observable'; -import '../rxjs-operators'; - -import { User } from '../model/models'; - -import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; -import { Configuration } from '../configuration'; - - - -@Injectable() -export class UserService { - - protected basePath = 'http://petstore.swagger.io/v2'; - public defaultHeaders = new Headers(); - public configuration = new Configuration(); - public encoder: QueryEncoder; - - constructor(protected http: Http, @Optional()@Inject(BASE_PATH) basePath: string, @Optional() configuration: Configuration) { - if (configuration) { - this.configuration = configuration; - } - if (typeof this.configuration.basePath !== 'string') { - if (typeof basePath !== 'string') { - basePath = this.basePath; - } - this.configuration.basePath = basePath; - } - this.encoder = this.configuration.encoder || new CustomQueryEncoderHelper(); - } - - - /** - * This can only be done by the logged in user. - * @summary Create user - - * @param body Created user object - */ - public createUser(body: User, extraHttpRequestParams?: RequestOptionsArgs): Observable<{}> { - return this.createUserWithHttpInfo(body, extraHttpRequestParams) - .map((response: Response) => { - if (response.status === 204) { - return undefined; - } else { - return response.json() || {}; - } - }); - } - - /** - * - * @summary Creates list of users with given input array - - * @param body List of user object - */ - public createUsersWithArrayInput(body: Array, extraHttpRequestParams?: RequestOptionsArgs): Observable<{}> { - return this.createUsersWithArrayInputWithHttpInfo(body, extraHttpRequestParams) - .map((response: Response) => { - if (response.status === 204) { - return undefined; - } else { - return response.json() || {}; - } - }); - } - - /** - * - * @summary Creates list of users with given input array - - * @param body List of user object - */ - public createUsersWithListInput(body: Array, extraHttpRequestParams?: RequestOptionsArgs): Observable<{}> { - return this.createUsersWithListInputWithHttpInfo(body, extraHttpRequestParams) - .map((response: Response) => { - if (response.status === 204) { - return undefined; - } else { - return response.json() || {}; - } - }); - } - - /** - * This can only be done by the logged in user. - * @summary Delete user - - * @param username The name that needs to be deleted - */ - public deleteUser(username: string, extraHttpRequestParams?: RequestOptionsArgs): Observable<{}> { - return this.deleteUserWithHttpInfo(username, extraHttpRequestParams) - .map((response: Response) => { - if (response.status === 204) { - return undefined; - } else { - return response.json() || {}; - } - }); - } - - /** - * - * @summary Get user by user name - - * @param username The name that needs to be fetched. Use user1 for testing. - */ - public getUserByName(username: string, extraHttpRequestParams?: RequestOptionsArgs): Observable { - return this.getUserByNameWithHttpInfo(username, extraHttpRequestParams) - .map((response: Response) => { - if (response.status === 204) { - return undefined; - } else { - return response.json() || {}; - } - }); - } - - /** - * - * @summary Logs user into the system - - * @param username The user name for login - * @param password The password for login in clear text - */ - public loginUser(username: string, password: string, extraHttpRequestParams?: RequestOptionsArgs): Observable { - return this.loginUserWithHttpInfo(username, password, extraHttpRequestParams) - .map((response: Response) => { - if (response.status === 204) { - return undefined; - } else { - return response.json() || {}; - } - }); - } - - /** - * - * @summary Logs out current logged in user session - - */ - public logoutUser(extraHttpRequestParams?: RequestOptionsArgs): Observable<{}> { - return this.logoutUserWithHttpInfo(extraHttpRequestParams) - .map((response: Response) => { - if (response.status === 204) { - return undefined; - } else { - return response.json() || {}; - } - }); - } - - /** - * This can only be done by the logged in user. - * @summary Updated user - - * @param username name that need to be deleted - * @param body Updated user object - */ - public updateUser(username: string, body: User, extraHttpRequestParams?: RequestOptionsArgs): Observable<{}> { - return this.updateUserWithHttpInfo(username, body, extraHttpRequestParams) - .map((response: Response) => { - if (response.status === 204) { - return undefined; - } else { - return response.json() || {}; - } - }); - } - - - private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams { - if (typeof value === "object" && value instanceof Date === false) { - this.addToHttpParamsRecursive(httpParams, value); - } else { - this.addToHttpParamsRecursive(httpParams, value, key); - } - return httpParams; - } - - private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams { - if (value == null) { - return httpParams; - } - - if (typeof value === "object") { - if (Array.isArray(value)) { - (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); - } else if (value instanceof Date) { - if (key != null) { - httpParams.append(key, - (value as Date).toISOString().substr(0, 10)); - } else { - throw Error("key may not be null if value is Date"); - } - } else { - Object.keys(value).forEach( k => this.addToHttpParamsRecursive( - httpParams, value[k], key != null ? `${key}.${k}` : k)); - } - } else if (key != null) { - httpParams.append(key, value); - } else { - throw Error("key may not be null if value is not object or array"); - } - return httpParams; - } - - /** - * Create user - * This can only be done by the logged in user. - * @param body Created user object - */ - public createUserWithHttpInfo(body: User, extraHttpRequestParams?: RequestOptionsArgs, options?: {httpHeaderAccept?: undefined}): Observable { - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling createUser.'); - } - - let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845 - - let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; - if (httpHeaderAcceptSelected === undefined) { - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - ]; - httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); - } - if (httpHeaderAcceptSelected !== undefined) { - headers.set('Accept', httpHeaderAcceptSelected); - } - - - // to determine the Content-Type header - const consumes: string[] = [ - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers.set('Content-Type', httpContentTypeSelected); - } - - let requestOptions: RequestOptionsArgs = new RequestOptions({ - method: RequestMethod.Post, - headers: headers, - body: body == null ? '' : JSON.stringify(body), // https://github.com/angular/angular/issues/10612 - responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, - withCredentials:this.configuration.withCredentials - }); - // issues#4037 - if (extraHttpRequestParams) { - requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); - } - - return this.http.request(`${this.configuration.basePath}/user`, requestOptions); - } - - /** - * Creates list of users with given input array - * @param body List of user object - */ - public createUsersWithArrayInputWithHttpInfo(body: Array, extraHttpRequestParams?: RequestOptionsArgs, options?: {httpHeaderAccept?: undefined}): Observable { - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling createUsersWithArrayInput.'); - } - - let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845 - - let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; - if (httpHeaderAcceptSelected === undefined) { - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - ]; - httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); - } - if (httpHeaderAcceptSelected !== undefined) { - headers.set('Accept', httpHeaderAcceptSelected); - } - - - // to determine the Content-Type header - const consumes: string[] = [ - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers.set('Content-Type', httpContentTypeSelected); - } - - let requestOptions: RequestOptionsArgs = new RequestOptions({ - method: RequestMethod.Post, - headers: headers, - body: body == null ? '' : JSON.stringify(body), // https://github.com/angular/angular/issues/10612 - responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, - withCredentials:this.configuration.withCredentials - }); - // issues#4037 - if (extraHttpRequestParams) { - requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); - } - - return this.http.request(`${this.configuration.basePath}/user/createWithArray`, requestOptions); - } - - /** - * Creates list of users with given input array - * @param body List of user object - */ - public createUsersWithListInputWithHttpInfo(body: Array, extraHttpRequestParams?: RequestOptionsArgs, options?: {httpHeaderAccept?: undefined}): Observable { - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling createUsersWithListInput.'); - } - - let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845 - - let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; - if (httpHeaderAcceptSelected === undefined) { - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - ]; - httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); - } - if (httpHeaderAcceptSelected !== undefined) { - headers.set('Accept', httpHeaderAcceptSelected); - } - - - // to determine the Content-Type header - const consumes: string[] = [ - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers.set('Content-Type', httpContentTypeSelected); - } - - let requestOptions: RequestOptionsArgs = new RequestOptions({ - method: RequestMethod.Post, - headers: headers, - body: body == null ? '' : JSON.stringify(body), // https://github.com/angular/angular/issues/10612 - responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, - withCredentials:this.configuration.withCredentials - }); - // issues#4037 - if (extraHttpRequestParams) { - requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); - } - - return this.http.request(`${this.configuration.basePath}/user/createWithList`, requestOptions); - } - - /** - * Delete user - * This can only be done by the logged in user. - * @param username The name that needs to be deleted - */ - public deleteUserWithHttpInfo(username: string, extraHttpRequestParams?: RequestOptionsArgs, options?: {httpHeaderAccept?: undefined}): Observable { - if (username === null || username === undefined) { - throw new Error('Required parameter username was null or undefined when calling deleteUser.'); - } - - let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845 - - let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; - if (httpHeaderAcceptSelected === undefined) { - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - ]; - httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); - } - if (httpHeaderAcceptSelected !== undefined) { - headers.set('Accept', httpHeaderAcceptSelected); - } - - - let requestOptions: RequestOptionsArgs = new RequestOptions({ - method: RequestMethod.Delete, - headers: headers, - responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, - withCredentials:this.configuration.withCredentials - }); - // issues#4037 - if (extraHttpRequestParams) { - requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); - } - - return this.http.request(`${this.configuration.basePath}/user/${encodeURIComponent(String(username))}`, requestOptions); - } - - /** - * Get user by user name - * @param username The name that needs to be fetched. Use user1 for testing. - */ - public getUserByNameWithHttpInfo(username: string, extraHttpRequestParams?: RequestOptionsArgs, options?: {httpHeaderAccept?: 'application/xml' | 'application/json'}): Observable { - if (username === null || username === undefined) { - throw new Error('Required parameter username was null or undefined when calling getUserByName.'); - } - - let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845 - - let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; - if (httpHeaderAcceptSelected === undefined) { - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/xml', - 'application/json' - ]; - httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); - } - if (httpHeaderAcceptSelected !== undefined) { - headers.set('Accept', httpHeaderAcceptSelected); - } - - - let requestOptions: RequestOptionsArgs = new RequestOptions({ - method: RequestMethod.Get, - headers: headers, - responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, - withCredentials:this.configuration.withCredentials - }); - // issues#4037 - if (extraHttpRequestParams) { - requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); - } - - return this.http.request(`${this.configuration.basePath}/user/${encodeURIComponent(String(username))}`, requestOptions); - } - - /** - * Logs user into the system - * @param username The user name for login - * @param password The password for login in clear text - */ - public loginUserWithHttpInfo(username: string, password: string, extraHttpRequestParams?: RequestOptionsArgs, options?: {httpHeaderAccept?: 'application/xml' | 'application/json'}): Observable { - if (username === null || username === undefined) { - throw new Error('Required parameter username was null or undefined when calling loginUser.'); - } - if (password === null || password === undefined) { - throw new Error('Required parameter password was null or undefined when calling loginUser.'); - } - - let queryParameters = new URLSearchParams('', this.encoder); - if (username !== undefined && username !== null) { - this.addToHttpParams(queryParameters, - username, 'username'); - } - if (password !== undefined && password !== null) { - this.addToHttpParams(queryParameters, - password, 'password'); - } - - let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845 - - let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; - if (httpHeaderAcceptSelected === undefined) { - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/xml', - 'application/json' - ]; - httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); - } - if (httpHeaderAcceptSelected !== undefined) { - headers.set('Accept', httpHeaderAcceptSelected); - } - - - let requestOptions: RequestOptionsArgs = new RequestOptions({ - method: RequestMethod.Get, - headers: headers, - responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, - search: queryParameters, - withCredentials:this.configuration.withCredentials - }); - // issues#4037 - if (extraHttpRequestParams) { - requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); - } - - return this.http.request(`${this.configuration.basePath}/user/login`, requestOptions); - } - - /** - * Logs out current logged in user session - */ - public logoutUserWithHttpInfo(extraHttpRequestParams?: RequestOptionsArgs, options?: {httpHeaderAccept?: undefined}): Observable { - - let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845 - - let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; - if (httpHeaderAcceptSelected === undefined) { - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - ]; - httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); - } - if (httpHeaderAcceptSelected !== undefined) { - headers.set('Accept', httpHeaderAcceptSelected); - } - - - let requestOptions: RequestOptionsArgs = new RequestOptions({ - method: RequestMethod.Get, - headers: headers, - responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, - withCredentials:this.configuration.withCredentials - }); - // issues#4037 - if (extraHttpRequestParams) { - requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); - } - - return this.http.request(`${this.configuration.basePath}/user/logout`, requestOptions); - } - - /** - * Updated user - * This can only be done by the logged in user. - * @param username name that need to be deleted - * @param body Updated user object - */ - public updateUserWithHttpInfo(username: string, body: User, extraHttpRequestParams?: RequestOptionsArgs, options?: {httpHeaderAccept?: undefined}): Observable { - if (username === null || username === undefined) { - throw new Error('Required parameter username was null or undefined when calling updateUser.'); - } - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling updateUser.'); - } - - let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845 - - let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; - if (httpHeaderAcceptSelected === undefined) { - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - ]; - httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); - } - if (httpHeaderAcceptSelected !== undefined) { - headers.set('Accept', httpHeaderAcceptSelected); - } - - - // to determine the Content-Type header - const consumes: string[] = [ - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers.set('Content-Type', httpContentTypeSelected); - } - - let requestOptions: RequestOptionsArgs = new RequestOptions({ - method: RequestMethod.Put, - headers: headers, - body: body == null ? '' : JSON.stringify(body), // https://github.com/angular/angular/issues/10612 - responseType: httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text') ? ResponseContentType.Text : ResponseContentType.Json, - withCredentials:this.configuration.withCredentials - }); - // issues#4037 - if (extraHttpRequestParams) { - requestOptions = (Object).assign(requestOptions, extraHttpRequestParams); - } - - return this.http.request(`${this.configuration.basePath}/user/${encodeURIComponent(String(username))}`, requestOptions); - } - -} diff --git a/samples/client/petstore/typescript-angular-v4/npm/configuration.ts b/samples/client/petstore/typescript-angular-v4/npm/configuration.ts deleted file mode 100644 index a442747dfc1..00000000000 --- a/samples/client/petstore/typescript-angular-v4/npm/configuration.ts +++ /dev/null @@ -1,84 +0,0 @@ -import { QueryEncoder } from '@angular/http'; - -export interface ConfigurationParameters { - apiKeys?: {[ key: string ]: string}; - username?: string; - password?: string; - accessToken?: string | (() => string); - basePath?: string; - withCredentials?: boolean; - encoder?: QueryEncoder; -} - -export class Configuration { - apiKeys?: {[ key: string ]: string}; - username?: string; - password?: string; - accessToken?: string | (() => string); - basePath?: string; - withCredentials?: boolean; - encoder?: QueryEncoder; - - constructor(configurationParameters: ConfigurationParameters = {}) { - this.apiKeys = configurationParameters.apiKeys; - this.username = configurationParameters.username; - this.password = configurationParameters.password; - this.accessToken = configurationParameters.accessToken; - this.basePath = configurationParameters.basePath; - this.withCredentials = configurationParameters.withCredentials; - this.encoder = configurationParameters.encoder; - } - - /** - * Select the correct content-type to use for a request. - * Uses {@link Configuration#isJsonMime} to determine the correct content-type. - * If no content type is found return the first found type if the contentTypes is not empty - * @param contentTypes - the array of content types that are available for selection - * @returns the selected content-type or undefined if no selection could be made. - */ - public selectHeaderContentType (contentTypes: string[]): string | undefined { - if (contentTypes.length === 0) { - return undefined; - } - - const type = contentTypes.find((x: string) => this.isJsonMime(x)); - if (type === undefined) { - return contentTypes[0]; - } - return type; - } - - /** - * Select the correct accept content-type to use for a request. - * Uses {@link Configuration#isJsonMime} to determine the correct accept content-type. - * If no content type is found return the first found type if the contentTypes is not empty - * @param accepts - the array of content types that are available for selection. - * @returns the selected content-type or undefined if no selection could be made. - */ - public selectHeaderAccept(accepts: string[]): string | undefined { - if (accepts.length === 0) { - return undefined; - } - - const type = accepts.find((x: string) => this.isJsonMime(x)); - if (type === undefined) { - return accepts[0]; - } - return type; - } - - /** - * Check if the given MIME is a JSON MIME. - * JSON MIME examples: - * application/json - * application/json; charset=UTF8 - * APPLICATION/JSON - * application/vnd.company+json - * @param mime - MIME (Multipurpose Internet Mail Extensions) - * @return True if the given MIME is JSON, false otherwise. - */ - public isJsonMime(mime: string): boolean { - const jsonMime: RegExp = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i'); - return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json'); - } -} diff --git a/samples/client/petstore/typescript-angular-v4/npm/encoder.ts b/samples/client/petstore/typescript-angular-v4/npm/encoder.ts deleted file mode 100644 index a0221503f9c..00000000000 --- a/samples/client/petstore/typescript-angular-v4/npm/encoder.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { QueryEncoder } from '@angular/http'; - -/** - * Custom QueryEncoder - * Fix plus sign (+) not encoding, so sent as blank space - * See: https://github.com/angular/angular/issues/11058#issuecomment-247367318 - */ -export class CustomQueryEncoderHelper extends QueryEncoder { - encodeKey(k: string): string { - k = super.encodeKey(k); - return k.replace(/\+/gi, '%2B'); - } - encodeValue(v: string): string { - v = super.encodeValue(v); - return v.replace(/\+/gi, '%2B'); - } -} - diff --git a/samples/client/petstore/typescript-angular-v4/npm/git_push.sh b/samples/client/petstore/typescript-angular-v4/npm/git_push.sh deleted file mode 100644 index ced3be2b0c7..00000000000 --- a/samples/client/petstore/typescript-angular-v4/npm/git_push.sh +++ /dev/null @@ -1,58 +0,0 @@ -#!/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 openapi-pestore-perl "minor update" "gitlab.com" - -git_user_id=$1 -git_repo_id=$2 -release_note=$3 -git_host=$4 - -if [ "$git_host" = "" ]; then - git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" -fi - -if [ "$git_user_id" = "" ]; then - git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" -fi - -if [ "$git_repo_id" = "" ]; then - git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" -fi - -if [ "$release_note" = "" ]; then - release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" -fi - -# Initialize the local directory as a Git repository -git init - -# Adds the files in the local repository and stages them for commit. -git add . - -# Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" - -# Sets the new remote -git_remote=`git remote` -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git - else - git remote add origin https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git - fi - -fi - -git pull origin master - -# Pushes (Forces) the changes in the local repository up to the remote repository -echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" -git push origin master 2>&1 | grep -v 'To https' - diff --git a/samples/client/petstore/typescript-angular-v4/npm/index.ts b/samples/client/petstore/typescript-angular-v4/npm/index.ts deleted file mode 100644 index c312b70fa3e..00000000000 --- a/samples/client/petstore/typescript-angular-v4/npm/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -export * from './api/api'; -export * from './model/models'; -export * from './variables'; -export * from './configuration'; -export * from './api.module'; \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v4/npm/model/apiResponse.ts b/samples/client/petstore/typescript-angular-v4/npm/model/apiResponse.ts deleted file mode 100644 index 682ba478921..00000000000 --- a/samples/client/petstore/typescript-angular-v4/npm/model/apiResponse.ts +++ /dev/null @@ -1,22 +0,0 @@ -/** - * 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. - * - * The version of the OpenAPI document: 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. - */ - - -/** - * Describes the result of uploading an image resource - */ -export interface ApiResponse { - code?: number; - type?: string; - message?: string; -} - diff --git a/samples/client/petstore/typescript-angular-v4/npm/model/category.ts b/samples/client/petstore/typescript-angular-v4/npm/model/category.ts deleted file mode 100644 index b988b6827a0..00000000000 --- a/samples/client/petstore/typescript-angular-v4/npm/model/category.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * 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. - * - * The version of the OpenAPI document: 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. - */ - - -/** - * A category for a pet - */ -export interface Category { - id?: number; - name?: string; -} - diff --git a/samples/client/petstore/typescript-angular-v4/npm/model/models.ts b/samples/client/petstore/typescript-angular-v4/npm/model/models.ts deleted file mode 100644 index 8607c5dabd0..00000000000 --- a/samples/client/petstore/typescript-angular-v4/npm/model/models.ts +++ /dev/null @@ -1,6 +0,0 @@ -export * from './apiResponse'; -export * from './category'; -export * from './order'; -export * from './pet'; -export * from './tag'; -export * from './user'; diff --git a/samples/client/petstore/typescript-angular-v4/npm/model/order.ts b/samples/client/petstore/typescript-angular-v4/npm/model/order.ts deleted file mode 100644 index a29bebe4906..00000000000 --- a/samples/client/petstore/typescript-angular-v4/npm/model/order.ts +++ /dev/null @@ -1,37 +0,0 @@ -/** - * 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. - * - * The version of the OpenAPI document: 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. - */ - - -/** - * An order for a pets from the pet store - */ -export interface Order { - id?: number; - petId?: number; - quantity?: number; - shipDate?: string; - /** - * Order Status - */ - status?: Order.StatusEnum; - complete?: boolean; -} -export namespace Order { - export type StatusEnum = 'placed' | 'approved' | 'delivered'; - export const StatusEnum = { - Placed: 'placed' as StatusEnum, - Approved: 'approved' as StatusEnum, - Delivered: 'delivered' as StatusEnum - }; -} - - diff --git a/samples/client/petstore/typescript-angular-v4/npm/model/pet.ts b/samples/client/petstore/typescript-angular-v4/npm/model/pet.ts deleted file mode 100644 index e0404395f91..00000000000 --- a/samples/client/petstore/typescript-angular-v4/npm/model/pet.ts +++ /dev/null @@ -1,39 +0,0 @@ -/** - * 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. - * - * The version of the OpenAPI document: 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 { Category } from './category'; -import { Tag } from './tag'; - - -/** - * A pet for sale in the pet store - */ -export interface Pet { - id?: number; - category?: Category; - name: string; - photoUrls: Array; - tags?: Array; - /** - * pet status in the store - */ - status?: Pet.StatusEnum; -} -export namespace Pet { - export type StatusEnum = 'available' | 'pending' | 'sold'; - export const StatusEnum = { - Available: 'available' as StatusEnum, - Pending: 'pending' as StatusEnum, - Sold: 'sold' as StatusEnum - }; -} - - diff --git a/samples/client/petstore/typescript-angular-v4/npm/model/tag.ts b/samples/client/petstore/typescript-angular-v4/npm/model/tag.ts deleted file mode 100644 index b6ff210e8df..00000000000 --- a/samples/client/petstore/typescript-angular-v4/npm/model/tag.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * 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. - * - * The version of the OpenAPI document: 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. - */ - - -/** - * A tag for a pet - */ -export interface Tag { - id?: number; - name?: string; -} - diff --git a/samples/client/petstore/typescript-angular-v4/npm/model/user.ts b/samples/client/petstore/typescript-angular-v4/npm/model/user.ts deleted file mode 100644 index fce51005300..00000000000 --- a/samples/client/petstore/typescript-angular-v4/npm/model/user.ts +++ /dev/null @@ -1,30 +0,0 @@ -/** - * 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. - * - * The version of the OpenAPI document: 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. - */ - - -/** - * A User who is purchasing from the pet store - */ -export interface User { - id?: number; - username?: string; - firstName?: string; - lastName?: string; - email?: string; - password?: string; - phone?: string; - /** - * User Status - */ - userStatus?: number; -} - diff --git a/samples/client/petstore/typescript-angular-v4/npm/ng-package.json b/samples/client/petstore/typescript-angular-v4/npm/ng-package.json deleted file mode 100644 index 3b17900dc9c..00000000000 --- a/samples/client/petstore/typescript-angular-v4/npm/ng-package.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "$schema": "./node_modules/ng-packagr/ng-package.schema.json", - "lib": { - "entryFile": "index.ts" - } -} diff --git a/samples/client/petstore/typescript-angular-v4/npm/package-lock.json b/samples/client/petstore/typescript-angular-v4/npm/package-lock.json deleted file mode 100644 index 385e0ad8247..00000000000 --- a/samples/client/petstore/typescript-angular-v4/npm/package-lock.json +++ /dev/null @@ -1,4157 +0,0 @@ -{ - "name": "@swagger/angular2-typescript-petstore", - "version": "0.0.1", - "lockfileVersion": 1, - "requires": true, - "dependencies": { - "@angular/common": { - "version": "4.2.6", - "resolved": "https://registry.npmjs.org/@angular/common/-/common-4.2.6.tgz", - "integrity": "sha1-IQrOS9JON1+LQbpS/rNLGKiH1do=", - "dev": true, - "requires": { - "tslib": "^1.7.1" - } - }, - "@angular/compiler": { - "version": "4.2.6", - "resolved": "https://registry.npmjs.org/@angular/compiler/-/compiler-4.2.6.tgz", - "integrity": "sha1-ZndW1JXKDUXSBhJooQ1Sr4Ofr/Q=", - "dev": true, - "requires": { - "tslib": "^1.7.1" - } - }, - "@angular/compiler-cli": { - "version": "4.4.7", - "resolved": "https://registry.npmjs.org/@angular/compiler-cli/-/compiler-cli-4.4.7.tgz", - "integrity": "sha512-vzphs9galtMV29CW+ihp6v0HwSQrjAFqs04swqt9o0jEJET6/mPi1EFjJRNZiFn6ghh6lxUPr3vThy7CrSNxHg==", - "dev": true, - "requires": { - "@angular/tsc-wrapped": "4.4.7", - "minimist": "^1.2.0", - "reflect-metadata": "^0.1.2" - } - }, - "@angular/core": { - "version": "4.2.6", - "resolved": "https://registry.npmjs.org/@angular/core/-/core-4.2.6.tgz", - "integrity": "sha1-DByP8BV/B29KfAtyHKFCPxu+Fk4=", - "dev": true, - "requires": { - "tslib": "^1.7.1" - } - }, - "@angular/http": { - "version": "4.2.6", - "resolved": "https://registry.npmjs.org/@angular/http/-/http-4.2.6.tgz", - "integrity": "sha1-SZ4roLvB89cbdt6+wDTJWMrxE04=", - "dev": true, - "requires": { - "tslib": "^1.7.1" - } - }, - "@angular/platform-browser": { - "version": "4.2.6", - "resolved": "https://registry.npmjs.org/@angular/platform-browser/-/platform-browser-4.2.6.tgz", - "integrity": "sha1-oTH/WSIl/mSWvKLJr/YSpNvd9Dc=", - "dev": true, - "requires": { - "tslib": "^1.7.1" - } - }, - "@angular/tsc-wrapped": { - "version": "4.4.7", - "resolved": "https://registry.npmjs.org/@angular/tsc-wrapped/-/tsc-wrapped-4.4.7.tgz", - "integrity": "sha512-R9w7sTU+HSTMPOa4NgvPL753qB6aqnPc1AVh2rwSl5FOpLS/AeeyzIhRnBsVXGrZrTcBQVLp/Cxg1oUSXE2k4Q==", - "dev": true, - "requires": { - "tsickle": "^0.21.0" - } - }, - "@ngtools/json-schema": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@ngtools/json-schema/-/json-schema-1.1.0.tgz", - "integrity": "sha1-w6DFRNYjkqzCgTpCyKDcb1j4aSI=", - "dev": true - }, - "abbrev": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", - "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", - "dev": true - }, - "acorn": { - "version": "5.5.3", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.5.3.tgz", - "integrity": "sha512-jd5MkIUlbbmb07nXH0DT3y7rDVtkzDi4XZOUVWAer8ajmF/DTSSbl5oNFyDOl/OXA33Bl79+ypHhl2pN20VeOQ==", - "dev": true - }, - "ajv": { - "version": "4.11.8", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-4.11.8.tgz", - "integrity": "sha1-gv+wKynmYq5TvcIK8VlHcGc5xTY=", - "dev": true, - "requires": { - "co": "^4.6.0", - "json-stable-stringify": "^1.0.1" - } - }, - "amdefine": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", - "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=", - "dev": true - }, - "ansi-gray": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/ansi-gray/-/ansi-gray-0.1.1.tgz", - "integrity": "sha1-KWLPVOyXksSFEKPetSRDaGHvclE=", - "dev": true, - "requires": { - "ansi-wrap": "0.1.0" - } - }, - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", - "dev": true - }, - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "ansi-wrap": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/ansi-wrap/-/ansi-wrap-0.1.0.tgz", - "integrity": "sha1-qCJQ3bABXponyoLoLqYDu/pF768=", - "dev": true - }, - "anymatch": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-1.3.2.tgz", - "integrity": "sha512-0XNayC8lTHQ2OI8aljNCN3sSx6hsr/1+rlcDAotXJR7C1oZZHCNsfpbKwMjRA3Uqb5tF1Rae2oloTr4xpq+WjA==", - "dev": true, - "requires": { - "micromatch": "^2.1.5", - "normalize-path": "^2.0.0" - } - }, - "aproba": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", - "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==", - "dev": true - }, - "are-we-there-yet": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.4.tgz", - "integrity": "sha1-u13KOCu5TwXhUZQ3PRb9O6HKEQ0=", - "dev": true, - "requires": { - "delegates": "^1.0.0", - "readable-stream": "^2.0.6" - } - }, - "arr-diff": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz", - "integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=", - "dev": true, - "requires": { - "arr-flatten": "^1.0.1" - } - }, - "arr-flatten": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", - "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", - "dev": true - }, - "array-differ": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/array-differ/-/array-differ-1.0.0.tgz", - "integrity": "sha1-7/UuN1gknTO+QCuLuOVkuytdQDE=", - "dev": true - }, - "array-filter": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/array-filter/-/array-filter-0.0.1.tgz", - "integrity": "sha1-fajPLiZijtcygDWB/SH2fKzS7uw=", - "dev": true - }, - "array-find-index": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz", - "integrity": "sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E=", - "dev": true - }, - "array-map": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/array-map/-/array-map-0.0.0.tgz", - "integrity": "sha1-iKK6tz0c97zVwbEYoAP2b2ZfpmI=", - "dev": true - }, - "array-reduce": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/array-reduce/-/array-reduce-0.0.0.tgz", - "integrity": "sha1-FziZ0//Rx9k4PkR5Ul2+J4yrXys=", - "dev": true - }, - "array-uniq": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz", - "integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=", - "dev": true - }, - "array-unique": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz", - "integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=", - "dev": true - }, - "arrify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", - "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=", - "dev": true - }, - "asap": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", - "integrity": "sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY=", - "dev": true, - "optional": true - }, - "asn1": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.3.tgz", - "integrity": "sha1-2sh4dxPJlmhJ/IGAd36+nB3fO4Y=", - "dev": true - }, - "assert-plus": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-0.2.0.tgz", - "integrity": "sha1-104bh+ev/A24qttwIfP+SBAasjQ=", - "dev": true - }, - "ast-types": { - "version": "0.9.6", - "resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.9.6.tgz", - "integrity": "sha1-ECyenpAF0+fjgpvwxPok7oYu6bk=", - "dev": true - }, - "async": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/async/-/async-2.6.0.tgz", - "integrity": "sha512-xAfGg1/NTLBBKlHFmnd7PlmUW9KhVQIUuSrYem9xzFUZy13ScvtyGGejaae9iAVRiRq9+Cx7DPFaAAhCpyxyPw==", - "dev": true, - "requires": { - "lodash": "^4.14.0" - } - }, - "async-each": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.1.tgz", - "integrity": "sha1-GdOGodntxufByF04iu28xW0zYC0=", - "dev": true - }, - "async-foreach": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/async-foreach/-/async-foreach-0.1.3.tgz", - "integrity": "sha1-NhIfhFwFeBct5Bmpfb6x0W7DRUI=", - "dev": true - }, - "asynckit": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", - "dev": true - }, - "autoprefixer": { - "version": "7.2.6", - "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-7.2.6.tgz", - "integrity": "sha512-Iq8TRIB+/9eQ8rbGhcP7ct5cYb/3qjNYAR2SnzLCEcwF6rvVOax8+9+fccgXk4bEhQGjOZd5TLhsksmAdsbGqQ==", - "dev": true, - "requires": { - "browserslist": "^2.11.3", - "caniuse-lite": "^1.0.30000805", - "normalize-range": "^0.1.2", - "num2fraction": "^1.2.2", - "postcss": "^6.0.17", - "postcss-value-parser": "^3.2.3" - } - }, - "aws-sign2": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.6.0.tgz", - "integrity": "sha1-FDQt0428yU0OW4fXY81jYSwOeU8=", - "dev": true - }, - "aws4": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.7.0.tgz", - "integrity": "sha512-32NDda82rhwD9/JBCCkB+MRYDp0oSvlo2IL6rQWA10PQi7tDUM3eqMSltXmY+Oyl/7N3P3qNtAlv7X0d9bI28w==", - "dev": true - }, - "babel-runtime": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz", - "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", - "dev": true, - "requires": { - "core-js": "^2.4.0", - "regenerator-runtime": "^0.11.0" - } - }, - "balanced-match": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", - "dev": true - }, - "bcrypt-pbkdf": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz", - "integrity": "sha1-Y7xdy2EzG5K8Bf1SiVPDNGKgb40=", - "dev": true, - "optional": true, - "requires": { - "tweetnacl": "^0.14.3" - } - }, - "beeper": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/beeper/-/beeper-1.1.1.tgz", - "integrity": "sha1-5tXqjF2tABMEpwsiY4RH9pyy+Ak=", - "dev": true - }, - "binary-extensions": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.11.0.tgz", - "integrity": "sha1-RqoXUftqL5PuXmibsQh9SxTGwgU=", - "dev": true - }, - "block-stream": { - "version": "0.0.9", - "resolved": "https://registry.npmjs.org/block-stream/-/block-stream-0.0.9.tgz", - "integrity": "sha1-E+v+d4oDIFz+A3UUgeu0szAMEmo=", - "dev": true, - "requires": { - "inherits": "~2.0.0" - } - }, - "boom": { - "version": "2.10.1", - "resolved": "https://registry.npmjs.org/boom/-/boom-2.10.1.tgz", - "integrity": "sha1-OciRjO/1eZ+D+UkqhI9iWt0Mdm8=", - "dev": true, - "requires": { - "hoek": "2.x.x" - } - }, - "brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "braces": { - "version": "1.8.5", - "resolved": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz", - "integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=", - "dev": true, - "requires": { - "expand-range": "^1.8.1", - "preserve": "^0.2.0", - "repeat-element": "^1.1.2" - } - }, - "browserslist": { - "version": "2.11.3", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-2.11.3.tgz", - "integrity": "sha512-yWu5cXT7Av6mVwzWc8lMsJMHWn4xyjSuGYi4IozbVTLUOEYPSagUB8kiMDUHA1fS3zjr8nkxkn9jdvug4BBRmA==", - "dev": true, - "requires": { - "caniuse-lite": "^1.0.30000792", - "electron-to-chromium": "^1.3.30" - } - }, - "buffer-crc32": { - "version": "0.2.13", - "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", - "integrity": "sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI=", - "dev": true - }, - "builtin-modules": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", - "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=", - "dev": true - }, - "camelcase": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz", - "integrity": "sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8=", - "dev": true - }, - "camelcase-keys": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz", - "integrity": "sha1-MIvur/3ygRkFHvodkyITyRuPkuc=", - "dev": true, - "requires": { - "camelcase": "^2.0.0", - "map-obj": "^1.0.0" - } - }, - "caniuse-lite": { - "version": "1.0.30000830", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000830.tgz", - "integrity": "sha512-yMqGkujkoOIZfvOYiWdqPALgY/PVGiqCHUJb6yNq7xhI/pR+gQO0U2K6lRDqAiJv4+CIU3CtTLblNGw0QGnr6g==", - "dev": true - }, - "caseless": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", - "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=", - "dev": true - }, - "chalk": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", - "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "chokidar": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-1.7.0.tgz", - "integrity": "sha1-eY5ol3gVHIB2tLNg5e3SjNortGg=", - "dev": true, - "requires": { - "anymatch": "^1.3.0", - "async-each": "^1.0.0", - "fsevents": "^1.0.0", - "glob-parent": "^2.0.0", - "inherits": "^2.0.1", - "is-binary-path": "^1.0.0", - "is-glob": "^2.0.0", - "path-is-absolute": "^1.0.0", - "readdirp": "^2.0.0" - } - }, - "cliui": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", - "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", - "dev": true, - "requires": { - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1", - "wrap-ansi": "^2.0.0" - } - }, - "clone": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", - "integrity": "sha1-2jCcwmPfFZlMaIypAheco8fNfH4=", - "dev": true - }, - "clone-stats": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/clone-stats/-/clone-stats-0.0.1.tgz", - "integrity": "sha1-uI+UqCzzi4eR1YBG6kAprYjKmdE=", - "dev": true - }, - "co": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", - "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=", - "dev": true - }, - "code-point-at": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", - "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", - "dev": true - }, - "color-convert": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.1.tgz", - "integrity": "sha512-mjGanIiwQJskCC18rPR6OmrZ6fm2Lc7PeGFYwCmy5J34wC6F1PzdGL6xeMfmgicfYcNLGuVFA3WzXtIDCQSZxQ==", - "dev": true, - "requires": { - "color-name": "^1.1.1" - } - }, - "color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", - "dev": true - }, - "color-support": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz", - "integrity": "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==", - "dev": true - }, - "combined-stream": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.6.tgz", - "integrity": "sha1-cj599ugBrFYTETp+RFqbactjKBg=", - "dev": true, - "requires": { - "delayed-stream": "~1.0.0" - } - }, - "commander": { - "version": "2.15.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.15.1.tgz", - "integrity": "sha512-VlfT9F3V0v+jr4yxPc5gg9s62/fIVWsd2Bk2iD435um1NlGMYdVCq+MjcXnhYq2icNOizHr1kK+5TI6H0Hy0ag==", - "dev": true - }, - "concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", - "dev": true - }, - "console-control-strings": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", - "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=", - "dev": true - }, - "convert-source-map": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.5.1.tgz", - "integrity": "sha1-uCeAl7m8IpNl3lxiz1/K7YtVmeU=", - "dev": true - }, - "core-js": { - "version": "2.5.5", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.5.tgz", - "integrity": "sha1-sU3ek2xkDAV5prUMq8wTLdYSfjs=", - "dev": true - }, - "core-util-is": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", - "dev": true - }, - "cpx": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/cpx/-/cpx-1.5.0.tgz", - "integrity": "sha1-GFvgGFEdhycN7czCkxceN2VauI8=", - "dev": true, - "requires": { - "babel-runtime": "^6.9.2", - "chokidar": "^1.6.0", - "duplexer": "^0.1.1", - "glob": "^7.0.5", - "glob2base": "^0.0.12", - "minimatch": "^3.0.2", - "mkdirp": "^0.5.1", - "resolve": "^1.1.7", - "safe-buffer": "^5.0.1", - "shell-quote": "^1.6.1", - "subarg": "^1.0.0" - } - }, - "cross-spawn": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-3.0.1.tgz", - "integrity": "sha1-ElYDfsufDF9549bvE14wdwGEuYI=", - "dev": true, - "requires": { - "lru-cache": "^4.0.1", - "which": "^1.2.9" - } - }, - "cryptiles": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-2.0.5.tgz", - "integrity": "sha1-O9/s3GCBR8HGcgL6KR59ylnqo7g=", - "dev": true, - "requires": { - "boom": "2.x.x" - } - }, - "css-parse": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/css-parse/-/css-parse-1.7.0.tgz", - "integrity": "sha1-Mh9s9zeCpv91ERE5D8BeLGV9jJs=", - "dev": true - }, - "currently-unhandled": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz", - "integrity": "sha1-mI3zP+qxke95mmE2nddsF635V+o=", - "dev": true, - "requires": { - "array-find-index": "^1.0.1" - } - }, - "dashdash": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", - "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", - "dev": true, - "requires": { - "assert-plus": "^1.0.0" - }, - "dependencies": { - "assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", - "dev": true - } - } - }, - "dateformat": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-2.2.0.tgz", - "integrity": "sha1-QGXiATz5+5Ft39gu+1Bq1MZ2kGI=", - "dev": true - }, - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "decamelize": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", - "dev": true - }, - "delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", - "dev": true - }, - "delegates": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", - "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=", - "dev": true - }, - "diff": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", - "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", - "dev": true - }, - "duplexer": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.1.tgz", - "integrity": "sha1-rOb/gIwc5mtX0ev5eXessCM0z8E=", - "dev": true - }, - "duplexer2": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.0.2.tgz", - "integrity": "sha1-xhTc9n4vsUmVqRcR5aYX6KYKMds=", - "dev": true, - "requires": { - "readable-stream": "~1.1.9" - }, - "dependencies": { - "isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", - "dev": true - }, - "readable-stream": { - "version": "1.1.14", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", - "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "0.0.1", - "string_decoder": "~0.10.x" - } - }, - "string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", - "dev": true - } - } - }, - "duplexify": { - "version": "3.5.4", - "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.5.4.tgz", - "integrity": "sha512-JzYSLYMhoVVBe8+mbHQ4KgpvHpm0DZpJuL8PY93Vyv1fW7jYJ90LoXa1di/CVbJM+TgMs91rbDapE/RNIfnJsA==", - "dev": true, - "requires": { - "end-of-stream": "^1.0.0", - "inherits": "^2.0.1", - "readable-stream": "^2.0.0", - "stream-shift": "^1.0.0" - } - }, - "ecc-jsbn": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz", - "integrity": "sha1-D8c6ntXw1Tw4GTOYUj735UN3dQU=", - "dev": true, - "optional": true, - "requires": { - "jsbn": "~0.1.0" - } - }, - "electron-to-chromium": { - "version": "1.3.42", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.42.tgz", - "integrity": "sha1-lcM78B0MxAVVauyJn+Yf1NduoPk=", - "dev": true - }, - "end-of-stream": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.1.tgz", - "integrity": "sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q==", - "dev": true, - "requires": { - "once": "^1.4.0" - } - }, - "errno": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.7.tgz", - "integrity": "sha512-MfrRBDWzIWifgq6tJj60gkAwtLNb6sQPlcFrSOflcP1aFmmruKQ2wRnze/8V6kgyz7H3FF8Npzv78mZ7XLLflg==", - "dev": true, - "optional": true, - "requires": { - "prr": "~1.0.1" - } - }, - "error-ex": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.1.tgz", - "integrity": "sha1-+FWobOYa3E6GIcPNoh56dhLDqNw=", - "dev": true, - "requires": { - "is-arrayish": "^0.2.1" - } - }, - "es6-promise": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-3.3.1.tgz", - "integrity": "sha1-oIzd6EzNvzTQJ6FFG8kdS80ophM=", - "dev": true - }, - "es6-templates": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/es6-templates/-/es6-templates-0.2.3.tgz", - "integrity": "sha1-XLmsn7He1usSOTQrgdeSu7QHjuQ=", - "dev": true, - "requires": { - "recast": "~0.11.12", - "through": "~2.3.6" - } - }, - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", - "dev": true - }, - "esprima": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-3.1.3.tgz", - "integrity": "sha1-/cpRzuYTOJXjyI1TXOSdv/YqRjM=", - "dev": true - }, - "estree-walker": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-0.5.1.tgz", - "integrity": "sha512-7HgCgz1axW7w5aOvgOQkoR1RMBkllygJrssU3BvymKQ95lxXYv6Pon17fBRDm9qhkvXZGijOULoSF9ShOk/ZLg==", - "dev": true - }, - "expand-brackets": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-0.1.5.tgz", - "integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=", - "dev": true, - "requires": { - "is-posix-bracket": "^0.1.0" - } - }, - "expand-range": { - "version": "1.8.2", - "resolved": "https://registry.npmjs.org/expand-range/-/expand-range-1.8.2.tgz", - "integrity": "sha1-opnv/TNf4nIeuujiV+x5ZE/IUzc=", - "dev": true, - "requires": { - "fill-range": "^2.1.0" - } - }, - "extend": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz", - "integrity": "sha1-p1Xqe8Gt/MWjHOfnYtuq3F5jZEQ=", - "dev": true - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - }, - "extglob": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz", - "integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=", - "dev": true, - "requires": { - "is-extglob": "^1.0.0" - } - }, - "extsprintf": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", - "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=", - "dev": true - }, - "fancy-log": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/fancy-log/-/fancy-log-1.3.2.tgz", - "integrity": "sha1-9BEl49hPLn2JpD0G2VjI94vha+E=", - "dev": true, - "requires": { - "ansi-gray": "^0.1.1", - "color-support": "^1.1.3", - "time-stamp": "^1.0.0" - } - }, - "filename-regex": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/filename-regex/-/filename-regex-2.0.1.tgz", - "integrity": "sha1-wcS5vuPglyXdsQa3XB4wH+LxiyY=", - "dev": true - }, - "fill-range": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-2.2.3.tgz", - "integrity": "sha1-ULd9/X5Gm8dJJHCWNpn+eoSFpyM=", - "dev": true, - "requires": { - "is-number": "^2.1.0", - "isobject": "^2.0.0", - "randomatic": "^1.1.3", - "repeat-element": "^1.1.2", - "repeat-string": "^1.5.2" - } - }, - "find-index": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/find-index/-/find-index-0.1.1.tgz", - "integrity": "sha1-Z101iyyjiS15Whq0cjL4tuLg3eQ=", - "dev": true - }, - "find-up": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", - "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", - "dev": true, - "requires": { - "path-exists": "^2.0.0", - "pinkie-promise": "^2.0.0" - } - }, - "first-chunk-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/first-chunk-stream/-/first-chunk-stream-1.0.0.tgz", - "integrity": "sha1-Wb+1DNkF9g18OUzT2ayqtOatk04=", - "dev": true - }, - "for-in": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", - "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", - "dev": true - }, - "for-own": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/for-own/-/for-own-0.1.5.tgz", - "integrity": "sha1-UmXGgaTylNq78XyVCbZ2OqhFEM4=", - "dev": true, - "requires": { - "for-in": "^1.0.1" - } - }, - "forever-agent": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", - "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=", - "dev": true - }, - "form-data": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.1.4.tgz", - "integrity": "sha1-M8GDrPGTJ27KqYFDpp6Uv+4XUNE=", - "dev": true, - "requires": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.5", - "mime-types": "^2.1.12" - } - }, - "fs-extra": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-4.0.3.tgz", - "integrity": "sha512-q6rbdDd1o2mAnQreO7YADIxf/Whx4AHBiRf6d+/cVT8h44ss+lHgxf1FemcqDnQt9X3ct4McHr+JMGlYSsK7Cg==", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" - } - }, - "fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", - "dev": true - }, - "fsevents": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.2.tgz", - "integrity": "sha512-iownA+hC4uHFp+7gwP/y5SzaiUo7m2vpa0dhpzw8YuKtiZsz7cIXsFbXpLEeBM6WuCQyw1MH4RRe6XI8GFUctQ==", - "dev": true, - "optional": true, - "requires": { - "nan": "^2.9.2", - "node-pre-gyp": "^0.9.0" - }, - "dependencies": { - "abbrev": { - "version": "1.1.1", - "bundled": true, - "dev": true, - "optional": true - }, - "ansi-regex": { - "version": "2.1.1", - "bundled": true, - "dev": true - }, - "aproba": { - "version": "1.2.0", - "bundled": true, - "dev": true, - "optional": true - }, - "are-we-there-yet": { - "version": "1.1.4", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "delegates": "^1.0.0", - "readable-stream": "^2.0.6" - } - }, - "balanced-match": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "brace-expansion": { - "version": "1.1.11", - "bundled": true, - "dev": true, - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "chownr": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "code-point-at": { - "version": "1.1.0", - "bundled": true, - "dev": true - }, - "concat-map": { - "version": "0.0.1", - "bundled": true, - "dev": true - }, - "console-control-strings": { - "version": "1.1.0", - "bundled": true, - "dev": true - }, - "core-util-is": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "debug": { - "version": "2.6.9", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "ms": "2.0.0" - } - }, - "deep-extend": { - "version": "0.4.2", - "bundled": true, - "dev": true, - "optional": true - }, - "delegates": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "detect-libc": { - "version": "1.0.3", - "bundled": true, - "dev": true, - "optional": true - }, - "fs-minipass": { - "version": "1.2.5", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "minipass": "^2.2.1" - } - }, - "fs.realpath": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "gauge": { - "version": "2.7.4", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "aproba": "^1.0.3", - "console-control-strings": "^1.0.0", - "has-unicode": "^2.0.0", - "object-assign": "^4.1.0", - "signal-exit": "^3.0.0", - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1", - "wide-align": "^1.1.0" - } - }, - "glob": { - "version": "7.1.2", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "has-unicode": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "iconv-lite": { - "version": "0.4.21", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "safer-buffer": "^2.1.0" - } - }, - "ignore-walk": { - "version": "3.0.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "minimatch": "^3.0.4" - } - }, - "inflight": { - "version": "1.0.6", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.3", - "bundled": true, - "dev": true - }, - "ini": { - "version": "1.3.5", - "bundled": true, - "dev": true, - "optional": true - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "number-is-nan": "^1.0.0" - } - }, - "isarray": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "minimatch": { - "version": "3.0.4", - "bundled": true, - "dev": true, - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "minimist": { - "version": "0.0.8", - "bundled": true, - "dev": true - }, - "minipass": { - "version": "2.2.4", - "bundled": true, - "dev": true, - "requires": { - "safe-buffer": "^5.1.1", - "yallist": "^3.0.0" - } - }, - "minizlib": { - "version": "1.1.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "minipass": "^2.2.1" - } - }, - "mkdirp": { - "version": "0.5.1", - "bundled": true, - "dev": true, - "requires": { - "minimist": "0.0.8" - } - }, - "ms": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "needle": { - "version": "2.2.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "debug": "^2.1.2", - "iconv-lite": "^0.4.4", - "sax": "^1.2.4" - } - }, - "node-pre-gyp": { - "version": "0.9.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "detect-libc": "^1.0.2", - "mkdirp": "^0.5.1", - "needle": "^2.2.0", - "nopt": "^4.0.1", - "npm-packlist": "^1.1.6", - "npmlog": "^4.0.2", - "rc": "^1.1.7", - "rimraf": "^2.6.1", - "semver": "^5.3.0", - "tar": "^4" - } - }, - "nopt": { - "version": "4.0.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "abbrev": "1", - "osenv": "^0.1.4" - } - }, - "npm-bundled": { - "version": "1.0.3", - "bundled": true, - "dev": true, - "optional": true - }, - "npm-packlist": { - "version": "1.1.10", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "ignore-walk": "^3.0.1", - "npm-bundled": "^1.0.1" - } - }, - "npmlog": { - "version": "4.1.2", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "are-we-there-yet": "~1.1.2", - "console-control-strings": "~1.1.0", - "gauge": "~2.7.3", - "set-blocking": "~2.0.0" - } - }, - "number-is-nan": { - "version": "1.0.1", - "bundled": true, - "dev": true - }, - "object-assign": { - "version": "4.1.1", - "bundled": true, - "dev": true, - "optional": true - }, - "once": { - "version": "1.4.0", - "bundled": true, - "dev": true, - "requires": { - "wrappy": "1" - } - }, - "os-homedir": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "os-tmpdir": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "osenv": { - "version": "0.1.5", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "os-homedir": "^1.0.0", - "os-tmpdir": "^1.0.0" - } - }, - "path-is-absolute": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "process-nextick-args": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "rc": { - "version": "1.2.6", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "deep-extend": "~0.4.0", - "ini": "~1.3.0", - "minimist": "^1.2.0", - "strip-json-comments": "~2.0.1" - }, - "dependencies": { - "minimist": { - "version": "1.2.0", - "bundled": true, - "dev": true, - "optional": true - } - } - }, - "readable-stream": { - "version": "2.3.6", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "rimraf": { - "version": "2.6.2", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "glob": "^7.0.5" - } - }, - "safe-buffer": { - "version": "5.1.1", - "bundled": true, - "dev": true - }, - "safer-buffer": { - "version": "2.1.2", - "bundled": true, - "dev": true, - "optional": true - }, - "sax": { - "version": "1.2.4", - "bundled": true, - "dev": true, - "optional": true - }, - "semver": { - "version": "5.5.0", - "bundled": true, - "dev": true, - "optional": true - }, - "set-blocking": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "signal-exit": { - "version": "3.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "string-width": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - } - }, - "string_decoder": { - "version": "1.1.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "safe-buffer": "~5.1.0" - } - }, - "strip-ansi": { - "version": "3.0.1", - "bundled": true, - "dev": true, - "requires": { - "ansi-regex": "^2.0.0" - } - }, - "strip-json-comments": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "tar": { - "version": "4.4.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "chownr": "^1.0.1", - "fs-minipass": "^1.2.5", - "minipass": "^2.2.4", - "minizlib": "^1.1.0", - "mkdirp": "^0.5.0", - "safe-buffer": "^5.1.1", - "yallist": "^3.0.2" - } - }, - "util-deprecate": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "wide-align": { - "version": "1.1.2", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "string-width": "^1.0.2" - } - }, - "wrappy": { - "version": "1.0.2", - "bundled": true, - "dev": true - }, - "yallist": { - "version": "3.0.2", - "bundled": true, - "dev": true - } - } - }, - "fstream": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.11.tgz", - "integrity": "sha1-XB+x8RdHcRTwYyoOtLcbPLD9MXE=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "inherits": "~2.0.0", - "mkdirp": ">=0.5 0", - "rimraf": "2" - } - }, - "gauge": { - "version": "2.7.4", - "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz", - "integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=", - "dev": true, - "requires": { - "aproba": "^1.0.3", - "console-control-strings": "^1.0.0", - "has-unicode": "^2.0.0", - "object-assign": "^4.1.0", - "signal-exit": "^3.0.0", - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1", - "wide-align": "^1.1.0" - }, - "dependencies": { - "object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", - "dev": true - } - } - }, - "gaze": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/gaze/-/gaze-1.1.2.tgz", - "integrity": "sha1-hHIkZ3rbiHDWeSV+0ziP22HkAQU=", - "dev": true, - "requires": { - "globule": "^1.0.0" - } - }, - "generate-function": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/generate-function/-/generate-function-2.0.0.tgz", - "integrity": "sha1-aFj+fAlpt9TpCTM3ZHrHn2DfvnQ=", - "dev": true - }, - "generate-object-property": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/generate-object-property/-/generate-object-property-1.2.0.tgz", - "integrity": "sha1-nA4cQDCM6AT0eDYYuTf6iPmdUNA=", - "dev": true, - "requires": { - "is-property": "^1.0.0" - } - }, - "get-caller-file": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.2.tgz", - "integrity": "sha1-9wLmMSfn4jHBYKgMFVSstw1QR+U=", - "dev": true - }, - "get-stdin": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz", - "integrity": "sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4=", - "dev": true - }, - "getpass": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", - "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", - "dev": true, - "requires": { - "assert-plus": "^1.0.0" - }, - "dependencies": { - "assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", - "dev": true - } - } - }, - "glob": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", - "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", - "dev": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "glob-base": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/glob-base/-/glob-base-0.3.0.tgz", - "integrity": "sha1-27Fk9iIbHAscz4Kuoyi0l98Oo8Q=", - "dev": true, - "requires": { - "glob-parent": "^2.0.0", - "is-glob": "^2.0.0" - } - }, - "glob-parent": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz", - "integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=", - "dev": true, - "requires": { - "is-glob": "^2.0.0" - } - }, - "glob-stream": { - "version": "5.3.5", - "resolved": "https://registry.npmjs.org/glob-stream/-/glob-stream-5.3.5.tgz", - "integrity": "sha1-pVZlqajM3EGRWofHAeMtTgFvrSI=", - "dev": true, - "requires": { - "extend": "^3.0.0", - "glob": "^5.0.3", - "glob-parent": "^3.0.0", - "micromatch": "^2.3.7", - "ordered-read-streams": "^0.3.0", - "through2": "^0.6.0", - "to-absolute-glob": "^0.1.1", - "unique-stream": "^2.0.2" - }, - "dependencies": { - "glob": { - "version": "5.0.15", - "resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz", - "integrity": "sha1-G8k2ueAvSmA/zCIuz3Yz0wuLk7E=", - "dev": true, - "requires": { - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "2 || 3", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "glob-parent": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", - "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", - "dev": true, - "requires": { - "is-glob": "^3.1.0", - "path-dirname": "^1.0.0" - } - }, - "is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", - "dev": true - }, - "is-glob": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", - "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", - "dev": true, - "requires": { - "is-extglob": "^2.1.0" - } - }, - "isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", - "dev": true - }, - "readable-stream": { - "version": "1.0.34", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", - "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "0.0.1", - "string_decoder": "~0.10.x" - } - }, - "string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", - "dev": true - }, - "through2": { - "version": "0.6.5", - "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz", - "integrity": "sha1-QaucZ7KdVyCQcUEOHXp6lozTrUg=", - "dev": true, - "requires": { - "readable-stream": ">=1.0.33-1 <1.1.0-0", - "xtend": ">=4.0.0 <4.1.0-0" - } - } - } - }, - "glob2base": { - "version": "0.0.12", - "resolved": "https://registry.npmjs.org/glob2base/-/glob2base-0.0.12.tgz", - "integrity": "sha1-nUGbPijxLoOjYhZKJ3BVkiycDVY=", - "dev": true, - "requires": { - "find-index": "^0.1.1" - } - }, - "globule": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/globule/-/globule-1.2.0.tgz", - "integrity": "sha1-HcScaCLdnoovoAuiopUAboZkvQk=", - "dev": true, - "requires": { - "glob": "~7.1.1", - "lodash": "~4.17.4", - "minimatch": "~3.0.2" - } - }, - "glogg": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/glogg/-/glogg-1.0.1.tgz", - "integrity": "sha512-ynYqXLoluBKf9XGR1gA59yEJisIL7YHEH4xr3ZziHB5/yl4qWfaK8Js9jGe6gBGCSCKVqiyO30WnRZADvemUNw==", - "dev": true, - "requires": { - "sparkles": "^1.0.0" - } - }, - "graceful-fs": { - "version": "4.1.11", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", - "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=", - "dev": true - }, - "gulp-inline-ng2-template": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/gulp-inline-ng2-template/-/gulp-inline-ng2-template-4.1.0.tgz", - "integrity": "sha1-Yfq1mmaUXDegxIOLXnk9ZwjpHf0=", - "dev": true, - "requires": { - "async": "^2.0.0-rc.5", - "clone": "~1.0.2", - "es6-templates": "~0.2.2", - "extend": "~3.0.0", - "gulp-util": "~3.0.6", - "isarray": "0.0.1", - "through2": "~2.0.0" - }, - "dependencies": { - "isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", - "dev": true - } - } - }, - "gulp-sourcemaps": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/gulp-sourcemaps/-/gulp-sourcemaps-1.6.0.tgz", - "integrity": "sha1-uG/zSdgBzrVuHZ59x7vLS33uYAw=", - "dev": true, - "requires": { - "convert-source-map": "^1.1.1", - "graceful-fs": "^4.1.2", - "strip-bom": "^2.0.0", - "through2": "^2.0.0", - "vinyl": "^1.0.0" - }, - "dependencies": { - "vinyl": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-1.2.0.tgz", - "integrity": "sha1-XIgDbPVl5d8FVYv8kR+GVt8hiIQ=", - "dev": true, - "requires": { - "clone": "^1.0.0", - "clone-stats": "^0.0.1", - "replace-ext": "0.0.1" - } - } - } - }, - "gulp-util": { - "version": "3.0.8", - "resolved": "https://registry.npmjs.org/gulp-util/-/gulp-util-3.0.8.tgz", - "integrity": "sha1-AFTh50RQLifATBh8PsxQXdVLu08=", - "dev": true, - "requires": { - "array-differ": "^1.0.0", - "array-uniq": "^1.0.2", - "beeper": "^1.0.0", - "chalk": "^1.0.0", - "dateformat": "^2.0.0", - "fancy-log": "^1.1.0", - "gulplog": "^1.0.0", - "has-gulplog": "^0.1.0", - "lodash._reescape": "^3.0.0", - "lodash._reevaluate": "^3.0.0", - "lodash._reinterpolate": "^3.0.0", - "lodash.template": "^3.0.0", - "minimist": "^1.1.0", - "multipipe": "^0.1.2", - "object-assign": "^3.0.0", - "replace-ext": "0.0.1", - "through2": "^2.0.0", - "vinyl": "^0.5.0" - }, - "dependencies": { - "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", - "dev": true - }, - "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", - "dev": true, - "requires": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" - } - }, - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", - "dev": true - } - } - }, - "gulplog": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/gulplog/-/gulplog-1.0.0.tgz", - "integrity": "sha1-4oxNRdBey77YGDY86PnFkmIp/+U=", - "dev": true, - "requires": { - "glogg": "^1.0.0" - } - }, - "har-schema": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-1.0.5.tgz", - "integrity": "sha1-0mMTX0MwfALGAq/I/pWXDAFRNp4=", - "dev": true - }, - "har-validator": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-4.2.1.tgz", - "integrity": "sha1-M0gdDxu/9gDdID11gSpqX7oALio=", - "dev": true, - "requires": { - "ajv": "^4.9.1", - "har-schema": "^1.0.5" - } - }, - "has-ansi": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", - "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", - "dev": true, - "requires": { - "ansi-regex": "^2.0.0" - } - }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true - }, - "has-gulplog": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/has-gulplog/-/has-gulplog-0.1.0.tgz", - "integrity": "sha1-ZBTIKRNpfaUVkDl9r7EvIpZ4Ec4=", - "dev": true, - "requires": { - "sparkles": "^1.0.0" - } - }, - "has-unicode": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", - "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=", - "dev": true - }, - "hawk": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/hawk/-/hawk-3.1.3.tgz", - "integrity": "sha1-B4REvXwWQLD+VA0sm3PVlnjo4cQ=", - "dev": true, - "requires": { - "boom": "2.x.x", - "cryptiles": "2.x.x", - "hoek": "2.x.x", - "sntp": "1.x.x" - } - }, - "hoek": { - "version": "2.16.3", - "resolved": "https://registry.npmjs.org/hoek/-/hoek-2.16.3.tgz", - "integrity": "sha1-ILt0A9POo5jpHcRxCo/xuCdKJe0=", - "dev": true - }, - "homedir-polyfill": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.1.tgz", - "integrity": "sha1-TCu8inWJmP7r9e1oWA921GdotLw=", - "dev": true, - "requires": { - "parse-passwd": "^1.0.0" - } - }, - "hosted-git-info": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.6.0.tgz", - "integrity": "sha512-lIbgIIQA3lz5XaB6vxakj6sDHADJiZadYEJB+FgA+C4nubM1NwcuvUr9EJPmnH1skZqpqUzWborWo8EIUi0Sdw==", - "dev": true - }, - "http-signature": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.1.1.tgz", - "integrity": "sha1-33LiZwZs0Kxn+3at+OE0qPvPkb8=", - "dev": true, - "requires": { - "assert-plus": "^0.2.0", - "jsprim": "^1.2.2", - "sshpk": "^1.7.0" - } - }, - "image-size": { - "version": "0.5.5", - "resolved": "https://registry.npmjs.org/image-size/-/image-size-0.5.5.tgz", - "integrity": "sha1-Cd/Uq50g4p6xw+gLiZA3jfnjy5w=", - "dev": true, - "optional": true - }, - "in-publish": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/in-publish/-/in-publish-2.0.0.tgz", - "integrity": "sha1-4g/146KvwmkDILbcVSaCqcf631E=", - "dev": true - }, - "indent-string": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-2.1.0.tgz", - "integrity": "sha1-ji1INIdCEhtKghi3oTfppSBJ3IA=", - "dev": true, - "requires": { - "repeating": "^2.0.0" - } - }, - "inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", - "dev": true, - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", - "dev": true - }, - "invert-kv": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", - "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=", - "dev": true - }, - "is-arrayish": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", - "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", - "dev": true - }, - "is-binary-path": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz", - "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", - "dev": true, - "requires": { - "binary-extensions": "^1.0.0" - } - }, - "is-buffer": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", - "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", - "dev": true - }, - "is-builtin-module": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz", - "integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=", - "dev": true, - "requires": { - "builtin-modules": "^1.0.0" - } - }, - "is-dotfile": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/is-dotfile/-/is-dotfile-1.0.3.tgz", - "integrity": "sha1-pqLzL/0t+wT1yiXs0Pa4PPeYoeE=", - "dev": true - }, - "is-equal-shallow": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz", - "integrity": "sha1-IjgJj8Ih3gvPpdnqxMRdY4qhxTQ=", - "dev": true, - "requires": { - "is-primitive": "^2.0.0" - } - }, - "is-extendable": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", - "dev": true - }, - "is-extglob": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", - "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", - "dev": true - }, - "is-finite": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.0.2.tgz", - "integrity": "sha1-zGZ3aVYCvlUO8R6LSqYwU0K20Ko=", - "dev": true, - "requires": { - "number-is-nan": "^1.0.0" - } - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", - "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", - "dev": true, - "requires": { - "number-is-nan": "^1.0.0" - } - }, - "is-glob": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", - "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", - "dev": true, - "requires": { - "is-extglob": "^1.0.0" - } - }, - "is-module": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-module/-/is-module-1.0.0.tgz", - "integrity": "sha1-Mlj7afeMFNW4FdZkM2tM/7ZEFZE=", - "dev": true - }, - "is-my-ip-valid": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-my-ip-valid/-/is-my-ip-valid-1.0.0.tgz", - "integrity": "sha512-gmh/eWXROncUzRnIa1Ubrt5b8ep/MGSnfAUI3aRp+sqTCs1tv1Isl8d8F6JmkN3dXKc3ehZMrtiPN9eL03NuaQ==", - "dev": true - }, - "is-my-json-valid": { - "version": "2.17.2", - "resolved": "https://registry.npmjs.org/is-my-json-valid/-/is-my-json-valid-2.17.2.tgz", - "integrity": "sha512-IBhBslgngMQN8DDSppmgDv7RNrlFotuuDsKcrCP3+HbFaVivIBU7u9oiiErw8sH4ynx3+gOGQ3q2otkgiSi6kg==", - "dev": true, - "requires": { - "generate-function": "^2.0.0", - "generate-object-property": "^1.1.0", - "is-my-ip-valid": "^1.0.0", - "jsonpointer": "^4.0.0", - "xtend": "^4.0.0" - } - }, - "is-number": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-2.1.0.tgz", - "integrity": "sha1-Afy7s5NGOlSPL0ZszhbezknbkI8=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - } - }, - "is-posix-bracket": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz", - "integrity": "sha1-MzTceXdDaOkvAW5vvAqI9c1ua8Q=", - "dev": true - }, - "is-primitive": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-primitive/-/is-primitive-2.0.0.tgz", - "integrity": "sha1-IHurkWOEmcB7Kt8kCkGochADRXU=", - "dev": true - }, - "is-property": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz", - "integrity": "sha1-V/4cTkhHTt1lsJkR8msc1Ald2oQ=", - "dev": true - }, - "is-stream": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", - "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", - "dev": true - }, - "is-typedarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", - "dev": true - }, - "is-utf8": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", - "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=", - "dev": true - }, - "is-valid-glob": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/is-valid-glob/-/is-valid-glob-0.3.0.tgz", - "integrity": "sha1-1LVcafUYhvm2XHDWwmItN+KfSP4=", - "dev": true - }, - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", - "dev": true - }, - "isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", - "dev": true - }, - "isobject": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", - "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", - "dev": true, - "requires": { - "isarray": "1.0.0" - } - }, - "isstream": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", - "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=", - "dev": true - }, - "js-base64": { - "version": "2.4.3", - "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.4.3.tgz", - "integrity": "sha512-H7ErYLM34CvDMto3GbD6xD0JLUGYXR3QTcH6B/tr4Hi/QpSThnCsIp+Sy5FRTw3B0d6py4HcNkW7nO/wdtGWEw==", - "dev": true - }, - "jsbn": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", - "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", - "dev": true, - "optional": true - }, - "json-schema": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", - "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=", - "dev": true - }, - "json-stable-stringify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz", - "integrity": "sha1-mnWdOcXy/1A/1TAGRu1EX4jE+a8=", - "dev": true, - "requires": { - "jsonify": "~0.0.0" - } - }, - "json-stringify-safe": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", - "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", - "dev": true - }, - "jsonfile": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", - "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.6" - } - }, - "jsonify": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz", - "integrity": "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=", - "dev": true - }, - "jsonpointer": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/jsonpointer/-/jsonpointer-4.0.1.tgz", - "integrity": "sha1-T9kss04OnbPInIYi7PUfm5eMbLk=", - "dev": true - }, - "jsprim": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", - "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", - "dev": true, - "requires": { - "assert-plus": "1.0.0", - "extsprintf": "1.3.0", - "json-schema": "0.2.3", - "verror": "1.10.0" - }, - "dependencies": { - "assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", - "dev": true - } - } - }, - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - }, - "lazystream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/lazystream/-/lazystream-1.0.0.tgz", - "integrity": "sha1-9plf4PggOS9hOWvolGJAe7dxaOQ=", - "dev": true, - "requires": { - "readable-stream": "^2.0.5" - } - }, - "lcid": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", - "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", - "dev": true, - "requires": { - "invert-kv": "^1.0.0" - } - }, - "less": { - "version": "2.7.3", - "resolved": "https://registry.npmjs.org/less/-/less-2.7.3.tgz", - "integrity": "sha512-KPdIJKWcEAb02TuJtaLrhue0krtRLoRoo7x6BNJIBelO00t/CCdJQUnHW5V34OnHMWzIktSalJxRO+FvytQlCQ==", - "dev": true, - "requires": { - "errno": "^0.1.1", - "graceful-fs": "^4.1.2", - "image-size": "~0.5.0", - "mime": "^1.2.11", - "mkdirp": "^0.5.0", - "promise": "^7.1.1", - "request": "2.81.0", - "source-map": "^0.5.3" - } - }, - "load-json-file": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", - "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "parse-json": "^2.2.0", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0", - "strip-bom": "^2.0.0" - } - }, - "lodash": { - "version": "4.17.10", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.10.tgz", - "integrity": "sha512-UejweD1pDoXu+AD825lWwp4ZGtSwgnpZxb3JDViD7StjQz+Nb/6l093lx4OQ0foGWNRoc19mWy7BzL+UAK2iVg==", - "dev": true - }, - "lodash._basecopy": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/lodash._basecopy/-/lodash._basecopy-3.0.1.tgz", - "integrity": "sha1-jaDmqHbPNEwK2KVIghEd08XHyjY=", - "dev": true - }, - "lodash._basetostring": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/lodash._basetostring/-/lodash._basetostring-3.0.1.tgz", - "integrity": "sha1-0YYdh3+CSlL2aYMtyvPuFVZqB9U=", - "dev": true - }, - "lodash._basevalues": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/lodash._basevalues/-/lodash._basevalues-3.0.0.tgz", - "integrity": "sha1-W3dXYoAr3j0yl1A+JjAIIP32Ybc=", - "dev": true - }, - "lodash._getnative": { - "version": "3.9.1", - "resolved": "https://registry.npmjs.org/lodash._getnative/-/lodash._getnative-3.9.1.tgz", - "integrity": "sha1-VwvH3t5G1hzc3mh9ZdPuy6o6r/U=", - "dev": true - }, - "lodash._isiterateecall": { - "version": "3.0.9", - "resolved": "https://registry.npmjs.org/lodash._isiterateecall/-/lodash._isiterateecall-3.0.9.tgz", - "integrity": "sha1-UgOte6Ql+uhCRg5pbbnPPmqsBXw=", - "dev": true - }, - "lodash._reescape": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/lodash._reescape/-/lodash._reescape-3.0.0.tgz", - "integrity": "sha1-Kx1vXf4HyKNVdT5fJ/rH8c3hYWo=", - "dev": true - }, - "lodash._reevaluate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/lodash._reevaluate/-/lodash._reevaluate-3.0.0.tgz", - "integrity": "sha1-WLx0xAZklTrgsSTYBpltrKQx4u0=", - "dev": true - }, - "lodash._reinterpolate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz", - "integrity": "sha1-DM8tiRZq8Ds2Y8eWU4t1rG4RTZ0=", - "dev": true - }, - "lodash._root": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/lodash._root/-/lodash._root-3.0.1.tgz", - "integrity": "sha1-+6HEUkwZ7ppfgTa0YJ8BfPTe1pI=", - "dev": true - }, - "lodash.assign": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/lodash.assign/-/lodash.assign-4.2.0.tgz", - "integrity": "sha1-DZnzzNem0mHRm9rrkkUAXShYCOc=", - "dev": true - }, - "lodash.clonedeep": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", - "integrity": "sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=", - "dev": true - }, - "lodash.escape": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/lodash.escape/-/lodash.escape-3.2.0.tgz", - "integrity": "sha1-mV7g3BjBtIzJLv+ucaEKq1tIdpg=", - "dev": true, - "requires": { - "lodash._root": "^3.0.0" - } - }, - "lodash.isarguments": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz", - "integrity": "sha1-L1c9hcaiQon/AGY7SRwdM4/zRYo=", - "dev": true - }, - "lodash.isarray": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/lodash.isarray/-/lodash.isarray-3.0.4.tgz", - "integrity": "sha1-eeTriMNqgSKvhvhEqpvNhRtfu1U=", - "dev": true - }, - "lodash.isequal": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz", - "integrity": "sha1-QVxEePK8wwEgwizhDtMib30+GOA=", - "dev": true - }, - "lodash.keys": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/lodash.keys/-/lodash.keys-3.1.2.tgz", - "integrity": "sha1-TbwEcrFWvlCgsoaFXRvQsMZWCYo=", - "dev": true, - "requires": { - "lodash._getnative": "^3.0.0", - "lodash.isarguments": "^3.0.0", - "lodash.isarray": "^3.0.0" - } - }, - "lodash.mergewith": { - "version": "4.6.1", - "resolved": "https://registry.npmjs.org/lodash.mergewith/-/lodash.mergewith-4.6.1.tgz", - "integrity": "sha512-eWw5r+PYICtEBgrBE5hhlT6aAa75f411bgDz/ZL2KZqYV03USvucsxcHUIlGTDTECs1eunpI7HOV7U+WLDvNdQ==", - "dev": true - }, - "lodash.restparam": { - "version": "3.6.1", - "resolved": "https://registry.npmjs.org/lodash.restparam/-/lodash.restparam-3.6.1.tgz", - "integrity": "sha1-k2pOMJ7zMKdkXtQUWYbIWuWyCAU=", - "dev": true - }, - "lodash.template": { - "version": "3.6.2", - "resolved": "https://registry.npmjs.org/lodash.template/-/lodash.template-3.6.2.tgz", - "integrity": "sha1-+M3sxhaaJVvpCYrosMU9N4kx0U8=", - "dev": true, - "requires": { - "lodash._basecopy": "^3.0.0", - "lodash._basetostring": "^3.0.0", - "lodash._basevalues": "^3.0.0", - "lodash._isiterateecall": "^3.0.0", - "lodash._reinterpolate": "^3.0.0", - "lodash.escape": "^3.0.0", - "lodash.keys": "^3.0.0", - "lodash.restparam": "^3.0.0", - "lodash.templatesettings": "^3.0.0" - } - }, - "lodash.templatesettings": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/lodash.templatesettings/-/lodash.templatesettings-3.1.1.tgz", - "integrity": "sha1-+zB4RHU7Zrnxr6VOJix0UwfbqOU=", - "dev": true, - "requires": { - "lodash._reinterpolate": "^3.0.0", - "lodash.escape": "^3.0.0" - } - }, - "loud-rejection": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/loud-rejection/-/loud-rejection-1.6.0.tgz", - "integrity": "sha1-W0b4AUft7leIcPCG0Eghz5mOVR8=", - "dev": true, - "requires": { - "currently-unhandled": "^0.4.1", - "signal-exit": "^3.0.0" - } - }, - "lru-cache": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.2.tgz", - "integrity": "sha512-wgeVXhrDwAWnIF/yZARsFnMBtdFXOg1b8RIrhilp+0iDYN4mdQcNZElDZ0e4B64BhaxeQ5zN7PMyvu7we1kPeQ==", - "dev": true, - "requires": { - "pseudomap": "^1.0.2", - "yallist": "^2.1.2" - } - }, - "magic-string": { - "version": "0.22.5", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.22.5.tgz", - "integrity": "sha512-oreip9rJZkzvA8Qzk9HFs8fZGF/u7H/gtrE8EN6RjKJ9kh2HlC+yQ2QezifqTZfGyiuAV0dRv5a+y/8gBb1m9w==", - "dev": true, - "requires": { - "vlq": "^0.2.2" - } - }, - "make-error": { - "version": "1.3.4", - "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.4.tgz", - "integrity": "sha512-0Dab5btKVPhibSalc9QGXb559ED7G7iLjFXBaj9Wq8O3vorueR5K5jaE3hkG6ZQINyhA/JgG6Qk4qdFQjsYV6g==", - "dev": true - }, - "map-obj": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", - "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=", - "dev": true - }, - "meow": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/meow/-/meow-3.7.0.tgz", - "integrity": "sha1-cstmi0JSKCkKu/qFaJJYcwioAfs=", - "dev": true, - "requires": { - "camelcase-keys": "^2.0.0", - "decamelize": "^1.1.2", - "loud-rejection": "^1.0.0", - "map-obj": "^1.0.1", - "minimist": "^1.1.3", - "normalize-package-data": "^2.3.4", - "object-assign": "^4.0.1", - "read-pkg-up": "^1.0.1", - "redent": "^1.0.0", - "trim-newlines": "^1.0.0" - }, - "dependencies": { - "object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", - "dev": true - } - } - }, - "merge-stream": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-1.0.1.tgz", - "integrity": "sha1-QEEgLVCKNCugAXQAjfDCUbjBNeE=", - "dev": true, - "requires": { - "readable-stream": "^2.0.1" - } - }, - "micromatch": { - "version": "2.3.11", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz", - "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=", - "dev": true, - "requires": { - "arr-diff": "^2.0.0", - "array-unique": "^0.2.1", - "braces": "^1.8.2", - "expand-brackets": "^0.1.4", - "extglob": "^0.3.1", - "filename-regex": "^2.0.0", - "is-extglob": "^1.0.0", - "is-glob": "^2.0.1", - "kind-of": "^3.0.2", - "normalize-path": "^2.0.1", - "object.omit": "^2.0.0", - "parse-glob": "^3.0.4", - "regex-cache": "^0.4.2" - } - }, - "mime": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", - "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", - "dev": true, - "optional": true - }, - "mime-db": { - "version": "1.33.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.33.0.tgz", - "integrity": "sha512-BHJ/EKruNIqJf/QahvxwQZXKygOQ256myeN/Ew+THcAa5q+PjyTTMMeNQC4DZw5AwfvelsUrA6B67NKMqXDbzQ==", - "dev": true - }, - "mime-types": { - "version": "2.1.18", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.18.tgz", - "integrity": "sha512-lc/aahn+t4/SWV/qcmumYjymLsWfN3ELhpmVuUFjgsORruuZPVSwAQryq+HHGvO/SI2KVX26bx+En+zhM8g8hQ==", - "dev": true, - "requires": { - "mime-db": "~1.33.0" - } - }, - "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "dev": true, - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", - "dev": true - }, - "mkdirp": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", - "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", - "dev": true, - "requires": { - "minimist": "0.0.8" - }, - "dependencies": { - "minimist": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", - "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", - "dev": true - } - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - }, - "multipipe": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/multipipe/-/multipipe-0.1.2.tgz", - "integrity": "sha1-Ko8t33Du1WTf8tV/HhoTfZ8FB4s=", - "dev": true, - "requires": { - "duplexer2": "0.0.2" - } - }, - "nan": { - "version": "2.10.0", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.10.0.tgz", - "integrity": "sha512-bAdJv7fBLhWC+/Bls0Oza+mvTaNQtP+1RyhhhvD95pgUJz6XM5IzgmxOkItJ9tkoCiplvAnXI1tNmmUD/eScyA==", - "dev": true - }, - "ng-packagr": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/ng-packagr/-/ng-packagr-1.7.0.tgz", - "integrity": "sha512-A7TX80ZNTCZYnhLCdSzuW+iXfeOkJ1yH3EwSdbxC546ztvpqBXoIG6ytTJsOskMi9R1uFn2P7wcqA8+MdxfNZg==", - "dev": true, - "requires": { - "@angular/tsc-wrapped": "^4.4.5", - "@ngtools/json-schema": "^1.1.0", - "autoprefixer": "^7.1.1", - "browserslist": "^2.1.5", - "commander": "^2.11.0", - "cpx": "^1.5.0", - "fs-extra": "^4.0.2", - "glob": "^7.1.2", - "gulp-inline-ng2-template": "^4.0.0", - "less": "^2.7.2", - "lodash": "^4.17.4", - "node-sass": "^4.5.3", - "postcss": "^6.0.2", - "read-file": "^0.2.0", - "rimraf": "^2.6.1", - "rollup": "^0.51.0", - "rollup-plugin-commonjs": "^8.2.1", - "rollup-plugin-node-resolve": "^3.0.0", - "sorcery": "^0.10.0", - "stylus": "^0.54.5", - "ts-node": "^3.0.4", - "uglify-js": "^3.0.7", - "vinyl-fs": "^2.4.4" - } - }, - "node-gyp": { - "version": "3.6.2", - "resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-3.6.2.tgz", - "integrity": "sha1-m/vlRWIoYoSDjnUOrAUpWFP6HGA=", - "dev": true, - "requires": { - "fstream": "^1.0.0", - "glob": "^7.0.3", - "graceful-fs": "^4.1.2", - "minimatch": "^3.0.2", - "mkdirp": "^0.5.0", - "nopt": "2 || 3", - "npmlog": "0 || 1 || 2 || 3 || 4", - "osenv": "0", - "request": "2", - "rimraf": "2", - "semver": "~5.3.0", - "tar": "^2.0.0", - "which": "1" - }, - "dependencies": { - "semver": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.3.0.tgz", - "integrity": "sha1-myzl094C0XxgEq0yaqa00M9U+U8=", - "dev": true - } - } - }, - "node-sass": { - "version": "4.9.0", - "resolved": "https://registry.npmjs.org/node-sass/-/node-sass-4.9.0.tgz", - "integrity": "sha512-QFHfrZl6lqRU3csypwviz2XLgGNOoWQbo2GOvtsfQqOfL4cy1BtWnhx/XUeAO9LT3ahBzSRXcEO6DdvAH9DzSg==", - "dev": true, - "requires": { - "async-foreach": "^0.1.3", - "chalk": "^1.1.1", - "cross-spawn": "^3.0.0", - "gaze": "^1.0.0", - "get-stdin": "^4.0.1", - "glob": "^7.0.3", - "in-publish": "^2.0.0", - "lodash.assign": "^4.2.0", - "lodash.clonedeep": "^4.3.2", - "lodash.mergewith": "^4.6.0", - "meow": "^3.7.0", - "mkdirp": "^0.5.1", - "nan": "^2.10.0", - "node-gyp": "^3.3.1", - "npmlog": "^4.0.0", - "request": "~2.79.0", - "sass-graph": "^2.2.4", - "stdout-stream": "^1.4.0", - "true-case-path": "^1.0.2" - }, - "dependencies": { - "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", - "dev": true - }, - "caseless": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.11.0.tgz", - "integrity": "sha1-cVuW6phBWTzDMGeSP17GDr2k99c=", - "dev": true - }, - "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", - "dev": true, - "requires": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" - } - }, - "har-validator": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-2.0.6.tgz", - "integrity": "sha1-zcvAgYgmWtEZtqWnyKtw7s+10n0=", - "dev": true, - "requires": { - "chalk": "^1.1.1", - "commander": "^2.9.0", - "is-my-json-valid": "^2.12.4", - "pinkie-promise": "^2.0.0" - } - }, - "qs": { - "version": "6.3.2", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.3.2.tgz", - "integrity": "sha1-51vV9uJoEioqDgvaYwslUMFmUCw=", - "dev": true - }, - "request": { - "version": "2.79.0", - "resolved": "https://registry.npmjs.org/request/-/request-2.79.0.tgz", - "integrity": "sha1-Tf5b9r6LjNw3/Pk+BLZVd3InEN4=", - "dev": true, - "requires": { - "aws-sign2": "~0.6.0", - "aws4": "^1.2.1", - "caseless": "~0.11.0", - "combined-stream": "~1.0.5", - "extend": "~3.0.0", - "forever-agent": "~0.6.1", - "form-data": "~2.1.1", - "har-validator": "~2.0.6", - "hawk": "~3.1.3", - "http-signature": "~1.1.0", - "is-typedarray": "~1.0.0", - "isstream": "~0.1.2", - "json-stringify-safe": "~5.0.1", - "mime-types": "~2.1.7", - "oauth-sign": "~0.8.1", - "qs": "~6.3.0", - "stringstream": "~0.0.4", - "tough-cookie": "~2.3.0", - "tunnel-agent": "~0.4.1", - "uuid": "^3.0.0" - } - }, - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", - "dev": true - }, - "tunnel-agent": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.4.3.tgz", - "integrity": "sha1-Y3PbdpCf5XDgjXNYM2Xtgop07us=", - "dev": true - } - } - }, - "nopt": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz", - "integrity": "sha1-xkZdvwirzU2zWTF/eaxopkayj/k=", - "dev": true, - "requires": { - "abbrev": "1" - } - }, - "normalize-package-data": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.4.0.tgz", - "integrity": "sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw==", - "dev": true, - "requires": { - "hosted-git-info": "^2.1.4", - "is-builtin-module": "^1.0.0", - "semver": "2 || 3 || 4 || 5", - "validate-npm-package-license": "^3.0.1" - } - }, - "normalize-path": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", - "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", - "dev": true, - "requires": { - "remove-trailing-separator": "^1.0.1" - } - }, - "normalize-range": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/normalize-range/-/normalize-range-0.1.2.tgz", - "integrity": "sha1-LRDAa9/TEuqXd2laTShDlFa3WUI=", - "dev": true - }, - "npmlog": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz", - "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==", - "dev": true, - "requires": { - "are-we-there-yet": "~1.1.2", - "console-control-strings": "~1.1.0", - "gauge": "~2.7.3", - "set-blocking": "~2.0.0" - } - }, - "num2fraction": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/num2fraction/-/num2fraction-1.2.2.tgz", - "integrity": "sha1-b2gragJ6Tp3fpFZM0lidHU5mnt4=", - "dev": true - }, - "number-is-nan": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", - "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", - "dev": true - }, - "oauth-sign": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.8.2.tgz", - "integrity": "sha1-Rqarfwrq2N6unsBWV4C31O/rnUM=", - "dev": true - }, - "object-assign": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-3.0.0.tgz", - "integrity": "sha1-m+3VygiXlJvKR+f/QIBi1Un1h/I=", - "dev": true - }, - "object.omit": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/object.omit/-/object.omit-2.0.1.tgz", - "integrity": "sha1-Gpx0SCnznbuFjHbKNXmuKlTr0fo=", - "dev": true, - "requires": { - "for-own": "^0.1.4", - "is-extendable": "^0.1.1" - } - }, - "once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", - "dev": true, - "requires": { - "wrappy": "1" - } - }, - "ordered-read-streams": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/ordered-read-streams/-/ordered-read-streams-0.3.0.tgz", - "integrity": "sha1-cTfmmzKYuzQiR6G77jiByA4v14s=", - "dev": true, - "requires": { - "is-stream": "^1.0.1", - "readable-stream": "^2.0.1" - } - }, - "os-homedir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", - "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", - "dev": true - }, - "os-locale": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", - "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=", - "dev": true, - "requires": { - "lcid": "^1.0.0" - } - }, - "os-tmpdir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", - "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", - "dev": true - }, - "osenv": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.5.tgz", - "integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==", - "dev": true, - "requires": { - "os-homedir": "^1.0.0", - "os-tmpdir": "^1.0.0" - } - }, - "parse-glob": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/parse-glob/-/parse-glob-3.0.4.tgz", - "integrity": "sha1-ssN2z7EfNVE7rdFz7wu246OIORw=", - "dev": true, - "requires": { - "glob-base": "^0.3.0", - "is-dotfile": "^1.0.0", - "is-extglob": "^1.0.0", - "is-glob": "^2.0.0" - } - }, - "parse-json": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", - "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", - "dev": true, - "requires": { - "error-ex": "^1.2.0" - } - }, - "parse-passwd": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/parse-passwd/-/parse-passwd-1.0.0.tgz", - "integrity": "sha1-bVuTSkVpk7I9N/QKOC1vFmao5cY=", - "dev": true - }, - "path-dirname": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz", - "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=", - "dev": true - }, - "path-exists": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", - "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", - "dev": true, - "requires": { - "pinkie-promise": "^2.0.0" - } - }, - "path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", - "dev": true - }, - "path-parse": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.5.tgz", - "integrity": "sha1-PBrfhx6pzWyUMbbqK9dKD/BVxME=", - "dev": true - }, - "path-type": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", - "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0" - } - }, - "performance-now": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-0.2.0.tgz", - "integrity": "sha1-M+8wxcd9TqIcWlOGnZG1bY8lVeU=", - "dev": true - }, - "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", - "dev": true - }, - "pinkie": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", - "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=", - "dev": true - }, - "pinkie-promise": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", - "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", - "dev": true, - "requires": { - "pinkie": "^2.0.0" - } - }, - "postcss": { - "version": "6.0.21", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.21.tgz", - "integrity": "sha512-y/bKfbQz2Nn/QBC08bwvYUxEFOVGfPIUOTsJ2CK5inzlXW9SdYR1x4pEsG9blRAF/PX+wRNdOah+gx/hv4q7dw==", - "dev": true, - "requires": { - "chalk": "^2.3.2", - "source-map": "^0.6.1", - "supports-color": "^5.3.0" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } - } - }, - "postcss-value-parser": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.0.tgz", - "integrity": "sha1-h/OPnxj3dKSrTIojL1xc6IcqnRU=", - "dev": true - }, - "preserve": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/preserve/-/preserve-0.2.0.tgz", - "integrity": "sha1-gV7R9uvGWSb4ZbMQwHE7yzMVzks=", - "dev": true - }, - "private": { - "version": "0.1.8", - "resolved": "https://registry.npmjs.org/private/-/private-0.1.8.tgz", - "integrity": "sha512-VvivMrbvd2nKkiG38qjULzlc+4Vx4wm/whI9pQD35YrARNnhxeiRktSOhSukRLFNlzg6Br/cJPet5J/u19r/mg==", - "dev": true - }, - "process-nextick-args": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", - "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==", - "dev": true - }, - "promise": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/promise/-/promise-7.3.1.tgz", - "integrity": "sha512-nolQXZ/4L+bP/UGlkfaIujX9BKxGwmQ9OT4mOt5yvy8iK1h3wqTEJCijzGANTCCl9nWjY41juyAn2K3Q1hLLTg==", - "dev": true, - "optional": true, - "requires": { - "asap": "~2.0.3" - } - }, - "prr": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz", - "integrity": "sha1-0/wRS6BplaRexok/SEzrHXj19HY=", - "dev": true, - "optional": true - }, - "pseudomap": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", - "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=", - "dev": true - }, - "punycode": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", - "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", - "dev": true - }, - "qs": { - "version": "6.4.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.4.0.tgz", - "integrity": "sha1-E+JtKK1rD/qpExLNO/cI7TUecjM=", - "dev": true - }, - "randomatic": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/randomatic/-/randomatic-1.1.7.tgz", - "integrity": "sha512-D5JUjPyJbaJDkuAazpVnSfVkLlpeO3wDlPROTMLGKG1zMFNFRgrciKo1ltz/AzNTkqE0HzDx655QOL51N06how==", - "dev": true, - "requires": { - "is-number": "^3.0.0", - "kind-of": "^4.0.0" - }, - "dependencies": { - "is-number": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", - "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "kind-of": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", - "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "read-file": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/read-file/-/read-file-0.2.0.tgz", - "integrity": "sha1-cMa6+IQux9FUD5gf0Oau1Mgb1UU=", - "dev": true - }, - "read-pkg": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", - "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", - "dev": true, - "requires": { - "load-json-file": "^1.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^1.0.0" - } - }, - "read-pkg-up": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", - "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", - "dev": true, - "requires": { - "find-up": "^1.0.0", - "read-pkg": "^1.0.0" - } - }, - "readable-stream": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", - "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "readdirp": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.1.0.tgz", - "integrity": "sha1-TtCtBg3zBzMAxIRANz9y0cxkLXg=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "minimatch": "^3.0.2", - "readable-stream": "^2.0.2", - "set-immediate-shim": "^1.0.1" - } - }, - "recast": { - "version": "0.11.23", - "resolved": "https://registry.npmjs.org/recast/-/recast-0.11.23.tgz", - "integrity": "sha1-RR/TAEqx5N+bTktmN2sqIZEkYtM=", - "dev": true, - "requires": { - "ast-types": "0.9.6", - "esprima": "~3.1.0", - "private": "~0.1.5", - "source-map": "~0.5.0" - } - }, - "redent": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/redent/-/redent-1.0.0.tgz", - "integrity": "sha1-z5Fqsf1fHxbfsggi3W7H9zDCr94=", - "dev": true, - "requires": { - "indent-string": "^2.1.0", - "strip-indent": "^1.0.1" - } - }, - "reflect-metadata": { - "version": "0.1.10", - "resolved": "https://registry.npmjs.org/reflect-metadata/-/reflect-metadata-0.1.10.tgz", - "integrity": "sha1-tPg3BEFqytiZiMmxVjXUfgO5NEo=", - "dev": true - }, - "regenerator-runtime": { - "version": "0.11.1", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz", - "integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==", - "dev": true - }, - "regex-cache": { - "version": "0.4.4", - "resolved": "https://registry.npmjs.org/regex-cache/-/regex-cache-0.4.4.tgz", - "integrity": "sha512-nVIZwtCjkC9YgvWkpM55B5rBhBYRZhAaJbgcFYXXsHnbZ9UZI9nnVWYZpBlCqv9ho2eZryPnWrZGsOdPwVWXWQ==", - "dev": true, - "requires": { - "is-equal-shallow": "^0.1.3" - } - }, - "remove-trailing-separator": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", - "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=", - "dev": true - }, - "repeat-element": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.2.tgz", - "integrity": "sha1-7wiaF40Ug7quTZPrmLT55OEdmQo=", - "dev": true - }, - "repeat-string": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", - "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", - "dev": true - }, - "repeating": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz", - "integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=", - "dev": true, - "requires": { - "is-finite": "^1.0.0" - } - }, - "replace-ext": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-0.0.1.tgz", - "integrity": "sha1-KbvZIHinOfC8zitO5B6DeVNSKSQ=", - "dev": true - }, - "request": { - "version": "2.81.0", - "resolved": "https://registry.npmjs.org/request/-/request-2.81.0.tgz", - "integrity": "sha1-xpKJRqDgbF+Nb4qTM0af/aRimKA=", - "dev": true, - "requires": { - "aws-sign2": "~0.6.0", - "aws4": "^1.2.1", - "caseless": "~0.12.0", - "combined-stream": "~1.0.5", - "extend": "~3.0.0", - "forever-agent": "~0.6.1", - "form-data": "~2.1.1", - "har-validator": "~4.2.1", - "hawk": "~3.1.3", - "http-signature": "~1.1.0", - "is-typedarray": "~1.0.0", - "isstream": "~0.1.2", - "json-stringify-safe": "~5.0.1", - "mime-types": "~2.1.7", - "oauth-sign": "~0.8.1", - "performance-now": "^0.2.0", - "qs": "~6.4.0", - "safe-buffer": "^5.0.1", - "stringstream": "~0.0.4", - "tough-cookie": "~2.3.0", - "tunnel-agent": "^0.6.0", - "uuid": "^3.0.0" - } - }, - "require-directory": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", - "dev": true - }, - "require-main-filename": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz", - "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=", - "dev": true - }, - "resolve": { - "version": "1.7.1", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.7.1.tgz", - "integrity": "sha512-c7rwLofp8g1U+h1KNyHL/jicrKg1Ek4q+Lr33AL65uZTinUZHe30D5HlyN5V9NW0JX1D5dXQ4jqW5l7Sy/kGfw==", - "dev": true, - "requires": { - "path-parse": "^1.0.5" - } - }, - "rimraf": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", - "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", - "dev": true, - "requires": { - "glob": "^7.0.5" - } - }, - "rollup": { - "version": "0.51.8", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-0.51.8.tgz", - "integrity": "sha512-e7FwWxqb4vhdonmwRH06nqC9wR6h1kZojK2D+lN1xjiB8FDtAKgy7o+r8fCXVzQZ1ZCdcVlls3mTq5g6u38Jew==", - "dev": true - }, - "rollup-plugin-commonjs": { - "version": "8.4.1", - "resolved": "https://registry.npmjs.org/rollup-plugin-commonjs/-/rollup-plugin-commonjs-8.4.1.tgz", - "integrity": "sha512-mg+WuD+jlwoo8bJtW3Mvx7Tz6TsIdMsdhuvCnDMoyjh0oxsVgsjB/N0X984RJCWwc5IIiqNVJhXeeITcc73++A==", - "dev": true, - "requires": { - "acorn": "^5.2.1", - "estree-walker": "^0.5.0", - "magic-string": "^0.22.4", - "resolve": "^1.4.0", - "rollup-pluginutils": "^2.0.1" - } - }, - "rollup-plugin-node-resolve": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/rollup-plugin-node-resolve/-/rollup-plugin-node-resolve-3.3.0.tgz", - "integrity": "sha512-9zHGr3oUJq6G+X0oRMYlzid9fXicBdiydhwGChdyeNRGPcN/majtegApRKHLR5drboUvEWU+QeUmGTyEZQs3WA==", - "dev": true, - "requires": { - "builtin-modules": "^2.0.0", - "is-module": "^1.0.0", - "resolve": "^1.1.6" - }, - "dependencies": { - "builtin-modules": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-2.0.0.tgz", - "integrity": "sha512-3U5kUA5VPsRUA3nofm/BXX7GVHKfxz0hOBAPxXrIvHzlDRkQVqEn6yi8QJegxl4LzOHLdvb7XF5dVawa/VVYBg==", - "dev": true - } - } - }, - "rollup-pluginutils": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/rollup-pluginutils/-/rollup-pluginutils-2.0.1.tgz", - "integrity": "sha1-fslbNXP2VDpGpkYb2afFRFJdD8A=", - "dev": true, - "requires": { - "estree-walker": "^0.3.0", - "micromatch": "^2.3.11" - }, - "dependencies": { - "estree-walker": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-0.3.1.tgz", - "integrity": "sha1-5rGlHPcpJSTnI3wxLl/mZgwc4ao=", - "dev": true - } - } - }, - "rxjs": { - "version": "5.4.2", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-5.4.2.tgz", - "integrity": "sha1-KjI2/L8D31e64G/Wly/ZnlwI/Pc=", - "dev": true, - "requires": { - "symbol-observable": "^1.0.1" - } - }, - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true - }, - "sander": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/sander/-/sander-0.5.1.tgz", - "integrity": "sha1-dB4kXiMfB8r7b98PEzrfohalAq0=", - "dev": true, - "requires": { - "es6-promise": "^3.1.2", - "graceful-fs": "^4.1.3", - "mkdirp": "^0.5.1", - "rimraf": "^2.5.2" - } - }, - "sass-graph": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/sass-graph/-/sass-graph-2.2.4.tgz", - "integrity": "sha1-E/vWPNHK8JCLn9k0dq1DpR0eC0k=", - "dev": true, - "requires": { - "glob": "^7.0.0", - "lodash": "^4.0.0", - "scss-tokenizer": "^0.2.3", - "yargs": "^7.0.0" - } - }, - "sax": { - "version": "0.5.8", - "resolved": "https://registry.npmjs.org/sax/-/sax-0.5.8.tgz", - "integrity": "sha1-1HLbIo6zMcJQaw6MFVJK25OdEsE=", - "dev": true - }, - "scss-tokenizer": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/scss-tokenizer/-/scss-tokenizer-0.2.3.tgz", - "integrity": "sha1-jrBtualyMzOCTT9VMGQRSYR85dE=", - "dev": true, - "requires": { - "js-base64": "^2.1.8", - "source-map": "^0.4.2" - }, - "dependencies": { - "source-map": { - "version": "0.4.4", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz", - "integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=", - "dev": true, - "requires": { - "amdefine": ">=0.0.4" - } - } - } - }, - "semver": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.0.tgz", - "integrity": "sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA==", - "dev": true - }, - "set-blocking": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", - "dev": true - }, - "set-immediate-shim": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz", - "integrity": "sha1-SysbJ+uAip+NzEgaWOXlb1mfP2E=", - "dev": true - }, - "shell-quote": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.6.1.tgz", - "integrity": "sha1-9HgZSczkAmlxJ0MOo7PFR29IF2c=", - "dev": true, - "requires": { - "array-filter": "~0.0.0", - "array-map": "~0.0.0", - "array-reduce": "~0.0.0", - "jsonify": "~0.0.0" - } - }, - "signal-exit": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", - "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", - "dev": true - }, - "sntp": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/sntp/-/sntp-1.0.9.tgz", - "integrity": "sha1-ZUEYTMkK7qbG57NeJlkIJEPGYZg=", - "dev": true, - "requires": { - "hoek": "2.x.x" - } - }, - "sorcery": { - "version": "0.10.0", - "resolved": "https://registry.npmjs.org/sorcery/-/sorcery-0.10.0.tgz", - "integrity": "sha1-iukK19fLBfxZ8asMY3hF1cFaUrc=", - "dev": true, - "requires": { - "buffer-crc32": "^0.2.5", - "minimist": "^1.2.0", - "sander": "^0.5.0", - "sourcemap-codec": "^1.3.0" - } - }, - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "dev": true - }, - "source-map-support": { - "version": "0.4.18", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.4.18.tgz", - "integrity": "sha512-try0/JqxPLF9nOjvSta7tVondkP5dwgyLDjVoyMDlmjugT2lRZ1OfsrYTkCd2hkDnJTKRbO/Rl3orm8vlsUzbA==", - "dev": true, - "requires": { - "source-map": "^0.5.6" - } - }, - "sourcemap-codec": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.1.tgz", - "integrity": "sha512-hX1eNBNuilj8yfFnECh0DzLgwKpBLMIvmhgEhixXNui8lMLBInTI8Kyxt++RwJnMNu7cAUo635L2+N1TxMJCzA==", - "dev": true - }, - "sparkles": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/sparkles/-/sparkles-1.0.0.tgz", - "integrity": "sha1-Gsu/tZJDbRC76PeFt8xvgoFQEsM=", - "dev": true - }, - "spdx-correct": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.0.0.tgz", - "integrity": "sha512-N19o9z5cEyc8yQQPukRCZ9EUmb4HUpnrmaL/fxS2pBo2jbfcFRVuFZ/oFC+vZz0MNNk0h80iMn5/S6qGZOL5+g==", - "dev": true, - "requires": { - "spdx-expression-parse": "^3.0.0", - "spdx-license-ids": "^3.0.0" - } - }, - "spdx-exceptions": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.1.0.tgz", - "integrity": "sha512-4K1NsmrlCU1JJgUrtgEeTVyfx8VaYea9J9LvARxhbHtVtohPs/gFGG5yy49beySjlIMhhXZ4QqujIZEfS4l6Cg==", - "dev": true - }, - "spdx-expression-parse": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz", - "integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==", - "dev": true, - "requires": { - "spdx-exceptions": "^2.1.0", - "spdx-license-ids": "^3.0.0" - } - }, - "spdx-license-ids": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.0.tgz", - "integrity": "sha512-2+EPwgbnmOIl8HjGBXXMd9NAu02vLjOO1nWw4kmeRDFyHn+M/ETfHxQUK0oXg8ctgVnl9t3rosNVsZ1jG61nDA==", - "dev": true - }, - "sshpk": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.14.1.tgz", - "integrity": "sha1-Ew9Zde3a2WPx1W+SuaxsUfqfg+s=", - "dev": true, - "requires": { - "asn1": "~0.2.3", - "assert-plus": "^1.0.0", - "bcrypt-pbkdf": "^1.0.0", - "dashdash": "^1.12.0", - "ecc-jsbn": "~0.1.1", - "getpass": "^0.1.1", - "jsbn": "~0.1.0", - "tweetnacl": "~0.14.0" - }, - "dependencies": { - "assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", - "dev": true - } - } - }, - "stdout-stream": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/stdout-stream/-/stdout-stream-1.4.0.tgz", - "integrity": "sha1-osfIWH5U2UJ+qe2zrD8s1SLfN4s=", - "dev": true, - "requires": { - "readable-stream": "^2.0.1" - } - }, - "stream-shift": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.0.tgz", - "integrity": "sha1-1cdSgl5TZ+eG944Y5EXqIjoVWVI=", - "dev": true - }, - "string-width": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", - "dev": true, - "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - } - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dev": true, - "requires": { - "safe-buffer": "~5.1.0" - } - }, - "stringstream": { - "version": "0.0.5", - "resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz", - "integrity": "sha1-TkhM1N5aC7vuGORjB3EKioFiGHg=", - "dev": true - }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", - "dev": true, - "requires": { - "ansi-regex": "^2.0.0" - } - }, - "strip-bom": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", - "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", - "dev": true, - "requires": { - "is-utf8": "^0.2.0" - } - }, - "strip-bom-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/strip-bom-stream/-/strip-bom-stream-1.0.0.tgz", - "integrity": "sha1-5xRDmFd9Uaa+0PoZlPoF9D/ZiO4=", - "dev": true, - "requires": { - "first-chunk-stream": "^1.0.0", - "strip-bom": "^2.0.0" - } - }, - "strip-indent": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-1.0.1.tgz", - "integrity": "sha1-DHlipq3vp7vUrDZkYKY4VSrhoKI=", - "dev": true, - "requires": { - "get-stdin": "^4.0.1" - } - }, - "strip-json-comments": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", - "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", - "dev": true - }, - "stylus": { - "version": "0.54.5", - "resolved": "https://registry.npmjs.org/stylus/-/stylus-0.54.5.tgz", - "integrity": "sha1-QrlWCTHKcJDOhRWnmLqeaqPW3Hk=", - "dev": true, - "requires": { - "css-parse": "1.7.x", - "debug": "*", - "glob": "7.0.x", - "mkdirp": "0.5.x", - "sax": "0.5.x", - "source-map": "0.1.x" - }, - "dependencies": { - "glob": { - "version": "7.0.6", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.0.6.tgz", - "integrity": "sha1-IRuvr0nlJbjNkyYNFKsTYVKz9Xo=", - "dev": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.2", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "source-map": { - "version": "0.1.43", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.1.43.tgz", - "integrity": "sha1-wkvBRspRfBRx9drL4lcbK3+eM0Y=", - "dev": true, - "requires": { - "amdefine": ">=0.0.4" - } - } - } - }, - "subarg": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/subarg/-/subarg-1.0.0.tgz", - "integrity": "sha1-9izxdYHplrSPyWVpn1TAauJouNI=", - "dev": true, - "requires": { - "minimist": "^1.1.0" - } - }, - "supports-color": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz", - "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - }, - "symbol-observable": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.0.4.tgz", - "integrity": "sha1-Kb9hXUqnEhvdiYsi1LP5vE4qoD0=", - "dev": true - }, - "tar": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/tar/-/tar-2.2.1.tgz", - "integrity": "sha1-jk0qJWwOIYXGsYrWlK7JaLg8sdE=", - "dev": true, - "requires": { - "block-stream": "*", - "fstream": "^1.0.2", - "inherits": "2" - } - }, - "through": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", - "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", - "dev": true - }, - "through2": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.3.tgz", - "integrity": "sha1-AARWmzfHx0ujnEPzzteNGtlBQL4=", - "dev": true, - "requires": { - "readable-stream": "^2.1.5", - "xtend": "~4.0.1" - } - }, - "through2-filter": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/through2-filter/-/through2-filter-2.0.0.tgz", - "integrity": "sha1-YLxVoNrLdghdsfna6Zq0P4PWIuw=", - "dev": true, - "requires": { - "through2": "~2.0.0", - "xtend": "~4.0.0" - } - }, - "time-stamp": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/time-stamp/-/time-stamp-1.1.0.tgz", - "integrity": "sha1-dkpaEa9QVhkhsTPztE5hhofg9cM=", - "dev": true - }, - "to-absolute-glob": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/to-absolute-glob/-/to-absolute-glob-0.1.1.tgz", - "integrity": "sha1-HN+kcqnvUMI57maZm2YsoOs5k38=", - "dev": true, - "requires": { - "extend-shallow": "^2.0.1" - } - }, - "tough-cookie": { - "version": "2.3.4", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.4.tgz", - "integrity": "sha512-TZ6TTfI5NtZnuyy/Kecv+CnoROnyXn2DN97LontgQpCwsX2XyLYCC0ENhYkehSOwAp8rTQKc/NUIF7BkQ5rKLA==", - "dev": true, - "requires": { - "punycode": "^1.4.1" - } - }, - "trim-newlines": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-1.0.0.tgz", - "integrity": "sha1-WIeWa7WCpFA6QetST301ARgVphM=", - "dev": true - }, - "true-case-path": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/true-case-path/-/true-case-path-1.0.2.tgz", - "integrity": "sha1-fskRMJJHZsf1c74wIMNPj9/QDWI=", - "dev": true, - "requires": { - "glob": "^6.0.4" - }, - "dependencies": { - "glob": { - "version": "6.0.4", - "resolved": "https://registry.npmjs.org/glob/-/glob-6.0.4.tgz", - "integrity": "sha1-DwiGD2oVUSey+t1PnOJLGqtuTSI=", - "dev": true, - "requires": { - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "2 || 3", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - } - } - }, - "ts-node": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-3.3.0.tgz", - "integrity": "sha1-wTxqMCTjC+EYDdUwOPwgkonUv2k=", - "dev": true, - "requires": { - "arrify": "^1.0.0", - "chalk": "^2.0.0", - "diff": "^3.1.0", - "make-error": "^1.1.1", - "minimist": "^1.2.0", - "mkdirp": "^0.5.1", - "source-map-support": "^0.4.0", - "tsconfig": "^6.0.0", - "v8flags": "^3.0.0", - "yn": "^2.0.0" - } - }, - "tsconfig": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/tsconfig/-/tsconfig-6.0.0.tgz", - "integrity": "sha1-aw6DdgA9evGGT434+J3QBZ/80DI=", - "dev": true, - "requires": { - "strip-bom": "^3.0.0", - "strip-json-comments": "^2.0.0" - }, - "dependencies": { - "strip-bom": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", - "dev": true - } - } - }, - "tsickle": { - "version": "0.21.6", - "resolved": "https://registry.npmjs.org/tsickle/-/tsickle-0.21.6.tgz", - "integrity": "sha1-U7Abl5xcE/2xOvs/uVgXflmRWI0=", - "dev": true, - "requires": { - "minimist": "^1.2.0", - "mkdirp": "^0.5.1", - "source-map": "^0.5.6", - "source-map-support": "^0.4.2" - } - }, - "tslib": { - "version": "1.7.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.7.1.tgz", - "integrity": "sha1-vIAEFkaRkjp5/oN4u+s9ogF1OOw=", - "dev": true - }, - "tunnel-agent": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", - "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", - "dev": true, - "requires": { - "safe-buffer": "^5.0.1" - } - }, - "tweetnacl": { - "version": "0.14.5", - "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", - "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", - "dev": true, - "optional": true - }, - "typescript": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-2.4.1.tgz", - "integrity": "sha1-w8yxbdqgsjFN4DHn5v7onlujRrw=", - "dev": true - }, - "uglify-js": { - "version": "3.3.22", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.3.22.tgz", - "integrity": "sha512-tqw96rL6/BG+7LM5VItdhDjTQmL5zG/I0b2RqWytlgeHe2eydZHuBHdA9vuGpCDhH/ZskNGcqDhivoR2xt8RIw==", - "dev": true, - "requires": { - "commander": "~2.15.0", - "source-map": "~0.6.1" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } - } - }, - "unique-stream": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/unique-stream/-/unique-stream-2.2.1.tgz", - "integrity": "sha1-WqADz76Uxf+GbE59ZouxxNuts2k=", - "dev": true, - "requires": { - "json-stable-stringify": "^1.0.0", - "through2-filter": "^2.0.0" - } - }, - "universalify": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.1.tgz", - "integrity": "sha1-+nG63UQ3r0wUiEHjs7Fl+enlkLc=", - "dev": true - }, - "util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", - "dev": true - }, - "uuid": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.2.1.tgz", - "integrity": "sha512-jZnMwlb9Iku/O3smGWvZhauCf6cvvpKi4BKRiliS3cxnI+Gz9j5MEpTz2UFuXiKPJocb7gnsLHwiS05ige5BEA==", - "dev": true - }, - "v8flags": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/v8flags/-/v8flags-3.0.2.tgz", - "integrity": "sha512-6sgSKoFw1UpUPd3cFdF7QGnrH6tDeBgW1F3v9gy8gLY0mlbiBXq8soy8aQpY6xeeCjH5K+JvC62Acp7gtl7wWA==", - "dev": true, - "requires": { - "homedir-polyfill": "^1.0.1" - } - }, - "vali-date": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/vali-date/-/vali-date-1.0.0.tgz", - "integrity": "sha1-G5BKWWCfsyjvB4E4Qgk09rhnCaY=", - "dev": true - }, - "validate-npm-package-license": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.3.tgz", - "integrity": "sha512-63ZOUnL4SIXj4L0NixR3L1lcjO38crAbgrTpl28t8jjrfuiOBL5Iygm+60qPs/KsZGzPNg6Smnc/oY16QTjF0g==", - "dev": true, - "requires": { - "spdx-correct": "^3.0.0", - "spdx-expression-parse": "^3.0.0" - } - }, - "verror": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", - "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", - "dev": true, - "requires": { - "assert-plus": "^1.0.0", - "core-util-is": "1.0.2", - "extsprintf": "^1.2.0" - }, - "dependencies": { - "assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", - "dev": true - } - } - }, - "vinyl": { - "version": "0.5.3", - "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-0.5.3.tgz", - "integrity": "sha1-sEVbOPxeDPMNQyUTLkYZcMIJHN4=", - "dev": true, - "requires": { - "clone": "^1.0.0", - "clone-stats": "^0.0.1", - "replace-ext": "0.0.1" - } - }, - "vinyl-fs": { - "version": "2.4.4", - "resolved": "https://registry.npmjs.org/vinyl-fs/-/vinyl-fs-2.4.4.tgz", - "integrity": "sha1-vm/zJwy1Xf19MGNkDegfJddTIjk=", - "dev": true, - "requires": { - "duplexify": "^3.2.0", - "glob-stream": "^5.3.2", - "graceful-fs": "^4.0.0", - "gulp-sourcemaps": "1.6.0", - "is-valid-glob": "^0.3.0", - "lazystream": "^1.0.0", - "lodash.isequal": "^4.0.0", - "merge-stream": "^1.0.0", - "mkdirp": "^0.5.0", - "object-assign": "^4.0.0", - "readable-stream": "^2.0.4", - "strip-bom": "^2.0.0", - "strip-bom-stream": "^1.0.0", - "through2": "^2.0.0", - "through2-filter": "^2.0.0", - "vali-date": "^1.0.0", - "vinyl": "^1.0.0" - }, - "dependencies": { - "object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", - "dev": true - }, - "vinyl": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-1.2.0.tgz", - "integrity": "sha1-XIgDbPVl5d8FVYv8kR+GVt8hiIQ=", - "dev": true, - "requires": { - "clone": "^1.0.0", - "clone-stats": "^0.0.1", - "replace-ext": "0.0.1" - } - } - } - }, - "vlq": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/vlq/-/vlq-0.2.3.tgz", - "integrity": "sha512-DRibZL6DsNhIgYQ+wNdWDL2SL3bKPlVrRiBqV5yuMm++op8W4kGFtaQfCs4KEJn0wBZcHVHJ3eoywX8983k1ow==", - "dev": true - }, - "which": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.0.tgz", - "integrity": "sha512-xcJpopdamTuY5duC/KnTTNBraPK54YwpenP4lzxU8H91GudWpFv38u0CKjclE1Wi2EH2EDz5LRcHcKbCIzqGyg==", - "dev": true, - "requires": { - "isexe": "^2.0.0" - } - }, - "which-module": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/which-module/-/which-module-1.0.0.tgz", - "integrity": "sha1-u6Y8qGGUiZT/MHc2CJ47lgJsKk8=", - "dev": true - }, - "wide-align": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.2.tgz", - "integrity": "sha512-ijDLlyQ7s6x1JgCLur53osjm/UXUYD9+0PbYKrBsYisYXzCxN+HC3mYDNy/dWdmf3AwqwU3CXwDCvsNgGK1S0w==", - "dev": true, - "requires": { - "string-width": "^1.0.2" - } - }, - "wrap-ansi": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", - "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", - "dev": true, - "requires": { - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1" - } - }, - "wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", - "dev": true - }, - "xtend": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", - "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=", - "dev": true - }, - "y18n": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz", - "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=", - "dev": true - }, - "yallist": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", - "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=", - "dev": true - }, - "yargs": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-7.1.0.tgz", - "integrity": "sha1-a6MY6xaWFyf10oT46gA+jWFU0Mg=", - "dev": true, - "requires": { - "camelcase": "^3.0.0", - "cliui": "^3.2.0", - "decamelize": "^1.1.1", - "get-caller-file": "^1.0.1", - "os-locale": "^1.4.0", - "read-pkg-up": "^1.0.1", - "require-directory": "^2.1.1", - "require-main-filename": "^1.0.1", - "set-blocking": "^2.0.0", - "string-width": "^1.0.2", - "which-module": "^1.0.0", - "y18n": "^3.2.1", - "yargs-parser": "^5.0.0" - }, - "dependencies": { - "camelcase": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz", - "integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo=", - "dev": true - } - } - }, - "yargs-parser": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-5.0.0.tgz", - "integrity": "sha1-J17PDX/+Bcd+ZOfIbkzZS/DhIoo=", - "dev": true, - "requires": { - "camelcase": "^3.0.0" - }, - "dependencies": { - "camelcase": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz", - "integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo=", - "dev": true - } - } - }, - "yn": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/yn/-/yn-2.0.0.tgz", - "integrity": "sha1-5a2ryKz0CPY4X8dklWhMiOavaJo=", - "dev": true - }, - "zone.js": { - "version": "0.7.8", - "resolved": "https://registry.npmjs.org/zone.js/-/zone.js-0.7.8.tgz", - "integrity": "sha1-Tz/og01EWX8mOQU6D6Q43zT//e0=", - "dev": true - } - } -} diff --git a/samples/client/petstore/typescript-angular-v4/npm/package.json b/samples/client/petstore/typescript-angular-v4/npm/package.json deleted file mode 100644 index 8521cbb2e75..00000000000 --- a/samples/client/petstore/typescript-angular-v4/npm/package.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "name": "@openapitools/angular2-typescript-petstore", - "version": "0.0.1", - "description": "OpenAPI client for @openapitools/angular2-typescript-petstore", - "author": "OpenAPI-Generator Contributors", - "keywords": [ - "openapi-client", - "openapi-generator" - ], - "license": "Unlicense", - "scripts": { - "build": "ng-packagr -p ng-package.json" - }, - "peerDependencies": { - "@angular/core": "^4.0.0", - "@angular/http": "^4.0.0", - "@angular/common": "^4.0.0", - "@angular/compiler": "^4.0.0", - "core-js": "^2.4.0", - "reflect-metadata": "^0.1.3", - "rxjs": "^5.4.0" - }, - "devDependencies": { - "@angular/common": "^4.0.0", - "@angular/compiler": "^4.0.0", - "@angular/compiler-cli": "^4.0.0", - "@angular/core": "^4.0.0", - "@angular/http": "^4.0.0", - "@angular/platform-browser": "^4.0.0", - "ng-packagr": "^1.6.0", - "reflect-metadata": "^0.1.3", - "rxjs": "^5.4.0", - "typescript": ">=2.1.5 <2.8.0", - "zone.js": "^0.7.6" - }, - "publishConfig": { - "registry": "https://skimdb.npmjs.com/registry" - } -} diff --git a/samples/client/petstore/typescript-angular-v4/npm/rxjs-operators.ts b/samples/client/petstore/typescript-angular-v4/npm/rxjs-operators.ts deleted file mode 100644 index 5659cd0694f..00000000000 --- a/samples/client/petstore/typescript-angular-v4/npm/rxjs-operators.ts +++ /dev/null @@ -1,11 +0,0 @@ -// RxJS imports according to https://angular.io/docs/ts/latest/guide/server-communication.html#!#rxjs - -// See node_module/rxjs/Rxjs.js -// Import just the rxjs statics and operators we need for THIS app. - -// Statics -import 'rxjs/add/observable/throw'; - -// Operators -import 'rxjs/add/operator/catch'; -import 'rxjs/add/operator/map'; diff --git a/samples/client/petstore/typescript-angular-v4/npm/tsconfig.json b/samples/client/petstore/typescript-angular-v4/npm/tsconfig.json deleted file mode 100644 index c01ebe255d4..00000000000 --- a/samples/client/petstore/typescript-angular-v4/npm/tsconfig.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "compilerOptions": { - "emitDecoratorMetadata": true, - "experimentalDecorators": true, - "noImplicitAny": false, - "suppressImplicitAnyIndexErrors": true, - "target": "es5", - "module": "commonjs", - "moduleResolution": "node", - "removeComments": true, - "sourceMap": true, - "outDir": "./dist", - "noLib": false, - "declaration": true, - "lib": [ "es6", "dom" ], - "typeRoots": [ - "node_modules/@types" - ] - }, - "exclude": [ - "node_modules", - "dist" - ], - "filesGlob": [ - "./model/*.ts", - "./api/*.ts" - ] -} diff --git a/samples/client/petstore/typescript-angular-v4/npm/variables.ts b/samples/client/petstore/typescript-angular-v4/npm/variables.ts deleted file mode 100644 index 6fe58549f39..00000000000 --- a/samples/client/petstore/typescript-angular-v4/npm/variables.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { InjectionToken } from '@angular/core'; - -export const BASE_PATH = new InjectionToken('basePath'); -export const COLLECTION_FORMATS = { - 'csv': ',', - 'tsv': ' ', - 'ssv': ' ', - 'pipes': '|' -} diff --git a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/README.md b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/README.md index e0c9192e33e..94e4af489d6 100644 --- a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/README.md +++ b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/README.md @@ -10,7 +10,7 @@ npm run build ### publishing -First build the package then run ```npm publish``` +First build the package then run ```npm publish dist``` (don't forget to specify the `dist` folder!) ### consuming @@ -25,14 +25,14 @@ npm install @ --save _without publishing (not recommended):_ ``` -npm install PATH_TO_GENERATED_PACKAGE/-.tgz --save +npm install PATH_TO_GENERATED_PACKAGE/dist.tgz --save ``` _It's important to take the tgz file, otherwise you'll get trouble with links on windows_ _using `npm link`:_ -In PATH_TO_GENERATED_PACKAGE: +In PATH_TO_GENERATED_PACKAGE/dist: ``` npm link ``` @@ -57,7 +57,6 @@ In your Angular project: import { ApiModule } from ''; import { HttpClientModule } from '@angular/common/http'; - @NgModule({ imports: [ ApiModule, @@ -137,7 +136,6 @@ import { ApiModule } from 'my-api-path'; import { ApiModule as OtherApiModule } from 'my-other-api-path'; import { HttpClientModule } from '@angular/common/http'; - @NgModule({ imports: [ ApiModule, diff --git a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/api.module.ts b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/api.module.ts index 8487243a83b..c1539cc7604 100644 --- a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/api.module.ts +++ b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/api.module.ts @@ -2,7 +2,6 @@ import { NgModule, ModuleWithProviders, SkipSelf, Optional } from '@angular/core import { Configuration } from './configuration'; import { HttpClient } from '@angular/common/http'; - import { PetService } from './api/pet.service'; import { StoreService } from './api/store.service'; import { UserService } from './api/user.service'; diff --git a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/api/pet.service.ts b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/api/pet.service.ts index 2bd3a86ebec..aa892db9086 100644 --- a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/api/pet.service.ts +++ b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/api/pet.service.ts @@ -60,7 +60,6 @@ export class PetService { return false; } - private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams { if (typeof value === "object" && value instanceof Date === false) { httpParams = this.addToHttpParamsRecursive(httpParams, value); diff --git a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/api/store.service.ts b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/api/store.service.ts index cf23ee1866d..d7a10833009 100644 --- a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/api/store.service.ts +++ b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/api/store.service.ts @@ -46,7 +46,6 @@ export class StoreService { } - private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams { if (typeof value === "object" && value instanceof Date === false) { httpParams = this.addToHttpParamsRecursive(httpParams, value); diff --git a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/api/user.service.ts b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/api/user.service.ts index 2c1cd08a6d7..da1199c86d4 100644 --- a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/api/user.service.ts +++ b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/api/user.service.ts @@ -46,7 +46,6 @@ export class UserService { } - private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams { if (typeof value === "object" && value instanceof Date === false) { httpParams = this.addToHttpParamsRecursive(httpParams, value); diff --git a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/encoder.ts b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/encoder.ts index cbefb4a6dd9..138c4d5cf2c 100644 --- a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/encoder.ts +++ b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/encoder.ts @@ -18,4 +18,3 @@ export class CustomHttpParameterCodec implements HttpParameterCodec { return decodeURIComponent(v); } } - diff --git a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/README.md b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/README.md index ef1f6c5b6ec..151fb2f1a50 100644 --- a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/README.md +++ b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/README.md @@ -57,7 +57,6 @@ In your Angular project: import { ApiModule } from '@openapitools/typescript-angular-petstore'; import { HttpClientModule } from '@angular/common/http'; - @NgModule({ imports: [ ApiModule, @@ -137,7 +136,6 @@ import { ApiModule } from 'my-api-path'; import { ApiModule as OtherApiModule } from 'my-other-api-path'; import { HttpClientModule } from '@angular/common/http'; - @NgModule({ imports: [ ApiModule, diff --git a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/api.module.ts b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/api.module.ts index 8487243a83b..c1539cc7604 100644 --- a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/api.module.ts +++ b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/api.module.ts @@ -2,7 +2,6 @@ import { NgModule, ModuleWithProviders, SkipSelf, Optional } from '@angular/core import { Configuration } from './configuration'; import { HttpClient } from '@angular/common/http'; - import { PetService } from './api/pet.service'; import { StoreService } from './api/store.service'; import { UserService } from './api/user.service'; diff --git a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/api/pet.service.ts b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/api/pet.service.ts index 2bd3a86ebec..aa892db9086 100644 --- a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/api/pet.service.ts +++ b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/api/pet.service.ts @@ -60,7 +60,6 @@ export class PetService { return false; } - private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams { if (typeof value === "object" && value instanceof Date === false) { httpParams = this.addToHttpParamsRecursive(httpParams, value); diff --git a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/api/store.service.ts b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/api/store.service.ts index cf23ee1866d..d7a10833009 100644 --- a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/api/store.service.ts +++ b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/api/store.service.ts @@ -46,7 +46,6 @@ export class StoreService { } - private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams { if (typeof value === "object" && value instanceof Date === false) { httpParams = this.addToHttpParamsRecursive(httpParams, value); diff --git a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/api/user.service.ts b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/api/user.service.ts index 2c1cd08a6d7..da1199c86d4 100644 --- a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/api/user.service.ts +++ b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/api/user.service.ts @@ -46,7 +46,6 @@ export class UserService { } - private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams { if (typeof value === "object" && value instanceof Date === false) { httpParams = this.addToHttpParamsRecursive(httpParams, value); diff --git a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/encoder.ts b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/encoder.ts index cbefb4a6dd9..138c4d5cf2c 100644 --- a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/encoder.ts +++ b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/encoder.ts @@ -18,4 +18,3 @@ export class CustomHttpParameterCodec implements HttpParameterCodec { return decodeURIComponent(v); } } - diff --git a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/package.json b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/package.json index f34a77cec8d..610e1d2c724 100644 --- a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/package.json +++ b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/package.json @@ -13,10 +13,6 @@ }, "peerDependencies": { "@angular/core": "^6.0.0", - "@angular/common": "^6.0.0", - "@angular/compiler": "^6.0.0", - "core-js": "^2.4.0", - "reflect-metadata": "^0.1.3", "rxjs": "^6.1.0" }, "devDependencies": { diff --git a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/README.md b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/README.md index e0c9192e33e..94e4af489d6 100644 --- a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/README.md +++ b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/README.md @@ -10,7 +10,7 @@ npm run build ### publishing -First build the package then run ```npm publish``` +First build the package then run ```npm publish dist``` (don't forget to specify the `dist` folder!) ### consuming @@ -25,14 +25,14 @@ npm install @ --save _without publishing (not recommended):_ ``` -npm install PATH_TO_GENERATED_PACKAGE/-.tgz --save +npm install PATH_TO_GENERATED_PACKAGE/dist.tgz --save ``` _It's important to take the tgz file, otherwise you'll get trouble with links on windows_ _using `npm link`:_ -In PATH_TO_GENERATED_PACKAGE: +In PATH_TO_GENERATED_PACKAGE/dist: ``` npm link ``` @@ -57,7 +57,6 @@ In your Angular project: import { ApiModule } from ''; import { HttpClientModule } from '@angular/common/http'; - @NgModule({ imports: [ ApiModule, @@ -137,7 +136,6 @@ import { ApiModule } from 'my-api-path'; import { ApiModule as OtherApiModule } from 'my-other-api-path'; import { HttpClientModule } from '@angular/common/http'; - @NgModule({ imports: [ ApiModule, diff --git a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/api.module.ts b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/api.module.ts index 5e6ebe12ae0..d29104bd55b 100644 --- a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/api.module.ts +++ b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/api.module.ts @@ -2,7 +2,6 @@ import { NgModule, ModuleWithProviders, SkipSelf, Optional } from '@angular/core import { Configuration } from './configuration'; import { HttpClient } from '@angular/common/http'; - import { PetService } from './api/pet.service'; import { StoreService } from './api/store.service'; import { UserService } from './api/user.service'; diff --git a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/api/pet.service.ts b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/api/pet.service.ts index 48bd11c0d76..a12f7678638 100644 --- a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/api/pet.service.ts +++ b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/api/pet.service.ts @@ -62,7 +62,6 @@ export class PetService { return false; } - private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams { if (typeof value === "object" && value instanceof Date === false) { httpParams = this.addToHttpParamsRecursive(httpParams, value); diff --git a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/api/store.service.ts b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/api/store.service.ts index 0dd112aacc0..75ca27df329 100644 --- a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/api/store.service.ts +++ b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/api/store.service.ts @@ -48,7 +48,6 @@ export class StoreService { } - private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams { if (typeof value === "object" && value instanceof Date === false) { httpParams = this.addToHttpParamsRecursive(httpParams, value); diff --git a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/api/user.service.ts b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/api/user.service.ts index af96edfb150..39967621905 100644 --- a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/api/user.service.ts +++ b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/api/user.service.ts @@ -48,7 +48,6 @@ export class UserService { } - private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams { if (typeof value === "object" && value instanceof Date === false) { httpParams = this.addToHttpParamsRecursive(httpParams, value); diff --git a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/encoder.ts b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/encoder.ts index cbefb4a6dd9..138c4d5cf2c 100644 --- a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/encoder.ts +++ b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/encoder.ts @@ -18,4 +18,3 @@ export class CustomHttpParameterCodec implements HttpParameterCodec { return decodeURIComponent(v); } } - diff --git a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/README.md b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/README.md index ef1f6c5b6ec..151fb2f1a50 100644 --- a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/README.md +++ b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/README.md @@ -57,7 +57,6 @@ In your Angular project: import { ApiModule } from '@openapitools/typescript-angular-petstore'; import { HttpClientModule } from '@angular/common/http'; - @NgModule({ imports: [ ApiModule, @@ -137,7 +136,6 @@ import { ApiModule } from 'my-api-path'; import { ApiModule as OtherApiModule } from 'my-other-api-path'; import { HttpClientModule } from '@angular/common/http'; - @NgModule({ imports: [ ApiModule, diff --git a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/api.module.ts b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/api.module.ts index 5e6ebe12ae0..d29104bd55b 100644 --- a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/api.module.ts +++ b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/api.module.ts @@ -2,7 +2,6 @@ import { NgModule, ModuleWithProviders, SkipSelf, Optional } from '@angular/core import { Configuration } from './configuration'; import { HttpClient } from '@angular/common/http'; - import { PetService } from './api/pet.service'; import { StoreService } from './api/store.service'; import { UserService } from './api/user.service'; diff --git a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/api/pet.service.ts b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/api/pet.service.ts index 48bd11c0d76..a12f7678638 100644 --- a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/api/pet.service.ts +++ b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/api/pet.service.ts @@ -62,7 +62,6 @@ export class PetService { return false; } - private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams { if (typeof value === "object" && value instanceof Date === false) { httpParams = this.addToHttpParamsRecursive(httpParams, value); diff --git a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/api/store.service.ts b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/api/store.service.ts index 0dd112aacc0..75ca27df329 100644 --- a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/api/store.service.ts +++ b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/api/store.service.ts @@ -48,7 +48,6 @@ export class StoreService { } - private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams { if (typeof value === "object" && value instanceof Date === false) { httpParams = this.addToHttpParamsRecursive(httpParams, value); diff --git a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/api/user.service.ts b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/api/user.service.ts index af96edfb150..39967621905 100644 --- a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/api/user.service.ts +++ b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/api/user.service.ts @@ -48,7 +48,6 @@ export class UserService { } - private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams { if (typeof value === "object" && value instanceof Date === false) { httpParams = this.addToHttpParamsRecursive(httpParams, value); diff --git a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/encoder.ts b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/encoder.ts index cbefb4a6dd9..138c4d5cf2c 100644 --- a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/encoder.ts +++ b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/encoder.ts @@ -18,4 +18,3 @@ export class CustomHttpParameterCodec implements HttpParameterCodec { return decodeURIComponent(v); } } - diff --git a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/package.json b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/package.json index f34a77cec8d..610e1d2c724 100644 --- a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/package.json +++ b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/package.json @@ -13,10 +13,6 @@ }, "peerDependencies": { "@angular/core": "^6.0.0", - "@angular/common": "^6.0.0", - "@angular/compiler": "^6.0.0", - "core-js": "^2.4.0", - "reflect-metadata": "^0.1.3", "rxjs": "^6.1.0" }, "devDependencies": { diff --git a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/README.md b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/README.md index e0c9192e33e..94e4af489d6 100644 --- a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/README.md +++ b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/README.md @@ -10,7 +10,7 @@ npm run build ### publishing -First build the package then run ```npm publish``` +First build the package then run ```npm publish dist``` (don't forget to specify the `dist` folder!) ### consuming @@ -25,14 +25,14 @@ npm install @ --save _without publishing (not recommended):_ ``` -npm install PATH_TO_GENERATED_PACKAGE/-.tgz --save +npm install PATH_TO_GENERATED_PACKAGE/dist.tgz --save ``` _It's important to take the tgz file, otherwise you'll get trouble with links on windows_ _using `npm link`:_ -In PATH_TO_GENERATED_PACKAGE: +In PATH_TO_GENERATED_PACKAGE/dist: ``` npm link ``` @@ -57,7 +57,6 @@ In your Angular project: import { ApiModule } from ''; import { HttpClientModule } from '@angular/common/http'; - @NgModule({ imports: [ ApiModule, @@ -137,7 +136,6 @@ import { ApiModule } from 'my-api-path'; import { ApiModule as OtherApiModule } from 'my-other-api-path'; import { HttpClientModule } from '@angular/common/http'; - @NgModule({ imports: [ ApiModule, diff --git a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/api.module.ts b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/api.module.ts index 8487243a83b..c1539cc7604 100644 --- a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/api.module.ts +++ b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/api.module.ts @@ -2,7 +2,6 @@ import { NgModule, ModuleWithProviders, SkipSelf, Optional } from '@angular/core import { Configuration } from './configuration'; import { HttpClient } from '@angular/common/http'; - import { PetService } from './api/pet.service'; import { StoreService } from './api/store.service'; import { UserService } from './api/user.service'; diff --git a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/api/pet.service.ts b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/api/pet.service.ts index 2bd3a86ebec..aa892db9086 100644 --- a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/api/pet.service.ts +++ b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/api/pet.service.ts @@ -60,7 +60,6 @@ export class PetService { return false; } - private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams { if (typeof value === "object" && value instanceof Date === false) { httpParams = this.addToHttpParamsRecursive(httpParams, value); diff --git a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/api/store.service.ts b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/api/store.service.ts index cf23ee1866d..d7a10833009 100644 --- a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/api/store.service.ts +++ b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/api/store.service.ts @@ -46,7 +46,6 @@ export class StoreService { } - private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams { if (typeof value === "object" && value instanceof Date === false) { httpParams = this.addToHttpParamsRecursive(httpParams, value); diff --git a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/api/user.service.ts b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/api/user.service.ts index 2c1cd08a6d7..da1199c86d4 100644 --- a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/api/user.service.ts +++ b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/api/user.service.ts @@ -46,7 +46,6 @@ export class UserService { } - private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams { if (typeof value === "object" && value instanceof Date === false) { httpParams = this.addToHttpParamsRecursive(httpParams, value); diff --git a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/encoder.ts b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/encoder.ts index cbefb4a6dd9..138c4d5cf2c 100644 --- a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/encoder.ts +++ b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/encoder.ts @@ -18,4 +18,3 @@ export class CustomHttpParameterCodec implements HttpParameterCodec { return decodeURIComponent(v); } } - diff --git a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/README.md b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/README.md index ef1f6c5b6ec..151fb2f1a50 100644 --- a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/README.md +++ b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/README.md @@ -57,7 +57,6 @@ In your Angular project: import { ApiModule } from '@openapitools/typescript-angular-petstore'; import { HttpClientModule } from '@angular/common/http'; - @NgModule({ imports: [ ApiModule, @@ -137,7 +136,6 @@ import { ApiModule } from 'my-api-path'; import { ApiModule as OtherApiModule } from 'my-other-api-path'; import { HttpClientModule } from '@angular/common/http'; - @NgModule({ imports: [ ApiModule, diff --git a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/api.module.ts b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/api.module.ts index 8487243a83b..c1539cc7604 100644 --- a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/api.module.ts +++ b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/api.module.ts @@ -2,7 +2,6 @@ import { NgModule, ModuleWithProviders, SkipSelf, Optional } from '@angular/core import { Configuration } from './configuration'; import { HttpClient } from '@angular/common/http'; - import { PetService } from './api/pet.service'; import { StoreService } from './api/store.service'; import { UserService } from './api/user.service'; diff --git a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/api/pet.service.ts b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/api/pet.service.ts index 2bd3a86ebec..aa892db9086 100644 --- a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/api/pet.service.ts +++ b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/api/pet.service.ts @@ -60,7 +60,6 @@ export class PetService { return false; } - private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams { if (typeof value === "object" && value instanceof Date === false) { httpParams = this.addToHttpParamsRecursive(httpParams, value); diff --git a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/api/store.service.ts b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/api/store.service.ts index cf23ee1866d..d7a10833009 100644 --- a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/api/store.service.ts +++ b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/api/store.service.ts @@ -46,7 +46,6 @@ export class StoreService { } - private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams { if (typeof value === "object" && value instanceof Date === false) { httpParams = this.addToHttpParamsRecursive(httpParams, value); diff --git a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/api/user.service.ts b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/api/user.service.ts index 2c1cd08a6d7..da1199c86d4 100644 --- a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/api/user.service.ts +++ b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/api/user.service.ts @@ -46,7 +46,6 @@ export class UserService { } - private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams { if (typeof value === "object" && value instanceof Date === false) { httpParams = this.addToHttpParamsRecursive(httpParams, value); diff --git a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/encoder.ts b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/encoder.ts index cbefb4a6dd9..138c4d5cf2c 100644 --- a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/encoder.ts +++ b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/encoder.ts @@ -18,4 +18,3 @@ export class CustomHttpParameterCodec implements HttpParameterCodec { return decodeURIComponent(v); } } - diff --git a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/package.json b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/package.json index 82e8dc5eb39..83d4d6a6e8c 100644 --- a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/package.json +++ b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/package.json @@ -13,10 +13,6 @@ }, "peerDependencies": { "@angular/core": "^7.0.0", - "@angular/common": "^7.0.0", - "@angular/compiler": "^7.0.0", - "core-js": "^2.4.0", - "reflect-metadata": "^0.1.3", "rxjs": "^6.3.0" }, "devDependencies": { diff --git a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/README.md b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/README.md index e0c9192e33e..94e4af489d6 100644 --- a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/README.md +++ b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/README.md @@ -10,7 +10,7 @@ npm run build ### publishing -First build the package then run ```npm publish``` +First build the package then run ```npm publish dist``` (don't forget to specify the `dist` folder!) ### consuming @@ -25,14 +25,14 @@ npm install @ --save _without publishing (not recommended):_ ``` -npm install PATH_TO_GENERATED_PACKAGE/-.tgz --save +npm install PATH_TO_GENERATED_PACKAGE/dist.tgz --save ``` _It's important to take the tgz file, otherwise you'll get trouble with links on windows_ _using `npm link`:_ -In PATH_TO_GENERATED_PACKAGE: +In PATH_TO_GENERATED_PACKAGE/dist: ``` npm link ``` @@ -57,7 +57,6 @@ In your Angular project: import { ApiModule } from ''; import { HttpClientModule } from '@angular/common/http'; - @NgModule({ imports: [ ApiModule, @@ -137,7 +136,6 @@ import { ApiModule } from 'my-api-path'; import { ApiModule as OtherApiModule } from 'my-other-api-path'; import { HttpClientModule } from '@angular/common/http'; - @NgModule({ imports: [ ApiModule, diff --git a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/api.module.ts b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/api.module.ts index 5e6ebe12ae0..d29104bd55b 100644 --- a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/api.module.ts +++ b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/api.module.ts @@ -2,7 +2,6 @@ import { NgModule, ModuleWithProviders, SkipSelf, Optional } from '@angular/core import { Configuration } from './configuration'; import { HttpClient } from '@angular/common/http'; - import { PetService } from './api/pet.service'; import { StoreService } from './api/store.service'; import { UserService } from './api/user.service'; diff --git a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/api/pet.service.ts b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/api/pet.service.ts index 48bd11c0d76..a12f7678638 100644 --- a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/api/pet.service.ts +++ b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/api/pet.service.ts @@ -62,7 +62,6 @@ export class PetService { return false; } - private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams { if (typeof value === "object" && value instanceof Date === false) { httpParams = this.addToHttpParamsRecursive(httpParams, value); diff --git a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/api/store.service.ts b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/api/store.service.ts index 0dd112aacc0..75ca27df329 100644 --- a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/api/store.service.ts +++ b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/api/store.service.ts @@ -48,7 +48,6 @@ export class StoreService { } - private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams { if (typeof value === "object" && value instanceof Date === false) { httpParams = this.addToHttpParamsRecursive(httpParams, value); diff --git a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/api/user.service.ts b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/api/user.service.ts index af96edfb150..39967621905 100644 --- a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/api/user.service.ts +++ b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/api/user.service.ts @@ -48,7 +48,6 @@ export class UserService { } - private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams { if (typeof value === "object" && value instanceof Date === false) { httpParams = this.addToHttpParamsRecursive(httpParams, value); diff --git a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/encoder.ts b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/encoder.ts index cbefb4a6dd9..138c4d5cf2c 100644 --- a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/encoder.ts +++ b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/encoder.ts @@ -18,4 +18,3 @@ export class CustomHttpParameterCodec implements HttpParameterCodec { return decodeURIComponent(v); } } - diff --git a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/README.md b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/README.md index ef1f6c5b6ec..151fb2f1a50 100644 --- a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/README.md +++ b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/README.md @@ -57,7 +57,6 @@ In your Angular project: import { ApiModule } from '@openapitools/typescript-angular-petstore'; import { HttpClientModule } from '@angular/common/http'; - @NgModule({ imports: [ ApiModule, @@ -137,7 +136,6 @@ import { ApiModule } from 'my-api-path'; import { ApiModule as OtherApiModule } from 'my-other-api-path'; import { HttpClientModule } from '@angular/common/http'; - @NgModule({ imports: [ ApiModule, diff --git a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/api.module.ts b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/api.module.ts index 5e6ebe12ae0..d29104bd55b 100644 --- a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/api.module.ts +++ b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/api.module.ts @@ -2,7 +2,6 @@ import { NgModule, ModuleWithProviders, SkipSelf, Optional } from '@angular/core import { Configuration } from './configuration'; import { HttpClient } from '@angular/common/http'; - import { PetService } from './api/pet.service'; import { StoreService } from './api/store.service'; import { UserService } from './api/user.service'; diff --git a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/api/pet.service.ts b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/api/pet.service.ts index 48bd11c0d76..a12f7678638 100644 --- a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/api/pet.service.ts +++ b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/api/pet.service.ts @@ -62,7 +62,6 @@ export class PetService { return false; } - private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams { if (typeof value === "object" && value instanceof Date === false) { httpParams = this.addToHttpParamsRecursive(httpParams, value); diff --git a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/api/store.service.ts b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/api/store.service.ts index 0dd112aacc0..75ca27df329 100644 --- a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/api/store.service.ts +++ b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/api/store.service.ts @@ -48,7 +48,6 @@ export class StoreService { } - private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams { if (typeof value === "object" && value instanceof Date === false) { httpParams = this.addToHttpParamsRecursive(httpParams, value); diff --git a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/api/user.service.ts b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/api/user.service.ts index af96edfb150..39967621905 100644 --- a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/api/user.service.ts +++ b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/api/user.service.ts @@ -48,7 +48,6 @@ export class UserService { } - private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams { if (typeof value === "object" && value instanceof Date === false) { httpParams = this.addToHttpParamsRecursive(httpParams, value); diff --git a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/encoder.ts b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/encoder.ts index cbefb4a6dd9..138c4d5cf2c 100644 --- a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/encoder.ts +++ b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/encoder.ts @@ -18,4 +18,3 @@ export class CustomHttpParameterCodec implements HttpParameterCodec { return decodeURIComponent(v); } } - diff --git a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/package.json b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/package.json index 82e8dc5eb39..83d4d6a6e8c 100644 --- a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/package.json +++ b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/package.json @@ -13,10 +13,6 @@ }, "peerDependencies": { "@angular/core": "^7.0.0", - "@angular/common": "^7.0.0", - "@angular/compiler": "^7.0.0", - "core-js": "^2.4.0", - "reflect-metadata": "^0.1.3", "rxjs": "^6.3.0" }, "devDependencies": { diff --git a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/single-request-parameter/README.md b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/single-request-parameter/README.md index ef1f6c5b6ec..151fb2f1a50 100644 --- a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/single-request-parameter/README.md +++ b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/single-request-parameter/README.md @@ -57,7 +57,6 @@ In your Angular project: import { ApiModule } from '@openapitools/typescript-angular-petstore'; import { HttpClientModule } from '@angular/common/http'; - @NgModule({ imports: [ ApiModule, @@ -137,7 +136,6 @@ import { ApiModule } from 'my-api-path'; import { ApiModule as OtherApiModule } from 'my-other-api-path'; import { HttpClientModule } from '@angular/common/http'; - @NgModule({ imports: [ ApiModule, diff --git a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/single-request-parameter/api.module.ts b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/single-request-parameter/api.module.ts index 5e6ebe12ae0..d29104bd55b 100644 --- a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/single-request-parameter/api.module.ts +++ b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/single-request-parameter/api.module.ts @@ -2,7 +2,6 @@ import { NgModule, ModuleWithProviders, SkipSelf, Optional } from '@angular/core import { Configuration } from './configuration'; import { HttpClient } from '@angular/common/http'; - import { PetService } from './api/pet.service'; import { StoreService } from './api/store.service'; import { UserService } from './api/user.service'; diff --git a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/single-request-parameter/api/pet.service.ts b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/single-request-parameter/api/pet.service.ts index e0052e27267..afce140323e 100644 --- a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/single-request-parameter/api/pet.service.ts +++ b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/single-request-parameter/api/pet.service.ts @@ -111,7 +111,6 @@ export class PetService { return false; } - private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams { if (typeof value === "object" && value instanceof Date === false) { httpParams = this.addToHttpParamsRecursive(httpParams, value); diff --git a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/single-request-parameter/api/store.service.ts b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/single-request-parameter/api/store.service.ts index 92a788754ab..6eefcb78144 100644 --- a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/single-request-parameter/api/store.service.ts +++ b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/single-request-parameter/api/store.service.ts @@ -63,7 +63,6 @@ export class StoreService { } - private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams { if (typeof value === "object" && value instanceof Date === false) { httpParams = this.addToHttpParamsRecursive(httpParams, value); diff --git a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/single-request-parameter/api/user.service.ts b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/single-request-parameter/api/user.service.ts index 69ce21a0d2d..326c0f7b873 100644 --- a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/single-request-parameter/api/user.service.ts +++ b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/single-request-parameter/api/user.service.ts @@ -87,7 +87,6 @@ export class UserService { } - private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams { if (typeof value === "object" && value instanceof Date === false) { httpParams = this.addToHttpParamsRecursive(httpParams, value); diff --git a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/single-request-parameter/encoder.ts b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/single-request-parameter/encoder.ts index cbefb4a6dd9..138c4d5cf2c 100644 --- a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/single-request-parameter/encoder.ts +++ b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/single-request-parameter/encoder.ts @@ -18,4 +18,3 @@ export class CustomHttpParameterCodec implements HttpParameterCodec { return decodeURIComponent(v); } } - diff --git a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/single-request-parameter/package.json b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/single-request-parameter/package.json index 4704f50abdc..ac46f80511a 100644 --- a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/single-request-parameter/package.json +++ b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/single-request-parameter/package.json @@ -13,10 +13,6 @@ }, "peerDependencies": { "@angular/core": "^8.0.0", - "@angular/common": "^8.0.0", - "@angular/compiler": "^8.0.0", - "core-js": "^2.4.0", - "reflect-metadata": "^0.1.3", "rxjs": "^6.5.0" }, "devDependencies": { diff --git a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-npm/README.md b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-npm/README.md index ef1f6c5b6ec..151fb2f1a50 100644 --- a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-npm/README.md +++ b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-npm/README.md @@ -57,7 +57,6 @@ In your Angular project: import { ApiModule } from '@openapitools/typescript-angular-petstore'; import { HttpClientModule } from '@angular/common/http'; - @NgModule({ imports: [ ApiModule, @@ -137,7 +136,6 @@ import { ApiModule } from 'my-api-path'; import { ApiModule as OtherApiModule } from 'my-other-api-path'; import { HttpClientModule } from '@angular/common/http'; - @NgModule({ imports: [ ApiModule, diff --git a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-npm/api.module.ts b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-npm/api.module.ts index 5e6ebe12ae0..d29104bd55b 100644 --- a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-npm/api.module.ts +++ b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-npm/api.module.ts @@ -2,7 +2,6 @@ import { NgModule, ModuleWithProviders, SkipSelf, Optional } from '@angular/core import { Configuration } from './configuration'; import { HttpClient } from '@angular/common/http'; - import { PetService } from './api/pet.service'; import { StoreService } from './api/store.service'; import { UserService } from './api/user.service'; diff --git a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-npm/api/pet.service.ts b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-npm/api/pet.service.ts index 48bd11c0d76..a12f7678638 100644 --- a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-npm/api/pet.service.ts +++ b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-npm/api/pet.service.ts @@ -62,7 +62,6 @@ export class PetService { return false; } - private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams { if (typeof value === "object" && value instanceof Date === false) { httpParams = this.addToHttpParamsRecursive(httpParams, value); diff --git a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-npm/api/store.service.ts b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-npm/api/store.service.ts index 0dd112aacc0..75ca27df329 100644 --- a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-npm/api/store.service.ts +++ b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-npm/api/store.service.ts @@ -48,7 +48,6 @@ export class StoreService { } - private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams { if (typeof value === "object" && value instanceof Date === false) { httpParams = this.addToHttpParamsRecursive(httpParams, value); diff --git a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-npm/api/user.service.ts b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-npm/api/user.service.ts index af96edfb150..39967621905 100644 --- a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-npm/api/user.service.ts +++ b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-npm/api/user.service.ts @@ -48,7 +48,6 @@ export class UserService { } - private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams { if (typeof value === "object" && value instanceof Date === false) { httpParams = this.addToHttpParamsRecursive(httpParams, value); diff --git a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-npm/encoder.ts b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-npm/encoder.ts index cbefb4a6dd9..138c4d5cf2c 100644 --- a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-npm/encoder.ts +++ b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-npm/encoder.ts @@ -18,4 +18,3 @@ export class CustomHttpParameterCodec implements HttpParameterCodec { return decodeURIComponent(v); } } - diff --git a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-npm/package.json b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-npm/package.json index 4704f50abdc..ac46f80511a 100644 --- a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-npm/package.json +++ b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-npm/package.json @@ -13,10 +13,6 @@ }, "peerDependencies": { "@angular/core": "^8.0.0", - "@angular/common": "^8.0.0", - "@angular/compiler": "^8.0.0", - "core-js": "^2.4.0", - "reflect-metadata": "^0.1.3", "rxjs": "^6.5.0" }, "devDependencies": { diff --git a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-prefixed-module-name/README.md b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-prefixed-module-name/README.md index ef1f6c5b6ec..151fb2f1a50 100644 --- a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-prefixed-module-name/README.md +++ b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-prefixed-module-name/README.md @@ -57,7 +57,6 @@ In your Angular project: import { ApiModule } from '@openapitools/typescript-angular-petstore'; import { HttpClientModule } from '@angular/common/http'; - @NgModule({ imports: [ ApiModule, @@ -137,7 +136,6 @@ import { ApiModule } from 'my-api-path'; import { ApiModule as OtherApiModule } from 'my-other-api-path'; import { HttpClientModule } from '@angular/common/http'; - @NgModule({ imports: [ ApiModule, diff --git a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-prefixed-module-name/api.module.ts b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-prefixed-module-name/api.module.ts index 57092b10bb0..61312d8cab7 100644 --- a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-prefixed-module-name/api.module.ts +++ b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-prefixed-module-name/api.module.ts @@ -2,7 +2,6 @@ import { NgModule, ModuleWithProviders, SkipSelf, Optional } from '@angular/core import { Configuration } from './configuration'; import { HttpClient } from '@angular/common/http'; - import { PetService } from './api/pet.service'; import { StoreService } from './api/store.service'; import { UserService } from './api/user.service'; diff --git a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-prefixed-module-name/api/pet.service.ts b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-prefixed-module-name/api/pet.service.ts index 48bd11c0d76..a12f7678638 100644 --- a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-prefixed-module-name/api/pet.service.ts +++ b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-prefixed-module-name/api/pet.service.ts @@ -62,7 +62,6 @@ export class PetService { return false; } - private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams { if (typeof value === "object" && value instanceof Date === false) { httpParams = this.addToHttpParamsRecursive(httpParams, value); diff --git a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-prefixed-module-name/api/store.service.ts b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-prefixed-module-name/api/store.service.ts index 0dd112aacc0..75ca27df329 100644 --- a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-prefixed-module-name/api/store.service.ts +++ b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-prefixed-module-name/api/store.service.ts @@ -48,7 +48,6 @@ export class StoreService { } - private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams { if (typeof value === "object" && value instanceof Date === false) { httpParams = this.addToHttpParamsRecursive(httpParams, value); diff --git a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-prefixed-module-name/api/user.service.ts b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-prefixed-module-name/api/user.service.ts index af96edfb150..39967621905 100644 --- a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-prefixed-module-name/api/user.service.ts +++ b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-prefixed-module-name/api/user.service.ts @@ -48,7 +48,6 @@ export class UserService { } - private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams { if (typeof value === "object" && value instanceof Date === false) { httpParams = this.addToHttpParamsRecursive(httpParams, value); diff --git a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-prefixed-module-name/encoder.ts b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-prefixed-module-name/encoder.ts index cbefb4a6dd9..138c4d5cf2c 100644 --- a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-prefixed-module-name/encoder.ts +++ b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-prefixed-module-name/encoder.ts @@ -18,4 +18,3 @@ export class CustomHttpParameterCodec implements HttpParameterCodec { return decodeURIComponent(v); } } - diff --git a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-prefixed-module-name/package.json b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-prefixed-module-name/package.json index 4704f50abdc..ac46f80511a 100644 --- a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-prefixed-module-name/package.json +++ b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-prefixed-module-name/package.json @@ -13,10 +13,6 @@ }, "peerDependencies": { "@angular/core": "^8.0.0", - "@angular/common": "^8.0.0", - "@angular/compiler": "^8.0.0", - "core-js": "^2.4.0", - "reflect-metadata": "^0.1.3", "rxjs": "^6.5.0" }, "devDependencies": { diff --git a/samples/client/petstore/typescript-axios/builds/with-single-request-parameters/api.ts b/samples/client/petstore/typescript-axios/builds/with-single-request-parameters/api.ts index e5f45026d56..0f28039687c 100644 --- a/samples/client/petstore/typescript-axios/builds/with-single-request-parameters/api.ts +++ b/samples/client/petstore/typescript-axios/builds/with-single-request-parameters/api.ts @@ -1250,15 +1250,11 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration /** * * @summary Place an order for a pet - * @param {Order} body order placed for purchasing the pet + * @param {Order} [body] order placed for purchasing the pet * @param {*} [options] Override http request option. * @throws {RequiredError} */ - placeOrder: async (body: Order, options: any = {}): Promise => { - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new RequiredError('body','Required parameter body was null or undefined when calling placeOrder.'); - } + placeOrder: async (body?: Order, options: any = {}): Promise => { const localVarPath = `/store/order`; const localVarUrlObj = globalImportUrl.parse(localVarPath, true); let baseOptions; @@ -1339,11 +1335,11 @@ export const StoreApiFp = function(configuration?: Configuration) { /** * * @summary Place an order for a pet - * @param {Order} body order placed for purchasing the pet + * @param {Order} [body] order placed for purchasing the pet * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async placeOrder(body: Order, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async placeOrder(body?: Order, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await StoreApiAxiosParamCreator(configuration).placeOrder(body, options); return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; @@ -1391,11 +1387,11 @@ export const StoreApiFactory = function (configuration?: Configuration, basePath /** * * @summary Place an order for a pet - * @param {Order} body order placed for purchasing the pet + * @param {Order} [body] order placed for purchasing the pet * @param {*} [options] Override http request option. * @throws {RequiredError} */ - placeOrder(body: Order, options?: any): AxiosPromise { + placeOrder(body?: Order, options?: any): AxiosPromise { return StoreApiFp(configuration).placeOrder(body, options).then((request) => request(axios, basePath)); }, }; @@ -1440,7 +1436,7 @@ export interface StoreApiPlaceOrderRequest { * @type {Order} * @memberof StoreApiPlaceOrder */ - readonly body: Order + readonly body?: Order } /** @@ -1493,7 +1489,7 @@ export class StoreApi extends BaseAPI { * @throws {RequiredError} * @memberof StoreApi */ - public placeOrder(requestParameters: StoreApiPlaceOrderRequest, options?: any) { + public placeOrder(requestParameters: StoreApiPlaceOrderRequest = {}, options?: any) { return StoreApiFp(this.configuration).placeOrder(requestParameters.body, options).then((request) => request(this.axios, this.basePath)); } } diff --git a/samples/openapi3/client/petstore/python-experimental/.openapi-generator/FILES b/samples/openapi3/client/petstore/python-experimental/.openapi-generator/FILES index e650f1d87aa..378e6965acc 100644 --- a/samples/openapi3/client/petstore/python-experimental/.openapi-generator/FILES +++ b/samples/openapi3/client/petstore/python-experimental/.openapi-generator/FILES @@ -14,18 +14,17 @@ docs/ArrayOfNumberOnly.md docs/ArrayTest.md docs/Banana.md docs/BananaReq.md -docs/BiologyChordate.md -docs/BiologyHominid.md -docs/BiologyMammal.md -docs/BiologyPrimate.md -docs/BiologyReptile.md +docs/BasquePig.md docs/Capitalization.md docs/Cat.md docs/CatAllOf.md docs/Category.md +docs/ChildCat.md +docs/ChildCatAllOf.md docs/ClassModel.md docs/Client.md docs/ComplexQuadrilateral.md +docs/DanishPig.md docs/DefaultApi.md docs/Dog.md docs/DogAllOf.md @@ -43,6 +42,7 @@ docs/FormatTest.md docs/Fruit.md docs/FruitReq.md docs/GmFruit.md +docs/GrandparentAnimal.md docs/HasOnlyReadOnly.md docs/HealthCheckResult.md docs/InlineObject.md @@ -69,8 +69,10 @@ docs/OuterEnum.md docs/OuterEnumDefaultValue.md docs/OuterEnumInteger.md docs/OuterEnumIntegerDefaultValue.md +docs/ParentPet.md docs/Pet.md docs/PetApi.md +docs/Pig.md docs/Quadrilateral.md docs/QuadrilateralInterface.md docs/ReadOnlyFirst.md @@ -115,18 +117,17 @@ petstore_api/models/array_of_number_only.py petstore_api/models/array_test.py petstore_api/models/banana.py petstore_api/models/banana_req.py -petstore_api/models/biology_chordate.py -petstore_api/models/biology_hominid.py -petstore_api/models/biology_mammal.py -petstore_api/models/biology_primate.py -petstore_api/models/biology_reptile.py +petstore_api/models/basque_pig.py petstore_api/models/capitalization.py petstore_api/models/cat.py petstore_api/models/cat_all_of.py petstore_api/models/category.py +petstore_api/models/child_cat.py +petstore_api/models/child_cat_all_of.py petstore_api/models/class_model.py petstore_api/models/client.py petstore_api/models/complex_quadrilateral.py +petstore_api/models/danish_pig.py petstore_api/models/dog.py petstore_api/models/dog_all_of.py petstore_api/models/drawing.py @@ -141,6 +142,7 @@ petstore_api/models/format_test.py petstore_api/models/fruit.py petstore_api/models/fruit_req.py petstore_api/models/gm_fruit.py +petstore_api/models/grandparent_animal.py petstore_api/models/has_only_read_only.py petstore_api/models/health_check_result.py petstore_api/models/inline_object.py @@ -167,7 +169,9 @@ petstore_api/models/outer_enum.py petstore_api/models/outer_enum_default_value.py petstore_api/models/outer_enum_integer.py petstore_api/models/outer_enum_integer_default_value.py +petstore_api/models/parent_pet.py petstore_api/models/pet.py +petstore_api/models/pig.py petstore_api/models/quadrilateral.py petstore_api/models/quadrilateral_interface.py petstore_api/models/read_only_first.py diff --git a/samples/openapi3/client/petstore/python-experimental/README.md b/samples/openapi3/client/petstore/python-experimental/README.md index 845aef4aa69..9827e98d2a1 100644 --- a/samples/openapi3/client/petstore/python-experimental/README.md +++ b/samples/openapi3/client/petstore/python-experimental/README.md @@ -133,18 +133,17 @@ Class | Method | HTTP request | Description - [array_test.ArrayTest](docs/ArrayTest.md) - [banana.Banana](docs/Banana.md) - [banana_req.BananaReq](docs/BananaReq.md) - - [biology_chordate.BiologyChordate](docs/BiologyChordate.md) - - [biology_hominid.BiologyHominid](docs/BiologyHominid.md) - - [biology_mammal.BiologyMammal](docs/BiologyMammal.md) - - [biology_primate.BiologyPrimate](docs/BiologyPrimate.md) - - [biology_reptile.BiologyReptile](docs/BiologyReptile.md) + - [basque_pig.BasquePig](docs/BasquePig.md) - [capitalization.Capitalization](docs/Capitalization.md) - [cat.Cat](docs/Cat.md) - [cat_all_of.CatAllOf](docs/CatAllOf.md) - [category.Category](docs/Category.md) + - [child_cat.ChildCat](docs/ChildCat.md) + - [child_cat_all_of.ChildCatAllOf](docs/ChildCatAllOf.md) - [class_model.ClassModel](docs/ClassModel.md) - [client.Client](docs/Client.md) - [complex_quadrilateral.ComplexQuadrilateral](docs/ComplexQuadrilateral.md) + - [danish_pig.DanishPig](docs/DanishPig.md) - [dog.Dog](docs/Dog.md) - [dog_all_of.DogAllOf](docs/DogAllOf.md) - [drawing.Drawing](docs/Drawing.md) @@ -159,6 +158,7 @@ Class | Method | HTTP request | Description - [fruit.Fruit](docs/Fruit.md) - [fruit_req.FruitReq](docs/FruitReq.md) - [gm_fruit.GmFruit](docs/GmFruit.md) + - [grandparent_animal.GrandparentAnimal](docs/GrandparentAnimal.md) - [has_only_read_only.HasOnlyReadOnly](docs/HasOnlyReadOnly.md) - [health_check_result.HealthCheckResult](docs/HealthCheckResult.md) - [inline_object.InlineObject](docs/InlineObject.md) @@ -185,7 +185,9 @@ Class | Method | HTTP request | Description - [outer_enum_default_value.OuterEnumDefaultValue](docs/OuterEnumDefaultValue.md) - [outer_enum_integer.OuterEnumInteger](docs/OuterEnumInteger.md) - [outer_enum_integer_default_value.OuterEnumIntegerDefaultValue](docs/OuterEnumIntegerDefaultValue.md) + - [parent_pet.ParentPet](docs/ParentPet.md) - [pet.Pet](docs/Pet.md) + - [pig.Pig](docs/Pig.md) - [quadrilateral.Quadrilateral](docs/Quadrilateral.md) - [quadrilateral_interface.QuadrilateralInterface](docs/QuadrilateralInterface.md) - [read_only_first.ReadOnlyFirst](docs/ReadOnlyFirst.md) diff --git a/samples/openapi3/client/petstore/python-experimental/docs/AdditionalPropertiesClass.md b/samples/openapi3/client/petstore/python-experimental/docs/AdditionalPropertiesClass.md index 4df80090d8e..042d7c437d6 100644 --- a/samples/openapi3/client/petstore/python-experimental/docs/AdditionalPropertiesClass.md +++ b/samples/openapi3/client/petstore/python-experimental/docs/AdditionalPropertiesClass.md @@ -5,6 +5,12 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **map_property** | **{str: (str,)}** | | [optional] **map_of_map_property** | **{str: ({str: (str,)},)}** | | [optional] +**anytype_1** | **bool, date, datetime, dict, float, int, list, str, none_type** | | [optional] +**map_with_undeclared_properties_anytype_1** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}** | | [optional] +**map_with_undeclared_properties_anytype_2** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}** | | [optional] +**map_with_undeclared_properties_anytype_3** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}** | | [optional] +**empty_map** | **bool, date, datetime, dict, float, int, list, str** | an object with no declared properties and no undeclared properties, hence it's an empty map. | [optional] +**map_with_undeclared_properties_string** | **{str: (str,)}** | | [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/openapi3/client/petstore/python-experimental/docs/BiologyMammal.md b/samples/openapi3/client/petstore/python-experimental/docs/BasquePig.md similarity index 90% rename from samples/openapi3/client/petstore/python-experimental/docs/BiologyMammal.md rename to samples/openapi3/client/petstore/python-experimental/docs/BasquePig.md index 5f625ab888b..0e8f8bb27fb 100644 --- a/samples/openapi3/client/petstore/python-experimental/docs/BiologyMammal.md +++ b/samples/openapi3/client/petstore/python-experimental/docs/BasquePig.md @@ -1,4 +1,4 @@ -# biology_mammal.BiologyMammal +# basque_pig.BasquePig ## Properties Name | Type | Description | Notes diff --git a/samples/openapi3/client/petstore/python-experimental/docs/BiologyReptile.md b/samples/openapi3/client/petstore/python-experimental/docs/BiologyReptile.md deleted file mode 100644 index 594b477258a..00000000000 --- a/samples/openapi3/client/petstore/python-experimental/docs/BiologyReptile.md +++ /dev/null @@ -1,10 +0,0 @@ -# biology_reptile.BiologyReptile - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**class_name** | **str** | | - -[[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/openapi3/client/petstore/python-experimental/docs/Cat.md b/samples/openapi3/client/petstore/python-experimental/docs/Cat.md index 1d7b5b26d71..846a97c82a8 100644 --- a/samples/openapi3/client/petstore/python-experimental/docs/Cat.md +++ b/samples/openapi3/client/petstore/python-experimental/docs/Cat.md @@ -6,6 +6,7 @@ Name | Type | Description | Notes **class_name** | **str** | | **declawed** | **bool** | | [optional] **color** | **str** | | [optional] if omitted the server will use the default value of 'red' +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [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/openapi3/client/petstore/python-experimental/docs/ChildCat.md b/samples/openapi3/client/petstore/python-experimental/docs/ChildCat.md new file mode 100644 index 00000000000..bee23082474 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/docs/ChildCat.md @@ -0,0 +1,12 @@ +# child_cat.ChildCat + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**pet_type** | **str** | | +**name** | **str** | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [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/openapi3/client/petstore/python-experimental/docs/BiologyHominid.md b/samples/openapi3/client/petstore/python-experimental/docs/ChildCatAllOf.md similarity index 79% rename from samples/openapi3/client/petstore/python-experimental/docs/BiologyHominid.md rename to samples/openapi3/client/petstore/python-experimental/docs/ChildCatAllOf.md index 408e8c7533a..2e84f31081f 100644 --- a/samples/openapi3/client/petstore/python-experimental/docs/BiologyHominid.md +++ b/samples/openapi3/client/petstore/python-experimental/docs/ChildCatAllOf.md @@ -1,9 +1,9 @@ -# biology_hominid.BiologyHominid +# child_cat_all_of.ChildCatAllOf ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**class_name** | **str** | | +**name** | **str** | | [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/openapi3/client/petstore/python-experimental/docs/ComplexQuadrilateral.md b/samples/openapi3/client/petstore/python-experimental/docs/ComplexQuadrilateral.md index 6a7288abcb8..4230b57b126 100644 --- a/samples/openapi3/client/petstore/python-experimental/docs/ComplexQuadrilateral.md +++ b/samples/openapi3/client/petstore/python-experimental/docs/ComplexQuadrilateral.md @@ -5,6 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **shape_type** | **str** | | **quadrilateral_type** | **str** | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [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/openapi3/client/petstore/python-experimental/docs/BiologyPrimate.md b/samples/openapi3/client/petstore/python-experimental/docs/DanishPig.md similarity index 90% rename from samples/openapi3/client/petstore/python-experimental/docs/BiologyPrimate.md rename to samples/openapi3/client/petstore/python-experimental/docs/DanishPig.md index 46b91e54a8b..65058d86e04 100644 --- a/samples/openapi3/client/petstore/python-experimental/docs/BiologyPrimate.md +++ b/samples/openapi3/client/petstore/python-experimental/docs/DanishPig.md @@ -1,4 +1,4 @@ -# biology_primate.BiologyPrimate +# danish_pig.DanishPig ## Properties Name | Type | Description | Notes diff --git a/samples/openapi3/client/petstore/python-experimental/docs/Dog.md b/samples/openapi3/client/petstore/python-experimental/docs/Dog.md index ec98b99dcec..4c0497d6769 100644 --- a/samples/openapi3/client/petstore/python-experimental/docs/Dog.md +++ b/samples/openapi3/client/petstore/python-experimental/docs/Dog.md @@ -6,6 +6,7 @@ Name | Type | Description | Notes **class_name** | **str** | | **breed** | **str** | | [optional] **color** | **str** | | [optional] if omitted the server will use the default value of 'red' +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [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/openapi3/client/petstore/python-experimental/docs/Drawing.md b/samples/openapi3/client/petstore/python-experimental/docs/Drawing.md index 16358f97abe..1583a1dea01 100644 --- a/samples/openapi3/client/petstore/python-experimental/docs/Drawing.md +++ b/samples/openapi3/client/petstore/python-experimental/docs/Drawing.md @@ -5,8 +5,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **main_shape** | [**shape.Shape**](Shape.md) | | [optional] **shape_or_null** | [**shape_or_null.ShapeOrNull**](ShapeOrNull.md) | | [optional] -**nullable_shape** | [**nullable_shape.NullableShape, none_type**](NullableShape.md) | | [optional] +**nullable_shape** | [**nullable_shape.NullableShape**](NullableShape.md) | | [optional] **shapes** | [**[shape.Shape]**](Shape.md) | | [optional] +**any string name** | **fruit.Fruit** | any string name can be used but the value must be the correct type | [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/openapi3/client/petstore/python-experimental/docs/EquilateralTriangle.md b/samples/openapi3/client/petstore/python-experimental/docs/EquilateralTriangle.md index 46c822e9db4..2263b96b258 100644 --- a/samples/openapi3/client/petstore/python-experimental/docs/EquilateralTriangle.md +++ b/samples/openapi3/client/petstore/python-experimental/docs/EquilateralTriangle.md @@ -5,6 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **shape_type** | **str** | | **triangle_type** | **str** | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [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/openapi3/client/petstore/python-experimental/docs/BiologyChordate.md b/samples/openapi3/client/petstore/python-experimental/docs/GrandparentAnimal.md similarity index 80% rename from samples/openapi3/client/petstore/python-experimental/docs/BiologyChordate.md rename to samples/openapi3/client/petstore/python-experimental/docs/GrandparentAnimal.md index ecccbed7f3c..8a6679f3895 100644 --- a/samples/openapi3/client/petstore/python-experimental/docs/BiologyChordate.md +++ b/samples/openapi3/client/petstore/python-experimental/docs/GrandparentAnimal.md @@ -1,9 +1,9 @@ -# biology_chordate.BiologyChordate +# grandparent_animal.GrandparentAnimal ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**class_name** | **str** | | +**pet_type** | **str** | | [[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/openapi3/client/petstore/python-experimental/docs/Mammal.md b/samples/openapi3/client/petstore/python-experimental/docs/Mammal.md index b86f0b17ab9..8aadf030d29 100644 --- a/samples/openapi3/client/petstore/python-experimental/docs/Mammal.md +++ b/samples/openapi3/client/petstore/python-experimental/docs/Mammal.md @@ -7,6 +7,7 @@ Name | Type | Description | Notes **has_baleen** | **bool** | | [optional] **has_teeth** | **bool** | | [optional] **type** | **str** | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [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/openapi3/client/petstore/python-experimental/docs/NullableClass.md b/samples/openapi3/client/petstore/python-experimental/docs/NullableClass.md index 7b1fe8506a6..00037cf35fa 100644 --- a/samples/openapi3/client/petstore/python-experimental/docs/NullableClass.md +++ b/samples/openapi3/client/petstore/python-experimental/docs/NullableClass.md @@ -9,13 +9,13 @@ Name | Type | Description | Notes **string_prop** | **str, none_type** | | [optional] **date_prop** | **date, none_type** | | [optional] **datetime_prop** | **datetime, none_type** | | [optional] -**array_nullable_prop** | **[bool, date, datetime, dict, float, int, list, str], none_type** | | [optional] -**array_and_items_nullable_prop** | **[bool, date, datetime, dict, float, int, list, str, none_type], none_type** | | [optional] -**array_items_nullable** | **[bool, date, datetime, dict, float, int, list, str, none_type]** | | [optional] -**object_nullable_prop** | **{str: (bool, date, datetime, dict, float, int, list, str,)}, none_type** | | [optional] -**object_and_items_nullable_prop** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type** | | [optional] -**object_items_nullable** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}** | | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] +**array_nullable_prop** | **[{str: (bool, date, datetime, dict, float, int, list, str, none_type)}], none_type** | | [optional] +**array_and_items_nullable_prop** | **[{str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type], none_type** | | [optional] +**array_items_nullable** | **[{str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type]** | | [optional] +**object_nullable_prop** | **{str: ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},)}, none_type** | | [optional] +**object_and_items_nullable_prop** | **{str: ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type)}, none_type** | | [optional] +**object_items_nullable** | **{str: ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type)}** | | [optional] +**any string name** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type** | any string name can be used but the value must be the correct type | [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/openapi3/client/petstore/python-experimental/docs/NullableShape.md b/samples/openapi3/client/petstore/python-experimental/docs/NullableShape.md index 6b29731c533..82b0d949406 100644 --- a/samples/openapi3/client/petstore/python-experimental/docs/NullableShape.md +++ b/samples/openapi3/client/petstore/python-experimental/docs/NullableShape.md @@ -7,6 +7,7 @@ Name | Type | Description | Notes **shape_type** | **str** | | **quadrilateral_type** | **str** | | defaults to nulltype.Null **triangle_type** | **str** | | defaults to nulltype.Null +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [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/openapi3/client/petstore/python-experimental/docs/ParentPet.md b/samples/openapi3/client/petstore/python-experimental/docs/ParentPet.md new file mode 100644 index 00000000000..78693cf8f0e --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/docs/ParentPet.md @@ -0,0 +1,11 @@ +# parent_pet.ParentPet + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**pet_type** | **str** | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [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/openapi3/client/petstore/python-experimental/docs/Pig.md b/samples/openapi3/client/petstore/python-experimental/docs/Pig.md new file mode 100644 index 00000000000..0ca689c073e --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/docs/Pig.md @@ -0,0 +1,11 @@ +# pig.Pig + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**class_name** | **str** | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [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/openapi3/client/petstore/python-experimental/docs/Quadrilateral.md b/samples/openapi3/client/petstore/python-experimental/docs/Quadrilateral.md index bc43f1e9351..5d0a4a075fe 100644 --- a/samples/openapi3/client/petstore/python-experimental/docs/Quadrilateral.md +++ b/samples/openapi3/client/petstore/python-experimental/docs/Quadrilateral.md @@ -5,6 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **quadrilateral_type** | **str** | | **shape_type** | **str** | | defaults to nulltype.Null +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [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/openapi3/client/petstore/python-experimental/docs/ScaleneTriangle.md b/samples/openapi3/client/petstore/python-experimental/docs/ScaleneTriangle.md index a99a1f761c2..6e4dc3c9af8 100644 --- a/samples/openapi3/client/petstore/python-experimental/docs/ScaleneTriangle.md +++ b/samples/openapi3/client/petstore/python-experimental/docs/ScaleneTriangle.md @@ -5,6 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **shape_type** | **str** | | **triangle_type** | **str** | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [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/openapi3/client/petstore/python-experimental/docs/Shape.md b/samples/openapi3/client/petstore/python-experimental/docs/Shape.md index 6fbc1b6d2c7..793225bc517 100644 --- a/samples/openapi3/client/petstore/python-experimental/docs/Shape.md +++ b/samples/openapi3/client/petstore/python-experimental/docs/Shape.md @@ -6,6 +6,7 @@ Name | Type | Description | Notes **shape_type** | **str** | | **quadrilateral_type** | **str** | | defaults to nulltype.Null **triangle_type** | **str** | | defaults to nulltype.Null +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [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/openapi3/client/petstore/python-experimental/docs/ShapeOrNull.md b/samples/openapi3/client/petstore/python-experimental/docs/ShapeOrNull.md index 990e93ee87d..0f52dcbd316 100644 --- a/samples/openapi3/client/petstore/python-experimental/docs/ShapeOrNull.md +++ b/samples/openapi3/client/petstore/python-experimental/docs/ShapeOrNull.md @@ -7,6 +7,7 @@ Name | Type | Description | Notes **shape_type** | **str** | | **quadrilateral_type** | **str** | | defaults to nulltype.Null **triangle_type** | **str** | | defaults to nulltype.Null +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [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/openapi3/client/petstore/python-experimental/docs/SimpleQuadrilateral.md b/samples/openapi3/client/petstore/python-experimental/docs/SimpleQuadrilateral.md index fe93f417347..14789a06f91 100644 --- a/samples/openapi3/client/petstore/python-experimental/docs/SimpleQuadrilateral.md +++ b/samples/openapi3/client/petstore/python-experimental/docs/SimpleQuadrilateral.md @@ -5,6 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **shape_type** | **str** | | **quadrilateral_type** | **str** | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [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/openapi3/client/petstore/python-experimental/docs/Triangle.md b/samples/openapi3/client/petstore/python-experimental/docs/Triangle.md index b6cf8106682..f066c080aad 100644 --- a/samples/openapi3/client/petstore/python-experimental/docs/Triangle.md +++ b/samples/openapi3/client/petstore/python-experimental/docs/Triangle.md @@ -5,6 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **triangle_type** | **str** | | **shape_type** | **str** | | defaults to nulltype.Null +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [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/openapi3/client/petstore/python-experimental/docs/User.md b/samples/openapi3/client/petstore/python-experimental/docs/User.md index 2d9e43b532c..1b1ec5fb6cc 100644 --- a/samples/openapi3/client/petstore/python-experimental/docs/User.md +++ b/samples/openapi3/client/petstore/python-experimental/docs/User.md @@ -11,8 +11,8 @@ Name | Type | Description | Notes **password** | **str** | | [optional] **phone** | **str** | | [optional] **user_status** | **int** | User Status | [optional] -**object_with_no_declared_props** | **bool, date, datetime, dict, float, int, list, str** | test code generation for objects Value must be a map of strings to values. It cannot be the 'null' value. | [optional] -**object_with_no_declared_props_nullable** | **bool, date, datetime, dict, float, int, list, str, none_type** | test code generation for nullable objects. Value must be a map of strings to values or the 'null' value. | [optional] +**object_with_no_declared_props** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}** | test code generation for objects Value must be a map of strings to values. It cannot be the 'null' value. | [optional] +**object_with_no_declared_props_nullable** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type** | test code generation for nullable objects. Value must be a map of strings to values or the 'null' value. | [optional] **any_type_prop** | **bool, date, datetime, dict, float, int, list, str, none_type** | test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. See https://github.com/OAI/OpenAPI-Specification/issues/1389 | [optional] **any_type_prop_nullable** | **bool, date, datetime, dict, float, int, list, str, none_type** | test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. The 'nullable' attribute does not change the allowed values. | [optional] diff --git a/samples/openapi3/client/petstore/python-experimental/docs/Zebra.md b/samples/openapi3/client/petstore/python-experimental/docs/Zebra.md index 779a8db51e9..05a4dbfd6ba 100644 --- a/samples/openapi3/client/petstore/python-experimental/docs/Zebra.md +++ b/samples/openapi3/client/petstore/python-experimental/docs/Zebra.md @@ -5,6 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **class_name** | **str** | | **type** | **str** | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [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/openapi3/client/petstore/python-experimental/petstore_api/__init__.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/__init__.py index a24cdd8c3bc..8b945d032fb 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/__init__.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/__init__.py @@ -51,18 +51,17 @@ from petstore_api.models.array_of_number_only import ArrayOfNumberOnly from petstore_api.models.array_test import ArrayTest from petstore_api.models.banana import Banana from petstore_api.models.banana_req import BananaReq -from petstore_api.models.biology_chordate import BiologyChordate -from petstore_api.models.biology_hominid import BiologyHominid -from petstore_api.models.biology_mammal import BiologyMammal -from petstore_api.models.biology_primate import BiologyPrimate -from petstore_api.models.biology_reptile import BiologyReptile +from petstore_api.models.basque_pig import BasquePig from petstore_api.models.capitalization import Capitalization from petstore_api.models.cat import Cat from petstore_api.models.cat_all_of import CatAllOf from petstore_api.models.category import Category +from petstore_api.models.child_cat import ChildCat +from petstore_api.models.child_cat_all_of import ChildCatAllOf from petstore_api.models.class_model import ClassModel from petstore_api.models.client import Client from petstore_api.models.complex_quadrilateral import ComplexQuadrilateral +from petstore_api.models.danish_pig import DanishPig from petstore_api.models.dog import Dog from petstore_api.models.dog_all_of import DogAllOf from petstore_api.models.drawing import Drawing @@ -77,6 +76,7 @@ from petstore_api.models.format_test import FormatTest from petstore_api.models.fruit import Fruit from petstore_api.models.fruit_req import FruitReq from petstore_api.models.gm_fruit import GmFruit +from petstore_api.models.grandparent_animal import GrandparentAnimal from petstore_api.models.has_only_read_only import HasOnlyReadOnly from petstore_api.models.health_check_result import HealthCheckResult from petstore_api.models.inline_object import InlineObject @@ -103,7 +103,9 @@ from petstore_api.models.outer_enum import OuterEnum from petstore_api.models.outer_enum_default_value import OuterEnumDefaultValue from petstore_api.models.outer_enum_integer import OuterEnumInteger from petstore_api.models.outer_enum_integer_default_value import OuterEnumIntegerDefaultValue +from petstore_api.models.parent_pet import ParentPet from petstore_api.models.pet import Pet +from petstore_api.models.pig import Pig from petstore_api.models.quadrilateral import Quadrilateral from petstore_api.models.quadrilateral_interface import QuadrilateralInterface from petstore_api.models.read_only_first import ReadOnlyFirst diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model_utils.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model_utils.py index 91225e19fcb..982115862d6 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model_utils.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model_utils.py @@ -138,16 +138,8 @@ class OpenApiModel(object): # pick a new schema/class to instantiate because a discriminator # propertyName value was passed in - # Build a list containing all oneOf and anyOf descendants. - oneof_anyof_classes = None - if cls._composed_schemas is not None: - oneof_anyof_classes = ( - cls._composed_schemas.get('oneOf', ()) + - cls._composed_schemas.get('anyOf', ())) - if (oneof_anyof_classes and none_type in oneof_anyof_classes and - len(args) == 1 and args[0] is None): - # The input data is the 'null' value AND one of the oneOf/anyOf children - # is the 'null' type (which is introduced in OAS schema >= 3.1). + if len(args) == 1 and args[0] is None and is_type_nullable(cls): + # The input data is the 'null' value and the type is nullable. return None visited_composed_classes = kwargs.get('_visited_composed_classes', ()) @@ -155,26 +147,22 @@ class OpenApiModel(object): cls.discriminator is None or cls in visited_composed_classes ): - # This openapi schema (cls) does not have a discriminator - # Or we have already visited this class before and are sure that we - # want to instantiate it this time. + # Use case 1: this openapi schema (cls) does not have a discriminator + # Use case 2: we have already visited this class before and are sure that we + # want to instantiate it this time. We have visited this class deserializing + # a payload with a discriminator. During that process we traveled through + # this class but did not make an instance of it. Now we are making an + # instance of a composed class which contains cls in it, so this time make an instance of cls. # - # If we are making an instance of a composed schema Descendent - # which allOf includes Ancestor, then Ancestor contains - # a discriminator that includes Descendent. - # So if we make an instance of Descendent, we have to make an - # instance of Ancestor to hold the allOf properties. - # This code detects that use case and makes the instance of Ancestor - # For example: - # When making an instance of Dog, _visited_composed_classes = (Dog,) - # then we make an instance of Animal to include in dog._composed_instances - # so when we are here, cls is Animal - # cls.discriminator != None - # cls not in _visited_composed_classes - # new_cls = Dog - # but we know we know that we already have Dog - # because it is in visited_composed_classes - # so make Animal here + # Here's an example of use case 2: If Animal has a discriminator + # petType and we pass in "Dog", and the class Dog + # allOf includes Animal, we move through Animal + # once using the discriminator, and pick Dog. + # Then in the composed schema dog Dog, we will make an instance of the + # Animal class (because Dal has allOf: Animal) but this time we won't travel + # through Animal's discriminator because we passed in + # _visited_composed_classes = (Animal,) + return super(OpenApiModel, cls).__new__(cls) # Get the name and value of the discriminator property. @@ -213,9 +201,30 @@ class OpenApiModel(object): ) if new_cls in visited_composed_classes: - # if we are coming from the chosen new_cls use cls instead + # if we are making an instance of a composed schema Descendent + # which allOf includes Ancestor, then Ancestor contains + # a discriminator that includes Descendent. + # So if we make an instance of Descendent, we have to make an + # instance of Ancestor to hold the allOf properties. + # This code detects that use case and makes the instance of Ancestor + # For example: + # When making an instance of Dog, _visited_composed_classes = (Dog,) + # then we make an instance of Animal to include in dog._composed_instances + # so when we are here, cls is Animal + # cls.discriminator != None + # cls not in _visited_composed_classes + # new_cls = Dog + # but we know we know that we already have Dog + # because it is in visited_composed_classes + # so make Animal here return super(OpenApiModel, cls).__new__(cls) + # Build a list containing all oneOf and anyOf descendants. + oneof_anyof_classes = None + if cls._composed_schemas is not None: + oneof_anyof_classes = ( + cls._composed_schemas.get('oneOf', ()) + + cls._composed_schemas.get('anyOf', ())) oneof_anyof_child = new_cls in oneof_anyof_classes kwargs['_visited_composed_classes'] = visited_composed_classes + (cls,) @@ -1033,18 +1042,20 @@ def get_discriminator_class(model_class, used_model_class = class_name_to_discr_class.get(discr_value) if used_model_class is None: # We didn't find a discriminated class in class_name_to_discr_class. + # So look in the ancestor or descendant discriminators # The discriminator mapping may exist in a descendant (anyOf, oneOf) # or ancestor (allOf). - # Ancestor example: in the "Dog -> Mammal -> Chordate -> Animal" + # Ancestor example: in the GrandparentAnimal -> ParentPet -> ChildCat # hierarchy, the discriminator mappings may be defined at any level - # in the hieararchy. - # Descendant example: a schema is oneOf[Plant, Mammal], and each - # oneOf child may itself be an allOf with some arbitrary hierarchy, - # and a graph traversal is required to find the discriminator. - composed_children = model_class._composed_schemas.get('oneOf', ()) + \ - model_class._composed_schemas.get('anyOf', ()) + \ - model_class._composed_schemas.get('allOf', ()) - for cls in composed_children: + # in the hierarchy. + # Descendant example: mammal -> whale/zebra/Pig -> BasquePig/DanishPig + # if we try to make BasquePig from mammal, we need to travel through + # the oneOf descendant discriminators to find BasquePig + descendant_classes = model_class._composed_schemas.get('oneOf', ()) + \ + model_class._composed_schemas.get('anyOf', ()) + ancestor_classes = model_class._composed_schemas.get('allOf', ()) + possible_classes = descendant_classes + ancestor_classes + for cls in possible_classes: # Check if the schema has inherited discriminators. if hasattr(cls, 'discriminator') and cls.discriminator is not None: used_model_class = get_discriminator_class( @@ -1204,8 +1215,10 @@ def is_type_nullable(input_type): """ if input_type is none_type: return True + if issubclass(input_type, OpenApiModel) and input_type._nullable: + return True if issubclass(input_type, ModelComposed): - # If oneOf/anyOf, check if the 'null' type is one of the allowed types. + # If oneOf/anyOf, check if the 'null' type is one of the allowed types. for t in input_type._composed_schemas.get('oneOf', ()): if is_type_nullable(t): return True for t in input_type._composed_schemas.get('anyOf', ()): diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/additional_properties_class.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/additional_properties_class.py index 929cb4509f0..c48b515a7aa 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/additional_properties_class.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/additional_properties_class.py @@ -18,6 +18,7 @@ import six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -66,6 +67,8 @@ class AdditionalPropertiesClass(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ @@ -79,6 +82,12 @@ class AdditionalPropertiesClass(ModelNormal): return { 'map_property': ({str: (str,)},), # noqa: E501 'map_of_map_property': ({str: ({str: (str,)},)},), # noqa: E501 + 'anytype_1': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501 + 'map_with_undeclared_properties_anytype_1': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 + 'map_with_undeclared_properties_anytype_2': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 + 'map_with_undeclared_properties_anytype_3': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 + 'empty_map': (bool, date, datetime, dict, float, int, list, str,), # noqa: E501 + 'map_with_undeclared_properties_string': ({str: (str,)},), # noqa: E501 } @cached_property @@ -88,6 +97,12 @@ class AdditionalPropertiesClass(ModelNormal): attribute_map = { 'map_property': 'map_property', # noqa: E501 'map_of_map_property': 'map_of_map_property', # noqa: E501 + 'anytype_1': 'anytype_1', # noqa: E501 + 'map_with_undeclared_properties_anytype_1': 'map_with_undeclared_properties_anytype_1', # noqa: E501 + 'map_with_undeclared_properties_anytype_2': 'map_with_undeclared_properties_anytype_2', # noqa: E501 + 'map_with_undeclared_properties_anytype_3': 'map_with_undeclared_properties_anytype_3', # noqa: E501 + 'empty_map': 'empty_map', # noqa: E501 + 'map_with_undeclared_properties_string': 'map_with_undeclared_properties_string', # noqa: E501 } _composed_schemas = {} @@ -102,7 +117,7 @@ class AdditionalPropertiesClass(ModelNormal): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """additional_properties_class.AdditionalPropertiesClass - a model defined in OpenAPI Keyword Args: @@ -138,8 +153,30 @@ class AdditionalPropertiesClass(ModelNormal): _visited_composed_classes = (Animal,) map_property ({str: (str,)}): [optional] # noqa: E501 map_of_map_property ({str: ({str: (str,)},)}): [optional] # noqa: E501 + anytype_1 (bool, date, datetime, dict, float, int, list, str, none_type): [optional] # noqa: E501 + map_with_undeclared_properties_anytype_1 ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): [optional] # noqa: E501 + map_with_undeclared_properties_anytype_2 ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): [optional] # noqa: E501 + map_with_undeclared_properties_anytype_3 ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): [optional] # noqa: E501 + empty_map (bool, date, datetime, dict, float, int, list, str): an object with no declared properties and no undeclared properties, hence it's an empty map.. [optional] # noqa: E501 + map_with_undeclared_properties_string ({str: (str,)}): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/address.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/address.py index 5ce4676becc..a71502767ae 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/address.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/address.py @@ -18,6 +18,7 @@ import six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -66,6 +67,8 @@ class Address(ModelNormal): additional_properties_type = (int,) # noqa: E501 + _nullable = False + @cached_property def openapi_types(): """ @@ -98,7 +101,7 @@ class Address(ModelNormal): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """address.Address - a model defined in OpenAPI Keyword Args: @@ -134,6 +137,22 @@ class Address(ModelNormal): _visited_composed_classes = (Animal,) """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/animal.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/animal.py index 7e4a748fdc3..641c9c16e27 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/animal.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/animal.py @@ -18,6 +18,7 @@ import six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -76,6 +77,8 @@ class Animal(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ @@ -118,7 +121,7 @@ class Animal(ModelNormal): ]) @convert_js_args_to_python_args - def __init__(self, class_name, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, class_name, *args, **kwargs): # noqa: E501 """animal.Animal - a model defined in OpenAPI Args: @@ -158,6 +161,22 @@ class Animal(ModelNormal): color (str): [optional] if omitted the server will use the default value of 'red' # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/api_response.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/api_response.py index 3b49eaca1d2..c921519b878 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/api_response.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/api_response.py @@ -18,6 +18,7 @@ import six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -66,6 +67,8 @@ class ApiResponse(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ @@ -104,7 +107,7 @@ class ApiResponse(ModelNormal): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """api_response.ApiResponse - a model defined in OpenAPI Keyword Args: @@ -143,6 +146,22 @@ class ApiResponse(ModelNormal): message (str): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/apple.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/apple.py index cbef6521e74..3f87c152e33 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/apple.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/apple.py @@ -18,6 +18,7 @@ import six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -77,6 +78,8 @@ class Apple(ModelNormal): additional_properties_type = None + _nullable = True + @cached_property def openapi_types(): """ @@ -113,7 +116,7 @@ class Apple(ModelNormal): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """apple.Apple - a model defined in OpenAPI Keyword Args: @@ -151,6 +154,22 @@ class Apple(ModelNormal): origin (str): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/apple_req.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/apple_req.py index beadb0b8e3a..66b2899dbf6 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/apple_req.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/apple_req.py @@ -18,6 +18,7 @@ import six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -66,6 +67,8 @@ class AppleReq(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ @@ -102,7 +105,7 @@ class AppleReq(ModelNormal): ]) @convert_js_args_to_python_args - def __init__(self, cultivar, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, cultivar, *args, **kwargs): # noqa: E501 """apple_req.AppleReq - a model defined in OpenAPI Args: @@ -142,6 +145,22 @@ class AppleReq(ModelNormal): mealy (bool): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/array_of_array_of_number_only.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/array_of_array_of_number_only.py index 298cfdebb36..b9f52d6ba7b 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/array_of_array_of_number_only.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/array_of_array_of_number_only.py @@ -18,6 +18,7 @@ import six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -66,6 +67,8 @@ class ArrayOfArrayOfNumberOnly(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ @@ -100,7 +103,7 @@ class ArrayOfArrayOfNumberOnly(ModelNormal): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """array_of_array_of_number_only.ArrayOfArrayOfNumberOnly - a model defined in OpenAPI Keyword Args: @@ -137,6 +140,22 @@ class ArrayOfArrayOfNumberOnly(ModelNormal): array_array_number ([[float]]): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/array_of_number_only.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/array_of_number_only.py index 756bb0f5fb9..45021fef4c5 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/array_of_number_only.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/array_of_number_only.py @@ -18,6 +18,7 @@ import six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -66,6 +67,8 @@ class ArrayOfNumberOnly(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ @@ -100,7 +103,7 @@ class ArrayOfNumberOnly(ModelNormal): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """array_of_number_only.ArrayOfNumberOnly - a model defined in OpenAPI Keyword Args: @@ -137,6 +140,22 @@ class ArrayOfNumberOnly(ModelNormal): array_number ([float]): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/array_test.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/array_test.py index 25396bbcf21..0eed8d05461 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/array_test.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/array_test.py @@ -18,6 +18,7 @@ import six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -71,6 +72,8 @@ class ArrayTest(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ @@ -109,7 +112,7 @@ class ArrayTest(ModelNormal): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """array_test.ArrayTest - a model defined in OpenAPI Keyword Args: @@ -148,6 +151,22 @@ class ArrayTest(ModelNormal): array_array_of_model ([[read_only_first.ReadOnlyFirst]]): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/banana.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/banana.py index 073f73974ff..6e42bcb5725 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/banana.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/banana.py @@ -18,6 +18,7 @@ import six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -66,6 +67,8 @@ class Banana(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ @@ -100,7 +103,7 @@ class Banana(ModelNormal): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """banana.Banana - a model defined in OpenAPI Keyword Args: @@ -137,6 +140,22 @@ class Banana(ModelNormal): length_cm (float): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/banana_req.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/banana_req.py index 4ba2c3d73c8..3128a038053 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/banana_req.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/banana_req.py @@ -18,6 +18,7 @@ import six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -66,6 +67,8 @@ class BananaReq(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ @@ -102,7 +105,7 @@ class BananaReq(ModelNormal): ]) @convert_js_args_to_python_args - def __init__(self, length_cm, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, length_cm, *args, **kwargs): # noqa: E501 """banana_req.BananaReq - a model defined in OpenAPI Args: @@ -142,6 +145,22 @@ class BananaReq(ModelNormal): sweet (bool): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/biology_chordate.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/basque_pig.py similarity index 82% rename from samples/openapi3/client/petstore/python-experimental/petstore_api/models/biology_chordate.py rename to samples/openapi3/client/petstore/python-experimental/petstore_api/models/basque_pig.py index 3492f4bd3e7..cf39c1833dc 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/biology_chordate.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/basque_pig.py @@ -18,6 +18,7 @@ import six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -32,29 +33,9 @@ from petstore_api.model_utils import ( # noqa: F401 str, validate_get_composed_info, ) -try: - from petstore_api.models import biology_hominid -except ImportError: - biology_hominid = sys.modules[ - 'petstore_api.models.biology_hominid'] -try: - from petstore_api.models import biology_mammal -except ImportError: - biology_mammal = sys.modules[ - 'petstore_api.models.biology_mammal'] -try: - from petstore_api.models import biology_primate -except ImportError: - biology_primate = sys.modules[ - 'petstore_api.models.biology_primate'] -try: - from petstore_api.models import biology_reptile -except ImportError: - biology_reptile = sys.modules[ - 'petstore_api.models.biology_reptile'] -class BiologyChordate(ModelNormal): +class BasquePig(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -86,6 +67,8 @@ class BiologyChordate(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ @@ -102,15 +85,7 @@ class BiologyChordate(ModelNormal): @cached_property def discriminator(): - val = { - 'biology.Hominid': biology_hominid.BiologyHominid, - 'biology.Mammal': biology_mammal.BiologyMammal, - 'biology.Primate': biology_primate.BiologyPrimate, - 'biology.Reptile': biology_reptile.BiologyReptile, - } - if not val: - return None - return {'class_name': val} + return None attribute_map = { 'class_name': 'className', # noqa: E501 @@ -128,8 +103,8 @@ class BiologyChordate(ModelNormal): ]) @convert_js_args_to_python_args - def __init__(self, class_name, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 - """biology_chordate.BiologyChordate - a model defined in OpenAPI + def __init__(self, class_name, *args, **kwargs): # noqa: E501 + """basque_pig.BasquePig - a model defined in OpenAPI Args: class_name (str): @@ -167,6 +142,22 @@ class BiologyChordate(ModelNormal): _visited_composed_classes = (Animal,) """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/capitalization.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/capitalization.py index 2f519f66bb8..06745009d8b 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/capitalization.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/capitalization.py @@ -18,6 +18,7 @@ import six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -66,6 +67,8 @@ class Capitalization(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ @@ -110,7 +113,7 @@ class Capitalization(ModelNormal): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """capitalization.Capitalization - a model defined in OpenAPI Keyword Args: @@ -152,6 +155,22 @@ class Capitalization(ModelNormal): att_name (str): Name of the pet . [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/cat.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/cat.py index 49991c2c714..b8067225253 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/cat.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/cat.py @@ -18,6 +18,7 @@ import six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -79,7 +80,9 @@ class Cat(ModelComposed): validations = { } - additional_properties_type = None + additional_properties_type = (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False @cached_property def openapi_types(): @@ -124,7 +127,7 @@ class Cat(ModelComposed): ]) @convert_js_args_to_python_args - def __init__(self, class_name, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, class_name, *args, **kwargs): # noqa: E501 """cat.Cat - a model defined in OpenAPI Args: @@ -165,6 +168,22 @@ class Cat(ModelComposed): color (str): [optional] if omitted the server will use the default value of 'red' # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/cat_all_of.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/cat_all_of.py index 855371673ac..49ae9462f49 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/cat_all_of.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/cat_all_of.py @@ -18,6 +18,7 @@ import six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -66,6 +67,8 @@ class CatAllOf(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ @@ -100,7 +103,7 @@ class CatAllOf(ModelNormal): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """cat_all_of.CatAllOf - a model defined in OpenAPI Keyword Args: @@ -137,6 +140,22 @@ class CatAllOf(ModelNormal): declawed (bool): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/category.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/category.py index 35eb224e17a..16e4a33d4f0 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/category.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/category.py @@ -18,6 +18,7 @@ import six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -66,6 +67,8 @@ class Category(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ @@ -102,7 +105,7 @@ class Category(ModelNormal): ]) @convert_js_args_to_python_args - def __init__(self, name='default-name', _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """category.Category - a model defined in OpenAPI Args: @@ -142,6 +145,23 @@ class Category(ModelNormal): id (int): [optional] # noqa: E501 """ + name = kwargs.get('name', 'default-name') + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/biology_reptile.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/child_cat.py similarity index 81% rename from samples/openapi3/client/petstore/python-experimental/petstore_api/models/biology_reptile.py rename to samples/openapi3/client/petstore/python-experimental/petstore_api/models/child_cat.py index 0dafde08409..f838e61b401 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/biology_reptile.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/child_cat.py @@ -18,6 +18,7 @@ import six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -33,13 +34,18 @@ from petstore_api.model_utils import ( # noqa: F401 validate_get_composed_info, ) try: - from petstore_api.models import biology_chordate + from petstore_api.models import child_cat_all_of except ImportError: - biology_chordate = sys.modules[ - 'petstore_api.models.biology_chordate'] + child_cat_all_of = sys.modules[ + 'petstore_api.models.child_cat_all_of'] +try: + from petstore_api.models import parent_pet +except ImportError: + parent_pet = sys.modules[ + 'petstore_api.models.parent_pet'] -class BiologyReptile(ModelComposed): +class ChildCat(ModelComposed): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -69,7 +75,9 @@ class BiologyReptile(ModelComposed): validations = { } - additional_properties_type = None + additional_properties_type = (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False @cached_property def openapi_types(): @@ -82,7 +90,8 @@ class BiologyReptile(ModelComposed): and the value is attribute type. """ return { - 'class_name': (str,), # noqa: E501 + 'pet_type': (str,), # noqa: E501 + 'name': (str,), # noqa: E501 } @cached_property @@ -91,10 +100,11 @@ class BiologyReptile(ModelComposed): } if not val: return None - return {'class_name': val} + return {'pet_type': val} attribute_map = { - 'class_name': 'className', # noqa: E501 + 'pet_type': 'pet_type', # noqa: E501 + 'name': 'name', # noqa: E501 } required_properties = set([ @@ -110,11 +120,11 @@ class BiologyReptile(ModelComposed): ]) @convert_js_args_to_python_args - def __init__(self, class_name, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 - """biology_reptile.BiologyReptile - a model defined in OpenAPI + def __init__(self, pet_type, *args, **kwargs): # noqa: E501 + """child_cat.ChildCat - a model defined in OpenAPI Args: - class_name (str): + pet_type (str): Keyword Args: _check_type (bool): if True, values for parameters in openapi_types @@ -147,8 +157,25 @@ class BiologyReptile(ModelComposed): Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) + name (str): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming @@ -164,7 +191,7 @@ class BiologyReptile(ModelComposed): '_visited_composed_classes': self._visited_composed_classes, } required_args = { - 'class_name': class_name, + 'pet_type': pet_type, } # remove args whose value is Null because they are unset required_arg_names = list(required_args.keys()) @@ -205,7 +232,8 @@ class BiologyReptile(ModelComposed): 'anyOf': [ ], 'allOf': [ - biology_chordate.BiologyChordate, + child_cat_all_of.ChildCatAllOf, + parent_pet.ParentPet, ], 'oneOf': [ ], diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/child_cat_all_of.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/child_cat_all_of.py new file mode 100644 index 00000000000..1ddf92fb122 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/child_cat_all_of.py @@ -0,0 +1,173 @@ +# coding: utf-8 + +""" + 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: \" \\ # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import +import re # noqa: F401 +import sys # noqa: F401 + +import six # noqa: F401 +import nulltype # noqa: F401 + +from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + int, + none_type, + str, + validate_get_composed_info, +) + + +class ChildCatAllOf(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + additional_properties_type = None + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a class method so a model may have properties that are + of type self, this ensures that we don't create a cyclic import + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'name': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + attribute_map = { + 'name': 'name', # noqa: E501 + } + + _composed_schemas = {} + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """child_cat_all_of.ChildCatAllOf - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + name (str): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in six.iteritems(kwargs): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/class_model.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/class_model.py index 6244421e601..fc88f68e3f5 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/class_model.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/class_model.py @@ -18,6 +18,7 @@ import six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -66,6 +67,8 @@ class ClassModel(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ @@ -100,7 +103,7 @@ class ClassModel(ModelNormal): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """class_model.ClassModel - a model defined in OpenAPI Keyword Args: @@ -137,6 +140,22 @@ class ClassModel(ModelNormal): _class (str): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/client.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/client.py index f5c6854bbae..fa99b07fa32 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/client.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/client.py @@ -18,6 +18,7 @@ import six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -66,6 +67,8 @@ class Client(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ @@ -100,7 +103,7 @@ class Client(ModelNormal): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """client.Client - a model defined in OpenAPI Keyword Args: @@ -137,6 +140,22 @@ class Client(ModelNormal): client (str): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/complex_quadrilateral.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/complex_quadrilateral.py index a1656978ed6..03497b55fb4 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/complex_quadrilateral.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/complex_quadrilateral.py @@ -18,6 +18,7 @@ import six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -74,7 +75,9 @@ class ComplexQuadrilateral(ModelComposed): validations = { } - additional_properties_type = None + additional_properties_type = (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False @cached_property def openapi_types(): @@ -113,7 +116,7 @@ class ComplexQuadrilateral(ModelComposed): ]) @convert_js_args_to_python_args - def __init__(self, shape_type, quadrilateral_type, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, shape_type, quadrilateral_type, *args, **kwargs): # noqa: E501 """complex_quadrilateral.ComplexQuadrilateral - a model defined in OpenAPI Args: @@ -153,6 +156,22 @@ class ComplexQuadrilateral(ModelComposed): _visited_composed_classes = (Animal,) """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/biology_hominid.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/danish_pig.py similarity index 68% rename from samples/openapi3/client/petstore/python-experimental/petstore_api/models/biology_hominid.py rename to samples/openapi3/client/petstore/python-experimental/petstore_api/models/danish_pig.py index 2ef3b012f7f..375fde3258a 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/biology_hominid.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/danish_pig.py @@ -18,6 +18,7 @@ import six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -32,14 +33,9 @@ from petstore_api.model_utils import ( # noqa: F401 str, validate_get_composed_info, ) -try: - from petstore_api.models import biology_primate -except ImportError: - biology_primate = sys.modules[ - 'petstore_api.models.biology_primate'] -class BiologyHominid(ModelComposed): +class DanishPig(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -71,6 +67,8 @@ class BiologyHominid(ModelComposed): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ @@ -87,16 +85,14 @@ class BiologyHominid(ModelComposed): @cached_property def discriminator(): - val = { - } - if not val: - return None - return {'class_name': val} + return None attribute_map = { 'class_name': 'className', # noqa: E501 } + _composed_schemas = {} + required_properties = set([ '_data_store', '_check_type', @@ -104,14 +100,11 @@ class BiologyHominid(ModelComposed): '_path_to_item', '_configuration', '_visited_composed_classes', - '_composed_instances', - '_var_name_to_model_instances', - '_additional_properties_model_instances', ]) @convert_js_args_to_python_args - def __init__(self, class_name, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 - """biology_hominid.BiologyHominid - a model defined in OpenAPI + def __init__(self, class_name, *args, **kwargs): # noqa: E501 + """danish_pig.DanishPig - a model defined in OpenAPI Args: class_name (str): @@ -149,6 +142,22 @@ class BiologyHominid(ModelComposed): _visited_composed_classes = (Animal,) """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming @@ -156,57 +165,12 @@ class BiologyHominid(ModelComposed): self._configuration = _configuration self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - required_args = { - 'class_name': class_name, - } - # remove args whose value is Null because they are unset - required_arg_names = list(required_args.keys()) - for required_arg_name in required_arg_names: - if required_args[required_arg_name] is nulltype.Null: - del required_args[required_arg_name] - model_args = {} - model_args.update(required_args) - model_args.update(kwargs) - composed_info = validate_get_composed_info( - constant_args, model_args, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - unused_args = composed_info[3] - - for var_name, var_value in required_args.items(): - setattr(self, var_name, var_value) + self.class_name = class_name for var_name, var_value in six.iteritems(kwargs): - if var_name in unused_args and \ + if var_name not in self.attribute_map and \ self._configuration is not None and \ self._configuration.discard_unknown_keys and \ - not self._additional_properties_model_instances: + self.additional_properties_type is None: # discard variable. continue setattr(self, var_name, var_value) - - @cached_property - def _composed_schemas(): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error beause the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return { - 'anyOf': [ - ], - 'allOf': [ - biology_primate.BiologyPrimate, - ], - 'oneOf': [ - ], - } diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/dog.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/dog.py index c4dfd08695d..e35c52bd69d 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/dog.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/dog.py @@ -18,6 +18,7 @@ import six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -74,7 +75,9 @@ class Dog(ModelComposed): validations = { } - additional_properties_type = None + additional_properties_type = (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False @cached_property def openapi_types(): @@ -119,7 +122,7 @@ class Dog(ModelComposed): ]) @convert_js_args_to_python_args - def __init__(self, class_name, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, class_name, *args, **kwargs): # noqa: E501 """dog.Dog - a model defined in OpenAPI Args: @@ -160,6 +163,22 @@ class Dog(ModelComposed): color (str): [optional] if omitted the server will use the default value of 'red' # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/dog_all_of.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/dog_all_of.py index fe4e3ebe28d..0d053aca2a6 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/dog_all_of.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/dog_all_of.py @@ -18,6 +18,7 @@ import six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -66,6 +67,8 @@ class DogAllOf(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ @@ -100,7 +103,7 @@ class DogAllOf(ModelNormal): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """dog_all_of.DogAllOf - a model defined in OpenAPI Keyword Args: @@ -137,6 +140,22 @@ class DogAllOf(ModelNormal): breed (str): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/drawing.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/drawing.py index f147a27dfa6..a9cf39773d6 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/drawing.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/drawing.py @@ -18,6 +18,7 @@ import six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -32,6 +33,11 @@ from petstore_api.model_utils import ( # noqa: F401 str, validate_get_composed_info, ) +try: + from petstore_api.models import fruit +except ImportError: + fruit = sys.modules[ + 'petstore_api.models.fruit'] try: from petstore_api.models import nullable_shape except ImportError: @@ -79,7 +85,9 @@ class Drawing(ModelNormal): validations = { } - additional_properties_type = None + additional_properties_type = (fruit.Fruit,) # noqa: E501 + + _nullable = False @cached_property def openapi_types(): @@ -94,7 +102,7 @@ class Drawing(ModelNormal): return { 'main_shape': (shape.Shape,), # noqa: E501 'shape_or_null': (shape_or_null.ShapeOrNull,), # noqa: E501 - 'nullable_shape': (nullable_shape.NullableShape, none_type,), # noqa: E501 + 'nullable_shape': (nullable_shape.NullableShape,), # noqa: E501 'shapes': ([shape.Shape],), # noqa: E501 } @@ -121,7 +129,7 @@ class Drawing(ModelNormal): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """drawing.Drawing - a model defined in OpenAPI Keyword Args: @@ -157,10 +165,26 @@ class Drawing(ModelNormal): _visited_composed_classes = (Animal,) main_shape (shape.Shape): [optional] # noqa: E501 shape_or_null (shape_or_null.ShapeOrNull): [optional] # noqa: E501 - nullable_shape (nullable_shape.NullableShape, none_type): [optional] # noqa: E501 + nullable_shape (nullable_shape.NullableShape): [optional] # noqa: E501 shapes ([shape.Shape]): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/enum_arrays.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/enum_arrays.py index fd06d3eb384..a1999044974 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/enum_arrays.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/enum_arrays.py @@ -18,6 +18,7 @@ import six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -74,6 +75,8 @@ class EnumArrays(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ @@ -110,7 +113,7 @@ class EnumArrays(ModelNormal): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """enum_arrays.EnumArrays - a model defined in OpenAPI Keyword Args: @@ -148,6 +151,22 @@ class EnumArrays(ModelNormal): array_enum ([str]): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/enum_class.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/enum_class.py index 6e59d0162be..3fa95b69d0c 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/enum_class.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/enum_class.py @@ -18,6 +18,7 @@ import six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -67,6 +68,8 @@ class EnumClass(ModelSimple): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ @@ -97,7 +100,7 @@ class EnumClass(ModelSimple): ]) @convert_js_args_to_python_args - def __init__(self, value='-efg', _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """enum_class.EnumClass - a model defined in OpenAPI Args: @@ -136,6 +139,23 @@ class EnumClass(ModelSimple): _visited_composed_classes = (Animal,) """ + value = kwargs.get('value', '-efg') + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/enum_test.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/enum_test.py index 03765653e38..ba6118114b0 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/enum_test.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/enum_test.py @@ -18,6 +18,7 @@ import six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -104,6 +105,8 @@ class EnumTest(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ @@ -152,7 +155,7 @@ class EnumTest(ModelNormal): ]) @convert_js_args_to_python_args - def __init__(self, enum_string_required, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, enum_string_required, *args, **kwargs): # noqa: E501 """enum_test.EnumTest - a model defined in OpenAPI Args: @@ -198,6 +201,22 @@ class EnumTest(ModelNormal): outer_enum_integer_default_value (outer_enum_integer_default_value.OuterEnumIntegerDefaultValue): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/equilateral_triangle.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/equilateral_triangle.py index ba4d23a45ed..c601d01dde7 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/equilateral_triangle.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/equilateral_triangle.py @@ -18,6 +18,7 @@ import six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -74,7 +75,9 @@ class EquilateralTriangle(ModelComposed): validations = { } - additional_properties_type = None + additional_properties_type = (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False @cached_property def openapi_types(): @@ -113,7 +116,7 @@ class EquilateralTriangle(ModelComposed): ]) @convert_js_args_to_python_args - def __init__(self, shape_type, triangle_type, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, shape_type, triangle_type, *args, **kwargs): # noqa: E501 """equilateral_triangle.EquilateralTriangle - a model defined in OpenAPI Args: @@ -153,6 +156,22 @@ class EquilateralTriangle(ModelComposed): _visited_composed_classes = (Animal,) """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/file.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/file.py index 873052db9ac..0152f8d8c66 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/file.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/file.py @@ -18,6 +18,7 @@ import six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -66,6 +67,8 @@ class File(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ @@ -100,7 +103,7 @@ class File(ModelNormal): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """file.File - a model defined in OpenAPI Keyword Args: @@ -137,6 +140,22 @@ class File(ModelNormal): source_uri (str): Test capitalization. [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/file_schema_test_class.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/file_schema_test_class.py index 32dd82773dd..79e5638ccc9 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/file_schema_test_class.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/file_schema_test_class.py @@ -18,6 +18,7 @@ import six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -71,6 +72,8 @@ class FileSchemaTestClass(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ @@ -107,7 +110,7 @@ class FileSchemaTestClass(ModelNormal): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """file_schema_test_class.FileSchemaTestClass - a model defined in OpenAPI Keyword Args: @@ -145,6 +148,22 @@ class FileSchemaTestClass(ModelNormal): files ([file.File]): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/foo.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/foo.py index 0faf613dab2..34b9eb6fba6 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/foo.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/foo.py @@ -18,6 +18,7 @@ import six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -66,6 +67,8 @@ class Foo(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ @@ -100,7 +103,7 @@ class Foo(ModelNormal): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """foo.Foo - a model defined in OpenAPI Keyword Args: @@ -137,6 +140,22 @@ class Foo(ModelNormal): bar (str): [optional] if omitted the server will use the default value of 'bar' # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/format_test.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/format_test.py index cd9e7ddda52..6c5ae81e7dd 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/format_test.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/format_test.py @@ -18,6 +18,7 @@ import six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -109,6 +110,8 @@ class FormatTest(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ @@ -171,7 +174,7 @@ class FormatTest(ModelNormal): ]) @convert_js_args_to_python_args - def __init__(self, number, byte, date, password, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, number, byte, date, password, *args, **kwargs): # noqa: E501 """format_test.FormatTest - a model defined in OpenAPI Args: @@ -224,6 +227,22 @@ class FormatTest(ModelNormal): pattern_with_digits_and_delimiter (str): A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01.. [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/fruit.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/fruit.py index b31773395d4..1058c953ee6 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/fruit.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/fruit.py @@ -18,6 +18,7 @@ import six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -87,6 +88,8 @@ class Fruit(ModelComposed): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ @@ -128,7 +131,7 @@ class Fruit(ModelComposed): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """fruit.Fruit - a model defined in OpenAPI Keyword Args: @@ -168,6 +171,22 @@ class Fruit(ModelComposed): length_cm (float): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/fruit_req.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/fruit_req.py index 0ba3d104fa1..b8af0f35f43 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/fruit_req.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/fruit_req.py @@ -18,6 +18,7 @@ import six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -76,6 +77,8 @@ class FruitReq(ModelComposed): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ @@ -117,7 +120,7 @@ class FruitReq(ModelComposed): ]) @convert_js_args_to_python_args - def __init__(self, cultivar=nulltype.Null, length_cm=nulltype.Null, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """fruit_req.FruitReq - a model defined in OpenAPI Args: @@ -159,6 +162,24 @@ class FruitReq(ModelComposed): sweet (bool): [optional] # noqa: E501 """ + cultivar = kwargs.get('cultivar', nulltype.Null) + length_cm = kwargs.get('length_cm', nulltype.Null) + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/gm_fruit.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/gm_fruit.py index f1a84f2c52c..9857b08c36c 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/gm_fruit.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/gm_fruit.py @@ -18,6 +18,7 @@ import six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -87,6 +88,8 @@ class GmFruit(ModelComposed): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ @@ -128,7 +131,7 @@ class GmFruit(ModelComposed): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """gm_fruit.GmFruit - a model defined in OpenAPI Keyword Args: @@ -168,6 +171,22 @@ class GmFruit(ModelComposed): length_cm (float): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/grandparent_animal.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/grandparent_animal.py new file mode 100644 index 00000000000..ab2ba56caf3 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/grandparent_animal.py @@ -0,0 +1,192 @@ +# coding: utf-8 + +""" + 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: \" \\ # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import +import re # noqa: F401 +import sys # noqa: F401 + +import six # noqa: F401 +import nulltype # noqa: F401 + +from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + int, + none_type, + str, + validate_get_composed_info, +) +try: + from petstore_api.models import child_cat +except ImportError: + child_cat = sys.modules[ + 'petstore_api.models.child_cat'] +try: + from petstore_api.models import parent_pet +except ImportError: + parent_pet = sys.modules[ + 'petstore_api.models.parent_pet'] + + +class GrandparentAnimal(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + additional_properties_type = None + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a class method so a model may have properties that are + of type self, this ensures that we don't create a cyclic import + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'pet_type': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + val = { + 'ChildCat': child_cat.ChildCat, + 'ParentPet': parent_pet.ParentPet, + } + if not val: + return None + return {'pet_type': val} + + attribute_map = { + 'pet_type': 'pet_type', # noqa: E501 + } + + _composed_schemas = {} + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, pet_type, *args, **kwargs): # noqa: E501 + """grandparent_animal.GrandparentAnimal - a model defined in OpenAPI + + Args: + pet_type (str): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.pet_type = pet_type + for var_name, var_value in six.iteritems(kwargs): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/has_only_read_only.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/has_only_read_only.py index a80d49539b3..eeb685139cb 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/has_only_read_only.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/has_only_read_only.py @@ -18,6 +18,7 @@ import six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -66,6 +67,8 @@ class HasOnlyReadOnly(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ @@ -102,7 +105,7 @@ class HasOnlyReadOnly(ModelNormal): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """has_only_read_only.HasOnlyReadOnly - a model defined in OpenAPI Keyword Args: @@ -140,6 +143,22 @@ class HasOnlyReadOnly(ModelNormal): foo (str): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/health_check_result.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/health_check_result.py index 5e16487a37b..be6cfa1c0af 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/health_check_result.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/health_check_result.py @@ -18,6 +18,7 @@ import six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -66,6 +67,8 @@ class HealthCheckResult(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ @@ -100,7 +103,7 @@ class HealthCheckResult(ModelNormal): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """health_check_result.HealthCheckResult - a model defined in OpenAPI Keyword Args: @@ -137,6 +140,22 @@ class HealthCheckResult(ModelNormal): nullable_message (str, none_type): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/inline_object.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/inline_object.py index 0392e5d816a..8975f4be51e 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/inline_object.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/inline_object.py @@ -18,6 +18,7 @@ import six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -66,6 +67,8 @@ class InlineObject(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ @@ -102,7 +105,7 @@ class InlineObject(ModelNormal): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """inline_object.InlineObject - a model defined in OpenAPI Keyword Args: @@ -140,6 +143,22 @@ class InlineObject(ModelNormal): status (str): Updated status of the pet. [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/inline_object1.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/inline_object1.py index f4c6c2e2e33..4991e899530 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/inline_object1.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/inline_object1.py @@ -18,6 +18,7 @@ import six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -66,6 +67,8 @@ class InlineObject1(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ @@ -102,7 +105,7 @@ class InlineObject1(ModelNormal): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """inline_object1.InlineObject1 - a model defined in OpenAPI Keyword Args: @@ -140,6 +143,22 @@ class InlineObject1(ModelNormal): file (file_type): file to upload. [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/inline_object2.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/inline_object2.py index 49f5d316465..5b414027033 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/inline_object2.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/inline_object2.py @@ -18,6 +18,7 @@ import six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -75,6 +76,8 @@ class InlineObject2(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ @@ -111,7 +114,7 @@ class InlineObject2(ModelNormal): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """inline_object2.InlineObject2 - a model defined in OpenAPI Keyword Args: @@ -149,6 +152,22 @@ class InlineObject2(ModelNormal): enum_form_string (str): Form parameter enum test (string). [optional] if omitted the server will use the default value of '-efg' # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/inline_object3.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/inline_object3.py index 709c13c15fa..ff595ddaa1f 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/inline_object3.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/inline_object3.py @@ -18,6 +18,7 @@ import six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -100,6 +101,8 @@ class InlineObject3(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ @@ -160,7 +163,7 @@ class InlineObject3(ModelNormal): ]) @convert_js_args_to_python_args - def __init__(self, number, double, pattern_without_delimiter, byte, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, number, double, pattern_without_delimiter, byte, *args, **kwargs): # noqa: E501 """inline_object3.InlineObject3 - a model defined in OpenAPI Args: @@ -212,6 +215,22 @@ class InlineObject3(ModelNormal): callback (str): None. [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/inline_object4.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/inline_object4.py index 15384c01f46..a45a324fb51 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/inline_object4.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/inline_object4.py @@ -18,6 +18,7 @@ import six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -66,6 +67,8 @@ class InlineObject4(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ @@ -102,7 +105,7 @@ class InlineObject4(ModelNormal): ]) @convert_js_args_to_python_args - def __init__(self, param, param2, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, param, param2, *args, **kwargs): # noqa: E501 """inline_object4.InlineObject4 - a model defined in OpenAPI Args: @@ -142,6 +145,22 @@ class InlineObject4(ModelNormal): _visited_composed_classes = (Animal,) """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/inline_object5.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/inline_object5.py index c354b73a4d2..23e08195832 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/inline_object5.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/inline_object5.py @@ -18,6 +18,7 @@ import six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -66,6 +67,8 @@ class InlineObject5(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ @@ -102,7 +105,7 @@ class InlineObject5(ModelNormal): ]) @convert_js_args_to_python_args - def __init__(self, required_file, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, required_file, *args, **kwargs): # noqa: E501 """inline_object5.InlineObject5 - a model defined in OpenAPI Args: @@ -142,6 +145,22 @@ class InlineObject5(ModelNormal): additional_metadata (str): Additional data to pass to server. [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/inline_response_default.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/inline_response_default.py index e564a35cc02..577dbfeb851 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/inline_response_default.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/inline_response_default.py @@ -18,6 +18,7 @@ import six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -71,6 +72,8 @@ class InlineResponseDefault(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ @@ -105,7 +108,7 @@ class InlineResponseDefault(ModelNormal): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """inline_response_default.InlineResponseDefault - a model defined in OpenAPI Keyword Args: @@ -142,6 +145,22 @@ class InlineResponseDefault(ModelNormal): string (foo.Foo): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/isosceles_triangle.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/isosceles_triangle.py index 63d8262173e..ea5607fdfd9 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/isosceles_triangle.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/isosceles_triangle.py @@ -18,6 +18,7 @@ import six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -76,6 +77,8 @@ class IsoscelesTriangle(ModelComposed): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ @@ -113,7 +116,7 @@ class IsoscelesTriangle(ModelComposed): ]) @convert_js_args_to_python_args - def __init__(self, shape_type, triangle_type, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, shape_type, triangle_type, *args, **kwargs): # noqa: E501 """isosceles_triangle.IsoscelesTriangle - a model defined in OpenAPI Args: @@ -153,6 +156,22 @@ class IsoscelesTriangle(ModelComposed): _visited_composed_classes = (Animal,) """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/list.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/list.py index 93acc4dd8de..9499f26c7b1 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/list.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/list.py @@ -18,6 +18,7 @@ import six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -66,6 +67,8 @@ class List(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ @@ -100,7 +103,7 @@ class List(ModelNormal): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """list.List - a model defined in OpenAPI Keyword Args: @@ -137,6 +140,22 @@ class List(ModelNormal): _123_list (str): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/mammal.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/mammal.py index b0e681737a9..44f3e402c98 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/mammal.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/mammal.py @@ -18,6 +18,7 @@ import six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -32,6 +33,11 @@ from petstore_api.model_utils import ( # noqa: F401 str, validate_get_composed_info, ) +try: + from petstore_api.models import pig +except ImportError: + pig = sys.modules[ + 'petstore_api.models.pig'] try: from petstore_api.models import whale except ImportError: @@ -79,7 +85,9 @@ class Mammal(ModelComposed): validations = { } - additional_properties_type = None + additional_properties_type = (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False @cached_property def openapi_types(): @@ -101,6 +109,7 @@ class Mammal(ModelComposed): @cached_property def discriminator(): val = { + 'Pig': pig.Pig, 'whale': whale.Whale, 'zebra': zebra.Zebra, } @@ -128,7 +137,7 @@ class Mammal(ModelComposed): ]) @convert_js_args_to_python_args - def __init__(self, class_name, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, class_name, *args, **kwargs): # noqa: E501 """mammal.Mammal - a model defined in OpenAPI Args: @@ -170,6 +179,22 @@ class Mammal(ModelComposed): type (str): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming @@ -228,6 +253,7 @@ class Mammal(ModelComposed): 'allOf': [ ], 'oneOf': [ + pig.Pig, whale.Whale, zebra.Zebra, ], diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/map_test.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/map_test.py index 1d58629e43b..45be8a1fecf 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/map_test.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/map_test.py @@ -18,6 +18,7 @@ import six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -75,6 +76,8 @@ class MapTest(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ @@ -115,7 +118,7 @@ class MapTest(ModelNormal): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """map_test.MapTest - a model defined in OpenAPI Keyword Args: @@ -155,6 +158,22 @@ class MapTest(ModelNormal): indirect_map (string_boolean_map.StringBooleanMap): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/mixed_properties_and_additional_properties_class.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/mixed_properties_and_additional_properties_class.py index bbae3d50a07..0e584ebd43e 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/mixed_properties_and_additional_properties_class.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/mixed_properties_and_additional_properties_class.py @@ -18,6 +18,7 @@ import six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -71,6 +72,8 @@ class MixedPropertiesAndAdditionalPropertiesClass(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ @@ -109,7 +112,7 @@ class MixedPropertiesAndAdditionalPropertiesClass(ModelNormal): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """mixed_properties_and_additional_properties_class.MixedPropertiesAndAdditionalPropertiesClass - a model defined in OpenAPI Keyword Args: @@ -148,6 +151,22 @@ class MixedPropertiesAndAdditionalPropertiesClass(ModelNormal): map ({str: (animal.Animal,)}): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/model200_response.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/model200_response.py index bbbe72bd1ce..54cc1fa338d 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/model200_response.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/model200_response.py @@ -18,6 +18,7 @@ import six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -66,6 +67,8 @@ class Model200Response(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ @@ -102,7 +105,7 @@ class Model200Response(ModelNormal): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """model200_response.Model200Response - a model defined in OpenAPI Keyword Args: @@ -140,6 +143,22 @@ class Model200Response(ModelNormal): _class (str): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/model_return.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/model_return.py index 80a187b13fb..cf7415f0bd7 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/model_return.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/model_return.py @@ -18,6 +18,7 @@ import six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -66,6 +67,8 @@ class ModelReturn(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ @@ -100,7 +103,7 @@ class ModelReturn(ModelNormal): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """model_return.ModelReturn - a model defined in OpenAPI Keyword Args: @@ -137,6 +140,22 @@ class ModelReturn(ModelNormal): _return (int): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/name.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/name.py index 96d4ffd69f8..33a95baafcf 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/name.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/name.py @@ -18,6 +18,7 @@ import six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -66,6 +67,8 @@ class Name(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ @@ -106,7 +109,7 @@ class Name(ModelNormal): ]) @convert_js_args_to_python_args - def __init__(self, name, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, name, *args, **kwargs): # noqa: E501 """name.Name - a model defined in OpenAPI Args: @@ -148,6 +151,22 @@ class Name(ModelNormal): _123_number (int): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/nullable_class.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/nullable_class.py index da001283440..c16714bd32f 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/nullable_class.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/nullable_class.py @@ -18,6 +18,7 @@ import six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -64,7 +65,9 @@ class NullableClass(ModelNormal): validations = { } - additional_properties_type = (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + additional_properties_type = ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type,) # noqa: E501 + + _nullable = False @cached_property def openapi_types(): @@ -83,12 +86,12 @@ class NullableClass(ModelNormal): 'string_prop': (str, none_type,), # noqa: E501 'date_prop': (date, none_type,), # noqa: E501 'datetime_prop': (datetime, none_type,), # noqa: E501 - 'array_nullable_prop': ([bool, date, datetime, dict, float, int, list, str], none_type,), # noqa: E501 - 'array_and_items_nullable_prop': ([bool, date, datetime, dict, float, int, list, str, none_type], none_type,), # noqa: E501 - 'array_items_nullable': ([bool, date, datetime, dict, float, int, list, str, none_type],), # noqa: E501 - 'object_nullable_prop': ({str: (bool, date, datetime, dict, float, int, list, str,)}, none_type,), # noqa: E501 - 'object_and_items_nullable_prop': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type,), # noqa: E501 - 'object_items_nullable': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 + 'array_nullable_prop': ([{str: (bool, date, datetime, dict, float, int, list, str, none_type)}], none_type,), # noqa: E501 + 'array_and_items_nullable_prop': ([{str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type], none_type,), # noqa: E501 + 'array_items_nullable': ([{str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type],), # noqa: E501 + 'object_nullable_prop': ({str: ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},)}, none_type,), # noqa: E501 + 'object_and_items_nullable_prop': ({str: ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type)}, none_type,), # noqa: E501 + 'object_items_nullable': ({str: ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type)},), # noqa: E501 } @cached_property @@ -122,7 +125,7 @@ class NullableClass(ModelNormal): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """nullable_class.NullableClass - a model defined in OpenAPI Keyword Args: @@ -162,14 +165,30 @@ class NullableClass(ModelNormal): string_prop (str, none_type): [optional] # noqa: E501 date_prop (date, none_type): [optional] # noqa: E501 datetime_prop (datetime, none_type): [optional] # noqa: E501 - array_nullable_prop ([bool, date, datetime, dict, float, int, list, str], none_type): [optional] # noqa: E501 - array_and_items_nullable_prop ([bool, date, datetime, dict, float, int, list, str, none_type], none_type): [optional] # noqa: E501 - array_items_nullable ([bool, date, datetime, dict, float, int, list, str, none_type]): [optional] # noqa: E501 - object_nullable_prop ({str: (bool, date, datetime, dict, float, int, list, str,)}, none_type): [optional] # noqa: E501 - object_and_items_nullable_prop ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): [optional] # noqa: E501 - object_items_nullable ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): [optional] # noqa: E501 + array_nullable_prop ([{str: (bool, date, datetime, dict, float, int, list, str, none_type)}], none_type): [optional] # noqa: E501 + array_and_items_nullable_prop ([{str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type], none_type): [optional] # noqa: E501 + array_items_nullable ([{str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type]): [optional] # noqa: E501 + object_nullable_prop ({str: ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},)}, none_type): [optional] # noqa: E501 + object_and_items_nullable_prop ({str: ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type)}, none_type): [optional] # noqa: E501 + object_items_nullable ({str: ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type)}): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/nullable_shape.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/nullable_shape.py index fe7e2e97931..e62a3881c52 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/nullable_shape.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/nullable_shape.py @@ -18,6 +18,7 @@ import six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -74,7 +75,9 @@ class NullableShape(ModelComposed): validations = { } - additional_properties_type = None + additional_properties_type = (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = True @cached_property def openapi_types(): @@ -121,7 +124,7 @@ class NullableShape(ModelComposed): ]) @convert_js_args_to_python_args - def __init__(self, shape_type, quadrilateral_type=nulltype.Null, triangle_type=nulltype.Null, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, shape_type, *args, **kwargs): # noqa: E501 """nullable_shape.NullableShape - a model defined in OpenAPI Args: @@ -162,6 +165,24 @@ class NullableShape(ModelComposed): _visited_composed_classes = (Animal,) """ + quadrilateral_type = kwargs.get('quadrilateral_type', nulltype.Null) + triangle_type = kwargs.get('triangle_type', nulltype.Null) + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/number_only.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/number_only.py index 5e84c5a16f4..305da1d7538 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/number_only.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/number_only.py @@ -18,6 +18,7 @@ import six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -66,6 +67,8 @@ class NumberOnly(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ @@ -100,7 +103,7 @@ class NumberOnly(ModelNormal): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """number_only.NumberOnly - a model defined in OpenAPI Keyword Args: @@ -137,6 +140,22 @@ class NumberOnly(ModelNormal): just_number (float): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/order.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/order.py index 535fe7cd996..ddc3332d66d 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/order.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/order.py @@ -18,6 +18,7 @@ import six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -71,6 +72,8 @@ class Order(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ @@ -115,7 +118,7 @@ class Order(ModelNormal): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """order.Order - a model defined in OpenAPI Keyword Args: @@ -157,6 +160,22 @@ class Order(ModelNormal): complete (bool): [optional] if omitted the server will use the default value of False # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/outer_composite.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/outer_composite.py index fc2b2dd1736..0011802050d 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/outer_composite.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/outer_composite.py @@ -18,6 +18,7 @@ import six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -66,6 +67,8 @@ class OuterComposite(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ @@ -104,7 +107,7 @@ class OuterComposite(ModelNormal): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """outer_composite.OuterComposite - a model defined in OpenAPI Keyword Args: @@ -143,6 +146,22 @@ class OuterComposite(ModelNormal): my_boolean (bool): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/outer_enum.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/outer_enum.py index 58c7c3b5d72..64311e83836 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/outer_enum.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/outer_enum.py @@ -18,6 +18,7 @@ import six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -68,6 +69,8 @@ class OuterEnum(ModelSimple): additional_properties_type = None + _nullable = True + @cached_property def openapi_types(): """ @@ -98,7 +101,7 @@ class OuterEnum(ModelSimple): ]) @convert_js_args_to_python_args - def __init__(self, value, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, value, *args, **kwargs): # noqa: E501 """outer_enum.OuterEnum - a model defined in OpenAPI Args: @@ -137,6 +140,22 @@ class OuterEnum(ModelSimple): _visited_composed_classes = (Animal,) """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/outer_enum_default_value.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/outer_enum_default_value.py index 198740fdb9c..b53b330bbaf 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/outer_enum_default_value.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/outer_enum_default_value.py @@ -18,6 +18,7 @@ import six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -67,6 +68,8 @@ class OuterEnumDefaultValue(ModelSimple): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ @@ -97,7 +100,7 @@ class OuterEnumDefaultValue(ModelSimple): ]) @convert_js_args_to_python_args - def __init__(self, value='placed', _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """outer_enum_default_value.OuterEnumDefaultValue - a model defined in OpenAPI Args: @@ -136,6 +139,23 @@ class OuterEnumDefaultValue(ModelSimple): _visited_composed_classes = (Animal,) """ + value = kwargs.get('value', 'placed') + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/outer_enum_integer.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/outer_enum_integer.py index 86292ab185a..71d192b54f1 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/outer_enum_integer.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/outer_enum_integer.py @@ -18,6 +18,7 @@ import six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -67,6 +68,8 @@ class OuterEnumInteger(ModelSimple): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ @@ -97,7 +100,7 @@ class OuterEnumInteger(ModelSimple): ]) @convert_js_args_to_python_args - def __init__(self, value, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, value, *args, **kwargs): # noqa: E501 """outer_enum_integer.OuterEnumInteger - a model defined in OpenAPI Args: @@ -136,6 +139,22 @@ class OuterEnumInteger(ModelSimple): _visited_composed_classes = (Animal,) """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/outer_enum_integer_default_value.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/outer_enum_integer_default_value.py index da9f8a73f9b..2deaeae1932 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/outer_enum_integer_default_value.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/outer_enum_integer_default_value.py @@ -18,6 +18,7 @@ import six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -67,6 +68,8 @@ class OuterEnumIntegerDefaultValue(ModelSimple): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ @@ -97,7 +100,7 @@ class OuterEnumIntegerDefaultValue(ModelSimple): ]) @convert_js_args_to_python_args - def __init__(self, value=0, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """outer_enum_integer_default_value.OuterEnumIntegerDefaultValue - a model defined in OpenAPI Args: @@ -136,6 +139,23 @@ class OuterEnumIntegerDefaultValue(ModelSimple): _visited_composed_classes = (Animal,) """ + value = kwargs.get('value', 0) + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/biology_primate.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/parent_pet.py similarity index 83% rename from samples/openapi3/client/petstore/python-experimental/petstore_api/models/biology_primate.py rename to samples/openapi3/client/petstore/python-experimental/petstore_api/models/parent_pet.py index b643a3c9001..89633120977 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/biology_primate.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/parent_pet.py @@ -18,6 +18,7 @@ import six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -33,18 +34,18 @@ from petstore_api.model_utils import ( # noqa: F401 validate_get_composed_info, ) try: - from petstore_api.models import biology_hominid + from petstore_api.models import child_cat except ImportError: - biology_hominid = sys.modules[ - 'petstore_api.models.biology_hominid'] + child_cat = sys.modules[ + 'petstore_api.models.child_cat'] try: - from petstore_api.models import biology_mammal + from petstore_api.models import grandparent_animal except ImportError: - biology_mammal = sys.modules[ - 'petstore_api.models.biology_mammal'] + grandparent_animal = sys.modules[ + 'petstore_api.models.grandparent_animal'] -class BiologyPrimate(ModelComposed): +class ParentPet(ModelComposed): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -74,7 +75,9 @@ class BiologyPrimate(ModelComposed): validations = { } - additional_properties_type = None + additional_properties_type = (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False @cached_property def openapi_types(): @@ -87,20 +90,20 @@ class BiologyPrimate(ModelComposed): and the value is attribute type. """ return { - 'class_name': (str,), # noqa: E501 + 'pet_type': (str,), # noqa: E501 } @cached_property def discriminator(): val = { - 'biology.Hominid': biology_hominid.BiologyHominid, + 'ChildCat': child_cat.ChildCat, } if not val: return None - return {'class_name': val} + return {'pet_type': val} attribute_map = { - 'class_name': 'className', # noqa: E501 + 'pet_type': 'pet_type', # noqa: E501 } required_properties = set([ @@ -116,11 +119,11 @@ class BiologyPrimate(ModelComposed): ]) @convert_js_args_to_python_args - def __init__(self, class_name, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 - """biology_primate.BiologyPrimate - a model defined in OpenAPI + def __init__(self, pet_type, *args, **kwargs): # noqa: E501 + """parent_pet.ParentPet - a model defined in OpenAPI Args: - class_name (str): + pet_type (str): Keyword Args: _check_type (bool): if True, values for parameters in openapi_types @@ -155,6 +158,22 @@ class BiologyPrimate(ModelComposed): _visited_composed_classes = (Animal,) """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming @@ -170,7 +189,7 @@ class BiologyPrimate(ModelComposed): '_visited_composed_classes': self._visited_composed_classes, } required_args = { - 'class_name': class_name, + 'pet_type': pet_type, } # remove args whose value is Null because they are unset required_arg_names = list(required_args.keys()) @@ -211,7 +230,7 @@ class BiologyPrimate(ModelComposed): 'anyOf': [ ], 'allOf': [ - biology_mammal.BiologyMammal, + grandparent_animal.GrandparentAnimal, ], 'oneOf': [ ], diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/pet.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/pet.py index 7ca5ab6d224..c93acd53c96 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/pet.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/pet.py @@ -18,6 +18,7 @@ import six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -81,6 +82,8 @@ class Pet(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ @@ -125,7 +128,7 @@ class Pet(ModelNormal): ]) @convert_js_args_to_python_args - def __init__(self, name, photo_urls, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, name, photo_urls, *args, **kwargs): # noqa: E501 """pet.Pet - a model defined in OpenAPI Args: @@ -169,6 +172,22 @@ class Pet(ModelNormal): status (str): pet status in the store. [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/biology_mammal.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/pig.py similarity index 84% rename from samples/openapi3/client/petstore/python-experimental/petstore_api/models/biology_mammal.py rename to samples/openapi3/client/petstore/python-experimental/petstore_api/models/pig.py index 3aedd7f2b2a..5dd3fdb64ec 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/biology_mammal.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/pig.py @@ -18,6 +18,7 @@ import six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -33,23 +34,18 @@ from petstore_api.model_utils import ( # noqa: F401 validate_get_composed_info, ) try: - from petstore_api.models import biology_chordate + from petstore_api.models import basque_pig except ImportError: - biology_chordate = sys.modules[ - 'petstore_api.models.biology_chordate'] + basque_pig = sys.modules[ + 'petstore_api.models.basque_pig'] try: - from petstore_api.models import biology_hominid + from petstore_api.models import danish_pig except ImportError: - biology_hominid = sys.modules[ - 'petstore_api.models.biology_hominid'] -try: - from petstore_api.models import biology_primate -except ImportError: - biology_primate = sys.modules[ - 'petstore_api.models.biology_primate'] + danish_pig = sys.modules[ + 'petstore_api.models.danish_pig'] -class BiologyMammal(ModelComposed): +class Pig(ModelComposed): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -79,7 +75,9 @@ class BiologyMammal(ModelComposed): validations = { } - additional_properties_type = None + additional_properties_type = (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False @cached_property def openapi_types(): @@ -98,8 +96,8 @@ class BiologyMammal(ModelComposed): @cached_property def discriminator(): val = { - 'biology.Hominid': biology_hominid.BiologyHominid, - 'biology.Primate': biology_primate.BiologyPrimate, + 'BasquePig': basque_pig.BasquePig, + 'DanishPig': danish_pig.DanishPig, } if not val: return None @@ -122,8 +120,8 @@ class BiologyMammal(ModelComposed): ]) @convert_js_args_to_python_args - def __init__(self, class_name, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 - """biology_mammal.BiologyMammal - a model defined in OpenAPI + def __init__(self, class_name, *args, **kwargs): # noqa: E501 + """pig.Pig - a model defined in OpenAPI Args: class_name (str): @@ -161,6 +159,22 @@ class BiologyMammal(ModelComposed): _visited_composed_classes = (Animal,) """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming @@ -217,8 +231,9 @@ class BiologyMammal(ModelComposed): 'anyOf': [ ], 'allOf': [ - biology_chordate.BiologyChordate, ], 'oneOf': [ + basque_pig.BasquePig, + danish_pig.DanishPig, ], } diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/quadrilateral.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/quadrilateral.py index 344ecb14c4e..0f499406457 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/quadrilateral.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/quadrilateral.py @@ -18,6 +18,7 @@ import six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -74,7 +75,9 @@ class Quadrilateral(ModelComposed): validations = { } - additional_properties_type = None + additional_properties_type = (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False @cached_property def openapi_types(): @@ -119,7 +122,7 @@ class Quadrilateral(ModelComposed): ]) @convert_js_args_to_python_args - def __init__(self, quadrilateral_type, shape_type=nulltype.Null, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, quadrilateral_type, *args, **kwargs): # noqa: E501 """quadrilateral.Quadrilateral - a model defined in OpenAPI Args: @@ -159,6 +162,23 @@ class Quadrilateral(ModelComposed): _visited_composed_classes = (Animal,) """ + shape_type = kwargs.get('shape_type', nulltype.Null) + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/quadrilateral_interface.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/quadrilateral_interface.py index ad6748b31a0..05e4d0f3b16 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/quadrilateral_interface.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/quadrilateral_interface.py @@ -18,6 +18,7 @@ import six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -66,6 +67,8 @@ class QuadrilateralInterface(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ @@ -100,7 +103,7 @@ class QuadrilateralInterface(ModelNormal): ]) @convert_js_args_to_python_args - def __init__(self, quadrilateral_type, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, quadrilateral_type, *args, **kwargs): # noqa: E501 """quadrilateral_interface.QuadrilateralInterface - a model defined in OpenAPI Args: @@ -139,6 +142,22 @@ class QuadrilateralInterface(ModelNormal): _visited_composed_classes = (Animal,) """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/read_only_first.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/read_only_first.py index d5f4f1bfba4..691d789a92e 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/read_only_first.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/read_only_first.py @@ -18,6 +18,7 @@ import six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -66,6 +67,8 @@ class ReadOnlyFirst(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ @@ -102,7 +105,7 @@ class ReadOnlyFirst(ModelNormal): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """read_only_first.ReadOnlyFirst - a model defined in OpenAPI Keyword Args: @@ -140,6 +143,22 @@ class ReadOnlyFirst(ModelNormal): baz (str): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/scalene_triangle.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/scalene_triangle.py index 21ce8ff78ca..6350bdea3bc 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/scalene_triangle.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/scalene_triangle.py @@ -18,6 +18,7 @@ import six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -74,7 +75,9 @@ class ScaleneTriangle(ModelComposed): validations = { } - additional_properties_type = None + additional_properties_type = (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False @cached_property def openapi_types(): @@ -113,7 +116,7 @@ class ScaleneTriangle(ModelComposed): ]) @convert_js_args_to_python_args - def __init__(self, shape_type, triangle_type, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, shape_type, triangle_type, *args, **kwargs): # noqa: E501 """scalene_triangle.ScaleneTriangle - a model defined in OpenAPI Args: @@ -153,6 +156,22 @@ class ScaleneTriangle(ModelComposed): _visited_composed_classes = (Animal,) """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/shape.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/shape.py index 5e41bcc9356..ef83ed3a31b 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/shape.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/shape.py @@ -18,6 +18,7 @@ import six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -74,7 +75,9 @@ class Shape(ModelComposed): validations = { } - additional_properties_type = None + additional_properties_type = (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False @cached_property def openapi_types(): @@ -121,7 +124,7 @@ class Shape(ModelComposed): ]) @convert_js_args_to_python_args - def __init__(self, shape_type, quadrilateral_type=nulltype.Null, triangle_type=nulltype.Null, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, shape_type, *args, **kwargs): # noqa: E501 """shape.Shape - a model defined in OpenAPI Args: @@ -162,6 +165,24 @@ class Shape(ModelComposed): _visited_composed_classes = (Animal,) """ + quadrilateral_type = kwargs.get('quadrilateral_type', nulltype.Null) + triangle_type = kwargs.get('triangle_type', nulltype.Null) + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/shape_interface.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/shape_interface.py index 037fe026e18..1f3d518ba3e 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/shape_interface.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/shape_interface.py @@ -18,6 +18,7 @@ import six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -66,6 +67,8 @@ class ShapeInterface(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ @@ -100,7 +103,7 @@ class ShapeInterface(ModelNormal): ]) @convert_js_args_to_python_args - def __init__(self, shape_type, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, shape_type, *args, **kwargs): # noqa: E501 """shape_interface.ShapeInterface - a model defined in OpenAPI Args: @@ -139,6 +142,22 @@ class ShapeInterface(ModelNormal): _visited_composed_classes = (Animal,) """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/shape_or_null.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/shape_or_null.py index f4dd928a060..53043fdd60c 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/shape_or_null.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/shape_or_null.py @@ -18,6 +18,7 @@ import six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -74,7 +75,9 @@ class ShapeOrNull(ModelComposed): validations = { } - additional_properties_type = None + additional_properties_type = (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False @cached_property def openapi_types(): @@ -121,7 +124,7 @@ class ShapeOrNull(ModelComposed): ]) @convert_js_args_to_python_args - def __init__(self, shape_type, quadrilateral_type=nulltype.Null, triangle_type=nulltype.Null, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, shape_type, *args, **kwargs): # noqa: E501 """shape_or_null.ShapeOrNull - a model defined in OpenAPI Args: @@ -162,6 +165,24 @@ class ShapeOrNull(ModelComposed): _visited_composed_classes = (Animal,) """ + quadrilateral_type = kwargs.get('quadrilateral_type', nulltype.Null) + triangle_type = kwargs.get('triangle_type', nulltype.Null) + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/simple_quadrilateral.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/simple_quadrilateral.py index c368a854b31..8d8cf85fca1 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/simple_quadrilateral.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/simple_quadrilateral.py @@ -18,6 +18,7 @@ import six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -74,7 +75,9 @@ class SimpleQuadrilateral(ModelComposed): validations = { } - additional_properties_type = None + additional_properties_type = (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False @cached_property def openapi_types(): @@ -113,7 +116,7 @@ class SimpleQuadrilateral(ModelComposed): ]) @convert_js_args_to_python_args - def __init__(self, shape_type, quadrilateral_type, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, shape_type, quadrilateral_type, *args, **kwargs): # noqa: E501 """simple_quadrilateral.SimpleQuadrilateral - a model defined in OpenAPI Args: @@ -153,6 +156,22 @@ class SimpleQuadrilateral(ModelComposed): _visited_composed_classes = (Animal,) """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/special_model_name.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/special_model_name.py index 0f168298d2a..6e2b80cbe90 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/special_model_name.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/special_model_name.py @@ -18,6 +18,7 @@ import six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -66,6 +67,8 @@ class SpecialModelName(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ @@ -100,7 +103,7 @@ class SpecialModelName(ModelNormal): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """special_model_name.SpecialModelName - a model defined in OpenAPI Keyword Args: @@ -137,6 +140,22 @@ class SpecialModelName(ModelNormal): special_property_name (int): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/string_boolean_map.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/string_boolean_map.py index ba0938507be..8351ad04e2d 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/string_boolean_map.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/string_boolean_map.py @@ -18,6 +18,7 @@ import six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -66,6 +67,8 @@ class StringBooleanMap(ModelNormal): additional_properties_type = (bool,) # noqa: E501 + _nullable = False + @cached_property def openapi_types(): """ @@ -98,7 +101,7 @@ class StringBooleanMap(ModelNormal): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """string_boolean_map.StringBooleanMap - a model defined in OpenAPI Keyword Args: @@ -134,6 +137,22 @@ class StringBooleanMap(ModelNormal): _visited_composed_classes = (Animal,) """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/tag.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/tag.py index eb62f13dbe2..aa50402b7f9 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/tag.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/tag.py @@ -18,6 +18,7 @@ import six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -66,6 +67,8 @@ class Tag(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ @@ -102,7 +105,7 @@ class Tag(ModelNormal): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """tag.Tag - a model defined in OpenAPI Keyword Args: @@ -140,6 +143,22 @@ class Tag(ModelNormal): name (str): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/triangle.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/triangle.py index 68d3fa15152..27b8ae12273 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/triangle.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/triangle.py @@ -18,6 +18,7 @@ import six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -79,7 +80,9 @@ class Triangle(ModelComposed): validations = { } - additional_properties_type = None + additional_properties_type = (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False @cached_property def openapi_types(): @@ -125,7 +128,7 @@ class Triangle(ModelComposed): ]) @convert_js_args_to_python_args - def __init__(self, triangle_type, shape_type=nulltype.Null, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, triangle_type, *args, **kwargs): # noqa: E501 """triangle.Triangle - a model defined in OpenAPI Args: @@ -165,6 +168,23 @@ class Triangle(ModelComposed): _visited_composed_classes = (Animal,) """ + shape_type = kwargs.get('shape_type', nulltype.Null) + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/triangle_interface.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/triangle_interface.py index 5fb969a64be..56d960a1338 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/triangle_interface.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/triangle_interface.py @@ -18,6 +18,7 @@ import six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -66,6 +67,8 @@ class TriangleInterface(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ @@ -100,7 +103,7 @@ class TriangleInterface(ModelNormal): ]) @convert_js_args_to_python_args - def __init__(self, triangle_type, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, triangle_type, *args, **kwargs): # noqa: E501 """triangle_interface.TriangleInterface - a model defined in OpenAPI Args: @@ -139,6 +142,22 @@ class TriangleInterface(ModelNormal): _visited_composed_classes = (Animal,) """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/user.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/user.py index 01f08a6776a..836e7f9c0b5 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/user.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/user.py @@ -18,6 +18,7 @@ import six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -66,6 +67,8 @@ class User(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ @@ -85,8 +88,8 @@ class User(ModelNormal): 'password': (str,), # noqa: E501 'phone': (str,), # noqa: E501 'user_status': (int,), # noqa: E501 - 'object_with_no_declared_props': (bool, date, datetime, dict, float, int, list, str,), # noqa: E501 - 'object_with_no_declared_props_nullable': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501 + 'object_with_no_declared_props': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 + 'object_with_no_declared_props_nullable': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type,), # noqa: E501 'any_type_prop': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501 'any_type_prop_nullable': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501 } @@ -122,7 +125,7 @@ class User(ModelNormal): ]) @convert_js_args_to_python_args - def __init__(self, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """user.User - a model defined in OpenAPI Keyword Args: @@ -164,12 +167,28 @@ class User(ModelNormal): password (str): [optional] # noqa: E501 phone (str): [optional] # noqa: E501 user_status (int): User Status. [optional] # noqa: E501 - object_with_no_declared_props (bool, date, datetime, dict, float, int, list, str): test code generation for objects Value must be a map of strings to values. It cannot be the 'null' value.. [optional] # noqa: E501 - object_with_no_declared_props_nullable (bool, date, datetime, dict, float, int, list, str, none_type): test code generation for nullable objects. Value must be a map of strings to values or the 'null' value.. [optional] # noqa: E501 + object_with_no_declared_props ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): test code generation for objects Value must be a map of strings to values. It cannot be the 'null' value.. [optional] # noqa: E501 + object_with_no_declared_props_nullable ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): test code generation for nullable objects. Value must be a map of strings to values or the 'null' value.. [optional] # noqa: E501 any_type_prop (bool, date, datetime, dict, float, int, list, str, none_type): test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. See https://github.com/OAI/OpenAPI-Specification/issues/1389. [optional] # noqa: E501 any_type_prop_nullable (bool, date, datetime, dict, float, int, list, str, none_type): test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. The 'nullable' attribute does not change the allowed values.. [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/whale.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/whale.py index f39c2817440..eb066c53be5 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/whale.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/whale.py @@ -18,6 +18,7 @@ import six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -66,6 +67,8 @@ class Whale(ModelNormal): additional_properties_type = None + _nullable = False + @cached_property def openapi_types(): """ @@ -104,7 +107,7 @@ class Whale(ModelNormal): ]) @convert_js_args_to_python_args - def __init__(self, class_name, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, class_name, *args, **kwargs): # noqa: E501 """whale.Whale - a model defined in OpenAPI Args: @@ -145,6 +148,22 @@ class Whale(ModelNormal): has_teeth (bool): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/zebra.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/zebra.py index 7dd5f1ab35f..e4c2b8d422b 100644 --- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/zebra.py +++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/zebra.py @@ -18,6 +18,7 @@ import six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -69,7 +70,9 @@ class Zebra(ModelNormal): validations = { } - additional_properties_type = None + additional_properties_type = (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False @cached_property def openapi_types(): @@ -107,7 +110,7 @@ class Zebra(ModelNormal): ]) @convert_js_args_to_python_args - def __init__(self, class_name, _check_type=True, _spec_property_naming=False, _path_to_item=(), _configuration=None, _visited_composed_classes=(), **kwargs): # noqa: E501 + def __init__(self, class_name, *args, **kwargs): # noqa: E501 """zebra.Zebra - a model defined in OpenAPI Args: @@ -147,6 +150,22 @@ class Zebra(ModelNormal): type (str): [optional] # noqa: E501 """ + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_biology_mammal.py b/samples/openapi3/client/petstore/python-experimental/test/test_basque_pig.py similarity index 74% rename from samples/openapi3/client/petstore/python-experimental/test/test_biology_mammal.py rename to samples/openapi3/client/petstore/python-experimental/test/test_basque_pig.py index f894d72ff57..46e9ff215dc 100644 --- a/samples/openapi3/client/petstore/python-experimental/test/test_biology_mammal.py +++ b/samples/openapi3/client/petstore/python-experimental/test/test_basque_pig.py @@ -17,8 +17,8 @@ import unittest import petstore_api -class TestBiologyMammal(unittest.TestCase): - """BiologyMammal unit test stubs""" +class TestBasquePig(unittest.TestCase): + """BasquePig unit test stubs""" def setUp(self): pass @@ -26,10 +26,10 @@ class TestBiologyMammal(unittest.TestCase): def tearDown(self): pass - def testBiologyMammal(self): - """Test BiologyMammal""" + def testBasquePig(self): + """Test BasquePig""" # FIXME: construct object with mandatory attributes with example values - # model = petstore_api.BiologyMammal() # noqa: E501 + # model = petstore_api.BasquePig() # noqa: E501 pass diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_biology_primate.py b/samples/openapi3/client/petstore/python-experimental/test/test_child_cat.py similarity index 74% rename from samples/openapi3/client/petstore/python-experimental/test/test_biology_primate.py rename to samples/openapi3/client/petstore/python-experimental/test/test_child_cat.py index e07b3e11c21..c42c3b583aa 100644 --- a/samples/openapi3/client/petstore/python-experimental/test/test_biology_primate.py +++ b/samples/openapi3/client/petstore/python-experimental/test/test_child_cat.py @@ -17,8 +17,8 @@ import unittest import petstore_api -class TestBiologyPrimate(unittest.TestCase): - """BiologyPrimate unit test stubs""" +class TestChildCat(unittest.TestCase): + """ChildCat unit test stubs""" def setUp(self): pass @@ -26,10 +26,10 @@ class TestBiologyPrimate(unittest.TestCase): def tearDown(self): pass - def testBiologyPrimate(self): - """Test BiologyPrimate""" + def testChildCat(self): + """Test ChildCat""" # FIXME: construct object with mandatory attributes with example values - # model = petstore_api.BiologyPrimate() # noqa: E501 + # model = petstore_api.ChildCat() # noqa: E501 pass diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_biology_reptile.py b/samples/openapi3/client/petstore/python-experimental/test/test_child_cat_all_of.py similarity index 74% rename from samples/openapi3/client/petstore/python-experimental/test/test_biology_reptile.py rename to samples/openapi3/client/petstore/python-experimental/test/test_child_cat_all_of.py index e29f0c9a724..3304a81a232 100644 --- a/samples/openapi3/client/petstore/python-experimental/test/test_biology_reptile.py +++ b/samples/openapi3/client/petstore/python-experimental/test/test_child_cat_all_of.py @@ -17,8 +17,8 @@ import unittest import petstore_api -class TestBiologyReptile(unittest.TestCase): - """BiologyReptile unit test stubs""" +class TestChildCatAllOf(unittest.TestCase): + """ChildCatAllOf unit test stubs""" def setUp(self): pass @@ -26,10 +26,10 @@ class TestBiologyReptile(unittest.TestCase): def tearDown(self): pass - def testBiologyReptile(self): - """Test BiologyReptile""" + def testChildCatAllOf(self): + """Test ChildCatAllOf""" # FIXME: construct object with mandatory attributes with example values - # model = petstore_api.BiologyReptile() # noqa: E501 + # model = petstore_api.ChildCatAllOf() # noqa: E501 pass diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_biology_hominid.py b/samples/openapi3/client/petstore/python-experimental/test/test_danish_pig.py similarity index 74% rename from samples/openapi3/client/petstore/python-experimental/test/test_biology_hominid.py rename to samples/openapi3/client/petstore/python-experimental/test/test_danish_pig.py index f50167a4e25..0cbe8f8c102 100644 --- a/samples/openapi3/client/petstore/python-experimental/test/test_biology_hominid.py +++ b/samples/openapi3/client/petstore/python-experimental/test/test_danish_pig.py @@ -17,8 +17,8 @@ import unittest import petstore_api -class TestBiologyHominid(unittest.TestCase): - """BiologyHominid unit test stubs""" +class TestDanishPig(unittest.TestCase): + """DanishPig unit test stubs""" def setUp(self): pass @@ -26,10 +26,10 @@ class TestBiologyHominid(unittest.TestCase): def tearDown(self): pass - def testBiologyHominid(self): - """Test BiologyHominid""" + def testDanishPig(self): + """Test DanishPig""" # FIXME: construct object with mandatory attributes with example values - # model = petstore_api.BiologyHominid() # noqa: E501 + # model = petstore_api.DanishPig() # noqa: E501 pass diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_fruit.py b/samples/openapi3/client/petstore/python-experimental/test/test_fruit.py index ee9799fc6d3..1172373b9e1 100644 --- a/samples/openapi3/client/petstore/python-experimental/test/test_fruit.py +++ b/samples/openapi3/client/petstore/python-experimental/test/test_fruit.py @@ -189,5 +189,23 @@ class TestFruit(unittest.TestCase): fruit._additional_properties_model_instances, [] ) + def testFruitNullValue(self): + # Since 'apple' is nullable, validate we can create an apple with the 'null' value. + apple = petstore_api.Apple(None) + self.assertIsNone(apple) + + # 'banana' is not nullable. + with self.assertRaises(petstore_api.ApiTypeError): + banana = petstore_api.Banana(None) + + # Since 'fruit' has oneOf 'apple', 'banana' and 'apple' is nullable, + # validate we can create a fruit with the 'null' value. + fruit = petstore_api.Fruit(None) + self.assertIsNone(fruit) + + # Redo the same thing, this time passing a null Apple to the Fruit constructor. + fruit = petstore_api.Fruit(petstore_api.Apple(None)) + self.assertIsNone(fruit) + if __name__ == '__main__': unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_biology_chordate.py b/samples/openapi3/client/petstore/python-experimental/test/test_grandparent_animal.py similarity index 72% rename from samples/openapi3/client/petstore/python-experimental/test/test_biology_chordate.py rename to samples/openapi3/client/petstore/python-experimental/test/test_grandparent_animal.py index 3839589b9c5..dc0d300cdae 100644 --- a/samples/openapi3/client/petstore/python-experimental/test/test_biology_chordate.py +++ b/samples/openapi3/client/petstore/python-experimental/test/test_grandparent_animal.py @@ -17,8 +17,8 @@ import unittest import petstore_api -class TestBiologyChordate(unittest.TestCase): - """BiologyChordate unit test stubs""" +class TestGrandparentAnimal(unittest.TestCase): + """GrandparentAnimal unit test stubs""" def setUp(self): pass @@ -26,10 +26,10 @@ class TestBiologyChordate(unittest.TestCase): def tearDown(self): pass - def testBiologyChordate(self): - """Test BiologyChordate""" + def testGrandparentAnimal(self): + """Test GrandparentAnimal""" # FIXME: construct object with mandatory attributes with example values - # model = petstore_api.BiologyChordate() # noqa: E501 + # model = petstore_api.GrandparentAnimal() # noqa: E501 pass diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_mammal.py b/samples/openapi3/client/petstore/python-experimental/test/test_mammal.py index 1b4f161196e..cc783f53ed6 100644 --- a/samples/openapi3/client/petstore/python-experimental/test/test_mammal.py +++ b/samples/openapi3/client/petstore/python-experimental/test/test_mammal.py @@ -28,9 +28,10 @@ class TestMammal(unittest.TestCase): def testMammal(self): """Test Mammal""" - # FIXME: construct object with mandatory attributes with example values - # model = petstore_api.Mammal() # noqa: E501 - pass + + # tests that we can make a BasquePig by traveling through descendant discriminator in Pig + model = petstore_api.Mammal(class_name="BasquePig") + assert isinstance(model, petstore_api.BasquePig) if __name__ == '__main__': diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_outer_enum.py b/samples/openapi3/client/petstore/python-experimental/test/test_outer_enum.py index ad8f7cc68b2..fbb8cb7ad5c 100644 --- a/samples/openapi3/client/petstore/python-experimental/test/test_outer_enum.py +++ b/samples/openapi3/client/petstore/python-experimental/test/test_outer_enum.py @@ -28,9 +28,17 @@ class TestOuterEnum(unittest.TestCase): def testOuterEnum(self): """Test OuterEnum""" - # FIXME: construct object with mandatory attributes with example values - # model = petstore_api.OuterEnum() # noqa: E501 - pass + # Since 'OuterEnum' is nullable, validate the null value can be assigned + # to OuterEnum. + inst = petstore_api.OuterEnum(None) + self.assertIsNone(inst) + + inst = petstore_api.OuterEnum('approved') + assert isinstance(inst, petstore_api.OuterEnum) + + with self.assertRaises(petstore_api.ApiValueError): + inst = petstore_api.OuterEnum('garbage') + assert isinstance(inst, petstore_api.OuterEnum) if __name__ == '__main__': diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_parent_pet.py b/samples/openapi3/client/petstore/python-experimental/test/test_parent_pet.py new file mode 100644 index 00000000000..8db04124d66 --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/test/test_parent_pet.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + 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: \" \\ # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest + +import petstore_api + + +class TestParentPet(unittest.TestCase): + """ParentPet unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testParentPet(self): + """Test ParentPet""" + + # test that we can make a ParentPet from a ParentPet + # which requires that we travel back through ParentPet's allOf descendant + # GrandparentAnimal, and we use the descendant's discriminator to make ParentPet + model = petstore_api.ParentPet(pet_type="ParentPet") + assert isinstance(model, petstore_api.ParentPet) + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_pig.py b/samples/openapi3/client/petstore/python-experimental/test/test_pig.py new file mode 100644 index 00000000000..afdd210da7d --- /dev/null +++ b/samples/openapi3/client/petstore/python-experimental/test/test_pig.py @@ -0,0 +1,37 @@ +# coding: utf-8 + +""" + 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: \" \\ # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest + +import petstore_api + + +class TestPig(unittest.TestCase): + """Pig unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testPig(self): + """Test Pig""" + # FIXME: construct object with mandatory attributes with example values + # model = petstore_api.Pig() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python-experimental/tests/test_chordates.py b/samples/openapi3/client/petstore/python-experimental/tests/test_chordates.py deleted file mode 100644 index 8ebb8c2cdd1..00000000000 --- a/samples/openapi3/client/petstore/python-experimental/tests/test_chordates.py +++ /dev/null @@ -1,67 +0,0 @@ -# coding: utf-8 - -""" -Run the tests. -$ pip install nose (optional) -$ cd OpenAPIPetstore-python -$ nosetests -v -""" - - -from __future__ import absolute_import - -import unittest - -import petstore_api - - -class TestChordates(unittest.TestCase): - - def setUp(self): - pass - - def tearDown(self): - pass - - def testChordateDeserializationAndDiscriminator(self): - """Test Chordates deserialization - It should be possible to create instances from anywhere - in the animal class hierarchy, as long as the discriminator - value is valid. Internally, the get_discriminator_class() - function may need to call itself recursively to traverse - the composed hierarchy. - These unit tests would not work if get_discriminator_class - did not call itself recursively. - """ - inst = petstore_api.BiologyChordate( - class_name="biology.Mammal", - ) - assert isinstance(inst, petstore_api.BiologyMammal) - - inst = petstore_api.BiologyChordate( - class_name="biology.Primate", - ) - assert isinstance(inst, petstore_api.BiologyPrimate) - - inst = petstore_api.BiologyChordate( - class_name="biology.Reptile", - ) - assert isinstance(inst, petstore_api.BiologyReptile) - - inst = petstore_api.BiologyChordate( - class_name="biology.Hominid", - ) - assert isinstance(inst, petstore_api.BiologyHominid) - - def testMammalDeserializationAndDiscriminator(self): - """Test Chordates deserialization""" - inst = petstore_api.BiologyMammal( - class_name="biology.Hominid", - ) - assert isinstance(inst, petstore_api.BiologyHominid) - - def testHominidDeserializationAndDiscriminator(self): - inst = petstore_api.BiologyHominid( - class_name="biology.Hominid", - ) - assert isinstance(inst, petstore_api.BiologyHominid) diff --git a/samples/openapi3/client/petstore/python-experimental/tests/test_deserialization.py b/samples/openapi3/client/petstore/python-experimental/tests/test_deserialization.py index 5c8f992364b..a34df342567 100644 --- a/samples/openapi3/client/petstore/python-experimental/tests/test_deserialization.py +++ b/samples/openapi3/client/petstore/python-experimental/tests/test_deserialization.py @@ -197,3 +197,93 @@ class DeserializationTests(unittest.TestCase): inst = petstore_api.FruitReq(None) self.assertIsNone(inst) + + def test_deserialize_with_additional_properties(self): + """ + Deserialize data with schemas that have the additionalProperties keyword. + Test conditions when additional properties are allowed, not allowed, have + specific types... + """ + + # Dog is allOf with two child schemas. + # The OAS document for Dog does not specify the 'additionalProperties' keyword, + # which means that by default, the Dog schema must allow undeclared properties. + # The additionalProperties keyword is used to control the handling of extra stuff, + # that is, properties whose names are not listed in the properties keyword. + # By default any additional properties are allowed. + data = { + 'className': 'Dog', + 'color': 'brown', + 'breed': 'golden retriever', + # Below are additional, undeclared properties. + 'group': 'Terrier Group', + 'size': 'medium', + } + response = MockResponse(data=json.dumps(data)) + deserialized = self.deserialize(response, (petstore_api.Dog,), True) + self.assertEqual(type(deserialized), petstore_api.Dog) + self.assertEqual(deserialized.class_name, 'Dog') + self.assertEqual(deserialized.breed, 'golden retriever') + + # The 'zebra' schema allows additional properties by explicitly setting + # additionalProperties: true. + # This is equivalent to 'additionalProperties' not being present. + data = { + 'class_name': 'zebra', + 'type': 'plains', + # Below are additional, undeclared properties + 'group': 'abc', + 'size': 3, + 'p1': True, + 'p2': [ 'a', 'b', 123], + } + response = MockResponse(data=json.dumps(data)) + deserialized = self.deserialize(response, (petstore_api.Mammal,), True) + self.assertEqual(type(deserialized), petstore_api.Zebra) + self.assertEqual(deserialized.class_name, 'zebra') + self.assertEqual(deserialized.type, 'plains') + self.assertEqual(deserialized.p1, True) + + # The 'bananaReq' schema disallows additional properties by explicitly setting + # additionalProperties: false + err_msg = ("{} has no attribute '{}' at ") + with self.assertRaisesRegexp( + petstore_api.exceptions.ApiAttributeError, + err_msg.format("BananaReq", "unknown-group") + ): + data = { + 'lengthCm': 21.2, + 'sweet': False, + # Below are additional, undeclared properties. They are not allowed, + # an exception must be raised. + 'unknown-group': 'abc', + } + response = MockResponse(data=json.dumps(data)) + deserialized = self.deserialize(response, (petstore_api.BananaReq,), True) + self.assertEqual(type(deserialized), petstore_api.BananaReq) + self.assertEqual(deserialized.lengthCm, 21) + self.assertEqual(deserialized.p1, True) + + def test_deserialize_with_additional_properties_and_reference(self): + """ + Deserialize data with schemas that has the additionalProperties keyword + and the schema is specified as a reference ($ref). + """ + data = { + 'main_shape': { + 'shape_type': 'Triangle', + 'triangle_type': 'EquilateralTriangle', + }, + 'shapes': [ + { + 'shape_type': 'Triangle', + 'triangle_type': 'IsoscelesTriangle', + }, + { + 'shape_type': 'Quadrilateral', + 'quadrilateral_type': 'ComplexQuadrilateral', + }, + ], + } + response = MockResponse(data=json.dumps(data)) + deserialized = self.deserialize(response, (petstore_api.Drawing,), True) diff --git a/samples/openapi3/client/petstore/python-experimental/tests/test_discard_unknown_properties.py b/samples/openapi3/client/petstore/python-experimental/tests/test_discard_unknown_properties.py index 769ee23937d..a85ae29c46e 100644 --- a/samples/openapi3/client/petstore/python-experimental/tests/test_discard_unknown_properties.py +++ b/samples/openapi3/client/petstore/python-experimental/tests/test_discard_unknown_properties.py @@ -36,51 +36,90 @@ MockResponse = namedtuple('MockResponse', 'data') class DiscardUnknownPropertiesTests(unittest.TestCase): - def test_deserialize_dog_do_not_discard_unknown_properties(self): - """ deserialize str, Dog) with unknown properties, strict validation is enabled """ + def test_deserialize_banana_req_do_not_discard_unknown_properties(self): + """ + deserialize bananaReq with unknown properties. + Strict validation is enabled. + Simple (non-composed) schema scenario. + """ config = Configuration(discard_unknown_keys=False) api_client = petstore_api.ApiClient(config) data = { - "class_name": "Dog", - "color": "black", - "breed": "husky", - "unknown_property": "a-value" + 'lengthCm': 21.3, + 'sweet': False, + # Below is an unknown property not explicitly declared in the OpenAPI document. + # It should not be in the payload because additional properties (undeclared) are + # not allowed in the bananaReq schema (additionalProperties: false). + 'unknown_property': 'a-value' + } + response = MockResponse(data=json.dumps(data)) + + # Deserializing with strict validation raises an exception because the 'unknown_property' + # is undeclared. + with self.assertRaises(petstore_api.exceptions.ApiAttributeError) as cm: + deserialized = api_client.deserialize(response, ((petstore_api.BananaReq),), True) + self.assertTrue(re.match("BananaReq has no attribute 'unknown_property' at.*", str(cm.exception)), + 'Exception message: {0}'.format(str(cm.exception))) + + + def test_deserialize_isosceles_triangle_do_not_discard_unknown_properties(self): + """ + deserialize IsoscelesTriangle with unknown properties. + Strict validation is enabled. + Composed schema scenario. + """ + config = Configuration(discard_unknown_keys=False) + api_client = petstore_api.ApiClient(config) + data = { + 'shape_type': 'Triangle', + 'triangle_type': 'EquilateralTriangle', + # Below is an unknown property not explicitly declared in the OpenAPI document. + # It should not be in the payload because additional properties (undeclared) are + # not allowed in the schema (additionalProperties: false). + 'unknown_property': 'a-value' } response = MockResponse(data=json.dumps(data)) # Deserializing with strict validation raises an exception because the 'unknown_property' # is undeclared. with self.assertRaises(petstore_api.ApiValueError) as cm: - deserialized = api_client.deserialize(response, ((petstore_api.Dog),), True) + deserialized = api_client.deserialize(response, ((petstore_api.IsoscelesTriangle),), True) self.assertTrue(re.match('.*Not all inputs were used.*unknown_property.*', str(cm.exception)), 'Exception message: {0}'.format(str(cm.exception))) - def test_deserialize_dog_discard_unknown_properties(self): - """ deserialize str, Dog) with unknown properties, discard unknown properties """ + + def test_deserialize_banana_req_discard_unknown_properties(self): + """ + Deserialize bananaReq with unknown properties. + Discard unknown properties. + """ config = Configuration(discard_unknown_keys=True) api_client = petstore_api.ApiClient(config) data = { - "class_name": "Dog", - "color": "black", - "breed": "husky", - "unknown_property": "a-value", - "more-unknown": [ - "a" + 'lengthCm': 21.3, + 'sweet': False, + # Below are additional (undeclared) properties not specified in the bananaReq schema. + 'unknown_property': 'a-value', + 'more-unknown': [ + 'a' ] } # The 'unknown_property' is undeclared, which would normally raise an exception, but # when discard_unknown_keys is set to True, the unknown properties are discarded. response = MockResponse(data=json.dumps(data)) - deserialized = api_client.deserialize(response, ((petstore_api.Dog),), True) - self.assertTrue(isinstance(deserialized, petstore_api.Dog)) + deserialized = api_client.deserialize(response, ((petstore_api.BananaReq),), True) + self.assertTrue(isinstance(deserialized, petstore_api.BananaReq)) # Check the 'unknown_property' and 'more-unknown' properties are not present in the # output. - self.assertIn("breed", deserialized.to_dict().keys()) + self.assertIn("length_cm", deserialized.to_dict().keys()) self.assertNotIn("unknown_property", deserialized.to_dict().keys()) self.assertNotIn("more-unknown", deserialized.to_dict().keys()) def test_deserialize_cat_do_not_discard_unknown_properties(self): - """ deserialize str, Cat) with unknown properties, strict validation is enabled """ + """ + Deserialize Cat with unknown properties. + Strict validation is enabled. + """ config = Configuration(discard_unknown_keys=False) api_client = petstore_api.ApiClient(config) data = { @@ -100,15 +139,18 @@ class DiscardUnknownPropertiesTests(unittest.TestCase): self.assertEqual(deserialized['color'], 'black') def test_deserialize_cat_discard_unknown_properties(self): - """ deserialize str, Cat) with unknown properties. + """ + Deserialize Cat with unknown properties. Request to discard unknown properties, but Cat is composed schema - with one inner schema that has 'additionalProperties' set to true. """ + with one inner schema that has 'additionalProperties' set to true. + """ config = Configuration(discard_unknown_keys=True) api_client = petstore_api.ApiClient(config) data = { "class_name": "Cat", "color": "black", "declawed": True, + # Below are additional (undeclared) properties. "my_additional_property": 123, } # The 'my_additional_property' is undeclared, but 'Cat' has a 'Address' type through diff --git a/samples/openapi3/client/petstore/scala-sttp/.openapi-generator-ignore b/samples/openapi3/client/petstore/scala-sttp/.openapi-generator-ignore deleted file mode 100644 index 7484ee590a3..00000000000 --- a/samples/openapi3/client/petstore/scala-sttp/.openapi-generator-ignore +++ /dev/null @@ -1,23 +0,0 @@ -# OpenAPI Generator Ignore -# Generated by openapi-generator https://github.com/openapitools/openapi-generator - -# Use this file to prevent files from being overwritten by the generator. -# The patterns follow closely to .gitignore or .dockerignore. - -# As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: -#ApiClient.cs - -# You can match any string of characters against a directory, file or extension with a single asterisk (*): -#foo/*/qux -# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux - -# You can recursively match patterns against a directory, file or extension with a double asterisk (**): -#foo/**/qux -# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux - -# You can also negate patterns with an exclamation (!). -# For example, you can ignore all files in a docs folder with the file extension .md: -#docs/*.md -# Then explicitly reverse the ignore rule for a single file: -#!docs/README.md diff --git a/samples/openapi3/client/petstore/scala-sttp/.openapi-generator/FILES b/samples/openapi3/client/petstore/scala-sttp/.openapi-generator/FILES deleted file mode 100644 index ffe27d28081..00000000000 --- a/samples/openapi3/client/petstore/scala-sttp/.openapi-generator/FILES +++ /dev/null @@ -1,17 +0,0 @@ -README.md -build.sbt -src/main/scala/org/openapitools/client/api/EnumsSerializers.scala -src/main/scala/org/openapitools/client/api/PetApi.scala -src/main/scala/org/openapitools/client/api/StoreApi.scala -src/main/scala/org/openapitools/client/api/UserApi.scala -src/main/scala/org/openapitools/client/core/ApiInvoker.scala -src/main/scala/org/openapitools/client/core/Serializers.scala -src/main/scala/org/openapitools/client/core/requests.scala -src/main/scala/org/openapitools/client/model/ApiResponse.scala -src/main/scala/org/openapitools/client/model/Category.scala -src/main/scala/org/openapitools/client/model/InlineObject.scala -src/main/scala/org/openapitools/client/model/InlineObject1.scala -src/main/scala/org/openapitools/client/model/Order.scala -src/main/scala/org/openapitools/client/model/Pet.scala -src/main/scala/org/openapitools/client/model/Tag.scala -src/main/scala/org/openapitools/client/model/User.scala diff --git a/samples/openapi3/client/petstore/scala-sttp/.openapi-generator/VERSION b/samples/openapi3/client/petstore/scala-sttp/.openapi-generator/VERSION deleted file mode 100644 index d99e7162d01..00000000000 --- a/samples/openapi3/client/petstore/scala-sttp/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -5.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/petstore/scala-sttp/README.md b/samples/openapi3/client/petstore/scala-sttp/README.md deleted file mode 100644 index 891ebf40fc0..00000000000 --- a/samples/openapi3/client/petstore/scala-sttp/README.md +++ /dev/null @@ -1,115 +0,0 @@ -# 'scala-sttp-petstore' - -OpenAPI Petstore -- API version: 1.0.0 - -This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. - - -*Automatically generated by the [OpenAPI Generator](https://openapi-generator.tech)* - -## Requirements - -Building the API client library requires: -1. Java 1.7+ -2. Maven/Gradle/SBT - -## Installation - -To install the API client library to your local Maven repository, simply execute: - -```shell -mvn clean install -``` - -To deploy it to a remote Maven repository instead, configure the settings of the repository and execute: - -```shell -mvn clean deploy -``` - -Refer to the [OSSRH Guide](http://central.sonatype.org/pages/ossrh-guide.html) for more information. - -### Maven users - -Add this dependency to your project's POM: - -```xml - - org.openapitools - 'scala-sttp-petstore' - 1.0.0 - compile - -``` - -### Gradle users - -Add this dependency to your project's build file: - -```groovy -compile "org.openapitools:'scala-sttp-petstore':1.0.0" -``` - -### SBT users - -```scala -libraryDependencies += "org.openapitools" % "'scala-sttp-petstore'" % "1.0.0" -``` - -## Getting Started - -## Documentation for API Endpoints - -All URIs are relative to *http://petstore.swagger.io/v2* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*PetApi* | **addPet** | **POST** /pet | Add a new pet to the store -*PetApi* | **deletePet** | **DELETE** /pet/${petId} | Deletes a pet -*PetApi* | **findPetsByStatus** | **GET** /pet/findByStatus | Finds Pets by status -*PetApi* | **findPetsByTags** | **GET** /pet/findByTags | Finds Pets by tags -*PetApi* | **getPetById** | **GET** /pet/${petId} | Find pet by ID -*PetApi* | **updatePet** | **PUT** /pet | Update an existing pet -*PetApi* | **updatePetWithForm** | **POST** /pet/${petId} | Updates a pet in the store with form data -*PetApi* | **uploadFile** | **POST** /pet/${petId}/uploadImage | uploads an image -*StoreApi* | **deleteOrder** | **DELETE** /store/order/${orderId} | Delete purchase order by ID -*StoreApi* | **getInventory** | **GET** /store/inventory | Returns pet inventories by status -*StoreApi* | **getOrderById** | **GET** /store/order/${orderId} | Find purchase order by ID -*StoreApi* | **placeOrder** | **POST** /store/order | Place an order for a pet -*UserApi* | **createUser** | **POST** /user | Create user -*UserApi* | **createUsersWithArrayInput** | **POST** /user/createWithArray | Creates list of users with given input array -*UserApi* | **createUsersWithListInput** | **POST** /user/createWithList | Creates list of users with given input array -*UserApi* | **deleteUser** | **DELETE** /user/${username} | Delete user -*UserApi* | **getUserByName** | **GET** /user/${username} | Get user by user name -*UserApi* | **loginUser** | **GET** /user/login | Logs user into the system -*UserApi* | **logoutUser** | **GET** /user/logout | Logs out current logged in user session -*UserApi* | **updateUser** | **PUT** /user/${username} | Updated user - - -## Documentation for Models - - - [ApiResponse](ApiResponse.md) - - [Category](Category.md) - - [InlineObject](InlineObject.md) - - [InlineObject1](InlineObject1.md) - - [Order](Order.md) - - [Pet](Pet.md) - - [Tag](Tag.md) - - [User](User.md) - - -## Documentation for Authorization - -Authentication schemes defined for the API: -### api_key - -- **Type**: API key -- **API key parameter name**: api_key -- **Location**: HTTP header - - -## Author - - - diff --git a/samples/openapi3/client/petstore/scala-sttp/build.sbt b/samples/openapi3/client/petstore/scala-sttp/build.sbt deleted file mode 100644 index 68b09b1d6dd..00000000000 --- a/samples/openapi3/client/petstore/scala-sttp/build.sbt +++ /dev/null @@ -1,24 +0,0 @@ -version := "1.0.0" -name := "'scala-sttp-petstore'" -organization := "org.openapitools" - -scalaVersion := "2.13.0" - -crossScalaVersions := Seq(scalaVersion.value, "2.12.10", "2.11.12") - -libraryDependencies ++= Seq( - "com.softwaremill.sttp.client" %% "core" % "2.0.0", - "com.softwaremill.sttp.client" %% "json4s" % "2.0.0", - "org.json4s" %% "json4s-jackson" % "3.6.7", - // test dependencies - "org.scalatest" %% "scalatest" % "3.0.8" % Test, - "junit" % "junit" % "4.13" % "test" -) - -scalacOptions := Seq( - "-unchecked", - "-deprecation", - "-feature" -) - -publishArtifact in (Compile, packageDoc) := false \ No newline at end of file diff --git a/samples/openapi3/client/petstore/scala-sttp/pom.xml b/samples/openapi3/client/petstore/scala-sttp/pom.xml deleted file mode 100644 index 6b6a83b21e2..00000000000 --- a/samples/openapi3/client/petstore/scala-sttp/pom.xml +++ /dev/null @@ -1,32 +0,0 @@ - - 4.0.0 - org.openapitools - scalaz-sttp-petstore-client - pom - 1.0-SNAPSHOT - scala-sttp-petstore-client - - - - org.codehaus.mojo - exec-maven-plugin - 1.5.0 - - - sbt-test - integration-test - - exec - - - sbt - - test - - - - - - - - diff --git a/samples/openapi3/client/petstore/scala-sttp/src/main/scala/org/openapitools/client/api/EnumsSerializers.scala b/samples/openapi3/client/petstore/scala-sttp/src/main/scala/org/openapitools/client/api/EnumsSerializers.scala deleted file mode 100644 index 71ad618e31f..00000000000 --- a/samples/openapi3/client/petstore/scala-sttp/src/main/scala/org/openapitools/client/api/EnumsSerializers.scala +++ /dev/null @@ -1,51 +0,0 @@ -/** - * 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. - * - * The version of the OpenAPI document: 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. - */ -package org.openapitools.client.api - -import org.openapitools.client.model._ -import org.json4s._ -import scala.reflect.ClassTag - -object EnumsSerializers { - - def all: Seq[Serializer[_]] = Seq[Serializer[_]]() :+ - new EnumNameSerializer(OrderEnums.Status) :+ - new EnumNameSerializer(PetEnums.Status) - - private class EnumNameSerializer[E <: Enumeration: ClassTag](enum: E) - extends Serializer[E#Value] { - import JsonDSL._ - - val EnumerationClass: Class[E#Value] = classOf[E#Value] - - def deserialize(implicit format: Formats): - PartialFunction[(TypeInfo, JValue), E#Value] = { - case (t @ TypeInfo(EnumerationClass, _), json) if isValid(json) => - json match { - case JString(value) => - enum.withName(value) - case value => - throw new MappingException(s"Can't convert $value to $EnumerationClass") - } - } - - private[this] def isValid(json: JValue) = json match { - case JString(value) if enum.values.exists(_.toString == value) => true - case _ => false - } - - def serialize(implicit format: Formats): PartialFunction[Any, JValue] = { - case i: E#Value => i.toString - } - } - -} diff --git a/samples/openapi3/client/petstore/scala-sttp/src/main/scala/org/openapitools/client/api/PetApi.scala b/samples/openapi3/client/petstore/scala-sttp/src/main/scala/org/openapitools/client/api/PetApi.scala deleted file mode 100644 index 5211d09c9c5..00000000000 --- a/samples/openapi3/client/petstore/scala-sttp/src/main/scala/org/openapitools/client/api/PetApi.scala +++ /dev/null @@ -1,163 +0,0 @@ -/** - * 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. - * - * The version of the OpenAPI document: 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. - */ -package org.openapitools.client.api - -import org.openapitools.client.model.ApiResponse -import java.io.File -import org.openapitools.client.model.Pet -import org.openapitools.client.core._ -import alias._ -import sttp.client._ -import sttp.model.Method - -object PetApi { - - def apply(baseUrl: String = "http://petstore.swagger.io/v2")(implicit serializer: SttpSerializer) = new PetApi(baseUrl) -} - -class PetApi(baseUrl: String)(implicit serializer: SttpSerializer) { - - import Helpers._ - import serializer._ - - /** - * Expected answers: - * code 200 : Pet (successful operation) - * code 405 : (Invalid input) - * - * @param pet Pet object that needs to be added to the store - */ - def addPet(pet: Pet): ApiRequestT[Pet] = - basicRequest - .method(Method.POST, uri"$baseUrl/pet") - .contentType("application/json") - .body(pet) - .response(asJson[Pet]) - - /** - * Expected answers: - * code 400 : (Invalid pet value) - * - * @param petId Pet id to delete - * @param apiKey - */ - def deletePet(petId: Long, apiKey: Option[String] = None): ApiRequestT[Unit] = - basicRequest - .method(Method.DELETE, uri"$baseUrl/pet/${petId}") - .contentType("application/json") - .header("api_key", apiKey) - .response(asJson[Unit]) - - /** - * Multiple status values can be provided with comma separated strings - * - * Expected answers: - * code 200 : Seq[Pet] (successful operation) - * code 400 : (Invalid status value) - * - * @param status Status values that need to be considered for filter - */ - def findPetsByStatus(status: Seq[String]): ApiRequestT[Seq[Pet]] = - basicRequest - .method(Method.GET, uri"$baseUrl/pet/findByStatus?status=$status") - .contentType("application/json") - .response(asJson[Seq[Pet]]) - - /** - * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. - * - * Expected answers: - * code 200 : Seq[Pet] (successful operation) - * code 400 : (Invalid tag value) - * - * @param tags Tags to filter by - */ - def findPetsByTags(tags: Seq[String]): ApiRequestT[Seq[Pet]] = - basicRequest - .method(Method.GET, uri"$baseUrl/pet/findByTags?tags=$tags") - .contentType("application/json") - .response(asJson[Seq[Pet]]) - - /** - * Returns a single pet - * - * Expected answers: - * code 200 : Pet (successful operation) - * code 400 : (Invalid ID supplied) - * code 404 : (Pet not found) - * - * Available security schemes: - * api_key (apiKey) - * - * @param petId ID of pet to return - */ - def getPetById(petId: Long)(implicit apiKey: ApiKeyValue): ApiRequestT[Pet] = - basicRequest - .method(Method.GET, uri"$baseUrl/pet/${petId}") - .contentType("application/json") - .header("api_key", apiKey.value) - .response(asJson[Pet]) - - /** - * Expected answers: - * code 200 : Pet (successful operation) - * code 400 : (Invalid ID supplied) - * code 404 : (Pet not found) - * code 405 : (Validation exception) - * - * @param pet Pet object that needs to be added to the store - */ - def updatePet(pet: Pet): ApiRequestT[Pet] = - basicRequest - .method(Method.PUT, uri"$baseUrl/pet") - .contentType("application/json") - .body(pet) - .response(asJson[Pet]) - - /** - * Expected answers: - * code 405 : (Invalid input) - * - * @param petId ID of pet that needs to be updated - * @param name Updated name of the pet - * @param status Updated status of the pet - */ - def updatePetWithForm(petId: Long, name: Option[String] = None, status: Option[String] = None): ApiRequestT[Unit] = - basicRequest - .method(Method.POST, uri"$baseUrl/pet/${petId}") - .contentType("application/x-www-form-urlencoded") - .body(Map( - "name" -> name, - "status" -> status, - )) - .response(asJson[Unit]) - - /** - * Expected answers: - * code 200 : ApiResponse (successful operation) - * - * @param petId ID of pet to update - * @param additionalMetadata Additional data to pass to server - * @param file file to upload - */ - def uploadFile(petId: Long, additionalMetadata: Option[String] = None, file: Option[File] = None): ApiRequestT[ApiResponse] = - basicRequest - .method(Method.POST, uri"$baseUrl/pet/${petId}/uploadImage") - .contentType("multipart/form-data") - .body(Map( - "additionalMetadata" -> additionalMetadata, - "file" -> file, - )) - .response(asJson[ApiResponse]) - -} - diff --git a/samples/openapi3/client/petstore/scala-sttp/src/main/scala/org/openapitools/client/api/StoreApi.scala b/samples/openapi3/client/petstore/scala-sttp/src/main/scala/org/openapitools/client/api/StoreApi.scala deleted file mode 100644 index 907cc9f42f0..00000000000 --- a/samples/openapi3/client/petstore/scala-sttp/src/main/scala/org/openapitools/client/api/StoreApi.scala +++ /dev/null @@ -1,92 +0,0 @@ -/** - * 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. - * - * The version of the OpenAPI document: 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. - */ -package org.openapitools.client.api - -import org.openapitools.client.model.Order -import org.openapitools.client.core._ -import alias._ -import sttp.client._ -import sttp.model.Method - -object StoreApi { - - def apply(baseUrl: String = "http://petstore.swagger.io/v2")(implicit serializer: SttpSerializer) = new StoreApi(baseUrl) -} - -class StoreApi(baseUrl: String)(implicit serializer: SttpSerializer) { - - import Helpers._ - import serializer._ - - /** - * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors - * - * Expected answers: - * code 400 : (Invalid ID supplied) - * code 404 : (Order not found) - * - * @param orderId ID of the order that needs to be deleted - */ - def deleteOrder(orderId: String): ApiRequestT[Unit] = - basicRequest - .method(Method.DELETE, uri"$baseUrl/store/order/${orderId}") - .contentType("application/json") - .response(asJson[Unit]) - - /** - * Returns a map of status codes to quantities - * - * Expected answers: - * code 200 : Map[String, Int] (successful operation) - * - * Available security schemes: - * api_key (apiKey) - */ - def getInventory()(implicit apiKey: ApiKeyValue): ApiRequestT[Map[String, Int]] = - basicRequest - .method(Method.GET, uri"$baseUrl/store/inventory") - .contentType("application/json") - .header("api_key", apiKey.value) - .response(asJson[Map[String, Int]]) - - /** - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions - * - * Expected answers: - * code 200 : Order (successful operation) - * code 400 : (Invalid ID supplied) - * code 404 : (Order not found) - * - * @param orderId ID of pet that needs to be fetched - */ - def getOrderById(orderId: Long): ApiRequestT[Order] = - basicRequest - .method(Method.GET, uri"$baseUrl/store/order/${orderId}") - .contentType("application/json") - .response(asJson[Order]) - - /** - * Expected answers: - * code 200 : Order (successful operation) - * code 400 : (Invalid Order) - * - * @param order order placed for purchasing the pet - */ - def placeOrder(order: Order): ApiRequestT[Order] = - basicRequest - .method(Method.POST, uri"$baseUrl/store/order") - .contentType("application/json") - .body(order) - .response(asJson[Order]) - -} - diff --git a/samples/openapi3/client/petstore/scala-sttp/src/main/scala/org/openapitools/client/api/UserApi.scala b/samples/openapi3/client/petstore/scala-sttp/src/main/scala/org/openapitools/client/api/UserApi.scala deleted file mode 100644 index 34679dea5d7..00000000000 --- a/samples/openapi3/client/petstore/scala-sttp/src/main/scala/org/openapitools/client/api/UserApi.scala +++ /dev/null @@ -1,170 +0,0 @@ -/** - * 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. - * - * The version of the OpenAPI document: 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. - */ -package org.openapitools.client.api - -import org.openapitools.client.model.User -import org.openapitools.client.core._ -import alias._ -import sttp.client._ -import sttp.model.Method - -object UserApi { - - def apply(baseUrl: String = "http://petstore.swagger.io/v2")(implicit serializer: SttpSerializer) = new UserApi(baseUrl) -} - -class UserApi(baseUrl: String)(implicit serializer: SttpSerializer) { - - import Helpers._ - import serializer._ - - /** - * This can only be done by the logged in user. - * - * Expected answers: - * code 0 : (successful operation) - * - * Available security schemes: - * api_key (apiKey) - * - * @param user Created user object - */ - def createUser(user: User)(implicit apiKey: ApiKeyValue): ApiRequestT[Unit] = - basicRequest - .method(Method.POST, uri"$baseUrl/user") - .contentType("application/json") - .header("api_key", apiKey.value) - .body(user) - .response(asJson[Unit]) - - /** - * Expected answers: - * code 0 : (successful operation) - * - * Available security schemes: - * api_key (apiKey) - * - * @param user List of user object - */ - def createUsersWithArrayInput(user: Seq[User])(implicit apiKey: ApiKeyValue): ApiRequestT[Unit] = - basicRequest - .method(Method.POST, uri"$baseUrl/user/createWithArray") - .contentType("application/json") - .header("api_key", apiKey.value) - .body(user) - .response(asJson[Unit]) - - /** - * Expected answers: - * code 0 : (successful operation) - * - * Available security schemes: - * api_key (apiKey) - * - * @param user List of user object - */ - def createUsersWithListInput(user: Seq[User])(implicit apiKey: ApiKeyValue): ApiRequestT[Unit] = - basicRequest - .method(Method.POST, uri"$baseUrl/user/createWithList") - .contentType("application/json") - .header("api_key", apiKey.value) - .body(user) - .response(asJson[Unit]) - - /** - * This can only be done by the logged in user. - * - * Expected answers: - * code 400 : (Invalid username supplied) - * code 404 : (User not found) - * - * Available security schemes: - * api_key (apiKey) - * - * @param username The name that needs to be deleted - */ - def deleteUser(username: String)(implicit apiKey: ApiKeyValue): ApiRequestT[Unit] = - basicRequest - .method(Method.DELETE, uri"$baseUrl/user/${username}") - .contentType("application/json") - .header("api_key", apiKey.value) - .response(asJson[Unit]) - - /** - * Expected answers: - * code 200 : User (successful operation) - * code 400 : (Invalid username supplied) - * code 404 : (User not found) - * - * @param username The name that needs to be fetched. Use user1 for testing. - */ - def getUserByName(username: String): ApiRequestT[User] = - basicRequest - .method(Method.GET, uri"$baseUrl/user/${username}") - .contentType("application/json") - .response(asJson[User]) - - /** - * Expected answers: - * code 200 : String (successful operation) - * Headers : - * Set-Cookie - Cookie authentication key for use with the `api_key` apiKey authentication. - * X-Rate-Limit - calls per hour allowed by the user - * X-Expires-After - date in UTC when toekn expires - * code 400 : (Invalid username/password supplied) - * - * @param username The user name for login - * @param password The password for login in clear text - */ - def loginUser(username: String, password: String): ApiRequestT[String] = - basicRequest - .method(Method.GET, uri"$baseUrl/user/login?username=$username&password=$password") - .contentType("application/json") - .response(asJson[String]) - - /** - * Expected answers: - * code 0 : (successful operation) - * - * Available security schemes: - * api_key (apiKey) - */ - def logoutUser()(implicit apiKey: ApiKeyValue): ApiRequestT[Unit] = - basicRequest - .method(Method.GET, uri"$baseUrl/user/logout") - .contentType("application/json") - .header("api_key", apiKey.value) - .response(asJson[Unit]) - - /** - * This can only be done by the logged in user. - * - * Expected answers: - * code 400 : (Invalid user supplied) - * code 404 : (User not found) - * - * Available security schemes: - * api_key (apiKey) - * - * @param username name that need to be deleted - * @param user Updated user object - */ - def updateUser(username: String, user: User)(implicit apiKey: ApiKeyValue): ApiRequestT[Unit] = - basicRequest - .method(Method.PUT, uri"$baseUrl/user/${username}") - .contentType("application/json") - .header("api_key", apiKey.value) - .body(user) - .response(asJson[Unit]) - -} - diff --git a/samples/openapi3/client/petstore/scala-sttp/src/main/scala/org/openapitools/client/core/ApiInvoker.scala b/samples/openapi3/client/petstore/scala-sttp/src/main/scala/org/openapitools/client/core/ApiInvoker.scala deleted file mode 100644 index dc98ff4d136..00000000000 --- a/samples/openapi3/client/petstore/scala-sttp/src/main/scala/org/openapitools/client/core/ApiInvoker.scala +++ /dev/null @@ -1,60 +0,0 @@ -/** - * 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. - * - * The version of the OpenAPI document: 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. - */ -package org.openapitools.client.core - -import org.json4s._ -import sttp.client._ -import sttp.model.StatusCode -import org.openapitools.client.api.EnumsSerializers -import sttp.client.json4s.SttpJson4sApi -import sttp.client.monad.MonadError - -class SttpSerializer(implicit val format: Formats = DefaultFormats ++ EnumsSerializers.all ++ Serializers.all, - implicit val serialization: org.json4s.Serialization = org.json4s.jackson.Serialization) extends SttpJson4sApi - -class HttpException(val statusCode: StatusCode, val statusText: String, val message: String) extends Exception(s"[$statusCode] $statusText: $message") - -object Helpers { - - // Helper to handle Optional header parameters - implicit class optionalParams(val request: RequestT[Identity, Either[String, String], Nothing]) extends AnyVal { - def header( header: String, optValue: Option[Any]): RequestT[Identity, Either[String, String], Nothing] = { - optValue.map( value => request.header(header, value.toString)).getOrElse(request) - } - } - -} - -object ApiInvoker { - - /** - * Allows request execution without calling apiInvoker.execute(request) - * request.result can be used to get a monad wrapped content. - * - * @param request the apiRequest to be executed - */ - implicit class ApiRequestImprovements[R[_], T](request: RequestT[Identity, Either[ResponseError[Exception], T], Nothing]) { - - def result(implicit backend: SttpBackend[R, Nothing, Nothing]): R[T] = { - val responseT = request.send() - val ME: MonadError[R] = backend.responseMonad - ME.flatMap(responseT) { - response => - response.body match { - case Left(ex) => ME.error[T](new HttpException(response.code, response.statusText, ex.body)) - case Right(value) => ME.unit(value) - } - } - } - } - -} diff --git a/samples/openapi3/client/petstore/scala-sttp/src/main/scala/org/openapitools/client/core/Serializers.scala b/samples/openapi3/client/petstore/scala-sttp/src/main/scala/org/openapitools/client/core/Serializers.scala deleted file mode 100644 index dbd13545c73..00000000000 --- a/samples/openapi3/client/petstore/scala-sttp/src/main/scala/org/openapitools/client/core/Serializers.scala +++ /dev/null @@ -1,31 +0,0 @@ -package org.openapitools.client.core - -import java.time.{LocalDate, LocalDateTime, OffsetDateTime, ZoneId} -import java.time.format.DateTimeFormatter -import scala.util.Try -import org.json4s.{Serializer, CustomSerializer, JNull} -import org.json4s.JsonAST.JString - -object Serializers { - - case object DateTimeSerializer extends CustomSerializer[OffsetDateTime](_ => ( { - case JString(s) => - Try(OffsetDateTime.parse(s, DateTimeFormatter.ISO_OFFSET_DATE_TIME)) orElse - Try(LocalDateTime.parse(s).atZone(ZoneId.systemDefault()).toOffsetDateTime) getOrElse (null) - case JNull => null - }, { - case d: OffsetDateTime => - JString(d.format(DateTimeFormatter.ISO_OFFSET_DATE_TIME)) - })) - - case object LocalDateSerializer extends CustomSerializer[LocalDate]( _ => ( { - case JString(s) => LocalDate.parse(s) - case JNull => null - }, { - case d: LocalDate => - JString(d.format(DateTimeFormatter.ISO_LOCAL_DATE)) - })) - - def all: Seq[Serializer[_]] = Seq[Serializer[_]]() :+ LocalDateSerializer :+ DateTimeSerializer - -} diff --git a/samples/openapi3/client/petstore/scala-sttp/src/main/scala/org/openapitools/client/core/requests.scala b/samples/openapi3/client/petstore/scala-sttp/src/main/scala/org/openapitools/client/core/requests.scala deleted file mode 100644 index 1f45be8103e..00000000000 --- a/samples/openapi3/client/petstore/scala-sttp/src/main/scala/org/openapitools/client/core/requests.scala +++ /dev/null @@ -1,58 +0,0 @@ -/** - * 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. - * - * The version of the OpenAPI document: 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. - */ -package org.openapitools.client.core - -import sttp.client.{Identity, RequestT, ResponseError} - -/** - * This trait needs to be added to any model defined by the api. - */ -trait ApiModel - -/** - * Sttp type aliases - */ -object alias { - type ApiRequestT[T] = RequestT[Identity, Either[ResponseError[Exception], T], Nothing] -} - -/** - * Single trait defining a credential that can be transformed to a paramName / paramValue tupple - */ -sealed trait Credentials { - def asQueryParam: Option[(String, String)] = None -} - -sealed case class BasicCredentials(user: String, password: String) extends Credentials - -sealed case class BearerToken(token: String) extends Credentials - -sealed case class ApiKeyCredentials(key: ApiKeyValue, keyName: String, location: ApiKeyLocation) extends Credentials { - override def asQueryParam: Option[(String, String)] = location match { - case ApiKeyLocations.QUERY => Some((keyName, key.value)) - case _ => None - } -} - -sealed case class ApiKeyValue(value: String) - -sealed trait ApiKeyLocation - -object ApiKeyLocations { - - case object QUERY extends ApiKeyLocation - - case object HEADER extends ApiKeyLocation - - case object COOKIE extends ApiKeyLocation - -} diff --git a/samples/openapi3/client/petstore/scala-sttp/src/main/scala/org/openapitools/client/model/ApiResponse.scala b/samples/openapi3/client/petstore/scala-sttp/src/main/scala/org/openapitools/client/model/ApiResponse.scala deleted file mode 100644 index 3a3b6d6f499..00000000000 --- a/samples/openapi3/client/petstore/scala-sttp/src/main/scala/org/openapitools/client/model/ApiResponse.scala +++ /dev/null @@ -1,26 +0,0 @@ -/** - * 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. - * - * The version of the OpenAPI document: 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. - */ -package org.openapitools.client.model - -import org.openapitools.client.core.ApiModel - - /** - * An uploaded response - * Describes the result of uploading an image resource - */ -case class ApiResponse( - code: Option[Int] = None, - `type`: Option[String] = None, - message: Option[String] = None -) extends ApiModel - - diff --git a/samples/openapi3/client/petstore/scala-sttp/src/main/scala/org/openapitools/client/model/Category.scala b/samples/openapi3/client/petstore/scala-sttp/src/main/scala/org/openapitools/client/model/Category.scala deleted file mode 100644 index 011164617cf..00000000000 --- a/samples/openapi3/client/petstore/scala-sttp/src/main/scala/org/openapitools/client/model/Category.scala +++ /dev/null @@ -1,25 +0,0 @@ -/** - * 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. - * - * The version of the OpenAPI document: 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. - */ -package org.openapitools.client.model - -import org.openapitools.client.core.ApiModel - - /** - * Pet category - * A category for a pet - */ -case class Category( - id: Option[Long] = None, - name: Option[String] = None -) extends ApiModel - - diff --git a/samples/openapi3/client/petstore/scala-sttp/src/main/scala/org/openapitools/client/model/InlineObject.scala b/samples/openapi3/client/petstore/scala-sttp/src/main/scala/org/openapitools/client/model/InlineObject.scala deleted file mode 100644 index a8c5493161a..00000000000 --- a/samples/openapi3/client/petstore/scala-sttp/src/main/scala/org/openapitools/client/model/InlineObject.scala +++ /dev/null @@ -1,23 +0,0 @@ -/** - * 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. - * - * The version of the OpenAPI document: 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. - */ -package org.openapitools.client.model - -import org.openapitools.client.core.ApiModel - -case class InlineObject( - /* Updated name of the pet */ - name: Option[String] = None, - /* Updated status of the pet */ - status: Option[String] = None -) extends ApiModel - - diff --git a/samples/openapi3/client/petstore/scala-sttp/src/main/scala/org/openapitools/client/model/InlineObject1.scala b/samples/openapi3/client/petstore/scala-sttp/src/main/scala/org/openapitools/client/model/InlineObject1.scala deleted file mode 100644 index 480cf8c2e10..00000000000 --- a/samples/openapi3/client/petstore/scala-sttp/src/main/scala/org/openapitools/client/model/InlineObject1.scala +++ /dev/null @@ -1,24 +0,0 @@ -/** - * 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. - * - * The version of the OpenAPI document: 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. - */ -package org.openapitools.client.model - -import java.io.File -import org.openapitools.client.core.ApiModel - -case class InlineObject1( - /* Additional data to pass to server */ - additionalMetadata: Option[String] = None, - /* file to upload */ - file: Option[File] = None -) extends ApiModel - - diff --git a/samples/openapi3/client/petstore/scala-sttp/src/main/scala/org/openapitools/client/model/Order.scala b/samples/openapi3/client/petstore/scala-sttp/src/main/scala/org/openapitools/client/model/Order.scala deleted file mode 100644 index baa0c0cb14a..00000000000 --- a/samples/openapi3/client/petstore/scala-sttp/src/main/scala/org/openapitools/client/model/Order.scala +++ /dev/null @@ -1,41 +0,0 @@ -/** - * 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. - * - * The version of the OpenAPI document: 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. - */ -package org.openapitools.client.model - -import java.time.OffsetDateTime -import org.openapitools.client.core.ApiModel - - /** - * Pet Order - * An order for a pets from the pet store - */ -case class Order( - id: Option[Long] = None, - petId: Option[Long] = None, - quantity: Option[Int] = None, - shipDate: Option[OffsetDateTime] = None, - /* Order Status */ - status: Option[OrderEnums.Status] = None, - complete: Option[Boolean] = None -) extends ApiModel - -object OrderEnums { - - type Status = Status.Value - object Status extends Enumeration { - val Placed = Value("placed") - val Approved = Value("approved") - val Delivered = Value("delivered") - } - -} - diff --git a/samples/openapi3/client/petstore/scala-sttp/src/main/scala/org/openapitools/client/model/Pet.scala b/samples/openapi3/client/petstore/scala-sttp/src/main/scala/org/openapitools/client/model/Pet.scala deleted file mode 100644 index 75b528c3c0a..00000000000 --- a/samples/openapi3/client/petstore/scala-sttp/src/main/scala/org/openapitools/client/model/Pet.scala +++ /dev/null @@ -1,40 +0,0 @@ -/** - * 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. - * - * The version of the OpenAPI document: 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. - */ -package org.openapitools.client.model - -import org.openapitools.client.core.ApiModel - - /** - * a Pet - * A pet for sale in the pet store - */ -case class Pet( - id: Option[Long] = None, - category: Option[Category] = None, - name: String, - photoUrls: Seq[String], - tags: Option[Seq[Tag]] = None, - /* pet status in the store */ - status: Option[PetEnums.Status] = None -) extends ApiModel - -object PetEnums { - - type Status = Status.Value - object Status extends Enumeration { - val Available = Value("available") - val Pending = Value("pending") - val Sold = Value("sold") - } - -} - diff --git a/samples/openapi3/client/petstore/scala-sttp/src/main/scala/org/openapitools/client/model/Tag.scala b/samples/openapi3/client/petstore/scala-sttp/src/main/scala/org/openapitools/client/model/Tag.scala deleted file mode 100644 index 299ee5161a8..00000000000 --- a/samples/openapi3/client/petstore/scala-sttp/src/main/scala/org/openapitools/client/model/Tag.scala +++ /dev/null @@ -1,25 +0,0 @@ -/** - * 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. - * - * The version of the OpenAPI document: 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. - */ -package org.openapitools.client.model - -import org.openapitools.client.core.ApiModel - - /** - * Pet Tag - * A tag for a pet - */ -case class Tag( - id: Option[Long] = None, - name: Option[String] = None -) extends ApiModel - - diff --git a/samples/openapi3/client/petstore/scala-sttp/src/main/scala/org/openapitools/client/model/User.scala b/samples/openapi3/client/petstore/scala-sttp/src/main/scala/org/openapitools/client/model/User.scala deleted file mode 100644 index bd2e6c3ba2a..00000000000 --- a/samples/openapi3/client/petstore/scala-sttp/src/main/scala/org/openapitools/client/model/User.scala +++ /dev/null @@ -1,32 +0,0 @@ -/** - * 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. - * - * The version of the OpenAPI document: 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. - */ -package org.openapitools.client.model - -import org.openapitools.client.core.ApiModel - - /** - * a User - * A User who is purchasing from the pet store - */ -case class User( - id: Option[Long] = None, - username: Option[String] = None, - firstName: Option[String] = None, - lastName: Option[String] = None, - email: Option[String] = None, - password: Option[String] = None, - phone: Option[String] = None, - /* User Status */ - userStatus: Option[Int] = None -) extends ApiModel - - diff --git a/samples/openapi3/server/petstore/go-api-server/.openapi-generator-ignore b/samples/openapi3/server/petstore/go-api-server/.openapi-generator-ignore deleted file mode 100644 index 7484ee590a3..00000000000 --- a/samples/openapi3/server/petstore/go-api-server/.openapi-generator-ignore +++ /dev/null @@ -1,23 +0,0 @@ -# OpenAPI Generator Ignore -# Generated by openapi-generator https://github.com/openapitools/openapi-generator - -# Use this file to prevent files from being overwritten by the generator. -# The patterns follow closely to .gitignore or .dockerignore. - -# As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: -#ApiClient.cs - -# You can match any string of characters against a directory, file or extension with a single asterisk (*): -#foo/*/qux -# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux - -# You can recursively match patterns against a directory, file or extension with a double asterisk (**): -#foo/**/qux -# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux - -# You can also negate patterns with an exclamation (!). -# For example, you can ignore all files in a docs folder with the file extension .md: -#docs/*.md -# Then explicitly reverse the ignore rule for a single file: -#!docs/README.md diff --git a/samples/openapi3/server/petstore/go-api-server/.openapi-generator/VERSION b/samples/openapi3/server/petstore/go-api-server/.openapi-generator/VERSION deleted file mode 100644 index 58592f031f6..00000000000 --- a/samples/openapi3/server/petstore/go-api-server/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -4.2.3-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/server/petstore/go-api-server/Dockerfile b/samples/openapi3/server/petstore/go-api-server/Dockerfile deleted file mode 100644 index cfdfbaed080..00000000000 --- a/samples/openapi3/server/petstore/go-api-server/Dockerfile +++ /dev/null @@ -1,14 +0,0 @@ -FROM golang:1.10 AS build -WORKDIR /go/src -COPY go ./go -COPY main.go . - -ENV CGO_ENABLED=0 -RUN go get -d -v ./... - -RUN go build -a -installsuffix cgo -o petstoreserver . - -FROM scratch AS runtime -COPY --from=build /go/src/petstoreserver ./ -EXPOSE 8080/tcp -ENTRYPOINT ["./petstoreserver"] diff --git a/samples/openapi3/server/petstore/go-api-server/README.md b/samples/openapi3/server/petstore/go-api-server/README.md deleted file mode 100644 index c8907b0052e..00000000000 --- a/samples/openapi3/server/petstore/go-api-server/README.md +++ /dev/null @@ -1,35 +0,0 @@ -# Go API Server for petstoreserver - -This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - -## Overview -This server was generated by the [openapi-generator] -(https://openapi-generator.tech) project. -By using the [OpenAPI-Spec](https://github.com/OAI/OpenAPI-Specification) from a remote server, you can easily generate a server stub. -- - -To see how to make this your own, look here: - -[README](https://openapi-generator.tech) - -- API version: 1.0.0 - - -### Running the server -To run the server, follow these simple steps: - -``` -go run main.go -``` - -To run the server in a docker container -``` -docker build --network=host -t petstoreserver . -``` - -Once image is built use -``` -docker run --rm -it petstoreserver -``` - - diff --git a/samples/openapi3/server/petstore/go-api-server/api/openapi.yaml b/samples/openapi3/server/petstore/go-api-server/api/openapi.yaml deleted file mode 100644 index 06a1bb8d469..00000000000 --- a/samples/openapi3/server/petstore/go-api-server/api/openapi.yaml +++ /dev/null @@ -1,2059 +0,0 @@ -openapi: 3.0.0 -info: - 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: - " \' - license: - name: Apache-2.0 - url: https://www.apache.org/licenses/LICENSE-2.0.html - title: OpenAPI Petstore - version: 1.0.0 -servers: -- description: petstore server - url: http://{server}.swagger.io:{port}/v2 - variables: - server: - default: petstore - enum: - - petstore - - qa-petstore - - dev-petstore - port: - default: "80" - enum: - - "80" - - "8080" -- description: The local server - url: https://localhost:8080/{version} - variables: - version: - default: v2 - enum: - - v1 - - v2 -tags: -- description: Everything about your Pets - name: pet -- description: Access to Petstore orders - name: store -- description: Operations about user - name: user -paths: - /foo: - get: - responses: - default: - content: - application/json: - schema: - $ref: '#/components/schemas/inline_response_default' - description: response - /pet: - post: - operationId: addPet - requestBody: - $ref: '#/components/requestBodies/Pet' - responses: - 405: - description: Invalid input - security: - - petstore_auth: - - write:pets - - read:pets - summary: Add a new pet to the store - tags: - - pet - put: - operationId: updatePet - requestBody: - $ref: '#/components/requestBodies/Pet' - responses: - 400: - description: Invalid ID supplied - 404: - description: Pet not found - 405: - description: Validation exception - security: - - petstore_auth: - - write:pets - - read:pets - summary: Update an existing pet - tags: - - pet - servers: - - url: http://petstore.swagger.io/v2 - - url: http://path-server-test.petstore.local/v2 - /pet/findByStatus: - get: - description: Multiple status values can be provided with comma separated strings - operationId: findPetsByStatus - parameters: - - description: Status values that need to be considered for filter - explode: false - in: query - name: status - required: true - schema: - items: - default: available - enum: - - available - - pending - - sold - type: string - type: array - style: form - responses: - 200: - content: - application/xml: - schema: - items: - $ref: '#/components/schemas/Pet' - type: array - application/json: - schema: - items: - $ref: '#/components/schemas/Pet' - type: array - description: successful operation - 400: - description: Invalid status value - security: - - petstore_auth: - - write:pets - - read:pets - summary: Finds Pets by status - tags: - - pet - /pet/findByTags: - get: - deprecated: true - description: Multiple tags can be provided with comma separated strings. Use - tag1, tag2, tag3 for testing. - operationId: findPetsByTags - parameters: - - description: Tags to filter by - explode: false - in: query - name: tags - required: true - schema: - items: - type: string - type: array - style: form - responses: - 200: - content: - application/xml: - schema: - items: - $ref: '#/components/schemas/Pet' - type: array - application/json: - schema: - items: - $ref: '#/components/schemas/Pet' - type: array - description: successful operation - 400: - description: Invalid tag value - security: - - petstore_auth: - - write:pets - - read:pets - summary: Finds Pets by tags - tags: - - pet - /pet/{petId}: - delete: - operationId: deletePet - parameters: - - explode: false - in: header - name: api_key - required: false - schema: - type: string - style: simple - - description: Pet id to delete - explode: false - in: path - name: petId - required: true - schema: - format: int64 - type: integer - style: simple - responses: - 400: - description: Invalid pet value - security: - - petstore_auth: - - write:pets - - read:pets - summary: Deletes a pet - tags: - - pet - get: - description: Returns a single pet - operationId: getPetById - parameters: - - description: ID of pet to return - explode: false - in: path - name: petId - required: true - schema: - format: int64 - type: integer - style: simple - responses: - 200: - content: - application/xml: - schema: - $ref: '#/components/schemas/Pet' - application/json: - schema: - $ref: '#/components/schemas/Pet' - description: successful operation - 400: - description: Invalid ID supplied - 404: - description: Pet not found - security: - - api_key: [] - summary: Find pet by ID - tags: - - pet - post: - operationId: updatePetWithForm - parameters: - - description: ID of pet that needs to be updated - explode: false - in: path - name: petId - required: true - schema: - format: int64 - type: integer - style: simple - requestBody: - $ref: '#/components/requestBodies/inline_object' - content: - application/x-www-form-urlencoded: - schema: - properties: - name: - description: Updated name of the pet - type: string - status: - description: Updated status of the pet - type: string - type: object - responses: - 405: - description: Invalid input - security: - - petstore_auth: - - write:pets - - read:pets - summary: Updates a pet in the store with form data - tags: - - pet - /pet/{petId}/uploadImage: - post: - operationId: uploadFile - parameters: - - description: ID of pet to update - explode: false - in: path - name: petId - required: true - schema: - format: int64 - type: integer - style: simple - requestBody: - $ref: '#/components/requestBodies/inline_object_1' - content: - multipart/form-data: - schema: - properties: - additionalMetadata: - description: Additional data to pass to server - type: string - file: - description: file to upload - format: binary - type: string - type: object - responses: - 200: - content: - application/json: - schema: - $ref: '#/components/schemas/ApiResponse' - description: successful operation - security: - - petstore_auth: - - write:pets - - read:pets - summary: uploads an image - tags: - - pet - /store/inventory: - get: - description: Returns a map of status codes to quantities - operationId: getInventory - responses: - 200: - content: - application/json: - schema: - additionalProperties: - format: int32 - type: integer - type: object - description: successful operation - security: - - api_key: [] - summary: Returns pet inventories by status - tags: - - store - /store/order: - post: - operationId: placeOrder - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/Order' - description: order placed for purchasing the pet - required: true - responses: - 200: - content: - application/xml: - schema: - $ref: '#/components/schemas/Order' - application/json: - schema: - $ref: '#/components/schemas/Order' - description: successful operation - 400: - description: Invalid Order - summary: Place an order for a pet - tags: - - store - /store/order/{order_id}: - delete: - description: For valid response try integer IDs with value < 1000. Anything - above 1000 or nonintegers will generate API errors - operationId: deleteOrder - parameters: - - description: ID of the order that needs to be deleted - explode: false - in: path - name: order_id - required: true - schema: - type: string - style: simple - responses: - 400: - description: Invalid ID supplied - 404: - description: Order not found - summary: Delete purchase order by ID - tags: - - store - get: - description: For valid response try integer IDs with value <= 5 or > 10. Other - values will generated exceptions - operationId: getOrderById - parameters: - - description: ID of pet that needs to be fetched - explode: false - in: path - name: order_id - required: true - schema: - format: int64 - maximum: 5 - minimum: 1 - type: integer - style: simple - responses: - 200: - content: - application/xml: - schema: - $ref: '#/components/schemas/Order' - application/json: - schema: - $ref: '#/components/schemas/Order' - description: successful operation - 400: - description: Invalid ID supplied - 404: - description: Order not found - summary: Find purchase order by ID - tags: - - store - /user: - post: - description: This can only be done by the logged in user. - operationId: createUser - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/User' - description: Created user object - required: true - responses: - default: - description: successful operation - summary: Create user - tags: - - user - /user/createWithArray: - post: - operationId: createUsersWithArrayInput - requestBody: - $ref: '#/components/requestBodies/UserArray' - responses: - default: - description: successful operation - summary: Creates list of users with given input array - tags: - - user - /user/createWithList: - post: - operationId: createUsersWithListInput - requestBody: - $ref: '#/components/requestBodies/UserArray' - responses: - default: - description: successful operation - summary: Creates list of users with given input array - tags: - - user - /user/login: - get: - operationId: loginUser - parameters: - - description: The user name for login - explode: true - in: query - name: username - required: true - schema: - type: string - style: form - - description: The password for login in clear text - explode: true - in: query - name: password - required: true - schema: - type: string - style: form - responses: - 200: - content: - application/xml: - schema: - type: string - application/json: - schema: - type: string - description: successful operation - headers: - X-Rate-Limit: - description: calls per hour allowed by the user - explode: false - schema: - format: int32 - type: integer - style: simple - X-Expires-After: - description: date in UTC when token expires - explode: false - schema: - format: date-time - type: string - style: simple - 400: - description: Invalid username/password supplied - summary: Logs user into the system - tags: - - user - /user/logout: - get: - operationId: logoutUser - responses: - default: - description: successful operation - summary: Logs out current logged in user session - tags: - - user - /user/{username}: - delete: - description: This can only be done by the logged in user. - operationId: deleteUser - parameters: - - description: The name that needs to be deleted - explode: false - in: path - name: username - required: true - schema: - type: string - style: simple - responses: - 400: - description: Invalid username supplied - 404: - description: User not found - summary: Delete user - tags: - - user - get: - operationId: getUserByName - parameters: - - description: The name that needs to be fetched. Use user1 for testing. - explode: false - in: path - name: username - required: true - schema: - type: string - style: simple - responses: - 200: - content: - application/xml: - schema: - $ref: '#/components/schemas/User' - application/json: - schema: - $ref: '#/components/schemas/User' - description: successful operation - 400: - description: Invalid username supplied - 404: - description: User not found - summary: Get user by user name - tags: - - user - put: - description: This can only be done by the logged in user. - operationId: updateUser - parameters: - - description: name that need to be deleted - explode: false - in: path - name: username - required: true - schema: - type: string - style: simple - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/User' - description: Updated user object - required: true - responses: - 400: - description: Invalid user supplied - 404: - description: User not found - summary: Updated user - tags: - - user - /fake_classname_test: - patch: - description: To test class name in snake case - operationId: testClassname - requestBody: - $ref: '#/components/requestBodies/Client' - responses: - 200: - content: - application/json: - schema: - $ref: '#/components/schemas/Client' - description: successful operation - security: - - api_key_query: [] - summary: To test class name in snake case - tags: - - fake_classname_tags 123#$%^ - /fake: - delete: - description: Fake endpoint to test group parameters (optional) - operationId: testGroupParameters - parameters: - - description: Required String in group parameters - explode: true - in: query - name: required_string_group - required: true - schema: - type: integer - style: form - - description: Required Boolean in group parameters - explode: false - in: header - name: required_boolean_group - required: true - schema: - type: boolean - style: simple - - description: Required Integer in group parameters - explode: true - in: query - name: required_int64_group - required: true - schema: - format: int64 - type: integer - style: form - - description: String in group parameters - explode: true - in: query - name: string_group - required: false - schema: - type: integer - style: form - - description: Boolean in group parameters - explode: false - in: header - name: boolean_group - required: false - schema: - type: boolean - style: simple - - description: Integer in group parameters - explode: true - in: query - name: int64_group - required: false - schema: - format: int64 - type: integer - style: form - responses: - 400: - description: Someting wrong - security: - - bearer_test: [] - summary: Fake endpoint to test group parameters (optional) - tags: - - fake - x-group-parameters: true - get: - description: To test enum parameters - operationId: testEnumParameters - parameters: - - description: Header parameter enum test (string array) - explode: false - in: header - name: enum_header_string_array - required: false - schema: - items: - default: $ - enum: - - '>' - - $ - type: string - type: array - style: simple - - description: Header parameter enum test (string) - explode: false - in: header - name: enum_header_string - required: false - schema: - default: -efg - enum: - - _abc - - -efg - - (xyz) - type: string - style: simple - - description: Query parameter enum test (string array) - explode: true - in: query - name: enum_query_string_array - required: false - schema: - items: - default: $ - enum: - - '>' - - $ - type: string - type: array - style: form - - description: Query parameter enum test (string) - explode: true - in: query - name: enum_query_string - required: false - schema: - default: -efg - enum: - - _abc - - -efg - - (xyz) - type: string - style: form - - description: Query parameter enum test (double) - explode: true - in: query - name: enum_query_integer - required: false - schema: - enum: - - 1 - - -2 - format: int32 - type: integer - style: form - - description: Query parameter enum test (double) - explode: true - in: query - name: enum_query_double - required: false - schema: - enum: - - 1.1 - - -1.2 - format: double - type: number - style: form - requestBody: - $ref: '#/components/requestBodies/inline_object_2' - content: - application/x-www-form-urlencoded: - schema: - properties: - enum_form_string_array: - description: Form parameter enum test (string array) - items: - default: $ - enum: - - '>' - - $ - type: string - type: array - enum_form_string: - default: -efg - description: Form parameter enum test (string) - enum: - - _abc - - -efg - - (xyz) - type: string - type: object - responses: - 400: - description: Invalid request - 404: - description: Not found - summary: To test enum parameters - tags: - - fake - patch: - description: To test "client" model - operationId: testClientModel - requestBody: - $ref: '#/components/requestBodies/Client' - responses: - 200: - content: - application/json: - schema: - $ref: '#/components/schemas/Client' - description: successful operation - summary: To test "client" model - tags: - - fake - post: - description: | - Fake endpoint for testing various parameters - 假端點 - 偽のエンドポイント - 가짜 엔드 포인트 - operationId: testEndpointParameters - requestBody: - $ref: '#/components/requestBodies/inline_object_3' - content: - application/x-www-form-urlencoded: - schema: - properties: - integer: - description: None - maximum: 100 - minimum: 10 - type: integer - int32: - description: None - format: int32 - maximum: 200 - minimum: 20 - type: integer - int64: - description: None - format: int64 - type: integer - number: - description: None - maximum: 543.2 - minimum: 32.1 - type: number - float: - description: None - format: float - maximum: 987.6 - type: number - double: - description: None - format: double - maximum: 123.4 - minimum: 67.8 - type: number - string: - description: None - pattern: /[a-z]/i - type: string - pattern_without_delimiter: - description: None - pattern: ^[A-Z].* - type: string - byte: - description: None - format: byte - type: string - binary: - description: None - format: binary - type: string - date: - description: None - format: date - type: string - dateTime: - description: None - format: date-time - type: string - password: - description: None - format: password - maxLength: 64 - minLength: 10 - type: string - callback: - description: None - type: string - required: - - byte - - double - - number - - pattern_without_delimiter - type: object - responses: - 400: - description: Invalid username supplied - 404: - description: User not found - security: - - http_basic_test: [] - summary: | - Fake endpoint for testing various parameters - 假端點 - 偽のエンドポイント - 가짜 엔드 포인트 - tags: - - fake - /fake/outer/number: - post: - description: Test serialization of outer number types - operationId: fakeOuterNumberSerialize - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/OuterNumber' - description: Input number as post body - responses: - 200: - content: - '*/*': - schema: - $ref: '#/components/schemas/OuterNumber' - description: Output number - tags: - - fake - /fake/outer/string: - post: - description: Test serialization of outer string types - operationId: fakeOuterStringSerialize - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/OuterString' - description: Input string as post body - responses: - 200: - content: - '*/*': - schema: - $ref: '#/components/schemas/OuterString' - description: Output string - tags: - - fake - /fake/outer/boolean: - post: - description: Test serialization of outer boolean types - operationId: fakeOuterBooleanSerialize - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/OuterBoolean' - description: Input boolean as post body - responses: - 200: - content: - '*/*': - schema: - $ref: '#/components/schemas/OuterBoolean' - description: Output boolean - tags: - - fake - /fake/outer/composite: - post: - description: Test serialization of object with outer number type - operationId: fakeOuterCompositeSerialize - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/OuterComposite' - description: Input composite as post body - responses: - 200: - content: - '*/*': - schema: - $ref: '#/components/schemas/OuterComposite' - description: Output composite - tags: - - fake - /fake/jsonFormData: - get: - operationId: testJsonFormData - requestBody: - $ref: '#/components/requestBodies/inline_object_4' - content: - application/x-www-form-urlencoded: - schema: - properties: - param: - description: field1 - type: string - param2: - description: field2 - type: string - required: - - param - - param2 - type: object - responses: - 200: - description: successful operation - summary: test json serialization of form data - tags: - - fake - /fake/inline-additionalProperties: - post: - operationId: testInlineAdditionalProperties - requestBody: - content: - application/json: - schema: - additionalProperties: - type: string - type: object - description: request body - required: true - responses: - 200: - description: successful operation - summary: test inline additionalProperties - tags: - - fake - /fake/body-with-query-params: - put: - operationId: testBodyWithQueryParams - parameters: - - explode: true - in: query - name: query - required: true - schema: - type: string - style: form - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/User' - required: true - responses: - 200: - description: Success - tags: - - fake - /another-fake/dummy: - patch: - description: To test special tags and operation ID starting with number - operationId: 123_test_@#$%_special_tags - requestBody: - $ref: '#/components/requestBodies/Client' - responses: - 200: - content: - application/json: - schema: - $ref: '#/components/schemas/Client' - description: successful operation - summary: To test special tags - tags: - - $another-fake? - /fake/body-with-file-schema: - put: - description: For this test, the body for this request much reference a schema - named `File`. - operationId: testBodyWithFileSchema - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/FileSchemaTestClass' - required: true - responses: - 200: - description: Success - tags: - - fake - /fake/test-query-paramters: - put: - description: To test the collection format in query parameters - operationId: testQueryParameterCollectionFormat - parameters: - - explode: true - in: query - name: pipe - required: true - schema: - items: - type: string - type: array - style: form - - explode: false - in: query - name: ioutil - required: true - schema: - items: - type: string - type: array - style: form - - explode: false - in: query - name: http - required: true - schema: - items: - type: string - type: array - style: spaceDelimited - - explode: false - in: query - name: url - required: true - schema: - items: - type: string - type: array - style: form - - explode: true - in: query - name: context - required: true - schema: - items: - type: string - type: array - style: form - responses: - 200: - description: Success - tags: - - fake - /fake/{petId}/uploadImageWithRequiredFile: - post: - operationId: uploadFileWithRequiredFile - parameters: - - description: ID of pet to update - explode: false - in: path - name: petId - required: true - schema: - format: int64 - type: integer - style: simple - requestBody: - $ref: '#/components/requestBodies/inline_object_5' - content: - multipart/form-data: - schema: - properties: - additionalMetadata: - description: Additional data to pass to server - type: string - requiredFile: - description: file to upload - format: binary - type: string - required: - - requiredFile - type: object - responses: - 200: - content: - application/json: - schema: - $ref: '#/components/schemas/ApiResponse' - description: successful operation - security: - - petstore_auth: - - write:pets - - read:pets - summary: uploads an image (required) - tags: - - pet - /fake/health: - get: - responses: - 200: - content: - application/json: - schema: - $ref: '#/components/schemas/HealthCheckResult' - description: The instance started successfully - summary: Health check endpoint - tags: - - fake -components: - requestBodies: - UserArray: - content: - application/json: - schema: - items: - $ref: '#/components/schemas/User' - type: array - description: List of user object - required: true - Client: - content: - application/json: - schema: - $ref: '#/components/schemas/Client' - description: client model - required: true - Pet: - content: - application/json: - schema: - $ref: '#/components/schemas/Pet' - application/xml: - schema: - $ref: '#/components/schemas/Pet' - description: Pet object that needs to be added to the store - required: true - inline_object: - content: - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/inline_object' - inline_object_1: - content: - multipart/form-data: - schema: - $ref: '#/components/schemas/inline_object_1' - inline_object_2: - content: - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/inline_object_2' - inline_object_3: - content: - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/inline_object_3' - inline_object_4: - content: - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/inline_object_4' - inline_object_5: - content: - multipart/form-data: - schema: - $ref: '#/components/schemas/inline_object_5' - schemas: - Foo: - example: - bar: bar - properties: - bar: - default: bar - type: string - type: object - Bar: - default: bar - type: string - Order: - example: - petId: 6 - quantity: 1 - id: 0 - shipDate: 2000-01-23T04:56:07.000+00:00 - complete: false - status: placed - properties: - id: - format: int64 - type: integer - petId: - format: int64 - type: integer - quantity: - format: int32 - type: integer - shipDate: - format: date-time - type: string - status: - description: Order Status - enum: - - placed - - approved - - delivered - type: string - complete: - default: false - type: boolean - type: object - xml: - name: Order - Category: - example: - name: default-name - id: 6 - properties: - id: - format: int64 - type: integer - name: - default: default-name - type: string - required: - - name - type: object - xml: - name: Category - User: - example: - firstName: firstName - lastName: lastName - password: password - userStatus: 6 - phone: phone - id: 0 - email: email - username: username - properties: - id: - format: int64 - type: integer - x-is-unique: true - username: - type: string - firstName: - type: string - lastName: - type: string - email: - type: string - password: - type: string - phone: - type: string - userStatus: - description: User Status - format: int32 - type: integer - type: object - xml: - name: User - Tag: - example: - name: name - id: 1 - properties: - id: - format: int64 - type: integer - name: - type: string - type: object - xml: - name: Tag - Pet: - example: - photoUrls: - - photoUrls - - photoUrls - name: doggie - id: 0 - category: - name: default-name - id: 6 - tags: - - name: name - id: 1 - - name: name - id: 1 - status: available - properties: - id: - format: int64 - type: integer - x-is-unique: true - category: - $ref: '#/components/schemas/Category' - name: - example: doggie - type: string - photoUrls: - items: - type: string - type: array - xml: - name: photoUrl - wrapped: true - tags: - items: - $ref: '#/components/schemas/Tag' - type: array - xml: - name: tag - wrapped: true - status: - description: pet status in the store - enum: - - available - - pending - - sold - type: string - required: - - name - - photoUrls - type: object - xml: - name: Pet - ApiResponse: - example: - code: 0 - type: type - message: message - properties: - code: - format: int32 - type: integer - type: - type: string - message: - type: string - type: object - Return: - description: Model for testing reserved words - properties: - return: - format: int32 - type: integer - xml: - name: Return - Name: - description: Model for testing model name same as property name - properties: - name: - format: int32 - type: integer - snake_case: - format: int32 - readOnly: true - type: integer - property: - type: string - 123Number: - readOnly: true - type: integer - required: - - name - xml: - name: Name - 200_response: - description: Model for testing model name starting with number - properties: - name: - format: int32 - type: integer - class: - type: string - xml: - name: Name - ClassModel: - description: Model for testing model with "_class" property - properties: - _class: - type: string - Dog: - allOf: - - $ref: '#/components/schemas/Animal' - - $ref: '#/components/schemas/Dog_allOf' - Cat: - allOf: - - $ref: '#/components/schemas/Animal' - - $ref: '#/components/schemas/Cat_allOf' - Animal: - discriminator: - propertyName: className - properties: - className: - type: string - color: - default: red - type: string - required: - - className - type: object - AnimalFarm: - items: - $ref: '#/components/schemas/Animal' - type: array - format_test: - properties: - integer: - maximum: 100 - minimum: 10 - type: integer - int32: - format: int32 - maximum: 200 - minimum: 20 - type: integer - int64: - format: int64 - type: integer - number: - maximum: 543.2 - minimum: 32.1 - type: number - float: - format: float - maximum: 987.6 - minimum: 54.3 - type: number - double: - format: double - maximum: 123.4 - minimum: 67.8 - type: number - string: - pattern: /[a-z]/i - type: string - byte: - format: byte - type: string - binary: - format: binary - type: string - date: - format: date - type: string - dateTime: - format: date-time - type: string - uuid: - example: 72f98069-206d-4f12-9f12-3d1e525a8e84 - format: uuid - type: string - password: - format: password - maxLength: 64 - minLength: 10 - type: string - pattern_with_digits: - description: A string that is a 10 digit number. Can have leading zeros. - pattern: ^\d{10}$ - type: string - pattern_with_digits_and_delimiter: - description: A string starting with 'image_' (case insensitive) and one - to three digits following i.e. Image_01. - pattern: /^image_\d{1,3}$/i - type: string - required: - - byte - - date - - number - - password - type: object - EnumClass: - default: -efg - enum: - - _abc - - -efg - - (xyz) - type: string - Enum_Test: - properties: - enum_string: - enum: - - UPPER - - lower - - "" - type: string - enum_string_required: - enum: - - UPPER - - lower - - "" - type: string - enum_integer: - enum: - - 1 - - -1 - format: int32 - type: integer - enum_number: - enum: - - 1.1 - - -1.2 - format: double - type: number - outerEnum: - $ref: '#/components/schemas/OuterEnum' - outerEnumInteger: - $ref: '#/components/schemas/OuterEnumInteger' - outerEnumDefaultValue: - $ref: '#/components/schemas/OuterEnumDefaultValue' - outerEnumIntegerDefaultValue: - $ref: '#/components/schemas/OuterEnumIntegerDefaultValue' - required: - - enum_string_required - type: object - AdditionalPropertiesClass: - properties: - map_property: - additionalProperties: - type: string - type: object - map_of_map_property: - additionalProperties: - additionalProperties: - type: string - type: object - type: object - type: object - MixedPropertiesAndAdditionalPropertiesClass: - properties: - uuid: - format: uuid - type: string - dateTime: - format: date-time - type: string - map: - additionalProperties: - $ref: '#/components/schemas/Animal' - type: object - type: object - List: - properties: - 123-list: - type: string - type: object - Client: - example: - client: client - properties: - client: - type: string - type: object - ReadOnlyFirst: - properties: - bar: - readOnly: true - type: string - baz: - type: string - type: object - hasOnlyReadOnly: - properties: - bar: - readOnly: true - type: string - foo: - readOnly: true - type: string - type: object - Capitalization: - properties: - smallCamel: - type: string - CapitalCamel: - type: string - small_Snake: - type: string - Capital_Snake: - type: string - SCA_ETH_Flow_Points: - type: string - ATT_NAME: - description: | - Name of the pet - type: string - type: object - MapTest: - properties: - map_map_of_string: - additionalProperties: - additionalProperties: - type: string - type: object - type: object - map_of_enum_string: - additionalProperties: - enum: - - UPPER - - lower - type: string - type: object - direct_map: - additionalProperties: - type: boolean - type: object - indirect_map: - additionalProperties: - type: boolean - type: object - type: object - ArrayTest: - properties: - array_of_string: - items: - type: string - type: array - array_array_of_integer: - items: - items: - format: int64 - type: integer - type: array - type: array - array_array_of_model: - items: - items: - $ref: '#/components/schemas/ReadOnlyFirst' - type: array - type: array - type: object - NumberOnly: - properties: - JustNumber: - type: number - type: object - ArrayOfNumberOnly: - properties: - ArrayNumber: - items: - type: number - type: array - type: object - ArrayOfArrayOfNumberOnly: - properties: - ArrayArrayNumber: - items: - items: - type: number - type: array - type: array - type: object - EnumArrays: - properties: - just_symbol: - enum: - - '>=' - - $ - type: string - array_enum: - items: - enum: - - fish - - crab - type: string - type: array - type: object - OuterEnum: - enum: - - placed - - approved - - delivered - nullable: true - type: string - OuterEnumInteger: - enum: - - 0 - - 1 - - 2 - type: integer - OuterEnumDefaultValue: - default: placed - enum: - - placed - - approved - - delivered - type: string - OuterEnumIntegerDefaultValue: - default: 0 - enum: - - 0 - - 1 - - 2 - type: integer - OuterComposite: - example: - my_string: my_string - my_number: 0.8008281904610115 - my_boolean: true - properties: - my_number: - type: number - my_string: - type: string - my_boolean: - type: boolean - x-codegen-body-parameter-name: boolean_post_body - type: object - OuterNumber: - type: number - OuterString: - type: string - OuterBoolean: - type: boolean - x-codegen-body-parameter-name: boolean_post_body - StringBooleanMap: - additionalProperties: - type: boolean - type: object - FileSchemaTestClass: - example: - file: - sourceURI: sourceURI - files: - - sourceURI: sourceURI - - sourceURI: sourceURI - properties: - file: - $ref: '#/components/schemas/File' - files: - items: - $ref: '#/components/schemas/File' - type: array - type: object - File: - description: Must be named `File` for test. - example: - sourceURI: sourceURI - properties: - sourceURI: - description: Test capitalization - type: string - type: object - _special_model.name_: - properties: - $special[property.name]: - format: int64 - type: integer - xml: - name: $special[model.name] - HealthCheckResult: - description: Just a string to inform instance is up and running. Make it nullable - in hope to get it as pointer in generated model. - example: - NullableMessage: NullableMessage - properties: - NullableMessage: - nullable: true - type: string - type: object - NullableClass: - additionalProperties: - nullable: true - type: object - properties: - integer_prop: - nullable: true - type: integer - number_prop: - nullable: true - type: number - boolean_prop: - nullable: true - type: boolean - string_prop: - nullable: true - type: string - date_prop: - format: date - nullable: true - type: string - datetime_prop: - format: date-time - nullable: true - type: string - array_nullable_prop: - items: - type: object - nullable: true - type: array - array_and_items_nullable_prop: - items: - nullable: true - type: object - nullable: true - type: array - array_items_nullable: - items: - nullable: true - type: object - type: array - object_nullable_prop: - additionalProperties: - type: object - nullable: true - type: object - object_and_items_nullable_prop: - additionalProperties: - nullable: true - type: object - nullable: true - type: object - object_items_nullable: - additionalProperties: - nullable: true - type: object - type: object - type: object - inline_response_default: - example: - string: - bar: bar - properties: - string: - $ref: '#/components/schemas/Foo' - inline_object: - properties: - name: - description: Updated name of the pet - type: string - status: - description: Updated status of the pet - type: string - type: object - inline_object_1: - properties: - additionalMetadata: - description: Additional data to pass to server - type: string - file: - description: file to upload - format: binary - type: string - type: object - inline_object_2: - properties: - enum_form_string_array: - description: Form parameter enum test (string array) - items: - default: $ - enum: - - '>' - - $ - type: string - type: array - enum_form_string: - default: -efg - description: Form parameter enum test (string) - enum: - - _abc - - -efg - - (xyz) - type: string - type: object - inline_object_3: - properties: - integer: - description: None - maximum: 100 - minimum: 10 - type: integer - int32: - description: None - format: int32 - maximum: 200 - minimum: 20 - type: integer - int64: - description: None - format: int64 - type: integer - number: - description: None - maximum: 543.2 - minimum: 32.1 - type: number - float: - description: None - format: float - maximum: 987.6 - type: number - double: - description: None - format: double - maximum: 123.4 - minimum: 67.8 - type: number - string: - description: None - pattern: /[a-z]/i - type: string - pattern_without_delimiter: - description: None - pattern: ^[A-Z].* - type: string - byte: - description: None - format: byte - type: string - binary: - description: None - format: binary - type: string - date: - description: None - format: date - type: string - dateTime: - description: None - format: date-time - type: string - password: - description: None - format: password - maxLength: 64 - minLength: 10 - type: string - callback: - description: None - type: string - required: - - byte - - double - - number - - pattern_without_delimiter - type: object - inline_object_4: - properties: - param: - description: field1 - type: string - param2: - description: field2 - type: string - required: - - param - - param2 - type: object - inline_object_5: - properties: - additionalMetadata: - description: Additional data to pass to server - type: string - requiredFile: - description: file to upload - format: binary - type: string - required: - - requiredFile - type: object - Dog_allOf: - properties: - breed: - type: string - Cat_allOf: - properties: - declawed: - type: boolean - securitySchemes: - petstore_auth: - flows: - implicit: - authorizationUrl: http://petstore.swagger.io/api/oauth/dialog - scopes: - write:pets: modify pets in your account - read:pets: read your pets - type: oauth2 - api_key: - in: header - name: api_key - type: apiKey - api_key_query: - in: query - name: api_key_query - type: apiKey - http_basic_test: - scheme: basic - type: http - bearer_test: - bearerFormat: JWT - scheme: bearer - type: http diff --git a/samples/openapi3/server/petstore/go-api-server/go/api_another_fake.go b/samples/openapi3/server/petstore/go-api-server/go/api_another_fake.go deleted file mode 100644 index 804316ecb21..00000000000 --- a/samples/openapi3/server/petstore/go-api-server/go/api_another_fake.go +++ /dev/null @@ -1,57 +0,0 @@ -/* - * 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: \" \\ - * - * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package petstoreserver - -import ( - "encoding/json" - "net/http" - "strings" - - "github.com/gorilla/mux" -) - -// A AnotherFakeApiController binds http requests to an api service and writes the service results to the http response -type AnotherFakeApiController struct { - service AnotherFakeApiServicer -} - -// NewAnotherFakeApiController creates a default api controller -func NewAnotherFakeApiController(s AnotherFakeApiServicer) Router { - return &AnotherFakeApiController{ service: s } -} - -// Routes returns all of the api route for the AnotherFakeApiController -func (c *AnotherFakeApiController) Routes() Routes { - return Routes{ - { - "Call123TestSpecialTags", - strings.ToUpper("Patch"), - "/v2/another-fake/dummy", - c.Call123TestSpecialTags, - }, - } -} - -// Call123TestSpecialTags - To test special tags -func (c *AnotherFakeApiController) Call123TestSpecialTags(w http.ResponseWriter, r *http.Request) { - client := &Client{} - if err := json.NewDecoder(r.Body).Decode(&client); err != nil { - w.WriteHeader(500) - return - } - - result, err := c.service.Call123TestSpecialTags(*client) - if err != nil { - w.WriteHeader(500) - return - } - - EncodeJSONResponse(result, nil, w) -} diff --git a/samples/openapi3/server/petstore/go-api-server/go/api_default.go b/samples/openapi3/server/petstore/go-api-server/go/api_default.go deleted file mode 100644 index c1618f26c9c..00000000000 --- a/samples/openapi3/server/petstore/go-api-server/go/api_default.go +++ /dev/null @@ -1,51 +0,0 @@ -/* - * 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: \" \\ - * - * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package petstoreserver - -import ( - "encoding/json" - "net/http" - "strings" - - "github.com/gorilla/mux" -) - -// A DefaultApiController binds http requests to an api service and writes the service results to the http response -type DefaultApiController struct { - service DefaultApiServicer -} - -// NewDefaultApiController creates a default api controller -func NewDefaultApiController(s DefaultApiServicer) Router { - return &DefaultApiController{ service: s } -} - -// Routes returns all of the api route for the DefaultApiController -func (c *DefaultApiController) Routes() Routes { - return Routes{ - { - "FooGet", - strings.ToUpper("Get"), - "/v2/foo", - c.FooGet, - }, - } -} - -// FooGet - -func (c *DefaultApiController) FooGet(w http.ResponseWriter, r *http.Request) { - result, err := c.service.FooGet() - if err != nil { - w.WriteHeader(500) - return - } - - EncodeJSONResponse(result, nil, w) -} diff --git a/samples/openapi3/server/petstore/go-api-server/go/api_fake.go b/samples/openapi3/server/petstore/go-api-server/go/api_fake.go deleted file mode 100644 index 94b55953254..00000000000 --- a/samples/openapi3/server/petstore/go-api-server/go/api_fake.go +++ /dev/null @@ -1,398 +0,0 @@ -/* - * 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: \" \\ - * - * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package petstoreserver - -import ( - "encoding/json" - "net/http" - "strings" - - "github.com/gorilla/mux" -) - -// A FakeApiController binds http requests to an api service and writes the service results to the http response -type FakeApiController struct { - service FakeApiServicer -} - -// NewFakeApiController creates a default api controller -func NewFakeApiController(s FakeApiServicer) Router { - return &FakeApiController{ service: s } -} - -// Routes returns all of the api route for the FakeApiController -func (c *FakeApiController) Routes() Routes { - return Routes{ - { - "FakeHealthGet", - strings.ToUpper("Get"), - "/v2/fake/health", - c.FakeHealthGet, - }, - { - "FakeOuterBooleanSerialize", - strings.ToUpper("Post"), - "/v2/fake/outer/boolean", - c.FakeOuterBooleanSerialize, - }, - { - "FakeOuterCompositeSerialize", - strings.ToUpper("Post"), - "/v2/fake/outer/composite", - c.FakeOuterCompositeSerialize, - }, - { - "FakeOuterNumberSerialize", - strings.ToUpper("Post"), - "/v2/fake/outer/number", - c.FakeOuterNumberSerialize, - }, - { - "FakeOuterStringSerialize", - strings.ToUpper("Post"), - "/v2/fake/outer/string", - c.FakeOuterStringSerialize, - }, - { - "TestBodyWithFileSchema", - strings.ToUpper("Put"), - "/v2/fake/body-with-file-schema", - c.TestBodyWithFileSchema, - }, - { - "TestBodyWithQueryParams", - strings.ToUpper("Put"), - "/v2/fake/body-with-query-params", - c.TestBodyWithQueryParams, - }, - { - "TestClientModel", - strings.ToUpper("Patch"), - "/v2/fake", - c.TestClientModel, - }, - { - "TestEndpointParameters", - strings.ToUpper("Post"), - "/v2/fake", - c.TestEndpointParameters, - }, - { - "TestEnumParameters", - strings.ToUpper("Get"), - "/v2/fake", - c.TestEnumParameters, - }, - { - "TestGroupParameters", - strings.ToUpper("Delete"), - "/v2/fake", - c.TestGroupParameters, - }, - { - "TestInlineAdditionalProperties", - strings.ToUpper("Post"), - "/v2/fake/inline-additionalProperties", - c.TestInlineAdditionalProperties, - }, - { - "TestJsonFormData", - strings.ToUpper("Get"), - "/v2/fake/jsonFormData", - c.TestJsonFormData, - }, - { - "TestQueryParameterCollectionFormat", - strings.ToUpper("Put"), - "/v2/fake/test-query-paramters", - c.TestQueryParameterCollectionFormat, - }, - } -} - -// FakeHealthGet - Health check endpoint -func (c *FakeApiController) FakeHealthGet(w http.ResponseWriter, r *http.Request) { - result, err := c.service.FakeHealthGet() - if err != nil { - w.WriteHeader(500) - return - } - - EncodeJSONResponse(result, nil, w) -} - -// FakeOuterBooleanSerialize - -func (c *FakeApiController) FakeOuterBooleanSerialize(w http.ResponseWriter, r *http.Request) { - body := &bool{} - if err := json.NewDecoder(r.Body).Decode(&body); err != nil { - w.WriteHeader(500) - return - } - - result, err := c.service.FakeOuterBooleanSerialize(*body) - if err != nil { - w.WriteHeader(500) - return - } - - EncodeJSONResponse(result, nil, w) -} - -// FakeOuterCompositeSerialize - -func (c *FakeApiController) FakeOuterCompositeSerialize(w http.ResponseWriter, r *http.Request) { - outerComposite := &OuterComposite{} - if err := json.NewDecoder(r.Body).Decode(&outerComposite); err != nil { - w.WriteHeader(500) - return - } - - result, err := c.service.FakeOuterCompositeSerialize(*outerComposite) - if err != nil { - w.WriteHeader(500) - return - } - - EncodeJSONResponse(result, nil, w) -} - -// FakeOuterNumberSerialize - -func (c *FakeApiController) FakeOuterNumberSerialize(w http.ResponseWriter, r *http.Request) { - body := &float32{} - if err := json.NewDecoder(r.Body).Decode(&body); err != nil { - w.WriteHeader(500) - return - } - - result, err := c.service.FakeOuterNumberSerialize(*body) - if err != nil { - w.WriteHeader(500) - return - } - - EncodeJSONResponse(result, nil, w) -} - -// FakeOuterStringSerialize - -func (c *FakeApiController) FakeOuterStringSerialize(w http.ResponseWriter, r *http.Request) { - body := &string{} - if err := json.NewDecoder(r.Body).Decode(&body); err != nil { - w.WriteHeader(500) - return - } - - result, err := c.service.FakeOuterStringSerialize(*body) - if err != nil { - w.WriteHeader(500) - return - } - - EncodeJSONResponse(result, nil, w) -} - -// TestBodyWithFileSchema - -func (c *FakeApiController) TestBodyWithFileSchema(w http.ResponseWriter, r *http.Request) { - fileSchemaTestClass := &FileSchemaTestClass{} - if err := json.NewDecoder(r.Body).Decode(&fileSchemaTestClass); err != nil { - w.WriteHeader(500) - return - } - - result, err := c.service.TestBodyWithFileSchema(*fileSchemaTestClass) - if err != nil { - w.WriteHeader(500) - return - } - - EncodeJSONResponse(result, nil, w) -} - -// TestBodyWithQueryParams - -func (c *FakeApiController) TestBodyWithQueryParams(w http.ResponseWriter, r *http.Request) { - query := r.URL.Query() - query := query.Get("query") - user := &User{} - if err := json.NewDecoder(r.Body).Decode(&user); err != nil { - w.WriteHeader(500) - return - } - - result, err := c.service.TestBodyWithQueryParams(query, *user) - if err != nil { - w.WriteHeader(500) - return - } - - EncodeJSONResponse(result, nil, w) -} - -// TestClientModel - To test \"client\" model -func (c *FakeApiController) TestClientModel(w http.ResponseWriter, r *http.Request) { - client := &Client{} - if err := json.NewDecoder(r.Body).Decode(&client); err != nil { - w.WriteHeader(500) - return - } - - result, err := c.service.TestClientModel(*client) - if err != nil { - w.WriteHeader(500) - return - } - - EncodeJSONResponse(result, nil, w) -} - -// TestEndpointParameters - Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 -func (c *FakeApiController) TestEndpointParameters(w http.ResponseWriter, r *http.Request) { - err := r.ParseForm() - if err != nil { - w.WriteHeader(500) - return - } - - number := r.FormValue("number") - double := r.FormValue("double") - patternWithoutDelimiter := r.FormValue("patternWithoutDelimiter") - byte_ := r.FormValue("byte_") - integer := r.FormValue("integer") - int32_ := r.FormValue("int32_") - int64_, err := parseIntParameter( r.FormValue("int64_")) - if err != nil { - w.WriteHeader(500) - return - } - - float := r.FormValue("float") - string_ := r.FormValue("string_") - binary, err := ReadFormFileToTempFile(r, "binary") - if err != nil { - w.WriteHeader(500) - return - } - - date := r.FormValue("date") - dateTime := r.FormValue("dateTime") - password := r.FormValue("password") - callback := r.FormValue("callback") - result, err := c.service.TestEndpointParameters(number, double, patternWithoutDelimiter, byte_, integer, int32_, int64_, float, string_, binary, date, dateTime, password, callback) - if err != nil { - w.WriteHeader(500) - return - } - - EncodeJSONResponse(result, nil, w) -} - -// TestEnumParameters - To test enum parameters -func (c *FakeApiController) TestEnumParameters(w http.ResponseWriter, r *http.Request) { - err := r.ParseForm() - if err != nil { - w.WriteHeader(500) - return - } - - query := r.URL.Query() - enumHeaderStringArray := r.Header.Get("enumHeaderStringArray") - enumHeaderString := r.Header.Get("enumHeaderString") - enumQueryStringArray := strings.Split(query.Get("enumQueryStringArray"), ",") - enumQueryString := query.Get("enumQueryString") - enumQueryInteger := query.Get("enumQueryInteger") - enumQueryDouble := query.Get("enumQueryDouble") - enumFormStringArray := r.FormValue("enumFormStringArray") - enumFormString := r.FormValue("enumFormString") - result, err := c.service.TestEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString) - if err != nil { - w.WriteHeader(500) - return - } - - EncodeJSONResponse(result, nil, w) -} - -// TestGroupParameters - Fake endpoint to test group parameters (optional) -func (c *FakeApiController) TestGroupParameters(w http.ResponseWriter, r *http.Request) { - query := r.URL.Query() - requiredStringGroup := query.Get("requiredStringGroup") - requiredBooleanGroup := r.Header.Get("requiredBooleanGroup") - requiredInt64Group, err := parseIntParameter(query.Get("requiredInt64Group")) - if err != nil { - w.WriteHeader(500) - return - } - - stringGroup := query.Get("stringGroup") - booleanGroup := r.Header.Get("booleanGroup") - int64Group, err := parseIntParameter(query.Get("int64Group")) - if err != nil { - w.WriteHeader(500) - return - } - - result, err := c.service.TestGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group) - if err != nil { - w.WriteHeader(500) - return - } - - EncodeJSONResponse(result, nil, w) -} - -// TestInlineAdditionalProperties - test inline additionalProperties -func (c *FakeApiController) TestInlineAdditionalProperties(w http.ResponseWriter, r *http.Request) { - requestBody := &map[string]string{} - if err := json.NewDecoder(r.Body).Decode(&requestBody); err != nil { - w.WriteHeader(500) - return - } - - result, err := c.service.TestInlineAdditionalProperties(*requestBody) - if err != nil { - w.WriteHeader(500) - return - } - - EncodeJSONResponse(result, nil, w) -} - -// TestJsonFormData - test json serialization of form data -func (c *FakeApiController) TestJsonFormData(w http.ResponseWriter, r *http.Request) { - err := r.ParseForm() - if err != nil { - w.WriteHeader(500) - return - } - - param := r.FormValue("param") - param2 := r.FormValue("param2") - result, err := c.service.TestJsonFormData(param, param2) - if err != nil { - w.WriteHeader(500) - return - } - - EncodeJSONResponse(result, nil, w) -} - -// TestQueryParameterCollectionFormat - -func (c *FakeApiController) TestQueryParameterCollectionFormat(w http.ResponseWriter, r *http.Request) { - query := r.URL.Query() - pipe := strings.Split(query.Get("pipe"), ",") - ioutil := strings.Split(query.Get("ioutil"), ",") - http := strings.Split(query.Get("http"), ",") - url := strings.Split(query.Get("url"), ",") - context := strings.Split(query.Get("context"), ",") - result, err := c.service.TestQueryParameterCollectionFormat(pipe, ioutil, http, url, context) - if err != nil { - w.WriteHeader(500) - return - } - - EncodeJSONResponse(result, nil, w) -} diff --git a/samples/openapi3/server/petstore/go-api-server/go/api_fake_classname_tags123.go b/samples/openapi3/server/petstore/go-api-server/go/api_fake_classname_tags123.go deleted file mode 100644 index 998465c23a4..00000000000 --- a/samples/openapi3/server/petstore/go-api-server/go/api_fake_classname_tags123.go +++ /dev/null @@ -1,57 +0,0 @@ -/* - * 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: \" \\ - * - * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package petstoreserver - -import ( - "encoding/json" - "net/http" - "strings" - - "github.com/gorilla/mux" -) - -// A FakeClassnameTags123ApiController binds http requests to an api service and writes the service results to the http response -type FakeClassnameTags123ApiController struct { - service FakeClassnameTags123ApiServicer -} - -// NewFakeClassnameTags123ApiController creates a default api controller -func NewFakeClassnameTags123ApiController(s FakeClassnameTags123ApiServicer) Router { - return &FakeClassnameTags123ApiController{ service: s } -} - -// Routes returns all of the api route for the FakeClassnameTags123ApiController -func (c *FakeClassnameTags123ApiController) Routes() Routes { - return Routes{ - { - "TestClassname", - strings.ToUpper("Patch"), - "/v2/fake_classname_test", - c.TestClassname, - }, - } -} - -// TestClassname - To test class name in snake case -func (c *FakeClassnameTags123ApiController) TestClassname(w http.ResponseWriter, r *http.Request) { - client := &Client{} - if err := json.NewDecoder(r.Body).Decode(&client); err != nil { - w.WriteHeader(500) - return - } - - result, err := c.service.TestClassname(*client) - if err != nil { - w.WriteHeader(500) - return - } - - EncodeJSONResponse(result, nil, w) -} diff --git a/samples/openapi3/server/petstore/go-api-server/go/api_pet.go b/samples/openapi3/server/petstore/go-api-server/go/api_pet.go deleted file mode 100644 index 867c12e0895..00000000000 --- a/samples/openapi3/server/petstore/go-api-server/go/api_pet.go +++ /dev/null @@ -1,273 +0,0 @@ -/* - * 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: \" \\ - * - * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package petstoreserver - -import ( - "encoding/json" - "net/http" - "strings" - - "github.com/gorilla/mux" -) - -// A PetApiController binds http requests to an api service and writes the service results to the http response -type PetApiController struct { - service PetApiServicer -} - -// NewPetApiController creates a default api controller -func NewPetApiController(s PetApiServicer) Router { - return &PetApiController{ service: s } -} - -// Routes returns all of the api route for the PetApiController -func (c *PetApiController) Routes() Routes { - return Routes{ - { - "AddPet", - strings.ToUpper("Post"), - "/v2/pet", - c.AddPet, - }, - { - "DeletePet", - strings.ToUpper("Delete"), - "/v2/pet/{petId}", - c.DeletePet, - }, - { - "FindPetsByStatus", - strings.ToUpper("Get"), - "/v2/pet/findByStatus", - c.FindPetsByStatus, - }, - { - "FindPetsByTags", - strings.ToUpper("Get"), - "/v2/pet/findByTags", - c.FindPetsByTags, - }, - { - "GetPetById", - strings.ToUpper("Get"), - "/v2/pet/{petId}", - c.GetPetById, - }, - { - "UpdatePet", - strings.ToUpper("Put"), - "/v2/pet", - c.UpdatePet, - }, - { - "UpdatePetWithForm", - strings.ToUpper("Post"), - "/v2/pet/{petId}", - c.UpdatePetWithForm, - }, - { - "UploadFile", - strings.ToUpper("Post"), - "/v2/pet/{petId}/uploadImage", - c.UploadFile, - }, - { - "UploadFileWithRequiredFile", - strings.ToUpper("Post"), - "/v2/fake/{petId}/uploadImageWithRequiredFile", - c.UploadFileWithRequiredFile, - }, - } -} - -// AddPet - Add a new pet to the store -func (c *PetApiController) AddPet(w http.ResponseWriter, r *http.Request) { - pet := &Pet{} - if err := json.NewDecoder(r.Body).Decode(&pet); err != nil { - w.WriteHeader(500) - return - } - - result, err := c.service.AddPet(*pet) - if err != nil { - w.WriteHeader(500) - return - } - - EncodeJSONResponse(result, nil, w) -} - -// DeletePet - Deletes a pet -func (c *PetApiController) DeletePet(w http.ResponseWriter, r *http.Request) { - params := mux.Vars(r) - petId, err := parseIntParameter(params["petId"]) - if err != nil { - w.WriteHeader(500) - return - } - - apiKey := r.Header.Get("apiKey") - result, err := c.service.DeletePet(petId, apiKey) - if err != nil { - w.WriteHeader(500) - return - } - - EncodeJSONResponse(result, nil, w) -} - -// FindPetsByStatus - Finds Pets by status -func (c *PetApiController) FindPetsByStatus(w http.ResponseWriter, r *http.Request) { - query := r.URL.Query() - status := strings.Split(query.Get("status"), ",") - result, err := c.service.FindPetsByStatus(status) - if err != nil { - w.WriteHeader(500) - return - } - - EncodeJSONResponse(result, nil, w) -} - -// FindPetsByTags - Finds Pets by tags -func (c *PetApiController) FindPetsByTags(w http.ResponseWriter, r *http.Request) { - query := r.URL.Query() - tags := strings.Split(query.Get("tags"), ",") - result, err := c.service.FindPetsByTags(tags) - if err != nil { - w.WriteHeader(500) - return - } - - EncodeJSONResponse(result, nil, w) -} - -// GetPetById - Find pet by ID -func (c *PetApiController) GetPetById(w http.ResponseWriter, r *http.Request) { - params := mux.Vars(r) - petId, err := parseIntParameter(params["petId"]) - if err != nil { - w.WriteHeader(500) - return - } - - result, err := c.service.GetPetById(petId) - if err != nil { - w.WriteHeader(500) - return - } - - EncodeJSONResponse(result, nil, w) -} - -// UpdatePet - Update an existing pet -func (c *PetApiController) UpdatePet(w http.ResponseWriter, r *http.Request) { - pet := &Pet{} - if err := json.NewDecoder(r.Body).Decode(&pet); err != nil { - w.WriteHeader(500) - return - } - - result, err := c.service.UpdatePet(*pet) - if err != nil { - w.WriteHeader(500) - return - } - - EncodeJSONResponse(result, nil, w) -} - -// UpdatePetWithForm - Updates a pet in the store with form data -func (c *PetApiController) UpdatePetWithForm(w http.ResponseWriter, r *http.Request) { - err := r.ParseForm() - if err != nil { - w.WriteHeader(500) - return - } - - params := mux.Vars(r) - petId, err := parseIntParameter(params["petId"]) - if err != nil { - w.WriteHeader(500) - return - } - - name := r.FormValue("name") - status := r.FormValue("status") - result, err := c.service.UpdatePetWithForm(petId, name, status) - if err != nil { - w.WriteHeader(500) - return - } - - EncodeJSONResponse(result, nil, w) -} - -// UploadFile - uploads an image -func (c *PetApiController) UploadFile(w http.ResponseWriter, r *http.Request) { - err := r.ParseForm() - if err != nil { - w.WriteHeader(500) - return - } - - params := mux.Vars(r) - petId, err := parseIntParameter(params["petId"]) - if err != nil { - w.WriteHeader(500) - return - } - - additionalMetadata := r.FormValue("additionalMetadata") - file, err := ReadFormFileToTempFile(r, "file") - if err != nil { - w.WriteHeader(500) - return - } - - result, err := c.service.UploadFile(petId, additionalMetadata, file) - if err != nil { - w.WriteHeader(500) - return - } - - EncodeJSONResponse(result, nil, w) -} - -// UploadFileWithRequiredFile - uploads an image (required) -func (c *PetApiController) UploadFileWithRequiredFile(w http.ResponseWriter, r *http.Request) { - err := r.ParseForm() - if err != nil { - w.WriteHeader(500) - return - } - - params := mux.Vars(r) - petId, err := parseIntParameter(params["petId"]) - if err != nil { - w.WriteHeader(500) - return - } - - requiredFile, err := ReadFormFileToTempFile(r, "requiredFile") - if err != nil { - w.WriteHeader(500) - return - } - - additionalMetadata := r.FormValue("additionalMetadata") - result, err := c.service.UploadFileWithRequiredFile(petId, requiredFile, additionalMetadata) - if err != nil { - w.WriteHeader(500) - return - } - - EncodeJSONResponse(result, nil, w) -} diff --git a/samples/openapi3/server/petstore/go-api-server/go/api_store.go b/samples/openapi3/server/petstore/go-api-server/go/api_store.go deleted file mode 100644 index 5867035964e..00000000000 --- a/samples/openapi3/server/petstore/go-api-server/go/api_store.go +++ /dev/null @@ -1,117 +0,0 @@ -/* - * 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: \" \\ - * - * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package petstoreserver - -import ( - "encoding/json" - "net/http" - "strings" - - "github.com/gorilla/mux" -) - -// A StoreApiController binds http requests to an api service and writes the service results to the http response -type StoreApiController struct { - service StoreApiServicer -} - -// NewStoreApiController creates a default api controller -func NewStoreApiController(s StoreApiServicer) Router { - return &StoreApiController{ service: s } -} - -// Routes returns all of the api route for the StoreApiController -func (c *StoreApiController) Routes() Routes { - return Routes{ - { - "DeleteOrder", - strings.ToUpper("Delete"), - "/v2/store/order/{order_id}", - c.DeleteOrder, - }, - { - "GetInventory", - strings.ToUpper("Get"), - "/v2/store/inventory", - c.GetInventory, - }, - { - "GetOrderById", - strings.ToUpper("Get"), - "/v2/store/order/{order_id}", - c.GetOrderById, - }, - { - "PlaceOrder", - strings.ToUpper("Post"), - "/v2/store/order", - c.PlaceOrder, - }, - } -} - -// DeleteOrder - Delete purchase order by ID -func (c *StoreApiController) DeleteOrder(w http.ResponseWriter, r *http.Request) { - params := mux.Vars(r) - orderId := params["orderId"] - result, err := c.service.DeleteOrder(orderId) - if err != nil { - w.WriteHeader(500) - return - } - - EncodeJSONResponse(result, nil, w) -} - -// GetInventory - Returns pet inventories by status -func (c *StoreApiController) GetInventory(w http.ResponseWriter, r *http.Request) { - result, err := c.service.GetInventory() - if err != nil { - w.WriteHeader(500) - return - } - - EncodeJSONResponse(result, nil, w) -} - -// GetOrderById - Find purchase order by ID -func (c *StoreApiController) GetOrderById(w http.ResponseWriter, r *http.Request) { - params := mux.Vars(r) - orderId, err := parseIntParameter(params["orderId"]) - if err != nil { - w.WriteHeader(500) - return - } - - result, err := c.service.GetOrderById(orderId) - if err != nil { - w.WriteHeader(500) - return - } - - EncodeJSONResponse(result, nil, w) -} - -// PlaceOrder - Place an order for a pet -func (c *StoreApiController) PlaceOrder(w http.ResponseWriter, r *http.Request) { - order := &Order{} - if err := json.NewDecoder(r.Body).Decode(&order); err != nil { - w.WriteHeader(500) - return - } - - result, err := c.service.PlaceOrder(*order) - if err != nil { - w.WriteHeader(500) - return - } - - EncodeJSONResponse(result, nil, w) -} diff --git a/samples/openapi3/server/petstore/go-api-server/go/api_user.go b/samples/openapi3/server/petstore/go-api-server/go/api_user.go deleted file mode 100644 index 35fd6713eb7..00000000000 --- a/samples/openapi3/server/petstore/go-api-server/go/api_user.go +++ /dev/null @@ -1,203 +0,0 @@ -/* - * 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: \" \\ - * - * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package petstoreserver - -import ( - "encoding/json" - "net/http" - "strings" - - "github.com/gorilla/mux" -) - -// A UserApiController binds http requests to an api service and writes the service results to the http response -type UserApiController struct { - service UserApiServicer -} - -// NewUserApiController creates a default api controller -func NewUserApiController(s UserApiServicer) Router { - return &UserApiController{ service: s } -} - -// Routes returns all of the api route for the UserApiController -func (c *UserApiController) Routes() Routes { - return Routes{ - { - "CreateUser", - strings.ToUpper("Post"), - "/v2/user", - c.CreateUser, - }, - { - "CreateUsersWithArrayInput", - strings.ToUpper("Post"), - "/v2/user/createWithArray", - c.CreateUsersWithArrayInput, - }, - { - "CreateUsersWithListInput", - strings.ToUpper("Post"), - "/v2/user/createWithList", - c.CreateUsersWithListInput, - }, - { - "DeleteUser", - strings.ToUpper("Delete"), - "/v2/user/{username}", - c.DeleteUser, - }, - { - "GetUserByName", - strings.ToUpper("Get"), - "/v2/user/{username}", - c.GetUserByName, - }, - { - "LoginUser", - strings.ToUpper("Get"), - "/v2/user/login", - c.LoginUser, - }, - { - "LogoutUser", - strings.ToUpper("Get"), - "/v2/user/logout", - c.LogoutUser, - }, - { - "UpdateUser", - strings.ToUpper("Put"), - "/v2/user/{username}", - c.UpdateUser, - }, - } -} - -// CreateUser - Create user -func (c *UserApiController) CreateUser(w http.ResponseWriter, r *http.Request) { - user := &User{} - if err := json.NewDecoder(r.Body).Decode(&user); err != nil { - w.WriteHeader(500) - return - } - - result, err := c.service.CreateUser(*user) - if err != nil { - w.WriteHeader(500) - return - } - - EncodeJSONResponse(result, nil, w) -} - -// CreateUsersWithArrayInput - Creates list of users with given input array -func (c *UserApiController) CreateUsersWithArrayInput(w http.ResponseWriter, r *http.Request) { - user := &[]User{} - if err := json.NewDecoder(r.Body).Decode(&user); err != nil { - w.WriteHeader(500) - return - } - - result, err := c.service.CreateUsersWithArrayInput(*user) - if err != nil { - w.WriteHeader(500) - return - } - - EncodeJSONResponse(result, nil, w) -} - -// CreateUsersWithListInput - Creates list of users with given input array -func (c *UserApiController) CreateUsersWithListInput(w http.ResponseWriter, r *http.Request) { - user := &[]User{} - if err := json.NewDecoder(r.Body).Decode(&user); err != nil { - w.WriteHeader(500) - return - } - - result, err := c.service.CreateUsersWithListInput(*user) - if err != nil { - w.WriteHeader(500) - return - } - - EncodeJSONResponse(result, nil, w) -} - -// DeleteUser - Delete user -func (c *UserApiController) DeleteUser(w http.ResponseWriter, r *http.Request) { - params := mux.Vars(r) - username := params["username"] - result, err := c.service.DeleteUser(username) - if err != nil { - w.WriteHeader(500) - return - } - - EncodeJSONResponse(result, nil, w) -} - -// GetUserByName - Get user by user name -func (c *UserApiController) GetUserByName(w http.ResponseWriter, r *http.Request) { - params := mux.Vars(r) - username := params["username"] - result, err := c.service.GetUserByName(username) - if err != nil { - w.WriteHeader(500) - return - } - - EncodeJSONResponse(result, nil, w) -} - -// LoginUser - Logs user into the system -func (c *UserApiController) LoginUser(w http.ResponseWriter, r *http.Request) { - query := r.URL.Query() - username := query.Get("username") - password := query.Get("password") - result, err := c.service.LoginUser(username, password) - if err != nil { - w.WriteHeader(500) - return - } - - EncodeJSONResponse(result, nil, w) -} - -// LogoutUser - Logs out current logged in user session -func (c *UserApiController) LogoutUser(w http.ResponseWriter, r *http.Request) { - result, err := c.service.LogoutUser() - if err != nil { - w.WriteHeader(500) - return - } - - EncodeJSONResponse(result, nil, w) -} - -// UpdateUser - Updated user -func (c *UserApiController) UpdateUser(w http.ResponseWriter, r *http.Request) { - params := mux.Vars(r) - username := params["username"] - user := &User{} - if err := json.NewDecoder(r.Body).Decode(&user); err != nil { - w.WriteHeader(500) - return - } - - result, err := c.service.UpdateUser(username, *user) - if err != nil { - w.WriteHeader(500) - return - } - - EncodeJSONResponse(result, nil, w) -} diff --git a/samples/openapi3/server/petstore/go-api-server/go/logger.go b/samples/openapi3/server/petstore/go-api-server/go/logger.go deleted file mode 100644 index 644ec5e51fb..00000000000 --- a/samples/openapi3/server/petstore/go-api-server/go/logger.go +++ /dev/null @@ -1,32 +0,0 @@ -/* - * 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: \" \\ - * - * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package petstoreserver - -import ( - "log" - "net/http" - "time" -) - -func Logger(inner http.Handler, name string) http.Handler { - return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - start := time.Now() - - inner.ServeHTTP(w, r) - - log.Printf( - "%s %s %s %s", - r.Method, - r.RequestURI, - name, - time.Since(start), - ) - }) -} diff --git a/samples/openapi3/server/petstore/go-api-server/go/model_200_response.go b/samples/openapi3/server/petstore/go-api-server/go/model_200_response.go deleted file mode 100644 index 217fe24e437..00000000000 --- a/samples/openapi3/server/petstore/go-api-server/go/model_200_response.go +++ /dev/null @@ -1,18 +0,0 @@ -/* - * 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: \" \\ - * - * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package petstoreserver - -// Model200Response - Model for testing model name starting with number -type Model200Response struct { - - Name int32 `json:"name,omitempty"` - - Class string `json:"class,omitempty"` -} diff --git a/samples/openapi3/server/petstore/go-api-server/go/model__special_model_name_.go b/samples/openapi3/server/petstore/go-api-server/go/model__special_model_name_.go deleted file mode 100644 index ffc27255ae9..00000000000 --- a/samples/openapi3/server/petstore/go-api-server/go/model__special_model_name_.go +++ /dev/null @@ -1,15 +0,0 @@ -/* - * 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: \" \\ - * - * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package petstoreserver - -type SpecialModelName struct { - - SpecialPropertyName int64 `json:"$special[property.name],omitempty"` -} diff --git a/samples/openapi3/server/petstore/go-api-server/go/model_additional_properties_class.go b/samples/openapi3/server/petstore/go-api-server/go/model_additional_properties_class.go deleted file mode 100644 index 430177a3007..00000000000 --- a/samples/openapi3/server/petstore/go-api-server/go/model_additional_properties_class.go +++ /dev/null @@ -1,17 +0,0 @@ -/* - * 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: \" \\ - * - * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package petstoreserver - -type AdditionalPropertiesClass struct { - - MapProperty map[string]string `json:"map_property,omitempty"` - - MapOfMapProperty map[string]map[string]string `json:"map_of_map_property,omitempty"` -} diff --git a/samples/openapi3/server/petstore/go-api-server/go/model_animal.go b/samples/openapi3/server/petstore/go-api-server/go/model_animal.go deleted file mode 100644 index 14d9295d875..00000000000 --- a/samples/openapi3/server/petstore/go-api-server/go/model_animal.go +++ /dev/null @@ -1,17 +0,0 @@ -/* - * 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: \" \\ - * - * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package petstoreserver - -type Animal struct { - - ClassName string `json:"className"` - - Color string `json:"color,omitempty"` -} diff --git a/samples/openapi3/server/petstore/go-api-server/go/model_api_response.go b/samples/openapi3/server/petstore/go-api-server/go/model_api_response.go deleted file mode 100644 index 380b8dee008..00000000000 --- a/samples/openapi3/server/petstore/go-api-server/go/model_api_response.go +++ /dev/null @@ -1,19 +0,0 @@ -/* - * 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: \" \\ - * - * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package petstoreserver - -type ApiResponse struct { - - Code int32 `json:"code,omitempty"` - - Type string `json:"type,omitempty"` - - Message string `json:"message,omitempty"` -} diff --git a/samples/openapi3/server/petstore/go-api-server/go/model_array_of_array_of_number_only.go b/samples/openapi3/server/petstore/go-api-server/go/model_array_of_array_of_number_only.go deleted file mode 100644 index e0347d8260a..00000000000 --- a/samples/openapi3/server/petstore/go-api-server/go/model_array_of_array_of_number_only.go +++ /dev/null @@ -1,15 +0,0 @@ -/* - * 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: \" \\ - * - * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package petstoreserver - -type ArrayOfArrayOfNumberOnly struct { - - ArrayArrayNumber [][]float32 `json:"ArrayArrayNumber,omitempty"` -} diff --git a/samples/openapi3/server/petstore/go-api-server/go/model_array_of_number_only.go b/samples/openapi3/server/petstore/go-api-server/go/model_array_of_number_only.go deleted file mode 100644 index 04d7c86a5e1..00000000000 --- a/samples/openapi3/server/petstore/go-api-server/go/model_array_of_number_only.go +++ /dev/null @@ -1,15 +0,0 @@ -/* - * 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: \" \\ - * - * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package petstoreserver - -type ArrayOfNumberOnly struct { - - ArrayNumber []float32 `json:"ArrayNumber,omitempty"` -} diff --git a/samples/openapi3/server/petstore/go-api-server/go/model_array_test_.go b/samples/openapi3/server/petstore/go-api-server/go/model_array_test_.go deleted file mode 100644 index a85e460d8c7..00000000000 --- a/samples/openapi3/server/petstore/go-api-server/go/model_array_test_.go +++ /dev/null @@ -1,19 +0,0 @@ -/* - * 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: \" \\ - * - * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package petstoreserver - -type ArrayTest struct { - - ArrayOfString []string `json:"array_of_string,omitempty"` - - ArrayArrayOfInteger [][]int64 `json:"array_array_of_integer,omitempty"` - - ArrayArrayOfModel [][]ReadOnlyFirst `json:"array_array_of_model,omitempty"` -} diff --git a/samples/openapi3/server/petstore/go-api-server/go/model_capitalization.go b/samples/openapi3/server/petstore/go-api-server/go/model_capitalization.go deleted file mode 100644 index 1e1cb8acc3f..00000000000 --- a/samples/openapi3/server/petstore/go-api-server/go/model_capitalization.go +++ /dev/null @@ -1,26 +0,0 @@ -/* - * 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: \" \\ - * - * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package petstoreserver - -type Capitalization struct { - - SmallCamel string `json:"smallCamel,omitempty"` - - CapitalCamel string `json:"CapitalCamel,omitempty"` - - SmallSnake string `json:"small_Snake,omitempty"` - - CapitalSnake string `json:"Capital_Snake,omitempty"` - - SCAETHFlowPoints string `json:"SCA_ETH_Flow_Points,omitempty"` - - // Name of the pet - ATT_NAME string `json:"ATT_NAME,omitempty"` -} diff --git a/samples/openapi3/server/petstore/go-api-server/go/model_cat.go b/samples/openapi3/server/petstore/go-api-server/go/model_cat.go deleted file mode 100644 index 78261ede612..00000000000 --- a/samples/openapi3/server/petstore/go-api-server/go/model_cat.go +++ /dev/null @@ -1,19 +0,0 @@ -/* - * 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: \" \\ - * - * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package petstoreserver - -type Cat struct { - - ClassName string `json:"className"` - - Color string `json:"color,omitempty"` - - Declawed bool `json:"declawed,omitempty"` -} diff --git a/samples/openapi3/server/petstore/go-api-server/go/model_cat_all_of.go b/samples/openapi3/server/petstore/go-api-server/go/model_cat_all_of.go deleted file mode 100644 index 312c33895f8..00000000000 --- a/samples/openapi3/server/petstore/go-api-server/go/model_cat_all_of.go +++ /dev/null @@ -1,15 +0,0 @@ -/* - * 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: \" \\ - * - * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package petstoreserver - -type CatAllOf struct { - - Declawed bool `json:"declawed,omitempty"` -} diff --git a/samples/openapi3/server/petstore/go-api-server/go/model_category.go b/samples/openapi3/server/petstore/go-api-server/go/model_category.go deleted file mode 100644 index 373c419af55..00000000000 --- a/samples/openapi3/server/petstore/go-api-server/go/model_category.go +++ /dev/null @@ -1,17 +0,0 @@ -/* - * 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: \" \\ - * - * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package petstoreserver - -type Category struct { - - Id int64 `json:"id,omitempty"` - - Name string `json:"name"` -} diff --git a/samples/openapi3/server/petstore/go-api-server/go/model_class_model.go b/samples/openapi3/server/petstore/go-api-server/go/model_class_model.go deleted file mode 100644 index d9fcd475b7b..00000000000 --- a/samples/openapi3/server/petstore/go-api-server/go/model_class_model.go +++ /dev/null @@ -1,16 +0,0 @@ -/* - * 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: \" \\ - * - * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package petstoreserver - -// ClassModel - Model for testing model with \"_class\" property -type ClassModel struct { - - Class string `json:"_class,omitempty"` -} diff --git a/samples/openapi3/server/petstore/go-api-server/go/model_client.go b/samples/openapi3/server/petstore/go-api-server/go/model_client.go deleted file mode 100644 index f49c616f021..00000000000 --- a/samples/openapi3/server/petstore/go-api-server/go/model_client.go +++ /dev/null @@ -1,15 +0,0 @@ -/* - * 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: \" \\ - * - * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package petstoreserver - -type Client struct { - - Client string `json:"client,omitempty"` -} diff --git a/samples/openapi3/server/petstore/go-api-server/go/model_dog.go b/samples/openapi3/server/petstore/go-api-server/go/model_dog.go deleted file mode 100644 index 04b2a9ba9aa..00000000000 --- a/samples/openapi3/server/petstore/go-api-server/go/model_dog.go +++ /dev/null @@ -1,19 +0,0 @@ -/* - * 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: \" \\ - * - * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package petstoreserver - -type Dog struct { - - ClassName string `json:"className"` - - Color string `json:"color,omitempty"` - - Breed string `json:"breed,omitempty"` -} diff --git a/samples/openapi3/server/petstore/go-api-server/go/model_dog_all_of.go b/samples/openapi3/server/petstore/go-api-server/go/model_dog_all_of.go deleted file mode 100644 index a36b96b1a0c..00000000000 --- a/samples/openapi3/server/petstore/go-api-server/go/model_dog_all_of.go +++ /dev/null @@ -1,15 +0,0 @@ -/* - * 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: \" \\ - * - * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package petstoreserver - -type DogAllOf struct { - - Breed string `json:"breed,omitempty"` -} diff --git a/samples/openapi3/server/petstore/go-api-server/go/model_enum_arrays.go b/samples/openapi3/server/petstore/go-api-server/go/model_enum_arrays.go deleted file mode 100644 index 813af5d8701..00000000000 --- a/samples/openapi3/server/petstore/go-api-server/go/model_enum_arrays.go +++ /dev/null @@ -1,17 +0,0 @@ -/* - * 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: \" \\ - * - * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package petstoreserver - -type EnumArrays struct { - - JustSymbol string `json:"just_symbol,omitempty"` - - ArrayEnum []string `json:"array_enum,omitempty"` -} diff --git a/samples/openapi3/server/petstore/go-api-server/go/model_enum_class.go b/samples/openapi3/server/petstore/go-api-server/go/model_enum_class.go deleted file mode 100644 index da4428a5d41..00000000000 --- a/samples/openapi3/server/petstore/go-api-server/go/model_enum_class.go +++ /dev/null @@ -1,19 +0,0 @@ -/* - * 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: \" \\ - * - * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package petstoreserver - -type EnumClass string - -// List of EnumClass -const ( - ABC EnumClass = "_abc" - EFG EnumClass = "-efg" - XYZ EnumClass = "(xyz)" -) diff --git a/samples/openapi3/server/petstore/go-api-server/go/model_enum_test_.go b/samples/openapi3/server/petstore/go-api-server/go/model_enum_test_.go deleted file mode 100644 index 7822fd4e9d4..00000000000 --- a/samples/openapi3/server/petstore/go-api-server/go/model_enum_test_.go +++ /dev/null @@ -1,29 +0,0 @@ -/* - * 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: \" \\ - * - * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package petstoreserver - -type EnumTest struct { - - EnumString string `json:"enum_string,omitempty"` - - EnumStringRequired string `json:"enum_string_required"` - - EnumInteger int32 `json:"enum_integer,omitempty"` - - EnumNumber float64 `json:"enum_number,omitempty"` - - OuterEnum *OuterEnum `json:"outerEnum,omitempty"` - - OuterEnumInteger OuterEnumInteger `json:"outerEnumInteger,omitempty"` - - OuterEnumDefaultValue OuterEnumDefaultValue `json:"outerEnumDefaultValue,omitempty"` - - OuterEnumIntegerDefaultValue OuterEnumIntegerDefaultValue `json:"outerEnumIntegerDefaultValue,omitempty"` -} diff --git a/samples/openapi3/server/petstore/go-api-server/go/model_file.go b/samples/openapi3/server/petstore/go-api-server/go/model_file.go deleted file mode 100644 index 9bbc4164c2e..00000000000 --- a/samples/openapi3/server/petstore/go-api-server/go/model_file.go +++ /dev/null @@ -1,17 +0,0 @@ -/* - * 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: \" \\ - * - * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package petstoreserver - -// File - Must be named `File` for test. -type File struct { - - // Test capitalization - SourceURI string `json:"sourceURI,omitempty"` -} diff --git a/samples/openapi3/server/petstore/go-api-server/go/model_file_schema_test_class.go b/samples/openapi3/server/petstore/go-api-server/go/model_file_schema_test_class.go deleted file mode 100644 index c9e7600031e..00000000000 --- a/samples/openapi3/server/petstore/go-api-server/go/model_file_schema_test_class.go +++ /dev/null @@ -1,17 +0,0 @@ -/* - * 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: \" \\ - * - * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package petstoreserver - -type FileSchemaTestClass struct { - - File File `json:"file,omitempty"` - - Files []File `json:"files,omitempty"` -} diff --git a/samples/openapi3/server/petstore/go-api-server/go/model_foo.go b/samples/openapi3/server/petstore/go-api-server/go/model_foo.go deleted file mode 100644 index 9e85ac9ab6c..00000000000 --- a/samples/openapi3/server/petstore/go-api-server/go/model_foo.go +++ /dev/null @@ -1,15 +0,0 @@ -/* - * 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: \" \\ - * - * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package petstoreserver - -type Foo struct { - - Bar string `json:"bar,omitempty"` -} diff --git a/samples/openapi3/server/petstore/go-api-server/go/model_format_test_.go b/samples/openapi3/server/petstore/go-api-server/go/model_format_test_.go deleted file mode 100644 index eaa3ce019a7..00000000000 --- a/samples/openapi3/server/petstore/go-api-server/go/model_format_test_.go +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 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: \" \\ - * - * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package petstoreserver - -import ( - "os" - "time" -) - -type FormatTest struct { - - Integer int32 `json:"integer,omitempty"` - - Int32 int32 `json:"int32,omitempty"` - - Int64 int64 `json:"int64,omitempty"` - - Number float32 `json:"number"` - - Float float32 `json:"float,omitempty"` - - Double float64 `json:"double,omitempty"` - - String string `json:"string,omitempty"` - - Byte string `json:"byte"` - - Binary *os.File `json:"binary,omitempty"` - - Date string `json:"date"` - - DateTime time.Time `json:"dateTime,omitempty"` - - Uuid string `json:"uuid,omitempty"` - - Password string `json:"password"` - - // A string that is a 10 digit number. Can have leading zeros. - PatternWithDigits string `json:"pattern_with_digits,omitempty"` - - // A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. - PatternWithDigitsAndDelimiter string `json:"pattern_with_digits_and_delimiter,omitempty"` -} diff --git a/samples/openapi3/server/petstore/go-api-server/go/model_has_only_read_only.go b/samples/openapi3/server/petstore/go-api-server/go/model_has_only_read_only.go deleted file mode 100644 index d64b0e012c7..00000000000 --- a/samples/openapi3/server/petstore/go-api-server/go/model_has_only_read_only.go +++ /dev/null @@ -1,17 +0,0 @@ -/* - * 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: \" \\ - * - * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package petstoreserver - -type HasOnlyReadOnly struct { - - Bar string `json:"bar,omitempty"` - - Foo string `json:"foo,omitempty"` -} diff --git a/samples/openapi3/server/petstore/go-api-server/go/model_health_check_result.go b/samples/openapi3/server/petstore/go-api-server/go/model_health_check_result.go deleted file mode 100644 index 9cebb74d3cb..00000000000 --- a/samples/openapi3/server/petstore/go-api-server/go/model_health_check_result.go +++ /dev/null @@ -1,16 +0,0 @@ -/* - * 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: \" \\ - * - * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package petstoreserver - -// HealthCheckResult - Just a string to inform instance is up and running. Make it nullable in hope to get it as pointer in generated model. -type HealthCheckResult struct { - - NullableMessage *string `json:"NullableMessage,omitempty"` -} diff --git a/samples/openapi3/server/petstore/go-api-server/go/model_inline_object_2.go b/samples/openapi3/server/petstore/go-api-server/go/model_inline_object_2.go deleted file mode 100644 index 3babd0cfac9..00000000000 --- a/samples/openapi3/server/petstore/go-api-server/go/model_inline_object_2.go +++ /dev/null @@ -1,19 +0,0 @@ -/* - * 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: \" \\ - * - * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package petstoreserver - -type InlineObject2 struct { - - // Form parameter enum test (string array) - EnumFormStringArray []string `json:"enum_form_string_array,omitempty"` - - // Form parameter enum test (string) - EnumFormString string `json:"enum_form_string,omitempty"` -} diff --git a/samples/openapi3/server/petstore/go-api-server/go/model_inline_object_3.go b/samples/openapi3/server/petstore/go-api-server/go/model_inline_object_3.go deleted file mode 100644 index 226092059da..00000000000 --- a/samples/openapi3/server/petstore/go-api-server/go/model_inline_object_3.go +++ /dev/null @@ -1,60 +0,0 @@ -/* - * 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: \" \\ - * - * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package petstoreserver - -import ( - "os" - "time" -) - -type InlineObject3 struct { - - // None - Integer int32 `json:"integer,omitempty"` - - // None - Int32 int32 `json:"int32,omitempty"` - - // None - Int64 int64 `json:"int64,omitempty"` - - // None - Number float32 `json:"number"` - - // None - Float float32 `json:"float,omitempty"` - - // None - Double float64 `json:"double"` - - // None - String string `json:"string,omitempty"` - - // None - PatternWithoutDelimiter string `json:"pattern_without_delimiter"` - - // None - Byte string `json:"byte"` - - // None - Binary *os.File `json:"binary,omitempty"` - - // None - Date string `json:"date,omitempty"` - - // None - DateTime time.Time `json:"dateTime,omitempty"` - - // None - Password string `json:"password,omitempty"` - - // None - Callback string `json:"callback,omitempty"` -} diff --git a/samples/openapi3/server/petstore/go-api-server/go/model_inline_object_4.go b/samples/openapi3/server/petstore/go-api-server/go/model_inline_object_4.go deleted file mode 100644 index 23db282a2e1..00000000000 --- a/samples/openapi3/server/petstore/go-api-server/go/model_inline_object_4.go +++ /dev/null @@ -1,19 +0,0 @@ -/* - * 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: \" \\ - * - * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package petstoreserver - -type InlineObject4 struct { - - // field1 - Param string `json:"param"` - - // field2 - Param2 string `json:"param2"` -} diff --git a/samples/openapi3/server/petstore/go-api-server/go/model_inline_object_5.go b/samples/openapi3/server/petstore/go-api-server/go/model_inline_object_5.go deleted file mode 100644 index 8004ded7ce5..00000000000 --- a/samples/openapi3/server/petstore/go-api-server/go/model_inline_object_5.go +++ /dev/null @@ -1,23 +0,0 @@ -/* - * 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: \" \\ - * - * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package petstoreserver - -import ( - "os" -) - -type InlineObject5 struct { - - // Additional data to pass to server - AdditionalMetadata string `json:"additionalMetadata,omitempty"` - - // file to upload - RequiredFile *os.File `json:"requiredFile"` -} diff --git a/samples/openapi3/server/petstore/go-api-server/go/model_inline_response_default.go b/samples/openapi3/server/petstore/go-api-server/go/model_inline_response_default.go deleted file mode 100644 index 50f4bb4f2bd..00000000000 --- a/samples/openapi3/server/petstore/go-api-server/go/model_inline_response_default.go +++ /dev/null @@ -1,15 +0,0 @@ -/* - * 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: \" \\ - * - * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package petstoreserver - -type InlineResponseDefault struct { - - String Foo `json:"string,omitempty"` -} diff --git a/samples/openapi3/server/petstore/go-api-server/go/model_list.go b/samples/openapi3/server/petstore/go-api-server/go/model_list.go deleted file mode 100644 index a6bf160a13c..00000000000 --- a/samples/openapi3/server/petstore/go-api-server/go/model_list.go +++ /dev/null @@ -1,15 +0,0 @@ -/* - * 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: \" \\ - * - * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package petstoreserver - -type List struct { - - Var123List string `json:"123-list,omitempty"` -} diff --git a/samples/openapi3/server/petstore/go-api-server/go/model_map_test_.go b/samples/openapi3/server/petstore/go-api-server/go/model_map_test_.go deleted file mode 100644 index 49a86a792ac..00000000000 --- a/samples/openapi3/server/petstore/go-api-server/go/model_map_test_.go +++ /dev/null @@ -1,21 +0,0 @@ -/* - * 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: \" \\ - * - * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package petstoreserver - -type MapTest struct { - - MapMapOfString map[string]map[string]string `json:"map_map_of_string,omitempty"` - - MapOfEnumString map[string]string `json:"map_of_enum_string,omitempty"` - - DirectMap map[string]bool `json:"direct_map,omitempty"` - - IndirectMap map[string]bool `json:"indirect_map,omitempty"` -} diff --git a/samples/openapi3/server/petstore/go-api-server/go/model_mixed_properties_and_additional_properties_class.go b/samples/openapi3/server/petstore/go-api-server/go/model_mixed_properties_and_additional_properties_class.go deleted file mode 100644 index e25d32587cd..00000000000 --- a/samples/openapi3/server/petstore/go-api-server/go/model_mixed_properties_and_additional_properties_class.go +++ /dev/null @@ -1,23 +0,0 @@ -/* - * 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: \" \\ - * - * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package petstoreserver - -import ( - "time" -) - -type MixedPropertiesAndAdditionalPropertiesClass struct { - - Uuid string `json:"uuid,omitempty"` - - DateTime time.Time `json:"dateTime,omitempty"` - - Map map[string]Animal `json:"map,omitempty"` -} diff --git a/samples/openapi3/server/petstore/go-api-server/go/model_name.go b/samples/openapi3/server/petstore/go-api-server/go/model_name.go deleted file mode 100644 index cd9a874c419..00000000000 --- a/samples/openapi3/server/petstore/go-api-server/go/model_name.go +++ /dev/null @@ -1,22 +0,0 @@ -/* - * 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: \" \\ - * - * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package petstoreserver - -// Name - Model for testing model name same as property name -type Name struct { - - Name int32 `json:"name"` - - SnakeCase int32 `json:"snake_case,omitempty"` - - Property string `json:"property,omitempty"` - - Var123Number int32 `json:"123Number,omitempty"` -} diff --git a/samples/openapi3/server/petstore/go-api-server/go/model_nullable_class.go b/samples/openapi3/server/petstore/go-api-server/go/model_nullable_class.go deleted file mode 100644 index ba2aa1f86cf..00000000000 --- a/samples/openapi3/server/petstore/go-api-server/go/model_nullable_class.go +++ /dev/null @@ -1,41 +0,0 @@ -/* - * 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: \" \\ - * - * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package petstoreserver - -import ( - "time" -) - -type NullableClass struct { - - IntegerProp *int32 `json:"integer_prop,omitempty"` - - NumberProp *float32 `json:"number_prop,omitempty"` - - BooleanProp *bool `json:"boolean_prop,omitempty"` - - StringProp *string `json:"string_prop,omitempty"` - - DateProp *string `json:"date_prop,omitempty"` - - DatetimeProp *time.Time `json:"datetime_prop,omitempty"` - - ArrayNullableProp *[]map[string]interface{} `json:"array_nullable_prop,omitempty"` - - ArrayAndItemsNullableProp *[]map[string]interface{} `json:"array_and_items_nullable_prop,omitempty"` - - ArrayItemsNullable []map[string]interface{} `json:"array_items_nullable,omitempty"` - - ObjectNullableProp *map[string]map[string]interface{} `json:"object_nullable_prop,omitempty"` - - ObjectAndItemsNullableProp *map[string]map[string]interface{} `json:"object_and_items_nullable_prop,omitempty"` - - ObjectItemsNullable map[string]map[string]interface{} `json:"object_items_nullable,omitempty"` -} diff --git a/samples/openapi3/server/petstore/go-api-server/go/model_number_only.go b/samples/openapi3/server/petstore/go-api-server/go/model_number_only.go deleted file mode 100644 index ba6f4af6401..00000000000 --- a/samples/openapi3/server/petstore/go-api-server/go/model_number_only.go +++ /dev/null @@ -1,15 +0,0 @@ -/* - * 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: \" \\ - * - * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package petstoreserver - -type NumberOnly struct { - - JustNumber float32 `json:"JustNumber,omitempty"` -} diff --git a/samples/openapi3/server/petstore/go-api-server/go/model_order.go b/samples/openapi3/server/petstore/go-api-server/go/model_order.go deleted file mode 100644 index 6849a9f76d6..00000000000 --- a/samples/openapi3/server/petstore/go-api-server/go/model_order.go +++ /dev/null @@ -1,30 +0,0 @@ -/* - * 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: \" \\ - * - * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package petstoreserver - -import ( - "time" -) - -type Order struct { - - Id int64 `json:"id,omitempty"` - - PetId int64 `json:"petId,omitempty"` - - Quantity int32 `json:"quantity,omitempty"` - - ShipDate time.Time `json:"shipDate,omitempty"` - - // Order Status - Status string `json:"status,omitempty"` - - Complete bool `json:"complete,omitempty"` -} diff --git a/samples/openapi3/server/petstore/go-api-server/go/model_outer_composite.go b/samples/openapi3/server/petstore/go-api-server/go/model_outer_composite.go deleted file mode 100644 index 7534db47c2e..00000000000 --- a/samples/openapi3/server/petstore/go-api-server/go/model_outer_composite.go +++ /dev/null @@ -1,19 +0,0 @@ -/* - * 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: \" \\ - * - * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package petstoreserver - -type OuterComposite struct { - - MyNumber float32 `json:"my_number,omitempty"` - - MyString string `json:"my_string,omitempty"` - - MyBoolean bool `json:"my_boolean,omitempty"` -} diff --git a/samples/openapi3/server/petstore/go-api-server/go/model_outer_enum.go b/samples/openapi3/server/petstore/go-api-server/go/model_outer_enum.go deleted file mode 100644 index d01d988ccda..00000000000 --- a/samples/openapi3/server/petstore/go-api-server/go/model_outer_enum.go +++ /dev/null @@ -1,19 +0,0 @@ -/* - * 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: \" \\ - * - * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package petstoreserver - -type OuterEnum string - -// List of OuterEnum -const ( - PLACED OuterEnum = "placed" - APPROVED OuterEnum = "approved" - DELIVERED OuterEnum = "delivered" -) diff --git a/samples/openapi3/server/petstore/go-api-server/go/model_outer_enum_default_value.go b/samples/openapi3/server/petstore/go-api-server/go/model_outer_enum_default_value.go deleted file mode 100644 index 12881121ff3..00000000000 --- a/samples/openapi3/server/petstore/go-api-server/go/model_outer_enum_default_value.go +++ /dev/null @@ -1,19 +0,0 @@ -/* - * 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: \" \\ - * - * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package petstoreserver - -type OuterEnumDefaultValue string - -// List of OuterEnumDefaultValue -const ( - PLACED OuterEnumDefaultValue = "placed" - APPROVED OuterEnumDefaultValue = "approved" - DELIVERED OuterEnumDefaultValue = "delivered" -) diff --git a/samples/openapi3/server/petstore/go-api-server/go/model_outer_enum_integer.go b/samples/openapi3/server/petstore/go-api-server/go/model_outer_enum_integer.go deleted file mode 100644 index f14b13342af..00000000000 --- a/samples/openapi3/server/petstore/go-api-server/go/model_outer_enum_integer.go +++ /dev/null @@ -1,19 +0,0 @@ -/* - * 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: \" \\ - * - * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package petstoreserver - -type OuterEnumInteger int32 - -// List of OuterEnumInteger -const ( - _0 OuterEnumInteger = 0 - _1 OuterEnumInteger = 1 - _2 OuterEnumInteger = 2 -) diff --git a/samples/openapi3/server/petstore/go-api-server/go/model_outer_enum_integer_default_value.go b/samples/openapi3/server/petstore/go-api-server/go/model_outer_enum_integer_default_value.go deleted file mode 100644 index 94b4bb2077a..00000000000 --- a/samples/openapi3/server/petstore/go-api-server/go/model_outer_enum_integer_default_value.go +++ /dev/null @@ -1,19 +0,0 @@ -/* - * 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: \" \\ - * - * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package petstoreserver - -type OuterEnumIntegerDefaultValue int32 - -// List of OuterEnumIntegerDefaultValue -const ( - _0 OuterEnumIntegerDefaultValue = 0 - _1 OuterEnumIntegerDefaultValue = 1 - _2 OuterEnumIntegerDefaultValue = 2 -) diff --git a/samples/openapi3/server/petstore/go-api-server/go/model_pet.go b/samples/openapi3/server/petstore/go-api-server/go/model_pet.go deleted file mode 100644 index 2271730674e..00000000000 --- a/samples/openapi3/server/petstore/go-api-server/go/model_pet.go +++ /dev/null @@ -1,26 +0,0 @@ -/* - * 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: \" \\ - * - * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package petstoreserver - -type Pet struct { - - Id int64 `json:"id,omitempty"` - - Category Category `json:"category,omitempty"` - - Name string `json:"name"` - - PhotoUrls []string `json:"photoUrls"` - - Tags []Tag `json:"tags,omitempty"` - - // pet status in the store - Status string `json:"status,omitempty"` -} diff --git a/samples/openapi3/server/petstore/go-api-server/go/model_read_only_first.go b/samples/openapi3/server/petstore/go-api-server/go/model_read_only_first.go deleted file mode 100644 index c4192d91ee2..00000000000 --- a/samples/openapi3/server/petstore/go-api-server/go/model_read_only_first.go +++ /dev/null @@ -1,17 +0,0 @@ -/* - * 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: \" \\ - * - * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package petstoreserver - -type ReadOnlyFirst struct { - - Bar string `json:"bar,omitempty"` - - Baz string `json:"baz,omitempty"` -} diff --git a/samples/openapi3/server/petstore/go-api-server/go/model_return.go b/samples/openapi3/server/petstore/go-api-server/go/model_return.go deleted file mode 100644 index 0ff664525de..00000000000 --- a/samples/openapi3/server/petstore/go-api-server/go/model_return.go +++ /dev/null @@ -1,16 +0,0 @@ -/* - * 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: \" \\ - * - * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package petstoreserver - -// Return - Model for testing reserved words -type Return struct { - - Return int32 `json:"return,omitempty"` -} diff --git a/samples/openapi3/server/petstore/go-api-server/go/model_tag.go b/samples/openapi3/server/petstore/go-api-server/go/model_tag.go deleted file mode 100644 index 29cd4d64ae3..00000000000 --- a/samples/openapi3/server/petstore/go-api-server/go/model_tag.go +++ /dev/null @@ -1,17 +0,0 @@ -/* - * 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: \" \\ - * - * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package petstoreserver - -type Tag struct { - - Id int64 `json:"id,omitempty"` - - Name string `json:"name,omitempty"` -} diff --git a/samples/openapi3/server/petstore/go-api-server/go/model_user.go b/samples/openapi3/server/petstore/go-api-server/go/model_user.go deleted file mode 100644 index 1eda4c6f763..00000000000 --- a/samples/openapi3/server/petstore/go-api-server/go/model_user.go +++ /dev/null @@ -1,30 +0,0 @@ -/* - * 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: \" \\ - * - * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package petstoreserver - -type User struct { - - Id int64 `json:"id,omitempty"` - - Username string `json:"username,omitempty"` - - FirstName string `json:"firstName,omitempty"` - - LastName string `json:"lastName,omitempty"` - - Email string `json:"email,omitempty"` - - Password string `json:"password,omitempty"` - - Phone string `json:"phone,omitempty"` - - // User Status - UserStatus int32 `json:"userStatus,omitempty"` -} diff --git a/samples/openapi3/server/petstore/go-api-server/go/routers.go b/samples/openapi3/server/petstore/go-api-server/go/routers.go deleted file mode 100644 index 1a166f390e8..00000000000 --- a/samples/openapi3/server/petstore/go-api-server/go/routers.go +++ /dev/null @@ -1,96 +0,0 @@ -/* - * 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: \" \\ - * - * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package petstoreserver - -import ( - "encoding/json" - "io/ioutil" - "net/http" - "os" - "strconv" - "github.com/gorilla/mux" -) - -// A Route defines the parameters for an api endpoint -type Route struct { - Name string - Method string - Pattern string - HandlerFunc http.HandlerFunc -} - -// Routes are a collection of defined api endpoints -type Routes []Route - -// Router defines the required methods for retrieving api routes -type Router interface { - Routes() Routes -} - -// NewRouter creates a new router for any number of api routers -func NewRouter(routers ...Router) *mux.Router { - router := mux.NewRouter().StrictSlash(true) - for _, api := range routers { - for _, route := range api.Routes() { - var handler http.Handler - handler = route.HandlerFunc - handler = Logger(handler, route.Name) - - router. - Methods(route.Method). - Path(route.Pattern). - Name(route.Name). - Handler(handler) - } - } - - return router -} - -// EncodeJSONResponse uses the json encoder to write an interface to the http response with an optional status code -func EncodeJSONResponse(i interface{}, status *int, w http.ResponseWriter) error { - w.Header().Set("Content-Type", "application/json; charset=UTF-8") - if status != nil { - w.WriteHeader(*status) - } else { - w.WriteHeader(http.StatusOK) - } - - return json.NewEncoder(w).Encode(i) -} - -// ReadFormFileToTempFile reads file data from a request form and writes it to a temporary file -func ReadFormFileToTempFile(r *http.Request, key string) (*os.File, error) { - r.ParseForm() - formFile, _, err := r.FormFile(key) - if err != nil { - return nil, err - } - - defer formFile.Close() - file, err := ioutil.TempFile("tmp", key) - if err != nil { - return nil, err - } - - defer file.Close() - fileBytes, err := ioutil.ReadAll(formFile) - if err != nil { - return nil, err - } - - file.Write(fileBytes) - return file, nil -} - -// parseIntParameter parses a sting parameter to an int64 -func parseIntParameter(param string) (int64, error) { - return strconv.ParseInt(param, 10, 64) -} diff --git a/samples/openapi3/server/petstore/go-api-server/main.go b/samples/openapi3/server/petstore/go-api-server/main.go deleted file mode 100644 index d4444720003..00000000000 --- a/samples/openapi3/server/petstore/go-api-server/main.go +++ /dev/null @@ -1,46 +0,0 @@ -/* - * 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: \" \\ - * - * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package main - -import ( - "log" - "net/http" - - petstoreserver "github.com/GIT_USER_ID/GIT_REPO_ID/go" -) - -func main() { - log.Printf("Server started") - - AnotherFakeApiService := petstoreserver.NewAnotherFakeApiService() - AnotherFakeApiController := petstoreserver.NewAnotherFakeApiController(AnotherFakeApiService) - - DefaultApiService := petstoreserver.NewDefaultApiService() - DefaultApiController := petstoreserver.NewDefaultApiController(DefaultApiService) - - FakeApiService := petstoreserver.NewFakeApiService() - FakeApiController := petstoreserver.NewFakeApiController(FakeApiService) - - FakeClassnameTags123ApiService := petstoreserver.NewFakeClassnameTags123ApiService() - FakeClassnameTags123ApiController := petstoreserver.NewFakeClassnameTags123ApiController(FakeClassnameTags123ApiService) - - PetApiService := petstoreserver.NewPetApiService() - PetApiController := petstoreserver.NewPetApiController(PetApiService) - - StoreApiService := petstoreserver.NewStoreApiService() - StoreApiController := petstoreserver.NewStoreApiController(StoreApiService) - - UserApiService := petstoreserver.NewUserApiService() - UserApiController := petstoreserver.NewUserApiController(UserApiService) - - router := petstoreserver.NewRouter(AnotherFakeApiController, DefaultApiController, FakeApiController, FakeClassnameTags123ApiController, PetApiController, StoreApiController, UserApiController) - - log.Fatal(http.ListenAndServe(":8080", router)) -} diff --git a/samples/openapi3/server/petstore/go-gin-api-server/.openapi-generator-ignore b/samples/openapi3/server/petstore/go-gin-api-server/.openapi-generator-ignore deleted file mode 100644 index 7484ee590a3..00000000000 --- a/samples/openapi3/server/petstore/go-gin-api-server/.openapi-generator-ignore +++ /dev/null @@ -1,23 +0,0 @@ -# OpenAPI Generator Ignore -# Generated by openapi-generator https://github.com/openapitools/openapi-generator - -# Use this file to prevent files from being overwritten by the generator. -# The patterns follow closely to .gitignore or .dockerignore. - -# As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: -#ApiClient.cs - -# You can match any string of characters against a directory, file or extension with a single asterisk (*): -#foo/*/qux -# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux - -# You can recursively match patterns against a directory, file or extension with a double asterisk (**): -#foo/**/qux -# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux - -# You can also negate patterns with an exclamation (!). -# For example, you can ignore all files in a docs folder with the file extension .md: -#docs/*.md -# Then explicitly reverse the ignore rule for a single file: -#!docs/README.md diff --git a/samples/openapi3/server/petstore/go-gin-api-server/.openapi-generator/VERSION b/samples/openapi3/server/petstore/go-gin-api-server/.openapi-generator/VERSION deleted file mode 100644 index 58592f031f6..00000000000 --- a/samples/openapi3/server/petstore/go-gin-api-server/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -4.2.3-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/server/petstore/go-gin-api-server/Dockerfile b/samples/openapi3/server/petstore/go-gin-api-server/Dockerfile deleted file mode 100644 index 30e247e622b..00000000000 --- a/samples/openapi3/server/petstore/go-gin-api-server/Dockerfile +++ /dev/null @@ -1,15 +0,0 @@ -FROM golang:1.10 AS build -WORKDIR /go/src -COPY go ./go -COPY main.go . - -ENV CGO_ENABLED=0 -RUN go get -d -v ./... - -RUN go build -a -installsuffix cgo -o petstoreserver . - -FROM scratch AS runtime -ENV GIN_MODE=release -COPY --from=build /go/src/petstoreserver ./ -EXPOSE 8080/tcp -ENTRYPOINT ["./petstoreserver"] diff --git a/samples/openapi3/server/petstore/go-gin-api-server/api/openapi.yaml b/samples/openapi3/server/petstore/go-gin-api-server/api/openapi.yaml deleted file mode 100644 index 06a1bb8d469..00000000000 --- a/samples/openapi3/server/petstore/go-gin-api-server/api/openapi.yaml +++ /dev/null @@ -1,2059 +0,0 @@ -openapi: 3.0.0 -info: - 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: - " \' - license: - name: Apache-2.0 - url: https://www.apache.org/licenses/LICENSE-2.0.html - title: OpenAPI Petstore - version: 1.0.0 -servers: -- description: petstore server - url: http://{server}.swagger.io:{port}/v2 - variables: - server: - default: petstore - enum: - - petstore - - qa-petstore - - dev-petstore - port: - default: "80" - enum: - - "80" - - "8080" -- description: The local server - url: https://localhost:8080/{version} - variables: - version: - default: v2 - enum: - - v1 - - v2 -tags: -- description: Everything about your Pets - name: pet -- description: Access to Petstore orders - name: store -- description: Operations about user - name: user -paths: - /foo: - get: - responses: - default: - content: - application/json: - schema: - $ref: '#/components/schemas/inline_response_default' - description: response - /pet: - post: - operationId: addPet - requestBody: - $ref: '#/components/requestBodies/Pet' - responses: - 405: - description: Invalid input - security: - - petstore_auth: - - write:pets - - read:pets - summary: Add a new pet to the store - tags: - - pet - put: - operationId: updatePet - requestBody: - $ref: '#/components/requestBodies/Pet' - responses: - 400: - description: Invalid ID supplied - 404: - description: Pet not found - 405: - description: Validation exception - security: - - petstore_auth: - - write:pets - - read:pets - summary: Update an existing pet - tags: - - pet - servers: - - url: http://petstore.swagger.io/v2 - - url: http://path-server-test.petstore.local/v2 - /pet/findByStatus: - get: - description: Multiple status values can be provided with comma separated strings - operationId: findPetsByStatus - parameters: - - description: Status values that need to be considered for filter - explode: false - in: query - name: status - required: true - schema: - items: - default: available - enum: - - available - - pending - - sold - type: string - type: array - style: form - responses: - 200: - content: - application/xml: - schema: - items: - $ref: '#/components/schemas/Pet' - type: array - application/json: - schema: - items: - $ref: '#/components/schemas/Pet' - type: array - description: successful operation - 400: - description: Invalid status value - security: - - petstore_auth: - - write:pets - - read:pets - summary: Finds Pets by status - tags: - - pet - /pet/findByTags: - get: - deprecated: true - description: Multiple tags can be provided with comma separated strings. Use - tag1, tag2, tag3 for testing. - operationId: findPetsByTags - parameters: - - description: Tags to filter by - explode: false - in: query - name: tags - required: true - schema: - items: - type: string - type: array - style: form - responses: - 200: - content: - application/xml: - schema: - items: - $ref: '#/components/schemas/Pet' - type: array - application/json: - schema: - items: - $ref: '#/components/schemas/Pet' - type: array - description: successful operation - 400: - description: Invalid tag value - security: - - petstore_auth: - - write:pets - - read:pets - summary: Finds Pets by tags - tags: - - pet - /pet/{petId}: - delete: - operationId: deletePet - parameters: - - explode: false - in: header - name: api_key - required: false - schema: - type: string - style: simple - - description: Pet id to delete - explode: false - in: path - name: petId - required: true - schema: - format: int64 - type: integer - style: simple - responses: - 400: - description: Invalid pet value - security: - - petstore_auth: - - write:pets - - read:pets - summary: Deletes a pet - tags: - - pet - get: - description: Returns a single pet - operationId: getPetById - parameters: - - description: ID of pet to return - explode: false - in: path - name: petId - required: true - schema: - format: int64 - type: integer - style: simple - responses: - 200: - content: - application/xml: - schema: - $ref: '#/components/schemas/Pet' - application/json: - schema: - $ref: '#/components/schemas/Pet' - description: successful operation - 400: - description: Invalid ID supplied - 404: - description: Pet not found - security: - - api_key: [] - summary: Find pet by ID - tags: - - pet - post: - operationId: updatePetWithForm - parameters: - - description: ID of pet that needs to be updated - explode: false - in: path - name: petId - required: true - schema: - format: int64 - type: integer - style: simple - requestBody: - $ref: '#/components/requestBodies/inline_object' - content: - application/x-www-form-urlencoded: - schema: - properties: - name: - description: Updated name of the pet - type: string - status: - description: Updated status of the pet - type: string - type: object - responses: - 405: - description: Invalid input - security: - - petstore_auth: - - write:pets - - read:pets - summary: Updates a pet in the store with form data - tags: - - pet - /pet/{petId}/uploadImage: - post: - operationId: uploadFile - parameters: - - description: ID of pet to update - explode: false - in: path - name: petId - required: true - schema: - format: int64 - type: integer - style: simple - requestBody: - $ref: '#/components/requestBodies/inline_object_1' - content: - multipart/form-data: - schema: - properties: - additionalMetadata: - description: Additional data to pass to server - type: string - file: - description: file to upload - format: binary - type: string - type: object - responses: - 200: - content: - application/json: - schema: - $ref: '#/components/schemas/ApiResponse' - description: successful operation - security: - - petstore_auth: - - write:pets - - read:pets - summary: uploads an image - tags: - - pet - /store/inventory: - get: - description: Returns a map of status codes to quantities - operationId: getInventory - responses: - 200: - content: - application/json: - schema: - additionalProperties: - format: int32 - type: integer - type: object - description: successful operation - security: - - api_key: [] - summary: Returns pet inventories by status - tags: - - store - /store/order: - post: - operationId: placeOrder - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/Order' - description: order placed for purchasing the pet - required: true - responses: - 200: - content: - application/xml: - schema: - $ref: '#/components/schemas/Order' - application/json: - schema: - $ref: '#/components/schemas/Order' - description: successful operation - 400: - description: Invalid Order - summary: Place an order for a pet - tags: - - store - /store/order/{order_id}: - delete: - description: For valid response try integer IDs with value < 1000. Anything - above 1000 or nonintegers will generate API errors - operationId: deleteOrder - parameters: - - description: ID of the order that needs to be deleted - explode: false - in: path - name: order_id - required: true - schema: - type: string - style: simple - responses: - 400: - description: Invalid ID supplied - 404: - description: Order not found - summary: Delete purchase order by ID - tags: - - store - get: - description: For valid response try integer IDs with value <= 5 or > 10. Other - values will generated exceptions - operationId: getOrderById - parameters: - - description: ID of pet that needs to be fetched - explode: false - in: path - name: order_id - required: true - schema: - format: int64 - maximum: 5 - minimum: 1 - type: integer - style: simple - responses: - 200: - content: - application/xml: - schema: - $ref: '#/components/schemas/Order' - application/json: - schema: - $ref: '#/components/schemas/Order' - description: successful operation - 400: - description: Invalid ID supplied - 404: - description: Order not found - summary: Find purchase order by ID - tags: - - store - /user: - post: - description: This can only be done by the logged in user. - operationId: createUser - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/User' - description: Created user object - required: true - responses: - default: - description: successful operation - summary: Create user - tags: - - user - /user/createWithArray: - post: - operationId: createUsersWithArrayInput - requestBody: - $ref: '#/components/requestBodies/UserArray' - responses: - default: - description: successful operation - summary: Creates list of users with given input array - tags: - - user - /user/createWithList: - post: - operationId: createUsersWithListInput - requestBody: - $ref: '#/components/requestBodies/UserArray' - responses: - default: - description: successful operation - summary: Creates list of users with given input array - tags: - - user - /user/login: - get: - operationId: loginUser - parameters: - - description: The user name for login - explode: true - in: query - name: username - required: true - schema: - type: string - style: form - - description: The password for login in clear text - explode: true - in: query - name: password - required: true - schema: - type: string - style: form - responses: - 200: - content: - application/xml: - schema: - type: string - application/json: - schema: - type: string - description: successful operation - headers: - X-Rate-Limit: - description: calls per hour allowed by the user - explode: false - schema: - format: int32 - type: integer - style: simple - X-Expires-After: - description: date in UTC when token expires - explode: false - schema: - format: date-time - type: string - style: simple - 400: - description: Invalid username/password supplied - summary: Logs user into the system - tags: - - user - /user/logout: - get: - operationId: logoutUser - responses: - default: - description: successful operation - summary: Logs out current logged in user session - tags: - - user - /user/{username}: - delete: - description: This can only be done by the logged in user. - operationId: deleteUser - parameters: - - description: The name that needs to be deleted - explode: false - in: path - name: username - required: true - schema: - type: string - style: simple - responses: - 400: - description: Invalid username supplied - 404: - description: User not found - summary: Delete user - tags: - - user - get: - operationId: getUserByName - parameters: - - description: The name that needs to be fetched. Use user1 for testing. - explode: false - in: path - name: username - required: true - schema: - type: string - style: simple - responses: - 200: - content: - application/xml: - schema: - $ref: '#/components/schemas/User' - application/json: - schema: - $ref: '#/components/schemas/User' - description: successful operation - 400: - description: Invalid username supplied - 404: - description: User not found - summary: Get user by user name - tags: - - user - put: - description: This can only be done by the logged in user. - operationId: updateUser - parameters: - - description: name that need to be deleted - explode: false - in: path - name: username - required: true - schema: - type: string - style: simple - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/User' - description: Updated user object - required: true - responses: - 400: - description: Invalid user supplied - 404: - description: User not found - summary: Updated user - tags: - - user - /fake_classname_test: - patch: - description: To test class name in snake case - operationId: testClassname - requestBody: - $ref: '#/components/requestBodies/Client' - responses: - 200: - content: - application/json: - schema: - $ref: '#/components/schemas/Client' - description: successful operation - security: - - api_key_query: [] - summary: To test class name in snake case - tags: - - fake_classname_tags 123#$%^ - /fake: - delete: - description: Fake endpoint to test group parameters (optional) - operationId: testGroupParameters - parameters: - - description: Required String in group parameters - explode: true - in: query - name: required_string_group - required: true - schema: - type: integer - style: form - - description: Required Boolean in group parameters - explode: false - in: header - name: required_boolean_group - required: true - schema: - type: boolean - style: simple - - description: Required Integer in group parameters - explode: true - in: query - name: required_int64_group - required: true - schema: - format: int64 - type: integer - style: form - - description: String in group parameters - explode: true - in: query - name: string_group - required: false - schema: - type: integer - style: form - - description: Boolean in group parameters - explode: false - in: header - name: boolean_group - required: false - schema: - type: boolean - style: simple - - description: Integer in group parameters - explode: true - in: query - name: int64_group - required: false - schema: - format: int64 - type: integer - style: form - responses: - 400: - description: Someting wrong - security: - - bearer_test: [] - summary: Fake endpoint to test group parameters (optional) - tags: - - fake - x-group-parameters: true - get: - description: To test enum parameters - operationId: testEnumParameters - parameters: - - description: Header parameter enum test (string array) - explode: false - in: header - name: enum_header_string_array - required: false - schema: - items: - default: $ - enum: - - '>' - - $ - type: string - type: array - style: simple - - description: Header parameter enum test (string) - explode: false - in: header - name: enum_header_string - required: false - schema: - default: -efg - enum: - - _abc - - -efg - - (xyz) - type: string - style: simple - - description: Query parameter enum test (string array) - explode: true - in: query - name: enum_query_string_array - required: false - schema: - items: - default: $ - enum: - - '>' - - $ - type: string - type: array - style: form - - description: Query parameter enum test (string) - explode: true - in: query - name: enum_query_string - required: false - schema: - default: -efg - enum: - - _abc - - -efg - - (xyz) - type: string - style: form - - description: Query parameter enum test (double) - explode: true - in: query - name: enum_query_integer - required: false - schema: - enum: - - 1 - - -2 - format: int32 - type: integer - style: form - - description: Query parameter enum test (double) - explode: true - in: query - name: enum_query_double - required: false - schema: - enum: - - 1.1 - - -1.2 - format: double - type: number - style: form - requestBody: - $ref: '#/components/requestBodies/inline_object_2' - content: - application/x-www-form-urlencoded: - schema: - properties: - enum_form_string_array: - description: Form parameter enum test (string array) - items: - default: $ - enum: - - '>' - - $ - type: string - type: array - enum_form_string: - default: -efg - description: Form parameter enum test (string) - enum: - - _abc - - -efg - - (xyz) - type: string - type: object - responses: - 400: - description: Invalid request - 404: - description: Not found - summary: To test enum parameters - tags: - - fake - patch: - description: To test "client" model - operationId: testClientModel - requestBody: - $ref: '#/components/requestBodies/Client' - responses: - 200: - content: - application/json: - schema: - $ref: '#/components/schemas/Client' - description: successful operation - summary: To test "client" model - tags: - - fake - post: - description: | - Fake endpoint for testing various parameters - 假端點 - 偽のエンドポイント - 가짜 엔드 포인트 - operationId: testEndpointParameters - requestBody: - $ref: '#/components/requestBodies/inline_object_3' - content: - application/x-www-form-urlencoded: - schema: - properties: - integer: - description: None - maximum: 100 - minimum: 10 - type: integer - int32: - description: None - format: int32 - maximum: 200 - minimum: 20 - type: integer - int64: - description: None - format: int64 - type: integer - number: - description: None - maximum: 543.2 - minimum: 32.1 - type: number - float: - description: None - format: float - maximum: 987.6 - type: number - double: - description: None - format: double - maximum: 123.4 - minimum: 67.8 - type: number - string: - description: None - pattern: /[a-z]/i - type: string - pattern_without_delimiter: - description: None - pattern: ^[A-Z].* - type: string - byte: - description: None - format: byte - type: string - binary: - description: None - format: binary - type: string - date: - description: None - format: date - type: string - dateTime: - description: None - format: date-time - type: string - password: - description: None - format: password - maxLength: 64 - minLength: 10 - type: string - callback: - description: None - type: string - required: - - byte - - double - - number - - pattern_without_delimiter - type: object - responses: - 400: - description: Invalid username supplied - 404: - description: User not found - security: - - http_basic_test: [] - summary: | - Fake endpoint for testing various parameters - 假端點 - 偽のエンドポイント - 가짜 엔드 포인트 - tags: - - fake - /fake/outer/number: - post: - description: Test serialization of outer number types - operationId: fakeOuterNumberSerialize - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/OuterNumber' - description: Input number as post body - responses: - 200: - content: - '*/*': - schema: - $ref: '#/components/schemas/OuterNumber' - description: Output number - tags: - - fake - /fake/outer/string: - post: - description: Test serialization of outer string types - operationId: fakeOuterStringSerialize - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/OuterString' - description: Input string as post body - responses: - 200: - content: - '*/*': - schema: - $ref: '#/components/schemas/OuterString' - description: Output string - tags: - - fake - /fake/outer/boolean: - post: - description: Test serialization of outer boolean types - operationId: fakeOuterBooleanSerialize - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/OuterBoolean' - description: Input boolean as post body - responses: - 200: - content: - '*/*': - schema: - $ref: '#/components/schemas/OuterBoolean' - description: Output boolean - tags: - - fake - /fake/outer/composite: - post: - description: Test serialization of object with outer number type - operationId: fakeOuterCompositeSerialize - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/OuterComposite' - description: Input composite as post body - responses: - 200: - content: - '*/*': - schema: - $ref: '#/components/schemas/OuterComposite' - description: Output composite - tags: - - fake - /fake/jsonFormData: - get: - operationId: testJsonFormData - requestBody: - $ref: '#/components/requestBodies/inline_object_4' - content: - application/x-www-form-urlencoded: - schema: - properties: - param: - description: field1 - type: string - param2: - description: field2 - type: string - required: - - param - - param2 - type: object - responses: - 200: - description: successful operation - summary: test json serialization of form data - tags: - - fake - /fake/inline-additionalProperties: - post: - operationId: testInlineAdditionalProperties - requestBody: - content: - application/json: - schema: - additionalProperties: - type: string - type: object - description: request body - required: true - responses: - 200: - description: successful operation - summary: test inline additionalProperties - tags: - - fake - /fake/body-with-query-params: - put: - operationId: testBodyWithQueryParams - parameters: - - explode: true - in: query - name: query - required: true - schema: - type: string - style: form - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/User' - required: true - responses: - 200: - description: Success - tags: - - fake - /another-fake/dummy: - patch: - description: To test special tags and operation ID starting with number - operationId: 123_test_@#$%_special_tags - requestBody: - $ref: '#/components/requestBodies/Client' - responses: - 200: - content: - application/json: - schema: - $ref: '#/components/schemas/Client' - description: successful operation - summary: To test special tags - tags: - - $another-fake? - /fake/body-with-file-schema: - put: - description: For this test, the body for this request much reference a schema - named `File`. - operationId: testBodyWithFileSchema - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/FileSchemaTestClass' - required: true - responses: - 200: - description: Success - tags: - - fake - /fake/test-query-paramters: - put: - description: To test the collection format in query parameters - operationId: testQueryParameterCollectionFormat - parameters: - - explode: true - in: query - name: pipe - required: true - schema: - items: - type: string - type: array - style: form - - explode: false - in: query - name: ioutil - required: true - schema: - items: - type: string - type: array - style: form - - explode: false - in: query - name: http - required: true - schema: - items: - type: string - type: array - style: spaceDelimited - - explode: false - in: query - name: url - required: true - schema: - items: - type: string - type: array - style: form - - explode: true - in: query - name: context - required: true - schema: - items: - type: string - type: array - style: form - responses: - 200: - description: Success - tags: - - fake - /fake/{petId}/uploadImageWithRequiredFile: - post: - operationId: uploadFileWithRequiredFile - parameters: - - description: ID of pet to update - explode: false - in: path - name: petId - required: true - schema: - format: int64 - type: integer - style: simple - requestBody: - $ref: '#/components/requestBodies/inline_object_5' - content: - multipart/form-data: - schema: - properties: - additionalMetadata: - description: Additional data to pass to server - type: string - requiredFile: - description: file to upload - format: binary - type: string - required: - - requiredFile - type: object - responses: - 200: - content: - application/json: - schema: - $ref: '#/components/schemas/ApiResponse' - description: successful operation - security: - - petstore_auth: - - write:pets - - read:pets - summary: uploads an image (required) - tags: - - pet - /fake/health: - get: - responses: - 200: - content: - application/json: - schema: - $ref: '#/components/schemas/HealthCheckResult' - description: The instance started successfully - summary: Health check endpoint - tags: - - fake -components: - requestBodies: - UserArray: - content: - application/json: - schema: - items: - $ref: '#/components/schemas/User' - type: array - description: List of user object - required: true - Client: - content: - application/json: - schema: - $ref: '#/components/schemas/Client' - description: client model - required: true - Pet: - content: - application/json: - schema: - $ref: '#/components/schemas/Pet' - application/xml: - schema: - $ref: '#/components/schemas/Pet' - description: Pet object that needs to be added to the store - required: true - inline_object: - content: - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/inline_object' - inline_object_1: - content: - multipart/form-data: - schema: - $ref: '#/components/schemas/inline_object_1' - inline_object_2: - content: - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/inline_object_2' - inline_object_3: - content: - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/inline_object_3' - inline_object_4: - content: - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/inline_object_4' - inline_object_5: - content: - multipart/form-data: - schema: - $ref: '#/components/schemas/inline_object_5' - schemas: - Foo: - example: - bar: bar - properties: - bar: - default: bar - type: string - type: object - Bar: - default: bar - type: string - Order: - example: - petId: 6 - quantity: 1 - id: 0 - shipDate: 2000-01-23T04:56:07.000+00:00 - complete: false - status: placed - properties: - id: - format: int64 - type: integer - petId: - format: int64 - type: integer - quantity: - format: int32 - type: integer - shipDate: - format: date-time - type: string - status: - description: Order Status - enum: - - placed - - approved - - delivered - type: string - complete: - default: false - type: boolean - type: object - xml: - name: Order - Category: - example: - name: default-name - id: 6 - properties: - id: - format: int64 - type: integer - name: - default: default-name - type: string - required: - - name - type: object - xml: - name: Category - User: - example: - firstName: firstName - lastName: lastName - password: password - userStatus: 6 - phone: phone - id: 0 - email: email - username: username - properties: - id: - format: int64 - type: integer - x-is-unique: true - username: - type: string - firstName: - type: string - lastName: - type: string - email: - type: string - password: - type: string - phone: - type: string - userStatus: - description: User Status - format: int32 - type: integer - type: object - xml: - name: User - Tag: - example: - name: name - id: 1 - properties: - id: - format: int64 - type: integer - name: - type: string - type: object - xml: - name: Tag - Pet: - example: - photoUrls: - - photoUrls - - photoUrls - name: doggie - id: 0 - category: - name: default-name - id: 6 - tags: - - name: name - id: 1 - - name: name - id: 1 - status: available - properties: - id: - format: int64 - type: integer - x-is-unique: true - category: - $ref: '#/components/schemas/Category' - name: - example: doggie - type: string - photoUrls: - items: - type: string - type: array - xml: - name: photoUrl - wrapped: true - tags: - items: - $ref: '#/components/schemas/Tag' - type: array - xml: - name: tag - wrapped: true - status: - description: pet status in the store - enum: - - available - - pending - - sold - type: string - required: - - name - - photoUrls - type: object - xml: - name: Pet - ApiResponse: - example: - code: 0 - type: type - message: message - properties: - code: - format: int32 - type: integer - type: - type: string - message: - type: string - type: object - Return: - description: Model for testing reserved words - properties: - return: - format: int32 - type: integer - xml: - name: Return - Name: - description: Model for testing model name same as property name - properties: - name: - format: int32 - type: integer - snake_case: - format: int32 - readOnly: true - type: integer - property: - type: string - 123Number: - readOnly: true - type: integer - required: - - name - xml: - name: Name - 200_response: - description: Model for testing model name starting with number - properties: - name: - format: int32 - type: integer - class: - type: string - xml: - name: Name - ClassModel: - description: Model for testing model with "_class" property - properties: - _class: - type: string - Dog: - allOf: - - $ref: '#/components/schemas/Animal' - - $ref: '#/components/schemas/Dog_allOf' - Cat: - allOf: - - $ref: '#/components/schemas/Animal' - - $ref: '#/components/schemas/Cat_allOf' - Animal: - discriminator: - propertyName: className - properties: - className: - type: string - color: - default: red - type: string - required: - - className - type: object - AnimalFarm: - items: - $ref: '#/components/schemas/Animal' - type: array - format_test: - properties: - integer: - maximum: 100 - minimum: 10 - type: integer - int32: - format: int32 - maximum: 200 - minimum: 20 - type: integer - int64: - format: int64 - type: integer - number: - maximum: 543.2 - minimum: 32.1 - type: number - float: - format: float - maximum: 987.6 - minimum: 54.3 - type: number - double: - format: double - maximum: 123.4 - minimum: 67.8 - type: number - string: - pattern: /[a-z]/i - type: string - byte: - format: byte - type: string - binary: - format: binary - type: string - date: - format: date - type: string - dateTime: - format: date-time - type: string - uuid: - example: 72f98069-206d-4f12-9f12-3d1e525a8e84 - format: uuid - type: string - password: - format: password - maxLength: 64 - minLength: 10 - type: string - pattern_with_digits: - description: A string that is a 10 digit number. Can have leading zeros. - pattern: ^\d{10}$ - type: string - pattern_with_digits_and_delimiter: - description: A string starting with 'image_' (case insensitive) and one - to three digits following i.e. Image_01. - pattern: /^image_\d{1,3}$/i - type: string - required: - - byte - - date - - number - - password - type: object - EnumClass: - default: -efg - enum: - - _abc - - -efg - - (xyz) - type: string - Enum_Test: - properties: - enum_string: - enum: - - UPPER - - lower - - "" - type: string - enum_string_required: - enum: - - UPPER - - lower - - "" - type: string - enum_integer: - enum: - - 1 - - -1 - format: int32 - type: integer - enum_number: - enum: - - 1.1 - - -1.2 - format: double - type: number - outerEnum: - $ref: '#/components/schemas/OuterEnum' - outerEnumInteger: - $ref: '#/components/schemas/OuterEnumInteger' - outerEnumDefaultValue: - $ref: '#/components/schemas/OuterEnumDefaultValue' - outerEnumIntegerDefaultValue: - $ref: '#/components/schemas/OuterEnumIntegerDefaultValue' - required: - - enum_string_required - type: object - AdditionalPropertiesClass: - properties: - map_property: - additionalProperties: - type: string - type: object - map_of_map_property: - additionalProperties: - additionalProperties: - type: string - type: object - type: object - type: object - MixedPropertiesAndAdditionalPropertiesClass: - properties: - uuid: - format: uuid - type: string - dateTime: - format: date-time - type: string - map: - additionalProperties: - $ref: '#/components/schemas/Animal' - type: object - type: object - List: - properties: - 123-list: - type: string - type: object - Client: - example: - client: client - properties: - client: - type: string - type: object - ReadOnlyFirst: - properties: - bar: - readOnly: true - type: string - baz: - type: string - type: object - hasOnlyReadOnly: - properties: - bar: - readOnly: true - type: string - foo: - readOnly: true - type: string - type: object - Capitalization: - properties: - smallCamel: - type: string - CapitalCamel: - type: string - small_Snake: - type: string - Capital_Snake: - type: string - SCA_ETH_Flow_Points: - type: string - ATT_NAME: - description: | - Name of the pet - type: string - type: object - MapTest: - properties: - map_map_of_string: - additionalProperties: - additionalProperties: - type: string - type: object - type: object - map_of_enum_string: - additionalProperties: - enum: - - UPPER - - lower - type: string - type: object - direct_map: - additionalProperties: - type: boolean - type: object - indirect_map: - additionalProperties: - type: boolean - type: object - type: object - ArrayTest: - properties: - array_of_string: - items: - type: string - type: array - array_array_of_integer: - items: - items: - format: int64 - type: integer - type: array - type: array - array_array_of_model: - items: - items: - $ref: '#/components/schemas/ReadOnlyFirst' - type: array - type: array - type: object - NumberOnly: - properties: - JustNumber: - type: number - type: object - ArrayOfNumberOnly: - properties: - ArrayNumber: - items: - type: number - type: array - type: object - ArrayOfArrayOfNumberOnly: - properties: - ArrayArrayNumber: - items: - items: - type: number - type: array - type: array - type: object - EnumArrays: - properties: - just_symbol: - enum: - - '>=' - - $ - type: string - array_enum: - items: - enum: - - fish - - crab - type: string - type: array - type: object - OuterEnum: - enum: - - placed - - approved - - delivered - nullable: true - type: string - OuterEnumInteger: - enum: - - 0 - - 1 - - 2 - type: integer - OuterEnumDefaultValue: - default: placed - enum: - - placed - - approved - - delivered - type: string - OuterEnumIntegerDefaultValue: - default: 0 - enum: - - 0 - - 1 - - 2 - type: integer - OuterComposite: - example: - my_string: my_string - my_number: 0.8008281904610115 - my_boolean: true - properties: - my_number: - type: number - my_string: - type: string - my_boolean: - type: boolean - x-codegen-body-parameter-name: boolean_post_body - type: object - OuterNumber: - type: number - OuterString: - type: string - OuterBoolean: - type: boolean - x-codegen-body-parameter-name: boolean_post_body - StringBooleanMap: - additionalProperties: - type: boolean - type: object - FileSchemaTestClass: - example: - file: - sourceURI: sourceURI - files: - - sourceURI: sourceURI - - sourceURI: sourceURI - properties: - file: - $ref: '#/components/schemas/File' - files: - items: - $ref: '#/components/schemas/File' - type: array - type: object - File: - description: Must be named `File` for test. - example: - sourceURI: sourceURI - properties: - sourceURI: - description: Test capitalization - type: string - type: object - _special_model.name_: - properties: - $special[property.name]: - format: int64 - type: integer - xml: - name: $special[model.name] - HealthCheckResult: - description: Just a string to inform instance is up and running. Make it nullable - in hope to get it as pointer in generated model. - example: - NullableMessage: NullableMessage - properties: - NullableMessage: - nullable: true - type: string - type: object - NullableClass: - additionalProperties: - nullable: true - type: object - properties: - integer_prop: - nullable: true - type: integer - number_prop: - nullable: true - type: number - boolean_prop: - nullable: true - type: boolean - string_prop: - nullable: true - type: string - date_prop: - format: date - nullable: true - type: string - datetime_prop: - format: date-time - nullable: true - type: string - array_nullable_prop: - items: - type: object - nullable: true - type: array - array_and_items_nullable_prop: - items: - nullable: true - type: object - nullable: true - type: array - array_items_nullable: - items: - nullable: true - type: object - type: array - object_nullable_prop: - additionalProperties: - type: object - nullable: true - type: object - object_and_items_nullable_prop: - additionalProperties: - nullable: true - type: object - nullable: true - type: object - object_items_nullable: - additionalProperties: - nullable: true - type: object - type: object - type: object - inline_response_default: - example: - string: - bar: bar - properties: - string: - $ref: '#/components/schemas/Foo' - inline_object: - properties: - name: - description: Updated name of the pet - type: string - status: - description: Updated status of the pet - type: string - type: object - inline_object_1: - properties: - additionalMetadata: - description: Additional data to pass to server - type: string - file: - description: file to upload - format: binary - type: string - type: object - inline_object_2: - properties: - enum_form_string_array: - description: Form parameter enum test (string array) - items: - default: $ - enum: - - '>' - - $ - type: string - type: array - enum_form_string: - default: -efg - description: Form parameter enum test (string) - enum: - - _abc - - -efg - - (xyz) - type: string - type: object - inline_object_3: - properties: - integer: - description: None - maximum: 100 - minimum: 10 - type: integer - int32: - description: None - format: int32 - maximum: 200 - minimum: 20 - type: integer - int64: - description: None - format: int64 - type: integer - number: - description: None - maximum: 543.2 - minimum: 32.1 - type: number - float: - description: None - format: float - maximum: 987.6 - type: number - double: - description: None - format: double - maximum: 123.4 - minimum: 67.8 - type: number - string: - description: None - pattern: /[a-z]/i - type: string - pattern_without_delimiter: - description: None - pattern: ^[A-Z].* - type: string - byte: - description: None - format: byte - type: string - binary: - description: None - format: binary - type: string - date: - description: None - format: date - type: string - dateTime: - description: None - format: date-time - type: string - password: - description: None - format: password - maxLength: 64 - minLength: 10 - type: string - callback: - description: None - type: string - required: - - byte - - double - - number - - pattern_without_delimiter - type: object - inline_object_4: - properties: - param: - description: field1 - type: string - param2: - description: field2 - type: string - required: - - param - - param2 - type: object - inline_object_5: - properties: - additionalMetadata: - description: Additional data to pass to server - type: string - requiredFile: - description: file to upload - format: binary - type: string - required: - - requiredFile - type: object - Dog_allOf: - properties: - breed: - type: string - Cat_allOf: - properties: - declawed: - type: boolean - securitySchemes: - petstore_auth: - flows: - implicit: - authorizationUrl: http://petstore.swagger.io/api/oauth/dialog - scopes: - write:pets: modify pets in your account - read:pets: read your pets - type: oauth2 - api_key: - in: header - name: api_key - type: apiKey - api_key_query: - in: query - name: api_key_query - type: apiKey - http_basic_test: - scheme: basic - type: http - bearer_test: - bearerFormat: JWT - scheme: bearer - type: http diff --git a/samples/openapi3/server/petstore/go-gin-api-server/go/README.md b/samples/openapi3/server/petstore/go-gin-api-server/go/README.md deleted file mode 100644 index dd21f447d5d..00000000000 --- a/samples/openapi3/server/petstore/go-gin-api-server/go/README.md +++ /dev/null @@ -1,40 +0,0 @@ -# Go API Server for petstoreserver - -This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - -## Overview -This server was generated by the [openapi-generator] -(https://openapi-generator.tech) project. -By using the [OpenAPI-Spec](https://github.com/OAI/OpenAPI-Specification) from a remote server, you can easily generate a server stub. -- - -To see how to make this your own, look here: - -[README](https://openapi-generator.tech) - -- API version: 1.0.0 - -### Running the server - -To run the server, follow these simple steps: - -``` -go run main.go -``` - -To run the server in a docker container -``` -docker build --network=host -t petstoreserver . -``` - -Once the image is built, just run -``` -docker run --rm -it petstoreserver -``` - -### Known Issue - -Endpoints sharing a common path may result in issues. For example, `/v2/pet/findByTags` and `/v2/pet/:petId` will result in an issue with the Gin framework. For more information about this known limitation, please refer to [gin-gonic/gin#388](https://github.com/gin-gonic/gin/issues/388) for more information. - -A workaround is to manually update the path and handler. Please refer to [gin-gonic/gin/issues/205#issuecomment-296155497](https://github.com/gin-gonic/gin/issues/205#issuecomment-296155497) for more information. - diff --git a/samples/openapi3/server/petstore/go-gin-api-server/go/api_another_fake.go b/samples/openapi3/server/petstore/go-gin-api-server/go/api_another_fake.go deleted file mode 100644 index 93986aa66ee..00000000000 --- a/samples/openapi3/server/petstore/go-gin-api-server/go/api_another_fake.go +++ /dev/null @@ -1,21 +0,0 @@ -/* - * 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: \" \\ - * - * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package petstoreserver - -import ( - "net/http" - - "github.com/gin-gonic/gin" -) - -// Call123TestSpecialTags - To test special tags -func Call123TestSpecialTags(c *gin.Context) { - c.JSON(http.StatusOK, gin.H{}) -} diff --git a/samples/openapi3/server/petstore/go-gin-api-server/go/api_default.go b/samples/openapi3/server/petstore/go-gin-api-server/go/api_default.go deleted file mode 100644 index d19a1886d0c..00000000000 --- a/samples/openapi3/server/petstore/go-gin-api-server/go/api_default.go +++ /dev/null @@ -1,21 +0,0 @@ -/* - * 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: \" \\ - * - * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package petstoreserver - -import ( - "net/http" - - "github.com/gin-gonic/gin" -) - -// FooGet - -func FooGet(c *gin.Context) { - c.JSON(http.StatusOK, gin.H{}) -} diff --git a/samples/openapi3/server/petstore/go-gin-api-server/go/api_fake.go b/samples/openapi3/server/petstore/go-gin-api-server/go/api_fake.go deleted file mode 100644 index 17107d021c5..00000000000 --- a/samples/openapi3/server/petstore/go-gin-api-server/go/api_fake.go +++ /dev/null @@ -1,86 +0,0 @@ -/* - * 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: \" \\ - * - * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package petstoreserver - -import ( - "net/http" - - "github.com/gin-gonic/gin" -) - -// FakeHealthGet - Health check endpoint -func FakeHealthGet(c *gin.Context) { - c.JSON(http.StatusOK, gin.H{}) -} - -// FakeOuterBooleanSerialize - -func FakeOuterBooleanSerialize(c *gin.Context) { - c.JSON(http.StatusOK, gin.H{}) -} - -// FakeOuterCompositeSerialize - -func FakeOuterCompositeSerialize(c *gin.Context) { - c.JSON(http.StatusOK, gin.H{}) -} - -// FakeOuterNumberSerialize - -func FakeOuterNumberSerialize(c *gin.Context) { - c.JSON(http.StatusOK, gin.H{}) -} - -// FakeOuterStringSerialize - -func FakeOuterStringSerialize(c *gin.Context) { - c.JSON(http.StatusOK, gin.H{}) -} - -// TestBodyWithFileSchema - -func TestBodyWithFileSchema(c *gin.Context) { - c.JSON(http.StatusOK, gin.H{}) -} - -// TestBodyWithQueryParams - -func TestBodyWithQueryParams(c *gin.Context) { - c.JSON(http.StatusOK, gin.H{}) -} - -// TestClientModel - To test \"client\" model -func TestClientModel(c *gin.Context) { - c.JSON(http.StatusOK, gin.H{}) -} - -// TestEndpointParameters - Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 -func TestEndpointParameters(c *gin.Context) { - c.JSON(http.StatusOK, gin.H{}) -} - -// TestEnumParameters - To test enum parameters -func TestEnumParameters(c *gin.Context) { - c.JSON(http.StatusOK, gin.H{}) -} - -// TestGroupParameters - Fake endpoint to test group parameters (optional) -func TestGroupParameters(c *gin.Context) { - c.JSON(http.StatusOK, gin.H{}) -} - -// TestInlineAdditionalProperties - test inline additionalProperties -func TestInlineAdditionalProperties(c *gin.Context) { - c.JSON(http.StatusOK, gin.H{}) -} - -// TestJsonFormData - test json serialization of form data -func TestJsonFormData(c *gin.Context) { - c.JSON(http.StatusOK, gin.H{}) -} - -// TestQueryParameterCollectionFormat - -func TestQueryParameterCollectionFormat(c *gin.Context) { - c.JSON(http.StatusOK, gin.H{}) -} diff --git a/samples/openapi3/server/petstore/go-gin-api-server/go/api_fake_classname_tags123.go b/samples/openapi3/server/petstore/go-gin-api-server/go/api_fake_classname_tags123.go deleted file mode 100644 index 97fd3a46d60..00000000000 --- a/samples/openapi3/server/petstore/go-gin-api-server/go/api_fake_classname_tags123.go +++ /dev/null @@ -1,21 +0,0 @@ -/* - * 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: \" \\ - * - * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package petstoreserver - -import ( - "net/http" - - "github.com/gin-gonic/gin" -) - -// TestClassname - To test class name in snake case -func TestClassname(c *gin.Context) { - c.JSON(http.StatusOK, gin.H{}) -} diff --git a/samples/openapi3/server/petstore/go-gin-api-server/go/api_pet.go b/samples/openapi3/server/petstore/go-gin-api-server/go/api_pet.go deleted file mode 100644 index a24a7d2e5e2..00000000000 --- a/samples/openapi3/server/petstore/go-gin-api-server/go/api_pet.go +++ /dev/null @@ -1,61 +0,0 @@ -/* - * 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: \" \\ - * - * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package petstoreserver - -import ( - "net/http" - - "github.com/gin-gonic/gin" -) - -// AddPet - Add a new pet to the store -func AddPet(c *gin.Context) { - c.JSON(http.StatusOK, gin.H{}) -} - -// DeletePet - Deletes a pet -func DeletePet(c *gin.Context) { - c.JSON(http.StatusOK, gin.H{}) -} - -// FindPetsByStatus - Finds Pets by status -func FindPetsByStatus(c *gin.Context) { - c.JSON(http.StatusOK, gin.H{}) -} - -// FindPetsByTags - Finds Pets by tags -func FindPetsByTags(c *gin.Context) { - c.JSON(http.StatusOK, gin.H{}) -} - -// GetPetById - Find pet by ID -func GetPetById(c *gin.Context) { - c.JSON(http.StatusOK, gin.H{}) -} - -// UpdatePet - Update an existing pet -func UpdatePet(c *gin.Context) { - c.JSON(http.StatusOK, gin.H{}) -} - -// UpdatePetWithForm - Updates a pet in the store with form data -func UpdatePetWithForm(c *gin.Context) { - c.JSON(http.StatusOK, gin.H{}) -} - -// UploadFile - uploads an image -func UploadFile(c *gin.Context) { - c.JSON(http.StatusOK, gin.H{}) -} - -// UploadFileWithRequiredFile - uploads an image (required) -func UploadFileWithRequiredFile(c *gin.Context) { - c.JSON(http.StatusOK, gin.H{}) -} diff --git a/samples/openapi3/server/petstore/go-gin-api-server/go/api_store.go b/samples/openapi3/server/petstore/go-gin-api-server/go/api_store.go deleted file mode 100644 index fd95d3d9541..00000000000 --- a/samples/openapi3/server/petstore/go-gin-api-server/go/api_store.go +++ /dev/null @@ -1,36 +0,0 @@ -/* - * 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: \" \\ - * - * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package petstoreserver - -import ( - "net/http" - - "github.com/gin-gonic/gin" -) - -// DeleteOrder - Delete purchase order by ID -func DeleteOrder(c *gin.Context) { - c.JSON(http.StatusOK, gin.H{}) -} - -// GetInventory - Returns pet inventories by status -func GetInventory(c *gin.Context) { - c.JSON(http.StatusOK, gin.H{}) -} - -// GetOrderById - Find purchase order by ID -func GetOrderById(c *gin.Context) { - c.JSON(http.StatusOK, gin.H{}) -} - -// PlaceOrder - Place an order for a pet -func PlaceOrder(c *gin.Context) { - c.JSON(http.StatusOK, gin.H{}) -} diff --git a/samples/openapi3/server/petstore/go-gin-api-server/go/api_user.go b/samples/openapi3/server/petstore/go-gin-api-server/go/api_user.go deleted file mode 100644 index 710931c2136..00000000000 --- a/samples/openapi3/server/petstore/go-gin-api-server/go/api_user.go +++ /dev/null @@ -1,56 +0,0 @@ -/* - * 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: \" \\ - * - * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package petstoreserver - -import ( - "net/http" - - "github.com/gin-gonic/gin" -) - -// CreateUser - Create user -func CreateUser(c *gin.Context) { - c.JSON(http.StatusOK, gin.H{}) -} - -// CreateUsersWithArrayInput - Creates list of users with given input array -func CreateUsersWithArrayInput(c *gin.Context) { - c.JSON(http.StatusOK, gin.H{}) -} - -// CreateUsersWithListInput - Creates list of users with given input array -func CreateUsersWithListInput(c *gin.Context) { - c.JSON(http.StatusOK, gin.H{}) -} - -// DeleteUser - Delete user -func DeleteUser(c *gin.Context) { - c.JSON(http.StatusOK, gin.H{}) -} - -// GetUserByName - Get user by user name -func GetUserByName(c *gin.Context) { - c.JSON(http.StatusOK, gin.H{}) -} - -// LoginUser - Logs user into the system -func LoginUser(c *gin.Context) { - c.JSON(http.StatusOK, gin.H{}) -} - -// LogoutUser - Logs out current logged in user session -func LogoutUser(c *gin.Context) { - c.JSON(http.StatusOK, gin.H{}) -} - -// UpdateUser - Updated user -func UpdateUser(c *gin.Context) { - c.JSON(http.StatusOK, gin.H{}) -} diff --git a/samples/openapi3/server/petstore/go-gin-api-server/go/model_200_response.go b/samples/openapi3/server/petstore/go-gin-api-server/go/model_200_response.go deleted file mode 100644 index 217fe24e437..00000000000 --- a/samples/openapi3/server/petstore/go-gin-api-server/go/model_200_response.go +++ /dev/null @@ -1,18 +0,0 @@ -/* - * 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: \" \\ - * - * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package petstoreserver - -// Model200Response - Model for testing model name starting with number -type Model200Response struct { - - Name int32 `json:"name,omitempty"` - - Class string `json:"class,omitempty"` -} diff --git a/samples/openapi3/server/petstore/go-gin-api-server/go/model__special_model_name_.go b/samples/openapi3/server/petstore/go-gin-api-server/go/model__special_model_name_.go deleted file mode 100644 index ffc27255ae9..00000000000 --- a/samples/openapi3/server/petstore/go-gin-api-server/go/model__special_model_name_.go +++ /dev/null @@ -1,15 +0,0 @@ -/* - * 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: \" \\ - * - * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package petstoreserver - -type SpecialModelName struct { - - SpecialPropertyName int64 `json:"$special[property.name],omitempty"` -} diff --git a/samples/openapi3/server/petstore/go-gin-api-server/go/model_additional_properties_class.go b/samples/openapi3/server/petstore/go-gin-api-server/go/model_additional_properties_class.go deleted file mode 100644 index 430177a3007..00000000000 --- a/samples/openapi3/server/petstore/go-gin-api-server/go/model_additional_properties_class.go +++ /dev/null @@ -1,17 +0,0 @@ -/* - * 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: \" \\ - * - * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package petstoreserver - -type AdditionalPropertiesClass struct { - - MapProperty map[string]string `json:"map_property,omitempty"` - - MapOfMapProperty map[string]map[string]string `json:"map_of_map_property,omitempty"` -} diff --git a/samples/openapi3/server/petstore/go-gin-api-server/go/model_animal.go b/samples/openapi3/server/petstore/go-gin-api-server/go/model_animal.go deleted file mode 100644 index 14d9295d875..00000000000 --- a/samples/openapi3/server/petstore/go-gin-api-server/go/model_animal.go +++ /dev/null @@ -1,17 +0,0 @@ -/* - * 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: \" \\ - * - * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package petstoreserver - -type Animal struct { - - ClassName string `json:"className"` - - Color string `json:"color,omitempty"` -} diff --git a/samples/openapi3/server/petstore/go-gin-api-server/go/model_api_response.go b/samples/openapi3/server/petstore/go-gin-api-server/go/model_api_response.go deleted file mode 100644 index 380b8dee008..00000000000 --- a/samples/openapi3/server/petstore/go-gin-api-server/go/model_api_response.go +++ /dev/null @@ -1,19 +0,0 @@ -/* - * 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: \" \\ - * - * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package petstoreserver - -type ApiResponse struct { - - Code int32 `json:"code,omitempty"` - - Type string `json:"type,omitempty"` - - Message string `json:"message,omitempty"` -} diff --git a/samples/openapi3/server/petstore/go-gin-api-server/go/model_array_of_array_of_number_only.go b/samples/openapi3/server/petstore/go-gin-api-server/go/model_array_of_array_of_number_only.go deleted file mode 100644 index e0347d8260a..00000000000 --- a/samples/openapi3/server/petstore/go-gin-api-server/go/model_array_of_array_of_number_only.go +++ /dev/null @@ -1,15 +0,0 @@ -/* - * 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: \" \\ - * - * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package petstoreserver - -type ArrayOfArrayOfNumberOnly struct { - - ArrayArrayNumber [][]float32 `json:"ArrayArrayNumber,omitempty"` -} diff --git a/samples/openapi3/server/petstore/go-gin-api-server/go/model_array_of_number_only.go b/samples/openapi3/server/petstore/go-gin-api-server/go/model_array_of_number_only.go deleted file mode 100644 index 04d7c86a5e1..00000000000 --- a/samples/openapi3/server/petstore/go-gin-api-server/go/model_array_of_number_only.go +++ /dev/null @@ -1,15 +0,0 @@ -/* - * 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: \" \\ - * - * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package petstoreserver - -type ArrayOfNumberOnly struct { - - ArrayNumber []float32 `json:"ArrayNumber,omitempty"` -} diff --git a/samples/openapi3/server/petstore/go-gin-api-server/go/model_array_test_.go b/samples/openapi3/server/petstore/go-gin-api-server/go/model_array_test_.go deleted file mode 100644 index a85e460d8c7..00000000000 --- a/samples/openapi3/server/petstore/go-gin-api-server/go/model_array_test_.go +++ /dev/null @@ -1,19 +0,0 @@ -/* - * 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: \" \\ - * - * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package petstoreserver - -type ArrayTest struct { - - ArrayOfString []string `json:"array_of_string,omitempty"` - - ArrayArrayOfInteger [][]int64 `json:"array_array_of_integer,omitempty"` - - ArrayArrayOfModel [][]ReadOnlyFirst `json:"array_array_of_model,omitempty"` -} diff --git a/samples/openapi3/server/petstore/go-gin-api-server/go/model_capitalization.go b/samples/openapi3/server/petstore/go-gin-api-server/go/model_capitalization.go deleted file mode 100644 index 1e1cb8acc3f..00000000000 --- a/samples/openapi3/server/petstore/go-gin-api-server/go/model_capitalization.go +++ /dev/null @@ -1,26 +0,0 @@ -/* - * 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: \" \\ - * - * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package petstoreserver - -type Capitalization struct { - - SmallCamel string `json:"smallCamel,omitempty"` - - CapitalCamel string `json:"CapitalCamel,omitempty"` - - SmallSnake string `json:"small_Snake,omitempty"` - - CapitalSnake string `json:"Capital_Snake,omitempty"` - - SCAETHFlowPoints string `json:"SCA_ETH_Flow_Points,omitempty"` - - // Name of the pet - ATT_NAME string `json:"ATT_NAME,omitempty"` -} diff --git a/samples/openapi3/server/petstore/go-gin-api-server/go/model_cat.go b/samples/openapi3/server/petstore/go-gin-api-server/go/model_cat.go deleted file mode 100644 index 78261ede612..00000000000 --- a/samples/openapi3/server/petstore/go-gin-api-server/go/model_cat.go +++ /dev/null @@ -1,19 +0,0 @@ -/* - * 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: \" \\ - * - * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package petstoreserver - -type Cat struct { - - ClassName string `json:"className"` - - Color string `json:"color,omitempty"` - - Declawed bool `json:"declawed,omitempty"` -} diff --git a/samples/openapi3/server/petstore/go-gin-api-server/go/model_cat_all_of.go b/samples/openapi3/server/petstore/go-gin-api-server/go/model_cat_all_of.go deleted file mode 100644 index 312c33895f8..00000000000 --- a/samples/openapi3/server/petstore/go-gin-api-server/go/model_cat_all_of.go +++ /dev/null @@ -1,15 +0,0 @@ -/* - * 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: \" \\ - * - * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package petstoreserver - -type CatAllOf struct { - - Declawed bool `json:"declawed,omitempty"` -} diff --git a/samples/openapi3/server/petstore/go-gin-api-server/go/model_category.go b/samples/openapi3/server/petstore/go-gin-api-server/go/model_category.go deleted file mode 100644 index 373c419af55..00000000000 --- a/samples/openapi3/server/petstore/go-gin-api-server/go/model_category.go +++ /dev/null @@ -1,17 +0,0 @@ -/* - * 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: \" \\ - * - * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package petstoreserver - -type Category struct { - - Id int64 `json:"id,omitempty"` - - Name string `json:"name"` -} diff --git a/samples/openapi3/server/petstore/go-gin-api-server/go/model_class_model.go b/samples/openapi3/server/petstore/go-gin-api-server/go/model_class_model.go deleted file mode 100644 index d9fcd475b7b..00000000000 --- a/samples/openapi3/server/petstore/go-gin-api-server/go/model_class_model.go +++ /dev/null @@ -1,16 +0,0 @@ -/* - * 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: \" \\ - * - * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package petstoreserver - -// ClassModel - Model for testing model with \"_class\" property -type ClassModel struct { - - Class string `json:"_class,omitempty"` -} diff --git a/samples/openapi3/server/petstore/go-gin-api-server/go/model_client.go b/samples/openapi3/server/petstore/go-gin-api-server/go/model_client.go deleted file mode 100644 index f49c616f021..00000000000 --- a/samples/openapi3/server/petstore/go-gin-api-server/go/model_client.go +++ /dev/null @@ -1,15 +0,0 @@ -/* - * 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: \" \\ - * - * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package petstoreserver - -type Client struct { - - Client string `json:"client,omitempty"` -} diff --git a/samples/openapi3/server/petstore/go-gin-api-server/go/model_dog.go b/samples/openapi3/server/petstore/go-gin-api-server/go/model_dog.go deleted file mode 100644 index 04b2a9ba9aa..00000000000 --- a/samples/openapi3/server/petstore/go-gin-api-server/go/model_dog.go +++ /dev/null @@ -1,19 +0,0 @@ -/* - * 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: \" \\ - * - * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package petstoreserver - -type Dog struct { - - ClassName string `json:"className"` - - Color string `json:"color,omitempty"` - - Breed string `json:"breed,omitempty"` -} diff --git a/samples/openapi3/server/petstore/go-gin-api-server/go/model_dog_all_of.go b/samples/openapi3/server/petstore/go-gin-api-server/go/model_dog_all_of.go deleted file mode 100644 index a36b96b1a0c..00000000000 --- a/samples/openapi3/server/petstore/go-gin-api-server/go/model_dog_all_of.go +++ /dev/null @@ -1,15 +0,0 @@ -/* - * 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: \" \\ - * - * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package petstoreserver - -type DogAllOf struct { - - Breed string `json:"breed,omitempty"` -} diff --git a/samples/openapi3/server/petstore/go-gin-api-server/go/model_enum_arrays.go b/samples/openapi3/server/petstore/go-gin-api-server/go/model_enum_arrays.go deleted file mode 100644 index 813af5d8701..00000000000 --- a/samples/openapi3/server/petstore/go-gin-api-server/go/model_enum_arrays.go +++ /dev/null @@ -1,17 +0,0 @@ -/* - * 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: \" \\ - * - * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package petstoreserver - -type EnumArrays struct { - - JustSymbol string `json:"just_symbol,omitempty"` - - ArrayEnum []string `json:"array_enum,omitempty"` -} diff --git a/samples/openapi3/server/petstore/go-gin-api-server/go/model_enum_class.go b/samples/openapi3/server/petstore/go-gin-api-server/go/model_enum_class.go deleted file mode 100644 index da4428a5d41..00000000000 --- a/samples/openapi3/server/petstore/go-gin-api-server/go/model_enum_class.go +++ /dev/null @@ -1,19 +0,0 @@ -/* - * 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: \" \\ - * - * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package petstoreserver - -type EnumClass string - -// List of EnumClass -const ( - ABC EnumClass = "_abc" - EFG EnumClass = "-efg" - XYZ EnumClass = "(xyz)" -) diff --git a/samples/openapi3/server/petstore/go-gin-api-server/go/model_enum_test_.go b/samples/openapi3/server/petstore/go-gin-api-server/go/model_enum_test_.go deleted file mode 100644 index 7822fd4e9d4..00000000000 --- a/samples/openapi3/server/petstore/go-gin-api-server/go/model_enum_test_.go +++ /dev/null @@ -1,29 +0,0 @@ -/* - * 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: \" \\ - * - * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package petstoreserver - -type EnumTest struct { - - EnumString string `json:"enum_string,omitempty"` - - EnumStringRequired string `json:"enum_string_required"` - - EnumInteger int32 `json:"enum_integer,omitempty"` - - EnumNumber float64 `json:"enum_number,omitempty"` - - OuterEnum *OuterEnum `json:"outerEnum,omitempty"` - - OuterEnumInteger OuterEnumInteger `json:"outerEnumInteger,omitempty"` - - OuterEnumDefaultValue OuterEnumDefaultValue `json:"outerEnumDefaultValue,omitempty"` - - OuterEnumIntegerDefaultValue OuterEnumIntegerDefaultValue `json:"outerEnumIntegerDefaultValue,omitempty"` -} diff --git a/samples/openapi3/server/petstore/go-gin-api-server/go/model_file.go b/samples/openapi3/server/petstore/go-gin-api-server/go/model_file.go deleted file mode 100644 index 9bbc4164c2e..00000000000 --- a/samples/openapi3/server/petstore/go-gin-api-server/go/model_file.go +++ /dev/null @@ -1,17 +0,0 @@ -/* - * 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: \" \\ - * - * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package petstoreserver - -// File - Must be named `File` for test. -type File struct { - - // Test capitalization - SourceURI string `json:"sourceURI,omitempty"` -} diff --git a/samples/openapi3/server/petstore/go-gin-api-server/go/model_file_schema_test_class.go b/samples/openapi3/server/petstore/go-gin-api-server/go/model_file_schema_test_class.go deleted file mode 100644 index c9e7600031e..00000000000 --- a/samples/openapi3/server/petstore/go-gin-api-server/go/model_file_schema_test_class.go +++ /dev/null @@ -1,17 +0,0 @@ -/* - * 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: \" \\ - * - * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package petstoreserver - -type FileSchemaTestClass struct { - - File File `json:"file,omitempty"` - - Files []File `json:"files,omitempty"` -} diff --git a/samples/openapi3/server/petstore/go-gin-api-server/go/model_foo.go b/samples/openapi3/server/petstore/go-gin-api-server/go/model_foo.go deleted file mode 100644 index 9e85ac9ab6c..00000000000 --- a/samples/openapi3/server/petstore/go-gin-api-server/go/model_foo.go +++ /dev/null @@ -1,15 +0,0 @@ -/* - * 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: \" \\ - * - * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package petstoreserver - -type Foo struct { - - Bar string `json:"bar,omitempty"` -} diff --git a/samples/openapi3/server/petstore/go-gin-api-server/go/model_format_test_.go b/samples/openapi3/server/petstore/go-gin-api-server/go/model_format_test_.go deleted file mode 100644 index eaa3ce019a7..00000000000 --- a/samples/openapi3/server/petstore/go-gin-api-server/go/model_format_test_.go +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 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: \" \\ - * - * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package petstoreserver - -import ( - "os" - "time" -) - -type FormatTest struct { - - Integer int32 `json:"integer,omitempty"` - - Int32 int32 `json:"int32,omitempty"` - - Int64 int64 `json:"int64,omitempty"` - - Number float32 `json:"number"` - - Float float32 `json:"float,omitempty"` - - Double float64 `json:"double,omitempty"` - - String string `json:"string,omitempty"` - - Byte string `json:"byte"` - - Binary *os.File `json:"binary,omitempty"` - - Date string `json:"date"` - - DateTime time.Time `json:"dateTime,omitempty"` - - Uuid string `json:"uuid,omitempty"` - - Password string `json:"password"` - - // A string that is a 10 digit number. Can have leading zeros. - PatternWithDigits string `json:"pattern_with_digits,omitempty"` - - // A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. - PatternWithDigitsAndDelimiter string `json:"pattern_with_digits_and_delimiter,omitempty"` -} diff --git a/samples/openapi3/server/petstore/go-gin-api-server/go/model_has_only_read_only.go b/samples/openapi3/server/petstore/go-gin-api-server/go/model_has_only_read_only.go deleted file mode 100644 index d64b0e012c7..00000000000 --- a/samples/openapi3/server/petstore/go-gin-api-server/go/model_has_only_read_only.go +++ /dev/null @@ -1,17 +0,0 @@ -/* - * 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: \" \\ - * - * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package petstoreserver - -type HasOnlyReadOnly struct { - - Bar string `json:"bar,omitempty"` - - Foo string `json:"foo,omitempty"` -} diff --git a/samples/openapi3/server/petstore/go-gin-api-server/go/model_health_check_result.go b/samples/openapi3/server/petstore/go-gin-api-server/go/model_health_check_result.go deleted file mode 100644 index 9cebb74d3cb..00000000000 --- a/samples/openapi3/server/petstore/go-gin-api-server/go/model_health_check_result.go +++ /dev/null @@ -1,16 +0,0 @@ -/* - * 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: \" \\ - * - * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package petstoreserver - -// HealthCheckResult - Just a string to inform instance is up and running. Make it nullable in hope to get it as pointer in generated model. -type HealthCheckResult struct { - - NullableMessage *string `json:"NullableMessage,omitempty"` -} diff --git a/samples/openapi3/server/petstore/go-gin-api-server/go/model_inline_object_2.go b/samples/openapi3/server/petstore/go-gin-api-server/go/model_inline_object_2.go deleted file mode 100644 index 3babd0cfac9..00000000000 --- a/samples/openapi3/server/petstore/go-gin-api-server/go/model_inline_object_2.go +++ /dev/null @@ -1,19 +0,0 @@ -/* - * 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: \" \\ - * - * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package petstoreserver - -type InlineObject2 struct { - - // Form parameter enum test (string array) - EnumFormStringArray []string `json:"enum_form_string_array,omitempty"` - - // Form parameter enum test (string) - EnumFormString string `json:"enum_form_string,omitempty"` -} diff --git a/samples/openapi3/server/petstore/go-gin-api-server/go/model_inline_object_3.go b/samples/openapi3/server/petstore/go-gin-api-server/go/model_inline_object_3.go deleted file mode 100644 index 226092059da..00000000000 --- a/samples/openapi3/server/petstore/go-gin-api-server/go/model_inline_object_3.go +++ /dev/null @@ -1,60 +0,0 @@ -/* - * 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: \" \\ - * - * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package petstoreserver - -import ( - "os" - "time" -) - -type InlineObject3 struct { - - // None - Integer int32 `json:"integer,omitempty"` - - // None - Int32 int32 `json:"int32,omitempty"` - - // None - Int64 int64 `json:"int64,omitempty"` - - // None - Number float32 `json:"number"` - - // None - Float float32 `json:"float,omitempty"` - - // None - Double float64 `json:"double"` - - // None - String string `json:"string,omitempty"` - - // None - PatternWithoutDelimiter string `json:"pattern_without_delimiter"` - - // None - Byte string `json:"byte"` - - // None - Binary *os.File `json:"binary,omitempty"` - - // None - Date string `json:"date,omitempty"` - - // None - DateTime time.Time `json:"dateTime,omitempty"` - - // None - Password string `json:"password,omitempty"` - - // None - Callback string `json:"callback,omitempty"` -} diff --git a/samples/openapi3/server/petstore/go-gin-api-server/go/model_inline_object_4.go b/samples/openapi3/server/petstore/go-gin-api-server/go/model_inline_object_4.go deleted file mode 100644 index 23db282a2e1..00000000000 --- a/samples/openapi3/server/petstore/go-gin-api-server/go/model_inline_object_4.go +++ /dev/null @@ -1,19 +0,0 @@ -/* - * 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: \" \\ - * - * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package petstoreserver - -type InlineObject4 struct { - - // field1 - Param string `json:"param"` - - // field2 - Param2 string `json:"param2"` -} diff --git a/samples/openapi3/server/petstore/go-gin-api-server/go/model_inline_object_5.go b/samples/openapi3/server/petstore/go-gin-api-server/go/model_inline_object_5.go deleted file mode 100644 index 8004ded7ce5..00000000000 --- a/samples/openapi3/server/petstore/go-gin-api-server/go/model_inline_object_5.go +++ /dev/null @@ -1,23 +0,0 @@ -/* - * 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: \" \\ - * - * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package petstoreserver - -import ( - "os" -) - -type InlineObject5 struct { - - // Additional data to pass to server - AdditionalMetadata string `json:"additionalMetadata,omitempty"` - - // file to upload - RequiredFile *os.File `json:"requiredFile"` -} diff --git a/samples/openapi3/server/petstore/go-gin-api-server/go/model_inline_response_default.go b/samples/openapi3/server/petstore/go-gin-api-server/go/model_inline_response_default.go deleted file mode 100644 index 50f4bb4f2bd..00000000000 --- a/samples/openapi3/server/petstore/go-gin-api-server/go/model_inline_response_default.go +++ /dev/null @@ -1,15 +0,0 @@ -/* - * 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: \" \\ - * - * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package petstoreserver - -type InlineResponseDefault struct { - - String Foo `json:"string,omitempty"` -} diff --git a/samples/openapi3/server/petstore/go-gin-api-server/go/model_list.go b/samples/openapi3/server/petstore/go-gin-api-server/go/model_list.go deleted file mode 100644 index a6bf160a13c..00000000000 --- a/samples/openapi3/server/petstore/go-gin-api-server/go/model_list.go +++ /dev/null @@ -1,15 +0,0 @@ -/* - * 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: \" \\ - * - * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package petstoreserver - -type List struct { - - Var123List string `json:"123-list,omitempty"` -} diff --git a/samples/openapi3/server/petstore/go-gin-api-server/go/model_map_test_.go b/samples/openapi3/server/petstore/go-gin-api-server/go/model_map_test_.go deleted file mode 100644 index 49a86a792ac..00000000000 --- a/samples/openapi3/server/petstore/go-gin-api-server/go/model_map_test_.go +++ /dev/null @@ -1,21 +0,0 @@ -/* - * 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: \" \\ - * - * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package petstoreserver - -type MapTest struct { - - MapMapOfString map[string]map[string]string `json:"map_map_of_string,omitempty"` - - MapOfEnumString map[string]string `json:"map_of_enum_string,omitempty"` - - DirectMap map[string]bool `json:"direct_map,omitempty"` - - IndirectMap map[string]bool `json:"indirect_map,omitempty"` -} diff --git a/samples/openapi3/server/petstore/go-gin-api-server/go/model_mixed_properties_and_additional_properties_class.go b/samples/openapi3/server/petstore/go-gin-api-server/go/model_mixed_properties_and_additional_properties_class.go deleted file mode 100644 index e25d32587cd..00000000000 --- a/samples/openapi3/server/petstore/go-gin-api-server/go/model_mixed_properties_and_additional_properties_class.go +++ /dev/null @@ -1,23 +0,0 @@ -/* - * 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: \" \\ - * - * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package petstoreserver - -import ( - "time" -) - -type MixedPropertiesAndAdditionalPropertiesClass struct { - - Uuid string `json:"uuid,omitempty"` - - DateTime time.Time `json:"dateTime,omitempty"` - - Map map[string]Animal `json:"map,omitempty"` -} diff --git a/samples/openapi3/server/petstore/go-gin-api-server/go/model_name.go b/samples/openapi3/server/petstore/go-gin-api-server/go/model_name.go deleted file mode 100644 index cd9a874c419..00000000000 --- a/samples/openapi3/server/petstore/go-gin-api-server/go/model_name.go +++ /dev/null @@ -1,22 +0,0 @@ -/* - * 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: \" \\ - * - * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package petstoreserver - -// Name - Model for testing model name same as property name -type Name struct { - - Name int32 `json:"name"` - - SnakeCase int32 `json:"snake_case,omitempty"` - - Property string `json:"property,omitempty"` - - Var123Number int32 `json:"123Number,omitempty"` -} diff --git a/samples/openapi3/server/petstore/go-gin-api-server/go/model_nullable_class.go b/samples/openapi3/server/petstore/go-gin-api-server/go/model_nullable_class.go deleted file mode 100644 index ba2aa1f86cf..00000000000 --- a/samples/openapi3/server/petstore/go-gin-api-server/go/model_nullable_class.go +++ /dev/null @@ -1,41 +0,0 @@ -/* - * 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: \" \\ - * - * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package petstoreserver - -import ( - "time" -) - -type NullableClass struct { - - IntegerProp *int32 `json:"integer_prop,omitempty"` - - NumberProp *float32 `json:"number_prop,omitempty"` - - BooleanProp *bool `json:"boolean_prop,omitempty"` - - StringProp *string `json:"string_prop,omitempty"` - - DateProp *string `json:"date_prop,omitempty"` - - DatetimeProp *time.Time `json:"datetime_prop,omitempty"` - - ArrayNullableProp *[]map[string]interface{} `json:"array_nullable_prop,omitempty"` - - ArrayAndItemsNullableProp *[]map[string]interface{} `json:"array_and_items_nullable_prop,omitempty"` - - ArrayItemsNullable []map[string]interface{} `json:"array_items_nullable,omitempty"` - - ObjectNullableProp *map[string]map[string]interface{} `json:"object_nullable_prop,omitempty"` - - ObjectAndItemsNullableProp *map[string]map[string]interface{} `json:"object_and_items_nullable_prop,omitempty"` - - ObjectItemsNullable map[string]map[string]interface{} `json:"object_items_nullable,omitempty"` -} diff --git a/samples/openapi3/server/petstore/go-gin-api-server/go/model_number_only.go b/samples/openapi3/server/petstore/go-gin-api-server/go/model_number_only.go deleted file mode 100644 index ba6f4af6401..00000000000 --- a/samples/openapi3/server/petstore/go-gin-api-server/go/model_number_only.go +++ /dev/null @@ -1,15 +0,0 @@ -/* - * 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: \" \\ - * - * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package petstoreserver - -type NumberOnly struct { - - JustNumber float32 `json:"JustNumber,omitempty"` -} diff --git a/samples/openapi3/server/petstore/go-gin-api-server/go/model_order.go b/samples/openapi3/server/petstore/go-gin-api-server/go/model_order.go deleted file mode 100644 index 6849a9f76d6..00000000000 --- a/samples/openapi3/server/petstore/go-gin-api-server/go/model_order.go +++ /dev/null @@ -1,30 +0,0 @@ -/* - * 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: \" \\ - * - * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package petstoreserver - -import ( - "time" -) - -type Order struct { - - Id int64 `json:"id,omitempty"` - - PetId int64 `json:"petId,omitempty"` - - Quantity int32 `json:"quantity,omitempty"` - - ShipDate time.Time `json:"shipDate,omitempty"` - - // Order Status - Status string `json:"status,omitempty"` - - Complete bool `json:"complete,omitempty"` -} diff --git a/samples/openapi3/server/petstore/go-gin-api-server/go/model_outer_composite.go b/samples/openapi3/server/petstore/go-gin-api-server/go/model_outer_composite.go deleted file mode 100644 index 7534db47c2e..00000000000 --- a/samples/openapi3/server/petstore/go-gin-api-server/go/model_outer_composite.go +++ /dev/null @@ -1,19 +0,0 @@ -/* - * 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: \" \\ - * - * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package petstoreserver - -type OuterComposite struct { - - MyNumber float32 `json:"my_number,omitempty"` - - MyString string `json:"my_string,omitempty"` - - MyBoolean bool `json:"my_boolean,omitempty"` -} diff --git a/samples/openapi3/server/petstore/go-gin-api-server/go/model_outer_enum.go b/samples/openapi3/server/petstore/go-gin-api-server/go/model_outer_enum.go deleted file mode 100644 index d01d988ccda..00000000000 --- a/samples/openapi3/server/petstore/go-gin-api-server/go/model_outer_enum.go +++ /dev/null @@ -1,19 +0,0 @@ -/* - * 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: \" \\ - * - * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package petstoreserver - -type OuterEnum string - -// List of OuterEnum -const ( - PLACED OuterEnum = "placed" - APPROVED OuterEnum = "approved" - DELIVERED OuterEnum = "delivered" -) diff --git a/samples/openapi3/server/petstore/go-gin-api-server/go/model_outer_enum_default_value.go b/samples/openapi3/server/petstore/go-gin-api-server/go/model_outer_enum_default_value.go deleted file mode 100644 index 12881121ff3..00000000000 --- a/samples/openapi3/server/petstore/go-gin-api-server/go/model_outer_enum_default_value.go +++ /dev/null @@ -1,19 +0,0 @@ -/* - * 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: \" \\ - * - * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package petstoreserver - -type OuterEnumDefaultValue string - -// List of OuterEnumDefaultValue -const ( - PLACED OuterEnumDefaultValue = "placed" - APPROVED OuterEnumDefaultValue = "approved" - DELIVERED OuterEnumDefaultValue = "delivered" -) diff --git a/samples/openapi3/server/petstore/go-gin-api-server/go/model_outer_enum_integer.go b/samples/openapi3/server/petstore/go-gin-api-server/go/model_outer_enum_integer.go deleted file mode 100644 index f14b13342af..00000000000 --- a/samples/openapi3/server/petstore/go-gin-api-server/go/model_outer_enum_integer.go +++ /dev/null @@ -1,19 +0,0 @@ -/* - * 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: \" \\ - * - * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package petstoreserver - -type OuterEnumInteger int32 - -// List of OuterEnumInteger -const ( - _0 OuterEnumInteger = 0 - _1 OuterEnumInteger = 1 - _2 OuterEnumInteger = 2 -) diff --git a/samples/openapi3/server/petstore/go-gin-api-server/go/model_outer_enum_integer_default_value.go b/samples/openapi3/server/petstore/go-gin-api-server/go/model_outer_enum_integer_default_value.go deleted file mode 100644 index 94b4bb2077a..00000000000 --- a/samples/openapi3/server/petstore/go-gin-api-server/go/model_outer_enum_integer_default_value.go +++ /dev/null @@ -1,19 +0,0 @@ -/* - * 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: \" \\ - * - * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package petstoreserver - -type OuterEnumIntegerDefaultValue int32 - -// List of OuterEnumIntegerDefaultValue -const ( - _0 OuterEnumIntegerDefaultValue = 0 - _1 OuterEnumIntegerDefaultValue = 1 - _2 OuterEnumIntegerDefaultValue = 2 -) diff --git a/samples/openapi3/server/petstore/go-gin-api-server/go/model_pet.go b/samples/openapi3/server/petstore/go-gin-api-server/go/model_pet.go deleted file mode 100644 index 2271730674e..00000000000 --- a/samples/openapi3/server/petstore/go-gin-api-server/go/model_pet.go +++ /dev/null @@ -1,26 +0,0 @@ -/* - * 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: \" \\ - * - * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package petstoreserver - -type Pet struct { - - Id int64 `json:"id,omitempty"` - - Category Category `json:"category,omitempty"` - - Name string `json:"name"` - - PhotoUrls []string `json:"photoUrls"` - - Tags []Tag `json:"tags,omitempty"` - - // pet status in the store - Status string `json:"status,omitempty"` -} diff --git a/samples/openapi3/server/petstore/go-gin-api-server/go/model_read_only_first.go b/samples/openapi3/server/petstore/go-gin-api-server/go/model_read_only_first.go deleted file mode 100644 index c4192d91ee2..00000000000 --- a/samples/openapi3/server/petstore/go-gin-api-server/go/model_read_only_first.go +++ /dev/null @@ -1,17 +0,0 @@ -/* - * 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: \" \\ - * - * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package petstoreserver - -type ReadOnlyFirst struct { - - Bar string `json:"bar,omitempty"` - - Baz string `json:"baz,omitempty"` -} diff --git a/samples/openapi3/server/petstore/go-gin-api-server/go/model_return.go b/samples/openapi3/server/petstore/go-gin-api-server/go/model_return.go deleted file mode 100644 index 0ff664525de..00000000000 --- a/samples/openapi3/server/petstore/go-gin-api-server/go/model_return.go +++ /dev/null @@ -1,16 +0,0 @@ -/* - * 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: \" \\ - * - * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package petstoreserver - -// Return - Model for testing reserved words -type Return struct { - - Return int32 `json:"return,omitempty"` -} diff --git a/samples/openapi3/server/petstore/go-gin-api-server/go/model_tag.go b/samples/openapi3/server/petstore/go-gin-api-server/go/model_tag.go deleted file mode 100644 index 29cd4d64ae3..00000000000 --- a/samples/openapi3/server/petstore/go-gin-api-server/go/model_tag.go +++ /dev/null @@ -1,17 +0,0 @@ -/* - * 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: \" \\ - * - * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package petstoreserver - -type Tag struct { - - Id int64 `json:"id,omitempty"` - - Name string `json:"name,omitempty"` -} diff --git a/samples/openapi3/server/petstore/go-gin-api-server/go/model_user.go b/samples/openapi3/server/petstore/go-gin-api-server/go/model_user.go deleted file mode 100644 index 1eda4c6f763..00000000000 --- a/samples/openapi3/server/petstore/go-gin-api-server/go/model_user.go +++ /dev/null @@ -1,30 +0,0 @@ -/* - * 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: \" \\ - * - * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package petstoreserver - -type User struct { - - Id int64 `json:"id,omitempty"` - - Username string `json:"username,omitempty"` - - FirstName string `json:"firstName,omitempty"` - - LastName string `json:"lastName,omitempty"` - - Email string `json:"email,omitempty"` - - Password string `json:"password,omitempty"` - - Phone string `json:"phone,omitempty"` - - // User Status - UserStatus int32 `json:"userStatus,omitempty"` -} diff --git a/samples/openapi3/server/petstore/go-gin-api-server/go/routers.go b/samples/openapi3/server/petstore/go-gin-api-server/go/routers.go deleted file mode 100644 index 4d05d282f98..00000000000 --- a/samples/openapi3/server/petstore/go-gin-api-server/go/routers.go +++ /dev/null @@ -1,330 +0,0 @@ -/* - * 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: \" \\ - * - * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package petstoreserver - -import ( - "net/http" - - "github.com/gin-gonic/gin" -) - -// Route is the information for every URI. -type Route struct { - // Name is the name of this Route. - Name string - // Method is the string for the HTTP method. ex) GET, POST etc.. - Method string - // Pattern is the pattern of the URI. - Pattern string - // HandlerFunc is the handler function of this route. - HandlerFunc gin.HandlerFunc -} - -// Routes is the list of the generated Route. -type Routes []Route - -// NewRouter returns a new router. -func NewRouter() *gin.Engine { - router := gin.Default() - for _, route := range routes { - switch route.Method { - case http.MethodGet: - router.GET(route.Pattern, route.HandlerFunc) - case http.MethodPost: - router.POST(route.Pattern, route.HandlerFunc) - case http.MethodPut: - router.PUT(route.Pattern, route.HandlerFunc) - case http.MethodDelete: - router.DELETE(route.Pattern, route.HandlerFunc) - } - } - - return router -} - -// Index is the index handler. -func Index(c *gin.Context) { - c.String(http.StatusOK, "Hello World!") -} - -var routes = Routes{ - { - "Index", - http.MethodGet, - "/v2/", - Index, - }, - - { - "Call123TestSpecialTags", - http.MethodPatch, - "/v2/another-fake/dummy", - Call123TestSpecialTags, - }, - - { - "FooGet", - http.MethodGet, - "/v2/foo", - FooGet, - }, - - { - "FakeHealthGet", - http.MethodGet, - "/v2/fake/health", - FakeHealthGet, - }, - - { - "FakeOuterBooleanSerialize", - http.MethodPost, - "/v2/fake/outer/boolean", - FakeOuterBooleanSerialize, - }, - - { - "FakeOuterCompositeSerialize", - http.MethodPost, - "/v2/fake/outer/composite", - FakeOuterCompositeSerialize, - }, - - { - "FakeOuterNumberSerialize", - http.MethodPost, - "/v2/fake/outer/number", - FakeOuterNumberSerialize, - }, - - { - "FakeOuterStringSerialize", - http.MethodPost, - "/v2/fake/outer/string", - FakeOuterStringSerialize, - }, - - { - "TestBodyWithFileSchema", - http.MethodPut, - "/v2/fake/body-with-file-schema", - TestBodyWithFileSchema, - }, - - { - "TestBodyWithQueryParams", - http.MethodPut, - "/v2/fake/body-with-query-params", - TestBodyWithQueryParams, - }, - - { - "TestClientModel", - http.MethodPatch, - "/v2/fake", - TestClientModel, - }, - - { - "TestEndpointParameters", - http.MethodPost, - "/v2/fake", - TestEndpointParameters, - }, - - { - "TestEnumParameters", - http.MethodGet, - "/v2/fake", - TestEnumParameters, - }, - - { - "TestGroupParameters", - http.MethodDelete, - "/v2/fake", - TestGroupParameters, - }, - - { - "TestInlineAdditionalProperties", - http.MethodPost, - "/v2/fake/inline-additionalProperties", - TestInlineAdditionalProperties, - }, - - { - "TestJsonFormData", - http.MethodGet, - "/v2/fake/jsonFormData", - TestJsonFormData, - }, - - { - "TestQueryParameterCollectionFormat", - http.MethodPut, - "/v2/fake/test-query-paramters", - TestQueryParameterCollectionFormat, - }, - - { - "TestClassname", - http.MethodPatch, - "/v2/fake_classname_test", - TestClassname, - }, - - { - "AddPet", - http.MethodPost, - "/v2/pet", - AddPet, - }, - - { - "DeletePet", - http.MethodDelete, - "/v2/pet/:petId", - DeletePet, - }, - - { - "FindPetsByStatus", - http.MethodGet, - "/v2/pet/findByStatus", - FindPetsByStatus, - }, - - { - "FindPetsByTags", - http.MethodGet, - "/v2/pet/findByTags", - FindPetsByTags, - }, - - { - "GetPetById", - http.MethodGet, - "/v2/pet/:petId", - GetPetById, - }, - - { - "UpdatePet", - http.MethodPut, - "/v2/pet", - UpdatePet, - }, - - { - "UpdatePetWithForm", - http.MethodPost, - "/v2/pet/:petId", - UpdatePetWithForm, - }, - - { - "UploadFile", - http.MethodPost, - "/v2/pet/:petId/uploadImage", - UploadFile, - }, - - { - "UploadFileWithRequiredFile", - http.MethodPost, - "/v2/fake/:petId/uploadImageWithRequiredFile", - UploadFileWithRequiredFile, - }, - - { - "DeleteOrder", - http.MethodDelete, - "/v2/store/order/:order_id", - DeleteOrder, - }, - - { - "GetInventory", - http.MethodGet, - "/v2/store/inventory", - GetInventory, - }, - - { - "GetOrderById", - http.MethodGet, - "/v2/store/order/:order_id", - GetOrderById, - }, - - { - "PlaceOrder", - http.MethodPost, - "/v2/store/order", - PlaceOrder, - }, - - { - "CreateUser", - http.MethodPost, - "/v2/user", - CreateUser, - }, - - { - "CreateUsersWithArrayInput", - http.MethodPost, - "/v2/user/createWithArray", - CreateUsersWithArrayInput, - }, - - { - "CreateUsersWithListInput", - http.MethodPost, - "/v2/user/createWithList", - CreateUsersWithListInput, - }, - - { - "DeleteUser", - http.MethodDelete, - "/v2/user/:username", - DeleteUser, - }, - - { - "GetUserByName", - http.MethodGet, - "/v2/user/:username", - GetUserByName, - }, - - { - "LoginUser", - http.MethodGet, - "/v2/user/login", - LoginUser, - }, - - { - "LogoutUser", - http.MethodGet, - "/v2/user/logout", - LogoutUser, - }, - - { - "UpdateUser", - http.MethodPut, - "/v2/user/:username", - UpdateUser, - }, -} diff --git a/samples/openapi3/server/petstore/go-gin-api-server/main.go b/samples/openapi3/server/petstore/go-gin-api-server/main.go deleted file mode 100644 index ce68d62b90f..00000000000 --- a/samples/openapi3/server/petstore/go-gin-api-server/main.go +++ /dev/null @@ -1,31 +0,0 @@ -/* - * 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: \" \\ - * - * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package main - -import ( - "log" - - // WARNING! - // Change this to a fully-qualified import path - // once you place this file into your project. - // For example, - // - // sw "github.com/myname/myrepo/go" - // - sw "./go" -) - -func main() { - log.Printf("Server started") - - router := sw.NewRouter() - - log.Fatal(router.Run(":8080")) -} diff --git a/samples/server/petstore/go-api-server/.openapi-generator/FILES b/samples/server/petstore/go-api-server/.openapi-generator/FILES index f78be91ace5..40a9445dadf 100644 --- a/samples/server/petstore/go-api-server/.openapi-generator/FILES +++ b/samples/server/petstore/go-api-server/.openapi-generator/FILES @@ -12,6 +12,8 @@ go/api_user_service.go go/logger.go go/model_api_response.go go/model_category.go +go/model_inline_object.go +go/model_inline_object_1.go go/model_order.go go/model_pet.go go/model_tag.go diff --git a/samples/server/petstore/go-api-server/api/openapi.yaml b/samples/server/petstore/go-api-server/api/openapi.yaml index 0c61c209957..26aaeac34b7 100644 --- a/samples/server/petstore/go-api-server/api/openapi.yaml +++ b/samples/server/petstore/go-api-server/api/openapi.yaml @@ -1,4 +1,4 @@ -openapi: 3.0.1 +openapi: 3.0.0 info: description: This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. @@ -7,6 +7,9 @@ info: url: https://www.apache.org/licenses/LICENSE-2.0.html title: OpenAPI Petstore version: 1.0.0 +externalDocs: + description: Find out more about Swagger + url: http://swagger.io servers: - url: http://petstore.swagger.io/v2 tags: @@ -21,18 +24,18 @@ paths: post: operationId: addPet requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/Pet' - application/xml: - schema: - $ref: '#/components/schemas/Pet' - description: Pet object that needs to be added to the store - required: true + $ref: '#/components/requestBodies/Pet' responses: + "200": + content: + application/xml: + schema: + $ref: '#/components/schemas/Pet' + application/json: + schema: + $ref: '#/components/schemas/Pet' + description: successful operation "405": - content: {} description: Invalid input security: - petstore_auth: @@ -41,28 +44,25 @@ paths: summary: Add a new pet to the store tags: - pet - x-codegen-request-body-name: body put: operationId: updatePet requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/Pet' - application/xml: - schema: - $ref: '#/components/schemas/Pet' - description: Pet object that needs to be added to the store - required: true + $ref: '#/components/requestBodies/Pet' responses: + "200": + content: + application/xml: + schema: + $ref: '#/components/schemas/Pet' + application/json: + schema: + $ref: '#/components/schemas/Pet' + description: successful operation "400": - content: {} description: Invalid ID supplied "404": - content: {} description: Pet not found "405": - content: {} description: Validation exception security: - petstore_auth: @@ -71,7 +71,6 @@ paths: summary: Update an existing pet tags: - pet - x-codegen-request-body-name: body /pet/findByStatus: get: description: Multiple status values can be provided with comma separated strings @@ -107,11 +106,9 @@ paths: type: array description: successful operation "400": - content: {} description: Invalid status value security: - petstore_auth: - - write:pets - read:pets summary: Finds Pets by status tags: @@ -148,11 +145,9 @@ paths: type: array description: successful operation "400": - content: {} description: Invalid tag value security: - petstore_auth: - - write:pets - read:pets summary: Finds Pets by tags tags: @@ -161,20 +156,24 @@ paths: delete: operationId: deletePet parameters: - - in: header + - explode: false + in: header name: api_key + required: false schema: type: string + style: simple - description: Pet id to delete + explode: false in: path name: petId required: true schema: format: int64 type: integer + style: simple responses: "400": - content: {} description: Invalid pet value security: - petstore_auth: @@ -188,12 +187,14 @@ paths: operationId: getPetById parameters: - description: ID of pet to return + explode: false in: path name: petId required: true schema: format: int64 type: integer + style: simple responses: "200": content: @@ -205,10 +206,8 @@ paths: $ref: '#/components/schemas/Pet' description: successful operation "400": - content: {} description: Invalid ID supplied "404": - content: {} description: Pet not found security: - api_key: [] @@ -219,13 +218,16 @@ paths: operationId: updatePetWithForm parameters: - description: ID of pet that needs to be updated + explode: false in: path name: petId required: true schema: format: int64 type: integer + style: simple requestBody: + $ref: '#/components/requestBodies/inline_object' content: application/x-www-form-urlencoded: schema: @@ -236,9 +238,9 @@ paths: status: description: Updated status of the pet type: string + type: object responses: "405": - content: {} description: Invalid input security: - petstore_auth: @@ -252,13 +254,16 @@ paths: operationId: uploadFile parameters: - description: ID of pet to update + explode: false in: path name: petId required: true schema: format: int64 type: integer + style: simple requestBody: + $ref: '#/components/requestBodies/inline_object_1' content: multipart/form-data: schema: @@ -270,6 +275,7 @@ paths: description: file to upload format: binary type: string + type: object responses: "200": content: @@ -308,7 +314,7 @@ paths: operationId: placeOrder requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/Order' description: order placed for purchasing the pet @@ -324,12 +330,10 @@ paths: $ref: '#/components/schemas/Order' description: successful operation "400": - content: {} description: Invalid Order summary: Place an order for a pet tags: - store - x-codegen-request-body-name: body /store/order/{orderId}: delete: description: For valid response try integer IDs with value < 1000. Anything @@ -337,17 +341,17 @@ paths: operationId: deleteOrder parameters: - description: ID of the order that needs to be deleted + explode: false in: path name: orderId required: true schema: type: string + style: simple responses: "400": - content: {} description: Invalid ID supplied "404": - content: {} description: Order not found summary: Delete purchase order by ID tags: @@ -358,6 +362,7 @@ paths: operationId: getOrderById parameters: - description: ID of pet that needs to be fetched + explode: false in: path name: orderId required: true @@ -366,6 +371,7 @@ paths: maximum: 5 minimum: 1 type: integer + style: simple responses: "200": content: @@ -377,10 +383,8 @@ paths: $ref: '#/components/schemas/Order' description: successful operation "400": - content: {} description: Invalid ID supplied "404": - content: {} description: Order not found summary: Find purchase order by ID tags: @@ -391,75 +395,66 @@ paths: operationId: createUser requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/User' description: Created user object required: true responses: default: - content: {} description: successful operation + security: + - api_key: [] summary: Create user tags: - user - x-codegen-request-body-name: body /user/createWithArray: post: operationId: createUsersWithArrayInput requestBody: - content: - '*/*': - schema: - items: - $ref: '#/components/schemas/User' - type: array - description: List of user object - required: true + $ref: '#/components/requestBodies/UserArray' responses: default: - content: {} description: successful operation + security: + - api_key: [] summary: Creates list of users with given input array tags: - user - x-codegen-request-body-name: body /user/createWithList: post: operationId: createUsersWithListInput requestBody: - content: - '*/*': - schema: - items: - $ref: '#/components/schemas/User' - type: array - description: List of user object - required: true + $ref: '#/components/requestBodies/UserArray' responses: default: - content: {} description: successful operation + security: + - api_key: [] summary: Creates list of users with given input array tags: - user - x-codegen-request-body-name: body /user/login: get: operationId: loginUser parameters: - description: The user name for login + explode: true in: query name: username required: true schema: + pattern: ^[a-zA-Z0-9]+[a-zA-Z0-9\.\-_]*[a-zA-Z0-9]+$ type: string + style: form - description: The password for login in clear text + explode: true in: query name: password required: true schema: type: string + style: form responses: "200": content: @@ -471,18 +466,29 @@ paths: type: string description: successful operation headers: + Set-Cookie: + description: Cookie authentication key for use with the `api_key` apiKey + authentication. + explode: false + schema: + example: AUTH_KEY=abcde12345; Path=/; HttpOnly + type: string + style: simple X-Rate-Limit: description: calls per hour allowed by the user + explode: false schema: format: int32 type: integer + style: simple X-Expires-After: description: date in UTC when toekn expires + explode: false schema: format: date-time type: string + style: simple "400": - content: {} description: Invalid username/password supplied summary: Logs user into the system tags: @@ -492,8 +498,9 @@ paths: operationId: logoutUser responses: default: - content: {} description: successful operation + security: + - api_key: [] summary: Logs out current logged in user session tags: - user @@ -503,18 +510,20 @@ paths: operationId: deleteUser parameters: - description: The name that needs to be deleted + explode: false in: path name: username required: true schema: type: string + style: simple responses: "400": - content: {} description: Invalid username supplied "404": - content: {} description: User not found + security: + - api_key: [] summary: Delete user tags: - user @@ -522,11 +531,13 @@ paths: operationId: getUserByName parameters: - description: The name that needs to be fetched. Use user1 for testing. + explode: false in: path name: username required: true schema: type: string + style: simple responses: "200": content: @@ -538,10 +549,8 @@ paths: $ref: '#/components/schemas/User' description: successful operation "400": - content: {} description: Invalid username supplied "404": - content: {} description: User not found summary: Get user by user name tags: @@ -551,30 +560,61 @@ paths: operationId: updateUser parameters: - description: name that need to be deleted + explode: false in: path name: username required: true schema: type: string + style: simple requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/User' description: Updated user object required: true responses: "400": - content: {} description: Invalid user supplied "404": - content: {} description: User not found + security: + - api_key: [] summary: Updated user tags: - user - x-codegen-request-body-name: body components: + requestBodies: + UserArray: + content: + application/json: + schema: + items: + $ref: '#/components/schemas/User' + type: array + description: List of user object + required: true + Pet: + content: + application/json: + schema: + $ref: '#/components/schemas/Pet' + application/xml: + schema: + $ref: '#/components/schemas/Pet' + description: Pet object that needs to be added to the store + required: true + inline_object: + content: + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/inline_object' + inline_object_1: + content: + multipart/form-data: + schema: + $ref: '#/components/schemas/inline_object_1' schemas: Order: description: An order for a pets from the pet store @@ -622,6 +662,7 @@ components: format: int64 type: integer name: + pattern: ^[a-zA-Z0-9]+[a-zA-Z0-9\.\-_]*[a-zA-Z0-9]+$ type: string title: Pet category type: object @@ -747,6 +788,25 @@ components: type: string title: An uploaded response type: object + inline_object: + properties: + name: + description: Updated name of the pet + type: string + status: + description: Updated status of the pet + type: string + type: object + inline_object_1: + properties: + additionalMetadata: + description: Additional data to pass to server + type: string + file: + description: file to upload + format: binary + type: string + type: object securitySchemes: petstore_auth: flows: diff --git a/samples/server/petstore/go-api-server/go/api_pet.go b/samples/server/petstore/go-api-server/go/api_pet.go index f5275ecbef3..f836529089a 100644 --- a/samples/server/petstore/go-api-server/go/api_pet.go +++ b/samples/server/petstore/go-api-server/go/api_pet.go @@ -83,13 +83,13 @@ func (c *PetApiController) Routes() Routes { // AddPet - Add a new pet to the store func (c *PetApiController) AddPet(w http.ResponseWriter, r *http.Request) { - body := &Pet{} - if err := json.NewDecoder(r.Body).Decode(&body); err != nil { + pet := &Pet{} + if err := json.NewDecoder(r.Body).Decode(&pet); err != nil { w.WriteHeader(500) return } - result, err := c.service.AddPet(*body) + result, err := c.service.AddPet(*pet) if err != nil { w.WriteHeader(500) return @@ -163,13 +163,13 @@ func (c *PetApiController) GetPetById(w http.ResponseWriter, r *http.Request) { // UpdatePet - Update an existing pet func (c *PetApiController) UpdatePet(w http.ResponseWriter, r *http.Request) { - body := &Pet{} - if err := json.NewDecoder(r.Body).Decode(&body); err != nil { + pet := &Pet{} + if err := json.NewDecoder(r.Body).Decode(&pet); err != nil { w.WriteHeader(500) return } - result, err := c.service.UpdatePet(*body) + result, err := c.service.UpdatePet(*pet) if err != nil { w.WriteHeader(500) return diff --git a/samples/server/petstore/go-api-server/go/api_pet_service.go b/samples/server/petstore/go-api-server/go/api_pet_service.go index 815eac5c7a9..cca444d5009 100644 --- a/samples/server/petstore/go-api-server/go/api_pet_service.go +++ b/samples/server/petstore/go-api-server/go/api_pet_service.go @@ -26,7 +26,7 @@ func NewPetApiService() PetApiServicer { } // AddPet - Add a new pet to the store -func (s *PetApiService) AddPet(body Pet) (interface{}, error) { +func (s *PetApiService) AddPet(pet Pet) (interface{}, error) { // TODO - update AddPet with the required logic for this service method. // Add api_pet_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. return nil, errors.New("service method 'AddPet' not implemented") @@ -61,7 +61,7 @@ func (s *PetApiService) GetPetById(petId int64) (interface{}, error) { } // UpdatePet - Update an existing pet -func (s *PetApiService) UpdatePet(body Pet) (interface{}, error) { +func (s *PetApiService) UpdatePet(pet Pet) (interface{}, error) { // TODO - update UpdatePet with the required logic for this service method. // Add api_pet_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. return nil, errors.New("service method 'UpdatePet' not implemented") diff --git a/samples/server/petstore/go-api-server/go/api_store.go b/samples/server/petstore/go-api-server/go/api_store.go index fc9da3c0ee5..c79f13eeb05 100644 --- a/samples/server/petstore/go-api-server/go/api_store.go +++ b/samples/server/petstore/go-api-server/go/api_store.go @@ -101,13 +101,13 @@ func (c *StoreApiController) GetOrderById(w http.ResponseWriter, r *http.Request // PlaceOrder - Place an order for a pet func (c *StoreApiController) PlaceOrder(w http.ResponseWriter, r *http.Request) { - body := &Order{} - if err := json.NewDecoder(r.Body).Decode(&body); err != nil { + order := &Order{} + if err := json.NewDecoder(r.Body).Decode(&order); err != nil { w.WriteHeader(500) return } - result, err := c.service.PlaceOrder(*body) + result, err := c.service.PlaceOrder(*order) if err != nil { w.WriteHeader(500) return diff --git a/samples/server/petstore/go-api-server/go/api_store_service.go b/samples/server/petstore/go-api-server/go/api_store_service.go index 749c12cf852..9bd0b307ba3 100644 --- a/samples/server/petstore/go-api-server/go/api_store_service.go +++ b/samples/server/petstore/go-api-server/go/api_store_service.go @@ -46,7 +46,7 @@ func (s *StoreApiService) GetOrderById(orderId int64) (interface{}, error) { } // PlaceOrder - Place an order for a pet -func (s *StoreApiService) PlaceOrder(body Order) (interface{}, error) { +func (s *StoreApiService) PlaceOrder(order Order) (interface{}, error) { // TODO - update PlaceOrder with the required logic for this service method. // Add api_store_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. return nil, errors.New("service method 'PlaceOrder' not implemented") diff --git a/samples/server/petstore/go-api-server/go/api_user.go b/samples/server/petstore/go-api-server/go/api_user.go index a6618b9d62d..60c0b787a03 100644 --- a/samples/server/petstore/go-api-server/go/api_user.go +++ b/samples/server/petstore/go-api-server/go/api_user.go @@ -83,13 +83,13 @@ func (c *UserApiController) Routes() Routes { // CreateUser - Create user func (c *UserApiController) CreateUser(w http.ResponseWriter, r *http.Request) { - body := &User{} - if err := json.NewDecoder(r.Body).Decode(&body); err != nil { + user := &User{} + if err := json.NewDecoder(r.Body).Decode(&user); err != nil { w.WriteHeader(500) return } - result, err := c.service.CreateUser(*body) + result, err := c.service.CreateUser(*user) if err != nil { w.WriteHeader(500) return @@ -100,13 +100,13 @@ func (c *UserApiController) CreateUser(w http.ResponseWriter, r *http.Request) { // CreateUsersWithArrayInput - Creates list of users with given input array func (c *UserApiController) CreateUsersWithArrayInput(w http.ResponseWriter, r *http.Request) { - body := &[]User{} - if err := json.NewDecoder(r.Body).Decode(&body); err != nil { + user := &[]User{} + if err := json.NewDecoder(r.Body).Decode(&user); err != nil { w.WriteHeader(500) return } - result, err := c.service.CreateUsersWithArrayInput(*body) + result, err := c.service.CreateUsersWithArrayInput(*user) if err != nil { w.WriteHeader(500) return @@ -117,13 +117,13 @@ func (c *UserApiController) CreateUsersWithArrayInput(w http.ResponseWriter, r * // CreateUsersWithListInput - Creates list of users with given input array func (c *UserApiController) CreateUsersWithListInput(w http.ResponseWriter, r *http.Request) { - body := &[]User{} - if err := json.NewDecoder(r.Body).Decode(&body); err != nil { + user := &[]User{} + if err := json.NewDecoder(r.Body).Decode(&user); err != nil { w.WriteHeader(500) return } - result, err := c.service.CreateUsersWithListInput(*body) + result, err := c.service.CreateUsersWithListInput(*user) if err != nil { w.WriteHeader(500) return @@ -187,13 +187,13 @@ func (c *UserApiController) LogoutUser(w http.ResponseWriter, r *http.Request) { func (c *UserApiController) UpdateUser(w http.ResponseWriter, r *http.Request) { params := mux.Vars(r) username := params["username"] - body := &User{} - if err := json.NewDecoder(r.Body).Decode(&body); err != nil { + user := &User{} + if err := json.NewDecoder(r.Body).Decode(&user); err != nil { w.WriteHeader(500) return } - result, err := c.service.UpdateUser(username, *body) + result, err := c.service.UpdateUser(username, *user) if err != nil { w.WriteHeader(500) return diff --git a/samples/server/petstore/go-api-server/go/api_user_service.go b/samples/server/petstore/go-api-server/go/api_user_service.go index 1136ac01129..928ed73b024 100644 --- a/samples/server/petstore/go-api-server/go/api_user_service.go +++ b/samples/server/petstore/go-api-server/go/api_user_service.go @@ -25,21 +25,21 @@ func NewUserApiService() UserApiServicer { } // CreateUser - Create user -func (s *UserApiService) CreateUser(body User) (interface{}, error) { +func (s *UserApiService) CreateUser(user User) (interface{}, error) { // TODO - update CreateUser with the required logic for this service method. // Add api_user_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. return nil, errors.New("service method 'CreateUser' not implemented") } // CreateUsersWithArrayInput - Creates list of users with given input array -func (s *UserApiService) CreateUsersWithArrayInput(body []User) (interface{}, error) { +func (s *UserApiService) CreateUsersWithArrayInput(user []User) (interface{}, error) { // TODO - update CreateUsersWithArrayInput with the required logic for this service method. // Add api_user_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. return nil, errors.New("service method 'CreateUsersWithArrayInput' not implemented") } // CreateUsersWithListInput - Creates list of users with given input array -func (s *UserApiService) CreateUsersWithListInput(body []User) (interface{}, error) { +func (s *UserApiService) CreateUsersWithListInput(user []User) (interface{}, error) { // TODO - update CreateUsersWithListInput with the required logic for this service method. // Add api_user_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. return nil, errors.New("service method 'CreateUsersWithListInput' not implemented") @@ -74,7 +74,7 @@ func (s *UserApiService) LogoutUser() (interface{}, error) { } // UpdateUser - Updated user -func (s *UserApiService) UpdateUser(username string, body User) (interface{}, error) { +func (s *UserApiService) UpdateUser(username string, user User) (interface{}, error) { // TODO - update UpdateUser with the required logic for this service method. // Add api_user_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. return nil, errors.New("service method 'UpdateUser' not implemented") diff --git a/samples/openapi3/server/petstore/go-api-server/go/model_inline_object.go b/samples/server/petstore/go-api-server/go/model_inline_object.go similarity index 66% rename from samples/openapi3/server/petstore/go-api-server/go/model_inline_object.go rename to samples/server/petstore/go-api-server/go/model_inline_object.go index bcf674af316..ee13c18c29a 100644 --- a/samples/openapi3/server/petstore/go-api-server/go/model_inline_object.go +++ b/samples/server/petstore/go-api-server/go/model_inline_object.go @@ -1,7 +1,7 @@ /* * 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: \" \\ + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * * API version: 1.0.0 * Generated by: OpenAPI Generator (https://openapi-generator.tech) diff --git a/samples/openapi3/server/petstore/go-api-server/go/model_inline_object_1.go b/samples/server/petstore/go-api-server/go/model_inline_object_1.go similarity index 69% rename from samples/openapi3/server/petstore/go-api-server/go/model_inline_object_1.go rename to samples/server/petstore/go-api-server/go/model_inline_object_1.go index aafa96f4352..b0d0fb4cfc3 100644 --- a/samples/openapi3/server/petstore/go-api-server/go/model_inline_object_1.go +++ b/samples/server/petstore/go-api-server/go/model_inline_object_1.go @@ -1,7 +1,7 @@ /* * 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: \" \\ + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * * API version: 1.0.0 * Generated by: OpenAPI Generator (https://openapi-generator.tech) diff --git a/samples/server/petstore/go-gin-api-server/.openapi-generator/FILES b/samples/server/petstore/go-gin-api-server/.openapi-generator/FILES index 8d594bbb91b..3818d98f9c4 100644 --- a/samples/server/petstore/go-gin-api-server/.openapi-generator/FILES +++ b/samples/server/petstore/go-gin-api-server/.openapi-generator/FILES @@ -6,6 +6,8 @@ go/api_store.go go/api_user.go go/model_api_response.go go/model_category.go +go/model_inline_object.go +go/model_inline_object_1.go go/model_order.go go/model_pet.go go/model_tag.go diff --git a/samples/server/petstore/go-gin-api-server/api/openapi.yaml b/samples/server/petstore/go-gin-api-server/api/openapi.yaml index 0c61c209957..26aaeac34b7 100644 --- a/samples/server/petstore/go-gin-api-server/api/openapi.yaml +++ b/samples/server/petstore/go-gin-api-server/api/openapi.yaml @@ -1,4 +1,4 @@ -openapi: 3.0.1 +openapi: 3.0.0 info: description: This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. @@ -7,6 +7,9 @@ info: url: https://www.apache.org/licenses/LICENSE-2.0.html title: OpenAPI Petstore version: 1.0.0 +externalDocs: + description: Find out more about Swagger + url: http://swagger.io servers: - url: http://petstore.swagger.io/v2 tags: @@ -21,18 +24,18 @@ paths: post: operationId: addPet requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/Pet' - application/xml: - schema: - $ref: '#/components/schemas/Pet' - description: Pet object that needs to be added to the store - required: true + $ref: '#/components/requestBodies/Pet' responses: + "200": + content: + application/xml: + schema: + $ref: '#/components/schemas/Pet' + application/json: + schema: + $ref: '#/components/schemas/Pet' + description: successful operation "405": - content: {} description: Invalid input security: - petstore_auth: @@ -41,28 +44,25 @@ paths: summary: Add a new pet to the store tags: - pet - x-codegen-request-body-name: body put: operationId: updatePet requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/Pet' - application/xml: - schema: - $ref: '#/components/schemas/Pet' - description: Pet object that needs to be added to the store - required: true + $ref: '#/components/requestBodies/Pet' responses: + "200": + content: + application/xml: + schema: + $ref: '#/components/schemas/Pet' + application/json: + schema: + $ref: '#/components/schemas/Pet' + description: successful operation "400": - content: {} description: Invalid ID supplied "404": - content: {} description: Pet not found "405": - content: {} description: Validation exception security: - petstore_auth: @@ -71,7 +71,6 @@ paths: summary: Update an existing pet tags: - pet - x-codegen-request-body-name: body /pet/findByStatus: get: description: Multiple status values can be provided with comma separated strings @@ -107,11 +106,9 @@ paths: type: array description: successful operation "400": - content: {} description: Invalid status value security: - petstore_auth: - - write:pets - read:pets summary: Finds Pets by status tags: @@ -148,11 +145,9 @@ paths: type: array description: successful operation "400": - content: {} description: Invalid tag value security: - petstore_auth: - - write:pets - read:pets summary: Finds Pets by tags tags: @@ -161,20 +156,24 @@ paths: delete: operationId: deletePet parameters: - - in: header + - explode: false + in: header name: api_key + required: false schema: type: string + style: simple - description: Pet id to delete + explode: false in: path name: petId required: true schema: format: int64 type: integer + style: simple responses: "400": - content: {} description: Invalid pet value security: - petstore_auth: @@ -188,12 +187,14 @@ paths: operationId: getPetById parameters: - description: ID of pet to return + explode: false in: path name: petId required: true schema: format: int64 type: integer + style: simple responses: "200": content: @@ -205,10 +206,8 @@ paths: $ref: '#/components/schemas/Pet' description: successful operation "400": - content: {} description: Invalid ID supplied "404": - content: {} description: Pet not found security: - api_key: [] @@ -219,13 +218,16 @@ paths: operationId: updatePetWithForm parameters: - description: ID of pet that needs to be updated + explode: false in: path name: petId required: true schema: format: int64 type: integer + style: simple requestBody: + $ref: '#/components/requestBodies/inline_object' content: application/x-www-form-urlencoded: schema: @@ -236,9 +238,9 @@ paths: status: description: Updated status of the pet type: string + type: object responses: "405": - content: {} description: Invalid input security: - petstore_auth: @@ -252,13 +254,16 @@ paths: operationId: uploadFile parameters: - description: ID of pet to update + explode: false in: path name: petId required: true schema: format: int64 type: integer + style: simple requestBody: + $ref: '#/components/requestBodies/inline_object_1' content: multipart/form-data: schema: @@ -270,6 +275,7 @@ paths: description: file to upload format: binary type: string + type: object responses: "200": content: @@ -308,7 +314,7 @@ paths: operationId: placeOrder requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/Order' description: order placed for purchasing the pet @@ -324,12 +330,10 @@ paths: $ref: '#/components/schemas/Order' description: successful operation "400": - content: {} description: Invalid Order summary: Place an order for a pet tags: - store - x-codegen-request-body-name: body /store/order/{orderId}: delete: description: For valid response try integer IDs with value < 1000. Anything @@ -337,17 +341,17 @@ paths: operationId: deleteOrder parameters: - description: ID of the order that needs to be deleted + explode: false in: path name: orderId required: true schema: type: string + style: simple responses: "400": - content: {} description: Invalid ID supplied "404": - content: {} description: Order not found summary: Delete purchase order by ID tags: @@ -358,6 +362,7 @@ paths: operationId: getOrderById parameters: - description: ID of pet that needs to be fetched + explode: false in: path name: orderId required: true @@ -366,6 +371,7 @@ paths: maximum: 5 minimum: 1 type: integer + style: simple responses: "200": content: @@ -377,10 +383,8 @@ paths: $ref: '#/components/schemas/Order' description: successful operation "400": - content: {} description: Invalid ID supplied "404": - content: {} description: Order not found summary: Find purchase order by ID tags: @@ -391,75 +395,66 @@ paths: operationId: createUser requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/User' description: Created user object required: true responses: default: - content: {} description: successful operation + security: + - api_key: [] summary: Create user tags: - user - x-codegen-request-body-name: body /user/createWithArray: post: operationId: createUsersWithArrayInput requestBody: - content: - '*/*': - schema: - items: - $ref: '#/components/schemas/User' - type: array - description: List of user object - required: true + $ref: '#/components/requestBodies/UserArray' responses: default: - content: {} description: successful operation + security: + - api_key: [] summary: Creates list of users with given input array tags: - user - x-codegen-request-body-name: body /user/createWithList: post: operationId: createUsersWithListInput requestBody: - content: - '*/*': - schema: - items: - $ref: '#/components/schemas/User' - type: array - description: List of user object - required: true + $ref: '#/components/requestBodies/UserArray' responses: default: - content: {} description: successful operation + security: + - api_key: [] summary: Creates list of users with given input array tags: - user - x-codegen-request-body-name: body /user/login: get: operationId: loginUser parameters: - description: The user name for login + explode: true in: query name: username required: true schema: + pattern: ^[a-zA-Z0-9]+[a-zA-Z0-9\.\-_]*[a-zA-Z0-9]+$ type: string + style: form - description: The password for login in clear text + explode: true in: query name: password required: true schema: type: string + style: form responses: "200": content: @@ -471,18 +466,29 @@ paths: type: string description: successful operation headers: + Set-Cookie: + description: Cookie authentication key for use with the `api_key` apiKey + authentication. + explode: false + schema: + example: AUTH_KEY=abcde12345; Path=/; HttpOnly + type: string + style: simple X-Rate-Limit: description: calls per hour allowed by the user + explode: false schema: format: int32 type: integer + style: simple X-Expires-After: description: date in UTC when toekn expires + explode: false schema: format: date-time type: string + style: simple "400": - content: {} description: Invalid username/password supplied summary: Logs user into the system tags: @@ -492,8 +498,9 @@ paths: operationId: logoutUser responses: default: - content: {} description: successful operation + security: + - api_key: [] summary: Logs out current logged in user session tags: - user @@ -503,18 +510,20 @@ paths: operationId: deleteUser parameters: - description: The name that needs to be deleted + explode: false in: path name: username required: true schema: type: string + style: simple responses: "400": - content: {} description: Invalid username supplied "404": - content: {} description: User not found + security: + - api_key: [] summary: Delete user tags: - user @@ -522,11 +531,13 @@ paths: operationId: getUserByName parameters: - description: The name that needs to be fetched. Use user1 for testing. + explode: false in: path name: username required: true schema: type: string + style: simple responses: "200": content: @@ -538,10 +549,8 @@ paths: $ref: '#/components/schemas/User' description: successful operation "400": - content: {} description: Invalid username supplied "404": - content: {} description: User not found summary: Get user by user name tags: @@ -551,30 +560,61 @@ paths: operationId: updateUser parameters: - description: name that need to be deleted + explode: false in: path name: username required: true schema: type: string + style: simple requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/User' description: Updated user object required: true responses: "400": - content: {} description: Invalid user supplied "404": - content: {} description: User not found + security: + - api_key: [] summary: Updated user tags: - user - x-codegen-request-body-name: body components: + requestBodies: + UserArray: + content: + application/json: + schema: + items: + $ref: '#/components/schemas/User' + type: array + description: List of user object + required: true + Pet: + content: + application/json: + schema: + $ref: '#/components/schemas/Pet' + application/xml: + schema: + $ref: '#/components/schemas/Pet' + description: Pet object that needs to be added to the store + required: true + inline_object: + content: + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/inline_object' + inline_object_1: + content: + multipart/form-data: + schema: + $ref: '#/components/schemas/inline_object_1' schemas: Order: description: An order for a pets from the pet store @@ -622,6 +662,7 @@ components: format: int64 type: integer name: + pattern: ^[a-zA-Z0-9]+[a-zA-Z0-9\.\-_]*[a-zA-Z0-9]+$ type: string title: Pet category type: object @@ -747,6 +788,25 @@ components: type: string title: An uploaded response type: object + inline_object: + properties: + name: + description: Updated name of the pet + type: string + status: + description: Updated status of the pet + type: string + type: object + inline_object_1: + properties: + additionalMetadata: + description: Additional data to pass to server + type: string + file: + description: file to upload + format: binary + type: string + type: object securitySchemes: petstore_auth: flows: diff --git a/samples/openapi3/server/petstore/go-gin-api-server/go/model_inline_object.go b/samples/server/petstore/go-gin-api-server/go/model_inline_object.go similarity index 66% rename from samples/openapi3/server/petstore/go-gin-api-server/go/model_inline_object.go rename to samples/server/petstore/go-gin-api-server/go/model_inline_object.go index bcf674af316..ee13c18c29a 100644 --- a/samples/openapi3/server/petstore/go-gin-api-server/go/model_inline_object.go +++ b/samples/server/petstore/go-gin-api-server/go/model_inline_object.go @@ -1,7 +1,7 @@ /* * 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: \" \\ + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * * API version: 1.0.0 * Generated by: OpenAPI Generator (https://openapi-generator.tech) diff --git a/samples/openapi3/server/petstore/go-gin-api-server/go/model_inline_object_1.go b/samples/server/petstore/go-gin-api-server/go/model_inline_object_1.go similarity index 69% rename from samples/openapi3/server/petstore/go-gin-api-server/go/model_inline_object_1.go rename to samples/server/petstore/go-gin-api-server/go/model_inline_object_1.go index aafa96f4352..b0d0fb4cfc3 100644 --- a/samples/openapi3/server/petstore/go-gin-api-server/go/model_inline_object_1.go +++ b/samples/server/petstore/go-gin-api-server/go/model_inline_object_1.go @@ -1,7 +1,7 @@ /* * 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: \" \\ + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * * API version: 1.0.0 * Generated by: OpenAPI Generator (https://openapi-generator.tech)