diff --git a/CI/bitrise.yml b/CI/bitrise.yml index 42ada2030a86..83156c662a48 100644 --- a/CI/bitrise.yml +++ b/CI/bitrise.yml @@ -38,18 +38,7 @@ workflows: set -e - sh bin/swift4-all.sh sh bin/swift5-all.sh - - script@1.1.5: - title: Run Swift4 tests - inputs: - - content: | - #!/usr/bin/env bash - - set -e - - ./samples/client/petstore/swift4/swift4_test_all.sh - ./samples/client/test/swift4/swift4_test_all.sh - script@1.1.5: title: Run Swift5 tests inputs: diff --git a/README.md b/README.md index 606ab0e54c79..ec26737408ea 100644 --- a/README.md +++ b/README.md @@ -885,6 +885,7 @@ Here is a list of template creators: * AsciiDoc: @man-at-home * HTML Doc 2: @jhitchcock * Confluence Wiki: @jhitchcock + * PlantUML: @pburls * Configuration * Apache2: @stkrwork * k6: @mostafa @@ -936,7 +937,7 @@ If you want to join the committee, please kindly apply by sending an email to te | C++ | @ravinikam (2017/07) @stkrwork (2017/07) @etherealjoy (2018/02) @martindelille (2018/03) @muttleyxd (2019/08) | | C# | @mandrean (2017/08), @jimschubert (2017/09) [:heart:](https://www.patreon.com/jimschubert) @frankyjuang (2019/09) @shibayan (2020/02) | | Clojure | | -| Dart | @ircecho (2017/07) @swipesight (2018/09) @jaumard (2018/09) @nickmeinhold (2019/09) @athornz (2019/12) @amondnet (2019/12) | +| Dart | @ircecho (2017/07) @swipesight (2018/09) @jaumard (2018/09) @athornz (2019/12) @amondnet (2019/12) | | Eiffel | @jvelilla (2017/09) | | Elixir | @mrmstn (2018/12) | | Elm | @eriktim (2018/09) | @@ -956,7 +957,7 @@ If you want to join the committee, please kindly apply by sending an email to te | Perl | @wing328 (2017/07) [:heart:](https://www.patreon.com/wing328) @yue9944882 (2019/06) | | PHP | @jebentier (2017/07), @dkarlovi (2017/07), @mandrean (2017/08), @jfastnacht (2017/09), @ackintosh (2017/09) [:heart:](https://www.patreon.com/ackintosh/overview), @ybelenko (2018/07), @renepardon (2018/12) | | PowerShell | | -| Python | @taxpon (2017/07) @frol (2017/07) @mbohlool (2017/07) @cbornet (2017/09) @kenjones-cisco (2017/11) @tomplus (2018/10) @Jyhess (2019/01) @slash-arun (2019/11) @spacether (2019/11) | +| Python | @taxpon (2017/07) @frol (2017/07) @mbohlool (2017/07) @cbornet (2017/09) @kenjones-cisco (2017/11) @tomplus (2018/10) @Jyhess (2019/01) @arun-nalla (2019/11) @spacether (2019/11) | | R | @Ramanth (2019/07) @saigiridhar21 (2019/07) | | Ruby | @cliffano (2017/07) @zlx (2017/09) @autopp (2019/02) | | Rust | @frol (2017/07) @farcaller (2017/08) @bjgill (2017/12) @richardwhiuk (2019/07) @paladinzh (2020/05) | diff --git a/bin/erlang-petstore-client.sh b/bin/erlang-petstore-client.sh index 77ee5acf0ef9..5ff65bf39282 100755 --- a/bin/erlang-petstore-client.sh +++ b/bin/erlang-petstore-client.sh @@ -27,6 +27,6 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/erlang-client --additional-properties packageName=petstore -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g erlang-client -o samples/client/petstore/erlang-client $@" +ags="generate -t modules/openapi-generator/src/main/resources/erlang-client --additional-properties packageName=petstore -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g erlang-client -o samples/client/petstore/erlang-client $@" java $JAVA_OPTS -jar $executable $ags diff --git a/bin/erlang-petstore-proper.sh b/bin/erlang-petstore-proper.sh index 4c19eec46df7..2db7ed0e0e31 100755 --- a/bin/erlang-petstore-proper.sh +++ b/bin/erlang-petstore-proper.sh @@ -27,6 +27,6 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/erlang-proper --additional-properties packageName=petstore -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g erlang-proper -o samples/client/petstore/erlang-proper $@" +ags="generate -t modules/openapi-generator/src/main/resources/erlang-proper --additional-properties packageName=petstore -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g erlang-proper -o samples/client/petstore/erlang-proper $@" java $JAVA_OPTS -jar $executable $ags diff --git a/bin/erlang-petstore-server.sh b/bin/erlang-petstore-server.sh index a66451facb26..de587f37b971 100755 --- a/bin/erlang-petstore-server.sh +++ b/bin/erlang-petstore-server.sh @@ -27,6 +27,6 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/erlang-server -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g erlang-server -o samples/server/petstore/erlang-server $@" +ags="generate -t modules/openapi-generator/src/main/resources/erlang-server -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g erlang-server -o samples/server/petstore/erlang-server $@" java $JAVA_OPTS -jar $executable $ags diff --git a/bin/openapi3/erlang-petstore-client.sh b/bin/openapi3/erlang-petstore-client.sh deleted file mode 100755 index fc75014a41e6..000000000000 --- a/bin/openapi3/erlang-petstore-client.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 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/erlang-client --additional-properties packageName=petstore -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g erlang-client -o samples/client/petstore/erlang-client $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/plantuml-documentation-petstore.sh b/bin/plantuml-documentation-petstore.sh old mode 100644 new mode 100755 index 39993e7212f3..82740590056b --- a/bin/plantuml-documentation-petstore.sh +++ b/bin/plantuml-documentation-petstore.sh @@ -26,6 +26,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 plantuml -o samples/documentation/petstore/plantuml" +ags="$@ generate -t modules/openapi-generator/src/main/resources/plantuml -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g plantuml -o samples/documentation/petstore/plantuml" java ${JAVA_OPTS} -jar ${executable} ${ags} diff --git a/bin/swift4-all.sh b/bin/swift4-all.sh deleted file mode 100755 index 0038a4f60829..000000000000 --- a/bin/swift4-all.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh - -./bin/swift4-petstore-all.sh -./bin/swift4-test.sh diff --git a/bin/swift4-petstore-all.sh b/bin/swift4-petstore-all.sh deleted file mode 100755 index 167a7a684816..000000000000 --- a/bin/swift4-petstore-all.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh - -./bin/swift4-petstore.sh -./bin/swift4-petstore-promisekit.sh -./bin/swift4-petstore-result.sh -./bin/swift4-petstore-rxswift.sh -./bin/swift4-petstore-objcCompatible.sh -./bin/swift4-petstore-unwrapRequired.sh -./bin/swift4-petstore-nonPublicApi.sh diff --git a/bin/swift4-petstore-nonPublicApi.json b/bin/swift4-petstore-nonPublicApi.json deleted file mode 100644 index f20305dec059..000000000000 --- a/bin/swift4-petstore-nonPublicApi.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "podSummary": "PetstoreClient", - "podHomepage": "https://github.com/openapitools/openapi-generator", - "podAuthors": "", - "projectName": "PetstoreClient", - "nonPublicApi": true, - "sortParamsByRequiredFlag": false -} diff --git a/bin/swift4-petstore-nonPublicApi.sh b/bin/swift4-petstore-nonPublicApi.sh deleted file mode 100755 index 0018a2af49b2..000000000000 --- a/bin/swift4-petstore-nonPublicApi.sh +++ /dev/null @@ -1,42 +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/swift4 -i modules/openapi-generator/src/test/resources/2_0/swift/petstore-with-fake-endpoints-models-for-testing.yaml -g swift4 -c ./bin/swift4-petstore-nonPublicApi.json -o samples/client/petstore/swift4/nonPublicApi --generate-alias-as-model $@" - -java $JAVA_OPTS -jar $executable $ags - -if type "xcodegen" > /dev/null 2>&1; then - cd samples/client/petstore/swift4/nonPublicApi - xcodegen generate -fi - -if type "swiftlint" > /dev/null 2>&1; then - cd samples/client/petstore/swift4/nonPublicApi - swiftlint autocorrect -fi \ No newline at end of file diff --git a/bin/swift4-petstore-objcCompatible.json b/bin/swift4-petstore-objcCompatible.json deleted file mode 100644 index c24c7abf69c4..000000000000 --- a/bin/swift4-petstore-objcCompatible.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "podSummary": "PetstoreClient", - "podHomepage": "https://github.com/openapitools/openapi-generator", - "podAuthors": "", - "projectName": "PetstoreClient", - "objcCompatible": true -} diff --git a/bin/swift4-petstore-objcCompatible.sh b/bin/swift4-petstore-objcCompatible.sh deleted file mode 100755 index e51278966b55..000000000000 --- a/bin/swift4-petstore-objcCompatible.sh +++ /dev/null @@ -1,42 +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/swift4 -i modules/openapi-generator/src/test/resources/2_0/swift/petstore-with-fake-endpoints-models-for-testing.yaml -g swift4 -c ./bin/swift4-petstore-objcCompatible.json -o samples/client/petstore/swift4/objcCompatible --generate-alias-as-model $@" - -java $JAVA_OPTS -jar $executable $ags - -if type "xcodegen" > /dev/null 2>&1; then - cd samples/client/petstore/swift4/objcCompatible - xcodegen generate -fi - -if type "swiftlint" > /dev/null 2>&1; then - cd samples/client/petstore/swift4/objcCompatible - swiftlint autocorrect -fi \ No newline at end of file diff --git a/bin/swift4-petstore-promisekit.json b/bin/swift4-petstore-promisekit.json deleted file mode 100644 index 48137f1f2800..000000000000 --- a/bin/swift4-petstore-promisekit.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "podSummary": "PetstoreClient", - "podHomepage": "https://github.com/openapitools/openapi-generator", - "podAuthors": "", - "projectName": "PetstoreClient", - "responseAs": "PromiseKit" -} diff --git a/bin/swift4-petstore-promisekit.sh b/bin/swift4-petstore-promisekit.sh deleted file mode 100755 index 9b1fa3233aa5..000000000000 --- a/bin/swift4-petstore-promisekit.sh +++ /dev/null @@ -1,42 +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/swift4 -i modules/openapi-generator/src/test/resources/2_0/swift/petstore-with-fake-endpoints-models-for-testing.yaml -g swift4 -c ./bin/swift4-petstore-promisekit.json -o samples/client/petstore/swift4/promisekitLibrary --generate-alias-as-model $@" - -java $JAVA_OPTS -jar $executable $ags - -if type "xcodegen" > /dev/null 2>&1; then - cd samples/client/petstore/swift4/promisekitLibrary - xcodegen generate -fi - -if type "swiftlint" > /dev/null 2>&1; then - cd samples/client/petstore/swift4/promisekitLibrary - swiftlint autocorrect -fi \ No newline at end of file diff --git a/bin/swift4-petstore-result.json b/bin/swift4-petstore-result.json deleted file mode 100644 index 315433867862..000000000000 --- a/bin/swift4-petstore-result.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "podSummary": "PetstoreClient", - "podHomepage": "https://github.com/openapitools/openapi-generator", - "podAuthors": "", - "projectName": "PetstoreClient", - "responseAs": "Result" -} diff --git a/bin/swift4-petstore-result.sh b/bin/swift4-petstore-result.sh deleted file mode 100755 index a5ba0470034e..000000000000 --- a/bin/swift4-petstore-result.sh +++ /dev/null @@ -1,42 +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/swift4 -i modules/openapi-generator/src/test/resources/2_0/swift/petstore-with-fake-endpoints-models-for-testing.yaml -g swift4 -c ./bin/swift4-petstore-result.json -o samples/client/petstore/swift4/resultLibrary --generate-alias-as-model $@" - -java $JAVA_OPTS -jar $executable $ags - -if type "xcodegen" > /dev/null 2>&1; then - cd samples/client/petstore/swift4/resultLibrary - xcodegen generate -fi - -if type "swiftlint" > /dev/null 2>&1; then - cd samples/client/petstore/swift4/resultLibrary - swiftlint autocorrect -fi \ No newline at end of file diff --git a/bin/swift4-petstore-rxswift.json b/bin/swift4-petstore-rxswift.json deleted file mode 100644 index eb8b11dde559..000000000000 --- a/bin/swift4-petstore-rxswift.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "podSummary": "PetstoreClient", - "podHomepage": "https://github.com/openapitools/openapi-generator", - "podAuthors": "", - "projectName": "PetstoreClient", - "responseAs": "RxSwift" -} diff --git a/bin/swift4-petstore-rxswift.sh b/bin/swift4-petstore-rxswift.sh deleted file mode 100755 index 78416f692960..000000000000 --- a/bin/swift4-petstore-rxswift.sh +++ /dev/null @@ -1,42 +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/swift4 -i modules/openapi-generator/src/test/resources/2_0/swift/petstore-with-fake-endpoints-models-for-testing.yaml -g swift4 -c ./bin/swift4-petstore-rxswift.json -o samples/client/petstore/swift4/rxswiftLibrary --generate-alias-as-model $@" - -java $JAVA_OPTS -jar $executable $ags - -if type "xcodegen" > /dev/null 2>&1; then - cd samples/client/petstore/swift4/rxswiftLibrary - xcodegen generate -fi - -if type "swiftlint" > /dev/null 2>&1; then - cd samples/client/petstore/swift4/rxswiftLibrary - swiftlint autocorrect -fi \ No newline at end of file diff --git a/bin/swift4-petstore-unwrapRequired.json b/bin/swift4-petstore-unwrapRequired.json deleted file mode 100644 index 3d3152c52a2b..000000000000 --- a/bin/swift4-petstore-unwrapRequired.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "podSummary": "PetstoreClient", - "podHomepage": "https://github.com/openapitools/openapi-generator", - "podAuthors": "", - "projectName": "PetstoreClient", - "unwrapRequired": true -} diff --git a/bin/swift4-petstore-unwrapRequired.sh b/bin/swift4-petstore-unwrapRequired.sh deleted file mode 100755 index 500ee6fbd161..000000000000 --- a/bin/swift4-petstore-unwrapRequired.sh +++ /dev/null @@ -1,42 +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/swift4 -i modules/openapi-generator/src/test/resources/2_0/swift/petstore-with-fake-endpoints-models-for-testing.yaml -g swift4 -c ./bin/swift4-petstore-unwrapRequired.json -o samples/client/petstore/swift4/unwrapRequired --generate-alias-as-model $@" - -java $JAVA_OPTS -jar $executable $ags - -if type "xcodegen" > /dev/null 2>&1; then - cd samples/client/petstore/swift4/unwrapRequired - xcodegen generate -fi - -if type "swiftlint" > /dev/null 2>&1; then - cd samples/client/petstore/swift4/unwrapRequired - swiftlint autocorrect -fi \ No newline at end of file diff --git a/bin/swift4-petstore.json b/bin/swift4-petstore.json deleted file mode 100644 index 59bd94f43efb..000000000000 --- a/bin/swift4-petstore.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "podSummary": "PetstoreClient", - "podHomepage": "https://github.com/openapitools/openapi-generator", - "podAuthors": "", - "projectName": "PetstoreClient" -} diff --git a/bin/swift4-petstore.sh b/bin/swift4-petstore.sh deleted file mode 100755 index 9057c1ee2331..000000000000 --- a/bin/swift4-petstore.sh +++ /dev/null @@ -1,42 +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/swift4 -i modules/openapi-generator/src/test/resources/2_0/swift/petstore-with-fake-endpoints-models-for-testing.yaml -g swift4 -c ./bin/swift4-petstore.json -o samples/client/petstore/swift4/default --generate-alias-as-model $@" - -java $JAVA_OPTS -jar $executable $ags - -if type "xcodegen" > /dev/null 2>&1; then - cd samples/client/petstore/swift4/default - xcodegen generate -fi - -if type "swiftlint" > /dev/null 2>&1; then - cd samples/client/petstore/swift4/default - swiftlint autocorrect -fi diff --git a/bin/swift4-test.json b/bin/swift4-test.json deleted file mode 100644 index 9341b740a2a6..000000000000 --- a/bin/swift4-test.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "podSummary": "TestClient", - "podHomepage": "https://github.com/openapitools/openapi-generator", - "podAuthors": "", - "projectName": "TestClient" -} diff --git a/bin/swift4-test.sh b/bin/swift4-test.sh deleted file mode 100755 index 9a7ffde92e75..000000000000 --- a/bin/swift4-test.sh +++ /dev/null @@ -1,42 +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/swift4 -i modules/openapi-generator/src/test/resources/2_0/swift4Test.json -g swift4 -c ./bin/swift4-test.json -o samples/client/test/swift4/default --generate-alias-as-model $@" - -java $JAVA_OPTS -jar $executable $ags - -if type "xcodegen" > /dev/null 2>&1; then - cd samples/client/test/swift4/default - xcodegen generate -fi - -if type "swiftlint" > /dev/null 2>&1; then - cd samples/client/test/swift4/default - swiftlint autocorrect -fi diff --git a/bin/typescript-axios-petstore-all.sh b/bin/typescript-axios-petstore-all.sh index 58d13d10f62c..e3dfe3962263 100755 --- a/bin/typescript-axios-petstore-all.sh +++ b/bin/typescript-axios-petstore-all.sh @@ -4,5 +4,6 @@ ./bin/typescript-axios-petstore-with-npm-version.sh ./bin/typescript-axios-petstore-with-npm-version-and-separate-models-and-api.sh ./bin/typescript-axios-petstore-with-complex-headers.sh +./bin/typescript-axios-petstore-with-single-request-parameters.sh ./bin/typescript-axios-petstore-interfaces.sh ./bin/typescript-axios-petstore.sh diff --git a/bin/openapi3/erlang-petstore-server.sh b/bin/typescript-axios-petstore-with-single-request-parameters.sh similarity index 71% rename from bin/openapi3/erlang-petstore-server.sh rename to bin/typescript-axios-petstore-with-single-request-parameters.sh index 22968e5db505..4f04a39e09d1 100755 --- a/bin/openapi3/erlang-petstore-server.sh +++ b/bin/typescript-axios-petstore-with-single-request-parameters.sh @@ -22,11 +22,11 @@ executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" if [ ! -f "$executable" ] then - mvn clean package + 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/erlang-server -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g erlang-server -o samples/server/petstore/erlang-server $@" +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 $@" java $JAVA_OPTS -jar $executable $ags diff --git a/bin/windows/erlang-petstore-client.bat b/bin/windows/erlang-petstore-client.bat index cece95882d9b..88d0c61506dd 100755 --- a/bin/windows/erlang-petstore-client.bat +++ b/bin/windows/erlang-petstore-client.bat @@ -5,6 +5,6 @@ If Not Exist %executable% ( ) REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -set ags=generate -t modules\openapi-generator\src\main\resources\erlang-client -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g erlang-client -o samples\client\petstore\erlang-client +set ags=generate -t modules\openapi-generator\src\main\resources\erlang-client -i modules\openapi-generator\src\test\resources\3_0\petstore.yaml -g erlang-client -o samples\client\petstore\erlang-client java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/erlang-petstore-server.bat b/bin/windows/erlang-petstore-server.bat index dbae5bf9faf7..9b53c9f606c1 100755 --- a/bin/windows/erlang-petstore-server.bat +++ b/bin/windows/erlang-petstore-server.bat @@ -5,6 +5,6 @@ If Not Exist %executable% ( ) REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -set ags=generate -t modules\openapi-generator\src\main\resources\erlang-server -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g erlang-server -o samples\server\petstore\erlang-server +set ags=generate -t modules\openapi-generator\src\main\resources\erlang-server -i modules\openapi-generator\src\test\resources\3_0\petstore.yaml -g erlang-server -o samples\server\petstore\erlang-server java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/plantuml-documentation-petstore.bat b/bin/windows/plantuml-documentation-petstore.bat index 0ea5b918e23a..4a0f9d611f25 100644 --- a/bin/windows/plantuml-documentation-petstore.bat +++ b/bin/windows/plantuml-documentation-petstore.bat @@ -5,6 +5,6 @@ If Not Exist %executable% ( ) REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -DloggerPath=conf/log4j.properties -set ags=generate --artifact-id "plantuml-petstore-documentation" -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g plantuml -o samples\documentation\petstore\plantuml +set ags=generate -t modules\openapi-generator\src\main\resources\plantuml -i modules\openapi-generator\src\test\resources\3_0\petstore.yaml -g plantuml -o samples\documentation\petstore\plantuml java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/swift4-petstore-all.bat b/bin/windows/swift4-petstore-all.bat deleted file mode 100755 index bf485d27e5f9..000000000000 --- a/bin/windows/swift4-petstore-all.bat +++ /dev/null @@ -1,3 +0,0 @@ -call .\bin\windows\swift4-petstore.bat -call .\bin\windows\swift4-petstore-promisekit.bat -call .\bin\windows\swift4-petstore-rxswift.bat diff --git a/bin/windows/swift4-petstore-rxswift.bat b/bin/windows/swift4-petstore-rxswift.bat deleted file mode 100755 index c74bbfd15d47..000000000000 --- a/bin/windows/swift4-petstore-rxswift.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 swift4 -c bin\swift4-petstore-rxswift.json -o samples\client\petstore\swift4\rxswift - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/swift4-petstore.bat b/bin/windows/swift4-petstore.bat deleted file mode 100755 index 1539cddc0d27..000000000000 --- a/bin/windows/swift4-petstore.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 swift4 -o samples\client\petstore\swift4\default - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/typescript-axios-petstore-all.bat b/bin/windows/typescript-axios-petstore-all.bat index a5e4e732a1d5..c3b82892732b 100644 --- a/bin/windows/typescript-axios-petstore-all.bat +++ b/bin/windows/typescript-axios-petstore-all.bat @@ -3,6 +3,7 @@ call bin\windows\typescript-axios-petstore.bat call bin\windows\typescript-axios-petstore-target-es6.bat call bin\windows\typescript-axios-petstore-with-complex-headers.bat +call bin\windows\typescript-axios-petstore-with-single-request-parameters.bat call bin\windows\typescript-axios-petstore-with-npm-version.bat call bin\windows\typescript-axios-petstore-interfaces.bat call bin\windows\typescript-axios-petstore-with-npm-version-and-separate-models-and-api.bat \ No newline at end of file diff --git a/bin/windows/swift4-petstore-promisekit.bat b/bin/windows/typescript-axios-petstore-with-single-request-parameters.bat similarity index 59% rename from bin/windows/swift4-petstore-promisekit.bat rename to bin/windows/typescript-axios-petstore-with-single-request-parameters.bat index 8ff76eeaac09..108bed50f774 100755 --- a/bin/windows/swift4-petstore-promisekit.bat +++ b/bin/windows/typescript-axios-petstore-with-single-request-parameters.bat @@ -1,3 +1,5 @@ +@ECHO OFF + set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar If Not Exist %executable% ( @@ -5,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-with-fake-endpoints-models-for-testing.yaml -g swift4 -c bin\swift4-petstore-promisekit.json -o samples\client\petstore\swift4\promisekit +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 java %JAVA_OPTS% -jar %executable% %ags% diff --git a/docs/generators.md b/docs/generators.md index a74d15a276c1..97da8e133081 100644 --- a/docs/generators.md +++ b/docs/generators.md @@ -59,7 +59,7 @@ The following generators are available: * [scalaz](generators/scalaz.md) * [swift2-deprecated (deprecated)](generators/swift2-deprecated.md) * [swift3-deprecated (deprecated)](generators/swift3-deprecated.md) -* [swift4](generators/swift4.md) +* [swift4-deprecated (deprecated)](generators/swift4-deprecated.md) * [swift5 (beta)](generators/swift5.md) * [typescript-angular](generators/typescript-angular.md) * [typescript-angularjs](generators/typescript-angularjs.md) @@ -136,7 +136,7 @@ The following generators are available: * [markdown (beta)](generators/markdown.md) * [openapi](generators/openapi.md) * [openapi-yaml](generators/openapi-yaml.md) -* [plantuml](generators/plantuml.md) +* [plantuml (beta)](generators/plantuml.md) ## SCHEMA generators diff --git a/docs/generators/javascript-flowtyped.md b/docs/generators/javascript-flowtyped.md index d0a0a709985a..8c7f5973aa79 100644 --- a/docs/generators/javascript-flowtyped.md +++ b/docs/generators/javascript-flowtyped.md @@ -7,7 +7,7 @@ sidebar_label: javascript-flowtyped | ------ | ----------- | ------ | ------- | |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |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. A special 'v4-compat' value enables the backward-compatible behavior (as pre v4.2.3)| |v4-compat| +|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| |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| |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| diff --git a/docs/generators/swift4-deprecated.md b/docs/generators/swift4-deprecated.md new file mode 100644 index 000000000000..a4da5435f682 --- /dev/null +++ b/docs/generators/swift4-deprecated.md @@ -0,0 +1,317 @@ +--- +title: Config Options for swift4-deprecated +sidebar_label: swift4-deprecated +--- + +| Option | Description | Values | Default | +| ------ | ----------- | ------ | ------- | +|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| +|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| +|lenientTypeCast|Accept and cast values for simple types (string->bool, string->int, int->string)| |false| +|nonPublicApi|Generates code with reduced access modifiers; allows embedding elsewhere without exposing non-public API calls to consumers.(default: false)| |null| +|objcCompatible|Add additional properties and methods for Objective-C compatibility (default: false)| |null| +|podAuthors|Authors used for Podspec| |null| +|podDescription|Description used for Podspec| |null| +|podDocsetURL|Docset URL used for Podspec| |null| +|podDocumentationURL|Documentation URL used for Podspec| |null| +|podHomepage|Homepage used for Podspec| |null| +|podLicense|License used for Podspec| |null| +|podScreenshots|Screenshots used for Podspec| |null| +|podSocialMediaURL|Social Media URL used for Podspec| |null| +|podSource|Source information used for Podspec| |null| +|podSummary|Summary used for Podspec| |null| +|podVersion|Version used for Podspec| |null| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|projectName|Project name in Xcode| |null| +|responseAs|Optionally use libraries to manage response. Currently PromiseKit, RxSwift, Result are available.| |null| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| +|swiftUseApiNamespace|Flag to make all the API classes inner-class of {{projectName}}API| |null| +|unwrapRequired|Treat 'required' properties in response as non-optional (which would crash the app if api returns null as opposed to required option specified in json schema| |null| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | + + +## LANGUAGE PRIMITIVES + + + +## RESERVED WORDS + + + +## FEATURE SET + + +### Client Modification Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasePath|✗|ToolingExtension +|Authorizations|✗|ToolingExtension +|UserAgent|✗|ToolingExtension + +### Data Type Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Custom|✗|OAS2,OAS3 +|Int32|✓|OAS2,OAS3 +|Int64|✓|OAS2,OAS3 +|Float|✓|OAS2,OAS3 +|Double|✓|OAS2,OAS3 +|Decimal|✓|ToolingExtension +|String|✓|OAS2,OAS3 +|Byte|✓|OAS2,OAS3 +|Binary|✓|OAS2,OAS3 +|Boolean|✓|OAS2,OAS3 +|Date|✓|OAS2,OAS3 +|DateTime|✓|OAS2,OAS3 +|Password|✓|OAS2,OAS3 +|File|✓|OAS2 +|Array|✓|OAS2,OAS3 +|Maps|✓|ToolingExtension +|CollectionFormat|✓|OAS2 +|CollectionFormatMulti|✓|OAS2 +|Enum|✓|OAS2,OAS3 +|ArrayOfEnum|✓|ToolingExtension +|ArrayOfModel|✓|ToolingExtension +|ArrayOfCollectionOfPrimitives|✓|ToolingExtension +|ArrayOfCollectionOfModel|✓|ToolingExtension +|ArrayOfCollectionOfEnum|✓|ToolingExtension +|MapOfEnum|✓|ToolingExtension +|MapOfModel|✓|ToolingExtension +|MapOfCollectionOfPrimitives|✓|ToolingExtension +|MapOfCollectionOfModel|✓|ToolingExtension +|MapOfCollectionOfEnum|✓|ToolingExtension + +### Documentation Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Readme|✗|ToolingExtension +|Model|✓|ToolingExtension +|Api|✓|ToolingExtension + +### Global Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Host|✓|OAS2,OAS3 +|BasePath|✓|OAS2,OAS3 +|Info|✓|OAS2,OAS3 +|Schemes|✗|OAS2,OAS3 +|PartialSchemes|✓|OAS2,OAS3 +|Consumes|✓|OAS2 +|Produces|✓|OAS2 +|ExternalDocumentation|✓|OAS2,OAS3 +|Examples|✓|OAS2,OAS3 +|XMLStructureDefinitions|✗|OAS2,OAS3 +|MultiServer|✗|OAS3 +|ParameterizedServer|✗|OAS3 +|ParameterStyling|✗|OAS3 +|Callbacks|✗|OAS3 +|LinkObjects|✗|OAS3 + +### Parameter Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Path|✓|OAS2,OAS3 +|Query|✓|OAS2,OAS3 +|Header|✓|OAS2,OAS3 +|Body|✓|OAS2 +|FormUnencoded|✓|OAS2 +|FormMultipart|✓|OAS2 +|Cookie|✗|OAS3 + +### Schema Support Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Simple|✓|OAS2,OAS3 +|Composite|✓|OAS2,OAS3 +|Polymorphism|✓|OAS2,OAS3 +|Union|✗|OAS3 + +### Security Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasicAuth|✓|OAS2,OAS3 +|ApiKey|✓|OAS2,OAS3 +|OpenIDConnect|✗|OAS3 +|BearerToken|✗|OAS3 +|OAuth2_Implicit|✓|OAS2,OAS3 +|OAuth2_Password|✗|OAS2,OAS3 +|OAuth2_ClientCredentials|✗|OAS2,OAS3 +|OAuth2_AuthorizationCode|✗|OAS2,OAS3 + +### Wire Format Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|JSON|✓|OAS2,OAS3 +|XML|✗|OAS2,OAS3 +|PROTOBUF|✗|ToolingExtension +|Custom|✗|OAS2,OAS3 diff --git a/docs/generators/typescript-angular.md b/docs/generators/typescript-angular.md index c4048c19a5b1..9fbecda07076 100644 --- a/docs/generators/typescript-angular.md +++ b/docs/generators/typescript-angular.md @@ -8,7 +8,7 @@ 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| |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. A special 'v4-compat' value enables the backward-compatible behavior (as pre v4.2.3)| |v4-compat| +|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| |fileNaming|Naming convention for the output files: 'camelCase', 'kebab-case'.| |camelCase| |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-angularjs.md b/docs/generators/typescript-angularjs.md index 546fff28cc31..08a4bdad894d 100644 --- a/docs/generators/typescript-angularjs.md +++ b/docs/generators/typescript-angularjs.md @@ -7,7 +7,7 @@ sidebar_label: typescript-angularjs | ------ | ----------- | ------ | ------- | |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |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. A special 'v4-compat' value enables the backward-compatible behavior (as pre v4.2.3)| |v4-compat| +|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| |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| |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| diff --git a/docs/generators/typescript-aurelia.md b/docs/generators/typescript-aurelia.md index 02c2e8786abf..55cc57522bb0 100644 --- a/docs/generators/typescript-aurelia.md +++ b/docs/generators/typescript-aurelia.md @@ -7,7 +7,7 @@ sidebar_label: typescript-aurelia | ------ | ----------- | ------ | ------- | |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |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. A special 'v4-compat' value enables the backward-compatible behavior (as pre v4.2.3)| |v4-compat| +|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| |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| |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| diff --git a/docs/generators/typescript-axios.md b/docs/generators/typescript-axios.md index b990ed95bd45..896b46d3eb69 100644 --- a/docs/generators/typescript-axios.md +++ b/docs/generators/typescript-axios.md @@ -7,7 +7,7 @@ sidebar_label: typescript-axios | ------ | ----------- | ------ | ------- | |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |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. A special 'v4-compat' value enables the backward-compatible behavior (as pre v4.2.3)| |v4-compat| +|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| |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| |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| @@ -20,6 +20,7 @@ sidebar_label: typescript-axios |sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| |sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| |supportsES6|Generate code that conforms to ES6.| |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| |withInterfaces|Setting this property to true will generate interfaces next to the default class implementations.| |false| |withSeparateModelsAndApi|Put the model and api in separate folders and in separate classes| |false| |withoutPrefixEnums|Don't prefix enum names with class names| |false| diff --git a/docs/generators/typescript-fetch.md b/docs/generators/typescript-fetch.md index f1a2226ece47..5fe6e8987087 100644 --- a/docs/generators/typescript-fetch.md +++ b/docs/generators/typescript-fetch.md @@ -7,7 +7,7 @@ sidebar_label: typescript-fetch | ------ | ----------- | ------ | ------- | |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |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. A special 'v4-compat' value enables the backward-compatible behavior (as pre v4.2.3)| |v4-compat| +|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| |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| |modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name| |camelCase| diff --git a/docs/generators/typescript-inversify.md b/docs/generators/typescript-inversify.md index 4b321619e837..a979fd102cb8 100644 --- a/docs/generators/typescript-inversify.md +++ b/docs/generators/typescript-inversify.md @@ -7,7 +7,7 @@ sidebar_label: typescript-inversify | ------ | ----------- | ------ | ------- | |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |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. A special 'v4-compat' value enables the backward-compatible behavior (as pre v4.2.3)| |v4-compat| +|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| |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| |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| diff --git a/docs/generators/typescript-jquery.md b/docs/generators/typescript-jquery.md index b28d6b47cb93..5616ceb58625 100644 --- a/docs/generators/typescript-jquery.md +++ b/docs/generators/typescript-jquery.md @@ -7,7 +7,7 @@ sidebar_label: typescript-jquery | ------ | ----------- | ------ | ------- | |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |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. A special 'v4-compat' value enables the backward-compatible behavior (as pre v4.2.3)| |v4-compat| +|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| |jqueryAlreadyImported|When using this in legacy app using mix of typescript and javascript, this will only declare jquery and not import it| |false| |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-node.md b/docs/generators/typescript-node.md index ff7916f91309..4462d0e37982 100644 --- a/docs/generators/typescript-node.md +++ b/docs/generators/typescript-node.md @@ -7,7 +7,7 @@ sidebar_label: typescript-node | ------ | ----------- | ------ | ------- | |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |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. A special 'v4-compat' value enables the backward-compatible behavior (as pre v4.2.3)| |v4-compat| +|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| |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| |modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name| |camelCase| diff --git a/docs/generators/typescript-redux-query.md b/docs/generators/typescript-redux-query.md index 0b1eef9f73a4..15900a22a7d1 100644 --- a/docs/generators/typescript-redux-query.md +++ b/docs/generators/typescript-redux-query.md @@ -7,7 +7,7 @@ sidebar_label: typescript-redux-query | ------ | ----------- | ------ | ------- | |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |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. A special 'v4-compat' value enables the backward-compatible behavior (as pre v4.2.3)| |v4-compat| +|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| |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| |modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name| |camelCase| diff --git a/docs/generators/typescript-rxjs.md b/docs/generators/typescript-rxjs.md index 422b1fda35ff..e080a0761bdc 100644 --- a/docs/generators/typescript-rxjs.md +++ b/docs/generators/typescript-rxjs.md @@ -7,7 +7,7 @@ sidebar_label: typescript-rxjs | ------ | ----------- | ------ | ------- | |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |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. A special 'v4-compat' value enables the backward-compatible behavior (as pre v4.2.3)| |v4-compat| +|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| |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| |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| 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 8bc11a662232..a9394802f0b4 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 @@ -35,8 +35,6 @@ import java.io.File; import java.text.SimpleDateFormat; import java.util.*; -import java.util.regex.Matcher; -import java.util.regex.Pattern; import java.util.stream.Collectors; import java.util.stream.Stream; @@ -52,10 +50,6 @@ public abstract class AbstractTypeScriptClientCodegen extends DefaultCodegen imp public static final String NPM_VERSION = "npmVersion"; public static final String SNAPSHOT = "snapshot"; - public static final String ENUM_NAME_SUFFIX_V4_COMPAT = "v4-compat"; - public static final String ENUM_NAME_SUFFIX_DESC_CUSTOMIZED = CodegenConstants.ENUM_NAME_SUFFIX_DESC - + " A special '" + ENUM_NAME_SUFFIX_V4_COMPAT + "' value enables the backward-compatible behavior (as pre v4.2.3)"; - public static final String MODEL_PROPERTY_NAMING_DESC_WITH_WARNING = CodegenConstants.MODEL_PROPERTY_NAMING_DESC + ". Only change it if you provide your own run-time code for (de-)serialization of models"; @@ -74,8 +68,7 @@ public abstract class AbstractTypeScriptClientCodegen extends DefaultCodegen imp protected String npmName = null; protected String npmVersion = "1.0.0"; - protected String enumSuffix = ENUM_NAME_SUFFIX_V4_COMPAT; - protected Boolean isEnumSuffixV4Compat = false; + protected String enumSuffix = "Enum"; protected String classEnumSeparator = "."; @@ -172,7 +165,7 @@ public AbstractTypeScriptClientCodegen() { typeMapping.put("URI", "string"); typeMapping.put("Error", "Error"); - cliOptions.add(new CliOption(CodegenConstants.ENUM_NAME_SUFFIX, ENUM_NAME_SUFFIX_DESC_CUSTOMIZED).defaultValue(this.enumSuffix)); + cliOptions.add(new CliOption(CodegenConstants.ENUM_NAME_SUFFIX, CodegenConstants.ENUM_NAME_SUFFIX_DESC).defaultValue(this.enumSuffix)); cliOptions.add(new CliOption(CodegenConstants.ENUM_PROPERTY_NAMING, CodegenConstants.ENUM_PROPERTY_NAMING_DESC).defaultValue(this.enumPropertyNaming.name())); cliOptions.add(new CliOption(CodegenConstants.MODEL_PROPERTY_NAMING, MODEL_PROPERTY_NAMING_DESC_WITH_WARNING).defaultValue(this.modelPropertyNaming.name())); cliOptions.add(new CliOption(CodegenConstants.SUPPORTS_ES6, CodegenConstants.SUPPORTS_ES6_DESC).defaultValue(String.valueOf(this.getSupportsES6()))); @@ -225,11 +218,6 @@ public void processOpts() { if (additionalProperties.containsKey(NPM_NAME)) { this.setNpmName(additionalProperties.get(NPM_NAME).toString()); } - - if (enumSuffix.equals(ENUM_NAME_SUFFIX_V4_COMPAT)) { - isEnumSuffixV4Compat = true; - enumSuffix = modelNameSuffix + "Enum"; - } } @Override diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PlantumlDocumentationCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PlantumlDocumentationCodegen.java index 295cdd817e53..70edb0a92753 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PlantumlDocumentationCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PlantumlDocumentationCodegen.java @@ -1,14 +1,31 @@ +/* + * Copyright 2018 OpenAPI-Generator Contributors (https://openapi-generator.tech) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.openapitools.codegen.languages; import org.openapitools.codegen.*; +import org.openapitools.codegen.meta.GeneratorMetadata; +import org.openapitools.codegen.meta.Stability; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import java.io.File; import java.util.*; import java.util.stream.Collectors; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - public class PlantumlDocumentationCodegen extends DefaultCodegen implements CodegenConfig { public static final String ALL_OF_SUFFIX = "AllOf"; @@ -29,8 +46,12 @@ public String getHelp() { public PlantumlDocumentationCodegen() { super(); + generatorMetadata = GeneratorMetadata.newBuilder(generatorMetadata) + .stability(Stability.BETA) + .build(); + outputFolder = "generated-code" + File.separator + "plantuml"; - embeddedTemplateDir = templateDir = "plantuml-documentation"; + embeddedTemplateDir = templateDir = "plantuml"; supportingFiles.add(new SupportingFile("schemas.mustache", "", "schemas.plantuml")); } @@ -41,7 +62,7 @@ public Map postProcessSupportingFileData(Map obj List modelsList = (List) models; List codegenModelList = modelsList.stream() .filter(listItem -> listItem instanceof HashMap) - .map(listItem -> (CodegenModel)((HashMap)listItem).get("model")) + .map(listItem -> (CodegenModel) ((HashMap) listItem).get("model")) .collect(Collectors.toList()); List inlineAllOfCodegenModelList = codegenModelList.stream() @@ -118,8 +139,8 @@ private Object createFieldFor(CodegenProperty codegenProperty) { @SuppressWarnings("unchecked") private List> calculateCompositionRelationshipsFrom(List> entities) { - Map>> entityFieldsMap = entities.stream() - .collect(Collectors.toMap(entity -> (String)entity.get("name"), entity -> (List>)entity.get("fields"))); + Map>> entityFieldsMap = entities.stream() + .collect(Collectors.toMap(entity -> (String) entity.get("name"), entity -> (List>) entity.get("fields"))); return entityFieldsMap.entrySet().stream() .map(entry -> createRelationshipsFor(entry.getKey(), entry.getValue())) 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 b15c045efd7a..ecd029c13fb9 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 @@ -24,6 +24,8 @@ import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.text.WordUtils; import org.openapitools.codegen.*; +import org.openapitools.codegen.meta.GeneratorMetadata; +import org.openapitools.codegen.meta.Stability; import org.openapitools.codegen.meta.features.*; import org.openapitools.codegen.utils.ModelUtils; import org.slf4j.Logger; @@ -99,6 +101,10 @@ public Swift4Codegen() { ) ); + generatorMetadata = GeneratorMetadata.newBuilder(generatorMetadata) + .stability(Stability.DEPRECATED) + .build(); + outputFolder = "generated-code" + File.separator + "swift"; modelTemplateFiles.put("model.mustache", ".swift"); apiTemplateFiles.put("api.mustache", ".swift"); @@ -323,12 +329,12 @@ public CodegenType getTag() { @Override public String getName() { - return "swift4"; + return "swift4-deprecated"; } @Override public String getHelp() { - return "Generates a Swift 4.x client library."; + return "Generates a Swift 4.x client library (Deprecated and will be removed in 5.x releases. Please use `swift5` instead.)"; } @Override 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 556ae673ec63..ef2ce9196382 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 @@ -233,22 +233,6 @@ public void processOpts() { this.setFileNaming(additionalProperties.get(FILE_NAMING).toString()); } - if (isEnumSuffixV4Compat) { - applyEnumSuffixV4CompatMode(); - } - } - - private void applyEnumSuffixV4CompatMode() { - String fullModelSuffix = modelSuffix + modelNameSuffix; - if (stringEnums) { - // with stringEnums, legacy code would discard "Enum" suffix altogether - // resulting in smth like PetModelTypeModeL - enumSuffix = fullModelSuffix; - } else { - // without stringEnums, "Enum" was appended to model suffix, e.g. PetModel.TypeModelEnum - enumSuffix = fullModelSuffix + "Enum"; - } - } private void addNpmPackageGeneration(SemVer ngVersion) { 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 1b6e80926395..2a1863ebd521 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 @@ -36,6 +36,7 @@ public class TypeScriptAxiosClientCodegen extends AbstractTypeScriptClientCodege public static final String WITH_INTERFACES = "withInterfaces"; public static final String SEPARATE_MODELS_AND_API = "withSeparateModelsAndApi"; public static final String WITHOUT_PREFIX_ENUMS = "withoutPrefixEnums"; + public static final String USE_SINGLE_REQUEST_PARAMETER = "useSingleRequestParameter"; protected String npmRepository = null; @@ -57,6 +58,7 @@ public TypeScriptAxiosClientCodegen() { this.cliOptions.add(new CliOption(WITH_INTERFACES, "Setting this property to true will generate interfaces next to the default class implementations.", SchemaTypeUtil.BOOLEAN_TYPE).defaultValue(Boolean.FALSE.toString())); this.cliOptions.add(new CliOption(SEPARATE_MODELS_AND_API, "Put the model and api in separate folders and in separate classes", SchemaTypeUtil.BOOLEAN_TYPE).defaultValue(Boolean.FALSE.toString())); this.cliOptions.add(new CliOption(WITHOUT_PREFIX_ENUMS, "Don't prefix enum names with class names", SchemaTypeUtil.BOOLEAN_TYPE).defaultValue(Boolean.FALSE.toString())); + this.cliOptions.add(new CliOption(USE_SINGLE_REQUEST_PARAMETER, "Setting this property to true will generate functions with a single argument containing all API endpoint parameters instead of one argument per parameter.", SchemaTypeUtil.BOOLEAN_TYPE).defaultValue(Boolean.FALSE.toString())); } @Override @@ -205,7 +207,7 @@ public Map postProcessModels(Map objs) { } } } - + // Apply the model file name to the imports as well for (Map m : (List>) objs.get("imports")) { String javaImport = m.get("import").substring(modelPackage.length() + 1); diff --git a/modules/openapi-generator/src/main/resources/META-INF/services/org.openapitools.codegen.CodegenConfig b/modules/openapi-generator/src/main/resources/META-INF/services/org.openapitools.codegen.CodegenConfig index 0ad7647b9a7f..4af3596d0b7f 100644 --- a/modules/openapi-generator/src/main/resources/META-INF/services/org.openapitools.codegen.CodegenConfig +++ b/modules/openapi-generator/src/main/resources/META-INF/services/org.openapitools.codegen.CodegenConfig @@ -3,6 +3,7 @@ org.openapitools.codegen.languages.AdaServerCodegen org.openapitools.codegen.languages.AndroidClientCodegen org.openapitools.codegen.languages.Apache2ConfigCodegen org.openapitools.codegen.languages.ApexClientCodegen +org.openapitools.codegen.languages.AsciidocDocumentationCodegen org.openapitools.codegen.languages.AspNetCoreServerCodegen org.openapitools.codegen.languages.AvroSchemaCodegen org.openapitools.codegen.languages.BashClientCodegen @@ -29,6 +30,7 @@ org.openapitools.codegen.languages.ErlangClientCodegen org.openapitools.codegen.languages.ErlangProperCodegen org.openapitools.codegen.languages.ErlangServerCodegen org.openapitools.codegen.languages.FlashClientCodegen +org.openapitools.codegen.languages.FsharpFunctionsServerCodegen org.openapitools.codegen.languages.FsharpGiraffeServerCodegen org.openapitools.codegen.languages.GoClientCodegen org.openapitools.codegen.languages.GoClientExperimentalCodegen @@ -66,6 +68,7 @@ org.openapitools.codegen.languages.JavascriptClosureAngularClientCodegen org.openapitools.codegen.languages.JMeterClientCodegen org.openapitools.codegen.languages.K6ClientCodegen org.openapitools.codegen.languages.LuaClientCodegen +org.openapitools.codegen.languages.MarkdownDocumentationCodegen org.openapitools.codegen.languages.MysqlSchemaCodegen org.openapitools.codegen.languages.NimClientCodegen org.openapitools.codegen.languages.NodeJSServerCodegen @@ -74,6 +77,7 @@ org.openapitools.codegen.languages.ObjcClientCodegen org.openapitools.codegen.languages.OCamlClientCodegen org.openapitools.codegen.languages.OpenAPIGenerator org.openapitools.codegen.languages.OpenAPIYamlGenerator +org.openapitools.codegen.languages.PlantumlDocumentationCodegen org.openapitools.codegen.languages.PerlClientCodegen org.openapitools.codegen.languages.PhpClientCodegen org.openapitools.codegen.languages.PhpLaravelServerCodegen @@ -98,11 +102,13 @@ org.openapitools.codegen.languages.RustClientCodegen org.openapitools.codegen.languages.RustServerCodegen org.openapitools.codegen.languages.ScalatraServerCodegen org.openapitools.codegen.languages.ScalaAkkaClientCodegen +org.openapitools.codegen.languages.ScalaAkkaHttpServerCodegen org.openapitools.codegen.languages.ScalaFinchServerCodegen org.openapitools.codegen.languages.ScalaHttpClientCodegen org.openapitools.codegen.languages.ScalaGatlingCodegen org.openapitools.codegen.languages.ScalaLagomServerCodegen org.openapitools.codegen.languages.ScalaPlayFrameworkServerCodegen +org.openapitools.codegen.languages.ScalaSttpClientCodegen org.openapitools.codegen.languages.ScalazClientCodegen org.openapitools.codegen.languages.SpringCodegen org.openapitools.codegen.languages.StaticDocCodegen @@ -121,14 +127,4 @@ org.openapitools.codegen.languages.TypeScriptInversifyClientCodegen org.openapitools.codegen.languages.TypeScriptJqueryClientCodegen org.openapitools.codegen.languages.TypeScriptNodeClientCodegen org.openapitools.codegen.languages.TypeScriptReduxQueryClientCodegen -org.openapitools.codegen.languages.TypeScriptRxjsClientCodegen -org.openapitools.codegen.languages.FsharpGiraffeServerCodegen -org.openapitools.codegen.languages.AsciidocDocumentationCodegen -org.openapitools.codegen.languages.FsharpFunctionsServerCodegen - -org.openapitools.codegen.languages.MarkdownDocumentationCodegen -org.openapitools.codegen.languages.ScalaSttpClientCodegen - -org.openapitools.codegen.languages.ScalaAkkaHttpServerCodegen - -org.openapitools.codegen.languages.PlantumlDocumentationCodegen +org.openapitools.codegen.languages.TypeScriptRxjsClientCodegen \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/dart-dio/api.mustache b/modules/openapi-generator/src/main/resources/dart-dio/api.mustache index fc1aa2f6bf5d..5431834c9c1e 100644 --- a/modules/openapi-generator/src/main/resources/dart-dio/api.mustache +++ b/modules/openapi-generator/src/main/resources/dart-dio/api.mustache @@ -21,7 +21,7 @@ class {{classname}} { /// {{summary}} /// /// {{notes}} - Future{{/returnType}}>{{nickname}}({{#allParams}}{{#required}}{{{dataType}}} {{paramName}},{{/required}}{{/allParams}}{ {{#allParams}}{{^required}}{{{dataType}}} {{paramName}},{{/required}}{{/allParams}}CancelToken cancelToken, Map headers,}) async { + Future{{/returnType}}>{{nickname}}({{#allParams}}{{#required}}{{{dataType}}} {{paramName}},{{/required}}{{/allParams}}{ {{#allParams}}{{^required}}{{{dataType}}} {{paramName}},{{/required}}{{/allParams}}CancelToken cancelToken, Map headers, ProgressCallback onSendProgress, ProgressCallback onReceiveProgress,}) async { String _path = "{{{path}}}"{{#pathParams}}.replaceAll("{" r'{{baseName}}' "}", {{{paramName}}}.toString()){{/pathParams}}; @@ -90,6 +90,8 @@ class {{classname}} { contentType: contentTypes.isNotEmpty ? contentTypes[0] : "application/json", ), cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, ){{#returnType}}.then((response) { {{#isResponseFile}} diff --git a/modules/openapi-generator/src/main/resources/dart2/api.mustache b/modules/openapi-generator/src/main/resources/dart2/api.mustache index 44d413918e8b..ca638860499d 100644 --- a/modules/openapi-generator/src/main/resources/dart2/api.mustache +++ b/modules/openapi-generator/src/main/resources/dart2/api.mustache @@ -92,6 +92,10 @@ class {{classname}} { /// {{summary}} /// + {{#allParams}} + ///{{dataType}} {{paramName}} {{#required}} (required){{/required}}{{#optional}}(optional){{/optional}}: + /// {{#description}} {{{description}}}{{/description}} + {{/allParams}} /// {{notes}} {{#returnType}}Future<{{{returnType}}}> {{/returnType}}{{^returnType}}Future {{/returnType}}{{nickname}}({{#allParams}}{{#required}}{{{dataType}}} {{paramName}}{{#hasMore}}, {{/hasMore}}{{/required}}{{/allParams}}{{#hasOptionalParams}}{ {{#allParams}}{{^required}}{{{dataType}}} {{paramName}}{{#hasMore}}, {{/hasMore}}{{/required}}{{/allParams}} }{{/hasOptionalParams}}) async { Response response = await {{nickname}}WithHttpInfo({{#allParams}}{{#required}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/required}}{{/allParams}}{{#hasOptionalParams}} {{#allParams}}{{^required}}{{paramName}}: {{paramName}}{{#hasMore}}, {{/hasMore}}{{/required}}{{/allParams}} {{/hasOptionalParams}}); diff --git a/modules/openapi-generator/src/main/resources/dart2/enum.mustache b/modules/openapi-generator/src/main/resources/dart2/enum.mustache index 24ce94f04351..034d377f2612 100644 --- a/modules/openapi-generator/src/main/resources/dart2/enum.mustache +++ b/modules/openapi-generator/src/main/resources/dart2/enum.mustache @@ -12,6 +12,10 @@ class {{classname}} { static const {{classname}} {{{name}}} = const {{classname}}._internal({{{value}}}); {{/enumVars}} {{/allowableValues}} + + {{dataType}} toJson (){ + return this.value; + } static {{classname}} fromJson({{dataType}} value) { return new {{classname}}TypeTransformer().decode(value); diff --git a/modules/openapi-generator/src/main/resources/plantuml-documentation/schemas.mustache b/modules/openapi-generator/src/main/resources/plantuml/schemas.mustache similarity index 100% rename from modules/openapi-generator/src/main/resources/plantuml-documentation/schemas.mustache rename to modules/openapi-generator/src/main/resources/plantuml/schemas.mustache 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 5beec794912a..ec637d7b44af 100644 --- a/modules/openapi-generator/src/main/resources/typescript-axios/apiInner.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-axios/apiInner.mustache @@ -292,6 +292,31 @@ export interface {{classname}}Interface { } {{/withInterfaces}} +{{#useSingleRequestParameter}} +{{#operation}} +{{#allParams.0}} +/** + * Request parameters for {{nickname}} operation in {{classname}}. + * @export + * @interface {{classname}}{{operationIdCamelCase}}Request + */ +export interface {{classname}}{{operationIdCamelCase}}Request { + {{#allParams}} + /** + * {{description}} + * @type {{=<% %>=}}{<%&dataType%>}<%={{ }}=%> + * @memberof {{classname}}{{operationIdCamelCase}} + */ + readonly {{paramName}}{{^required}}?{{/required}}: {{{dataType}}} + {{^-last}} + + {{/-last}} + {{/allParams}} +} + +{{/allParams.0}} +{{/operation}} +{{/useSingleRequestParameter}} /** * {{classname}} - object-oriented interface{{#description}} * {{{description}}}{{/description}} @@ -311,17 +336,33 @@ export class {{classname}} extends BaseAPI { {{#summary}} * @summary {{&summary}} {{/summary}} + {{#useSingleRequestParameter}} + {{#allParams.0}} + * @param {{=<% %>=}}{<%& classname %><%& operationIdCamelCase %>Request}<%={{ }}=%> requestParameters Request parameters. + {{/allParams.0}} + {{/useSingleRequestParameter}} + {{^useSingleRequestParameter}} {{#allParams}} * @param {{=<% %>=}}{<%&dataType%>}<%={{ }}=%> {{^required}}[{{/required}}{{paramName}}{{^required}}]{{/required}} {{description}} {{/allParams}} + {{/useSingleRequestParameter}} * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof {{classname}} */ + {{#useSingleRequestParameter}} + public {{nickname}}({{#allParams.0}}requestParameters: {{classname}}{{operationIdCamelCase}}Request, {{/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}} + {{^useSingleRequestParameter}} public {{nickname}}({{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{{dataType}}}, {{/allParams}}options?: any) { return {{classname}}Fp(this.configuration).{{nickname}}({{#allParams}}{{paramName}}, {{/allParams}}options).then((request) => request(this.axios, this.basePath)); } + {{/useSingleRequestParameter}} + {{^-last}} + {{/-last}} {{/operation}} } {{/operations}} diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/typescript/typescriptangular/TypeScriptAngularClientCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/typescript/typescriptangular/TypeScriptAngularClientCodegenTest.java index c1646fcdc609..059e5004ad4e 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/typescript/typescriptangular/TypeScriptAngularClientCodegenTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/typescript/typescriptangular/TypeScriptAngularClientCodegenTest.java @@ -89,29 +89,6 @@ public void testToEnumName() { Assert.assertEquals(codegen.toEnumName(makeEnumProperty("TestName")), "TestName"); } - @Test - public void testToEnumNameCompatMode() { - TypeScriptAngularClientCodegen codegen = new TypeScriptAngularClientCodegen(); - // default - stringEnums=false - codegen.processOpts(); - - Assert.assertEquals(codegen.toEnumName(makeEnumProperty("TestName")), "TestNameEnum"); - - // model suffix is prepended to "Enum" suffix - codegen = new TypeScriptAngularClientCodegen(); - codegen.additionalProperties().put(CodegenConstants.MODEL_NAME_SUFFIX, "Model1"); - codegen.additionalProperties().put(TypeScriptAngularClientCodegen.MODEL_SUFFIX, "Model2"); - codegen.processOpts(); - Assert.assertEquals(codegen.toEnumName(makeEnumProperty("TestName")), "TestNameModel2Model1Enum"); - - codegen = new TypeScriptAngularClientCodegen(); - codegen.additionalProperties().put(TypeScriptAngularClientCodegen.STRING_ENUMS, true); - codegen.additionalProperties().put(CodegenConstants.MODEL_NAME_SUFFIX, "Model1"); - codegen.additionalProperties().put(TypeScriptAngularClientCodegen.MODEL_SUFFIX, "Model2"); - codegen.processOpts(); - Assert.assertEquals(codegen.toEnumName(makeEnumProperty("TestName")), "TestNameModel2Model1"); - } - private CodegenProperty makeEnumProperty(String name) { CodegenProperty enumProperty = new CodegenProperty(); enumProperty.name = name; diff --git a/modules/openapi-generator/src/test/resources/3_0/petstore.yaml b/modules/openapi-generator/src/test/resources/3_0/petstore.yaml index 8feeb2440f3e..f5e98eec38da 100644 --- a/modules/openapi-generator/src/test/resources/3_0/petstore.yaml +++ b/modules/openapi-generator/src/test/resources/3_0/petstore.yaml @@ -391,7 +391,7 @@ paths: default: description: successful operation security: - - auth_cookie: [] + - api_key: [] requestBody: content: application/json: @@ -410,7 +410,7 @@ paths: default: description: successful operation security: - - auth_cookie: [] + - api_key: [] requestBody: $ref: '#/components/requestBodies/UserArray' /user/createWithList: @@ -424,7 +424,7 @@ paths: default: description: successful operation security: - - auth_cookie: [] + - api_key: [] requestBody: $ref: '#/components/requestBodies/UserArray' /user/login: @@ -454,7 +454,7 @@ paths: headers: Set-Cookie: description: >- - Cookie authentication key for use with the `auth_cookie` + Cookie authentication key for use with the `api_key` apiKey authentication. schema: type: string @@ -489,7 +489,7 @@ paths: default: description: successful operation security: - - auth_cookie: [] + - api_key: [] '/user/{username}': get: tags: @@ -537,7 +537,7 @@ paths: '404': description: User not found security: - - auth_cookie: [] + - api_key: [] requestBody: content: application/json: @@ -564,7 +564,7 @@ paths: '404': description: User not found security: - - auth_cookie: [] + - api_key: [] externalDocs: description: Find out more about Swagger url: 'http://swagger.io' @@ -602,10 +602,6 @@ components: type: apiKey name: api_key in: header - auth_cookie: - type: apiKey - name: AUTH_KEY - in: cookie schemas: Order: title: Pet Order diff --git a/samples/client/petstore/dart-dio/.openapi-generator/VERSION b/samples/client/petstore/dart-dio/.openapi-generator/VERSION index 71d2eb1c7fcd..d99e7162d01f 100644 --- a/samples/client/petstore/dart-dio/.openapi-generator/VERSION +++ b/samples/client/petstore/dart-dio/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0-SNAPSHOT +5.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/dart-dio/lib/api/pet_api.dart b/samples/client/petstore/dart-dio/lib/api/pet_api.dart index e106b1510302..7d714d1ddc31 100644 --- a/samples/client/petstore/dart-dio/lib/api/pet_api.dart +++ b/samples/client/petstore/dart-dio/lib/api/pet_api.dart @@ -19,7 +19,7 @@ class PetApi { /// Add a new pet to the store /// /// - FutureaddPet(Pet body,{ CancelToken cancelToken, Map headers,}) async { + FutureaddPet(Pet body,{ CancelToken cancelToken, Map headers, ProgressCallback onSendProgress, ProgressCallback onReceiveProgress,}) async { String _path = "/pet"; @@ -50,12 +50,14 @@ class PetApi { contentType: contentTypes.isNotEmpty ? contentTypes[0] : "application/json", ), cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, ); } /// Deletes a pet /// /// - FuturedeletePet(int petId,{ String apiKey,CancelToken cancelToken, Map headers,}) async { + FuturedeletePet(int petId,{ String apiKey,CancelToken cancelToken, Map headers, ProgressCallback onSendProgress, ProgressCallback onReceiveProgress,}) async { String _path = "/pet/{petId}".replaceAll("{" r'petId' "}", petId.toString()); @@ -84,12 +86,14 @@ class PetApi { contentType: contentTypes.isNotEmpty ? contentTypes[0] : "application/json", ), cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, ); } /// Finds Pets by status /// /// Multiple status values can be provided with comma separated strings - Future>>findPetsByStatus(List status,{ CancelToken cancelToken, Map headers,}) async { + Future>>findPetsByStatus(List status,{ CancelToken cancelToken, Map headers, ProgressCallback onSendProgress, ProgressCallback onReceiveProgress,}) async { String _path = "/pet/findByStatus"; @@ -118,6 +122,8 @@ class PetApi { contentType: contentTypes.isNotEmpty ? contentTypes[0] : "application/json", ), cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, ).then((response) { final FullType type = const FullType(BuiltList, const [const FullType(Pet)]); @@ -138,7 +144,7 @@ class PetApi { /// Finds Pets by tags /// /// Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. - Future>>findPetsByTags(List tags,{ CancelToken cancelToken, Map headers,}) async { + Future>>findPetsByTags(List tags,{ CancelToken cancelToken, Map headers, ProgressCallback onSendProgress, ProgressCallback onReceiveProgress,}) async { String _path = "/pet/findByTags"; @@ -167,6 +173,8 @@ class PetApi { contentType: contentTypes.isNotEmpty ? contentTypes[0] : "application/json", ), cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, ).then((response) { final FullType type = const FullType(BuiltList, const [const FullType(Pet)]); @@ -187,7 +195,7 @@ class PetApi { /// Find pet by ID /// /// Returns a single pet - Future>getPetById(int petId,{ CancelToken cancelToken, Map headers,}) async { + Future>getPetById(int petId,{ CancelToken cancelToken, Map headers, ProgressCallback onSendProgress, ProgressCallback onReceiveProgress,}) async { String _path = "/pet/{petId}".replaceAll("{" r'petId' "}", petId.toString()); @@ -215,6 +223,8 @@ class PetApi { contentType: contentTypes.isNotEmpty ? contentTypes[0] : "application/json", ), cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, ).then((response) { var serializer = _serializers.serializerForType(Pet); @@ -234,7 +244,7 @@ class PetApi { /// Update an existing pet /// /// - FutureupdatePet(Pet body,{ CancelToken cancelToken, Map headers,}) async { + FutureupdatePet(Pet body,{ CancelToken cancelToken, Map headers, ProgressCallback onSendProgress, ProgressCallback onReceiveProgress,}) async { String _path = "/pet"; @@ -265,12 +275,14 @@ class PetApi { contentType: contentTypes.isNotEmpty ? contentTypes[0] : "application/json", ), cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, ); } /// Updates a pet in the store with form data /// /// - FutureupdatePetWithForm(int petId,{ String name,String status,CancelToken cancelToken, Map headers,}) async { + FutureupdatePetWithForm(int petId,{ String name,String status,CancelToken cancelToken, Map headers, ProgressCallback onSendProgress, ProgressCallback onReceiveProgress,}) async { String _path = "/pet/{petId}".replaceAll("{" r'petId' "}", petId.toString()); @@ -302,12 +314,14 @@ class PetApi { contentType: contentTypes.isNotEmpty ? contentTypes[0] : "application/json", ), cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, ); } /// uploads an image /// /// - Future>uploadFile(int petId,{ String additionalMetadata,Uint8List file,CancelToken cancelToken, Map headers,}) async { + Future>uploadFile(int petId,{ String additionalMetadata,Uint8List file,CancelToken cancelToken, Map headers, ProgressCallback onSendProgress, ProgressCallback onReceiveProgress,}) async { String _path = "/pet/{petId}/uploadImage".replaceAll("{" r'petId' "}", petId.toString()); @@ -343,6 +357,8 @@ class PetApi { contentType: contentTypes.isNotEmpty ? contentTypes[0] : "application/json", ), cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, ).then((response) { var serializer = _serializers.serializerForType(ApiResponse); diff --git a/samples/client/petstore/dart-dio/lib/api/store_api.dart b/samples/client/petstore/dart-dio/lib/api/store_api.dart index 09bc26ab0687..f12cce299102 100644 --- a/samples/client/petstore/dart-dio/lib/api/store_api.dart +++ b/samples/client/petstore/dart-dio/lib/api/store_api.dart @@ -16,7 +16,7 @@ class StoreApi { /// Delete purchase order by ID /// /// For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors - FuturedeleteOrder(String orderId,{ CancelToken cancelToken, Map headers,}) async { + FuturedeleteOrder(String orderId,{ CancelToken cancelToken, Map headers, ProgressCallback onSendProgress, ProgressCallback onReceiveProgress,}) async { String _path = "/store/order/{orderId}".replaceAll("{" r'orderId' "}", orderId.toString()); @@ -44,12 +44,14 @@ class StoreApi { contentType: contentTypes.isNotEmpty ? contentTypes[0] : "application/json", ), cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, ); } /// Returns pet inventories by status /// /// Returns a map of status codes to quantities - Future>>getInventory({ CancelToken cancelToken, Map headers,}) async { + Future>>getInventory({ CancelToken cancelToken, Map headers, ProgressCallback onSendProgress, ProgressCallback onReceiveProgress,}) async { String _path = "/store/inventory"; @@ -77,6 +79,8 @@ class StoreApi { contentType: contentTypes.isNotEmpty ? contentTypes[0] : "application/json", ), cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, ).then((response) { var serializer = _serializers.serializerForType(Map); @@ -96,7 +100,7 @@ class StoreApi { /// Find purchase order by ID /// /// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions - Future>getOrderById(int orderId,{ CancelToken cancelToken, Map headers,}) async { + Future>getOrderById(int orderId,{ CancelToken cancelToken, Map headers, ProgressCallback onSendProgress, ProgressCallback onReceiveProgress,}) async { String _path = "/store/order/{orderId}".replaceAll("{" r'orderId' "}", orderId.toString()); @@ -124,6 +128,8 @@ class StoreApi { contentType: contentTypes.isNotEmpty ? contentTypes[0] : "application/json", ), cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, ).then((response) { var serializer = _serializers.serializerForType(Order); @@ -143,7 +149,7 @@ class StoreApi { /// Place an order for a pet /// /// - Future>placeOrder(Order body,{ CancelToken cancelToken, Map headers,}) async { + Future>placeOrder(Order body,{ CancelToken cancelToken, Map headers, ProgressCallback onSendProgress, ProgressCallback onReceiveProgress,}) async { String _path = "/store/order"; @@ -174,6 +180,8 @@ class StoreApi { contentType: contentTypes.isNotEmpty ? contentTypes[0] : "application/json", ), cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, ).then((response) { var serializer = _serializers.serializerForType(Order); diff --git a/samples/client/petstore/dart-dio/lib/api/user_api.dart b/samples/client/petstore/dart-dio/lib/api/user_api.dart index 86175b343146..f043b6855a84 100644 --- a/samples/client/petstore/dart-dio/lib/api/user_api.dart +++ b/samples/client/petstore/dart-dio/lib/api/user_api.dart @@ -16,7 +16,7 @@ class UserApi { /// Create user /// /// This can only be done by the logged in user. - FuturecreateUser(User body,{ CancelToken cancelToken, Map headers,}) async { + FuturecreateUser(User body,{ CancelToken cancelToken, Map headers, ProgressCallback onSendProgress, ProgressCallback onReceiveProgress,}) async { String _path = "/user"; @@ -47,12 +47,14 @@ class UserApi { contentType: contentTypes.isNotEmpty ? contentTypes[0] : "application/json", ), cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, ); } /// Creates list of users with given input array /// /// - FuturecreateUsersWithArrayInput(List body,{ CancelToken cancelToken, Map headers,}) async { + FuturecreateUsersWithArrayInput(List body,{ CancelToken cancelToken, Map headers, ProgressCallback onSendProgress, ProgressCallback onReceiveProgress,}) async { String _path = "/user/createWithArray"; @@ -84,12 +86,14 @@ class UserApi { contentType: contentTypes.isNotEmpty ? contentTypes[0] : "application/json", ), cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, ); } /// Creates list of users with given input array /// /// - FuturecreateUsersWithListInput(List body,{ CancelToken cancelToken, Map headers,}) async { + FuturecreateUsersWithListInput(List body,{ CancelToken cancelToken, Map headers, ProgressCallback onSendProgress, ProgressCallback onReceiveProgress,}) async { String _path = "/user/createWithList"; @@ -121,12 +125,14 @@ class UserApi { contentType: contentTypes.isNotEmpty ? contentTypes[0] : "application/json", ), cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, ); } /// Delete user /// /// This can only be done by the logged in user. - FuturedeleteUser(String username,{ CancelToken cancelToken, Map headers,}) async { + FuturedeleteUser(String username,{ CancelToken cancelToken, Map headers, ProgressCallback onSendProgress, ProgressCallback onReceiveProgress,}) async { String _path = "/user/{username}".replaceAll("{" r'username' "}", username.toString()); @@ -154,12 +160,14 @@ class UserApi { contentType: contentTypes.isNotEmpty ? contentTypes[0] : "application/json", ), cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, ); } /// Get user by user name /// /// - Future>getUserByName(String username,{ CancelToken cancelToken, Map headers,}) async { + Future>getUserByName(String username,{ CancelToken cancelToken, Map headers, ProgressCallback onSendProgress, ProgressCallback onReceiveProgress,}) async { String _path = "/user/{username}".replaceAll("{" r'username' "}", username.toString()); @@ -187,6 +195,8 @@ class UserApi { contentType: contentTypes.isNotEmpty ? contentTypes[0] : "application/json", ), cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, ).then((response) { var serializer = _serializers.serializerForType(User); @@ -206,7 +216,7 @@ class UserApi { /// Logs user into the system /// /// - Future>loginUser(String username,String password,{ CancelToken cancelToken, Map headers,}) async { + Future>loginUser(String username,String password,{ CancelToken cancelToken, Map headers, ProgressCallback onSendProgress, ProgressCallback onReceiveProgress,}) async { String _path = "/user/login"; @@ -236,6 +246,8 @@ class UserApi { contentType: contentTypes.isNotEmpty ? contentTypes[0] : "application/json", ), cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, ).then((response) { var serializer = _serializers.serializerForType(String); @@ -255,7 +267,7 @@ class UserApi { /// Logs out current logged in user session /// /// - FuturelogoutUser({ CancelToken cancelToken, Map headers,}) async { + FuturelogoutUser({ CancelToken cancelToken, Map headers, ProgressCallback onSendProgress, ProgressCallback onReceiveProgress,}) async { String _path = "/user/logout"; @@ -283,12 +295,14 @@ class UserApi { contentType: contentTypes.isNotEmpty ? contentTypes[0] : "application/json", ), cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, ); } /// Updated user /// /// This can only be done by the logged in user. - FutureupdateUser(String username,User body,{ CancelToken cancelToken, Map headers,}) async { + FutureupdateUser(String username,User body,{ CancelToken cancelToken, Map headers, ProgressCallback onSendProgress, ProgressCallback onReceiveProgress,}) async { String _path = "/user/{username}".replaceAll("{" r'username' "}", username.toString()); @@ -319,6 +333,8 @@ class UserApi { contentType: contentTypes.isNotEmpty ? contentTypes[0] : "application/json", ), cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, ); } } diff --git a/samples/client/petstore/dart2/petstore_client_lib/lib/api/pet_api.dart b/samples/client/petstore/dart2/petstore_client_lib/lib/api/pet_api.dart index a413df7b4242..56efbc2492bc 100644 --- a/samples/client/petstore/dart2/petstore_client_lib/lib/api/pet_api.dart +++ b/samples/client/petstore/dart2/petstore_client_lib/lib/api/pet_api.dart @@ -53,6 +53,8 @@ class PetApi { /// Add a new pet to the store /// + ///Pet body (required): + /// Pet object that needs to be added to the store /// Future addPet(Pet body) async { Response response = await addPetWithHttpInfo(body); @@ -111,6 +113,10 @@ class PetApi { /// Deletes a pet /// + ///int petId (required): + /// Pet id to delete + ///String apiKey : + /// /// Future deletePet(int petId, { String apiKey }) async { Response response = await deletePetWithHttpInfo(petId, apiKey: apiKey ); @@ -169,6 +175,8 @@ class PetApi { /// Finds Pets by status /// + ///List<String> status (required): + /// Status values that need to be considered for filter /// Multiple status values can be provided with comma separated strings Future> findPetsByStatus(List status) async { Response response = await findPetsByStatusWithHttpInfo(status); @@ -228,6 +236,8 @@ class PetApi { /// Finds Pets by tags /// + ///List<String> tags (required): + /// Tags to filter by /// Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. Future> findPetsByTags(List tags) async { Response response = await findPetsByTagsWithHttpInfo(tags); @@ -286,6 +296,8 @@ class PetApi { /// Find pet by ID /// + ///int petId (required): + /// ID of pet to return /// Returns a single pet Future getPetById(int petId) async { Response response = await getPetByIdWithHttpInfo(petId); @@ -344,6 +356,8 @@ class PetApi { /// Update an existing pet /// + ///Pet body (required): + /// Pet object that needs to be added to the store /// Future updatePet(Pet body) async { Response response = await updatePetWithHttpInfo(body); @@ -413,6 +427,12 @@ class PetApi { /// Updates a pet in the store with form data /// + ///int petId (required): + /// ID of pet that needs to be updated + ///String name : + /// Updated name of the pet + ///String status : + /// Updated status of the pet /// Future updatePetWithForm(int petId, { String name, String status }) async { Response response = await updatePetWithFormWithHttpInfo(petId, name: name, status: status ); @@ -481,6 +501,12 @@ class PetApi { /// uploads an image /// + ///int petId (required): + /// ID of pet to update + ///String additionalMetadata : + /// Additional data to pass to server + ///MultipartFile file : + /// file to upload /// Future uploadFile(int petId, { String additionalMetadata, MultipartFile file }) async { Response response = await uploadFileWithHttpInfo(petId, additionalMetadata: additionalMetadata, file: file ); diff --git a/samples/client/petstore/dart2/petstore_client_lib/lib/api/store_api.dart b/samples/client/petstore/dart2/petstore_client_lib/lib/api/store_api.dart index 10dc4a35b85a..3c10ba5454ca 100644 --- a/samples/client/petstore/dart2/petstore_client_lib/lib/api/store_api.dart +++ b/samples/client/petstore/dart2/petstore_client_lib/lib/api/store_api.dart @@ -53,6 +53,8 @@ class StoreApi { /// Delete purchase order by ID /// + ///String orderId (required): + /// ID of the order that needs to be deleted /// For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors Future deleteOrder(String orderId) async { Response response = await deleteOrderWithHttpInfo(orderId); @@ -166,6 +168,8 @@ class StoreApi { /// Find purchase order by ID /// + ///int orderId (required): + /// ID of pet that needs to be fetched /// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions Future getOrderById(int orderId) async { Response response = await getOrderByIdWithHttpInfo(orderId); @@ -224,6 +228,8 @@ class StoreApi { /// Place an order for a pet /// + ///Order body (required): + /// order placed for purchasing the pet /// Future placeOrder(Order body) async { Response response = await placeOrderWithHttpInfo(body); diff --git a/samples/client/petstore/dart2/petstore_client_lib/lib/api/user_api.dart b/samples/client/petstore/dart2/petstore_client_lib/lib/api/user_api.dart index a940ca410713..ea069b58ea80 100644 --- a/samples/client/petstore/dart2/petstore_client_lib/lib/api/user_api.dart +++ b/samples/client/petstore/dart2/petstore_client_lib/lib/api/user_api.dart @@ -53,6 +53,8 @@ class UserApi { /// Create user /// + ///User body (required): + /// Created user object /// This can only be done by the logged in user. Future createUser(User body) async { Response response = await createUserWithHttpInfo(body); @@ -110,6 +112,8 @@ class UserApi { /// Creates list of users with given input array /// + ///List<User> body (required): + /// List of user object /// Future createUsersWithArrayInput(List body) async { Response response = await createUsersWithArrayInputWithHttpInfo(body); @@ -167,6 +171,8 @@ class UserApi { /// Creates list of users with given input array /// + ///List<User> body (required): + /// List of user object /// Future createUsersWithListInput(List body) async { Response response = await createUsersWithListInputWithHttpInfo(body); @@ -224,6 +230,8 @@ class UserApi { /// Delete user /// + ///String username (required): + /// The name that needs to be deleted /// This can only be done by the logged in user. Future deleteUser(String username) async { Response response = await deleteUserWithHttpInfo(username); @@ -281,6 +289,8 @@ class UserApi { /// Get user by user name /// + ///String username (required): + /// The name that needs to be fetched. Use user1 for testing. /// Future getUserByName(String username) async { Response response = await getUserByNameWithHttpInfo(username); @@ -344,6 +354,10 @@ class UserApi { /// Logs user into the system /// + ///String username (required): + /// The user name for login + ///String password (required): + /// The password for login in clear text /// Future loginUser(String username, String password) async { Response response = await loginUserWithHttpInfo(username, password); @@ -459,6 +473,10 @@ class UserApi { /// Updated user /// + ///String username (required): + /// name that need to be deleted + ///User body (required): + /// Updated user object /// This can only be done by the logged in user. Future updateUser(String username, User body) async { Response response = await updateUserWithHttpInfo(username, body); diff --git a/samples/client/petstore/erlang-client/.openapi-generator/VERSION b/samples/client/petstore/erlang-client/.openapi-generator/VERSION index 105bb87d77b3..d99e7162d01f 100644 --- a/samples/client/petstore/erlang-client/.openapi-generator/VERSION +++ b/samples/client/petstore/erlang-client/.openapi-generator/VERSION @@ -1 +1 @@ -3.2.2-SNAPSHOT \ No newline at end of file +5.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/erlang-client/src/petstore_inline_object.erl b/samples/client/petstore/erlang-client/src/petstore_inline_object.erl new file mode 100644 index 000000000000..9863a8e30bb7 --- /dev/null +++ b/samples/client/petstore/erlang-client/src/petstore_inline_object.erl @@ -0,0 +1,17 @@ +-module(petstore_inline_object). + +-export([encode/1]). + +-export_type([petstore_inline_object/0]). + +-type petstore_inline_object() :: + #{ 'name' => binary(), + 'status' => binary() + }. + +encode(#{ 'name' := Name, + 'status' := Status + }) -> + #{ 'name' => Name, + 'status' => Status + }. diff --git a/samples/client/petstore/erlang-client/src/petstore_inline_object_1.erl b/samples/client/petstore/erlang-client/src/petstore_inline_object_1.erl new file mode 100644 index 000000000000..faf9a97e8964 --- /dev/null +++ b/samples/client/petstore/erlang-client/src/petstore_inline_object_1.erl @@ -0,0 +1,17 @@ +-module(petstore_inline_object_1). + +-export([encode/1]). + +-export_type([petstore_inline_object_1/0]). + +-type petstore_inline_object_1() :: + #{ 'additionalMetadata' => binary(), + 'file' => binary() + }. + +encode(#{ 'additionalMetadata' := AdditionalMetadata, + 'file' := File + }) -> + #{ 'additionalMetadata' => AdditionalMetadata, + 'file' => File + }. diff --git a/samples/client/petstore/erlang-client/src/petstore_pet_api.erl b/samples/client/petstore/erlang-client/src/petstore_pet_api.erl index bbb664f66bda..54991ba9dd19 100644 --- a/samples/client/petstore/erlang-client/src/petstore_pet_api.erl +++ b/samples/client/petstore/erlang-client/src/petstore_pet_api.erl @@ -13,11 +13,11 @@ %% @doc Add a new pet to the store %% --spec add_pet(ctx:ctx(), petstore_pet:petstore_pet()) -> {ok, [], petstore_utils:response_info()} | {ok, hackney:client_ref()} | {error, term(), petstore_utils:response_info()}. +-spec add_pet(ctx:ctx(), petstore_pet:petstore_pet()) -> {ok, petstore_pet:petstore_pet(), petstore_utils:response_info()} | {ok, hackney:client_ref()} | {error, term(), petstore_utils:response_info()}. add_pet(Ctx, PetstorePet) -> add_pet(Ctx, PetstorePet, #{}). --spec add_pet(ctx:ctx(), petstore_pet:petstore_pet(), maps:map()) -> {ok, [], petstore_utils:response_info()} | {ok, hackney:client_ref()} | {error, term(), petstore_utils:response_info()}. +-spec add_pet(ctx:ctx(), petstore_pet:petstore_pet(), maps:map()) -> {ok, petstore_pet:petstore_pet(), petstore_utils:response_info()} | {ok, hackney:client_ref()} | {error, term(), petstore_utils:response_info()}. add_pet(Ctx, PetstorePet, Optional) -> _OptionalParams = maps:get(params, Optional, #{}), Cfg = maps:get(cfg, Optional, application:get_env(kuberl, config, #{})), @@ -118,11 +118,11 @@ get_pet_by_id(Ctx, PetId, Optional) -> %% @doc Update an existing pet %% --spec update_pet(ctx:ctx(), petstore_pet:petstore_pet()) -> {ok, [], petstore_utils:response_info()} | {ok, hackney:client_ref()} | {error, term(), petstore_utils:response_info()}. +-spec update_pet(ctx:ctx(), petstore_pet:petstore_pet()) -> {ok, petstore_pet:petstore_pet(), petstore_utils:response_info()} | {ok, hackney:client_ref()} | {error, term(), petstore_utils:response_info()}. update_pet(Ctx, PetstorePet) -> update_pet(Ctx, PetstorePet, #{}). --spec update_pet(ctx:ctx(), petstore_pet:petstore_pet(), maps:map()) -> {ok, [], petstore_utils:response_info()} | {ok, hackney:client_ref()} | {error, term(), petstore_utils:response_info()}. +-spec update_pet(ctx:ctx(), petstore_pet:petstore_pet(), maps:map()) -> {ok, petstore_pet:petstore_pet(), petstore_utils:response_info()} | {ok, hackney:client_ref()} | {error, term(), petstore_utils:response_info()}. update_pet(Ctx, PetstorePet, Optional) -> _OptionalParams = maps:get(params, Optional, #{}), Cfg = maps:get(cfg, Optional, application:get_env(kuberl, config, #{})), diff --git a/samples/client/petstore/erlang-client/src/petstore_store_api.erl b/samples/client/petstore/erlang-client/src/petstore_store_api.erl index 178cd0a2cb23..2e72823d9d90 100644 --- a/samples/client/petstore/erlang-client/src/petstore_store_api.erl +++ b/samples/client/petstore/erlang-client/src/petstore_store_api.erl @@ -86,7 +86,7 @@ place_order(Ctx, PetstoreOrder, Optional) -> QS = [], Headers = [], Body1 = PetstoreOrder, - ContentTypeHeader = petstore_utils:select_header_content_type([]), + ContentTypeHeader = petstore_utils:select_header_content_type([<<"application/json">>]), Opts = maps:get(hackney_opts, Optional, []), petstore_utils:request(Ctx, Method, [?BASE_URL, Path], QS, ContentTypeHeader++Headers, Body1, Opts, Cfg). diff --git a/samples/client/petstore/erlang-client/src/petstore_user_api.erl b/samples/client/petstore/erlang-client/src/petstore_user_api.erl index b1f07026be88..45a8a9d78726 100644 --- a/samples/client/petstore/erlang-client/src/petstore_user_api.erl +++ b/samples/client/petstore/erlang-client/src/petstore_user_api.erl @@ -27,7 +27,7 @@ create_user(Ctx, PetstoreUser, Optional) -> QS = [], Headers = [], Body1 = PetstoreUser, - ContentTypeHeader = petstore_utils:select_header_content_type([]), + ContentTypeHeader = petstore_utils:select_header_content_type([<<"application/json">>]), Opts = maps:get(hackney_opts, Optional, []), petstore_utils:request(Ctx, Method, [?BASE_URL, Path], QS, ContentTypeHeader++Headers, Body1, Opts, Cfg). @@ -48,7 +48,7 @@ create_users_with_array_input(Ctx, PetstoreUserArray, Optional) -> QS = [], Headers = [], Body1 = PetstoreUserArray, - ContentTypeHeader = petstore_utils:select_header_content_type([]), + ContentTypeHeader = petstore_utils:select_header_content_type([<<"application/json">>]), Opts = maps:get(hackney_opts, Optional, []), petstore_utils:request(Ctx, Method, [?BASE_URL, Path], QS, ContentTypeHeader++Headers, Body1, Opts, Cfg). @@ -69,7 +69,7 @@ create_users_with_list_input(Ctx, PetstoreUserArray, Optional) -> QS = [], Headers = [], Body1 = PetstoreUserArray, - ContentTypeHeader = petstore_utils:select_header_content_type([]), + ContentTypeHeader = petstore_utils:select_header_content_type([<<"application/json">>]), Opts = maps:get(hackney_opts, Optional, []), petstore_utils:request(Ctx, Method, [?BASE_URL, Path], QS, ContentTypeHeader++Headers, Body1, Opts, Cfg). @@ -174,7 +174,7 @@ update_user(Ctx, Username, PetstoreUser, Optional) -> QS = [], Headers = [], Body1 = PetstoreUser, - ContentTypeHeader = petstore_utils:select_header_content_type([]), + ContentTypeHeader = petstore_utils:select_header_content_type([<<"application/json">>]), Opts = maps:get(hackney_opts, Optional, []), petstore_utils:request(Ctx, Method, [?BASE_URL, Path], QS, ContentTypeHeader++Headers, Body1, Opts, Cfg). diff --git a/samples/client/petstore/erlang-proper/.openapi-generator/VERSION b/samples/client/petstore/erlang-proper/.openapi-generator/VERSION index a65271290834..d99e7162d01f 100644 --- a/samples/client/petstore/erlang-proper/.openapi-generator/VERSION +++ b/samples/client/petstore/erlang-proper/.openapi-generator/VERSION @@ -1 +1 @@ -3.3.2-SNAPSHOT \ No newline at end of file +5.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/erlang-proper/src/model/petstore_inline_object.erl b/samples/client/petstore/erlang-proper/src/model/petstore_inline_object.erl new file mode 100644 index 000000000000..aa84f722e79c --- /dev/null +++ b/samples/client/petstore/erlang-proper/src/model/petstore_inline_object.erl @@ -0,0 +1,25 @@ +-module(petstore_inline_object). + +-include("petstore.hrl"). + +-export([petstore_inline_object/0]). + +-export([petstore_inline_object/1]). + +-export_type([petstore_inline_object/0]). + +-type petstore_inline_object() :: + [ {'name', binary() } + | {'status', binary() } + ]. + + +petstore_inline_object() -> + petstore_inline_object([]). + +petstore_inline_object(Fields) -> + Default = [ {'name', binary() } + , {'status', binary() } + ], + lists:ukeymerge(1, lists:sort(Fields), lists:sort(Default)). + diff --git a/samples/client/petstore/erlang-proper/src/model/petstore_inline_object_1.erl b/samples/client/petstore/erlang-proper/src/model/petstore_inline_object_1.erl new file mode 100644 index 000000000000..3af5b444422c --- /dev/null +++ b/samples/client/petstore/erlang-proper/src/model/petstore_inline_object_1.erl @@ -0,0 +1,25 @@ +-module(petstore_inline_object_1). + +-include("petstore.hrl"). + +-export([petstore_inline_object_1/0]). + +-export([petstore_inline_object_1/1]). + +-export_type([petstore_inline_object_1/0]). + +-type petstore_inline_object_1() :: + [ {'additionalMetadata', binary() } + | {'file', binary() } + ]. + + +petstore_inline_object_1() -> + petstore_inline_object_1([]). + +petstore_inline_object_1(Fields) -> + Default = [ {'additionalMetadata', binary() } + , {'file', binary() } + ], + lists:ukeymerge(1, lists:sort(Fields), lists:sort(Default)). + diff --git a/samples/client/petstore/erlang-proper/src/petstore_api.erl b/samples/client/petstore/erlang-proper/src/petstore_api.erl index 2f852cfd4073..b45cf6a16072 100644 --- a/samples/client/petstore/erlang-proper/src/petstore_api.erl +++ b/samples/client/petstore/erlang-proper/src/petstore_api.erl @@ -21,7 +21,7 @@ create_user(PetstoreUser) -> Host = application:get_env(petstore, host, "http://localhost:8080"), Path = ["/user"], Body = PetstoreUser, - ContentType = "text/plain", + ContentType = hd(["application/json"]), petstore_utils:request(Method, [Host, ?BASE_URL, Path], jsx:encode(Body), ContentType). @@ -34,7 +34,7 @@ create_users_with_array_input(PetstoreUserArray) -> Host = application:get_env(petstore, host, "http://localhost:8080"), Path = ["/user/createWithArray"], Body = PetstoreUserArray, - ContentType = "text/plain", + ContentType = hd(["application/json"]), petstore_utils:request(Method, [Host, ?BASE_URL, Path], jsx:encode(Body), ContentType). @@ -47,7 +47,7 @@ create_users_with_list_input(PetstoreUserArray) -> Host = application:get_env(petstore, host, "http://localhost:8080"), Path = ["/user/createWithList"], Body = PetstoreUserArray, - ContentType = "text/plain", + ContentType = hd(["application/json"]), petstore_utils:request(Method, [Host, ?BASE_URL, Path], jsx:encode(Body), ContentType). @@ -105,7 +105,7 @@ update_user(Username, PetstoreUser) -> Host = application:get_env(petstore, host, "http://localhost:8080"), Path = ["/user/", Username, ""], Body = PetstoreUser, - ContentType = "text/plain", + ContentType = hd(["application/json"]), petstore_utils:request(Method, [Host, ?BASE_URL, Path], jsx:encode(Body), ContentType). diff --git a/samples/client/petstore/lua/petstore/api/user_api.lua b/samples/client/petstore/lua/petstore/api/user_api.lua index 16a037608ab5..57ecdce822b0 100644 --- a/samples/client/petstore/lua/petstore/api/user_api.lua +++ b/samples/client/petstore/lua/petstore/api/user_api.lua @@ -61,6 +61,10 @@ function user_api:create_user(user) req:set_body(dkjson.encode(user)) + -- api key in headers 'api_key' + if self.api_key['api_key'] then + req.headers:upsert("api_key", self.api_key['api_key']) + end -- make the HTTP call local headers, stream, errno = req:go() @@ -98,6 +102,10 @@ function user_api:create_users_with_array_input(user) req:set_body(dkjson.encode(user)) + -- api key in headers 'api_key' + if self.api_key['api_key'] then + req.headers:upsert("api_key", self.api_key['api_key']) + end -- make the HTTP call local headers, stream, errno = req:go() @@ -135,6 +143,10 @@ function user_api:create_users_with_list_input(user) req:set_body(dkjson.encode(user)) + -- api key in headers 'api_key' + if self.api_key['api_key'] then + req.headers:upsert("api_key", self.api_key['api_key']) + end -- make the HTTP call local headers, stream, errno = req:go() @@ -166,6 +178,10 @@ function user_api:delete_user(username) -- set HTTP verb req.headers:upsert(":method", "DELETE") + -- api key in headers 'api_key' + if self.api_key['api_key'] then + req.headers:upsert("api_key", self.api_key['api_key']) + end -- make the HTTP call local headers, stream, errno = req:go() @@ -289,6 +305,10 @@ function user_api:logout_user() -- set HTTP verb req.headers:upsert(":method", "GET") + -- api key in headers 'api_key' + if self.api_key['api_key'] then + req.headers:upsert("api_key", self.api_key['api_key']) + end -- make the HTTP call local headers, stream, errno = req:go() @@ -326,6 +346,10 @@ function user_api:update_user(username, user) req:set_body(dkjson.encode(user)) + -- api key in headers 'api_key' + if self.api_key['api_key'] then + req.headers:upsert("api_key", self.api_key['api_key']) + end -- make the HTTP call local headers, stream, errno = req:go() diff --git a/samples/client/petstore/swift4/.gitignore b/samples/client/petstore/swift4/.gitignore deleted file mode 100644 index 5e5d5cebcf47..000000000000 --- a/samples/client/petstore/swift4/.gitignore +++ /dev/null @@ -1,63 +0,0 @@ -# Xcode -# -# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore - -## Build generated -build/ -DerivedData - -## Various settings -*.pbxuser -!default.pbxuser -*.mode1v3 -!default.mode1v3 -*.mode2v3 -!default.mode2v3 -*.perspectivev3 -!default.perspectivev3 -xcuserdata - -## Other -*.xccheckout -*.moved-aside -*.xcuserstate -*.xcscmblueprint - -## Obj-C/Swift specific -*.hmap -*.ipa - -## Playgrounds -timeline.xctimeline -playground.xcworkspace - -# Swift Package Manager -# -# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. -# Packages/ -.build/ - -# CocoaPods -# -# We recommend against adding the Pods directory to your .gitignore. However -# you should judge for yourself, the pros and cons are mentioned at: -# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control -# -# Pods/ - -# Carthage -# -# Add this line if you want to avoid checking in source code from Carthage dependencies. -# Carthage/Checkouts - -Carthage/Build - -# fastlane -# -# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the -# screenshots whenever they are needed. -# For more information about the recommended setup visit: -# https://github.com/fastlane/fastlane/blob/master/docs/Gitignore.md - -fastlane/report.xml -fastlane/screenshots diff --git a/samples/client/petstore/swift4/default/.gitignore b/samples/client/petstore/swift4/default/.gitignore deleted file mode 100644 index 5e5d5cebcf47..000000000000 --- a/samples/client/petstore/swift4/default/.gitignore +++ /dev/null @@ -1,63 +0,0 @@ -# Xcode -# -# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore - -## Build generated -build/ -DerivedData - -## Various settings -*.pbxuser -!default.pbxuser -*.mode1v3 -!default.mode1v3 -*.mode2v3 -!default.mode2v3 -*.perspectivev3 -!default.perspectivev3 -xcuserdata - -## Other -*.xccheckout -*.moved-aside -*.xcuserstate -*.xcscmblueprint - -## Obj-C/Swift specific -*.hmap -*.ipa - -## Playgrounds -timeline.xctimeline -playground.xcworkspace - -# Swift Package Manager -# -# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. -# Packages/ -.build/ - -# CocoaPods -# -# We recommend against adding the Pods directory to your .gitignore. However -# you should judge for yourself, the pros and cons are mentioned at: -# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control -# -# Pods/ - -# Carthage -# -# Add this line if you want to avoid checking in source code from Carthage dependencies. -# Carthage/Checkouts - -Carthage/Build - -# fastlane -# -# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the -# screenshots whenever they are needed. -# For more information about the recommended setup visit: -# https://github.com/fastlane/fastlane/blob/master/docs/Gitignore.md - -fastlane/report.xml -fastlane/screenshots diff --git a/samples/client/petstore/swift4/default/.openapi-generator/VERSION b/samples/client/petstore/swift4/default/.openapi-generator/VERSION deleted file mode 100644 index b5d898602c2c..000000000000 --- a/samples/client/petstore/swift4/default/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -4.3.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/swift4/default/Cartfile b/samples/client/petstore/swift4/default/Cartfile deleted file mode 100644 index 86748c63d90d..000000000000 --- a/samples/client/petstore/swift4/default/Cartfile +++ /dev/null @@ -1 +0,0 @@ -github "Alamofire/Alamofire" ~> 4.9.0 diff --git a/samples/client/petstore/swift4/default/Info.plist b/samples/client/petstore/swift4/default/Info.plist deleted file mode 100644 index 323e5ecfc420..000000000000 --- a/samples/client/petstore/swift4/default/Info.plist +++ /dev/null @@ -1,22 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.0 - CFBundleVersion - 1 - - diff --git a/samples/client/petstore/swift4/default/Package.resolved b/samples/client/petstore/swift4/default/Package.resolved deleted file mode 100644 index ca6137050ebc..000000000000 --- a/samples/client/petstore/swift4/default/Package.resolved +++ /dev/null @@ -1,16 +0,0 @@ -{ - "object": { - "pins": [ - { - "package": "Alamofire", - "repositoryURL": "https://github.com/Alamofire/Alamofire.git", - "state": { - "branch": null, - "revision": "747c8db8d57b68d5e35275f10c92d55f982adbd4", - "version": "4.9.1" - } - } - ] - }, - "version": 1 -} diff --git a/samples/client/petstore/swift4/default/Package.swift b/samples/client/petstore/swift4/default/Package.swift deleted file mode 100644 index e5c5f0f33b82..000000000000 --- a/samples/client/petstore/swift4/default/Package.swift +++ /dev/null @@ -1,27 +0,0 @@ -// swift-tools-version:4.2 -// The swift-tools-version declares the minimum version of Swift required to build this package. - -import PackageDescription - -let package = Package( - name: "PetstoreClient", - products: [ - // Products define the executables and libraries produced by a package, and make them visible to other packages. - .library( - name: "PetstoreClient", - targets: ["PetstoreClient"]) - ], - dependencies: [ - // Dependencies declare other packages that this package depends on. - .package(url: "https://github.com/Alamofire/Alamofire.git", from: "4.9.0") - ], - targets: [ - // Targets are the basic building blocks of a package. A target can define a module or a test suite. - // Targets can depend on other targets in this package, and on products in packages which this package depends on. - .target( - name: "PetstoreClient", - dependencies: ["Alamofire"], - path: "PetstoreClient/Classes" - ) - ] -) diff --git a/samples/client/petstore/swift4/default/PetstoreClient.podspec b/samples/client/petstore/swift4/default/PetstoreClient.podspec deleted file mode 100644 index a6c9a1f3d45e..000000000000 --- a/samples/client/petstore/swift4/default/PetstoreClient.podspec +++ /dev/null @@ -1,14 +0,0 @@ -Pod::Spec.new do |s| - s.name = 'PetstoreClient' - s.ios.deployment_target = '9.0' - s.osx.deployment_target = '10.11' - s.tvos.deployment_target = '9.0' - s.version = '1.0.0' - s.source = { :git => 'git@github.com:OpenAPITools/openapi-generator.git', :tag => 'v1.0.0' } - s.authors = '' - s.license = 'Proprietary' - s.homepage = 'https://github.com/openapitools/openapi-generator' - s.summary = 'PetstoreClient' - s.source_files = 'PetstoreClient/Classes/**/*.swift' - s.dependency 'Alamofire', '~> 4.9.0' -end diff --git a/samples/client/petstore/swift4/default/PetstoreClient.xcodeproj/project.pbxproj b/samples/client/petstore/swift4/default/PetstoreClient.xcodeproj/project.pbxproj deleted file mode 100644 index b606fe1ab100..000000000000 --- a/samples/client/petstore/swift4/default/PetstoreClient.xcodeproj/project.pbxproj +++ /dev/null @@ -1,576 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 51; - objects = { - -/* Begin PBXBuildFile section */ - 0299339D13C3571C4C57368A /* ApiResponse.swift in Sources */ = {isa = PBXBuildFile; fileRef = A8E7B833748B4F0C7CDA90C6 /* ApiResponse.swift */; }; - 081C0B80A989B1AAF2665121 /* MapTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7986861626C2B1CB49AD7000 /* MapTest.swift */; }; - 0C1E4C682F2D0AF7D9E431EE /* Dog.swift in Sources */ = {isa = PBXBuildFile; fileRef = C6C3E1129526A353B963EFD7 /* Dog.swift */; }; - 0E6932F1C55BA6880693C478 /* Order.swift in Sources */ = {isa = PBXBuildFile; fileRef = 27B2E9EF856E89FEAA359A3A /* Order.swift */; }; - 1E6C7C7F271A802DF8099330 /* APIHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 897716962D472FE162B723CB /* APIHelper.swift */; }; - 22FA6CA58E58550DE36AE750 /* JSONEncodableEncoding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9791B840B8D6EAA35343B00F /* JSONEncodableEncoding.swift */; }; - 248F2F0F29E8FDAE9CAD64C5 /* AdditionalPropertiesClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 396DEF3156BA0D12D0FC5C3C /* AdditionalPropertiesClass.swift */; }; - 269E3103C458C78EA5726EE2 /* Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = B8C298FC8929DCB369053F11 /* Extensions.swift */; }; - 294CDFA409BC369C0FDC5FB3 /* SpecialModelName.swift in Sources */ = {isa = PBXBuildFile; fileRef = 386FD590658E90509C121118 /* SpecialModelName.swift */; }; - 2B441CDFFFDDB343C04F5375 /* Animal.swift in Sources */ = {isa = PBXBuildFile; fileRef = 95568E7C35F119EB4A12B498 /* Animal.swift */; }; - 2C29D5B60E00DDA3878F1BDE /* Pet.swift in Sources */ = {isa = PBXBuildFile; fileRef = ECFEB4C6C257B3BB3CEA36D1 /* Pet.swift */; }; - 31DFF71D8CCCA0D2D2F8AC90 /* User.swift in Sources */ = {isa = PBXBuildFile; fileRef = E5565A447062C7B8F695F451 /* User.swift */; }; - 34C26979F4678B5B579D26E8 /* FakeClassnameTags123API.swift in Sources */ = {isa = PBXBuildFile; fileRef = B42354B407EC173BEB54E042 /* FakeClassnameTags123API.swift */; }; - 3691B017D3AA18404A563C67 /* ArrayOfNumberOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = B65BB72353DA24536A9049BE /* ArrayOfNumberOnly.swift */; }; - 37DEADD6CD0496690725B8A7 /* Name.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5AD994DFAA0DA93C188A4DBA /* Name.swift */; }; - 40E3027D2E38D8329C6AB01F /* APIs.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37DF825B8F3BADA2B2537D17 /* APIs.swift */; }; - 40E46046D2B16D1A672A08E3 /* AlamofireImplementations.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84A201508DF2B697D65F2631 /* AlamofireImplementations.swift */; }; - 418DB36F23C53C6E2C3CDE39 /* Alamofire.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A235FA3FDFB086CC69CDE83D /* Alamofire.framework */; }; - 41A491E9B577C510F927D126 /* OuterEnum.swift in Sources */ = {isa = PBXBuildFile; fileRef = C15008AABC804EB6FB4CDAC6 /* OuterEnum.swift */; }; - 45B3B29D7A62049F824751F8 /* AnimalFarm.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8D22BE01748F51106DE02332 /* AnimalFarm.swift */; }; - 4A344DF7ECE721B4BBEDCB4A /* CatAllOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AD0F94F512DFBC09F9CC79A /* CatAllOf.swift */; }; - 4B4BE77747413A9188CDABD2 /* ArrayOfArrayOfNumberOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B1B8B838B5D9D312F2002EB /* ArrayOfArrayOfNumberOnly.swift */; }; - 555DEA47352B42E49082922B /* NumberOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = B8E0B16084741FCB82389F58 /* NumberOnly.swift */; }; - 5695497F5DBF6C08842755A3 /* TypeHolderDefault.swift in Sources */ = {isa = PBXBuildFile; fileRef = EBC76F6D4D2AA8084B7EB50E /* TypeHolderDefault.swift */; }; - 61322FC4325F1A4FF24ACA48 /* EnumArrays.swift in Sources */ = {isa = PBXBuildFile; fileRef = 10503995D9EFD031A2EFB576 /* EnumArrays.swift */; }; - 64C48E3658CF53EBE8AF82F9 /* UserAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7C8D5F382979854D47F18DB1 /* UserAPI.swift */; }; - 6B638A04B34C82B2091D6EDD /* FormatTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3156CE41C001C80379B84BDB /* FormatTest.swift */; }; - 6FBD978F4D1ED92E7071FFBB /* CodableHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 02A6F6BB2152ACEE1416D44A /* CodableHelper.swift */; }; - 72547ECFB451A509409311EE /* Configuration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 28A444949BBC254798C3B3DD /* Configuration.swift */; }; - 72CE544C52BB33778D1B89B8 /* DogAllOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = A21A69C8402A60E01116ABBD /* DogAllOf.swift */; }; - 7441BBA84C31E06400338F89 /* ClassModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3C30827D8EAF8EA684E7BCEA /* ClassModel.swift */; }; - 7588B7E2960253174ADCCF16 /* JSONEncodingHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 35D710108A69DD8A5297F926 /* JSONEncodingHelper.swift */; }; - 86DE714469BE8BA28AFF710F /* HasOnlyReadOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C7FBC641752D2E13B150973 /* HasOnlyReadOnly.swift */; }; - 914F4D1FCB17773C067C4E68 /* ReadOnlyFirst.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6FD42727E001E799E458C292 /* ReadOnlyFirst.swift */; }; - 922BDADAB291907A7FD14314 /* OuterComposite.swift in Sources */ = {isa = PBXBuildFile; fileRef = F4E0AD8F60A91F72C7687560 /* OuterComposite.swift */; }; - 97F7B85BF07A325EEBF92C93 /* File.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3933D3B2A3AC4577094D0C23 /* File.swift */; }; - 9CA19AA4483F6EB50270A81E /* List.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A6070F581E611FF44AFD40A /* List.swift */; }; - 9CF06ACDA32CB0C3E74E435C /* Model200Response.swift in Sources */ = {isa = PBXBuildFile; fileRef = 82A2C3DC2235F0114C2B08E5 /* Model200Response.swift */; }; - 9DA1C6F8B4D6C8595F28C098 /* EnumTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = FD60AEA646791E0EDE885DE1 /* EnumTest.swift */; }; - A6E50CC6845FE58D8C236253 /* Return.swift in Sources */ = {isa = PBXBuildFile; fileRef = C81447828475F76C5CF4F08A /* Return.swift */; }; - A6E5A5629495DB0ED672B06F /* PetAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A019F500E546A3292CE716A /* PetAPI.swift */; }; - A85E190556818FFA79896E92 /* ArrayTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = F1A0379CDFC55705AE76C998 /* ArrayTest.swift */; }; - ACF3037926301D4D6E848745 /* EnumClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B2C97AE6ACA1E5FB88F5BAA /* EnumClass.swift */; }; - AD594BFB99E31A5E07579237 /* Client.swift in Sources */ = {isa = PBXBuildFile; fileRef = A913A57E72D723632E9A718F /* Client.swift */; }; - B301DB1B80F37C757550AA17 /* MixedPropertiesAndAdditionalPropertiesClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9AD714C7CC59BDD18DE8DF4E /* MixedPropertiesAndAdditionalPropertiesClass.swift */; }; - B3E35FE2773D4A8BA15CFA88 /* Tag.swift in Sources */ = {isa = PBXBuildFile; fileRef = B2896F8BFD1AA2965C8A3015 /* Tag.swift */; }; - BB1F3C6D50B8F0A8CC4F1749 /* Capitalization.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7B38FA00A494D13F4C382A3 /* Capitalization.swift */; }; - CA9B9B19882EA044EAD0B359 /* AnotherFakeAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9DF24D2714B9C4CF14146E88 /* AnotherFakeAPI.swift */; }; - CB68ABDBAADAF6B8D7B93A5D /* StoreAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = A53274D99BBDE1B79BF3521C /* StoreAPI.swift */; }; - D3BAB7C7A607392CA838C580 /* Models.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8699F7966F748ED026A6FB4C /* Models.swift */; }; - D95A5F83AAA7D5C95A29AB83 /* Cat.swift in Sources */ = {isa = PBXBuildFile; fileRef = 212AA914B7F1793A4E32C119 /* Cat.swift */; }; - DDBD4C0FBA3CD6A4DA3DF376 /* FakeAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6E00950725DC44436C5E238C /* FakeAPI.swift */; }; - DDF1D589267D56D9BED3C6E5 /* FileSchemaTestClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B3666552AA854DAF9C480A3 /* FileSchemaTestClass.swift */; }; - E8A58C6414E88AF3EAE45B69 /* Category.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F2985D01F8D60A4B1925C69 /* Category.swift */; }; - EDFC6C5121A43997014049CB /* StringBooleanMap.swift in Sources */ = {isa = PBXBuildFile; fileRef = 47B4DEBABEFE140768CFB70B /* StringBooleanMap.swift */; }; - FECA2E8C9D0BDFEC459E8996 /* TypeHolderExample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19B65C66C97F082718DDD703 /* TypeHolderExample.swift */; }; -/* End PBXBuildFile section */ - -/* Begin PBXFileReference section */ - 02A6F6BB2152ACEE1416D44A /* CodableHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CodableHelper.swift; sourceTree = ""; }; - 10503995D9EFD031A2EFB576 /* EnumArrays.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EnumArrays.swift; sourceTree = ""; }; - 164AD6EC9C4CCF634D7C4590 /* PetstoreClient.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = PetstoreClient.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 19B65C66C97F082718DDD703 /* TypeHolderExample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TypeHolderExample.swift; sourceTree = ""; }; - 212AA914B7F1793A4E32C119 /* Cat.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Cat.swift; sourceTree = ""; }; - 27B2E9EF856E89FEAA359A3A /* Order.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Order.swift; sourceTree = ""; }; - 28A444949BBC254798C3B3DD /* Configuration.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Configuration.swift; sourceTree = ""; }; - 3156CE41C001C80379B84BDB /* FormatTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FormatTest.swift; sourceTree = ""; }; - 35D710108A69DD8A5297F926 /* JSONEncodingHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JSONEncodingHelper.swift; sourceTree = ""; }; - 37DF825B8F3BADA2B2537D17 /* APIs.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = APIs.swift; sourceTree = ""; }; - 386FD590658E90509C121118 /* SpecialModelName.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SpecialModelName.swift; sourceTree = ""; }; - 3933D3B2A3AC4577094D0C23 /* File.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = File.swift; sourceTree = ""; }; - 396DEF3156BA0D12D0FC5C3C /* AdditionalPropertiesClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdditionalPropertiesClass.swift; sourceTree = ""; }; - 3AD0F94F512DFBC09F9CC79A /* CatAllOf.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CatAllOf.swift; sourceTree = ""; }; - 3C30827D8EAF8EA684E7BCEA /* ClassModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ClassModel.swift; sourceTree = ""; }; - 47B4DEBABEFE140768CFB70B /* StringBooleanMap.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StringBooleanMap.swift; sourceTree = ""; }; - 4B2C97AE6ACA1E5FB88F5BAA /* EnumClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EnumClass.swift; sourceTree = ""; }; - 4B3666552AA854DAF9C480A3 /* FileSchemaTestClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FileSchemaTestClass.swift; sourceTree = ""; }; - 4C7FBC641752D2E13B150973 /* HasOnlyReadOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HasOnlyReadOnly.swift; sourceTree = ""; }; - 5AD994DFAA0DA93C188A4DBA /* Name.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Name.swift; sourceTree = ""; }; - 6E00950725DC44436C5E238C /* FakeAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FakeAPI.swift; sourceTree = ""; }; - 6F2985D01F8D60A4B1925C69 /* Category.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Category.swift; sourceTree = ""; }; - 6FD42727E001E799E458C292 /* ReadOnlyFirst.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReadOnlyFirst.swift; sourceTree = ""; }; - 7986861626C2B1CB49AD7000 /* MapTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MapTest.swift; sourceTree = ""; }; - 7A6070F581E611FF44AFD40A /* List.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = List.swift; sourceTree = ""; }; - 7B1B8B838B5D9D312F2002EB /* ArrayOfArrayOfNumberOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArrayOfArrayOfNumberOnly.swift; sourceTree = ""; }; - 7C8D5F382979854D47F18DB1 /* UserAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserAPI.swift; sourceTree = ""; }; - 82A2C3DC2235F0114C2B08E5 /* Model200Response.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Model200Response.swift; sourceTree = ""; }; - 84A201508DF2B697D65F2631 /* AlamofireImplementations.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlamofireImplementations.swift; sourceTree = ""; }; - 8699F7966F748ED026A6FB4C /* Models.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Models.swift; sourceTree = ""; }; - 897716962D472FE162B723CB /* APIHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = APIHelper.swift; sourceTree = ""; }; - 8D22BE01748F51106DE02332 /* AnimalFarm.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnimalFarm.swift; sourceTree = ""; }; - 95568E7C35F119EB4A12B498 /* Animal.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Animal.swift; sourceTree = ""; }; - 9791B840B8D6EAA35343B00F /* JSONEncodableEncoding.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JSONEncodableEncoding.swift; sourceTree = ""; }; - 9A019F500E546A3292CE716A /* PetAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PetAPI.swift; sourceTree = ""; }; - 9AD714C7CC59BDD18DE8DF4E /* MixedPropertiesAndAdditionalPropertiesClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MixedPropertiesAndAdditionalPropertiesClass.swift; sourceTree = ""; }; - 9DF24D2714B9C4CF14146E88 /* AnotherFakeAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnotherFakeAPI.swift; sourceTree = ""; }; - A21A69C8402A60E01116ABBD /* DogAllOf.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DogAllOf.swift; sourceTree = ""; }; - A235FA3FDFB086CC69CDE83D /* Alamofire.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Alamofire.framework; sourceTree = ""; }; - A53274D99BBDE1B79BF3521C /* StoreAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StoreAPI.swift; sourceTree = ""; }; - A7B38FA00A494D13F4C382A3 /* Capitalization.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Capitalization.swift; sourceTree = ""; }; - A8E7B833748B4F0C7CDA90C6 /* ApiResponse.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ApiResponse.swift; sourceTree = ""; }; - A913A57E72D723632E9A718F /* Client.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Client.swift; sourceTree = ""; }; - B2896F8BFD1AA2965C8A3015 /* Tag.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Tag.swift; sourceTree = ""; }; - B42354B407EC173BEB54E042 /* FakeClassnameTags123API.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FakeClassnameTags123API.swift; sourceTree = ""; }; - B65BB72353DA24536A9049BE /* ArrayOfNumberOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArrayOfNumberOnly.swift; sourceTree = ""; }; - B8C298FC8929DCB369053F11 /* Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Extensions.swift; sourceTree = ""; }; - B8E0B16084741FCB82389F58 /* NumberOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NumberOnly.swift; sourceTree = ""; }; - C15008AABC804EB6FB4CDAC6 /* OuterEnum.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OuterEnum.swift; sourceTree = ""; }; - C6C3E1129526A353B963EFD7 /* Dog.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Dog.swift; sourceTree = ""; }; - C81447828475F76C5CF4F08A /* Return.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Return.swift; sourceTree = ""; }; - E5565A447062C7B8F695F451 /* User.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = User.swift; sourceTree = ""; }; - EBC76F6D4D2AA8084B7EB50E /* TypeHolderDefault.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TypeHolderDefault.swift; sourceTree = ""; }; - ECFEB4C6C257B3BB3CEA36D1 /* Pet.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Pet.swift; sourceTree = ""; }; - F1A0379CDFC55705AE76C998 /* ArrayTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArrayTest.swift; sourceTree = ""; }; - F4E0AD8F60A91F72C7687560 /* OuterComposite.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OuterComposite.swift; sourceTree = ""; }; - FD60AEA646791E0EDE885DE1 /* EnumTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EnumTest.swift; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - D1990C2A394CCF025EF98A2F /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 418DB36F23C53C6E2C3CDE39 /* Alamofire.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 1E464C0937FE0D3A7A0FE29A /* Frameworks */ = { - isa = PBXGroup; - children = ( - 7861EE241895128F64DD7873 /* Carthage */, - ); - name = Frameworks; - sourceTree = ""; - }; - 4FBDCF1330A9AB9122780DB3 /* Models */ = { - isa = PBXGroup; - children = ( - 396DEF3156BA0D12D0FC5C3C /* AdditionalPropertiesClass.swift */, - 95568E7C35F119EB4A12B498 /* Animal.swift */, - 8D22BE01748F51106DE02332 /* AnimalFarm.swift */, - A8E7B833748B4F0C7CDA90C6 /* ApiResponse.swift */, - 7B1B8B838B5D9D312F2002EB /* ArrayOfArrayOfNumberOnly.swift */, - B65BB72353DA24536A9049BE /* ArrayOfNumberOnly.swift */, - F1A0379CDFC55705AE76C998 /* ArrayTest.swift */, - A7B38FA00A494D13F4C382A3 /* Capitalization.swift */, - 212AA914B7F1793A4E32C119 /* Cat.swift */, - 3AD0F94F512DFBC09F9CC79A /* CatAllOf.swift */, - 6F2985D01F8D60A4B1925C69 /* Category.swift */, - 3C30827D8EAF8EA684E7BCEA /* ClassModel.swift */, - A913A57E72D723632E9A718F /* Client.swift */, - C6C3E1129526A353B963EFD7 /* Dog.swift */, - A21A69C8402A60E01116ABBD /* DogAllOf.swift */, - 10503995D9EFD031A2EFB576 /* EnumArrays.swift */, - 4B2C97AE6ACA1E5FB88F5BAA /* EnumClass.swift */, - FD60AEA646791E0EDE885DE1 /* EnumTest.swift */, - 3933D3B2A3AC4577094D0C23 /* File.swift */, - 4B3666552AA854DAF9C480A3 /* FileSchemaTestClass.swift */, - 3156CE41C001C80379B84BDB /* FormatTest.swift */, - 4C7FBC641752D2E13B150973 /* HasOnlyReadOnly.swift */, - 7A6070F581E611FF44AFD40A /* List.swift */, - 7986861626C2B1CB49AD7000 /* MapTest.swift */, - 9AD714C7CC59BDD18DE8DF4E /* MixedPropertiesAndAdditionalPropertiesClass.swift */, - 82A2C3DC2235F0114C2B08E5 /* Model200Response.swift */, - 5AD994DFAA0DA93C188A4DBA /* Name.swift */, - B8E0B16084741FCB82389F58 /* NumberOnly.swift */, - 27B2E9EF856E89FEAA359A3A /* Order.swift */, - F4E0AD8F60A91F72C7687560 /* OuterComposite.swift */, - C15008AABC804EB6FB4CDAC6 /* OuterEnum.swift */, - ECFEB4C6C257B3BB3CEA36D1 /* Pet.swift */, - 6FD42727E001E799E458C292 /* ReadOnlyFirst.swift */, - C81447828475F76C5CF4F08A /* Return.swift */, - 386FD590658E90509C121118 /* SpecialModelName.swift */, - 47B4DEBABEFE140768CFB70B /* StringBooleanMap.swift */, - B2896F8BFD1AA2965C8A3015 /* Tag.swift */, - EBC76F6D4D2AA8084B7EB50E /* TypeHolderDefault.swift */, - 19B65C66C97F082718DDD703 /* TypeHolderExample.swift */, - E5565A447062C7B8F695F451 /* User.swift */, - ); - path = Models; - sourceTree = ""; - }; - 5FBA6AE5F64CD737F88B4565 = { - isa = PBXGroup; - children = ( - 9B364C01750D7AA4F983B9E7 /* PetstoreClient */, - 1E464C0937FE0D3A7A0FE29A /* Frameworks */, - 857F0DEA1890CE66D6DAD556 /* Products */, - ); - sourceTree = ""; - }; - 67BF3478113E6B4DF1C4E04F /* OpenAPIs */ = { - isa = PBXGroup; - children = ( - 84A201508DF2B697D65F2631 /* AlamofireImplementations.swift */, - 897716962D472FE162B723CB /* APIHelper.swift */, - 37DF825B8F3BADA2B2537D17 /* APIs.swift */, - 02A6F6BB2152ACEE1416D44A /* CodableHelper.swift */, - 28A444949BBC254798C3B3DD /* Configuration.swift */, - B8C298FC8929DCB369053F11 /* Extensions.swift */, - 9791B840B8D6EAA35343B00F /* JSONEncodableEncoding.swift */, - 35D710108A69DD8A5297F926 /* JSONEncodingHelper.swift */, - 8699F7966F748ED026A6FB4C /* Models.swift */, - F956D0CCAE23BCFD1C7BDD5D /* APIs */, - 4FBDCF1330A9AB9122780DB3 /* Models */, - ); - path = OpenAPIs; - sourceTree = ""; - }; - 7861EE241895128F64DD7873 /* Carthage */ = { - isa = PBXGroup; - children = ( - A012205B41CB71A62B86EECD /* iOS */, - ); - name = Carthage; - path = Carthage/Build; - sourceTree = ""; - }; - 857F0DEA1890CE66D6DAD556 /* Products */ = { - isa = PBXGroup; - children = ( - 164AD6EC9C4CCF634D7C4590 /* PetstoreClient.framework */, - ); - name = Products; - sourceTree = ""; - }; - 9B364C01750D7AA4F983B9E7 /* PetstoreClient */ = { - isa = PBXGroup; - children = ( - EF4C81BDD734856ED5023B77 /* Classes */, - ); - path = PetstoreClient; - sourceTree = ""; - }; - A012205B41CB71A62B86EECD /* iOS */ = { - isa = PBXGroup; - children = ( - A235FA3FDFB086CC69CDE83D /* Alamofire.framework */, - ); - path = iOS; - sourceTree = ""; - }; - EF4C81BDD734856ED5023B77 /* Classes */ = { - isa = PBXGroup; - children = ( - 67BF3478113E6B4DF1C4E04F /* OpenAPIs */, - ); - path = Classes; - sourceTree = ""; - }; - F956D0CCAE23BCFD1C7BDD5D /* APIs */ = { - isa = PBXGroup; - children = ( - 9DF24D2714B9C4CF14146E88 /* AnotherFakeAPI.swift */, - 6E00950725DC44436C5E238C /* FakeAPI.swift */, - B42354B407EC173BEB54E042 /* FakeClassnameTags123API.swift */, - 9A019F500E546A3292CE716A /* PetAPI.swift */, - A53274D99BBDE1B79BF3521C /* StoreAPI.swift */, - 7C8D5F382979854D47F18DB1 /* UserAPI.swift */, - ); - path = APIs; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - C1282C2230015E0D204BEAED /* PetstoreClient */ = { - isa = PBXNativeTarget; - buildConfigurationList = B46EDEB1A7F0D78FE6394544 /* Build configuration list for PBXNativeTarget "PetstoreClient" */; - buildPhases = ( - E539708354CE60FE486F81ED /* Sources */, - D1990C2A394CCF025EF98A2F /* Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = PetstoreClient; - productName = PetstoreClient; - productReference = 164AD6EC9C4CCF634D7C4590 /* PetstoreClient.framework */; - productType = "com.apple.product-type.framework"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - E7D276EE2369D8C455513C2E /* Project object */ = { - isa = PBXProject; - attributes = { - LastUpgradeCheck = 1020; - }; - buildConfigurationList = ECAB17FF35111B5E14DAAC08 /* Build configuration list for PBXProject "PetstoreClient" */; - compatibilityVersion = "Xcode 10.0"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - Base, - en, - ); - mainGroup = 5FBA6AE5F64CD737F88B4565; - projectDirPath = ""; - projectRoot = ""; - targets = ( - C1282C2230015E0D204BEAED /* PetstoreClient */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXSourcesBuildPhase section */ - E539708354CE60FE486F81ED /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 1E6C7C7F271A802DF8099330 /* APIHelper.swift in Sources */, - 40E3027D2E38D8329C6AB01F /* APIs.swift in Sources */, - 248F2F0F29E8FDAE9CAD64C5 /* AdditionalPropertiesClass.swift in Sources */, - 40E46046D2B16D1A672A08E3 /* AlamofireImplementations.swift in Sources */, - 2B441CDFFFDDB343C04F5375 /* Animal.swift in Sources */, - 45B3B29D7A62049F824751F8 /* AnimalFarm.swift in Sources */, - CA9B9B19882EA044EAD0B359 /* AnotherFakeAPI.swift in Sources */, - 0299339D13C3571C4C57368A /* ApiResponse.swift in Sources */, - 4B4BE77747413A9188CDABD2 /* ArrayOfArrayOfNumberOnly.swift in Sources */, - 3691B017D3AA18404A563C67 /* ArrayOfNumberOnly.swift in Sources */, - A85E190556818FFA79896E92 /* ArrayTest.swift in Sources */, - BB1F3C6D50B8F0A8CC4F1749 /* Capitalization.swift in Sources */, - D95A5F83AAA7D5C95A29AB83 /* Cat.swift in Sources */, - 4A344DF7ECE721B4BBEDCB4A /* CatAllOf.swift in Sources */, - E8A58C6414E88AF3EAE45B69 /* Category.swift in Sources */, - 7441BBA84C31E06400338F89 /* ClassModel.swift in Sources */, - AD594BFB99E31A5E07579237 /* Client.swift in Sources */, - 6FBD978F4D1ED92E7071FFBB /* CodableHelper.swift in Sources */, - 72547ECFB451A509409311EE /* Configuration.swift in Sources */, - 0C1E4C682F2D0AF7D9E431EE /* Dog.swift in Sources */, - 72CE544C52BB33778D1B89B8 /* DogAllOf.swift in Sources */, - 61322FC4325F1A4FF24ACA48 /* EnumArrays.swift in Sources */, - ACF3037926301D4D6E848745 /* EnumClass.swift in Sources */, - 9DA1C6F8B4D6C8595F28C098 /* EnumTest.swift in Sources */, - 269E3103C458C78EA5726EE2 /* Extensions.swift in Sources */, - DDBD4C0FBA3CD6A4DA3DF376 /* FakeAPI.swift in Sources */, - 34C26979F4678B5B579D26E8 /* FakeClassnameTags123API.swift in Sources */, - 97F7B85BF07A325EEBF92C93 /* File.swift in Sources */, - DDF1D589267D56D9BED3C6E5 /* FileSchemaTestClass.swift in Sources */, - 6B638A04B34C82B2091D6EDD /* FormatTest.swift in Sources */, - 86DE714469BE8BA28AFF710F /* HasOnlyReadOnly.swift in Sources */, - 22FA6CA58E58550DE36AE750 /* JSONEncodableEncoding.swift in Sources */, - 7588B7E2960253174ADCCF16 /* JSONEncodingHelper.swift in Sources */, - 9CA19AA4483F6EB50270A81E /* List.swift in Sources */, - 081C0B80A989B1AAF2665121 /* MapTest.swift in Sources */, - B301DB1B80F37C757550AA17 /* MixedPropertiesAndAdditionalPropertiesClass.swift in Sources */, - 9CF06ACDA32CB0C3E74E435C /* Model200Response.swift in Sources */, - D3BAB7C7A607392CA838C580 /* Models.swift in Sources */, - 37DEADD6CD0496690725B8A7 /* Name.swift in Sources */, - 555DEA47352B42E49082922B /* NumberOnly.swift in Sources */, - 0E6932F1C55BA6880693C478 /* Order.swift in Sources */, - 922BDADAB291907A7FD14314 /* OuterComposite.swift in Sources */, - 41A491E9B577C510F927D126 /* OuterEnum.swift in Sources */, - 2C29D5B60E00DDA3878F1BDE /* Pet.swift in Sources */, - A6E5A5629495DB0ED672B06F /* PetAPI.swift in Sources */, - 914F4D1FCB17773C067C4E68 /* ReadOnlyFirst.swift in Sources */, - A6E50CC6845FE58D8C236253 /* Return.swift in Sources */, - 294CDFA409BC369C0FDC5FB3 /* SpecialModelName.swift in Sources */, - CB68ABDBAADAF6B8D7B93A5D /* StoreAPI.swift in Sources */, - EDFC6C5121A43997014049CB /* StringBooleanMap.swift in Sources */, - B3E35FE2773D4A8BA15CFA88 /* Tag.swift in Sources */, - 5695497F5DBF6C08842755A3 /* TypeHolderDefault.swift in Sources */, - FECA2E8C9D0BDFEC459E8996 /* TypeHolderExample.swift in Sources */, - 31DFF71D8CCCA0D2D2F8AC90 /* User.swift in Sources */, - 64C48E3658CF53EBE8AF82F9 /* UserAPI.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin XCBuildConfiguration section */ - 3B2C02AFB91CB5C82766ED5C /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - APPLICATION_EXTENSION_API_ONLY = YES; - CODE_SIGN_IDENTITY = ""; - CURRENT_PROJECT_VERSION = 1; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Carthage/Build/iOS", - ); - INFOPLIST_FILE = Info.plist; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Release; - }; - A9EB0A02B94C427CBACFEC7C /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "$(inherited)", - "DEBUG=1", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = iphoneos; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 5.0; - }; - name = Debug; - }; - DD3EEB93949E9EBA4437E9CD /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - APPLICATION_EXTENSION_API_ONLY = YES; - CODE_SIGN_IDENTITY = ""; - CURRENT_PROJECT_VERSION = 1; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Carthage/Build/iOS", - ); - INFOPLIST_FILE = Info.plist; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Debug; - }; - F81D4E5FECD46E9AA6DD2C29 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = iphoneos; - SWIFT_COMPILATION_MODE = wholemodule; - SWIFT_VERSION = 5.0; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - B46EDEB1A7F0D78FE6394544 /* Build configuration list for PBXNativeTarget "PetstoreClient" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - DD3EEB93949E9EBA4437E9CD /* Debug */, - 3B2C02AFB91CB5C82766ED5C /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = ""; - }; - ECAB17FF35111B5E14DAAC08 /* Build configuration list for PBXProject "PetstoreClient" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - A9EB0A02B94C427CBACFEC7C /* Debug */, - F81D4E5FECD46E9AA6DD2C29 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Debug; - }; -/* End XCConfigurationList section */ - }; - rootObject = E7D276EE2369D8C455513C2E /* Project object */; -} diff --git a/samples/client/petstore/swift4/default/PetstoreClient.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/samples/client/petstore/swift4/default/PetstoreClient.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 919434a6254f..000000000000 --- a/samples/client/petstore/swift4/default/PetstoreClient.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/samples/client/petstore/swift4/default/PetstoreClient.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/samples/client/petstore/swift4/default/PetstoreClient.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d981003d68..000000000000 --- a/samples/client/petstore/swift4/default/PetstoreClient.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/samples/client/petstore/swift4/default/PetstoreClient.xcodeproj/xcshareddata/xcschemes/PetstoreClient.xcscheme b/samples/client/petstore/swift4/default/PetstoreClient.xcodeproj/xcshareddata/xcschemes/PetstoreClient.xcscheme deleted file mode 100644 index 26d510552bb0..000000000000 --- a/samples/client/petstore/swift4/default/PetstoreClient.xcodeproj/xcshareddata/xcschemes/PetstoreClient.xcscheme +++ /dev/null @@ -1,99 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/APIHelper.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/APIHelper.swift deleted file mode 100644 index 200070096800..000000000000 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/APIHelper.swift +++ /dev/null @@ -1,70 +0,0 @@ -// APIHelper.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct APIHelper { - public static func rejectNil(_ source: [String: Any?]) -> [String: Any]? { - let destination = source.reduce(into: [String: Any]()) { (result, item) in - if let value = item.value { - result[item.key] = value - } - } - - if destination.isEmpty { - return nil - } - return destination - } - - public static func rejectNilHeaders(_ source: [String: Any?]) -> [String: String] { - return source.reduce(into: [String: String]()) { (result, item) in - if let collection = item.value as? [Any?] { - result[item.key] = collection.filter({ $0 != nil }).map { "\($0!)" }.joined(separator: ",") - } else if let value: Any = item.value { - result[item.key] = "\(value)" - } - } - } - - public static func convertBoolToString(_ source: [String: Any]?) -> [String: Any]? { - guard let source = source else { - return nil - } - - return source.reduce(into: [String: Any](), { (result, item) in - switch item.value { - case let x as Bool: - result[item.key] = x.description - default: - result[item.key] = item.value - } - }) - } - - public static func mapValueToPathItem(_ source: Any) -> Any { - if let collection = source as? [Any?] { - return collection.filter({ $0 != nil }).map({"\($0!)"}).joined(separator: ",") - } - return source - } - - public static func mapValuesToQueryItems(_ source: [String: Any?]) -> [URLQueryItem]? { - let destination = source.filter({ $0.value != nil}).reduce(into: [URLQueryItem]()) { (result, item) in - if let collection = item.value as? [Any?] { - let value = collection.filter({ $0 != nil }).map({"\($0!)"}).joined(separator: ",") - result.append(URLQueryItem(name: item.key, value: value)) - } else if let value = item.value { - result.append(URLQueryItem(name: item.key, value: "\(value)")) - } - } - - if destination.isEmpty { - return nil - } - return destination - } -} diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/APIs.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/APIs.swift deleted file mode 100644 index 832282d224f8..000000000000 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/APIs.swift +++ /dev/null @@ -1,62 +0,0 @@ -// APIs.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -open class PetstoreClientAPI { - public static var basePath = "http://petstore.swagger.io:80/v2" - public static var credential: URLCredential? - public static var customHeaders: [String: String] = [:] - public static var requestBuilderFactory: RequestBuilderFactory = AlamofireRequestBuilderFactory() - public static var apiResponseQueue: DispatchQueue = .main -} - -open class RequestBuilder { - var credential: URLCredential? - var headers: [String: String] - public let parameters: [String: Any]? - public let isBody: Bool - public let method: String - public let URLString: String - - /// Optional block to obtain a reference to the request's progress instance when available. - public var onProgressReady: ((Progress) -> Void)? - - required public init(method: String, URLString: String, parameters: [String: Any]?, isBody: Bool, headers: [String: String] = [:]) { - self.method = method - self.URLString = URLString - self.parameters = parameters - self.isBody = isBody - self.headers = headers - - addHeaders(PetstoreClientAPI.customHeaders) - } - - open func addHeaders(_ aHeaders: [String: String]) { - for (header, value) in aHeaders { - headers[header] = value - } - } - - open func execute(_ completion: @escaping (_ response: Response?, _ error: Error?) -> Void) { } - - public func addHeader(name: String, value: String) -> Self { - if !value.isEmpty { - headers[name] = value - } - return self - } - - open func addCredential() -> Self { - self.credential = PetstoreClientAPI.credential - return self - } -} - -public protocol RequestBuilderFactory { - func getNonDecodableBuilder() -> RequestBuilder.Type - func getBuilder() -> RequestBuilder.Type -} diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift deleted file mode 100644 index 02e24286e3c8..000000000000 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift +++ /dev/null @@ -1,42 +0,0 @@ -// -// AnotherFakeAPI.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -open class AnotherFakeAPI { - /** - To test special tags - - - parameter body: (body) client model - - parameter completion: completion handler to receive the data and the error objects - */ - open class func call123testSpecialTags(body: Client, completion: @escaping ((_ data: Client?, _ error: Error?) -> Void)) { - call123testSpecialTagsWithRequestBuilder(body: body).execute { (response, error) -> Void in - completion(response?.body, error) - } - } - - /** - To test special tags - - PATCH /another-fake/dummy - - To test special tags and operation ID starting with number - - parameter body: (body) client model - - returns: RequestBuilder - */ - open class func call123testSpecialTagsWithRequestBuilder(body: Client) -> RequestBuilder { - let path = "/another-fake/dummy" - let URLString = PetstoreClientAPI.basePath + path - let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "PATCH", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) - } - -} diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift deleted file mode 100644 index 8f5d7550f0c8..000000000000 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift +++ /dev/null @@ -1,575 +0,0 @@ -// -// FakeAPI.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -open class FakeAPI { - /** - - - parameter body: (body) Input boolean as post body (optional) - - parameter completion: completion handler to receive the data and the error objects - */ - open class func fakeOuterBooleanSerialize(body: Bool? = nil, completion: @escaping ((_ data: Bool?, _ error: Error?) -> Void)) { - fakeOuterBooleanSerializeWithRequestBuilder(body: body).execute { (response, error) -> Void in - completion(response?.body, error) - } - } - - /** - - POST /fake/outer/boolean - - Test serialization of outer boolean types - - parameter body: (body) Input boolean as post body (optional) - - returns: RequestBuilder - */ - open class func fakeOuterBooleanSerializeWithRequestBuilder(body: Bool? = nil) -> RequestBuilder { - let path = "/fake/outer/boolean" - let URLString = PetstoreClientAPI.basePath + path - let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) - } - - /** - - - parameter body: (body) Input composite as post body (optional) - - parameter completion: completion handler to receive the data and the error objects - */ - open class func fakeOuterCompositeSerialize(body: OuterComposite? = nil, completion: @escaping ((_ data: OuterComposite?, _ error: Error?) -> Void)) { - fakeOuterCompositeSerializeWithRequestBuilder(body: body).execute { (response, error) -> Void in - completion(response?.body, error) - } - } - - /** - - POST /fake/outer/composite - - Test serialization of object with outer number type - - parameter body: (body) Input composite as post body (optional) - - returns: RequestBuilder - */ - open class func fakeOuterCompositeSerializeWithRequestBuilder(body: OuterComposite? = nil) -> RequestBuilder { - let path = "/fake/outer/composite" - let URLString = PetstoreClientAPI.basePath + path - let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) - } - - /** - - - parameter body: (body) Input number as post body (optional) - - parameter completion: completion handler to receive the data and the error objects - */ - open class func fakeOuterNumberSerialize(body: Double? = nil, completion: @escaping ((_ data: Double?, _ error: Error?) -> Void)) { - fakeOuterNumberSerializeWithRequestBuilder(body: body).execute { (response, error) -> Void in - completion(response?.body, error) - } - } - - /** - - POST /fake/outer/number - - Test serialization of outer number types - - parameter body: (body) Input number as post body (optional) - - returns: RequestBuilder - */ - open class func fakeOuterNumberSerializeWithRequestBuilder(body: Double? = nil) -> RequestBuilder { - let path = "/fake/outer/number" - let URLString = PetstoreClientAPI.basePath + path - let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) - } - - /** - - - parameter body: (body) Input string as post body (optional) - - parameter completion: completion handler to receive the data and the error objects - */ - open class func fakeOuterStringSerialize(body: String? = nil, completion: @escaping ((_ data: String?, _ error: Error?) -> Void)) { - fakeOuterStringSerializeWithRequestBuilder(body: body).execute { (response, error) -> Void in - completion(response?.body, error) - } - } - - /** - - POST /fake/outer/string - - Test serialization of outer string types - - parameter body: (body) Input string as post body (optional) - - returns: RequestBuilder - */ - open class func fakeOuterStringSerializeWithRequestBuilder(body: String? = nil) -> RequestBuilder { - let path = "/fake/outer/string" - let URLString = PetstoreClientAPI.basePath + path - let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) - } - - /** - - - parameter body: (body) - - parameter completion: completion handler to receive the data and the error objects - */ - open class func testBodyWithFileSchema(body: FileSchemaTestClass, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - testBodyWithFileSchemaWithRequestBuilder(body: body).execute { (_, error) -> Void in - if error == nil { - completion((), error) - } else { - completion(nil, error) - } - } - } - - /** - - PUT /fake/body-with-file-schema - - For this test, the body for this request much reference a schema named `File`. - - parameter body: (body) - - returns: RequestBuilder - */ - open class func testBodyWithFileSchemaWithRequestBuilder(body: FileSchemaTestClass) -> RequestBuilder { - let path = "/fake/body-with-file-schema" - let URLString = PetstoreClientAPI.basePath + path - let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) - } - - /** - - - parameter query: (query) - - parameter body: (body) - - parameter completion: completion handler to receive the data and the error objects - */ - open class func testBodyWithQueryParams(query: String, body: User, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - testBodyWithQueryParamsWithRequestBuilder(query: query, body: body).execute { (_, error) -> Void in - if error == nil { - completion((), error) - } else { - completion(nil, error) - } - } - } - - /** - - PUT /fake/body-with-query-params - - parameter query: (query) - - parameter body: (body) - - returns: RequestBuilder - */ - open class func testBodyWithQueryParamsWithRequestBuilder(query: String, body: User) -> RequestBuilder { - let path = "/fake/body-with-query-params" - let URLString = PetstoreClientAPI.basePath + path - let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) - - var url = URLComponents(string: URLString) - url?.queryItems = APIHelper.mapValuesToQueryItems([ - "query": query.encodeToJSON() - ]) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) - } - - /** - To test \"client\" model - - - parameter body: (body) client model - - parameter completion: completion handler to receive the data and the error objects - */ - open class func testClientModel(body: Client, completion: @escaping ((_ data: Client?, _ error: Error?) -> Void)) { - testClientModelWithRequestBuilder(body: body).execute { (response, error) -> Void in - completion(response?.body, error) - } - } - - /** - To test \"client\" model - - PATCH /fake - - To test \"client\" model - - parameter body: (body) client model - - returns: RequestBuilder - */ - open class func testClientModelWithRequestBuilder(body: Client) -> RequestBuilder { - let path = "/fake" - let URLString = PetstoreClientAPI.basePath + path - let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "PATCH", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) - } - - /** - Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - - - parameter number: (form) None - - parameter double: (form) None - - parameter patternWithoutDelimiter: (form) None - - parameter byte: (form) None - - parameter integer: (form) None (optional) - - parameter int32: (form) None (optional) - - parameter int64: (form) None (optional) - - parameter float: (form) None (optional) - - parameter string: (form) None (optional) - - parameter binary: (form) None (optional) - - parameter date: (form) None (optional) - - parameter dateTime: (form) None (optional) - - parameter password: (form) None (optional) - - parameter callback: (form) None (optional) - - parameter completion: completion handler to receive the data and the error objects - */ - open class func testEndpointParameters(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - testEndpointParametersWithRequestBuilder(number: number, double: double, patternWithoutDelimiter: patternWithoutDelimiter, byte: byte, integer: integer, int32: int32, int64: int64, float: float, string: string, binary: binary, date: date, dateTime: dateTime, password: password, callback: callback).execute { (_, error) -> Void in - if error == nil { - completion((), error) - } else { - completion(nil, error) - } - } - } - - /** - Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - - POST /fake - - Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - - BASIC: - - type: http - - name: http_basic_test - - parameter number: (form) None - - parameter double: (form) None - - parameter patternWithoutDelimiter: (form) None - - parameter byte: (form) None - - parameter integer: (form) None (optional) - - parameter int32: (form) None (optional) - - parameter int64: (form) None (optional) - - parameter float: (form) None (optional) - - parameter string: (form) None (optional) - - parameter binary: (form) None (optional) - - parameter date: (form) None (optional) - - parameter dateTime: (form) None (optional) - - parameter password: (form) None (optional) - - parameter callback: (form) None (optional) - - returns: RequestBuilder - */ - open class func testEndpointParametersWithRequestBuilder(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil) -> RequestBuilder { - let path = "/fake" - let URLString = PetstoreClientAPI.basePath + path - let formParams: [String: Any?] = [ - "integer": integer?.encodeToJSON(), - "int32": int32?.encodeToJSON(), - "int64": int64?.encodeToJSON(), - "number": number.encodeToJSON(), - "float": float?.encodeToJSON(), - "double": double.encodeToJSON(), - "string": string?.encodeToJSON(), - "pattern_without_delimiter": patternWithoutDelimiter.encodeToJSON(), - "byte": byte.encodeToJSON(), - "binary": binary?.encodeToJSON(), - "date": date?.encodeToJSON(), - "dateTime": dateTime?.encodeToJSON(), - "password": password?.encodeToJSON(), - "callback": callback?.encodeToJSON() - ] - - let nonNullParameters = APIHelper.rejectNil(formParams) - let parameters = APIHelper.convertBoolToString(nonNullParameters) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } - - /** - * enum for parameter enumHeaderStringArray - */ - public enum EnumHeaderStringArray_testEnumParameters: String { - case greaterThan = ">" - case dollar = "$" - } - - /** - * enum for parameter enumHeaderString - */ - public enum EnumHeaderString_testEnumParameters: String { - case abc = "_abc" - case efg = "-efg" - case xyz = "(xyz)" - } - - /** - * enum for parameter enumQueryStringArray - */ - public enum EnumQueryStringArray_testEnumParameters: String { - case greaterThan = ">" - case dollar = "$" - } - - /** - * enum for parameter enumQueryString - */ - public enum EnumQueryString_testEnumParameters: String { - case abc = "_abc" - case efg = "-efg" - case xyz = "(xyz)" - } - - /** - * enum for parameter enumQueryInteger - */ - public enum EnumQueryInteger_testEnumParameters: Int { - case _1 = 1 - case number2 = -2 - } - - /** - * enum for parameter enumQueryDouble - */ - public enum EnumQueryDouble_testEnumParameters: Double { - case _11 = 1.1 - case number12 = -1.2 - } - - /** - * enum for parameter enumFormStringArray - */ - public enum EnumFormStringArray_testEnumParameters: String { - case greaterThan = ">" - case dollar = "$" - } - - /** - * enum for parameter enumFormString - */ - public enum EnumFormString_testEnumParameters: String { - case abc = "_abc" - case efg = "-efg" - case xyz = "(xyz)" - } - - /** - To test enum parameters - - - parameter enumHeaderStringArray: (header) Header parameter enum test (string array) (optional) - - parameter enumHeaderString: (header) Header parameter enum test (string) (optional, default to .efg) - - parameter enumQueryStringArray: (query) Query parameter enum test (string array) (optional) - - parameter enumQueryString: (query) Query parameter enum test (string) (optional, default to .efg) - - parameter enumQueryInteger: (query) Query parameter enum test (double) (optional) - - parameter enumQueryDouble: (query) Query parameter enum test (double) (optional) - - parameter enumFormStringArray: (form) Form parameter enum test (string array) (optional, default to .dollar) - - parameter enumFormString: (form) Form parameter enum test (string) (optional, default to .efg) - - parameter completion: completion handler to receive the data and the error objects - */ - open class func testEnumParameters(enumHeaderStringArray: [String]? = nil, enumHeaderString: EnumHeaderString_testEnumParameters? = nil, enumQueryStringArray: [String]? = nil, enumQueryString: EnumQueryString_testEnumParameters? = nil, enumQueryInteger: EnumQueryInteger_testEnumParameters? = nil, enumQueryDouble: EnumQueryDouble_testEnumParameters? = nil, enumFormStringArray: [String]? = nil, enumFormString: EnumFormString_testEnumParameters? = nil, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - testEnumParametersWithRequestBuilder(enumHeaderStringArray: enumHeaderStringArray, enumHeaderString: enumHeaderString, enumQueryStringArray: enumQueryStringArray, enumQueryString: enumQueryString, enumQueryInteger: enumQueryInteger, enumQueryDouble: enumQueryDouble, enumFormStringArray: enumFormStringArray, enumFormString: enumFormString).execute { (_, error) -> Void in - if error == nil { - completion((), error) - } else { - completion(nil, error) - } - } - } - - /** - To test enum parameters - - GET /fake - - To test enum parameters - - parameter enumHeaderStringArray: (header) Header parameter enum test (string array) (optional) - - parameter enumHeaderString: (header) Header parameter enum test (string) (optional, default to .efg) - - parameter enumQueryStringArray: (query) Query parameter enum test (string array) (optional) - - parameter enumQueryString: (query) Query parameter enum test (string) (optional, default to .efg) - - parameter enumQueryInteger: (query) Query parameter enum test (double) (optional) - - parameter enumQueryDouble: (query) Query parameter enum test (double) (optional) - - parameter enumFormStringArray: (form) Form parameter enum test (string array) (optional, default to .dollar) - - parameter enumFormString: (form) Form parameter enum test (string) (optional, default to .efg) - - returns: RequestBuilder - */ - open class func testEnumParametersWithRequestBuilder(enumHeaderStringArray: [String]? = nil, enumHeaderString: EnumHeaderString_testEnumParameters? = nil, enumQueryStringArray: [String]? = nil, enumQueryString: EnumQueryString_testEnumParameters? = nil, enumQueryInteger: EnumQueryInteger_testEnumParameters? = nil, enumQueryDouble: EnumQueryDouble_testEnumParameters? = nil, enumFormStringArray: [String]? = nil, enumFormString: EnumFormString_testEnumParameters? = nil) -> RequestBuilder { - let path = "/fake" - let URLString = PetstoreClientAPI.basePath + path - let formParams: [String: Any?] = [ - "enum_form_string_array": enumFormStringArray?.encodeToJSON(), - "enum_form_string": enumFormString?.encodeToJSON() - ] - - let nonNullParameters = APIHelper.rejectNil(formParams) - let parameters = APIHelper.convertBoolToString(nonNullParameters) - - var url = URLComponents(string: URLString) - url?.queryItems = APIHelper.mapValuesToQueryItems([ - "enum_query_string_array": enumQueryStringArray?.encodeToJSON(), - "enum_query_string": enumQueryString?.encodeToJSON(), - "enum_query_integer": enumQueryInteger?.encodeToJSON(), - "enum_query_double": enumQueryDouble?.encodeToJSON() - ]) - let nillableHeaders: [String: Any?] = [ - "enum_header_string_array": enumHeaderStringArray?.encodeToJSON(), - "enum_header_string": enumHeaderString?.encodeToJSON() - ] - let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false, headers: headerParameters) - } - - /** - Fake endpoint to test group parameters (optional) - - - parameter requiredStringGroup: (query) Required String in group parameters - - parameter requiredBooleanGroup: (header) Required Boolean in group parameters - - parameter requiredInt64Group: (query) Required Integer in group parameters - - parameter stringGroup: (query) String in group parameters (optional) - - parameter booleanGroup: (header) Boolean in group parameters (optional) - - parameter int64Group: (query) Integer in group parameters (optional) - - parameter completion: completion handler to receive the data and the error objects - */ - open class func testGroupParameters(requiredStringGroup: Int, requiredBooleanGroup: Bool, requiredInt64Group: Int64, stringGroup: Int? = nil, booleanGroup: Bool? = nil, int64Group: Int64? = nil, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - testGroupParametersWithRequestBuilder(requiredStringGroup: requiredStringGroup, requiredBooleanGroup: requiredBooleanGroup, requiredInt64Group: requiredInt64Group, stringGroup: stringGroup, booleanGroup: booleanGroup, int64Group: int64Group).execute { (_, error) -> Void in - if error == nil { - completion((), error) - } else { - completion(nil, error) - } - } - } - - /** - Fake endpoint to test group parameters (optional) - - DELETE /fake - - Fake endpoint to test group parameters (optional) - - parameter requiredStringGroup: (query) Required String in group parameters - - parameter requiredBooleanGroup: (header) Required Boolean in group parameters - - parameter requiredInt64Group: (query) Required Integer in group parameters - - parameter stringGroup: (query) String in group parameters (optional) - - parameter booleanGroup: (header) Boolean in group parameters (optional) - - parameter int64Group: (query) Integer in group parameters (optional) - - returns: RequestBuilder - */ - open class func testGroupParametersWithRequestBuilder(requiredStringGroup: Int, requiredBooleanGroup: Bool, requiredInt64Group: Int64, stringGroup: Int? = nil, booleanGroup: Bool? = nil, int64Group: Int64? = nil) -> RequestBuilder { - let path = "/fake" - let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - - var url = URLComponents(string: URLString) - url?.queryItems = APIHelper.mapValuesToQueryItems([ - "required_string_group": requiredStringGroup.encodeToJSON(), - "required_int64_group": requiredInt64Group.encodeToJSON(), - "string_group": stringGroup?.encodeToJSON(), - "int64_group": int64Group?.encodeToJSON() - ]) - let nillableHeaders: [String: Any?] = [ - "required_boolean_group": requiredBooleanGroup.encodeToJSON(), - "boolean_group": booleanGroup?.encodeToJSON() - ] - let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false, headers: headerParameters) - } - - /** - test inline additionalProperties - - - parameter param: (body) request body - - parameter completion: completion handler to receive the data and the error objects - */ - open class func testInlineAdditionalProperties(param: [String: String], completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - testInlineAdditionalPropertiesWithRequestBuilder(param: param).execute { (_, error) -> Void in - if error == nil { - completion((), error) - } else { - completion(nil, error) - } - } - } - - /** - test inline additionalProperties - - POST /fake/inline-additionalProperties - - parameter param: (body) request body - - returns: RequestBuilder - */ - open class func testInlineAdditionalPropertiesWithRequestBuilder(param: [String: String]) -> RequestBuilder { - let path = "/fake/inline-additionalProperties" - let URLString = PetstoreClientAPI.basePath + path - let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: param) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) - } - - /** - test json serialization of form data - - - parameter param: (form) field1 - - parameter param2: (form) field2 - - parameter completion: completion handler to receive the data and the error objects - */ - open class func testJsonFormData(param: String, param2: String, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - testJsonFormDataWithRequestBuilder(param: param, param2: param2).execute { (_, error) -> Void in - if error == nil { - completion((), error) - } else { - completion(nil, error) - } - } - } - - /** - test json serialization of form data - - GET /fake/jsonFormData - - parameter param: (form) field1 - - parameter param2: (form) field2 - - returns: RequestBuilder - */ - open class func testJsonFormDataWithRequestBuilder(param: String, param2: String) -> RequestBuilder { - let path = "/fake/jsonFormData" - let URLString = PetstoreClientAPI.basePath + path - let formParams: [String: Any?] = [ - "param": param.encodeToJSON(), - "param2": param2.encodeToJSON() - ] - - let nonNullParameters = APIHelper.rejectNil(formParams) - let parameters = APIHelper.convertBoolToString(nonNullParameters) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } - -} diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift deleted file mode 100644 index 060d434fbf24..000000000000 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift +++ /dev/null @@ -1,45 +0,0 @@ -// -// FakeClassnameTags123API.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -open class FakeClassnameTags123API { - /** - To test class name in snake case - - - parameter body: (body) client model - - parameter completion: completion handler to receive the data and the error objects - */ - open class func testClassname(body: Client, completion: @escaping ((_ data: Client?, _ error: Error?) -> Void)) { - testClassnameWithRequestBuilder(body: body).execute { (response, error) -> Void in - completion(response?.body, error) - } - } - - /** - To test class name in snake case - - PATCH /fake_classname_test - - To test class name in snake case - - API Key: - - type: apiKey api_key_query (QUERY) - - name: api_key_query - - parameter body: (body) client model - - returns: RequestBuilder - */ - open class func testClassnameWithRequestBuilder(body: Client) -> RequestBuilder { - let path = "/fake_classname_test" - let URLString = PetstoreClientAPI.basePath + path - let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "PATCH", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) - } - -} diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift deleted file mode 100644 index fe75962a72cf..000000000000 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift +++ /dev/null @@ -1,393 +0,0 @@ -// -// PetAPI.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -open class PetAPI { - /** - Add a new pet to the store - - - parameter body: (body) Pet object that needs to be added to the store - - parameter completion: completion handler to receive the data and the error objects - */ - open class func addPet(body: Pet, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - addPetWithRequestBuilder(body: body).execute { (_, error) -> Void in - if error == nil { - completion((), error) - } else { - completion(nil, error) - } - } - } - - /** - Add a new pet to the store - - POST /pet - - OAuth: - - type: oauth2 - - name: petstore_auth - - parameter body: (body) Pet object that needs to be added to the store - - returns: RequestBuilder - */ - open class func addPetWithRequestBuilder(body: Pet) -> RequestBuilder { - let path = "/pet" - let URLString = PetstoreClientAPI.basePath + path - let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) - } - - /** - Deletes a pet - - - parameter petId: (path) Pet id to delete - - parameter apiKey: (header) (optional) - - parameter completion: completion handler to receive the data and the error objects - */ - open class func deletePet(petId: Int64, apiKey: String? = nil, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - deletePetWithRequestBuilder(petId: petId, apiKey: apiKey).execute { (_, error) -> Void in - if error == nil { - completion((), error) - } else { - completion(nil, error) - } - } - } - - /** - Deletes a pet - - DELETE /pet/{petId} - - OAuth: - - type: oauth2 - - name: petstore_auth - - parameter petId: (path) Pet id to delete - - parameter apiKey: (header) (optional) - - returns: RequestBuilder - */ - open class func deletePetWithRequestBuilder(petId: Int64, apiKey: String? = nil) -> RequestBuilder { - var path = "/pet/{petId}" - let petIdPreEscape = "\(APIHelper.mapValueToPathItem(petId))" - let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{petId}", with: petIdPostEscape, options: .literal, range: nil) - let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - - let url = URLComponents(string: URLString) - let nillableHeaders: [String: Any?] = [ - "api_key": apiKey?.encodeToJSON() - ] - let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false, headers: headerParameters) - } - - /** - * enum for parameter status - */ - public enum Status_findPetsByStatus: String { - case available = "available" - case pending = "pending" - case sold = "sold" - } - - /** - Finds Pets by status - - - parameter status: (query) Status values that need to be considered for filter - - parameter completion: completion handler to receive the data and the error objects - */ - open class func findPetsByStatus(status: [String], completion: @escaping ((_ data: [Pet]?, _ error: Error?) -> Void)) { - findPetsByStatusWithRequestBuilder(status: status).execute { (response, error) -> Void in - completion(response?.body, error) - } - } - - /** - Finds Pets by status - - GET /pet/findByStatus - - Multiple status values can be provided with comma separated strings - - OAuth: - - type: oauth2 - - name: petstore_auth - - parameter status: (query) Status values that need to be considered for filter - - returns: RequestBuilder<[Pet]> - */ - open class func findPetsByStatusWithRequestBuilder(status: [String]) -> RequestBuilder<[Pet]> { - let path = "/pet/findByStatus" - let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - - var url = URLComponents(string: URLString) - url?.queryItems = APIHelper.mapValuesToQueryItems([ - "status": status.encodeToJSON() - ]) - - let requestBuilder: RequestBuilder<[Pet]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } - - /** - Finds Pets by tags - - - parameter tags: (query) Tags to filter by - - parameter completion: completion handler to receive the data and the error objects - */ - open class func findPetsByTags(tags: [String], completion: @escaping ((_ data: [Pet]?, _ error: Error?) -> Void)) { - findPetsByTagsWithRequestBuilder(tags: tags).execute { (response, error) -> Void in - completion(response?.body, error) - } - } - - /** - Finds Pets by tags - - GET /pet/findByTags - - Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. - - OAuth: - - type: oauth2 - - name: petstore_auth - - parameter tags: (query) Tags to filter by - - returns: RequestBuilder<[Pet]> - */ - open class func findPetsByTagsWithRequestBuilder(tags: [String]) -> RequestBuilder<[Pet]> { - let path = "/pet/findByTags" - let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - - var url = URLComponents(string: URLString) - url?.queryItems = APIHelper.mapValuesToQueryItems([ - "tags": tags.encodeToJSON() - ]) - - let requestBuilder: RequestBuilder<[Pet]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } - - /** - Find pet by ID - - - parameter petId: (path) ID of pet to return - - parameter completion: completion handler to receive the data and the error objects - */ - open class func getPetById(petId: Int64, completion: @escaping ((_ data: Pet?, _ error: Error?) -> Void)) { - getPetByIdWithRequestBuilder(petId: petId).execute { (response, error) -> Void in - completion(response?.body, error) - } - } - - /** - Find pet by ID - - GET /pet/{petId} - - Returns a single pet - - API Key: - - type: apiKey api_key - - name: api_key - - parameter petId: (path) ID of pet to return - - returns: RequestBuilder - */ - open class func getPetByIdWithRequestBuilder(petId: Int64) -> RequestBuilder { - var path = "/pet/{petId}" - let petIdPreEscape = "\(APIHelper.mapValueToPathItem(petId))" - let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{petId}", with: petIdPostEscape, options: .literal, range: nil) - let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } - - /** - Update an existing pet - - - parameter body: (body) Pet object that needs to be added to the store - - parameter completion: completion handler to receive the data and the error objects - */ - open class func updatePet(body: Pet, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - updatePetWithRequestBuilder(body: body).execute { (_, error) -> Void in - if error == nil { - completion((), error) - } else { - completion(nil, error) - } - } - } - - /** - Update an existing pet - - PUT /pet - - OAuth: - - type: oauth2 - - name: petstore_auth - - parameter body: (body) Pet object that needs to be added to the store - - returns: RequestBuilder - */ - open class func updatePetWithRequestBuilder(body: Pet) -> RequestBuilder { - let path = "/pet" - let URLString = PetstoreClientAPI.basePath + path - let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) - } - - /** - Updates a pet in the store with form data - - - parameter petId: (path) ID of pet that needs to be updated - - parameter name: (form) Updated name of the pet (optional) - - parameter status: (form) Updated status of the pet (optional) - - parameter completion: completion handler to receive the data and the error objects - */ - open class func updatePetWithForm(petId: Int64, name: String? = nil, status: String? = nil, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - updatePetWithFormWithRequestBuilder(petId: petId, name: name, status: status).execute { (_, error) -> Void in - if error == nil { - completion((), error) - } else { - completion(nil, error) - } - } - } - - /** - Updates a pet in the store with form data - - POST /pet/{petId} - - OAuth: - - type: oauth2 - - name: petstore_auth - - parameter petId: (path) ID of pet that needs to be updated - - parameter name: (form) Updated name of the pet (optional) - - parameter status: (form) Updated status of the pet (optional) - - returns: RequestBuilder - */ - open class func updatePetWithFormWithRequestBuilder(petId: Int64, name: String? = nil, status: String? = nil) -> RequestBuilder { - var path = "/pet/{petId}" - let petIdPreEscape = "\(APIHelper.mapValueToPathItem(petId))" - let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{petId}", with: petIdPostEscape, options: .literal, range: nil) - let URLString = PetstoreClientAPI.basePath + path - let formParams: [String: Any?] = [ - "name": name?.encodeToJSON(), - "status": status?.encodeToJSON() - ] - - let nonNullParameters = APIHelper.rejectNil(formParams) - let parameters = APIHelper.convertBoolToString(nonNullParameters) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } - - /** - uploads an image - - - parameter petId: (path) ID of pet to update - - parameter additionalMetadata: (form) Additional data to pass to server (optional) - - parameter file: (form) file to upload (optional) - - parameter completion: completion handler to receive the data and the error objects - */ - open class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil, completion: @escaping ((_ data: ApiResponse?, _ error: Error?) -> Void)) { - uploadFileWithRequestBuilder(petId: petId, additionalMetadata: additionalMetadata, file: file).execute { (response, error) -> Void in - completion(response?.body, error) - } - } - - /** - uploads an image - - POST /pet/{petId}/uploadImage - - OAuth: - - type: oauth2 - - name: petstore_auth - - parameter petId: (path) ID of pet to update - - parameter additionalMetadata: (form) Additional data to pass to server (optional) - - parameter file: (form) file to upload (optional) - - returns: RequestBuilder - */ - open class func uploadFileWithRequestBuilder(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil) -> RequestBuilder { - var path = "/pet/{petId}/uploadImage" - let petIdPreEscape = "\(APIHelper.mapValueToPathItem(petId))" - let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{petId}", with: petIdPostEscape, options: .literal, range: nil) - let URLString = PetstoreClientAPI.basePath + path - let formParams: [String: Any?] = [ - "additionalMetadata": additionalMetadata?.encodeToJSON(), - "file": file?.encodeToJSON() - ] - - let nonNullParameters = APIHelper.rejectNil(formParams) - let parameters = APIHelper.convertBoolToString(nonNullParameters) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } - - /** - uploads an image (required) - - - parameter petId: (path) ID of pet to update - - parameter requiredFile: (form) file to upload - - parameter additionalMetadata: (form) Additional data to pass to server (optional) - - parameter completion: completion handler to receive the data and the error objects - */ - open class func uploadFileWithRequiredFile(petId: Int64, requiredFile: URL, additionalMetadata: String? = nil, completion: @escaping ((_ data: ApiResponse?, _ error: Error?) -> Void)) { - uploadFileWithRequiredFileWithRequestBuilder(petId: petId, requiredFile: requiredFile, additionalMetadata: additionalMetadata).execute { (response, error) -> Void in - completion(response?.body, error) - } - } - - /** - uploads an image (required) - - POST /fake/{petId}/uploadImageWithRequiredFile - - OAuth: - - type: oauth2 - - name: petstore_auth - - parameter petId: (path) ID of pet to update - - parameter requiredFile: (form) file to upload - - parameter additionalMetadata: (form) Additional data to pass to server (optional) - - returns: RequestBuilder - */ - open class func uploadFileWithRequiredFileWithRequestBuilder(petId: Int64, requiredFile: URL, additionalMetadata: String? = nil) -> RequestBuilder { - var path = "/fake/{petId}/uploadImageWithRequiredFile" - let petIdPreEscape = "\(APIHelper.mapValueToPathItem(petId))" - let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{petId}", with: petIdPostEscape, options: .literal, range: nil) - let URLString = PetstoreClientAPI.basePath + path - let formParams: [String: Any?] = [ - "additionalMetadata": additionalMetadata?.encodeToJSON(), - "requiredFile": requiredFile.encodeToJSON() - ] - - let nonNullParameters = APIHelper.rejectNil(formParams) - let parameters = APIHelper.convertBoolToString(nonNullParameters) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } - -} diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift deleted file mode 100644 index d5f627df52ac..000000000000 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift +++ /dev/null @@ -1,145 +0,0 @@ -// -// StoreAPI.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -open class StoreAPI { - /** - Delete purchase order by ID - - - parameter orderId: (path) ID of the order that needs to be deleted - - parameter completion: completion handler to receive the data and the error objects - */ - open class func deleteOrder(orderId: String, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - deleteOrderWithRequestBuilder(orderId: orderId).execute { (_, error) -> Void in - if error == nil { - completion((), error) - } else { - completion(nil, error) - } - } - } - - /** - Delete purchase order by ID - - DELETE /store/order/{order_id} - - For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors - - parameter orderId: (path) ID of the order that needs to be deleted - - returns: RequestBuilder - */ - open class func deleteOrderWithRequestBuilder(orderId: String) -> RequestBuilder { - var path = "/store/order/{order_id}" - let orderIdPreEscape = "\(APIHelper.mapValueToPathItem(orderId))" - let orderIdPostEscape = orderIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{order_id}", with: orderIdPostEscape, options: .literal, range: nil) - let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } - - /** - Returns pet inventories by status - - - parameter completion: completion handler to receive the data and the error objects - */ - open class func getInventory(completion: @escaping ((_ data: [String: Int]?, _ error: Error?) -> Void)) { - getInventoryWithRequestBuilder().execute { (response, error) -> Void in - completion(response?.body, error) - } - } - - /** - Returns pet inventories by status - - GET /store/inventory - - Returns a map of status codes to quantities - - API Key: - - type: apiKey api_key - - name: api_key - - returns: RequestBuilder<[String:Int]> - */ - open class func getInventoryWithRequestBuilder() -> RequestBuilder<[String: Int]> { - let path = "/store/inventory" - let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder<[String: Int]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } - - /** - Find purchase order by ID - - - parameter orderId: (path) ID of pet that needs to be fetched - - parameter completion: completion handler to receive the data and the error objects - */ - open class func getOrderById(orderId: Int64, completion: @escaping ((_ data: Order?, _ error: Error?) -> Void)) { - getOrderByIdWithRequestBuilder(orderId: orderId).execute { (response, error) -> Void in - completion(response?.body, error) - } - } - - /** - Find purchase order by ID - - GET /store/order/{order_id} - - For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions - - parameter orderId: (path) ID of pet that needs to be fetched - - returns: RequestBuilder - */ - open class func getOrderByIdWithRequestBuilder(orderId: Int64) -> RequestBuilder { - var path = "/store/order/{order_id}" - let orderIdPreEscape = "\(APIHelper.mapValueToPathItem(orderId))" - let orderIdPostEscape = orderIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{order_id}", with: orderIdPostEscape, options: .literal, range: nil) - let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } - - /** - Place an order for a pet - - - parameter body: (body) order placed for purchasing the pet - - parameter completion: completion handler to receive the data and the error objects - */ - open class func placeOrder(body: Order, completion: @escaping ((_ data: Order?, _ error: Error?) -> Void)) { - placeOrderWithRequestBuilder(body: body).execute { (response, error) -> Void in - completion(response?.body, error) - } - } - - /** - Place an order for a pet - - POST /store/order - - parameter body: (body) order placed for purchasing the pet - - returns: RequestBuilder - */ - open class func placeOrderWithRequestBuilder(body: Order) -> RequestBuilder { - let path = "/store/order" - let URLString = PetstoreClientAPI.basePath + path - let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) - } - -} diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift deleted file mode 100644 index ef4f971a91e2..000000000000 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift +++ /dev/null @@ -1,294 +0,0 @@ -// -// UserAPI.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -open class UserAPI { - /** - Create user - - - parameter body: (body) Created user object - - parameter completion: completion handler to receive the data and the error objects - */ - open class func createUser(body: User, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - createUserWithRequestBuilder(body: body).execute { (_, error) -> Void in - if error == nil { - completion((), error) - } else { - completion(nil, error) - } - } - } - - /** - Create user - - POST /user - - This can only be done by the logged in user. - - parameter body: (body) Created user object - - returns: RequestBuilder - */ - open class func createUserWithRequestBuilder(body: User) -> RequestBuilder { - let path = "/user" - let URLString = PetstoreClientAPI.basePath + path - let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) - } - - /** - Creates list of users with given input array - - - parameter body: (body) List of user object - - parameter completion: completion handler to receive the data and the error objects - */ - open class func createUsersWithArrayInput(body: [User], completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - createUsersWithArrayInputWithRequestBuilder(body: body).execute { (_, error) -> Void in - if error == nil { - completion((), error) - } else { - completion(nil, error) - } - } - } - - /** - Creates list of users with given input array - - POST /user/createWithArray - - parameter body: (body) List of user object - - returns: RequestBuilder - */ - open class func createUsersWithArrayInputWithRequestBuilder(body: [User]) -> RequestBuilder { - let path = "/user/createWithArray" - let URLString = PetstoreClientAPI.basePath + path - let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) - } - - /** - Creates list of users with given input array - - - parameter body: (body) List of user object - - parameter completion: completion handler to receive the data and the error objects - */ - open class func createUsersWithListInput(body: [User], completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - createUsersWithListInputWithRequestBuilder(body: body).execute { (_, error) -> Void in - if error == nil { - completion((), error) - } else { - completion(nil, error) - } - } - } - - /** - Creates list of users with given input array - - POST /user/createWithList - - parameter body: (body) List of user object - - returns: RequestBuilder - */ - open class func createUsersWithListInputWithRequestBuilder(body: [User]) -> RequestBuilder { - let path = "/user/createWithList" - let URLString = PetstoreClientAPI.basePath + path - let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) - } - - /** - Delete user - - - parameter username: (path) The name that needs to be deleted - - parameter completion: completion handler to receive the data and the error objects - */ - open class func deleteUser(username: String, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - deleteUserWithRequestBuilder(username: username).execute { (_, error) -> Void in - if error == nil { - completion((), error) - } else { - completion(nil, error) - } - } - } - - /** - Delete user - - DELETE /user/{username} - - This can only be done by the logged in user. - - parameter username: (path) The name that needs to be deleted - - returns: RequestBuilder - */ - open class func deleteUserWithRequestBuilder(username: String) -> RequestBuilder { - var path = "/user/{username}" - let usernamePreEscape = "\(APIHelper.mapValueToPathItem(username))" - let usernamePostEscape = usernamePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{username}", with: usernamePostEscape, options: .literal, range: nil) - let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } - - /** - Get user by user name - - - parameter username: (path) The name that needs to be fetched. Use user1 for testing. - - parameter completion: completion handler to receive the data and the error objects - */ - open class func getUserByName(username: String, completion: @escaping ((_ data: User?, _ error: Error?) -> Void)) { - getUserByNameWithRequestBuilder(username: username).execute { (response, error) -> Void in - completion(response?.body, error) - } - } - - /** - Get user by user name - - GET /user/{username} - - parameter username: (path) The name that needs to be fetched. Use user1 for testing. - - returns: RequestBuilder - */ - open class func getUserByNameWithRequestBuilder(username: String) -> RequestBuilder { - var path = "/user/{username}" - let usernamePreEscape = "\(APIHelper.mapValueToPathItem(username))" - let usernamePostEscape = usernamePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{username}", with: usernamePostEscape, options: .literal, range: nil) - let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } - - /** - Logs user into the system - - - parameter username: (query) The user name for login - - parameter password: (query) The password for login in clear text - - parameter completion: completion handler to receive the data and the error objects - */ - open class func loginUser(username: String, password: String, completion: @escaping ((_ data: String?, _ error: Error?) -> Void)) { - loginUserWithRequestBuilder(username: username, password: password).execute { (response, error) -> Void in - completion(response?.body, error) - } - } - - /** - Logs user into the system - - GET /user/login - - responseHeaders: [X-Rate-Limit(Int), X-Expires-After(Date)] - - parameter username: (query) The user name for login - - parameter password: (query) The password for login in clear text - - returns: RequestBuilder - */ - open class func loginUserWithRequestBuilder(username: String, password: String) -> RequestBuilder { - let path = "/user/login" - let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - - var url = URLComponents(string: URLString) - url?.queryItems = APIHelper.mapValuesToQueryItems([ - "username": username.encodeToJSON(), - "password": password.encodeToJSON() - ]) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } - - /** - Logs out current logged in user session - - - parameter completion: completion handler to receive the data and the error objects - */ - open class func logoutUser(completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - logoutUserWithRequestBuilder().execute { (_, error) -> Void in - if error == nil { - completion((), error) - } else { - completion(nil, error) - } - } - } - - /** - Logs out current logged in user session - - GET /user/logout - - returns: RequestBuilder - */ - open class func logoutUserWithRequestBuilder() -> RequestBuilder { - let path = "/user/logout" - let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } - - /** - Updated user - - - parameter username: (path) name that need to be deleted - - parameter body: (body) Updated user object - - parameter completion: completion handler to receive the data and the error objects - */ - open class func updateUser(username: String, body: User, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - updateUserWithRequestBuilder(username: username, body: body).execute { (_, error) -> Void in - if error == nil { - completion((), error) - } else { - completion(nil, error) - } - } - } - - /** - Updated user - - PUT /user/{username} - - This can only be done by the logged in user. - - parameter username: (path) name that need to be deleted - - parameter body: (body) Updated user object - - returns: RequestBuilder - */ - open class func updateUserWithRequestBuilder(username: String, body: User) -> RequestBuilder { - var path = "/user/{username}" - let usernamePreEscape = "\(APIHelper.mapValueToPathItem(username))" - let usernamePostEscape = usernamePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{username}", with: usernamePostEscape, options: .literal, range: nil) - let URLString = PetstoreClientAPI.basePath + path - let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) - } - -} diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/AlamofireImplementations.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/AlamofireImplementations.swift deleted file mode 100644 index 1d54e695608b..000000000000 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/AlamofireImplementations.swift +++ /dev/null @@ -1,450 +0,0 @@ -// AlamofireImplementations.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -import Alamofire - -class AlamofireRequestBuilderFactory: RequestBuilderFactory { - func getNonDecodableBuilder() -> RequestBuilder.Type { - return AlamofireRequestBuilder.self - } - - func getBuilder() -> RequestBuilder.Type { - return AlamofireDecodableRequestBuilder.self - } -} - -private struct SynchronizedDictionary { - - private var dictionary = [K: V]() - private let queue = DispatchQueue( - label: "SynchronizedDictionary", - qos: DispatchQoS.userInitiated, - attributes: [DispatchQueue.Attributes.concurrent], - autoreleaseFrequency: DispatchQueue.AutoreleaseFrequency.inherit, - target: nil - ) - - public subscript(key: K) -> V? { - get { - var value: V? - - queue.sync { - value = self.dictionary[key] - } - - return value - } - set { - queue.sync(flags: DispatchWorkItemFlags.barrier) { - self.dictionary[key] = newValue - } - } - } - } - -// Store manager to retain its reference -private var managerStore = SynchronizedDictionary() - -open class AlamofireRequestBuilder: RequestBuilder { - required public init(method: String, URLString: String, parameters: [String: Any]?, isBody: Bool, headers: [String: String] = [:]) { - super.init(method: method, URLString: URLString, parameters: parameters, isBody: isBody, headers: headers) - } - - /** - May be overridden by a subclass if you want to control the session - configuration. - */ - open func createSessionManager() -> Alamofire.SessionManager { - let configuration = URLSessionConfiguration.default - configuration.httpAdditionalHeaders = buildHeaders() - return Alamofire.SessionManager(configuration: configuration) - } - - /** - May be overridden by a subclass if you want to custom request constructor. - */ - open func createURLRequest() -> URLRequest? { - let encoding: ParameterEncoding = isBody ? JSONDataEncoding() : URLEncoding() - guard let originalRequest = try? URLRequest(url: URLString, method: HTTPMethod(rawValue: method)!, headers: buildHeaders()) else { return nil } - return try? encoding.encode(originalRequest, with: parameters) - } - - /** - May be overridden by a subclass if you want to control the Content-Type - that is given to an uploaded form part. - - Return nil to use the default behavior (inferring the Content-Type from - the file extension). Return the desired Content-Type otherwise. - */ - open func contentTypeForFormPart(fileURL: URL) -> String? { - return nil - } - - /** - May be overridden by a subclass if you want to control the request - configuration (e.g. to override the cache policy). - */ - open func makeRequest(manager: SessionManager, method: HTTPMethod, encoding: ParameterEncoding, headers: [String: String]) -> DataRequest { - return manager.request(URLString, method: method, parameters: parameters, encoding: encoding, headers: headers) - } - - override open func execute(_ completion: @escaping (_ response: Response?, _ error: Error?) -> Void) { - let managerId: String = UUID().uuidString - // Create a new manager for each request to customize its request header - let manager = createSessionManager() - managerStore[managerId] = manager - - let encoding: ParameterEncoding = isBody ? JSONDataEncoding() : URLEncoding() - - let xMethod = Alamofire.HTTPMethod(rawValue: method) - let fileKeys = parameters == nil ? [] : parameters!.filter { $1 is NSURL } - .map { $0.0 } - - if fileKeys.count > 0 { - manager.upload(multipartFormData: { mpForm in - for (k, v) in self.parameters! { - switch v { - case let fileURL as URL: - if let mimeType = self.contentTypeForFormPart(fileURL: fileURL) { - mpForm.append(fileURL, withName: k, fileName: fileURL.lastPathComponent, mimeType: mimeType) - } else { - mpForm.append(fileURL, withName: k) - } - case let string as String: - mpForm.append(string.data(using: String.Encoding.utf8)!, withName: k) - case let number as NSNumber: - mpForm.append(number.stringValue.data(using: String.Encoding.utf8)!, withName: k) - default: - fatalError("Unprocessable value \(v) with key \(k)") - } - } - }, to: URLString, method: xMethod!, headers: nil, encodingCompletion: { encodingResult in - switch encodingResult { - case .success(let upload, _, _): - if let onProgressReady = self.onProgressReady { - onProgressReady(upload.uploadProgress) - } - self.processRequest(request: upload, managerId, completion) - case .failure(let encodingError): - completion(nil, ErrorResponse.error(415, nil, encodingError)) - } - }) - } else { - let request = makeRequest(manager: manager, method: xMethod!, encoding: encoding, headers: headers) - if let onProgressReady = self.onProgressReady { - onProgressReady(request.progress) - } - processRequest(request: request, managerId, completion) - } - - } - - fileprivate func processRequest(request: DataRequest, _ managerId: String, _ completion: @escaping (_ response: Response?, _ error: Error?) -> Void) { - if let credential = self.credential { - request.authenticate(usingCredential: credential) - } - - let cleanupRequest = { - managerStore[managerId] = nil - } - - let validatedRequest = request.validate() - - switch T.self { - case is String.Type: - validatedRequest.responseString(queue: PetstoreClientAPI.apiResponseQueue, completionHandler: { (stringResponse) in - cleanupRequest() - - if stringResponse.result.isFailure { - completion( - nil, - ErrorResponse.error(stringResponse.response?.statusCode ?? 500, stringResponse.data, stringResponse.result.error!) - ) - return - } - - completion( - Response( - response: stringResponse.response!, - body: ((stringResponse.result.value ?? "") as! T) - ), - nil - ) - }) - case is URL.Type: - validatedRequest.responseData(queue: PetstoreClientAPI.apiResponseQueue, completionHandler: { (dataResponse) in - cleanupRequest() - - do { - - guard !dataResponse.result.isFailure else { - throw DownloadException.responseFailed - } - - guard let data = dataResponse.data else { - throw DownloadException.responseDataMissing - } - - guard let request = request.request else { - throw DownloadException.requestMissing - } - - let fileManager = FileManager.default - let urlRequest = try request.asURLRequest() - let documentsDirectory = fileManager.urls(for: .documentDirectory, in: .userDomainMask)[0] - let requestURL = try self.getURL(from: urlRequest) - - var requestPath = try self.getPath(from: requestURL) - - if let headerFileName = self.getFileName(fromContentDisposition: dataResponse.response?.allHeaderFields["Content-Disposition"] as? String) { - requestPath = requestPath.appending("/\(headerFileName)") - } - - let filePath = documentsDirectory.appendingPathComponent(requestPath) - let directoryPath = filePath.deletingLastPathComponent().path - - try fileManager.createDirectory(atPath: directoryPath, withIntermediateDirectories: true, attributes: nil) - try data.write(to: filePath, options: .atomic) - - completion( - Response( - response: dataResponse.response!, - body: (filePath as! T) - ), - nil - ) - - } catch let requestParserError as DownloadException { - completion(nil, ErrorResponse.error(400, dataResponse.data, requestParserError)) - } catch let error { - completion(nil, ErrorResponse.error(400, dataResponse.data, error)) - } - return - }) - case is Void.Type: - validatedRequest.responseData(queue: PetstoreClientAPI.apiResponseQueue, completionHandler: { (voidResponse) in - cleanupRequest() - - if voidResponse.result.isFailure { - completion( - nil, - ErrorResponse.error(voidResponse.response?.statusCode ?? 500, voidResponse.data, voidResponse.result.error!) - ) - return - } - - completion( - Response( - response: voidResponse.response!, - body: nil), - nil - ) - }) - default: - validatedRequest.responseData(queue: PetstoreClientAPI.apiResponseQueue, completionHandler: { (dataResponse) in - cleanupRequest() - - if dataResponse.result.isFailure { - completion( - nil, - ErrorResponse.error(dataResponse.response?.statusCode ?? 500, dataResponse.data, dataResponse.result.error!) - ) - return - } - - completion( - Response( - response: dataResponse.response!, - body: (dataResponse.data as! T) - ), - nil - ) - }) - } - } - - open func buildHeaders() -> [String: String] { - var httpHeaders = SessionManager.defaultHTTPHeaders - for (key, value) in self.headers { - httpHeaders[key] = value - } - return httpHeaders - } - - fileprivate func getFileName(fromContentDisposition contentDisposition: String?) -> String? { - - guard let contentDisposition = contentDisposition else { - return nil - } - - let items = contentDisposition.components(separatedBy: ";") - - var filename: String? - - for contentItem in items { - - let filenameKey = "filename=" - guard let range = contentItem.range(of: filenameKey) else { - break - } - - filename = contentItem - return filename? - .replacingCharacters(in: range, with: "") - .replacingOccurrences(of: "\"", with: "") - .trimmingCharacters(in: .whitespacesAndNewlines) - } - - return filename - - } - - fileprivate func getPath(from url: URL) throws -> String { - - guard var path = URLComponents(url: url, resolvingAgainstBaseURL: true)?.path else { - throw DownloadException.requestMissingPath - } - - if path.hasPrefix("/") { - path.remove(at: path.startIndex) - } - - return path - - } - - fileprivate func getURL(from urlRequest: URLRequest) throws -> URL { - - guard let url = urlRequest.url else { - throw DownloadException.requestMissingURL - } - - return url - } - -} - -private enum DownloadException: Error { - case responseDataMissing - case responseFailed - case requestMissing - case requestMissingPath - case requestMissingURL -} - -public enum AlamofireDecodableRequestBuilderError: Error { - case emptyDataResponse - case nilHTTPResponse - case jsonDecoding(DecodingError) - case generalError(Error) -} - -open class AlamofireDecodableRequestBuilder: AlamofireRequestBuilder { - - override fileprivate func processRequest(request: DataRequest, _ managerId: String, _ completion: @escaping (_ response: Response?, _ error: Error?) -> Void) { - if let credential = self.credential { - request.authenticate(usingCredential: credential) - } - - let cleanupRequest = { - managerStore[managerId] = nil - } - - let validatedRequest = request.validate() - - switch T.self { - case is String.Type: - validatedRequest.responseString(queue: PetstoreClientAPI.apiResponseQueue, completionHandler: { (stringResponse) in - cleanupRequest() - - if stringResponse.result.isFailure { - completion( - nil, - ErrorResponse.error(stringResponse.response?.statusCode ?? 500, stringResponse.data, stringResponse.result.error!) - ) - return - } - - completion( - Response( - response: stringResponse.response!, - body: ((stringResponse.result.value ?? "") as! T) - ), - nil - ) - }) - case is Void.Type: - validatedRequest.responseData(queue: PetstoreClientAPI.apiResponseQueue, completionHandler: { (voidResponse) in - cleanupRequest() - - if voidResponse.result.isFailure { - completion( - nil, - ErrorResponse.error(voidResponse.response?.statusCode ?? 500, voidResponse.data, voidResponse.result.error!) - ) - return - } - - completion( - Response( - response: voidResponse.response!, - body: nil), - nil - ) - }) - case is Data.Type: - validatedRequest.responseData(queue: PetstoreClientAPI.apiResponseQueue, completionHandler: { (dataResponse) in - cleanupRequest() - - if dataResponse.result.isFailure { - completion( - nil, - ErrorResponse.error(dataResponse.response?.statusCode ?? 500, dataResponse.data, dataResponse.result.error!) - ) - return - } - - completion( - Response( - response: dataResponse.response!, - body: (dataResponse.data as! T) - ), - nil - ) - }) - default: - validatedRequest.responseData(queue: PetstoreClientAPI.apiResponseQueue, completionHandler: { (dataResponse: DataResponse) in - cleanupRequest() - - guard dataResponse.result.isSuccess else { - completion(nil, ErrorResponse.error(dataResponse.response?.statusCode ?? 500, dataResponse.data, dataResponse.result.error!)) - return - } - - guard let data = dataResponse.data, !data.isEmpty else { - completion(nil, ErrorResponse.error(-1, nil, AlamofireDecodableRequestBuilderError.emptyDataResponse)) - return - } - - guard let httpResponse = dataResponse.response else { - completion(nil, ErrorResponse.error(-2, nil, AlamofireDecodableRequestBuilderError.nilHTTPResponse)) - return - } - - var responseObj: Response? - - let decodeResult: (decodableObj: T?, error: Error?) = CodableHelper.decode(T.self, from: data) - if decodeResult.error == nil { - responseObj = Response(response: httpResponse, body: decodeResult.decodableObj) - } - - completion(responseObj, decodeResult.error) - }) - } - } - -} diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/CodableHelper.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/CodableHelper.swift deleted file mode 100644 index 27cf29c65600..000000000000 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/CodableHelper.swift +++ /dev/null @@ -1,75 +0,0 @@ -// -// CodableHelper.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public typealias EncodeResult = (data: Data?, error: Error?) - -open class CodableHelper { - - private static var customDateFormatter: DateFormatter? - private static var defaultDateFormatter: DateFormatter = { - let dateFormatter = DateFormatter() - dateFormatter.calendar = Calendar(identifier: .iso8601) - dateFormatter.locale = Locale(identifier: "en_US_POSIX") - dateFormatter.timeZone = TimeZone(secondsFromGMT: 0) - dateFormatter.dateFormat = Configuration.dateFormat - return dateFormatter - }() - private static var customJSONDecoder: JSONDecoder? - private static var defaultJSONDecoder: JSONDecoder = { - let decoder = JSONDecoder() - decoder.dateDecodingStrategy = .formatted(CodableHelper.dateFormatter) - return decoder - }() - private static var customJSONEncoder: JSONEncoder? - private static var defaultJSONEncoder: JSONEncoder = { - let encoder = JSONEncoder() - encoder.dateEncodingStrategy = .formatted(CodableHelper.dateFormatter) - encoder.outputFormatting = .prettyPrinted - return encoder - }() - - public static var dateFormatter: DateFormatter { - get { return self.customDateFormatter ?? self.defaultDateFormatter } - set { self.customDateFormatter = newValue } - } - public static var jsonDecoder: JSONDecoder { - get { return self.customJSONDecoder ?? self.defaultJSONDecoder } - set { self.customJSONDecoder = newValue } - } - public static var jsonEncoder: JSONEncoder { - get { return self.customJSONEncoder ?? self.defaultJSONEncoder } - set { self.customJSONEncoder = newValue } - } - - open class func decode(_ type: T.Type, from data: Data) -> (decodableObj: T?, error: Error?) where T: Decodable { - var returnedDecodable: T? - var returnedError: Error? - - do { - returnedDecodable = try self.jsonDecoder.decode(type, from: data) - } catch { - returnedError = error - } - - return (returnedDecodable, returnedError) - } - - open class func encode(_ value: T) -> EncodeResult where T: Encodable { - var returnedData: Data? - var returnedError: Error? - - do { - returnedData = try self.jsonEncoder.encode(value) - } catch { - returnedError = error - } - - return (returnedData, returnedError) - } -} diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Configuration.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Configuration.swift deleted file mode 100644 index e1ecb39726e7..000000000000 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Configuration.swift +++ /dev/null @@ -1,15 +0,0 @@ -// Configuration.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -open class Configuration { - - // This value is used to configure the date formatter that is used to serialize dates into JSON format. - // You must set it prior to encoding any dates, and it will only be read once. - public static var dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSZZZZZ" - -} diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Extensions.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Extensions.swift deleted file mode 100644 index 74fcfcf2ad49..000000000000 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Extensions.swift +++ /dev/null @@ -1,173 +0,0 @@ -// Extensions.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -extension Bool: JSONEncodable { - func encodeToJSON() -> Any { return self as Any } -} - -extension Float: JSONEncodable { - func encodeToJSON() -> Any { return self as Any } -} - -extension Int: JSONEncodable { - func encodeToJSON() -> Any { return self as Any } -} - -extension Int32: JSONEncodable { - func encodeToJSON() -> Any { return NSNumber(value: self as Int32) } -} - -extension Int64: JSONEncodable { - func encodeToJSON() -> Any { return NSNumber(value: self as Int64) } -} - -extension Double: JSONEncodable { - func encodeToJSON() -> Any { return self as Any } -} - -extension String: JSONEncodable { - func encodeToJSON() -> Any { return self as Any } -} - -extension RawRepresentable where RawValue: JSONEncodable { - func encodeToJSON() -> Any { return self.rawValue as Any } -} - -private func encodeIfPossible(_ object: T) -> Any { - if let encodableObject = object as? JSONEncodable { - return encodableObject.encodeToJSON() - } else { - return object as Any - } -} - -extension Array: JSONEncodable { - func encodeToJSON() -> Any { - return self.map(encodeIfPossible) - } -} - -extension Dictionary: JSONEncodable { - func encodeToJSON() -> Any { - var dictionary = [AnyHashable: Any]() - for (key, value) in self { - dictionary[key] = encodeIfPossible(value) - } - return dictionary as Any - } -} - -extension Data: JSONEncodable { - func encodeToJSON() -> Any { - return self.base64EncodedString(options: Data.Base64EncodingOptions()) - } -} - -extension Date: JSONEncodable { - func encodeToJSON() -> Any { - return CodableHelper.dateFormatter.string(from: self) as Any - } -} - -extension URL: JSONEncodable { - func encodeToJSON() -> Any { - return self - } -} - -extension UUID: JSONEncodable { - func encodeToJSON() -> Any { - return self.uuidString - } -} - -extension String: CodingKey { - - public var stringValue: String { - return self - } - - public init?(stringValue: String) { - self.init(stringLiteral: stringValue) - } - - public var intValue: Int? { - return nil - } - - public init?(intValue: Int) { - return nil - } - -} - -extension KeyedEncodingContainerProtocol { - - public mutating func encodeArray(_ values: [T], forKey key: Self.Key) throws where T: Encodable { - var arrayContainer = nestedUnkeyedContainer(forKey: key) - try arrayContainer.encode(contentsOf: values) - } - - public mutating func encodeArrayIfPresent(_ values: [T]?, forKey key: Self.Key) throws where T: Encodable { - if let values = values { - try encodeArray(values, forKey: key) - } - } - - public mutating func encodeMap(_ pairs: [Self.Key: T]) throws where T: Encodable { - for (key, value) in pairs { - try encode(value, forKey: key) - } - } - - public mutating func encodeMapIfPresent(_ pairs: [Self.Key: T]?) throws where T: Encodable { - if let pairs = pairs { - try encodeMap(pairs) - } - } - -} - -extension KeyedDecodingContainerProtocol { - - public func decodeArray(_ type: T.Type, forKey key: Self.Key) throws -> [T] where T: Decodable { - var tmpArray = [T]() - - var nestedContainer = try nestedUnkeyedContainer(forKey: key) - while !nestedContainer.isAtEnd { - let arrayValue = try nestedContainer.decode(T.self) - tmpArray.append(arrayValue) - } - - return tmpArray - } - - public func decodeArrayIfPresent(_ type: T.Type, forKey key: Self.Key) throws -> [T]? where T: Decodable { - var tmpArray: [T]? - - if contains(key) { - tmpArray = try decodeArray(T.self, forKey: key) - } - - return tmpArray - } - - public func decodeMap(_ type: T.Type, excludedKeys: Set) throws -> [Self.Key: T] where T: Decodable { - var map: [Self.Key: T] = [:] - - for key in allKeys { - if !excludedKeys.contains(key) { - let value = try decode(T.self, forKey: key) - map[key] = value - } - } - - return map - } - -} diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/JSONEncodableEncoding.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/JSONEncodableEncoding.swift deleted file mode 100644 index fb76bbed26f7..000000000000 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/JSONEncodableEncoding.swift +++ /dev/null @@ -1,54 +0,0 @@ -// -// JSONDataEncoding.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -import Alamofire - -public struct JSONDataEncoding: ParameterEncoding { - - // MARK: Properties - - private static let jsonDataKey = "jsonData" - - // MARK: Encoding - - /// Creates a URL request by encoding parameters and applying them onto an existing request. - /// - /// - parameter urlRequest: The request to have parameters applied. - /// - parameter parameters: The parameters to apply. This should have a single key/value - /// pair with "jsonData" as the key and a Data object as the value. - /// - /// - throws: An `Error` if the encoding process encounters an error. - /// - /// - returns: The encoded request. - public func encode(_ urlRequest: URLRequestConvertible, with parameters: Parameters?) throws -> URLRequest { - var urlRequest = try urlRequest.asURLRequest() - - guard let jsonData = parameters?[JSONDataEncoding.jsonDataKey] as? Data, !jsonData.isEmpty else { - return urlRequest - } - - if urlRequest.value(forHTTPHeaderField: "Content-Type") == nil { - urlRequest.setValue("application/json", forHTTPHeaderField: "Content-Type") - } - - urlRequest.httpBody = jsonData - - return urlRequest - } - - public static func encodingParameters(jsonData: Data?) -> Parameters? { - var returnedParams: Parameters? - if let jsonData = jsonData, !jsonData.isEmpty { - var params = Parameters() - params[jsonDataKey] = jsonData - returnedParams = params - } - return returnedParams - } - -} diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift deleted file mode 100644 index 827bdec87782..000000000000 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift +++ /dev/null @@ -1,43 +0,0 @@ -// -// JSONEncodingHelper.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -import Alamofire - -open class JSONEncodingHelper { - - open class func encodingParameters(forEncodableObject encodableObj: T?) -> Parameters? { - var params: Parameters? - - // Encode the Encodable object - if let encodableObj = encodableObj { - let encodeResult = CodableHelper.encode(encodableObj) - if encodeResult.error == nil { - params = JSONDataEncoding.encodingParameters(jsonData: encodeResult.data) - } - } - - return params - } - - open class func encodingParameters(forEncodableObject encodableObj: Any?) -> Parameters? { - var params: Parameters? - - if let encodableObj = encodableObj { - do { - let data = try JSONSerialization.data(withJSONObject: encodableObj, options: .prettyPrinted) - params = JSONDataEncoding.encodingParameters(jsonData: data) - } catch { - print(error) - return nil - } - } - - return params - } - -} diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models.swift deleted file mode 100644 index 25161165865e..000000000000 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models.swift +++ /dev/null @@ -1,36 +0,0 @@ -// Models.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -protocol JSONEncodable { - func encodeToJSON() -> Any -} - -public enum ErrorResponse: Error { - case error(Int, Data?, Error) -} - -open class Response { - public let statusCode: Int - public let header: [String: String] - public let body: T? - - public init(statusCode: Int, header: [String: String], body: T?) { - self.statusCode = statusCode - self.header = header - self.body = body - } - - public convenience init(response: HTTPURLResponse, body: T?) { - let rawHeader = response.allHeaderFields - var header = [String: String]() - for case let (key, value) as (String, String) in rawHeader { - header[key] = value - } - self.init(statusCode: response.statusCode, header: header, body: body) - } -} diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift deleted file mode 100644 index 83a06951ccd6..000000000000 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift +++ /dev/null @@ -1,25 +0,0 @@ -// -// AdditionalPropertiesClass.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct AdditionalPropertiesClass: Codable { - - public var mapString: [String: String]? - public var mapMapString: [String: [String: String]]? - - public init(mapString: [String: String]?, mapMapString: [String: [String: String]]?) { - self.mapString = mapString - self.mapMapString = mapMapString - } - - public enum CodingKeys: String, CodingKey { - case mapString = "map_string" - case mapMapString = "map_map_string" - } - -} diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift deleted file mode 100644 index 5ed9f31e2a36..000000000000 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift +++ /dev/null @@ -1,20 +0,0 @@ -// -// Animal.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct Animal: Codable { - - public var className: String - public var color: String? = "red" - - public init(className: String, color: String?) { - self.className = className - self.color = color - } - -} diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift deleted file mode 100644 index e09b0e9efdc8..000000000000 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift +++ /dev/null @@ -1,10 +0,0 @@ -// -// AnimalFarm.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public typealias AnimalFarm = [Animal] diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift deleted file mode 100644 index ec270da89074..000000000000 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift +++ /dev/null @@ -1,22 +0,0 @@ -// -// ApiResponse.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct ApiResponse: Codable { - - public var code: Int? - public var type: String? - public var message: String? - - public init(code: Int?, type: String?, message: String?) { - self.code = code - self.type = type - self.message = message - } - -} diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift deleted file mode 100644 index 3843287630b1..000000000000 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift +++ /dev/null @@ -1,22 +0,0 @@ -// -// ArrayOfArrayOfNumberOnly.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct ArrayOfArrayOfNumberOnly: Codable { - - public var arrayArrayNumber: [[Double]]? - - public init(arrayArrayNumber: [[Double]]?) { - self.arrayArrayNumber = arrayArrayNumber - } - - public enum CodingKeys: String, CodingKey { - case arrayArrayNumber = "ArrayArrayNumber" - } - -} diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift deleted file mode 100644 index f8b198e81f50..000000000000 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift +++ /dev/null @@ -1,22 +0,0 @@ -// -// ArrayOfNumberOnly.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct ArrayOfNumberOnly: Codable { - - public var arrayNumber: [Double]? - - public init(arrayNumber: [Double]?) { - self.arrayNumber = arrayNumber - } - - public enum CodingKeys: String, CodingKey { - case arrayNumber = "ArrayNumber" - } - -} diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift deleted file mode 100644 index 67f7f7e5151f..000000000000 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift +++ /dev/null @@ -1,28 +0,0 @@ -// -// ArrayTest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct ArrayTest: Codable { - - public var arrayOfString: [String]? - public var arrayArrayOfInteger: [[Int64]]? - public var arrayArrayOfModel: [[ReadOnlyFirst]]? - - public init(arrayOfString: [String]?, arrayArrayOfInteger: [[Int64]]?, arrayArrayOfModel: [[ReadOnlyFirst]]?) { - self.arrayOfString = arrayOfString - self.arrayArrayOfInteger = arrayArrayOfInteger - self.arrayArrayOfModel = arrayArrayOfModel - } - - public enum CodingKeys: String, CodingKey { - case arrayOfString = "array_of_string" - case arrayArrayOfInteger = "array_array_of_integer" - case arrayArrayOfModel = "array_array_of_model" - } - -} diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift deleted file mode 100644 index d576b50b1c9c..000000000000 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift +++ /dev/null @@ -1,38 +0,0 @@ -// -// Capitalization.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct Capitalization: Codable { - - public var smallCamel: String? - public var capitalCamel: String? - public var smallSnake: String? - public var capitalSnake: String? - public var sCAETHFlowPoints: String? - /** Name of the pet */ - public var ATT_NAME: String? - - public init(smallCamel: String?, capitalCamel: String?, smallSnake: String?, capitalSnake: String?, sCAETHFlowPoints: String?, ATT_NAME: String?) { - self.smallCamel = smallCamel - self.capitalCamel = capitalCamel - self.smallSnake = smallSnake - self.capitalSnake = capitalSnake - self.sCAETHFlowPoints = sCAETHFlowPoints - self.ATT_NAME = ATT_NAME - } - - public enum CodingKeys: String, CodingKey { - case smallCamel - case capitalCamel = "CapitalCamel" - case smallSnake = "small_Snake" - case capitalSnake = "Capital_Snake" - case sCAETHFlowPoints = "SCA_ETH_Flow_Points" - case ATT_NAME - } - -} diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift deleted file mode 100644 index 7ab887f3113f..000000000000 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift +++ /dev/null @@ -1,22 +0,0 @@ -// -// Cat.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct Cat: Codable { - - public var className: String - public var color: String? = "red" - public var declawed: Bool? - - public init(className: String, color: String?, declawed: Bool?) { - self.className = className - self.color = color - self.declawed = declawed - } - -} diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift deleted file mode 100644 index a51ad0dffab1..000000000000 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift +++ /dev/null @@ -1,18 +0,0 @@ -// -// CatAllOf.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct CatAllOf: Codable { - - public var declawed: Bool? - - public init(declawed: Bool?) { - self.declawed = declawed - } - -} diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/Category.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/Category.swift deleted file mode 100644 index eb8f7e5e1974..000000000000 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/Category.swift +++ /dev/null @@ -1,20 +0,0 @@ -// -// Category.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct Category: Codable { - - public var id: Int64? - public var name: String = "default-name" - - public init(id: Int64?, name: String) { - self.id = id - self.name = name - } - -} diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift deleted file mode 100644 index e2a7d4427a06..000000000000 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift +++ /dev/null @@ -1,19 +0,0 @@ -// -// ClassModel.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -/** Model for testing model with \"_class\" property */ -public struct ClassModel: Codable { - - public var _class: String? - - public init(_class: String?) { - self._class = _class - } - -} diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/Client.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/Client.swift deleted file mode 100644 index 00245ca37280..000000000000 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/Client.swift +++ /dev/null @@ -1,18 +0,0 @@ -// -// Client.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct Client: Codable { - - public var client: String? - - public init(client: String?) { - self.client = client - } - -} diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift deleted file mode 100644 index 492c1228008e..000000000000 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift +++ /dev/null @@ -1,22 +0,0 @@ -// -// Dog.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct Dog: Codable { - - public var className: String - public var color: String? = "red" - public var breed: String? - - public init(className: String, color: String?, breed: String?) { - self.className = className - self.color = color - self.breed = breed - } - -} diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift deleted file mode 100644 index 7786f8acc5ae..000000000000 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift +++ /dev/null @@ -1,18 +0,0 @@ -// -// DogAllOf.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct DogAllOf: Codable { - - public var breed: String? - - public init(breed: String?) { - self.breed = breed - } - -} diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift deleted file mode 100644 index 5034ff0b8c68..000000000000 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift +++ /dev/null @@ -1,33 +0,0 @@ -// -// EnumArrays.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct EnumArrays: Codable { - - public enum JustSymbol: String, Codable { - case greaterThanOrEqualTo = ">=" - case dollar = "$" - } - public enum ArrayEnum: String, Codable { - case fish = "fish" - case crab = "crab" - } - public var justSymbol: JustSymbol? - public var arrayEnum: [ArrayEnum]? - - public init(justSymbol: JustSymbol?, arrayEnum: [ArrayEnum]?) { - self.justSymbol = justSymbol - self.arrayEnum = arrayEnum - } - - public enum CodingKeys: String, CodingKey { - case justSymbol = "just_symbol" - case arrayEnum = "array_enum" - } - -} diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift deleted file mode 100644 index 3c1dfcac577d..000000000000 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift +++ /dev/null @@ -1,14 +0,0 @@ -// -// EnumClass.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public enum EnumClass: String, Codable { - case abc = "_abc" - case efg = "-efg" - case xyz = "(xyz)" -} diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift deleted file mode 100644 index 6db9b34d183b..000000000000 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift +++ /dev/null @@ -1,52 +0,0 @@ -// -// EnumTest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct EnumTest: Codable { - - public enum EnumString: String, Codable { - case upper = "UPPER" - case lower = "lower" - case empty = "" - } - public enum EnumStringRequired: String, Codable { - case upper = "UPPER" - case lower = "lower" - case empty = "" - } - public enum EnumInteger: Int, Codable { - case _1 = 1 - case number1 = -1 - } - public enum EnumNumber: Double, Codable { - case _11 = 1.1 - case number12 = -1.2 - } - public var enumString: EnumString? - public var enumStringRequired: EnumStringRequired - public var enumInteger: EnumInteger? - public var enumNumber: EnumNumber? - public var outerEnum: OuterEnum? - - public init(enumString: EnumString?, enumStringRequired: EnumStringRequired, enumInteger: EnumInteger?, enumNumber: EnumNumber?, outerEnum: OuterEnum?) { - self.enumString = enumString - self.enumStringRequired = enumStringRequired - self.enumInteger = enumInteger - self.enumNumber = enumNumber - self.outerEnum = outerEnum - } - - public enum CodingKeys: String, CodingKey { - case enumString = "enum_string" - case enumStringRequired = "enum_string_required" - case enumInteger = "enum_integer" - case enumNumber = "enum_number" - case outerEnum - } - -} diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/File.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/File.swift deleted file mode 100644 index abf3ccffc485..000000000000 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/File.swift +++ /dev/null @@ -1,20 +0,0 @@ -// -// File.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -/** Must be named `File` for test. */ -public struct File: Codable { - - /** Test capitalization */ - public var sourceURI: String? - - public init(sourceURI: String?) { - self.sourceURI = sourceURI - } - -} diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift deleted file mode 100644 index 532f1457939a..000000000000 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift +++ /dev/null @@ -1,20 +0,0 @@ -// -// FileSchemaTestClass.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct FileSchemaTestClass: Codable { - - public var file: File? - public var files: [File]? - - public init(file: File?, files: [File]?) { - self.file = file - self.files = files - } - -} diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift deleted file mode 100644 index 20bd6d103b3d..000000000000 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift +++ /dev/null @@ -1,42 +0,0 @@ -// -// FormatTest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct FormatTest: Codable { - - public var integer: Int? - public var int32: Int? - public var int64: Int64? - public var number: Double - public var float: Float? - public var double: Double? - public var string: String? - public var byte: Data - public var binary: URL? - public var date: Date - public var dateTime: Date? - public var uuid: UUID? - public var password: String - - public init(integer: Int?, int32: Int?, int64: Int64?, number: Double, float: Float?, double: Double?, string: String?, byte: Data, binary: URL?, date: Date, dateTime: Date?, uuid: UUID?, password: String) { - self.integer = integer - self.int32 = int32 - self.int64 = int64 - self.number = number - self.float = float - self.double = double - self.string = string - self.byte = byte - self.binary = binary - self.date = date - self.dateTime = dateTime - self.uuid = uuid - self.password = password - } - -} diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift deleted file mode 100644 index 906ddb06fb17..000000000000 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift +++ /dev/null @@ -1,20 +0,0 @@ -// -// HasOnlyReadOnly.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct HasOnlyReadOnly: Codable { - - public var bar: String? - public var foo: String? - - public init(bar: String?, foo: String?) { - self.bar = bar - self.foo = foo - } - -} diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/List.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/List.swift deleted file mode 100644 index 08d59953873e..000000000000 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/List.swift +++ /dev/null @@ -1,22 +0,0 @@ -// -// List.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct List: Codable { - - public var _123list: String? - - public init(_123list: String?) { - self._123list = _123list - } - - public enum CodingKeys: String, CodingKey { - case _123list = "123-list" - } - -} diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift deleted file mode 100644 index 3a10a7dfcaf6..000000000000 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift +++ /dev/null @@ -1,35 +0,0 @@ -// -// MapTest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct MapTest: Codable { - - public enum MapOfEnumString: String, Codable { - case upper = "UPPER" - case lower = "lower" - } - public var mapMapOfString: [String: [String: String]]? - public var mapOfEnumString: [String: String]? - public var directMap: [String: Bool]? - public var indirectMap: StringBooleanMap? - - public init(mapMapOfString: [String: [String: String]]?, mapOfEnumString: [String: String]?, directMap: [String: Bool]?, indirectMap: StringBooleanMap?) { - self.mapMapOfString = mapMapOfString - self.mapOfEnumString = mapOfEnumString - self.directMap = directMap - self.indirectMap = indirectMap - } - - public enum CodingKeys: String, CodingKey { - case mapMapOfString = "map_map_of_string" - case mapOfEnumString = "map_of_enum_string" - case directMap = "direct_map" - case indirectMap = "indirect_map" - } - -} diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift deleted file mode 100644 index c3deb2f28932..000000000000 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift +++ /dev/null @@ -1,22 +0,0 @@ -// -// MixedPropertiesAndAdditionalPropertiesClass.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct MixedPropertiesAndAdditionalPropertiesClass: Codable { - - public var uuid: UUID? - public var dateTime: Date? - public var map: [String: Animal]? - - public init(uuid: UUID?, dateTime: Date?, map: [String: Animal]?) { - self.uuid = uuid - self.dateTime = dateTime - self.map = map - } - -} diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift deleted file mode 100644 index 78917d75b44d..000000000000 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift +++ /dev/null @@ -1,26 +0,0 @@ -// -// Model200Response.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -/** Model for testing model name starting with number */ -public struct Model200Response: Codable { - - public var name: Int? - public var _class: String? - - public init(name: Int?, _class: String?) { - self.name = name - self._class = _class - } - - public enum CodingKeys: String, CodingKey { - case name - case _class = "class" - } - -} diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/Name.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/Name.swift deleted file mode 100644 index 43c4891e1e23..000000000000 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/Name.swift +++ /dev/null @@ -1,32 +0,0 @@ -// -// Name.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -/** Model for testing model name same as property name */ -public struct Name: Codable { - - public var name: Int - public var snakeCase: Int? - public var property: String? - public var _123number: Int? - - public init(name: Int, snakeCase: Int?, property: String?, _123number: Int?) { - self.name = name - self.snakeCase = snakeCase - self.property = property - self._123number = _123number - } - - public enum CodingKeys: String, CodingKey { - case name - case snakeCase = "snake_case" - case property - case _123number = "123Number" - } - -} diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift deleted file mode 100644 index abd2269e8e76..000000000000 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift +++ /dev/null @@ -1,22 +0,0 @@ -// -// NumberOnly.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct NumberOnly: Codable { - - public var justNumber: Double? - - public init(justNumber: Double?) { - self.justNumber = justNumber - } - - public enum CodingKeys: String, CodingKey { - case justNumber = "JustNumber" - } - -} diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/Order.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/Order.swift deleted file mode 100644 index a6e1b1d2e5e4..000000000000 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/Order.swift +++ /dev/null @@ -1,34 +0,0 @@ -// -// Order.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct Order: Codable { - - public enum Status: String, Codable { - case placed = "placed" - case approved = "approved" - case delivered = "delivered" - } - public var id: Int64? - public var petId: Int64? - public var quantity: Int? - public var shipDate: Date? - /** Order Status */ - public var status: Status? - public var complete: Bool? = false - - public init(id: Int64?, petId: Int64?, quantity: Int?, shipDate: Date?, status: Status?, complete: Bool?) { - self.id = id - self.petId = petId - self.quantity = quantity - self.shipDate = shipDate - self.status = status - self.complete = complete - } - -} diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift deleted file mode 100644 index 49aec001c5db..000000000000 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift +++ /dev/null @@ -1,28 +0,0 @@ -// -// OuterComposite.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct OuterComposite: Codable { - - public var myNumber: Double? - public var myString: String? - public var myBoolean: Bool? - - public init(myNumber: Double?, myString: String?, myBoolean: Bool?) { - self.myNumber = myNumber - self.myString = myString - self.myBoolean = myBoolean - } - - public enum CodingKeys: String, CodingKey { - case myNumber = "my_number" - case myString = "my_string" - case myBoolean = "my_boolean" - } - -} diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift deleted file mode 100644 index 9f80fc95ecf0..000000000000 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift +++ /dev/null @@ -1,14 +0,0 @@ -// -// OuterEnum.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public enum OuterEnum: String, Codable { - case placed = "placed" - case approved = "approved" - case delivered = "delivered" -} diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift deleted file mode 100644 index af60a550bb19..000000000000 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift +++ /dev/null @@ -1,34 +0,0 @@ -// -// Pet.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct Pet: Codable { - - public enum Status: String, Codable { - case available = "available" - case pending = "pending" - case sold = "sold" - } - public var id: Int64? - public var category: Category? - public var name: String - public var photoUrls: [String] - public var tags: [Tag]? - /** pet status in the store */ - public var status: Status? - - public init(id: Int64?, category: Category?, name: String, photoUrls: [String], tags: [Tag]?, status: Status?) { - self.id = id - self.category = category - self.name = name - self.photoUrls = photoUrls - self.tags = tags - self.status = status - } - -} diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift deleted file mode 100644 index 0acd21fd1000..000000000000 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift +++ /dev/null @@ -1,20 +0,0 @@ -// -// ReadOnlyFirst.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct ReadOnlyFirst: Codable { - - public var bar: String? - public var baz: String? - - public init(bar: String?, baz: String?) { - self.bar = bar - self.baz = baz - } - -} diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/Return.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/Return.swift deleted file mode 100644 index b34ddc68142d..000000000000 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/Return.swift +++ /dev/null @@ -1,23 +0,0 @@ -// -// Return.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -/** Model for testing reserved words */ -public struct Return: Codable { - - public var _return: Int? - - public init(_return: Int?) { - self._return = _return - } - - public enum CodingKeys: String, CodingKey { - case _return = "return" - } - -} diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift deleted file mode 100644 index e79fc45c0e91..000000000000 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift +++ /dev/null @@ -1,22 +0,0 @@ -// -// SpecialModelName.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct SpecialModelName: Codable { - - public var specialPropertyName: Int64? - - public init(specialPropertyName: Int64?) { - self.specialPropertyName = specialPropertyName - } - - public enum CodingKeys: String, CodingKey { - case specialPropertyName = "$special[property.name]" - } - -} diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift deleted file mode 100644 index 3f1237fee477..000000000000 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift +++ /dev/null @@ -1,45 +0,0 @@ -// -// StringBooleanMap.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct StringBooleanMap: Codable { - - public var additionalProperties: [String: Bool] = [:] - - public subscript(key: String) -> Bool? { - get { - if let value = additionalProperties[key] { - return value - } - return nil - } - - set { - additionalProperties[key] = newValue - } - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - try container.encodeMap(additionalProperties) - } - - // Decodable protocol methods - - public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - var nonAdditionalPropertyKeys = Set() - additionalProperties = try container.decodeMap(Bool.self, excludedKeys: nonAdditionalPropertyKeys) - } - -} diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift deleted file mode 100644 index 4dd8a9a9f5a0..000000000000 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift +++ /dev/null @@ -1,20 +0,0 @@ -// -// Tag.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct Tag: Codable { - - public var id: Int64? - public var name: String? - - public init(id: Int64?, name: String?) { - self.id = id - self.name = name - } - -} diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift deleted file mode 100644 index bf0006e1a266..000000000000 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift +++ /dev/null @@ -1,34 +0,0 @@ -// -// TypeHolderDefault.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct TypeHolderDefault: Codable { - - public var stringItem: String = "what" - public var numberItem: Double - public var integerItem: Int - public var boolItem: Bool = true - public var arrayItem: [Int] - - public init(stringItem: String, numberItem: Double, integerItem: Int, boolItem: Bool, arrayItem: [Int]) { - self.stringItem = stringItem - self.numberItem = numberItem - self.integerItem = integerItem - self.boolItem = boolItem - self.arrayItem = arrayItem - } - - public enum CodingKeys: String, CodingKey { - case stringItem = "string_item" - case numberItem = "number_item" - case integerItem = "integer_item" - case boolItem = "bool_item" - case arrayItem = "array_item" - } - -} diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift deleted file mode 100644 index 602a2a6d185a..000000000000 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift +++ /dev/null @@ -1,34 +0,0 @@ -// -// TypeHolderExample.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct TypeHolderExample: Codable { - - public var stringItem: String - public var numberItem: Double - public var integerItem: Int - public var boolItem: Bool - public var arrayItem: [Int] - - public init(stringItem: String, numberItem: Double, integerItem: Int, boolItem: Bool, arrayItem: [Int]) { - self.stringItem = stringItem - self.numberItem = numberItem - self.integerItem = integerItem - self.boolItem = boolItem - self.arrayItem = arrayItem - } - - public enum CodingKeys: String, CodingKey { - case stringItem = "string_item" - case numberItem = "number_item" - case integerItem = "integer_item" - case boolItem = "bool_item" - case arrayItem = "array_item" - } - -} diff --git a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/User.swift b/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/User.swift deleted file mode 100644 index 79f271ed7356..000000000000 --- a/samples/client/petstore/swift4/default/PetstoreClient/Classes/OpenAPIs/Models/User.swift +++ /dev/null @@ -1,33 +0,0 @@ -// -// User.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct User: Codable { - - public var id: Int64? - public var username: String? - public var firstName: String? - public var lastName: String? - public var email: String? - public var password: String? - public var phone: String? - /** User Status */ - public var userStatus: Int? - - public init(id: Int64?, username: String?, firstName: String?, lastName: String?, email: String?, password: String?, phone: String?, userStatus: Int?) { - self.id = id - self.username = username - self.firstName = firstName - self.lastName = lastName - self.email = email - self.password = password - self.phone = phone - self.userStatus = userStatus - } - -} diff --git a/samples/client/petstore/swift4/default/README.md b/samples/client/petstore/swift4/default/README.md deleted file mode 100644 index bd093317bd7a..000000000000 --- a/samples/client/petstore/swift4/default/README.md +++ /dev/null @@ -1,141 +0,0 @@ -# Swift4 API client for PetstoreClient - -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 API client 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 an API client. - -- API version: 1.0.0 -- Package version: -- Build package: org.openapitools.codegen.languages.Swift4Codegen - -## Installation - -### Carthage - -Run `carthage update` - -### CocoaPods - -Run `pod install` - -## Documentation for API Endpoints - -All URIs are relative to *http://petstore.swagger.io:80/v2* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*AnotherFakeAPI* | [**call123testSpecialTags**](docs/AnotherFakeAPI.md#call123testspecialtags) | **PATCH** /another-fake/dummy | To test special tags -*FakeAPI* | [**fakeOuterBooleanSerialize**](docs/FakeAPI.md#fakeouterbooleanserialize) | **POST** /fake/outer/boolean | -*FakeAPI* | [**fakeOuterCompositeSerialize**](docs/FakeAPI.md#fakeoutercompositeserialize) | **POST** /fake/outer/composite | -*FakeAPI* | [**fakeOuterNumberSerialize**](docs/FakeAPI.md#fakeouternumberserialize) | **POST** /fake/outer/number | -*FakeAPI* | [**fakeOuterStringSerialize**](docs/FakeAPI.md#fakeouterstringserialize) | **POST** /fake/outer/string | -*FakeAPI* | [**testBodyWithFileSchema**](docs/FakeAPI.md#testbodywithfileschema) | **PUT** /fake/body-with-file-schema | -*FakeAPI* | [**testBodyWithQueryParams**](docs/FakeAPI.md#testbodywithqueryparams) | **PUT** /fake/body-with-query-params | -*FakeAPI* | [**testClientModel**](docs/FakeAPI.md#testclientmodel) | **PATCH** /fake | To test \"client\" model -*FakeAPI* | [**testEndpointParameters**](docs/FakeAPI.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 -*FakeAPI* | [**testEnumParameters**](docs/FakeAPI.md#testenumparameters) | **GET** /fake | To test enum parameters -*FakeAPI* | [**testGroupParameters**](docs/FakeAPI.md#testgroupparameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) -*FakeAPI* | [**testInlineAdditionalProperties**](docs/FakeAPI.md#testinlineadditionalproperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties -*FakeAPI* | [**testJsonFormData**](docs/FakeAPI.md#testjsonformdata) | **GET** /fake/jsonFormData | test json serialization of form data -*FakeClassnameTags123API* | [**testClassname**](docs/FakeClassnameTags123API.md#testclassname) | **PATCH** /fake_classname_test | To test class name in snake case -*PetAPI* | [**addPet**](docs/PetAPI.md#addpet) | **POST** /pet | Add a new pet to the store -*PetAPI* | [**deletePet**](docs/PetAPI.md#deletepet) | **DELETE** /pet/{petId} | Deletes a pet -*PetAPI* | [**findPetsByStatus**](docs/PetAPI.md#findpetsbystatus) | **GET** /pet/findByStatus | Finds Pets by status -*PetAPI* | [**findPetsByTags**](docs/PetAPI.md#findpetsbytags) | **GET** /pet/findByTags | Finds Pets by tags -*PetAPI* | [**getPetById**](docs/PetAPI.md#getpetbyid) | **GET** /pet/{petId} | Find pet by ID -*PetAPI* | [**updatePet**](docs/PetAPI.md#updatepet) | **PUT** /pet | Update an existing pet -*PetAPI* | [**updatePetWithForm**](docs/PetAPI.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data -*PetAPI* | [**uploadFile**](docs/PetAPI.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image -*PetAPI* | [**uploadFileWithRequiredFile**](docs/PetAPI.md#uploadfilewithrequiredfile) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required) -*StoreAPI* | [**deleteOrder**](docs/StoreAPI.md#deleteorder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID -*StoreAPI* | [**getInventory**](docs/StoreAPI.md#getinventory) | **GET** /store/inventory | Returns pet inventories by status -*StoreAPI* | [**getOrderById**](docs/StoreAPI.md#getorderbyid) | **GET** /store/order/{order_id} | Find purchase order by ID -*StoreAPI* | [**placeOrder**](docs/StoreAPI.md#placeorder) | **POST** /store/order | Place an order for a pet -*UserAPI* | [**createUser**](docs/UserAPI.md#createuser) | **POST** /user | Create user -*UserAPI* | [**createUsersWithArrayInput**](docs/UserAPI.md#createuserswitharrayinput) | **POST** /user/createWithArray | Creates list of users with given input array -*UserAPI* | [**createUsersWithListInput**](docs/UserAPI.md#createuserswithlistinput) | **POST** /user/createWithList | Creates list of users with given input array -*UserAPI* | [**deleteUser**](docs/UserAPI.md#deleteuser) | **DELETE** /user/{username} | Delete user -*UserAPI* | [**getUserByName**](docs/UserAPI.md#getuserbyname) | **GET** /user/{username} | Get user by user name -*UserAPI* | [**loginUser**](docs/UserAPI.md#loginuser) | **GET** /user/login | Logs user into the system -*UserAPI* | [**logoutUser**](docs/UserAPI.md#logoutuser) | **GET** /user/logout | Logs out current logged in user session -*UserAPI* | [**updateUser**](docs/UserAPI.md#updateuser) | **PUT** /user/{username} | Updated user - - -## Documentation For Models - - - [AdditionalPropertiesClass](docs/AdditionalPropertiesClass.md) - - [Animal](docs/Animal.md) - - [AnimalFarm](docs/AnimalFarm.md) - - [ApiResponse](docs/ApiResponse.md) - - [ArrayOfArrayOfNumberOnly](docs/ArrayOfArrayOfNumberOnly.md) - - [ArrayOfNumberOnly](docs/ArrayOfNumberOnly.md) - - [ArrayTest](docs/ArrayTest.md) - - [Capitalization](docs/Capitalization.md) - - [Cat](docs/Cat.md) - - [CatAllOf](docs/CatAllOf.md) - - [Category](docs/Category.md) - - [ClassModel](docs/ClassModel.md) - - [Client](docs/Client.md) - - [Dog](docs/Dog.md) - - [DogAllOf](docs/DogAllOf.md) - - [EnumArrays](docs/EnumArrays.md) - - [EnumClass](docs/EnumClass.md) - - [EnumTest](docs/EnumTest.md) - - [File](docs/File.md) - - [FileSchemaTestClass](docs/FileSchemaTestClass.md) - - [FormatTest](docs/FormatTest.md) - - [HasOnlyReadOnly](docs/HasOnlyReadOnly.md) - - [List](docs/List.md) - - [MapTest](docs/MapTest.md) - - [MixedPropertiesAndAdditionalPropertiesClass](docs/MixedPropertiesAndAdditionalPropertiesClass.md) - - [Model200Response](docs/Model200Response.md) - - [Name](docs/Name.md) - - [NumberOnly](docs/NumberOnly.md) - - [Order](docs/Order.md) - - [OuterComposite](docs/OuterComposite.md) - - [OuterEnum](docs/OuterEnum.md) - - [Pet](docs/Pet.md) - - [ReadOnlyFirst](docs/ReadOnlyFirst.md) - - [Return](docs/Return.md) - - [SpecialModelName](docs/SpecialModelName.md) - - [StringBooleanMap](docs/StringBooleanMap.md) - - [Tag](docs/Tag.md) - - [TypeHolderDefault](docs/TypeHolderDefault.md) - - [TypeHolderExample](docs/TypeHolderExample.md) - - [User](docs/User.md) - - -## Documentation For Authorization - - -## api_key - -- **Type**: API key -- **API key parameter name**: api_key -- **Location**: HTTP header - -## api_key_query - -- **Type**: API key -- **API key parameter name**: api_key_query -- **Location**: URL query string - -## http_basic_test - -- **Type**: HTTP basic authentication - -## petstore_auth - -- **Type**: OAuth -- **Flow**: implicit -- **Authorization URL**: http://petstore.swagger.io/api/oauth/dialog -- **Scopes**: - - **write:pets**: modify pets in your account - - **read:pets**: read your pets - - -## Author - - - diff --git a/samples/client/petstore/swift4/default/SwaggerClientTests/.gitignore b/samples/client/petstore/swift4/default/SwaggerClientTests/.gitignore deleted file mode 100644 index 0269c2f56db9..000000000000 --- a/samples/client/petstore/swift4/default/SwaggerClientTests/.gitignore +++ /dev/null @@ -1,72 +0,0 @@ -### https://raw.github.com/github/gitignore/7792e50daeaa6c07460484704671d1dc9f0045a7/Swift.gitignore - -# Xcode -# -# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore - -## Build generated -build/ -DerivedData/ - -## Various settings -*.pbxuser -!default.pbxuser -*.mode1v3 -!default.mode1v3 -*.mode2v3 -!default.mode2v3 -*.perspectivev3 -!default.perspectivev3 -xcuserdata/ - -## Other -*.moved-aside -*.xccheckout -*.xcscmblueprint - -## Obj-C/Swift specific -*.hmap -*.ipa -*.dSYM.zip -*.dSYM - -## Playgrounds -timeline.xctimeline -playground.xcworkspace - -# Swift Package Manager -# -# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. -# Packages/ -# Package.pins -# Package.resolved -.build/ - -# CocoaPods -# -# We recommend against adding the Pods directory to your .gitignore. However -# you should judge for yourself, the pros and cons are mentioned at: -# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control -# -Pods/ - -# Carthage -# -# Add this line if you want to avoid checking in source code from Carthage dependencies. -Carthage/Checkouts - -Carthage/Build - -# fastlane -# -# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the -# screenshots whenever they are needed. -# For more information about the recommended setup visit: -# https://docs.fastlane.tools/best-practices/source-control/#source-control - -fastlane/report.xml -fastlane/Preview.html -fastlane/screenshots -fastlane/test_output - - diff --git a/samples/client/petstore/swift4/default/SwaggerClientTests/Podfile b/samples/client/petstore/swift4/default/SwaggerClientTests/Podfile deleted file mode 100644 index 77432f9eee92..000000000000 --- a/samples/client/petstore/swift4/default/SwaggerClientTests/Podfile +++ /dev/null @@ -1,13 +0,0 @@ -platform :ios, '9.0' - -source 'https://cdn.cocoapods.org/' - -use_frameworks! - -target 'SwaggerClient' do - pod "PetstoreClient", :path => "../" - - target 'SwaggerClientTests' do - inherit! :search_paths - end -end diff --git a/samples/client/petstore/swift4/default/SwaggerClientTests/Podfile.lock b/samples/client/petstore/swift4/default/SwaggerClientTests/Podfile.lock deleted file mode 100644 index 3999ccf0bb34..000000000000 --- a/samples/client/petstore/swift4/default/SwaggerClientTests/Podfile.lock +++ /dev/null @@ -1,23 +0,0 @@ -PODS: - - Alamofire (4.9.0) - - PetstoreClient (1.0.0): - - Alamofire (~> 4.9.0) - -DEPENDENCIES: - - PetstoreClient (from `../`) - -SPEC REPOS: - trunk: - - Alamofire - -EXTERNAL SOURCES: - PetstoreClient: - :path: "../" - -SPEC CHECKSUMS: - Alamofire: afc3e7c6db61476cb45cdd23fed06bad03bbc321 - PetstoreClient: e5c71b862a32097342e341f7088805bbfc033a3e - -PODFILE CHECKSUM: 509bec696cc1d8641751b52e4fe4bef04ac4542c - -COCOAPODS: 1.8.4 diff --git a/samples/client/petstore/swift4/default/SwaggerClientTests/SwaggerClient.xcodeproj/project.pbxproj b/samples/client/petstore/swift4/default/SwaggerClientTests/SwaggerClient.xcodeproj/project.pbxproj deleted file mode 100644 index 32c3ecd268aa..000000000000 --- a/samples/client/petstore/swift4/default/SwaggerClientTests/SwaggerClient.xcodeproj/project.pbxproj +++ /dev/null @@ -1,529 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 1A501F48219C3DC600F372F6 /* DateFormatTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1A501F47219C3DC600F372F6 /* DateFormatTests.swift */; }; - 23B2E76564651097BE2FE501 /* Pods_SwaggerClient.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7F98CC8B18E5FA9213F6A68D /* Pods_SwaggerClient.framework */; }; - 6D4EFB951C692C6300B96B06 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D4EFB941C692C6300B96B06 /* AppDelegate.swift */; }; - 6D4EFB971C692C6300B96B06 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D4EFB961C692C6300B96B06 /* ViewController.swift */; }; - 6D4EFB9A1C692C6300B96B06 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 6D4EFB981C692C6300B96B06 /* Main.storyboard */; }; - 6D4EFB9C1C692C6300B96B06 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 6D4EFB9B1C692C6300B96B06 /* Assets.xcassets */; }; - 6D4EFB9F1C692C6300B96B06 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 6D4EFB9D1C692C6300B96B06 /* LaunchScreen.storyboard */; }; - 6D4EFBB51C693BE200B96B06 /* PetAPITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D4EFBB41C693BE200B96B06 /* PetAPITests.swift */; }; - 6D4EFBB71C693BED00B96B06 /* StoreAPITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D4EFBB61C693BED00B96B06 /* StoreAPITests.swift */; }; - 6D4EFBB91C693BFC00B96B06 /* UserAPITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D4EFBB81C693BFC00B96B06 /* UserAPITests.swift */; }; - FB5CCC7EFA680BB2746B695B /* Pods_SwaggerClientTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 83FDC034BBA2A07AE9975250 /* Pods_SwaggerClientTests.framework */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 6D4EFBA61C692C6300B96B06 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6D4EFB891C692C6300B96B06 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 6D4EFB901C692C6300B96B06; - remoteInfo = SwaggerClient; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXFileReference section */ - 081E9B893DEB1589CB807EA7 /* Pods-SwaggerClient.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwaggerClient.debug.xcconfig"; path = "Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient.debug.xcconfig"; sourceTree = ""; }; - 1A501F47219C3DC600F372F6 /* DateFormatTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DateFormatTests.swift; sourceTree = ""; }; - 6D4EFB911C692C6300B96B06 /* SwaggerClient.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SwaggerClient.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 6D4EFB941C692C6300B96B06 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; - 6D4EFB961C692C6300B96B06 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; - 6D4EFB991C692C6300B96B06 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; - 6D4EFB9B1C692C6300B96B06 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; - 6D4EFB9E1C692C6300B96B06 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; - 6D4EFBA01C692C6300B96B06 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 6D4EFBA51C692C6300B96B06 /* SwaggerClientTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = SwaggerClientTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - 6D4EFBAB1C692C6300B96B06 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 6D4EFBB41C693BE200B96B06 /* PetAPITests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PetAPITests.swift; sourceTree = ""; }; - 6D4EFBB61C693BED00B96B06 /* StoreAPITests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StoreAPITests.swift; sourceTree = ""; }; - 6D4EFBB81C693BFC00B96B06 /* UserAPITests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UserAPITests.swift; sourceTree = ""; }; - 7F98CC8B18E5FA9213F6A68D /* Pods_SwaggerClient.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_SwaggerClient.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 83FDC034BBA2A07AE9975250 /* Pods_SwaggerClientTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_SwaggerClientTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - ACB80AC61FA8D8916D4559AA /* Pods-SwaggerClient.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwaggerClient.release.xcconfig"; path = "Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient.release.xcconfig"; sourceTree = ""; }; - C07EC0A94AA0F86D60668B32 /* Pods.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - E43FC34A9681D65ED44EE914 /* Pods-SwaggerClientTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwaggerClientTests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests.debug.xcconfig"; sourceTree = ""; }; - ED8576754DBB828CAE63EA87 /* Pods-SwaggerClientTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwaggerClientTests.release.xcconfig"; path = "Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests.release.xcconfig"; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 6D4EFB8E1C692C6300B96B06 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 23B2E76564651097BE2FE501 /* Pods_SwaggerClient.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 6D4EFBA21C692C6300B96B06 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - FB5CCC7EFA680BB2746B695B /* Pods_SwaggerClientTests.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 203D4495376E4EB72474B091 /* Pods */ = { - isa = PBXGroup; - children = ( - 081E9B893DEB1589CB807EA7 /* Pods-SwaggerClient.debug.xcconfig */, - ACB80AC61FA8D8916D4559AA /* Pods-SwaggerClient.release.xcconfig */, - E43FC34A9681D65ED44EE914 /* Pods-SwaggerClientTests.debug.xcconfig */, - ED8576754DBB828CAE63EA87 /* Pods-SwaggerClientTests.release.xcconfig */, - ); - name = Pods; - sourceTree = ""; - }; - 3FABC56EC0BA84CBF4F99564 /* Frameworks */ = { - isa = PBXGroup; - children = ( - C07EC0A94AA0F86D60668B32 /* Pods.framework */, - 7F98CC8B18E5FA9213F6A68D /* Pods_SwaggerClient.framework */, - 83FDC034BBA2A07AE9975250 /* Pods_SwaggerClientTests.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; - 6D4EFB881C692C6300B96B06 = { - isa = PBXGroup; - children = ( - 6D4EFB931C692C6300B96B06 /* SwaggerClient */, - 6D4EFBA81C692C6300B96B06 /* SwaggerClientTests */, - 6D4EFB921C692C6300B96B06 /* Products */, - 3FABC56EC0BA84CBF4F99564 /* Frameworks */, - 203D4495376E4EB72474B091 /* Pods */, - ); - sourceTree = ""; - }; - 6D4EFB921C692C6300B96B06 /* Products */ = { - isa = PBXGroup; - children = ( - 6D4EFB911C692C6300B96B06 /* SwaggerClient.app */, - 6D4EFBA51C692C6300B96B06 /* SwaggerClientTests.xctest */, - ); - name = Products; - sourceTree = ""; - }; - 6D4EFB931C692C6300B96B06 /* SwaggerClient */ = { - isa = PBXGroup; - children = ( - 6D4EFB941C692C6300B96B06 /* AppDelegate.swift */, - 6D4EFB961C692C6300B96B06 /* ViewController.swift */, - 6D4EFB981C692C6300B96B06 /* Main.storyboard */, - 6D4EFB9B1C692C6300B96B06 /* Assets.xcassets */, - 6D4EFB9D1C692C6300B96B06 /* LaunchScreen.storyboard */, - 6D4EFBA01C692C6300B96B06 /* Info.plist */, - ); - path = SwaggerClient; - sourceTree = ""; - }; - 6D4EFBA81C692C6300B96B06 /* SwaggerClientTests */ = { - isa = PBXGroup; - children = ( - 6D4EFBAB1C692C6300B96B06 /* Info.plist */, - 6D4EFBB41C693BE200B96B06 /* PetAPITests.swift */, - 6D4EFBB61C693BED00B96B06 /* StoreAPITests.swift */, - 6D4EFBB81C693BFC00B96B06 /* UserAPITests.swift */, - 1A501F47219C3DC600F372F6 /* DateFormatTests.swift */, - ); - path = SwaggerClientTests; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 6D4EFB901C692C6300B96B06 /* SwaggerClient */ = { - isa = PBXNativeTarget; - buildConfigurationList = 6D4EFBAE1C692C6300B96B06 /* Build configuration list for PBXNativeTarget "SwaggerClient" */; - buildPhases = ( - 5BC9214E8D9BA5A427A3775B /* [CP] Check Pods Manifest.lock */, - 6D4EFB8D1C692C6300B96B06 /* Sources */, - 6D4EFB8E1C692C6300B96B06 /* Frameworks */, - 6D4EFB8F1C692C6300B96B06 /* Resources */, - FDCA0F14611FE114BFEBA8BB /* [CP] Embed Pods Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = SwaggerClient; - productName = SwaggerClient; - productReference = 6D4EFB911C692C6300B96B06 /* SwaggerClient.app */; - productType = "com.apple.product-type.application"; - }; - 6D4EFBA41C692C6300B96B06 /* SwaggerClientTests */ = { - isa = PBXNativeTarget; - buildConfigurationList = 6D4EFBB11C692C6300B96B06 /* Build configuration list for PBXNativeTarget "SwaggerClientTests" */; - buildPhases = ( - EEDC5E683F9569976B7C1192 /* [CP] Check Pods Manifest.lock */, - 6D4EFBA11C692C6300B96B06 /* Sources */, - 6D4EFBA21C692C6300B96B06 /* Frameworks */, - 6D4EFBA31C692C6300B96B06 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - 6D4EFBA71C692C6300B96B06 /* PBXTargetDependency */, - ); - name = SwaggerClientTests; - productName = SwaggerClientTests; - productReference = 6D4EFBA51C692C6300B96B06 /* SwaggerClientTests.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 6D4EFB891C692C6300B96B06 /* Project object */ = { - isa = PBXProject; - attributes = { - LastSwiftUpdateCheck = 0720; - LastUpgradeCheck = 0720; - ORGANIZATIONNAME = Swagger; - TargetAttributes = { - 6D4EFB901C692C6300B96B06 = { - CreatedOnToolsVersion = 7.2.1; - LastSwiftMigration = 0800; - }; - 6D4EFBA41C692C6300B96B06 = { - CreatedOnToolsVersion = 7.2.1; - LastSwiftMigration = 0800; - TestTargetID = 6D4EFB901C692C6300B96B06; - }; - }; - }; - buildConfigurationList = 6D4EFB8C1C692C6300B96B06 /* Build configuration list for PBXProject "SwaggerClient" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = 6D4EFB881C692C6300B96B06; - productRefGroup = 6D4EFB921C692C6300B96B06 /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 6D4EFB901C692C6300B96B06 /* SwaggerClient */, - 6D4EFBA41C692C6300B96B06 /* SwaggerClientTests */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 6D4EFB8F1C692C6300B96B06 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 6D4EFB9F1C692C6300B96B06 /* LaunchScreen.storyboard in Resources */, - 6D4EFB9C1C692C6300B96B06 /* Assets.xcassets in Resources */, - 6D4EFB9A1C692C6300B96B06 /* Main.storyboard in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 6D4EFBA31C692C6300B96B06 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXShellScriptBuildPhase section */ - 5BC9214E8D9BA5A427A3775B /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputFileListPaths = ( - ); - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-SwaggerClient-checkManifestLockResult.txt", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; - }; - EEDC5E683F9569976B7C1192 /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputFileListPaths = ( - ); - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-SwaggerClientTests-checkManifestLockResult.txt", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; - }; - FDCA0F14611FE114BFEBA8BB /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-frameworks.sh", - "${BUILT_PRODUCTS_DIR}/Alamofire/Alamofire.framework", - "${BUILT_PRODUCTS_DIR}/PetstoreClient/PetstoreClient.framework", - ); - name = "[CP] Embed Pods Frameworks"; - outputPaths = ( - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Alamofire.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/PetstoreClient.framework", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 6D4EFB8D1C692C6300B96B06 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 6D4EFB971C692C6300B96B06 /* ViewController.swift in Sources */, - 6D4EFB951C692C6300B96B06 /* AppDelegate.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 6D4EFBA11C692C6300B96B06 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 6D4EFBB71C693BED00B96B06 /* StoreAPITests.swift in Sources */, - 6D4EFBB91C693BFC00B96B06 /* UserAPITests.swift in Sources */, - 1A501F48219C3DC600F372F6 /* DateFormatTests.swift in Sources */, - 6D4EFBB51C693BE200B96B06 /* PetAPITests.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 6D4EFBA71C692C6300B96B06 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 6D4EFB901C692C6300B96B06 /* SwaggerClient */; - targetProxy = 6D4EFBA61C692C6300B96B06 /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin PBXVariantGroup section */ - 6D4EFB981C692C6300B96B06 /* Main.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 6D4EFB991C692C6300B96B06 /* Base */, - ); - name = Main.storyboard; - sourceTree = ""; - }; - 6D4EFB9D1C692C6300B96B06 /* LaunchScreen.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 6D4EFB9E1C692C6300B96B06 /* Base */, - ); - name = LaunchScreen.storyboard; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - -/* Begin XCBuildConfiguration section */ - 6D4EFBAC1C692C6300B96B06 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.2; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = iphoneos; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 4.2; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Debug; - }; - 6D4EFBAD1C692C6300B96B06 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.2; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; - SWIFT_VERSION = 4.2; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - 6D4EFBAF1C692C6300B96B06 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 081E9B893DEB1589CB807EA7 /* Pods-SwaggerClient.debug.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - INFOPLIST_FILE = SwaggerClient/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = com.swagger.SwaggerClient; - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Debug; - }; - 6D4EFBB01C692C6300B96B06 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = ACB80AC61FA8D8916D4559AA /* Pods-SwaggerClient.release.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - INFOPLIST_FILE = SwaggerClient/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = com.swagger.SwaggerClient; - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Release; - }; - 6D4EFBB21C692C6300B96B06 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = E43FC34A9681D65ED44EE914 /* Pods-SwaggerClientTests.debug.xcconfig */; - buildSettings = { - BUNDLE_LOADER = "$(TEST_HOST)"; - INFOPLIST_FILE = SwaggerClientTests/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = com.swagger.SwaggerClientTests; - PRODUCT_NAME = "$(TARGET_NAME)"; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/SwaggerClient.app/SwaggerClient"; - }; - name = Debug; - }; - 6D4EFBB31C692C6300B96B06 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = ED8576754DBB828CAE63EA87 /* Pods-SwaggerClientTests.release.xcconfig */; - buildSettings = { - BUNDLE_LOADER = "$(TEST_HOST)"; - INFOPLIST_FILE = SwaggerClientTests/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = com.swagger.SwaggerClientTests; - PRODUCT_NAME = "$(TARGET_NAME)"; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/SwaggerClient.app/SwaggerClient"; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 6D4EFB8C1C692C6300B96B06 /* Build configuration list for PBXProject "SwaggerClient" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 6D4EFBAC1C692C6300B96B06 /* Debug */, - 6D4EFBAD1C692C6300B96B06 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 6D4EFBAE1C692C6300B96B06 /* Build configuration list for PBXNativeTarget "SwaggerClient" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 6D4EFBAF1C692C6300B96B06 /* Debug */, - 6D4EFBB01C692C6300B96B06 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 6D4EFBB11C692C6300B96B06 /* Build configuration list for PBXNativeTarget "SwaggerClientTests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 6D4EFBB21C692C6300B96B06 /* Debug */, - 6D4EFBB31C692C6300B96B06 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 6D4EFB891C692C6300B96B06 /* Project object */; -} diff --git a/samples/client/petstore/swift4/default/SwaggerClientTests/SwaggerClient.xcodeproj/xcshareddata/xcschemes/SwaggerClient.xcscheme b/samples/client/petstore/swift4/default/SwaggerClientTests/SwaggerClient.xcodeproj/xcshareddata/xcschemes/SwaggerClient.xcscheme deleted file mode 100644 index 5ba034cec55a..000000000000 --- a/samples/client/petstore/swift4/default/SwaggerClientTests/SwaggerClient.xcodeproj/xcshareddata/xcschemes/SwaggerClient.xcscheme +++ /dev/null @@ -1,102 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/samples/client/petstore/swift4/default/SwaggerClientTests/SwaggerClient.xcworkspace/contents.xcworkspacedata b/samples/client/petstore/swift4/default/SwaggerClientTests/SwaggerClient.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 9b3fa18954f7..000000000000 --- a/samples/client/petstore/swift4/default/SwaggerClientTests/SwaggerClient.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - diff --git a/samples/client/petstore/swift4/default/SwaggerClientTests/SwaggerClient.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/samples/client/petstore/swift4/default/SwaggerClientTests/SwaggerClient.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d981003d68..000000000000 --- a/samples/client/petstore/swift4/default/SwaggerClientTests/SwaggerClient.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/samples/client/petstore/swift4/default/SwaggerClientTests/SwaggerClient/AppDelegate.swift b/samples/client/petstore/swift4/default/SwaggerClientTests/SwaggerClient/AppDelegate.swift deleted file mode 100644 index b1896774c738..000000000000 --- a/samples/client/petstore/swift4/default/SwaggerClientTests/SwaggerClient/AppDelegate.swift +++ /dev/null @@ -1,43 +0,0 @@ -// -// AppDelegate.swift -// SwaggerClient -// -// Created by Joseph Zuromski on 2/8/16. -// Copyright © 2016 Swagger. All rights reserved. -// - -import UIKit - -@UIApplicationMain -class AppDelegate: UIResponder, UIApplicationDelegate { - - var window: UIWindow? - - func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { - // Override point for customization after application launch. - return true - } - - func applicationWillResignActive(_ application: UIApplication) { - // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. - // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. - } - - func applicationDidEnterBackground(_ application: UIApplication) { - // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. - // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. - } - - func applicationWillEnterForeground(_ application: UIApplication) { - // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. - } - - func applicationDidBecomeActive(_ application: UIApplication) { - // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. - } - - func applicationWillTerminate(_ application: UIApplication) { - // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. - } - -} diff --git a/samples/client/petstore/swift4/default/SwaggerClientTests/SwaggerClient/Assets.xcassets/AppIcon.appiconset/Contents.json b/samples/client/petstore/swift4/default/SwaggerClientTests/SwaggerClient/Assets.xcassets/AppIcon.appiconset/Contents.json deleted file mode 100644 index 1d060ed28827..000000000000 --- a/samples/client/petstore/swift4/default/SwaggerClientTests/SwaggerClient/Assets.xcassets/AppIcon.appiconset/Contents.json +++ /dev/null @@ -1,93 +0,0 @@ -{ - "images" : [ - { - "idiom" : "iphone", - "size" : "20x20", - "scale" : "2x" - }, - { - "idiom" : "iphone", - "size" : "20x20", - "scale" : "3x" - }, - { - "idiom" : "iphone", - "size" : "29x29", - "scale" : "2x" - }, - { - "idiom" : "iphone", - "size" : "29x29", - "scale" : "3x" - }, - { - "idiom" : "iphone", - "size" : "40x40", - "scale" : "2x" - }, - { - "idiom" : "iphone", - "size" : "40x40", - "scale" : "3x" - }, - { - "idiom" : "iphone", - "size" : "60x60", - "scale" : "2x" - }, - { - "idiom" : "iphone", - "size" : "60x60", - "scale" : "3x" - }, - { - "idiom" : "ipad", - "size" : "20x20", - "scale" : "1x" - }, - { - "idiom" : "ipad", - "size" : "20x20", - "scale" : "2x" - }, - { - "idiom" : "ipad", - "size" : "29x29", - "scale" : "1x" - }, - { - "idiom" : "ipad", - "size" : "29x29", - "scale" : "2x" - }, - { - "idiom" : "ipad", - "size" : "40x40", - "scale" : "1x" - }, - { - "idiom" : "ipad", - "size" : "40x40", - "scale" : "2x" - }, - { - "idiom" : "ipad", - "size" : "76x76", - "scale" : "1x" - }, - { - "idiom" : "ipad", - "size" : "76x76", - "scale" : "2x" - }, - { - "idiom" : "ipad", - "size" : "83.5x83.5", - "scale" : "2x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/samples/client/petstore/swift4/default/SwaggerClientTests/SwaggerClient/Base.lproj/LaunchScreen.storyboard b/samples/client/petstore/swift4/default/SwaggerClientTests/SwaggerClient/Base.lproj/LaunchScreen.storyboard deleted file mode 100644 index 2e721e1833f0..000000000000 --- a/samples/client/petstore/swift4/default/SwaggerClientTests/SwaggerClient/Base.lproj/LaunchScreen.storyboard +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/samples/client/petstore/swift4/default/SwaggerClientTests/SwaggerClient/Base.lproj/Main.storyboard b/samples/client/petstore/swift4/default/SwaggerClientTests/SwaggerClient/Base.lproj/Main.storyboard deleted file mode 100644 index 3a2a49bad8c6..000000000000 --- a/samples/client/petstore/swift4/default/SwaggerClientTests/SwaggerClient/Base.lproj/Main.storyboard +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/samples/client/petstore/swift4/default/SwaggerClientTests/SwaggerClient/Info.plist b/samples/client/petstore/swift4/default/SwaggerClientTests/SwaggerClient/Info.plist deleted file mode 100644 index bb71d00fa8ae..000000000000 --- a/samples/client/petstore/swift4/default/SwaggerClientTests/SwaggerClient/Info.plist +++ /dev/null @@ -1,59 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - APPL - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1 - LSRequiresIPhoneOS - - UILaunchStoryboardName - LaunchScreen - UIMainStoryboardFile - Main - UIRequiredDeviceCapabilities - - armv7 - - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UISupportedInterfaceOrientations~ipad - - UIInterfaceOrientationPortrait - UIInterfaceOrientationPortraitUpsideDown - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - NSAppTransportSecurity - - NSExceptionDomains - - petstore.swagger.io - - - NSTemporaryExceptionAllowsInsecureHTTPLoads - - - - - - diff --git a/samples/client/petstore/swift4/default/SwaggerClientTests/SwaggerClient/ViewController.swift b/samples/client/petstore/swift4/default/SwaggerClientTests/SwaggerClient/ViewController.swift deleted file mode 100644 index 8dad16b10f16..000000000000 --- a/samples/client/petstore/swift4/default/SwaggerClientTests/SwaggerClient/ViewController.swift +++ /dev/null @@ -1,23 +0,0 @@ -// -// ViewController.swift -// SwaggerClient -// -// Created by Joseph Zuromski on 2/8/16. -// Copyright © 2016 Swagger. All rights reserved. -// - -import UIKit - -class ViewController: UIViewController { - - override func viewDidLoad() { - super.viewDidLoad() - // Do any additional setup after loading the view, typically from a nib. - } - - override func didReceiveMemoryWarning() { - super.didReceiveMemoryWarning() - // Dispose of any resources that can be recreated. - } - -} diff --git a/samples/client/petstore/swift4/default/SwaggerClientTests/SwaggerClientTests/DateFormatTests.swift b/samples/client/petstore/swift4/default/SwaggerClientTests/SwaggerClientTests/DateFormatTests.swift deleted file mode 100644 index c0c6a0332b4c..000000000000 --- a/samples/client/petstore/swift4/default/SwaggerClientTests/SwaggerClientTests/DateFormatTests.swift +++ /dev/null @@ -1,115 +0,0 @@ -// -// DateFormatTests.swift -// SwaggerClientTests -// -// Created by James on 14/11/2018. -// Copyright © 2018 Swagger. All rights reserved. -// - -import Foundation -import XCTest -@testable import PetstoreClient -@testable import SwaggerClient - -class DateFormatTests: XCTestCase { - - struct DateTest: Codable { - let date: Date - } - - override func setUp() { - super.setUp() - // Put setup code here. This method is called before the invocation of each test method in the class. - } - - override func tearDown() { - // Put teardown code here. This method is called after the invocation of each test method in the class. - super.tearDown() - } - - func testEncodeToJSONAlwaysResultsInUTCEncodedDate() { - var dateComponents = DateComponents() - dateComponents.calendar = Calendar(identifier: .gregorian) - dateComponents.year = 2018 - dateComponents.month = 11 - dateComponents.day = 14 - dateComponents.hour = 11 - dateComponents.minute = 35 - dateComponents.second = 43 - dateComponents.nanosecond = 500 - - // Testing a date with a timezone of +00:00 (UTC) - dateComponents.timeZone = TimeZone(secondsFromGMT: 0) - XCTAssert(dateComponents.isValidDate) - - guard let utcDate = dateComponents.date else { - XCTFail("Couldn't get a valid date") - return - } - - var encodedDate = utcDate.encodeToJSON() as! String - XCTAssert(encodedDate.hasSuffix("Z")) - - // test with a positive timzone offset from UTC - dateComponents.timeZone = TimeZone(secondsFromGMT: 60 * 60) // +01:00 - XCTAssert(dateComponents.isValidDate) - - guard let nonUTCDate1 = dateComponents.date else { - XCTFail("Couldn't get a valid date") - return - } - - encodedDate = nonUTCDate1.encodeToJSON() as! String - XCTAssert(encodedDate.hasSuffix("Z")) - - // test with a negative timzone offset from UTC - dateComponents.timeZone = TimeZone(secondsFromGMT: -(60 * 60)) // -01:00 - XCTAssert(dateComponents.isValidDate) - - guard let nonUTCDate2 = dateComponents.date else { - XCTFail("Couldn't get a valid date") - return - } - - encodedDate = nonUTCDate2.encodeToJSON() as! String - XCTAssert(encodedDate.hasSuffix("Z")) - } - - func testCodableAlwaysResultsInUTCEncodedDate() { - CodableHelper.jsonEncoder.outputFormatting.remove(.prettyPrinted) - - let jsonData = "{\"date\":\"1970-01-01T00:00:00.000Z\"}".data(using: .utf8)! - let decodeResult = CodableHelper.decode(DateTest.self, from: jsonData) - XCTAssert(decodeResult.decodableObj != nil && decodeResult.error == nil) - - var dateComponents = DateComponents() - dateComponents.calendar = Calendar(identifier: .gregorian) - dateComponents.year = 1970 - dateComponents.month = 01 - dateComponents.day = 01 - dateComponents.hour = 00 - dateComponents.minute = 00 - dateComponents.second = 00 - - // Testing a date with a timezone of +00:00 (UTC) - dateComponents.timeZone = TimeZone(secondsFromGMT: 0) - XCTAssert(dateComponents.isValidDate) - - guard let date = dateComponents.date else { - XCTFail("Couldn't get a valid date") - return - } - - let dateTest = DateTest(date: date) - let encodeResult = CodableHelper.encode(dateTest) - XCTAssert(encodeResult.data != nil && encodeResult.error == nil) - guard let jsonString = String(data: encodeResult.data!, encoding: .utf8) else { - XCTFail("Unable to convert encoded data to string.") - return - } - - let exampleJSONString = "{\"date\":\"1970-01-01T00:00:00.000Z\"}" - XCTAssert(jsonString == exampleJSONString, "Encoded JSON String: \(jsonString) should match: \(exampleJSONString)") - } - -} diff --git a/samples/client/petstore/swift4/default/SwaggerClientTests/SwaggerClientTests/Info.plist b/samples/client/petstore/swift4/default/SwaggerClientTests/SwaggerClientTests/Info.plist deleted file mode 100644 index 802f84f540d0..000000000000 --- a/samples/client/petstore/swift4/default/SwaggerClientTests/SwaggerClientTests/Info.plist +++ /dev/null @@ -1,36 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - BNDL - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1 - NSAppTransportSecurity - - NSExceptionDomains - - petstore.swagger.io - - - NSTemporaryExceptionAllowsInsecureHTTPLoads - - - - - - diff --git a/samples/client/petstore/swift4/default/SwaggerClientTests/SwaggerClientTests/PetAPITests.swift b/samples/client/petstore/swift4/default/SwaggerClientTests/SwaggerClientTests/PetAPITests.swift deleted file mode 100644 index 6be5bc6d29fe..000000000000 --- a/samples/client/petstore/swift4/default/SwaggerClientTests/SwaggerClientTests/PetAPITests.swift +++ /dev/null @@ -1,80 +0,0 @@ -// -// PetAPITests.swift -// SwaggerClient -// -// Created by Robin Eggenkamp on 5/21/16. -// Copyright © 2016 Swagger. All rights reserved. -// - -import PetstoreClient -import XCTest -@testable import SwaggerClient - -class PetAPITests: XCTestCase { - - let testTimeout = 10.0 - - override func setUp() { - super.setUp() - // Put setup code here. This method is called before the invocation of each test method in the class. - } - - override func tearDown() { - // Put teardown code here. This method is called after the invocation of each test method in the class. - super.tearDown() - } - - func test1CreatePet() { - let expectation = self.expectation(description: "testCreatePet") - let category = PetstoreClient.Category(id: 1234, name: "eyeColor") - let tags = [Tag(id: 1234, name: "New York"), Tag(id: 124321, name: "Jose")] - let newPet = Pet(id: 1000, category: category, name: "Fluffy", photoUrls: ["https://petstore.com/sample/photo1.jpg", "https://petstore.com/sample/photo2.jpg"], tags: tags, status: .available) - - PetAPI.addPet(body: newPet) { (_, error) in - guard error == nil else { - XCTFail("error creating pet") - return - } - - expectation.fulfill() - } - - self.waitForExpectations(timeout: testTimeout, handler: nil) - } - - func test2GetPet() { - let expectation = self.expectation(description: "testGetPet") - - PetAPI.getPetById(petId: 1000) { (pet, error) in - guard error == nil else { - XCTFail("error retrieving pet") - return - } - - if let pet = pet { - XCTAssert(pet.id == 1000, "invalid id") - XCTAssert(pet.name == "Fluffy", "invalid name") - - expectation.fulfill() - } - } - - self.waitForExpectations(timeout: testTimeout, handler: nil) - } - - func test3DeletePet() { - let expectation = self.expectation(description: "testDeletePet") - - PetAPI.deletePet(petId: 1000) { (_, error) in - guard error == nil else { - XCTFail("error deleting pet") - return - } - - expectation.fulfill() - } - - self.waitForExpectations(timeout: testTimeout, handler: nil) - } - -} diff --git a/samples/client/petstore/swift4/default/SwaggerClientTests/SwaggerClientTests/StoreAPITests.swift b/samples/client/petstore/swift4/default/SwaggerClientTests/SwaggerClientTests/StoreAPITests.swift deleted file mode 100644 index 63ae2281049c..000000000000 --- a/samples/client/petstore/swift4/default/SwaggerClientTests/SwaggerClientTests/StoreAPITests.swift +++ /dev/null @@ -1,120 +0,0 @@ -// -// StoreAPITests.swift -// SwaggerClient -// -// Created by Robin Eggenkamp on 5/21/16. -// Copyright © 2016 Swagger. All rights reserved. -// - -import PetstoreClient -import XCTest -@testable import SwaggerClient - -class StoreAPITests: XCTestCase { - - let isoDateFormat = "yyyy-MM-dd'T'HH:mm:ssZ" - - let testTimeout = 10.0 -/* - func test1PlaceOrder() { - // use explicit naming to reference the enum so that we test we don't regress on enum naming - let shipDate = Date() - let order = Order(id: 1000, petId: 1000, quantity: 10, shipDate: shipDate, status: .placed, complete: true) - let expectation = self.expectation(description: "testPlaceOrder") - - StoreAPI.placeOrder(body: order) { (order, error) in - guard error == nil else { - XCTFail("error placing order: \(error.debugDescription)") - return - } - - if let order = order { - XCTAssert(order.id == 1000, "invalid id") - XCTAssert(order.quantity == 10, "invalid quantity") - XCTAssert(order.status == .placed, "invalid status") - XCTAssert(order.shipDate!.isEqual(shipDate, format: self.isoDateFormat), - "Date should be idempotent") - - expectation.fulfill() - } - } - - self.waitForExpectations(timeout: testTimeout, handler: nil) - } - - func test2GetOrder() { - let expectation = self.expectation(description: "testGetOrder") - - StoreAPI.getOrderById(orderId: 1000) { (order, error) in - guard error == nil else { - XCTFail("error retrieving order: \(error.debugDescription)") - return - } - - if let order = order { - XCTAssert(order.id == 1000, "invalid id") - XCTAssert(order.quantity == 10, "invalid quantity") - XCTAssert(order.status == .placed, "invalid status") - - expectation.fulfill() - } - } - - self.waitForExpectations(timeout: testTimeout, handler: nil) - } - - func test3DeleteOrder() { - let expectation = self.expectation(description: "testDeleteOrder") - - StoreAPI.deleteOrder(orderId: "1000") { (response, error) in - guard error == nil else { - XCTFail("error deleting order") - return - } - - guard let _ = response else { - XCTFail("response is nil") - return - } - - expectation.fulfill() - } - - self.waitForExpectations(timeout: testTimeout, handler: nil) - } -*/ - func testDownloadProgress() { - let responseExpectation = self.expectation(description: "obtain response") - let progressExpectation = self.expectation(description: "obtain progress") - let requestBuilder = StoreAPI.getOrderByIdWithRequestBuilder(orderId: 1000) - - requestBuilder.onProgressReady = { (progress) in - progressExpectation.fulfill() - } - - requestBuilder.execute { (_, _) in - responseExpectation.fulfill() - } - - self.waitForExpectations(timeout: testTimeout, handler: nil) - } - -} - -private extension Date { - - /** - Returns true if the dates are equal given the format string. - - - parameter date: The date to compare to. - - parameter format: The format string to use to compare. - - - returns: true if the dates are equal, given the format string. - */ - func isEqual(_ date: Date, format: String) -> Bool { - let fmt = DateFormatter() - fmt.dateFormat = format - return fmt.string(from: self).isEqual(fmt.string(from: date)) - } - -} diff --git a/samples/client/petstore/swift4/default/SwaggerClientTests/SwaggerClientTests/UserAPITests.swift b/samples/client/petstore/swift4/default/SwaggerClientTests/SwaggerClientTests/UserAPITests.swift deleted file mode 100644 index 0a1ca3902eb6..000000000000 --- a/samples/client/petstore/swift4/default/SwaggerClientTests/SwaggerClientTests/UserAPITests.swift +++ /dev/null @@ -1,67 +0,0 @@ -// -// UserAPITests.swift -// SwaggerClient -// -// Created by Robin Eggenkamp on 5/21/16. -// Copyright © 2016 Swagger. All rights reserved. -// - -import PetstoreClient -import XCTest -@testable import SwaggerClient - -class UserAPITests: XCTestCase { - - let testTimeout = 10.0 - - override func setUp() { - super.setUp() - // Put setup code here. This method is called before the invocation of each test method in the class. - } - - override func tearDown() { - // Put teardown code here. This method is called after the invocation of each test method in the class. - super.tearDown() - } - - func testLogin() { - let expectation = self.expectation(description: "testLogin") - - UserAPI.loginUser(username: "swiftTester", password: "swift") { (_, error) in - guard error == nil else { - XCTFail("error logging in") - return - } - - expectation.fulfill() - } - - self.waitForExpectations(timeout: testTimeout, handler: nil) - } - - func testLogout() { - let expectation = self.expectation(description: "testLogout") - - UserAPI.logoutUser { (_, error) in - guard error == nil else { - XCTFail("error logging out") - return - } - - expectation.fulfill() - } - - self.waitForExpectations(timeout: testTimeout, handler: nil) - } - - func testPathParamsAreEscaped() { - // The path for this operation is /user/{userId}. In order to make a usable path, - // then we must make sure that {userId} is percent-escaped when it is substituted - // into the path. So we intentionally introduce a path with spaces. - let userRequestBuilder = UserAPI.getUserByNameWithRequestBuilder(username: "User Name With Spaces") - let urlContainsSpace = userRequestBuilder.URLString.contains(" ") - - XCTAssert(!urlContainsSpace, "Expected URL to be escaped, but it was not.") - } - -} diff --git a/samples/client/petstore/swift4/default/SwaggerClientTests/pom.xml b/samples/client/petstore/swift4/default/SwaggerClientTests/pom.xml deleted file mode 100644 index bdaa6b98afdf..000000000000 --- a/samples/client/petstore/swift4/default/SwaggerClientTests/pom.xml +++ /dev/null @@ -1,43 +0,0 @@ - - 4.0.0 - io.swagger - Swift4PetstoreClientTests - pom - 1.0-SNAPSHOT - Swift4 Swagger Petstore Client - - - - maven-dependency-plugin - - - package - - copy-dependencies - - - ${project.build.directory} - - - - - - org.codehaus.mojo - exec-maven-plugin - 1.2.1 - - - xcodebuild-test - integration-test - - exec - - - ./run_xcodebuild.sh - - - - - - - diff --git a/samples/client/petstore/swift4/default/SwaggerClientTests/run_xcodebuild.sh b/samples/client/petstore/swift4/default/SwaggerClientTests/run_xcodebuild.sh deleted file mode 100755 index 19e1e06dad60..000000000000 --- a/samples/client/petstore/swift4/default/SwaggerClientTests/run_xcodebuild.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh - -pod install - -xcodebuild clean build build-for-testing -workspace "SwaggerClient.xcworkspace" -scheme "SwaggerClient" -destination "platform=iOS Simulator,name=iPhone 8,OS=latest" && xcodebuild test-without-building -workspace "SwaggerClient.xcworkspace" -scheme "SwaggerClient" -destination "platform=iOS Simulator,name=iPhone 8,OS=latest" | xcpretty && exit ${PIPESTATUS[0]} diff --git a/samples/client/petstore/swift4/default/docs/AdditionalPropertiesClass.md b/samples/client/petstore/swift4/default/docs/AdditionalPropertiesClass.md deleted file mode 100644 index e22d28be1de6..000000000000 --- a/samples/client/petstore/swift4/default/docs/AdditionalPropertiesClass.md +++ /dev/null @@ -1,11 +0,0 @@ -# AdditionalPropertiesClass - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**mapString** | **[String:String]** | | [optional] -**mapMapString** | [String:[String: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/swift4/default/docs/Animal.md b/samples/client/petstore/swift4/default/docs/Animal.md deleted file mode 100644 index 69c601455cd8..000000000000 --- a/samples/client/petstore/swift4/default/docs/Animal.md +++ /dev/null @@ -1,11 +0,0 @@ -# Animal - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**className** | **String** | | -**color** | **String** | | [optional] [default to "red"] - -[[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/swift4/default/docs/AnimalFarm.md b/samples/client/petstore/swift4/default/docs/AnimalFarm.md deleted file mode 100644 index df6bab21dae8..000000000000 --- a/samples/client/petstore/swift4/default/docs/AnimalFarm.md +++ /dev/null @@ -1,9 +0,0 @@ -# AnimalFarm - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/samples/client/petstore/swift4/default/docs/AnotherFakeAPI.md b/samples/client/petstore/swift4/default/docs/AnotherFakeAPI.md deleted file mode 100644 index aead5f1f980f..000000000000 --- a/samples/client/petstore/swift4/default/docs/AnotherFakeAPI.md +++ /dev/null @@ -1,59 +0,0 @@ -# AnotherFakeAPI - -All URIs are relative to *http://petstore.swagger.io:80/v2* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**call123testSpecialTags**](AnotherFakeAPI.md#call123testspecialtags) | **PATCH** /another-fake/dummy | To test special tags - - -# **call123testSpecialTags** -```swift - open class func call123testSpecialTags(body: Client, completion: @escaping (_ data: Client?, _ error: Error?) -> Void) -``` - -To test special tags - -To test special tags and operation ID starting with number - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let body = Client(client: "client_example") // Client | client model - -// To test special tags -AnotherFakeAPI.call123testSpecialTags(body: body) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Client**](Client.md) | client model | - -### Return type - -[**Client**](Client.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **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/swift4/default/docs/ApiResponse.md b/samples/client/petstore/swift4/default/docs/ApiResponse.md deleted file mode 100644 index c6d9768fe9bf..000000000000 --- a/samples/client/petstore/swift4/default/docs/ApiResponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# ApiResponse - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**code** | **Int** | | [optional] -**type** | **String** | | [optional] -**message** | **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/swift4/default/docs/ArrayOfArrayOfNumberOnly.md b/samples/client/petstore/swift4/default/docs/ArrayOfArrayOfNumberOnly.md deleted file mode 100644 index c6fceff5e08d..000000000000 --- a/samples/client/petstore/swift4/default/docs/ArrayOfArrayOfNumberOnly.md +++ /dev/null @@ -1,10 +0,0 @@ -# ArrayOfArrayOfNumberOnly - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**arrayArrayNumber** | [[Double]] | | [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/swift4/default/docs/ArrayOfNumberOnly.md b/samples/client/petstore/swift4/default/docs/ArrayOfNumberOnly.md deleted file mode 100644 index f09f8fa6f70f..000000000000 --- a/samples/client/petstore/swift4/default/docs/ArrayOfNumberOnly.md +++ /dev/null @@ -1,10 +0,0 @@ -# ArrayOfNumberOnly - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**arrayNumber** | **[Double]** | | [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/swift4/default/docs/ArrayTest.md b/samples/client/petstore/swift4/default/docs/ArrayTest.md deleted file mode 100644 index bf416b8330cc..000000000000 --- a/samples/client/petstore/swift4/default/docs/ArrayTest.md +++ /dev/null @@ -1,12 +0,0 @@ -# ArrayTest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**arrayOfString** | **[String]** | | [optional] -**arrayArrayOfInteger** | [[Int64]] | | [optional] -**arrayArrayOfModel** | [[ReadOnlyFirst]] | | [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/swift4/default/docs/Capitalization.md b/samples/client/petstore/swift4/default/docs/Capitalization.md deleted file mode 100644 index 95374216c773..000000000000 --- a/samples/client/petstore/swift4/default/docs/Capitalization.md +++ /dev/null @@ -1,15 +0,0 @@ -# Capitalization - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**smallCamel** | **String** | | [optional] -**capitalCamel** | **String** | | [optional] -**smallSnake** | **String** | | [optional] -**capitalSnake** | **String** | | [optional] -**sCAETHFlowPoints** | **String** | | [optional] -**ATT_NAME** | **String** | Name of the pet | [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/swift4/default/docs/Cat.md b/samples/client/petstore/swift4/default/docs/Cat.md deleted file mode 100644 index fb5949b15761..000000000000 --- a/samples/client/petstore/swift4/default/docs/Cat.md +++ /dev/null @@ -1,10 +0,0 @@ -# Cat - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**declawed** | **Bool** | | [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/swift4/default/docs/CatAllOf.md b/samples/client/petstore/swift4/default/docs/CatAllOf.md deleted file mode 100644 index 79789be61c01..000000000000 --- a/samples/client/petstore/swift4/default/docs/CatAllOf.md +++ /dev/null @@ -1,10 +0,0 @@ -# CatAllOf - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**declawed** | **Bool** | | [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/swift4/default/docs/Category.md b/samples/client/petstore/swift4/default/docs/Category.md deleted file mode 100644 index 5ca5408c0f96..000000000000 --- a/samples/client/petstore/swift4/default/docs/Category.md +++ /dev/null @@ -1,11 +0,0 @@ -# Category - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Int64** | | [optional] -**name** | **String** | | [default to "default-name"] - -[[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/swift4/default/docs/ClassModel.md b/samples/client/petstore/swift4/default/docs/ClassModel.md deleted file mode 100644 index e3912fdf0fd5..000000000000 --- a/samples/client/petstore/swift4/default/docs/ClassModel.md +++ /dev/null @@ -1,10 +0,0 @@ -# ClassModel - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**_class** | **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/swift4/default/docs/Client.md b/samples/client/petstore/swift4/default/docs/Client.md deleted file mode 100644 index 0de1b238c36f..000000000000 --- a/samples/client/petstore/swift4/default/docs/Client.md +++ /dev/null @@ -1,10 +0,0 @@ -# Client - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**client** | **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/swift4/default/docs/Dog.md b/samples/client/petstore/swift4/default/docs/Dog.md deleted file mode 100644 index 4824786da049..000000000000 --- a/samples/client/petstore/swift4/default/docs/Dog.md +++ /dev/null @@ -1,10 +0,0 @@ -# Dog - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**breed** | **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/swift4/default/docs/DogAllOf.md b/samples/client/petstore/swift4/default/docs/DogAllOf.md deleted file mode 100644 index 9302ef52e938..000000000000 --- a/samples/client/petstore/swift4/default/docs/DogAllOf.md +++ /dev/null @@ -1,10 +0,0 @@ -# DogAllOf - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**breed** | **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/swift4/default/docs/EnumArrays.md b/samples/client/petstore/swift4/default/docs/EnumArrays.md deleted file mode 100644 index b9a9807d3c8e..000000000000 --- a/samples/client/petstore/swift4/default/docs/EnumArrays.md +++ /dev/null @@ -1,11 +0,0 @@ -# EnumArrays - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**justSymbol** | **String** | | [optional] -**arrayEnum** | **[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/swift4/default/docs/EnumClass.md b/samples/client/petstore/swift4/default/docs/EnumClass.md deleted file mode 100644 index 67f017becd0c..000000000000 --- a/samples/client/petstore/swift4/default/docs/EnumClass.md +++ /dev/null @@ -1,9 +0,0 @@ -# EnumClass - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/samples/client/petstore/swift4/default/docs/EnumTest.md b/samples/client/petstore/swift4/default/docs/EnumTest.md deleted file mode 100644 index bc9b036dd769..000000000000 --- a/samples/client/petstore/swift4/default/docs/EnumTest.md +++ /dev/null @@ -1,14 +0,0 @@ -# EnumTest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**enumString** | **String** | | [optional] -**enumStringRequired** | **String** | | -**enumInteger** | **Int** | | [optional] -**enumNumber** | **Double** | | [optional] -**outerEnum** | [**OuterEnum**](OuterEnum.md) | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/samples/client/petstore/swift4/default/docs/FakeAPI.md b/samples/client/petstore/swift4/default/docs/FakeAPI.md deleted file mode 100644 index d0ab705d4e4b..000000000000 --- a/samples/client/petstore/swift4/default/docs/FakeAPI.md +++ /dev/null @@ -1,662 +0,0 @@ -# FakeAPI - -All URIs are relative to *http://petstore.swagger.io:80/v2* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**fakeOuterBooleanSerialize**](FakeAPI.md#fakeouterbooleanserialize) | **POST** /fake/outer/boolean | -[**fakeOuterCompositeSerialize**](FakeAPI.md#fakeoutercompositeserialize) | **POST** /fake/outer/composite | -[**fakeOuterNumberSerialize**](FakeAPI.md#fakeouternumberserialize) | **POST** /fake/outer/number | -[**fakeOuterStringSerialize**](FakeAPI.md#fakeouterstringserialize) | **POST** /fake/outer/string | -[**testBodyWithFileSchema**](FakeAPI.md#testbodywithfileschema) | **PUT** /fake/body-with-file-schema | -[**testBodyWithQueryParams**](FakeAPI.md#testbodywithqueryparams) | **PUT** /fake/body-with-query-params | -[**testClientModel**](FakeAPI.md#testclientmodel) | **PATCH** /fake | To test \"client\" model -[**testEndpointParameters**](FakeAPI.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 -[**testEnumParameters**](FakeAPI.md#testenumparameters) | **GET** /fake | To test enum parameters -[**testGroupParameters**](FakeAPI.md#testgroupparameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) -[**testInlineAdditionalProperties**](FakeAPI.md#testinlineadditionalproperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties -[**testJsonFormData**](FakeAPI.md#testjsonformdata) | **GET** /fake/jsonFormData | test json serialization of form data - - -# **fakeOuterBooleanSerialize** -```swift - open class func fakeOuterBooleanSerialize(body: Bool? = nil, completion: @escaping (_ data: Bool?, _ error: Error?) -> Void) -``` - - - -Test serialization of outer boolean types - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let body = true // Bool | Input boolean as post body (optional) - -FakeAPI.fakeOuterBooleanSerialize(body: body) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | **Bool** | Input boolean as post body | [optional] - -### Return type - -**Bool** - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: */* - -[[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) - -# **fakeOuterCompositeSerialize** -```swift - open class func fakeOuterCompositeSerialize(body: OuterComposite? = nil, completion: @escaping (_ data: OuterComposite?, _ error: Error?) -> Void) -``` - - - -Test serialization of object with outer number type - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let body = OuterComposite(myNumber: 123, myString: "myString_example", myBoolean: false) // OuterComposite | Input composite as post body (optional) - -FakeAPI.fakeOuterCompositeSerialize(body: body) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**OuterComposite**](OuterComposite.md) | Input composite as post body | [optional] - -### Return type - -[**OuterComposite**](OuterComposite.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: */* - -[[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) - -# **fakeOuterNumberSerialize** -```swift - open class func fakeOuterNumberSerialize(body: Double? = nil, completion: @escaping (_ data: Double?, _ error: Error?) -> Void) -``` - - - -Test serialization of outer number types - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let body = 987 // Double | Input number as post body (optional) - -FakeAPI.fakeOuterNumberSerialize(body: body) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | **Double** | Input number as post body | [optional] - -### Return type - -**Double** - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: */* - -[[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) - -# **fakeOuterStringSerialize** -```swift - open class func fakeOuterStringSerialize(body: String? = nil, completion: @escaping (_ data: String?, _ error: Error?) -> Void) -``` - - - -Test serialization of outer string types - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let body = "body_example" // String | Input string as post body (optional) - -FakeAPI.fakeOuterStringSerialize(body: body) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | **String** | Input string as post body | [optional] - -### Return type - -**String** - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: */* - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **testBodyWithFileSchema** -```swift - open class func testBodyWithFileSchema(body: FileSchemaTestClass, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - - - -For this test, the body for this request much reference a schema named `File`. - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let body = FileSchemaTestClass(file: File(sourceURI: "sourceURI_example"), files: [File(sourceURI: "sourceURI_example")]) // FileSchemaTestClass | - -FakeAPI.testBodyWithFileSchema(body: body) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**FileSchemaTestClass**](FileSchemaTestClass.md) | | - -### Return type - -Void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **testBodyWithQueryParams** -```swift - open class func testBodyWithQueryParams(query: String, body: User, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - - - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let query = "query_example" // String | -let body = User(id: 123, username: "username_example", firstName: "firstName_example", lastName: "lastName_example", email: "email_example", password: "password_example", phone: "phone_example", userStatus: 123) // User | - -FakeAPI.testBodyWithQueryParams(query: query, body: body) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **query** | **String** | | - **body** | [**User**](User.md) | | - -### Return type - -Void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **testClientModel** -```swift - open class func testClientModel(body: Client, completion: @escaping (_ data: Client?, _ error: Error?) -> Void) -``` - -To test \"client\" model - -To test \"client\" model - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let body = Client(client: "client_example") // Client | client model - -// To test \"client\" model -FakeAPI.testClientModel(body: body) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Client**](Client.md) | client model | - -### Return type - -[**Client**](Client.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **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) - -# **testEndpointParameters** -```swift - open class func testEndpointParameters(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - -Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - -Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let number = 987 // Double | None -let double = 987 // Double | None -let patternWithoutDelimiter = "patternWithoutDelimiter_example" // String | None -let byte = 987 // Data | None -let integer = 987 // Int | None (optional) -let int32 = 987 // Int | None (optional) -let int64 = 987 // Int64 | None (optional) -let float = 987 // Float | None (optional) -let string = "string_example" // String | None (optional) -let binary = URL(string: "https://example.com")! // URL | None (optional) -let date = Date() // Date | None (optional) -let dateTime = Date() // Date | None (optional) -let password = "password_example" // String | None (optional) -let callback = "callback_example" // String | None (optional) - -// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 -FakeAPI.testEndpointParameters(number: number, double: double, patternWithoutDelimiter: patternWithoutDelimiter, byte: byte, integer: integer, int32: int32, int64: int64, float: float, string: string, binary: binary, date: date, dateTime: dateTime, password: password, callback: callback) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **number** | **Double** | None | - **double** | **Double** | None | - **patternWithoutDelimiter** | **String** | None | - **byte** | **Data** | None | - **integer** | **Int** | None | [optional] - **int32** | **Int** | None | [optional] - **int64** | **Int64** | None | [optional] - **float** | **Float** | None | [optional] - **string** | **String** | None | [optional] - **binary** | **URL** | None | [optional] - **date** | **Date** | None | [optional] - **dateTime** | **Date** | None | [optional] - **password** | **String** | None | [optional] - **callback** | **String** | None | [optional] - -### Return type - -Void (empty response body) - -### Authorization - -[http_basic_test](../README.md#http_basic_test) - -### 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) - -# **testEnumParameters** -```swift - open class func testEnumParameters(enumHeaderStringArray: [String]? = nil, enumHeaderString: EnumHeaderString_testEnumParameters? = nil, enumQueryStringArray: [String]? = nil, enumQueryString: EnumQueryString_testEnumParameters? = nil, enumQueryInteger: EnumQueryInteger_testEnumParameters? = nil, enumQueryDouble: EnumQueryDouble_testEnumParameters? = nil, enumFormStringArray: [String]? = nil, enumFormString: EnumFormString_testEnumParameters? = nil, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - -To test enum parameters - -To test enum parameters - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let enumHeaderStringArray = ["enumHeaderStringArray_example"] // [String] | Header parameter enum test (string array) (optional) -let enumHeaderString = "enumHeaderString_example" // String | Header parameter enum test (string) (optional) (default to .efg) -let enumQueryStringArray = ["enumQueryStringArray_example"] // [String] | Query parameter enum test (string array) (optional) -let enumQueryString = "enumQueryString_example" // String | Query parameter enum test (string) (optional) (default to .efg) -let enumQueryInteger = 987 // Int | Query parameter enum test (double) (optional) -let enumQueryDouble = 987 // Double | Query parameter enum test (double) (optional) -let enumFormStringArray = ["inner_example"] // [String] | Form parameter enum test (string array) (optional) (default to .dollar) -let enumFormString = "enumFormString_example" // String | Form parameter enum test (string) (optional) (default to .efg) - -// To test enum parameters -FakeAPI.testEnumParameters(enumHeaderStringArray: enumHeaderStringArray, enumHeaderString: enumHeaderString, enumQueryStringArray: enumQueryStringArray, enumQueryString: enumQueryString, enumQueryInteger: enumQueryInteger, enumQueryDouble: enumQueryDouble, enumFormStringArray: enumFormStringArray, enumFormString: enumFormString) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **enumHeaderStringArray** | [**[String]**](String.md) | Header parameter enum test (string array) | [optional] - **enumHeaderString** | **String** | Header parameter enum test (string) | [optional] [default to .efg] - **enumQueryStringArray** | [**[String]**](String.md) | Query parameter enum test (string array) | [optional] - **enumQueryString** | **String** | Query parameter enum test (string) | [optional] [default to .efg] - **enumQueryInteger** | **Int** | Query parameter enum test (double) | [optional] - **enumQueryDouble** | **Double** | Query parameter enum test (double) | [optional] - **enumFormStringArray** | [**[String]**](String.md) | Form parameter enum test (string array) | [optional] [default to .dollar] - **enumFormString** | **String** | Form parameter enum test (string) | [optional] [default to .efg] - -### Return type - -Void (empty response body) - -### Authorization - -No authorization required - -### 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) - -# **testGroupParameters** -```swift - open class func testGroupParameters(requiredStringGroup: Int, requiredBooleanGroup: Bool, requiredInt64Group: Int64, stringGroup: Int? = nil, booleanGroup: Bool? = nil, int64Group: Int64? = nil, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - -Fake endpoint to test group parameters (optional) - -Fake endpoint to test group parameters (optional) - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let requiredStringGroup = 987 // Int | Required String in group parameters -let requiredBooleanGroup = true // Bool | Required Boolean in group parameters -let requiredInt64Group = 987 // Int64 | Required Integer in group parameters -let stringGroup = 987 // Int | String in group parameters (optional) -let booleanGroup = true // Bool | Boolean in group parameters (optional) -let int64Group = 987 // Int64 | Integer in group parameters (optional) - -// Fake endpoint to test group parameters (optional) -FakeAPI.testGroupParameters(requiredStringGroup: requiredStringGroup, requiredBooleanGroup: requiredBooleanGroup, requiredInt64Group: requiredInt64Group, stringGroup: stringGroup, booleanGroup: booleanGroup, int64Group: int64Group) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **requiredStringGroup** | **Int** | Required String in group parameters | - **requiredBooleanGroup** | **Bool** | Required Boolean in group parameters | - **requiredInt64Group** | **Int64** | Required Integer in group parameters | - **stringGroup** | **Int** | String in group parameters | [optional] - **booleanGroup** | **Bool** | Boolean in group parameters | [optional] - **int64Group** | **Int64** | Integer in group parameters | [optional] - -### Return type - -Void (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) - -# **testInlineAdditionalProperties** -```swift - open class func testInlineAdditionalProperties(param: [String:String], completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - -test inline additionalProperties - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let param = "TODO" // [String:String] | request body - -// test inline additionalProperties -FakeAPI.testInlineAdditionalProperties(param: param) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **param** | [**[String:String]**](String.md) | request body | - -### Return type - -Void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **testJsonFormData** -```swift - open class func testJsonFormData(param: String, param2: String, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - -test json serialization of form data - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let param = "param_example" // String | field1 -let param2 = "param2_example" // String | field2 - -// test json serialization of form data -FakeAPI.testJsonFormData(param: param, param2: param2) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **param** | **String** | field1 | - **param2** | **String** | field2 | - -### Return type - -Void (empty response body) - -### Authorization - -No authorization required - -### 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) - diff --git a/samples/client/petstore/swift4/default/docs/FakeClassnameTags123API.md b/samples/client/petstore/swift4/default/docs/FakeClassnameTags123API.md deleted file mode 100644 index 9f24b46edbc3..000000000000 --- a/samples/client/petstore/swift4/default/docs/FakeClassnameTags123API.md +++ /dev/null @@ -1,59 +0,0 @@ -# FakeClassnameTags123API - -All URIs are relative to *http://petstore.swagger.io:80/v2* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**testClassname**](FakeClassnameTags123API.md#testclassname) | **PATCH** /fake_classname_test | To test class name in snake case - - -# **testClassname** -```swift - open class func testClassname(body: Client, completion: @escaping (_ data: Client?, _ error: Error?) -> Void) -``` - -To test class name in snake case - -To test class name in snake case - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let body = Client(client: "client_example") // Client | client model - -// To test class name in snake case -FakeClassnameTags123API.testClassname(body: body) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Client**](Client.md) | client model | - -### Return type - -[**Client**](Client.md) - -### Authorization - -[api_key_query](../README.md#api_key_query) - -### HTTP request headers - - - **Content-Type**: application/json - - **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/swift4/default/docs/File.md b/samples/client/petstore/swift4/default/docs/File.md deleted file mode 100644 index 3edfef17b794..000000000000 --- a/samples/client/petstore/swift4/default/docs/File.md +++ /dev/null @@ -1,10 +0,0 @@ -# File - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**sourceURI** | **String** | Test capitalization | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/samples/client/petstore/swift4/default/docs/FileSchemaTestClass.md b/samples/client/petstore/swift4/default/docs/FileSchemaTestClass.md deleted file mode 100644 index afdacc60b2c3..000000000000 --- a/samples/client/petstore/swift4/default/docs/FileSchemaTestClass.md +++ /dev/null @@ -1,11 +0,0 @@ -# FileSchemaTestClass - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**file** | [**File**](File.md) | | [optional] -**files** | [File] | | [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/swift4/default/docs/FormatTest.md b/samples/client/petstore/swift4/default/docs/FormatTest.md deleted file mode 100644 index f74d94f6c46a..000000000000 --- a/samples/client/petstore/swift4/default/docs/FormatTest.md +++ /dev/null @@ -1,22 +0,0 @@ -# FormatTest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**integer** | **Int** | | [optional] -**int32** | **Int** | | [optional] -**int64** | **Int64** | | [optional] -**number** | **Double** | | -**float** | **Float** | | [optional] -**double** | **Double** | | [optional] -**string** | **String** | | [optional] -**byte** | **Data** | | -**binary** | **URL** | | [optional] -**date** | **Date** | | -**dateTime** | **Date** | | [optional] -**uuid** | **UUID** | | [optional] -**password** | **String** | | - -[[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/swift4/default/docs/HasOnlyReadOnly.md b/samples/client/petstore/swift4/default/docs/HasOnlyReadOnly.md deleted file mode 100644 index 57b6e3a17e67..000000000000 --- a/samples/client/petstore/swift4/default/docs/HasOnlyReadOnly.md +++ /dev/null @@ -1,11 +0,0 @@ -# HasOnlyReadOnly - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**bar** | **String** | | [optional] [readonly] -**foo** | **String** | | [optional] [readonly] - -[[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/swift4/default/docs/List.md b/samples/client/petstore/swift4/default/docs/List.md deleted file mode 100644 index b77718302edf..000000000000 --- a/samples/client/petstore/swift4/default/docs/List.md +++ /dev/null @@ -1,10 +0,0 @@ -# List - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**_123list** | **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/swift4/default/docs/MapTest.md b/samples/client/petstore/swift4/default/docs/MapTest.md deleted file mode 100644 index 56213c4113f6..000000000000 --- a/samples/client/petstore/swift4/default/docs/MapTest.md +++ /dev/null @@ -1,13 +0,0 @@ -# MapTest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**mapMapOfString** | [String:[String:String]] | | [optional] -**mapOfEnumString** | **[String:String]** | | [optional] -**directMap** | **[String:Bool]** | | [optional] -**indirectMap** | [**StringBooleanMap**](StringBooleanMap.md) | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/samples/client/petstore/swift4/default/docs/MixedPropertiesAndAdditionalPropertiesClass.md b/samples/client/petstore/swift4/default/docs/MixedPropertiesAndAdditionalPropertiesClass.md deleted file mode 100644 index fcffb8ecdbf3..000000000000 --- a/samples/client/petstore/swift4/default/docs/MixedPropertiesAndAdditionalPropertiesClass.md +++ /dev/null @@ -1,12 +0,0 @@ -# MixedPropertiesAndAdditionalPropertiesClass - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**uuid** | **UUID** | | [optional] -**dateTime** | **Date** | | [optional] -**map** | [String:Animal] | | [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/swift4/default/docs/Model200Response.md b/samples/client/petstore/swift4/default/docs/Model200Response.md deleted file mode 100644 index 5865ea690cc3..000000000000 --- a/samples/client/petstore/swift4/default/docs/Model200Response.md +++ /dev/null @@ -1,11 +0,0 @@ -# Model200Response - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **Int** | | [optional] -**_class** | **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/swift4/default/docs/Name.md b/samples/client/petstore/swift4/default/docs/Name.md deleted file mode 100644 index f7b180292cd6..000000000000 --- a/samples/client/petstore/swift4/default/docs/Name.md +++ /dev/null @@ -1,13 +0,0 @@ -# Name - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **Int** | | -**snakeCase** | **Int** | | [optional] [readonly] -**property** | **String** | | [optional] -**_123number** | **Int** | | [optional] [readonly] - -[[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/swift4/default/docs/NumberOnly.md b/samples/client/petstore/swift4/default/docs/NumberOnly.md deleted file mode 100644 index 72bd361168b5..000000000000 --- a/samples/client/petstore/swift4/default/docs/NumberOnly.md +++ /dev/null @@ -1,10 +0,0 @@ -# NumberOnly - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**justNumber** | **Double** | | [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/swift4/default/docs/Order.md b/samples/client/petstore/swift4/default/docs/Order.md deleted file mode 100644 index 15487f01175c..000000000000 --- a/samples/client/petstore/swift4/default/docs/Order.md +++ /dev/null @@ -1,15 +0,0 @@ -# Order - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Int64** | | [optional] -**petId** | **Int64** | | [optional] -**quantity** | **Int** | | [optional] -**shipDate** | **Date** | | [optional] -**status** | **String** | Order Status | [optional] -**complete** | **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/swift4/default/docs/OuterComposite.md b/samples/client/petstore/swift4/default/docs/OuterComposite.md deleted file mode 100644 index d6b3583bc3ff..000000000000 --- a/samples/client/petstore/swift4/default/docs/OuterComposite.md +++ /dev/null @@ -1,12 +0,0 @@ -# OuterComposite - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**myNumber** | **Double** | | [optional] -**myString** | **String** | | [optional] -**myBoolean** | **Bool** | | [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/swift4/default/docs/OuterEnum.md b/samples/client/petstore/swift4/default/docs/OuterEnum.md deleted file mode 100644 index 06d413b01680..000000000000 --- a/samples/client/petstore/swift4/default/docs/OuterEnum.md +++ /dev/null @@ -1,9 +0,0 @@ -# OuterEnum - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/samples/client/petstore/swift4/default/docs/Pet.md b/samples/client/petstore/swift4/default/docs/Pet.md deleted file mode 100644 index 5c05f98fad4a..000000000000 --- a/samples/client/petstore/swift4/default/docs/Pet.md +++ /dev/null @@ -1,15 +0,0 @@ -# Pet - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Int64** | | [optional] -**category** | [**Category**](Category.md) | | [optional] -**name** | **String** | | -**photoUrls** | **[String]** | | -**tags** | [Tag] | | [optional] -**status** | **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/swift4/default/docs/PetAPI.md b/samples/client/petstore/swift4/default/docs/PetAPI.md deleted file mode 100644 index 27efe0833476..000000000000 --- a/samples/client/petstore/swift4/default/docs/PetAPI.md +++ /dev/null @@ -1,469 +0,0 @@ -# PetAPI - -All URIs are relative to *http://petstore.swagger.io:80/v2* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**addPet**](PetAPI.md#addpet) | **POST** /pet | Add a new pet to the store -[**deletePet**](PetAPI.md#deletepet) | **DELETE** /pet/{petId} | Deletes a pet -[**findPetsByStatus**](PetAPI.md#findpetsbystatus) | **GET** /pet/findByStatus | Finds Pets by status -[**findPetsByTags**](PetAPI.md#findpetsbytags) | **GET** /pet/findByTags | Finds Pets by tags -[**getPetById**](PetAPI.md#getpetbyid) | **GET** /pet/{petId} | Find pet by ID -[**updatePet**](PetAPI.md#updatepet) | **PUT** /pet | Update an existing pet -[**updatePetWithForm**](PetAPI.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data -[**uploadFile**](PetAPI.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image -[**uploadFileWithRequiredFile**](PetAPI.md#uploadfilewithrequiredfile) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required) - - -# **addPet** -```swift - open class func addPet(body: Pet, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - -Add a new pet to the store - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let body = Pet(id: 123, category: Category(id: 123, name: "name_example"), name: "name_example", photoUrls: ["photoUrls_example"], tags: [Tag(id: 123, name: "name_example")], status: "status_example") // Pet | Pet object that needs to be added to the store - -// Add a new pet to the store -PetAPI.addPet(body: body) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Pet**](Pet.md) | Pet object that needs to be added to the store | - -### Return type - -Void (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) - -# **deletePet** -```swift - open class func deletePet(petId: Int64, apiKey: String? = nil, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - -Deletes a pet - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let petId = 987 // Int64 | Pet id to delete -let apiKey = "apiKey_example" // String | (optional) - -// Deletes a pet -PetAPI.deletePet(petId: petId, apiKey: apiKey) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Int64** | Pet id to delete | - **apiKey** | **String** | | [optional] - -### Return type - -Void (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) - -# **findPetsByStatus** -```swift - open class func findPetsByStatus(status: [String], completion: @escaping (_ data: [Pet]?, _ error: Error?) -> Void) -``` - -Finds Pets by status - -Multiple status values can be provided with comma separated strings - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let status = ["status_example"] // [String] | Status values that need to be considered for filter - -// Finds Pets by status -PetAPI.findPetsByStatus(status: status) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **status** | [**[String]**](String.md) | Status values that need to be considered for filter | - -### Return type - -[**[Pet]**](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) - -# **findPetsByTags** -```swift - open class func findPetsByTags(tags: [String], completion: @escaping (_ data: [Pet]?, _ error: Error?) -> Void) -``` - -Finds Pets by tags - -Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let tags = ["inner_example"] // [String] | Tags to filter by - -// Finds Pets by tags -PetAPI.findPetsByTags(tags: tags) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **tags** | [**[String]**](String.md) | Tags to filter by | - -### Return type - -[**[Pet]**](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) - -# **getPetById** -```swift - open class func getPetById(petId: Int64, completion: @escaping (_ data: Pet?, _ error: Error?) -> Void) -``` - -Find pet by ID - -Returns a single pet - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let petId = 987 // Int64 | ID of pet to return - -// Find pet by ID -PetAPI.getPetById(petId: petId) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Int64** | ID of pet to return | - -### Return type - -[**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) - -# **updatePet** -```swift - open class func updatePet(body: Pet, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - -Update an existing pet - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let body = Pet(id: 123, category: Category(id: 123, name: "name_example"), name: "name_example", photoUrls: ["photoUrls_example"], tags: [Tag(id: 123, name: "name_example")], status: "status_example") // Pet | Pet object that needs to be added to the store - -// Update an existing pet -PetAPI.updatePet(body: body) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Pet**](Pet.md) | Pet object that needs to be added to the store | - -### Return type - -Void (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) - -# **updatePetWithForm** -```swift - open class func updatePetWithForm(petId: Int64, name: String? = nil, status: String? = nil, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - -Updates a pet in the store with form data - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let petId = 987 // Int64 | ID of pet that needs to be updated -let name = "name_example" // String | Updated name of the pet (optional) -let status = "status_example" // String | Updated status of the pet (optional) - -// Updates a pet in the store with form data -PetAPI.updatePetWithForm(petId: petId, name: name, status: status) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Int64** | ID of pet that needs to be updated | - **name** | **String** | Updated name of the pet | [optional] - **status** | **String** | Updated status of the pet | [optional] - -### Return type - -Void (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) - -# **uploadFile** -```swift - open class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil, completion: @escaping (_ data: ApiResponse?, _ error: Error?) -> Void) -``` - -uploads an image - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let petId = 987 // Int64 | ID of pet to update -let additionalMetadata = "additionalMetadata_example" // String | Additional data to pass to server (optional) -let file = URL(string: "https://example.com")! // URL | file to upload (optional) - -// uploads an image -PetAPI.uploadFile(petId: petId, additionalMetadata: additionalMetadata, file: file) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Int64** | ID of pet to update | - **additionalMetadata** | **String** | Additional data to pass to server | [optional] - **file** | **URL** | file to upload | [optional] - -### Return type - -[**ApiResponse**](ApiResponse.md) - -### Authorization - -[petstore_auth](../README.md#petstore_auth) - -### HTTP request headers - - - **Content-Type**: multipart/form-data - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **uploadFileWithRequiredFile** -```swift - open class func uploadFileWithRequiredFile(petId: Int64, requiredFile: URL, additionalMetadata: String? = nil, completion: @escaping (_ data: ApiResponse?, _ error: Error?) -> Void) -``` - -uploads an image (required) - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let petId = 987 // Int64 | ID of pet to update -let requiredFile = URL(string: "https://example.com")! // URL | file to upload -let additionalMetadata = "additionalMetadata_example" // String | Additional data to pass to server (optional) - -// uploads an image (required) -PetAPI.uploadFileWithRequiredFile(petId: petId, requiredFile: requiredFile, additionalMetadata: additionalMetadata) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Int64** | ID of pet to update | - **requiredFile** | **URL** | file to upload | - **additionalMetadata** | **String** | Additional data to pass to server | [optional] - -### Return type - -[**ApiResponse**](ApiResponse.md) - -### Authorization - -[petstore_auth](../README.md#petstore_auth) - -### HTTP request headers - - - **Content-Type**: multipart/form-data - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/samples/client/petstore/swift4/default/docs/ReadOnlyFirst.md b/samples/client/petstore/swift4/default/docs/ReadOnlyFirst.md deleted file mode 100644 index ed537b87598b..000000000000 --- a/samples/client/petstore/swift4/default/docs/ReadOnlyFirst.md +++ /dev/null @@ -1,11 +0,0 @@ -# ReadOnlyFirst - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**bar** | **String** | | [optional] [readonly] -**baz** | **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/swift4/default/docs/Return.md b/samples/client/petstore/swift4/default/docs/Return.md deleted file mode 100644 index 66d17c27c887..000000000000 --- a/samples/client/petstore/swift4/default/docs/Return.md +++ /dev/null @@ -1,10 +0,0 @@ -# Return - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**_return** | **Int** | | [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/swift4/default/docs/SpecialModelName.md b/samples/client/petstore/swift4/default/docs/SpecialModelName.md deleted file mode 100644 index 3ec27a38c2ac..000000000000 --- a/samples/client/petstore/swift4/default/docs/SpecialModelName.md +++ /dev/null @@ -1,10 +0,0 @@ -# SpecialModelName - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**specialPropertyName** | **Int64** | | [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/swift4/default/docs/StoreAPI.md b/samples/client/petstore/swift4/default/docs/StoreAPI.md deleted file mode 100644 index 36365ca51993..000000000000 --- a/samples/client/petstore/swift4/default/docs/StoreAPI.md +++ /dev/null @@ -1,206 +0,0 @@ -# StoreAPI - -All URIs are relative to *http://petstore.swagger.io:80/v2* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**deleteOrder**](StoreAPI.md#deleteorder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID -[**getInventory**](StoreAPI.md#getinventory) | **GET** /store/inventory | Returns pet inventories by status -[**getOrderById**](StoreAPI.md#getorderbyid) | **GET** /store/order/{order_id} | Find purchase order by ID -[**placeOrder**](StoreAPI.md#placeorder) | **POST** /store/order | Place an order for a pet - - -# **deleteOrder** -```swift - open class func deleteOrder(orderId: String, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - -Delete purchase order by ID - -For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let orderId = "orderId_example" // String | ID of the order that needs to be deleted - -// Delete purchase order by ID -StoreAPI.deleteOrder(orderId: orderId) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **orderId** | **String** | ID of the order that needs to be deleted | - -### Return type - -Void (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) - -# **getInventory** -```swift - open class func getInventory(completion: @escaping (_ data: [String:Int]?, _ error: Error?) -> Void) -``` - -Returns pet inventories by status - -Returns a map of status codes to quantities - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - - -// Returns pet inventories by status -StoreAPI.getInventory() { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -**[String:Int]** - -### 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) - -# **getOrderById** -```swift - open class func getOrderById(orderId: Int64, completion: @escaping (_ data: Order?, _ error: Error?) -> Void) -``` - -Find purchase order by ID - -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let orderId = 987 // Int64 | ID of pet that needs to be fetched - -// Find purchase order by ID -StoreAPI.getOrderById(orderId: orderId) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **orderId** | **Int64** | ID of pet that needs to be fetched | - -### Return type - -[**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) - -# **placeOrder** -```swift - open class func placeOrder(body: Order, completion: @escaping (_ data: Order?, _ error: Error?) -> Void) -``` - -Place an order for a pet - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let body = Order(id: 123, petId: 123, quantity: 123, shipDate: Date(), status: "status_example", complete: false) // Order | order placed for purchasing the pet - -// Place an order for a pet -StoreAPI.placeOrder(body: body) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Order**](Order.md) | order placed for purchasing the pet | - -### Return type - -[**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/swift4/default/docs/StringBooleanMap.md b/samples/client/petstore/swift4/default/docs/StringBooleanMap.md deleted file mode 100644 index 7abf11ec68b1..000000000000 --- a/samples/client/petstore/swift4/default/docs/StringBooleanMap.md +++ /dev/null @@ -1,9 +0,0 @@ -# StringBooleanMap - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/samples/client/petstore/swift4/default/docs/Tag.md b/samples/client/petstore/swift4/default/docs/Tag.md deleted file mode 100644 index ff4ac8aa4519..000000000000 --- a/samples/client/petstore/swift4/default/docs/Tag.md +++ /dev/null @@ -1,11 +0,0 @@ -# Tag - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Int64** | | [optional] -**name** | **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/swift4/default/docs/TypeHolderDefault.md b/samples/client/petstore/swift4/default/docs/TypeHolderDefault.md deleted file mode 100644 index 5161394bdc3e..000000000000 --- a/samples/client/petstore/swift4/default/docs/TypeHolderDefault.md +++ /dev/null @@ -1,14 +0,0 @@ -# TypeHolderDefault - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**stringItem** | **String** | | [default to "what"] -**numberItem** | **Double** | | -**integerItem** | **Int** | | -**boolItem** | **Bool** | | [default to true] -**arrayItem** | **[Int]** | | - -[[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/swift4/default/docs/TypeHolderExample.md b/samples/client/petstore/swift4/default/docs/TypeHolderExample.md deleted file mode 100644 index 46d0471cd71a..000000000000 --- a/samples/client/petstore/swift4/default/docs/TypeHolderExample.md +++ /dev/null @@ -1,14 +0,0 @@ -# TypeHolderExample - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**stringItem** | **String** | | -**numberItem** | **Double** | | -**integerItem** | **Int** | | -**boolItem** | **Bool** | | -**arrayItem** | **[Int]** | | - -[[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/swift4/default/docs/User.md b/samples/client/petstore/swift4/default/docs/User.md deleted file mode 100644 index 5a439de0ff95..000000000000 --- a/samples/client/petstore/swift4/default/docs/User.md +++ /dev/null @@ -1,17 +0,0 @@ -# User - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Int64** | | [optional] -**username** | **String** | | [optional] -**firstName** | **String** | | [optional] -**lastName** | **String** | | [optional] -**email** | **String** | | [optional] -**password** | **String** | | [optional] -**phone** | **String** | | [optional] -**userStatus** | **Int** | 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/swift4/default/docs/UserAPI.md b/samples/client/petstore/swift4/default/docs/UserAPI.md deleted file mode 100644 index 380813bc68c0..000000000000 --- a/samples/client/petstore/swift4/default/docs/UserAPI.md +++ /dev/null @@ -1,406 +0,0 @@ -# UserAPI - -All URIs are relative to *http://petstore.swagger.io:80/v2* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**createUser**](UserAPI.md#createuser) | **POST** /user | Create user -[**createUsersWithArrayInput**](UserAPI.md#createuserswitharrayinput) | **POST** /user/createWithArray | Creates list of users with given input array -[**createUsersWithListInput**](UserAPI.md#createuserswithlistinput) | **POST** /user/createWithList | Creates list of users with given input array -[**deleteUser**](UserAPI.md#deleteuser) | **DELETE** /user/{username} | Delete user -[**getUserByName**](UserAPI.md#getuserbyname) | **GET** /user/{username} | Get user by user name -[**loginUser**](UserAPI.md#loginuser) | **GET** /user/login | Logs user into the system -[**logoutUser**](UserAPI.md#logoutuser) | **GET** /user/logout | Logs out current logged in user session -[**updateUser**](UserAPI.md#updateuser) | **PUT** /user/{username} | Updated user - - -# **createUser** -```swift - open class func createUser(body: User, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - -Create user - -This can only be done by the logged in user. - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let body = User(id: 123, username: "username_example", firstName: "firstName_example", lastName: "lastName_example", email: "email_example", password: "password_example", phone: "phone_example", userStatus: 123) // User | Created user object - -// Create user -UserAPI.createUser(body: body) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**User**](User.md) | Created user object | - -### Return type - -Void (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) - -# **createUsersWithArrayInput** -```swift - open class func createUsersWithArrayInput(body: [User], completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - -Creates list of users with given input array - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let body = [User(id: 123, username: "username_example", firstName: "firstName_example", lastName: "lastName_example", email: "email_example", password: "password_example", phone: "phone_example", userStatus: 123)] // [User] | List of user object - -// Creates list of users with given input array -UserAPI.createUsersWithArrayInput(body: body) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**[User]**](User.md) | List of user object | - -### Return type - -Void (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) - -# **createUsersWithListInput** -```swift - open class func createUsersWithListInput(body: [User], completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - -Creates list of users with given input array - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let body = [User(id: 123, username: "username_example", firstName: "firstName_example", lastName: "lastName_example", email: "email_example", password: "password_example", phone: "phone_example", userStatus: 123)] // [User] | List of user object - -// Creates list of users with given input array -UserAPI.createUsersWithListInput(body: body) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**[User]**](User.md) | List of user object | - -### Return type - -Void (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) - -# **deleteUser** -```swift - open class func deleteUser(username: String, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - -Delete user - -This can only be done by the logged in user. - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let username = "username_example" // String | The name that needs to be deleted - -// Delete user -UserAPI.deleteUser(username: username) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **String** | The name that needs to be deleted | - -### Return type - -Void (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) - -# **getUserByName** -```swift - open class func getUserByName(username: String, completion: @escaping (_ data: User?, _ error: Error?) -> Void) -``` - -Get user by user name - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let username = "username_example" // String | The name that needs to be fetched. Use user1 for testing. - -// Get user by user name -UserAPI.getUserByName(username: username) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **String** | The name that needs to be fetched. Use user1 for testing. | - -### Return type - -[**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) - -# **loginUser** -```swift - open class func loginUser(username: String, password: String, completion: @escaping (_ data: String?, _ error: Error?) -> Void) -``` - -Logs user into the system - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let username = "username_example" // String | The user name for login -let password = "password_example" // String | The password for login in clear text - -// Logs user into the system -UserAPI.loginUser(username: username, password: password) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **String** | The user name for login | - **password** | **String** | The password for login in clear text | - -### 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) - -# **logoutUser** -```swift - open class func logoutUser(completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - -Logs out current logged in user session - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - - -// Logs out current logged in user session -UserAPI.logoutUser() { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -Void (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) - -# **updateUser** -```swift - open class func updateUser(username: String, body: User, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - -Updated user - -This can only be done by the logged in user. - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let username = "username_example" // String | name that need to be deleted -let body = User(id: 123, username: "username_example", firstName: "firstName_example", lastName: "lastName_example", email: "email_example", password: "password_example", phone: "phone_example", userStatus: 123) // User | Updated user object - -// Updated user -UserAPI.updateUser(username: username, body: body) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **String** | name that need to be deleted | - **body** | [**User**](User.md) | Updated user object | - -### Return type - -Void (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/swift4/default/pom.xml b/samples/client/petstore/swift4/default/pom.xml deleted file mode 100644 index 5caba9cb4633..000000000000 --- a/samples/client/petstore/swift4/default/pom.xml +++ /dev/null @@ -1,43 +0,0 @@ - - 4.0.0 - io.swagger - Swift4PetstoreClientTests - pom - 1.0-SNAPSHOT - Swift4 Swagger Petstore Client - - - - maven-dependency-plugin - - - package - - copy-dependencies - - - ${project.build.directory} - - - - - - org.codehaus.mojo - exec-maven-plugin - 1.2.1 - - - xcodebuild-test - integration-test - - exec - - - ./run_spmbuild.sh - - - - - - - diff --git a/samples/client/petstore/swift4/default/project.yml b/samples/client/petstore/swift4/default/project.yml deleted file mode 100644 index 148b42517be9..000000000000 --- a/samples/client/petstore/swift4/default/project.yml +++ /dev/null @@ -1,15 +0,0 @@ -name: PetstoreClient -targets: - PetstoreClient: - type: framework - platform: iOS - deploymentTarget: "10.0" - sources: [PetstoreClient] - info: - path: ./Info.plist - version: 1.0.0 - settings: - APPLICATION_EXTENSION_API_ONLY: true - scheme: {} - dependencies: - - carthage: Alamofire diff --git a/samples/client/petstore/swift4/default/run_spmbuild.sh b/samples/client/petstore/swift4/default/run_spmbuild.sh deleted file mode 100755 index 1a9f585ad054..000000000000 --- a/samples/client/petstore/swift4/default/run_spmbuild.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -swift build && exit ${PIPESTATUS[0]} diff --git a/samples/client/petstore/swift4/nonPublicApi/.gitignore b/samples/client/petstore/swift4/nonPublicApi/.gitignore deleted file mode 100644 index 5e5d5cebcf47..000000000000 --- a/samples/client/petstore/swift4/nonPublicApi/.gitignore +++ /dev/null @@ -1,63 +0,0 @@ -# Xcode -# -# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore - -## Build generated -build/ -DerivedData - -## Various settings -*.pbxuser -!default.pbxuser -*.mode1v3 -!default.mode1v3 -*.mode2v3 -!default.mode2v3 -*.perspectivev3 -!default.perspectivev3 -xcuserdata - -## Other -*.xccheckout -*.moved-aside -*.xcuserstate -*.xcscmblueprint - -## Obj-C/Swift specific -*.hmap -*.ipa - -## Playgrounds -timeline.xctimeline -playground.xcworkspace - -# Swift Package Manager -# -# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. -# Packages/ -.build/ - -# CocoaPods -# -# We recommend against adding the Pods directory to your .gitignore. However -# you should judge for yourself, the pros and cons are mentioned at: -# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control -# -# Pods/ - -# Carthage -# -# Add this line if you want to avoid checking in source code from Carthage dependencies. -# Carthage/Checkouts - -Carthage/Build - -# fastlane -# -# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the -# screenshots whenever they are needed. -# For more information about the recommended setup visit: -# https://github.com/fastlane/fastlane/blob/master/docs/Gitignore.md - -fastlane/report.xml -fastlane/screenshots diff --git a/samples/client/petstore/swift4/nonPublicApi/.openapi-generator-ignore b/samples/client/petstore/swift4/nonPublicApi/.openapi-generator-ignore deleted file mode 100644 index 7484ee590a38..000000000000 --- a/samples/client/petstore/swift4/nonPublicApi/.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/swift4/nonPublicApi/.openapi-generator/VERSION b/samples/client/petstore/swift4/nonPublicApi/.openapi-generator/VERSION deleted file mode 100644 index b5d898602c2c..000000000000 --- a/samples/client/petstore/swift4/nonPublicApi/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -4.3.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/swift4/nonPublicApi/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata b/samples/client/petstore/swift4/nonPublicApi/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 919434a6254f..000000000000 --- a/samples/client/petstore/swift4/nonPublicApi/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/samples/client/petstore/swift4/nonPublicApi/Cartfile b/samples/client/petstore/swift4/nonPublicApi/Cartfile deleted file mode 100644 index 86748c63d90d..000000000000 --- a/samples/client/petstore/swift4/nonPublicApi/Cartfile +++ /dev/null @@ -1 +0,0 @@ -github "Alamofire/Alamofire" ~> 4.9.0 diff --git a/samples/client/petstore/swift4/nonPublicApi/Info.plist b/samples/client/petstore/swift4/nonPublicApi/Info.plist deleted file mode 100644 index 323e5ecfc420..000000000000 --- a/samples/client/petstore/swift4/nonPublicApi/Info.plist +++ /dev/null @@ -1,22 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.0 - CFBundleVersion - 1 - - diff --git a/samples/client/petstore/swift4/nonPublicApi/Package.resolved b/samples/client/petstore/swift4/nonPublicApi/Package.resolved deleted file mode 100644 index ca6137050ebc..000000000000 --- a/samples/client/petstore/swift4/nonPublicApi/Package.resolved +++ /dev/null @@ -1,16 +0,0 @@ -{ - "object": { - "pins": [ - { - "package": "Alamofire", - "repositoryURL": "https://github.com/Alamofire/Alamofire.git", - "state": { - "branch": null, - "revision": "747c8db8d57b68d5e35275f10c92d55f982adbd4", - "version": "4.9.1" - } - } - ] - }, - "version": 1 -} diff --git a/samples/client/petstore/swift4/nonPublicApi/Package.swift b/samples/client/petstore/swift4/nonPublicApi/Package.swift deleted file mode 100644 index e5c5f0f33b82..000000000000 --- a/samples/client/petstore/swift4/nonPublicApi/Package.swift +++ /dev/null @@ -1,27 +0,0 @@ -// swift-tools-version:4.2 -// The swift-tools-version declares the minimum version of Swift required to build this package. - -import PackageDescription - -let package = Package( - name: "PetstoreClient", - products: [ - // Products define the executables and libraries produced by a package, and make them visible to other packages. - .library( - name: "PetstoreClient", - targets: ["PetstoreClient"]) - ], - dependencies: [ - // Dependencies declare other packages that this package depends on. - .package(url: "https://github.com/Alamofire/Alamofire.git", from: "4.9.0") - ], - targets: [ - // Targets are the basic building blocks of a package. A target can define a module or a test suite. - // Targets can depend on other targets in this package, and on products in packages which this package depends on. - .target( - name: "PetstoreClient", - dependencies: ["Alamofire"], - path: "PetstoreClient/Classes" - ) - ] -) diff --git a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient.podspec b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient.podspec deleted file mode 100644 index a6c9a1f3d45e..000000000000 --- a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient.podspec +++ /dev/null @@ -1,14 +0,0 @@ -Pod::Spec.new do |s| - s.name = 'PetstoreClient' - s.ios.deployment_target = '9.0' - s.osx.deployment_target = '10.11' - s.tvos.deployment_target = '9.0' - s.version = '1.0.0' - s.source = { :git => 'git@github.com:OpenAPITools/openapi-generator.git', :tag => 'v1.0.0' } - s.authors = '' - s.license = 'Proprietary' - s.homepage = 'https://github.com/openapitools/openapi-generator' - s.summary = 'PetstoreClient' - s.source_files = 'PetstoreClient/Classes/**/*.swift' - s.dependency 'Alamofire', '~> 4.9.0' -end diff --git a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient.xcodeproj/project.pbxproj b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient.xcodeproj/project.pbxproj deleted file mode 100644 index b606fe1ab100..000000000000 --- a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient.xcodeproj/project.pbxproj +++ /dev/null @@ -1,576 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 51; - objects = { - -/* Begin PBXBuildFile section */ - 0299339D13C3571C4C57368A /* ApiResponse.swift in Sources */ = {isa = PBXBuildFile; fileRef = A8E7B833748B4F0C7CDA90C6 /* ApiResponse.swift */; }; - 081C0B80A989B1AAF2665121 /* MapTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7986861626C2B1CB49AD7000 /* MapTest.swift */; }; - 0C1E4C682F2D0AF7D9E431EE /* Dog.swift in Sources */ = {isa = PBXBuildFile; fileRef = C6C3E1129526A353B963EFD7 /* Dog.swift */; }; - 0E6932F1C55BA6880693C478 /* Order.swift in Sources */ = {isa = PBXBuildFile; fileRef = 27B2E9EF856E89FEAA359A3A /* Order.swift */; }; - 1E6C7C7F271A802DF8099330 /* APIHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 897716962D472FE162B723CB /* APIHelper.swift */; }; - 22FA6CA58E58550DE36AE750 /* JSONEncodableEncoding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9791B840B8D6EAA35343B00F /* JSONEncodableEncoding.swift */; }; - 248F2F0F29E8FDAE9CAD64C5 /* AdditionalPropertiesClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 396DEF3156BA0D12D0FC5C3C /* AdditionalPropertiesClass.swift */; }; - 269E3103C458C78EA5726EE2 /* Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = B8C298FC8929DCB369053F11 /* Extensions.swift */; }; - 294CDFA409BC369C0FDC5FB3 /* SpecialModelName.swift in Sources */ = {isa = PBXBuildFile; fileRef = 386FD590658E90509C121118 /* SpecialModelName.swift */; }; - 2B441CDFFFDDB343C04F5375 /* Animal.swift in Sources */ = {isa = PBXBuildFile; fileRef = 95568E7C35F119EB4A12B498 /* Animal.swift */; }; - 2C29D5B60E00DDA3878F1BDE /* Pet.swift in Sources */ = {isa = PBXBuildFile; fileRef = ECFEB4C6C257B3BB3CEA36D1 /* Pet.swift */; }; - 31DFF71D8CCCA0D2D2F8AC90 /* User.swift in Sources */ = {isa = PBXBuildFile; fileRef = E5565A447062C7B8F695F451 /* User.swift */; }; - 34C26979F4678B5B579D26E8 /* FakeClassnameTags123API.swift in Sources */ = {isa = PBXBuildFile; fileRef = B42354B407EC173BEB54E042 /* FakeClassnameTags123API.swift */; }; - 3691B017D3AA18404A563C67 /* ArrayOfNumberOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = B65BB72353DA24536A9049BE /* ArrayOfNumberOnly.swift */; }; - 37DEADD6CD0496690725B8A7 /* Name.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5AD994DFAA0DA93C188A4DBA /* Name.swift */; }; - 40E3027D2E38D8329C6AB01F /* APIs.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37DF825B8F3BADA2B2537D17 /* APIs.swift */; }; - 40E46046D2B16D1A672A08E3 /* AlamofireImplementations.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84A201508DF2B697D65F2631 /* AlamofireImplementations.swift */; }; - 418DB36F23C53C6E2C3CDE39 /* Alamofire.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A235FA3FDFB086CC69CDE83D /* Alamofire.framework */; }; - 41A491E9B577C510F927D126 /* OuterEnum.swift in Sources */ = {isa = PBXBuildFile; fileRef = C15008AABC804EB6FB4CDAC6 /* OuterEnum.swift */; }; - 45B3B29D7A62049F824751F8 /* AnimalFarm.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8D22BE01748F51106DE02332 /* AnimalFarm.swift */; }; - 4A344DF7ECE721B4BBEDCB4A /* CatAllOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AD0F94F512DFBC09F9CC79A /* CatAllOf.swift */; }; - 4B4BE77747413A9188CDABD2 /* ArrayOfArrayOfNumberOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B1B8B838B5D9D312F2002EB /* ArrayOfArrayOfNumberOnly.swift */; }; - 555DEA47352B42E49082922B /* NumberOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = B8E0B16084741FCB82389F58 /* NumberOnly.swift */; }; - 5695497F5DBF6C08842755A3 /* TypeHolderDefault.swift in Sources */ = {isa = PBXBuildFile; fileRef = EBC76F6D4D2AA8084B7EB50E /* TypeHolderDefault.swift */; }; - 61322FC4325F1A4FF24ACA48 /* EnumArrays.swift in Sources */ = {isa = PBXBuildFile; fileRef = 10503995D9EFD031A2EFB576 /* EnumArrays.swift */; }; - 64C48E3658CF53EBE8AF82F9 /* UserAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7C8D5F382979854D47F18DB1 /* UserAPI.swift */; }; - 6B638A04B34C82B2091D6EDD /* FormatTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3156CE41C001C80379B84BDB /* FormatTest.swift */; }; - 6FBD978F4D1ED92E7071FFBB /* CodableHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 02A6F6BB2152ACEE1416D44A /* CodableHelper.swift */; }; - 72547ECFB451A509409311EE /* Configuration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 28A444949BBC254798C3B3DD /* Configuration.swift */; }; - 72CE544C52BB33778D1B89B8 /* DogAllOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = A21A69C8402A60E01116ABBD /* DogAllOf.swift */; }; - 7441BBA84C31E06400338F89 /* ClassModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3C30827D8EAF8EA684E7BCEA /* ClassModel.swift */; }; - 7588B7E2960253174ADCCF16 /* JSONEncodingHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 35D710108A69DD8A5297F926 /* JSONEncodingHelper.swift */; }; - 86DE714469BE8BA28AFF710F /* HasOnlyReadOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C7FBC641752D2E13B150973 /* HasOnlyReadOnly.swift */; }; - 914F4D1FCB17773C067C4E68 /* ReadOnlyFirst.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6FD42727E001E799E458C292 /* ReadOnlyFirst.swift */; }; - 922BDADAB291907A7FD14314 /* OuterComposite.swift in Sources */ = {isa = PBXBuildFile; fileRef = F4E0AD8F60A91F72C7687560 /* OuterComposite.swift */; }; - 97F7B85BF07A325EEBF92C93 /* File.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3933D3B2A3AC4577094D0C23 /* File.swift */; }; - 9CA19AA4483F6EB50270A81E /* List.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A6070F581E611FF44AFD40A /* List.swift */; }; - 9CF06ACDA32CB0C3E74E435C /* Model200Response.swift in Sources */ = {isa = PBXBuildFile; fileRef = 82A2C3DC2235F0114C2B08E5 /* Model200Response.swift */; }; - 9DA1C6F8B4D6C8595F28C098 /* EnumTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = FD60AEA646791E0EDE885DE1 /* EnumTest.swift */; }; - A6E50CC6845FE58D8C236253 /* Return.swift in Sources */ = {isa = PBXBuildFile; fileRef = C81447828475F76C5CF4F08A /* Return.swift */; }; - A6E5A5629495DB0ED672B06F /* PetAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A019F500E546A3292CE716A /* PetAPI.swift */; }; - A85E190556818FFA79896E92 /* ArrayTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = F1A0379CDFC55705AE76C998 /* ArrayTest.swift */; }; - ACF3037926301D4D6E848745 /* EnumClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B2C97AE6ACA1E5FB88F5BAA /* EnumClass.swift */; }; - AD594BFB99E31A5E07579237 /* Client.swift in Sources */ = {isa = PBXBuildFile; fileRef = A913A57E72D723632E9A718F /* Client.swift */; }; - B301DB1B80F37C757550AA17 /* MixedPropertiesAndAdditionalPropertiesClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9AD714C7CC59BDD18DE8DF4E /* MixedPropertiesAndAdditionalPropertiesClass.swift */; }; - B3E35FE2773D4A8BA15CFA88 /* Tag.swift in Sources */ = {isa = PBXBuildFile; fileRef = B2896F8BFD1AA2965C8A3015 /* Tag.swift */; }; - BB1F3C6D50B8F0A8CC4F1749 /* Capitalization.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7B38FA00A494D13F4C382A3 /* Capitalization.swift */; }; - CA9B9B19882EA044EAD0B359 /* AnotherFakeAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9DF24D2714B9C4CF14146E88 /* AnotherFakeAPI.swift */; }; - CB68ABDBAADAF6B8D7B93A5D /* StoreAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = A53274D99BBDE1B79BF3521C /* StoreAPI.swift */; }; - D3BAB7C7A607392CA838C580 /* Models.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8699F7966F748ED026A6FB4C /* Models.swift */; }; - D95A5F83AAA7D5C95A29AB83 /* Cat.swift in Sources */ = {isa = PBXBuildFile; fileRef = 212AA914B7F1793A4E32C119 /* Cat.swift */; }; - DDBD4C0FBA3CD6A4DA3DF376 /* FakeAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6E00950725DC44436C5E238C /* FakeAPI.swift */; }; - DDF1D589267D56D9BED3C6E5 /* FileSchemaTestClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B3666552AA854DAF9C480A3 /* FileSchemaTestClass.swift */; }; - E8A58C6414E88AF3EAE45B69 /* Category.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F2985D01F8D60A4B1925C69 /* Category.swift */; }; - EDFC6C5121A43997014049CB /* StringBooleanMap.swift in Sources */ = {isa = PBXBuildFile; fileRef = 47B4DEBABEFE140768CFB70B /* StringBooleanMap.swift */; }; - FECA2E8C9D0BDFEC459E8996 /* TypeHolderExample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19B65C66C97F082718DDD703 /* TypeHolderExample.swift */; }; -/* End PBXBuildFile section */ - -/* Begin PBXFileReference section */ - 02A6F6BB2152ACEE1416D44A /* CodableHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CodableHelper.swift; sourceTree = ""; }; - 10503995D9EFD031A2EFB576 /* EnumArrays.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EnumArrays.swift; sourceTree = ""; }; - 164AD6EC9C4CCF634D7C4590 /* PetstoreClient.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = PetstoreClient.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 19B65C66C97F082718DDD703 /* TypeHolderExample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TypeHolderExample.swift; sourceTree = ""; }; - 212AA914B7F1793A4E32C119 /* Cat.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Cat.swift; sourceTree = ""; }; - 27B2E9EF856E89FEAA359A3A /* Order.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Order.swift; sourceTree = ""; }; - 28A444949BBC254798C3B3DD /* Configuration.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Configuration.swift; sourceTree = ""; }; - 3156CE41C001C80379B84BDB /* FormatTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FormatTest.swift; sourceTree = ""; }; - 35D710108A69DD8A5297F926 /* JSONEncodingHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JSONEncodingHelper.swift; sourceTree = ""; }; - 37DF825B8F3BADA2B2537D17 /* APIs.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = APIs.swift; sourceTree = ""; }; - 386FD590658E90509C121118 /* SpecialModelName.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SpecialModelName.swift; sourceTree = ""; }; - 3933D3B2A3AC4577094D0C23 /* File.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = File.swift; sourceTree = ""; }; - 396DEF3156BA0D12D0FC5C3C /* AdditionalPropertiesClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdditionalPropertiesClass.swift; sourceTree = ""; }; - 3AD0F94F512DFBC09F9CC79A /* CatAllOf.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CatAllOf.swift; sourceTree = ""; }; - 3C30827D8EAF8EA684E7BCEA /* ClassModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ClassModel.swift; sourceTree = ""; }; - 47B4DEBABEFE140768CFB70B /* StringBooleanMap.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StringBooleanMap.swift; sourceTree = ""; }; - 4B2C97AE6ACA1E5FB88F5BAA /* EnumClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EnumClass.swift; sourceTree = ""; }; - 4B3666552AA854DAF9C480A3 /* FileSchemaTestClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FileSchemaTestClass.swift; sourceTree = ""; }; - 4C7FBC641752D2E13B150973 /* HasOnlyReadOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HasOnlyReadOnly.swift; sourceTree = ""; }; - 5AD994DFAA0DA93C188A4DBA /* Name.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Name.swift; sourceTree = ""; }; - 6E00950725DC44436C5E238C /* FakeAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FakeAPI.swift; sourceTree = ""; }; - 6F2985D01F8D60A4B1925C69 /* Category.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Category.swift; sourceTree = ""; }; - 6FD42727E001E799E458C292 /* ReadOnlyFirst.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReadOnlyFirst.swift; sourceTree = ""; }; - 7986861626C2B1CB49AD7000 /* MapTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MapTest.swift; sourceTree = ""; }; - 7A6070F581E611FF44AFD40A /* List.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = List.swift; sourceTree = ""; }; - 7B1B8B838B5D9D312F2002EB /* ArrayOfArrayOfNumberOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArrayOfArrayOfNumberOnly.swift; sourceTree = ""; }; - 7C8D5F382979854D47F18DB1 /* UserAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserAPI.swift; sourceTree = ""; }; - 82A2C3DC2235F0114C2B08E5 /* Model200Response.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Model200Response.swift; sourceTree = ""; }; - 84A201508DF2B697D65F2631 /* AlamofireImplementations.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlamofireImplementations.swift; sourceTree = ""; }; - 8699F7966F748ED026A6FB4C /* Models.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Models.swift; sourceTree = ""; }; - 897716962D472FE162B723CB /* APIHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = APIHelper.swift; sourceTree = ""; }; - 8D22BE01748F51106DE02332 /* AnimalFarm.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnimalFarm.swift; sourceTree = ""; }; - 95568E7C35F119EB4A12B498 /* Animal.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Animal.swift; sourceTree = ""; }; - 9791B840B8D6EAA35343B00F /* JSONEncodableEncoding.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JSONEncodableEncoding.swift; sourceTree = ""; }; - 9A019F500E546A3292CE716A /* PetAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PetAPI.swift; sourceTree = ""; }; - 9AD714C7CC59BDD18DE8DF4E /* MixedPropertiesAndAdditionalPropertiesClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MixedPropertiesAndAdditionalPropertiesClass.swift; sourceTree = ""; }; - 9DF24D2714B9C4CF14146E88 /* AnotherFakeAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnotherFakeAPI.swift; sourceTree = ""; }; - A21A69C8402A60E01116ABBD /* DogAllOf.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DogAllOf.swift; sourceTree = ""; }; - A235FA3FDFB086CC69CDE83D /* Alamofire.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Alamofire.framework; sourceTree = ""; }; - A53274D99BBDE1B79BF3521C /* StoreAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StoreAPI.swift; sourceTree = ""; }; - A7B38FA00A494D13F4C382A3 /* Capitalization.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Capitalization.swift; sourceTree = ""; }; - A8E7B833748B4F0C7CDA90C6 /* ApiResponse.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ApiResponse.swift; sourceTree = ""; }; - A913A57E72D723632E9A718F /* Client.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Client.swift; sourceTree = ""; }; - B2896F8BFD1AA2965C8A3015 /* Tag.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Tag.swift; sourceTree = ""; }; - B42354B407EC173BEB54E042 /* FakeClassnameTags123API.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FakeClassnameTags123API.swift; sourceTree = ""; }; - B65BB72353DA24536A9049BE /* ArrayOfNumberOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArrayOfNumberOnly.swift; sourceTree = ""; }; - B8C298FC8929DCB369053F11 /* Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Extensions.swift; sourceTree = ""; }; - B8E0B16084741FCB82389F58 /* NumberOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NumberOnly.swift; sourceTree = ""; }; - C15008AABC804EB6FB4CDAC6 /* OuterEnum.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OuterEnum.swift; sourceTree = ""; }; - C6C3E1129526A353B963EFD7 /* Dog.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Dog.swift; sourceTree = ""; }; - C81447828475F76C5CF4F08A /* Return.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Return.swift; sourceTree = ""; }; - E5565A447062C7B8F695F451 /* User.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = User.swift; sourceTree = ""; }; - EBC76F6D4D2AA8084B7EB50E /* TypeHolderDefault.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TypeHolderDefault.swift; sourceTree = ""; }; - ECFEB4C6C257B3BB3CEA36D1 /* Pet.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Pet.swift; sourceTree = ""; }; - F1A0379CDFC55705AE76C998 /* ArrayTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArrayTest.swift; sourceTree = ""; }; - F4E0AD8F60A91F72C7687560 /* OuterComposite.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OuterComposite.swift; sourceTree = ""; }; - FD60AEA646791E0EDE885DE1 /* EnumTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EnumTest.swift; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - D1990C2A394CCF025EF98A2F /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 418DB36F23C53C6E2C3CDE39 /* Alamofire.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 1E464C0937FE0D3A7A0FE29A /* Frameworks */ = { - isa = PBXGroup; - children = ( - 7861EE241895128F64DD7873 /* Carthage */, - ); - name = Frameworks; - sourceTree = ""; - }; - 4FBDCF1330A9AB9122780DB3 /* Models */ = { - isa = PBXGroup; - children = ( - 396DEF3156BA0D12D0FC5C3C /* AdditionalPropertiesClass.swift */, - 95568E7C35F119EB4A12B498 /* Animal.swift */, - 8D22BE01748F51106DE02332 /* AnimalFarm.swift */, - A8E7B833748B4F0C7CDA90C6 /* ApiResponse.swift */, - 7B1B8B838B5D9D312F2002EB /* ArrayOfArrayOfNumberOnly.swift */, - B65BB72353DA24536A9049BE /* ArrayOfNumberOnly.swift */, - F1A0379CDFC55705AE76C998 /* ArrayTest.swift */, - A7B38FA00A494D13F4C382A3 /* Capitalization.swift */, - 212AA914B7F1793A4E32C119 /* Cat.swift */, - 3AD0F94F512DFBC09F9CC79A /* CatAllOf.swift */, - 6F2985D01F8D60A4B1925C69 /* Category.swift */, - 3C30827D8EAF8EA684E7BCEA /* ClassModel.swift */, - A913A57E72D723632E9A718F /* Client.swift */, - C6C3E1129526A353B963EFD7 /* Dog.swift */, - A21A69C8402A60E01116ABBD /* DogAllOf.swift */, - 10503995D9EFD031A2EFB576 /* EnumArrays.swift */, - 4B2C97AE6ACA1E5FB88F5BAA /* EnumClass.swift */, - FD60AEA646791E0EDE885DE1 /* EnumTest.swift */, - 3933D3B2A3AC4577094D0C23 /* File.swift */, - 4B3666552AA854DAF9C480A3 /* FileSchemaTestClass.swift */, - 3156CE41C001C80379B84BDB /* FormatTest.swift */, - 4C7FBC641752D2E13B150973 /* HasOnlyReadOnly.swift */, - 7A6070F581E611FF44AFD40A /* List.swift */, - 7986861626C2B1CB49AD7000 /* MapTest.swift */, - 9AD714C7CC59BDD18DE8DF4E /* MixedPropertiesAndAdditionalPropertiesClass.swift */, - 82A2C3DC2235F0114C2B08E5 /* Model200Response.swift */, - 5AD994DFAA0DA93C188A4DBA /* Name.swift */, - B8E0B16084741FCB82389F58 /* NumberOnly.swift */, - 27B2E9EF856E89FEAA359A3A /* Order.swift */, - F4E0AD8F60A91F72C7687560 /* OuterComposite.swift */, - C15008AABC804EB6FB4CDAC6 /* OuterEnum.swift */, - ECFEB4C6C257B3BB3CEA36D1 /* Pet.swift */, - 6FD42727E001E799E458C292 /* ReadOnlyFirst.swift */, - C81447828475F76C5CF4F08A /* Return.swift */, - 386FD590658E90509C121118 /* SpecialModelName.swift */, - 47B4DEBABEFE140768CFB70B /* StringBooleanMap.swift */, - B2896F8BFD1AA2965C8A3015 /* Tag.swift */, - EBC76F6D4D2AA8084B7EB50E /* TypeHolderDefault.swift */, - 19B65C66C97F082718DDD703 /* TypeHolderExample.swift */, - E5565A447062C7B8F695F451 /* User.swift */, - ); - path = Models; - sourceTree = ""; - }; - 5FBA6AE5F64CD737F88B4565 = { - isa = PBXGroup; - children = ( - 9B364C01750D7AA4F983B9E7 /* PetstoreClient */, - 1E464C0937FE0D3A7A0FE29A /* Frameworks */, - 857F0DEA1890CE66D6DAD556 /* Products */, - ); - sourceTree = ""; - }; - 67BF3478113E6B4DF1C4E04F /* OpenAPIs */ = { - isa = PBXGroup; - children = ( - 84A201508DF2B697D65F2631 /* AlamofireImplementations.swift */, - 897716962D472FE162B723CB /* APIHelper.swift */, - 37DF825B8F3BADA2B2537D17 /* APIs.swift */, - 02A6F6BB2152ACEE1416D44A /* CodableHelper.swift */, - 28A444949BBC254798C3B3DD /* Configuration.swift */, - B8C298FC8929DCB369053F11 /* Extensions.swift */, - 9791B840B8D6EAA35343B00F /* JSONEncodableEncoding.swift */, - 35D710108A69DD8A5297F926 /* JSONEncodingHelper.swift */, - 8699F7966F748ED026A6FB4C /* Models.swift */, - F956D0CCAE23BCFD1C7BDD5D /* APIs */, - 4FBDCF1330A9AB9122780DB3 /* Models */, - ); - path = OpenAPIs; - sourceTree = ""; - }; - 7861EE241895128F64DD7873 /* Carthage */ = { - isa = PBXGroup; - children = ( - A012205B41CB71A62B86EECD /* iOS */, - ); - name = Carthage; - path = Carthage/Build; - sourceTree = ""; - }; - 857F0DEA1890CE66D6DAD556 /* Products */ = { - isa = PBXGroup; - children = ( - 164AD6EC9C4CCF634D7C4590 /* PetstoreClient.framework */, - ); - name = Products; - sourceTree = ""; - }; - 9B364C01750D7AA4F983B9E7 /* PetstoreClient */ = { - isa = PBXGroup; - children = ( - EF4C81BDD734856ED5023B77 /* Classes */, - ); - path = PetstoreClient; - sourceTree = ""; - }; - A012205B41CB71A62B86EECD /* iOS */ = { - isa = PBXGroup; - children = ( - A235FA3FDFB086CC69CDE83D /* Alamofire.framework */, - ); - path = iOS; - sourceTree = ""; - }; - EF4C81BDD734856ED5023B77 /* Classes */ = { - isa = PBXGroup; - children = ( - 67BF3478113E6B4DF1C4E04F /* OpenAPIs */, - ); - path = Classes; - sourceTree = ""; - }; - F956D0CCAE23BCFD1C7BDD5D /* APIs */ = { - isa = PBXGroup; - children = ( - 9DF24D2714B9C4CF14146E88 /* AnotherFakeAPI.swift */, - 6E00950725DC44436C5E238C /* FakeAPI.swift */, - B42354B407EC173BEB54E042 /* FakeClassnameTags123API.swift */, - 9A019F500E546A3292CE716A /* PetAPI.swift */, - A53274D99BBDE1B79BF3521C /* StoreAPI.swift */, - 7C8D5F382979854D47F18DB1 /* UserAPI.swift */, - ); - path = APIs; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - C1282C2230015E0D204BEAED /* PetstoreClient */ = { - isa = PBXNativeTarget; - buildConfigurationList = B46EDEB1A7F0D78FE6394544 /* Build configuration list for PBXNativeTarget "PetstoreClient" */; - buildPhases = ( - E539708354CE60FE486F81ED /* Sources */, - D1990C2A394CCF025EF98A2F /* Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = PetstoreClient; - productName = PetstoreClient; - productReference = 164AD6EC9C4CCF634D7C4590 /* PetstoreClient.framework */; - productType = "com.apple.product-type.framework"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - E7D276EE2369D8C455513C2E /* Project object */ = { - isa = PBXProject; - attributes = { - LastUpgradeCheck = 1020; - }; - buildConfigurationList = ECAB17FF35111B5E14DAAC08 /* Build configuration list for PBXProject "PetstoreClient" */; - compatibilityVersion = "Xcode 10.0"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - Base, - en, - ); - mainGroup = 5FBA6AE5F64CD737F88B4565; - projectDirPath = ""; - projectRoot = ""; - targets = ( - C1282C2230015E0D204BEAED /* PetstoreClient */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXSourcesBuildPhase section */ - E539708354CE60FE486F81ED /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 1E6C7C7F271A802DF8099330 /* APIHelper.swift in Sources */, - 40E3027D2E38D8329C6AB01F /* APIs.swift in Sources */, - 248F2F0F29E8FDAE9CAD64C5 /* AdditionalPropertiesClass.swift in Sources */, - 40E46046D2B16D1A672A08E3 /* AlamofireImplementations.swift in Sources */, - 2B441CDFFFDDB343C04F5375 /* Animal.swift in Sources */, - 45B3B29D7A62049F824751F8 /* AnimalFarm.swift in Sources */, - CA9B9B19882EA044EAD0B359 /* AnotherFakeAPI.swift in Sources */, - 0299339D13C3571C4C57368A /* ApiResponse.swift in Sources */, - 4B4BE77747413A9188CDABD2 /* ArrayOfArrayOfNumberOnly.swift in Sources */, - 3691B017D3AA18404A563C67 /* ArrayOfNumberOnly.swift in Sources */, - A85E190556818FFA79896E92 /* ArrayTest.swift in Sources */, - BB1F3C6D50B8F0A8CC4F1749 /* Capitalization.swift in Sources */, - D95A5F83AAA7D5C95A29AB83 /* Cat.swift in Sources */, - 4A344DF7ECE721B4BBEDCB4A /* CatAllOf.swift in Sources */, - E8A58C6414E88AF3EAE45B69 /* Category.swift in Sources */, - 7441BBA84C31E06400338F89 /* ClassModel.swift in Sources */, - AD594BFB99E31A5E07579237 /* Client.swift in Sources */, - 6FBD978F4D1ED92E7071FFBB /* CodableHelper.swift in Sources */, - 72547ECFB451A509409311EE /* Configuration.swift in Sources */, - 0C1E4C682F2D0AF7D9E431EE /* Dog.swift in Sources */, - 72CE544C52BB33778D1B89B8 /* DogAllOf.swift in Sources */, - 61322FC4325F1A4FF24ACA48 /* EnumArrays.swift in Sources */, - ACF3037926301D4D6E848745 /* EnumClass.swift in Sources */, - 9DA1C6F8B4D6C8595F28C098 /* EnumTest.swift in Sources */, - 269E3103C458C78EA5726EE2 /* Extensions.swift in Sources */, - DDBD4C0FBA3CD6A4DA3DF376 /* FakeAPI.swift in Sources */, - 34C26979F4678B5B579D26E8 /* FakeClassnameTags123API.swift in Sources */, - 97F7B85BF07A325EEBF92C93 /* File.swift in Sources */, - DDF1D589267D56D9BED3C6E5 /* FileSchemaTestClass.swift in Sources */, - 6B638A04B34C82B2091D6EDD /* FormatTest.swift in Sources */, - 86DE714469BE8BA28AFF710F /* HasOnlyReadOnly.swift in Sources */, - 22FA6CA58E58550DE36AE750 /* JSONEncodableEncoding.swift in Sources */, - 7588B7E2960253174ADCCF16 /* JSONEncodingHelper.swift in Sources */, - 9CA19AA4483F6EB50270A81E /* List.swift in Sources */, - 081C0B80A989B1AAF2665121 /* MapTest.swift in Sources */, - B301DB1B80F37C757550AA17 /* MixedPropertiesAndAdditionalPropertiesClass.swift in Sources */, - 9CF06ACDA32CB0C3E74E435C /* Model200Response.swift in Sources */, - D3BAB7C7A607392CA838C580 /* Models.swift in Sources */, - 37DEADD6CD0496690725B8A7 /* Name.swift in Sources */, - 555DEA47352B42E49082922B /* NumberOnly.swift in Sources */, - 0E6932F1C55BA6880693C478 /* Order.swift in Sources */, - 922BDADAB291907A7FD14314 /* OuterComposite.swift in Sources */, - 41A491E9B577C510F927D126 /* OuterEnum.swift in Sources */, - 2C29D5B60E00DDA3878F1BDE /* Pet.swift in Sources */, - A6E5A5629495DB0ED672B06F /* PetAPI.swift in Sources */, - 914F4D1FCB17773C067C4E68 /* ReadOnlyFirst.swift in Sources */, - A6E50CC6845FE58D8C236253 /* Return.swift in Sources */, - 294CDFA409BC369C0FDC5FB3 /* SpecialModelName.swift in Sources */, - CB68ABDBAADAF6B8D7B93A5D /* StoreAPI.swift in Sources */, - EDFC6C5121A43997014049CB /* StringBooleanMap.swift in Sources */, - B3E35FE2773D4A8BA15CFA88 /* Tag.swift in Sources */, - 5695497F5DBF6C08842755A3 /* TypeHolderDefault.swift in Sources */, - FECA2E8C9D0BDFEC459E8996 /* TypeHolderExample.swift in Sources */, - 31DFF71D8CCCA0D2D2F8AC90 /* User.swift in Sources */, - 64C48E3658CF53EBE8AF82F9 /* UserAPI.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin XCBuildConfiguration section */ - 3B2C02AFB91CB5C82766ED5C /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - APPLICATION_EXTENSION_API_ONLY = YES; - CODE_SIGN_IDENTITY = ""; - CURRENT_PROJECT_VERSION = 1; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Carthage/Build/iOS", - ); - INFOPLIST_FILE = Info.plist; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Release; - }; - A9EB0A02B94C427CBACFEC7C /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "$(inherited)", - "DEBUG=1", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = iphoneos; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 5.0; - }; - name = Debug; - }; - DD3EEB93949E9EBA4437E9CD /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - APPLICATION_EXTENSION_API_ONLY = YES; - CODE_SIGN_IDENTITY = ""; - CURRENT_PROJECT_VERSION = 1; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Carthage/Build/iOS", - ); - INFOPLIST_FILE = Info.plist; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Debug; - }; - F81D4E5FECD46E9AA6DD2C29 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = iphoneos; - SWIFT_COMPILATION_MODE = wholemodule; - SWIFT_VERSION = 5.0; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - B46EDEB1A7F0D78FE6394544 /* Build configuration list for PBXNativeTarget "PetstoreClient" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - DD3EEB93949E9EBA4437E9CD /* Debug */, - 3B2C02AFB91CB5C82766ED5C /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = ""; - }; - ECAB17FF35111B5E14DAAC08 /* Build configuration list for PBXProject "PetstoreClient" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - A9EB0A02B94C427CBACFEC7C /* Debug */, - F81D4E5FECD46E9AA6DD2C29 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Debug; - }; -/* End XCConfigurationList section */ - }; - rootObject = E7D276EE2369D8C455513C2E /* Project object */; -} diff --git a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 919434a6254f..000000000000 --- a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d981003d68..000000000000 --- a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient.xcodeproj/xcshareddata/xcschemes/PetstoreClient.xcscheme b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient.xcodeproj/xcshareddata/xcschemes/PetstoreClient.xcscheme deleted file mode 100644 index 26d510552bb0..000000000000 --- a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient.xcodeproj/xcshareddata/xcschemes/PetstoreClient.xcscheme +++ /dev/null @@ -1,99 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIHelper.swift b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIHelper.swift deleted file mode 100644 index 8641eb7ebf77..000000000000 --- a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIHelper.swift +++ /dev/null @@ -1,70 +0,0 @@ -// APIHelper.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -internal struct APIHelper { - internal static func rejectNil(_ source: [String: Any?]) -> [String: Any]? { - let destination = source.reduce(into: [String: Any]()) { (result, item) in - if let value = item.value { - result[item.key] = value - } - } - - if destination.isEmpty { - return nil - } - return destination - } - - internal static func rejectNilHeaders(_ source: [String: Any?]) -> [String: String] { - return source.reduce(into: [String: String]()) { (result, item) in - if let collection = item.value as? [Any?] { - result[item.key] = collection.filter({ $0 != nil }).map { "\($0!)" }.joined(separator: ",") - } else if let value: Any = item.value { - result[item.key] = "\(value)" - } - } - } - - internal static func convertBoolToString(_ source: [String: Any]?) -> [String: Any]? { - guard let source = source else { - return nil - } - - return source.reduce(into: [String: Any](), { (result, item) in - switch item.value { - case let x as Bool: - result[item.key] = x.description - default: - result[item.key] = item.value - } - }) - } - - internal static func mapValueToPathItem(_ source: Any) -> Any { - if let collection = source as? [Any?] { - return collection.filter({ $0 != nil }).map({"\($0!)"}).joined(separator: ",") - } - return source - } - - internal static func mapValuesToQueryItems(_ source: [String: Any?]) -> [URLQueryItem]? { - let destination = source.filter({ $0.value != nil}).reduce(into: [URLQueryItem]()) { (result, item) in - if let collection = item.value as? [Any?] { - let value = collection.filter({ $0 != nil }).map({"\($0!)"}).joined(separator: ",") - result.append(URLQueryItem(name: item.key, value: value)) - } else if let value = item.value { - result.append(URLQueryItem(name: item.key, value: "\(value)")) - } - } - - if destination.isEmpty { - return nil - } - return destination - } -} diff --git a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs.swift b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs.swift deleted file mode 100644 index 4e09f94504fc..000000000000 --- a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs.swift +++ /dev/null @@ -1,62 +0,0 @@ -// APIs.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -internal class PetstoreClientAPI { - internal static var basePath = "http://petstore.swagger.io:80/v2" - internal static var credential: URLCredential? - internal static var customHeaders: [String: String] = [:] - internal static var requestBuilderFactory: RequestBuilderFactory = AlamofireRequestBuilderFactory() - internal static var apiResponseQueue: DispatchQueue = .main -} - -internal class RequestBuilder { - var credential: URLCredential? - var headers: [String: String] - internal let parameters: [String: Any]? - internal let isBody: Bool - internal let method: String - internal let URLString: String - - /// Optional block to obtain a reference to the request's progress instance when available. - internal var onProgressReady: ((Progress) -> Void)? - - required internal init(method: String, URLString: String, parameters: [String: Any]?, isBody: Bool, headers: [String: String] = [:]) { - self.method = method - self.URLString = URLString - self.parameters = parameters - self.isBody = isBody - self.headers = headers - - addHeaders(PetstoreClientAPI.customHeaders) - } - - internal func addHeaders(_ aHeaders: [String: String]) { - for (header, value) in aHeaders { - headers[header] = value - } - } - - internal func execute(_ completion: @escaping (_ response: Response?, _ error: Error?) -> Void) { } - - internal func addHeader(name: String, value: String) -> Self { - if !value.isEmpty { - headers[name] = value - } - return self - } - - internal func addCredential() -> Self { - self.credential = PetstoreClientAPI.credential - return self - } -} - -internal protocol RequestBuilderFactory { - func getNonDecodableBuilder() -> RequestBuilder.Type - func getBuilder() -> RequestBuilder.Type -} diff --git a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift deleted file mode 100644 index 9126bafa69ca..000000000000 --- a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift +++ /dev/null @@ -1,42 +0,0 @@ -// -// AnotherFakeAPI.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -internal class AnotherFakeAPI { - /** - To test special tags - - - parameter body: (body) client model - - parameter completion: completion handler to receive the data and the error objects - */ - internal class func call123testSpecialTags(body: Client, completion: @escaping ((_ data: Client?, _ error: Error?) -> Void)) { - call123testSpecialTagsWithRequestBuilder(body: body).execute { (response, error) -> Void in - completion(response?.body, error) - } - } - - /** - To test special tags - - PATCH /another-fake/dummy - - To test special tags and operation ID starting with number - - parameter body: (body) client model - - returns: RequestBuilder - */ - internal class func call123testSpecialTagsWithRequestBuilder(body: Client) -> RequestBuilder { - let path = "/another-fake/dummy" - let URLString = PetstoreClientAPI.basePath + path - let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "PATCH", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) - } - -} diff --git a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift deleted file mode 100644 index 7fcf9f8545df..000000000000 --- a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift +++ /dev/null @@ -1,575 +0,0 @@ -// -// FakeAPI.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -internal class FakeAPI { - /** - - - parameter body: (body) Input boolean as post body (optional) - - parameter completion: completion handler to receive the data and the error objects - */ - internal class func fakeOuterBooleanSerialize(body: Bool? = nil, completion: @escaping ((_ data: Bool?, _ error: Error?) -> Void)) { - fakeOuterBooleanSerializeWithRequestBuilder(body: body).execute { (response, error) -> Void in - completion(response?.body, error) - } - } - - /** - - POST /fake/outer/boolean - - Test serialization of outer boolean types - - parameter body: (body) Input boolean as post body (optional) - - returns: RequestBuilder - */ - internal class func fakeOuterBooleanSerializeWithRequestBuilder(body: Bool? = nil) -> RequestBuilder { - let path = "/fake/outer/boolean" - let URLString = PetstoreClientAPI.basePath + path - let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) - } - - /** - - - parameter body: (body) Input composite as post body (optional) - - parameter completion: completion handler to receive the data and the error objects - */ - internal class func fakeOuterCompositeSerialize(body: OuterComposite? = nil, completion: @escaping ((_ data: OuterComposite?, _ error: Error?) -> Void)) { - fakeOuterCompositeSerializeWithRequestBuilder(body: body).execute { (response, error) -> Void in - completion(response?.body, error) - } - } - - /** - - POST /fake/outer/composite - - Test serialization of object with outer number type - - parameter body: (body) Input composite as post body (optional) - - returns: RequestBuilder - */ - internal class func fakeOuterCompositeSerializeWithRequestBuilder(body: OuterComposite? = nil) -> RequestBuilder { - let path = "/fake/outer/composite" - let URLString = PetstoreClientAPI.basePath + path - let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) - } - - /** - - - parameter body: (body) Input number as post body (optional) - - parameter completion: completion handler to receive the data and the error objects - */ - internal class func fakeOuterNumberSerialize(body: Double? = nil, completion: @escaping ((_ data: Double?, _ error: Error?) -> Void)) { - fakeOuterNumberSerializeWithRequestBuilder(body: body).execute { (response, error) -> Void in - completion(response?.body, error) - } - } - - /** - - POST /fake/outer/number - - Test serialization of outer number types - - parameter body: (body) Input number as post body (optional) - - returns: RequestBuilder - */ - internal class func fakeOuterNumberSerializeWithRequestBuilder(body: Double? = nil) -> RequestBuilder { - let path = "/fake/outer/number" - let URLString = PetstoreClientAPI.basePath + path - let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) - } - - /** - - - parameter body: (body) Input string as post body (optional) - - parameter completion: completion handler to receive the data and the error objects - */ - internal class func fakeOuterStringSerialize(body: String? = nil, completion: @escaping ((_ data: String?, _ error: Error?) -> Void)) { - fakeOuterStringSerializeWithRequestBuilder(body: body).execute { (response, error) -> Void in - completion(response?.body, error) - } - } - - /** - - POST /fake/outer/string - - Test serialization of outer string types - - parameter body: (body) Input string as post body (optional) - - returns: RequestBuilder - */ - internal class func fakeOuterStringSerializeWithRequestBuilder(body: String? = nil) -> RequestBuilder { - let path = "/fake/outer/string" - let URLString = PetstoreClientAPI.basePath + path - let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) - } - - /** - - - parameter body: (body) - - parameter completion: completion handler to receive the data and the error objects - */ - internal class func testBodyWithFileSchema(body: FileSchemaTestClass, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - testBodyWithFileSchemaWithRequestBuilder(body: body).execute { (_, error) -> Void in - if error == nil { - completion((), error) - } else { - completion(nil, error) - } - } - } - - /** - - PUT /fake/body-with-file-schema - - For this test, the body for this request much reference a schema named `File`. - - parameter body: (body) - - returns: RequestBuilder - */ - internal class func testBodyWithFileSchemaWithRequestBuilder(body: FileSchemaTestClass) -> RequestBuilder { - let path = "/fake/body-with-file-schema" - let URLString = PetstoreClientAPI.basePath + path - let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) - } - - /** - - - parameter query: (query) - - parameter body: (body) - - parameter completion: completion handler to receive the data and the error objects - */ - internal class func testBodyWithQueryParams(query: String, body: User, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - testBodyWithQueryParamsWithRequestBuilder(query: query, body: body).execute { (_, error) -> Void in - if error == nil { - completion((), error) - } else { - completion(nil, error) - } - } - } - - /** - - PUT /fake/body-with-query-params - - parameter query: (query) - - parameter body: (body) - - returns: RequestBuilder - */ - internal class func testBodyWithQueryParamsWithRequestBuilder(query: String, body: User) -> RequestBuilder { - let path = "/fake/body-with-query-params" - let URLString = PetstoreClientAPI.basePath + path - let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) - - var url = URLComponents(string: URLString) - url?.queryItems = APIHelper.mapValuesToQueryItems([ - "query": query.encodeToJSON() - ]) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) - } - - /** - To test \"client\" model - - - parameter body: (body) client model - - parameter completion: completion handler to receive the data and the error objects - */ - internal class func testClientModel(body: Client, completion: @escaping ((_ data: Client?, _ error: Error?) -> Void)) { - testClientModelWithRequestBuilder(body: body).execute { (response, error) -> Void in - completion(response?.body, error) - } - } - - /** - To test \"client\" model - - PATCH /fake - - To test \"client\" model - - parameter body: (body) client model - - returns: RequestBuilder - */ - internal class func testClientModelWithRequestBuilder(body: Client) -> RequestBuilder { - let path = "/fake" - let URLString = PetstoreClientAPI.basePath + path - let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "PATCH", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) - } - - /** - Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - - - parameter integer: (form) None (optional) - - parameter int32: (form) None (optional) - - parameter int64: (form) None (optional) - - parameter number: (form) None - - parameter float: (form) None (optional) - - parameter double: (form) None - - parameter string: (form) None (optional) - - parameter patternWithoutDelimiter: (form) None - - parameter byte: (form) None - - parameter binary: (form) None (optional) - - parameter date: (form) None (optional) - - parameter dateTime: (form) None (optional) - - parameter password: (form) None (optional) - - parameter callback: (form) None (optional) - - parameter completion: completion handler to receive the data and the error objects - */ - internal class func testEndpointParameters(integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, number: Double, float: Float? = nil, double: Double, string: String? = nil, patternWithoutDelimiter: String, byte: Data, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - testEndpointParametersWithRequestBuilder(integer: integer, int32: int32, int64: int64, number: number, float: float, double: double, string: string, patternWithoutDelimiter: patternWithoutDelimiter, byte: byte, binary: binary, date: date, dateTime: dateTime, password: password, callback: callback).execute { (_, error) -> Void in - if error == nil { - completion((), error) - } else { - completion(nil, error) - } - } - } - - /** - Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - - POST /fake - - Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - - BASIC: - - type: http - - name: http_basic_test - - parameter integer: (form) None (optional) - - parameter int32: (form) None (optional) - - parameter int64: (form) None (optional) - - parameter number: (form) None - - parameter float: (form) None (optional) - - parameter double: (form) None - - parameter string: (form) None (optional) - - parameter patternWithoutDelimiter: (form) None - - parameter byte: (form) None - - parameter binary: (form) None (optional) - - parameter date: (form) None (optional) - - parameter dateTime: (form) None (optional) - - parameter password: (form) None (optional) - - parameter callback: (form) None (optional) - - returns: RequestBuilder - */ - internal class func testEndpointParametersWithRequestBuilder(integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, number: Double, float: Float? = nil, double: Double, string: String? = nil, patternWithoutDelimiter: String, byte: Data, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil) -> RequestBuilder { - let path = "/fake" - let URLString = PetstoreClientAPI.basePath + path - let formParams: [String: Any?] = [ - "integer": integer?.encodeToJSON(), - "int32": int32?.encodeToJSON(), - "int64": int64?.encodeToJSON(), - "number": number.encodeToJSON(), - "float": float?.encodeToJSON(), - "double": double.encodeToJSON(), - "string": string?.encodeToJSON(), - "pattern_without_delimiter": patternWithoutDelimiter.encodeToJSON(), - "byte": byte.encodeToJSON(), - "binary": binary?.encodeToJSON(), - "date": date?.encodeToJSON(), - "dateTime": dateTime?.encodeToJSON(), - "password": password?.encodeToJSON(), - "callback": callback?.encodeToJSON() - ] - - let nonNullParameters = APIHelper.rejectNil(formParams) - let parameters = APIHelper.convertBoolToString(nonNullParameters) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } - - /** - * enum for parameter enumHeaderStringArray - */ - internal enum EnumHeaderStringArray_testEnumParameters: String { - case greaterThan = ">" - case dollar = "$" - } - - /** - * enum for parameter enumHeaderString - */ - internal enum EnumHeaderString_testEnumParameters: String { - case abc = "_abc" - case efg = "-efg" - case xyz = "(xyz)" - } - - /** - * enum for parameter enumQueryStringArray - */ - internal enum EnumQueryStringArray_testEnumParameters: String { - case greaterThan = ">" - case dollar = "$" - } - - /** - * enum for parameter enumQueryString - */ - internal enum EnumQueryString_testEnumParameters: String { - case abc = "_abc" - case efg = "-efg" - case xyz = "(xyz)" - } - - /** - * enum for parameter enumQueryInteger - */ - internal enum EnumQueryInteger_testEnumParameters: Int { - case _1 = 1 - case number2 = -2 - } - - /** - * enum for parameter enumQueryDouble - */ - internal enum EnumQueryDouble_testEnumParameters: Double { - case _11 = 1.1 - case number12 = -1.2 - } - - /** - * enum for parameter enumFormStringArray - */ - internal enum EnumFormStringArray_testEnumParameters: String { - case greaterThan = ">" - case dollar = "$" - } - - /** - * enum for parameter enumFormString - */ - internal enum EnumFormString_testEnumParameters: String { - case abc = "_abc" - case efg = "-efg" - case xyz = "(xyz)" - } - - /** - To test enum parameters - - - parameter enumHeaderStringArray: (header) Header parameter enum test (string array) (optional) - - parameter enumHeaderString: (header) Header parameter enum test (string) (optional, default to .efg) - - parameter enumQueryStringArray: (query) Query parameter enum test (string array) (optional) - - parameter enumQueryString: (query) Query parameter enum test (string) (optional, default to .efg) - - parameter enumQueryInteger: (query) Query parameter enum test (double) (optional) - - parameter enumQueryDouble: (query) Query parameter enum test (double) (optional) - - parameter enumFormStringArray: (form) Form parameter enum test (string array) (optional, default to .dollar) - - parameter enumFormString: (form) Form parameter enum test (string) (optional, default to .efg) - - parameter completion: completion handler to receive the data and the error objects - */ - internal class func testEnumParameters(enumHeaderStringArray: [String]? = nil, enumHeaderString: EnumHeaderString_testEnumParameters? = nil, enumQueryStringArray: [String]? = nil, enumQueryString: EnumQueryString_testEnumParameters? = nil, enumQueryInteger: EnumQueryInteger_testEnumParameters? = nil, enumQueryDouble: EnumQueryDouble_testEnumParameters? = nil, enumFormStringArray: [String]? = nil, enumFormString: EnumFormString_testEnumParameters? = nil, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - testEnumParametersWithRequestBuilder(enumHeaderStringArray: enumHeaderStringArray, enumHeaderString: enumHeaderString, enumQueryStringArray: enumQueryStringArray, enumQueryString: enumQueryString, enumQueryInteger: enumQueryInteger, enumQueryDouble: enumQueryDouble, enumFormStringArray: enumFormStringArray, enumFormString: enumFormString).execute { (_, error) -> Void in - if error == nil { - completion((), error) - } else { - completion(nil, error) - } - } - } - - /** - To test enum parameters - - GET /fake - - To test enum parameters - - parameter enumHeaderStringArray: (header) Header parameter enum test (string array) (optional) - - parameter enumHeaderString: (header) Header parameter enum test (string) (optional, default to .efg) - - parameter enumQueryStringArray: (query) Query parameter enum test (string array) (optional) - - parameter enumQueryString: (query) Query parameter enum test (string) (optional, default to .efg) - - parameter enumQueryInteger: (query) Query parameter enum test (double) (optional) - - parameter enumQueryDouble: (query) Query parameter enum test (double) (optional) - - parameter enumFormStringArray: (form) Form parameter enum test (string array) (optional, default to .dollar) - - parameter enumFormString: (form) Form parameter enum test (string) (optional, default to .efg) - - returns: RequestBuilder - */ - internal class func testEnumParametersWithRequestBuilder(enumHeaderStringArray: [String]? = nil, enumHeaderString: EnumHeaderString_testEnumParameters? = nil, enumQueryStringArray: [String]? = nil, enumQueryString: EnumQueryString_testEnumParameters? = nil, enumQueryInteger: EnumQueryInteger_testEnumParameters? = nil, enumQueryDouble: EnumQueryDouble_testEnumParameters? = nil, enumFormStringArray: [String]? = nil, enumFormString: EnumFormString_testEnumParameters? = nil) -> RequestBuilder { - let path = "/fake" - let URLString = PetstoreClientAPI.basePath + path - let formParams: [String: Any?] = [ - "enum_form_string_array": enumFormStringArray?.encodeToJSON(), - "enum_form_string": enumFormString?.encodeToJSON() - ] - - let nonNullParameters = APIHelper.rejectNil(formParams) - let parameters = APIHelper.convertBoolToString(nonNullParameters) - - var url = URLComponents(string: URLString) - url?.queryItems = APIHelper.mapValuesToQueryItems([ - "enum_query_string_array": enumQueryStringArray?.encodeToJSON(), - "enum_query_string": enumQueryString?.encodeToJSON(), - "enum_query_integer": enumQueryInteger?.encodeToJSON(), - "enum_query_double": enumQueryDouble?.encodeToJSON() - ]) - let nillableHeaders: [String: Any?] = [ - "enum_header_string_array": enumHeaderStringArray?.encodeToJSON(), - "enum_header_string": enumHeaderString?.encodeToJSON() - ] - let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false, headers: headerParameters) - } - - /** - Fake endpoint to test group parameters (optional) - - - parameter requiredStringGroup: (query) Required String in group parameters - - parameter requiredBooleanGroup: (header) Required Boolean in group parameters - - parameter requiredInt64Group: (query) Required Integer in group parameters - - parameter stringGroup: (query) String in group parameters (optional) - - parameter booleanGroup: (header) Boolean in group parameters (optional) - - parameter int64Group: (query) Integer in group parameters (optional) - - parameter completion: completion handler to receive the data and the error objects - */ - internal class func testGroupParameters(requiredStringGroup: Int, requiredBooleanGroup: Bool, requiredInt64Group: Int64, stringGroup: Int? = nil, booleanGroup: Bool? = nil, int64Group: Int64? = nil, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - testGroupParametersWithRequestBuilder(requiredStringGroup: requiredStringGroup, requiredBooleanGroup: requiredBooleanGroup, requiredInt64Group: requiredInt64Group, stringGroup: stringGroup, booleanGroup: booleanGroup, int64Group: int64Group).execute { (_, error) -> Void in - if error == nil { - completion((), error) - } else { - completion(nil, error) - } - } - } - - /** - Fake endpoint to test group parameters (optional) - - DELETE /fake - - Fake endpoint to test group parameters (optional) - - parameter requiredStringGroup: (query) Required String in group parameters - - parameter requiredBooleanGroup: (header) Required Boolean in group parameters - - parameter requiredInt64Group: (query) Required Integer in group parameters - - parameter stringGroup: (query) String in group parameters (optional) - - parameter booleanGroup: (header) Boolean in group parameters (optional) - - parameter int64Group: (query) Integer in group parameters (optional) - - returns: RequestBuilder - */ - internal class func testGroupParametersWithRequestBuilder(requiredStringGroup: Int, requiredBooleanGroup: Bool, requiredInt64Group: Int64, stringGroup: Int? = nil, booleanGroup: Bool? = nil, int64Group: Int64? = nil) -> RequestBuilder { - let path = "/fake" - let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - - var url = URLComponents(string: URLString) - url?.queryItems = APIHelper.mapValuesToQueryItems([ - "required_string_group": requiredStringGroup.encodeToJSON(), - "required_int64_group": requiredInt64Group.encodeToJSON(), - "string_group": stringGroup?.encodeToJSON(), - "int64_group": int64Group?.encodeToJSON() - ]) - let nillableHeaders: [String: Any?] = [ - "required_boolean_group": requiredBooleanGroup.encodeToJSON(), - "boolean_group": booleanGroup?.encodeToJSON() - ] - let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false, headers: headerParameters) - } - - /** - test inline additionalProperties - - - parameter param: (body) request body - - parameter completion: completion handler to receive the data and the error objects - */ - internal class func testInlineAdditionalProperties(param: [String: String], completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - testInlineAdditionalPropertiesWithRequestBuilder(param: param).execute { (_, error) -> Void in - if error == nil { - completion((), error) - } else { - completion(nil, error) - } - } - } - - /** - test inline additionalProperties - - POST /fake/inline-additionalProperties - - parameter param: (body) request body - - returns: RequestBuilder - */ - internal class func testInlineAdditionalPropertiesWithRequestBuilder(param: [String: String]) -> RequestBuilder { - let path = "/fake/inline-additionalProperties" - let URLString = PetstoreClientAPI.basePath + path - let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: param) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) - } - - /** - test json serialization of form data - - - parameter param: (form) field1 - - parameter param2: (form) field2 - - parameter completion: completion handler to receive the data and the error objects - */ - internal class func testJsonFormData(param: String, param2: String, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - testJsonFormDataWithRequestBuilder(param: param, param2: param2).execute { (_, error) -> Void in - if error == nil { - completion((), error) - } else { - completion(nil, error) - } - } - } - - /** - test json serialization of form data - - GET /fake/jsonFormData - - parameter param: (form) field1 - - parameter param2: (form) field2 - - returns: RequestBuilder - */ - internal class func testJsonFormDataWithRequestBuilder(param: String, param2: String) -> RequestBuilder { - let path = "/fake/jsonFormData" - let URLString = PetstoreClientAPI.basePath + path - let formParams: [String: Any?] = [ - "param": param.encodeToJSON(), - "param2": param2.encodeToJSON() - ] - - let nonNullParameters = APIHelper.rejectNil(formParams) - let parameters = APIHelper.convertBoolToString(nonNullParameters) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } - -} diff --git a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift deleted file mode 100644 index e4c221d8cb41..000000000000 --- a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift +++ /dev/null @@ -1,45 +0,0 @@ -// -// FakeClassnameTags123API.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -internal class FakeClassnameTags123API { - /** - To test class name in snake case - - - parameter body: (body) client model - - parameter completion: completion handler to receive the data and the error objects - */ - internal class func testClassname(body: Client, completion: @escaping ((_ data: Client?, _ error: Error?) -> Void)) { - testClassnameWithRequestBuilder(body: body).execute { (response, error) -> Void in - completion(response?.body, error) - } - } - - /** - To test class name in snake case - - PATCH /fake_classname_test - - To test class name in snake case - - API Key: - - type: apiKey api_key_query (QUERY) - - name: api_key_query - - parameter body: (body) client model - - returns: RequestBuilder - */ - internal class func testClassnameWithRequestBuilder(body: Client) -> RequestBuilder { - let path = "/fake_classname_test" - let URLString = PetstoreClientAPI.basePath + path - let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "PATCH", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) - } - -} diff --git a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift deleted file mode 100644 index 88b3b5b893c8..000000000000 --- a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift +++ /dev/null @@ -1,393 +0,0 @@ -// -// PetAPI.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -internal class PetAPI { - /** - Add a new pet to the store - - - parameter body: (body) Pet object that needs to be added to the store - - parameter completion: completion handler to receive the data and the error objects - */ - internal class func addPet(body: Pet, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - addPetWithRequestBuilder(body: body).execute { (_, error) -> Void in - if error == nil { - completion((), error) - } else { - completion(nil, error) - } - } - } - - /** - Add a new pet to the store - - POST /pet - - OAuth: - - type: oauth2 - - name: petstore_auth - - parameter body: (body) Pet object that needs to be added to the store - - returns: RequestBuilder - */ - internal class func addPetWithRequestBuilder(body: Pet) -> RequestBuilder { - let path = "/pet" - let URLString = PetstoreClientAPI.basePath + path - let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) - } - - /** - Deletes a pet - - - parameter apiKey: (header) (optional) - - parameter petId: (path) Pet id to delete - - parameter completion: completion handler to receive the data and the error objects - */ - internal class func deletePet(apiKey: String? = nil, petId: Int64, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - deletePetWithRequestBuilder(apiKey: apiKey, petId: petId).execute { (_, error) -> Void in - if error == nil { - completion((), error) - } else { - completion(nil, error) - } - } - } - - /** - Deletes a pet - - DELETE /pet/{petId} - - OAuth: - - type: oauth2 - - name: petstore_auth - - parameter apiKey: (header) (optional) - - parameter petId: (path) Pet id to delete - - returns: RequestBuilder - */ - internal class func deletePetWithRequestBuilder(apiKey: String? = nil, petId: Int64) -> RequestBuilder { - var path = "/pet/{petId}" - let petIdPreEscape = "\(APIHelper.mapValueToPathItem(petId))" - let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{petId}", with: petIdPostEscape, options: .literal, range: nil) - let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - - let url = URLComponents(string: URLString) - let nillableHeaders: [String: Any?] = [ - "api_key": apiKey?.encodeToJSON() - ] - let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false, headers: headerParameters) - } - - /** - * enum for parameter status - */ - internal enum Status_findPetsByStatus: String { - case available = "available" - case pending = "pending" - case sold = "sold" - } - - /** - Finds Pets by status - - - parameter status: (query) Status values that need to be considered for filter - - parameter completion: completion handler to receive the data and the error objects - */ - internal class func findPetsByStatus(status: [String], completion: @escaping ((_ data: [Pet]?, _ error: Error?) -> Void)) { - findPetsByStatusWithRequestBuilder(status: status).execute { (response, error) -> Void in - completion(response?.body, error) - } - } - - /** - Finds Pets by status - - GET /pet/findByStatus - - Multiple status values can be provided with comma separated strings - - OAuth: - - type: oauth2 - - name: petstore_auth - - parameter status: (query) Status values that need to be considered for filter - - returns: RequestBuilder<[Pet]> - */ - internal class func findPetsByStatusWithRequestBuilder(status: [String]) -> RequestBuilder<[Pet]> { - let path = "/pet/findByStatus" - let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - - var url = URLComponents(string: URLString) - url?.queryItems = APIHelper.mapValuesToQueryItems([ - "status": status.encodeToJSON() - ]) - - let requestBuilder: RequestBuilder<[Pet]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } - - /** - Finds Pets by tags - - - parameter tags: (query) Tags to filter by - - parameter completion: completion handler to receive the data and the error objects - */ - internal class func findPetsByTags(tags: [String], completion: @escaping ((_ data: [Pet]?, _ error: Error?) -> Void)) { - findPetsByTagsWithRequestBuilder(tags: tags).execute { (response, error) -> Void in - completion(response?.body, error) - } - } - - /** - Finds Pets by tags - - GET /pet/findByTags - - Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. - - OAuth: - - type: oauth2 - - name: petstore_auth - - parameter tags: (query) Tags to filter by - - returns: RequestBuilder<[Pet]> - */ - internal class func findPetsByTagsWithRequestBuilder(tags: [String]) -> RequestBuilder<[Pet]> { - let path = "/pet/findByTags" - let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - - var url = URLComponents(string: URLString) - url?.queryItems = APIHelper.mapValuesToQueryItems([ - "tags": tags.encodeToJSON() - ]) - - let requestBuilder: RequestBuilder<[Pet]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } - - /** - Find pet by ID - - - parameter petId: (path) ID of pet to return - - parameter completion: completion handler to receive the data and the error objects - */ - internal class func getPetById(petId: Int64, completion: @escaping ((_ data: Pet?, _ error: Error?) -> Void)) { - getPetByIdWithRequestBuilder(petId: petId).execute { (response, error) -> Void in - completion(response?.body, error) - } - } - - /** - Find pet by ID - - GET /pet/{petId} - - Returns a single pet - - API Key: - - type: apiKey api_key - - name: api_key - - parameter petId: (path) ID of pet to return - - returns: RequestBuilder - */ - internal class func getPetByIdWithRequestBuilder(petId: Int64) -> RequestBuilder { - var path = "/pet/{petId}" - let petIdPreEscape = "\(APIHelper.mapValueToPathItem(petId))" - let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{petId}", with: petIdPostEscape, options: .literal, range: nil) - let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } - - /** - Update an existing pet - - - parameter body: (body) Pet object that needs to be added to the store - - parameter completion: completion handler to receive the data and the error objects - */ - internal class func updatePet(body: Pet, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - updatePetWithRequestBuilder(body: body).execute { (_, error) -> Void in - if error == nil { - completion((), error) - } else { - completion(nil, error) - } - } - } - - /** - Update an existing pet - - PUT /pet - - OAuth: - - type: oauth2 - - name: petstore_auth - - parameter body: (body) Pet object that needs to be added to the store - - returns: RequestBuilder - */ - internal class func updatePetWithRequestBuilder(body: Pet) -> RequestBuilder { - let path = "/pet" - let URLString = PetstoreClientAPI.basePath + path - let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) - } - - /** - Updates a pet in the store with form data - - - parameter petId: (path) ID of pet that needs to be updated - - parameter name: (form) Updated name of the pet (optional) - - parameter status: (form) Updated status of the pet (optional) - - parameter completion: completion handler to receive the data and the error objects - */ - internal class func updatePetWithForm(petId: Int64, name: String? = nil, status: String? = nil, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - updatePetWithFormWithRequestBuilder(petId: petId, name: name, status: status).execute { (_, error) -> Void in - if error == nil { - completion((), error) - } else { - completion(nil, error) - } - } - } - - /** - Updates a pet in the store with form data - - POST /pet/{petId} - - OAuth: - - type: oauth2 - - name: petstore_auth - - parameter petId: (path) ID of pet that needs to be updated - - parameter name: (form) Updated name of the pet (optional) - - parameter status: (form) Updated status of the pet (optional) - - returns: RequestBuilder - */ - internal class func updatePetWithFormWithRequestBuilder(petId: Int64, name: String? = nil, status: String? = nil) -> RequestBuilder { - var path = "/pet/{petId}" - let petIdPreEscape = "\(APIHelper.mapValueToPathItem(petId))" - let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{petId}", with: petIdPostEscape, options: .literal, range: nil) - let URLString = PetstoreClientAPI.basePath + path - let formParams: [String: Any?] = [ - "name": name?.encodeToJSON(), - "status": status?.encodeToJSON() - ] - - let nonNullParameters = APIHelper.rejectNil(formParams) - let parameters = APIHelper.convertBoolToString(nonNullParameters) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } - - /** - uploads an image - - - parameter petId: (path) ID of pet to update - - parameter additionalMetadata: (form) Additional data to pass to server (optional) - - parameter file: (form) file to upload (optional) - - parameter completion: completion handler to receive the data and the error objects - */ - internal class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil, completion: @escaping ((_ data: ApiResponse?, _ error: Error?) -> Void)) { - uploadFileWithRequestBuilder(petId: petId, additionalMetadata: additionalMetadata, file: file).execute { (response, error) -> Void in - completion(response?.body, error) - } - } - - /** - uploads an image - - POST /pet/{petId}/uploadImage - - OAuth: - - type: oauth2 - - name: petstore_auth - - parameter petId: (path) ID of pet to update - - parameter additionalMetadata: (form) Additional data to pass to server (optional) - - parameter file: (form) file to upload (optional) - - returns: RequestBuilder - */ - internal class func uploadFileWithRequestBuilder(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil) -> RequestBuilder { - var path = "/pet/{petId}/uploadImage" - let petIdPreEscape = "\(APIHelper.mapValueToPathItem(petId))" - let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{petId}", with: petIdPostEscape, options: .literal, range: nil) - let URLString = PetstoreClientAPI.basePath + path - let formParams: [String: Any?] = [ - "additionalMetadata": additionalMetadata?.encodeToJSON(), - "file": file?.encodeToJSON() - ] - - let nonNullParameters = APIHelper.rejectNil(formParams) - let parameters = APIHelper.convertBoolToString(nonNullParameters) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } - - /** - uploads an image (required) - - - parameter petId: (path) ID of pet to update - - parameter additionalMetadata: (form) Additional data to pass to server (optional) - - parameter requiredFile: (form) file to upload - - parameter completion: completion handler to receive the data and the error objects - */ - internal class func uploadFileWithRequiredFile(petId: Int64, additionalMetadata: String? = nil, requiredFile: URL, completion: @escaping ((_ data: ApiResponse?, _ error: Error?) -> Void)) { - uploadFileWithRequiredFileWithRequestBuilder(petId: petId, additionalMetadata: additionalMetadata, requiredFile: requiredFile).execute { (response, error) -> Void in - completion(response?.body, error) - } - } - - /** - uploads an image (required) - - POST /fake/{petId}/uploadImageWithRequiredFile - - OAuth: - - type: oauth2 - - name: petstore_auth - - parameter petId: (path) ID of pet to update - - parameter additionalMetadata: (form) Additional data to pass to server (optional) - - parameter requiredFile: (form) file to upload - - returns: RequestBuilder - */ - internal class func uploadFileWithRequiredFileWithRequestBuilder(petId: Int64, additionalMetadata: String? = nil, requiredFile: URL) -> RequestBuilder { - var path = "/fake/{petId}/uploadImageWithRequiredFile" - let petIdPreEscape = "\(APIHelper.mapValueToPathItem(petId))" - let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{petId}", with: petIdPostEscape, options: .literal, range: nil) - let URLString = PetstoreClientAPI.basePath + path - let formParams: [String: Any?] = [ - "additionalMetadata": additionalMetadata?.encodeToJSON(), - "requiredFile": requiredFile.encodeToJSON() - ] - - let nonNullParameters = APIHelper.rejectNil(formParams) - let parameters = APIHelper.convertBoolToString(nonNullParameters) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } - -} diff --git a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift deleted file mode 100644 index cfd546b9095f..000000000000 --- a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift +++ /dev/null @@ -1,145 +0,0 @@ -// -// StoreAPI.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -internal class StoreAPI { - /** - Delete purchase order by ID - - - parameter orderId: (path) ID of the order that needs to be deleted - - parameter completion: completion handler to receive the data and the error objects - */ - internal class func deleteOrder(orderId: String, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - deleteOrderWithRequestBuilder(orderId: orderId).execute { (_, error) -> Void in - if error == nil { - completion((), error) - } else { - completion(nil, error) - } - } - } - - /** - Delete purchase order by ID - - DELETE /store/order/{order_id} - - For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors - - parameter orderId: (path) ID of the order that needs to be deleted - - returns: RequestBuilder - */ - internal class func deleteOrderWithRequestBuilder(orderId: String) -> RequestBuilder { - var path = "/store/order/{order_id}" - let orderIdPreEscape = "\(APIHelper.mapValueToPathItem(orderId))" - let orderIdPostEscape = orderIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{order_id}", with: orderIdPostEscape, options: .literal, range: nil) - let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } - - /** - Returns pet inventories by status - - - parameter completion: completion handler to receive the data and the error objects - */ - internal class func getInventory(completion: @escaping ((_ data: [String: Int]?, _ error: Error?) -> Void)) { - getInventoryWithRequestBuilder().execute { (response, error) -> Void in - completion(response?.body, error) - } - } - - /** - Returns pet inventories by status - - GET /store/inventory - - Returns a map of status codes to quantities - - API Key: - - type: apiKey api_key - - name: api_key - - returns: RequestBuilder<[String:Int]> - */ - internal class func getInventoryWithRequestBuilder() -> RequestBuilder<[String: Int]> { - let path = "/store/inventory" - let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder<[String: Int]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } - - /** - Find purchase order by ID - - - parameter orderId: (path) ID of pet that needs to be fetched - - parameter completion: completion handler to receive the data and the error objects - */ - internal class func getOrderById(orderId: Int64, completion: @escaping ((_ data: Order?, _ error: Error?) -> Void)) { - getOrderByIdWithRequestBuilder(orderId: orderId).execute { (response, error) -> Void in - completion(response?.body, error) - } - } - - /** - Find purchase order by ID - - GET /store/order/{order_id} - - For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions - - parameter orderId: (path) ID of pet that needs to be fetched - - returns: RequestBuilder - */ - internal class func getOrderByIdWithRequestBuilder(orderId: Int64) -> RequestBuilder { - var path = "/store/order/{order_id}" - let orderIdPreEscape = "\(APIHelper.mapValueToPathItem(orderId))" - let orderIdPostEscape = orderIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{order_id}", with: orderIdPostEscape, options: .literal, range: nil) - let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } - - /** - Place an order for a pet - - - parameter body: (body) order placed for purchasing the pet - - parameter completion: completion handler to receive the data and the error objects - */ - internal class func placeOrder(body: Order, completion: @escaping ((_ data: Order?, _ error: Error?) -> Void)) { - placeOrderWithRequestBuilder(body: body).execute { (response, error) -> Void in - completion(response?.body, error) - } - } - - /** - Place an order for a pet - - POST /store/order - - parameter body: (body) order placed for purchasing the pet - - returns: RequestBuilder - */ - internal class func placeOrderWithRequestBuilder(body: Order) -> RequestBuilder { - let path = "/store/order" - let URLString = PetstoreClientAPI.basePath + path - let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) - } - -} diff --git a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift deleted file mode 100644 index 76d77e2cf338..000000000000 --- a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift +++ /dev/null @@ -1,294 +0,0 @@ -// -// UserAPI.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -internal class UserAPI { - /** - Create user - - - parameter body: (body) Created user object - - parameter completion: completion handler to receive the data and the error objects - */ - internal class func createUser(body: User, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - createUserWithRequestBuilder(body: body).execute { (_, error) -> Void in - if error == nil { - completion((), error) - } else { - completion(nil, error) - } - } - } - - /** - Create user - - POST /user - - This can only be done by the logged in user. - - parameter body: (body) Created user object - - returns: RequestBuilder - */ - internal class func createUserWithRequestBuilder(body: User) -> RequestBuilder { - let path = "/user" - let URLString = PetstoreClientAPI.basePath + path - let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) - } - - /** - Creates list of users with given input array - - - parameter body: (body) List of user object - - parameter completion: completion handler to receive the data and the error objects - */ - internal class func createUsersWithArrayInput(body: [User], completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - createUsersWithArrayInputWithRequestBuilder(body: body).execute { (_, error) -> Void in - if error == nil { - completion((), error) - } else { - completion(nil, error) - } - } - } - - /** - Creates list of users with given input array - - POST /user/createWithArray - - parameter body: (body) List of user object - - returns: RequestBuilder - */ - internal class func createUsersWithArrayInputWithRequestBuilder(body: [User]) -> RequestBuilder { - let path = "/user/createWithArray" - let URLString = PetstoreClientAPI.basePath + path - let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) - } - - /** - Creates list of users with given input array - - - parameter body: (body) List of user object - - parameter completion: completion handler to receive the data and the error objects - */ - internal class func createUsersWithListInput(body: [User], completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - createUsersWithListInputWithRequestBuilder(body: body).execute { (_, error) -> Void in - if error == nil { - completion((), error) - } else { - completion(nil, error) - } - } - } - - /** - Creates list of users with given input array - - POST /user/createWithList - - parameter body: (body) List of user object - - returns: RequestBuilder - */ - internal class func createUsersWithListInputWithRequestBuilder(body: [User]) -> RequestBuilder { - let path = "/user/createWithList" - let URLString = PetstoreClientAPI.basePath + path - let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) - } - - /** - Delete user - - - parameter username: (path) The name that needs to be deleted - - parameter completion: completion handler to receive the data and the error objects - */ - internal class func deleteUser(username: String, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - deleteUserWithRequestBuilder(username: username).execute { (_, error) -> Void in - if error == nil { - completion((), error) - } else { - completion(nil, error) - } - } - } - - /** - Delete user - - DELETE /user/{username} - - This can only be done by the logged in user. - - parameter username: (path) The name that needs to be deleted - - returns: RequestBuilder - */ - internal class func deleteUserWithRequestBuilder(username: String) -> RequestBuilder { - var path = "/user/{username}" - let usernamePreEscape = "\(APIHelper.mapValueToPathItem(username))" - let usernamePostEscape = usernamePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{username}", with: usernamePostEscape, options: .literal, range: nil) - let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } - - /** - Get user by user name - - - parameter username: (path) The name that needs to be fetched. Use user1 for testing. - - parameter completion: completion handler to receive the data and the error objects - */ - internal class func getUserByName(username: String, completion: @escaping ((_ data: User?, _ error: Error?) -> Void)) { - getUserByNameWithRequestBuilder(username: username).execute { (response, error) -> Void in - completion(response?.body, error) - } - } - - /** - Get user by user name - - GET /user/{username} - - parameter username: (path) The name that needs to be fetched. Use user1 for testing. - - returns: RequestBuilder - */ - internal class func getUserByNameWithRequestBuilder(username: String) -> RequestBuilder { - var path = "/user/{username}" - let usernamePreEscape = "\(APIHelper.mapValueToPathItem(username))" - let usernamePostEscape = usernamePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{username}", with: usernamePostEscape, options: .literal, range: nil) - let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } - - /** - Logs user into the system - - - parameter username: (query) The user name for login - - parameter password: (query) The password for login in clear text - - parameter completion: completion handler to receive the data and the error objects - */ - internal class func loginUser(username: String, password: String, completion: @escaping ((_ data: String?, _ error: Error?) -> Void)) { - loginUserWithRequestBuilder(username: username, password: password).execute { (response, error) -> Void in - completion(response?.body, error) - } - } - - /** - Logs user into the system - - GET /user/login - - responseHeaders: [X-Rate-Limit(Int), X-Expires-After(Date)] - - parameter username: (query) The user name for login - - parameter password: (query) The password for login in clear text - - returns: RequestBuilder - */ - internal class func loginUserWithRequestBuilder(username: String, password: String) -> RequestBuilder { - let path = "/user/login" - let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - - var url = URLComponents(string: URLString) - url?.queryItems = APIHelper.mapValuesToQueryItems([ - "username": username.encodeToJSON(), - "password": password.encodeToJSON() - ]) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } - - /** - Logs out current logged in user session - - - parameter completion: completion handler to receive the data and the error objects - */ - internal class func logoutUser(completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - logoutUserWithRequestBuilder().execute { (_, error) -> Void in - if error == nil { - completion((), error) - } else { - completion(nil, error) - } - } - } - - /** - Logs out current logged in user session - - GET /user/logout - - returns: RequestBuilder - */ - internal class func logoutUserWithRequestBuilder() -> RequestBuilder { - let path = "/user/logout" - let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } - - /** - Updated user - - - parameter username: (path) name that need to be deleted - - parameter body: (body) Updated user object - - parameter completion: completion handler to receive the data and the error objects - */ - internal class func updateUser(username: String, body: User, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - updateUserWithRequestBuilder(username: username, body: body).execute { (_, error) -> Void in - if error == nil { - completion((), error) - } else { - completion(nil, error) - } - } - } - - /** - Updated user - - PUT /user/{username} - - This can only be done by the logged in user. - - parameter username: (path) name that need to be deleted - - parameter body: (body) Updated user object - - returns: RequestBuilder - */ - internal class func updateUserWithRequestBuilder(username: String, body: User) -> RequestBuilder { - var path = "/user/{username}" - let usernamePreEscape = "\(APIHelper.mapValueToPathItem(username))" - let usernamePostEscape = usernamePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{username}", with: usernamePostEscape, options: .literal, range: nil) - let URLString = PetstoreClientAPI.basePath + path - let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) - } - -} diff --git a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/AlamofireImplementations.swift b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/AlamofireImplementations.swift deleted file mode 100644 index 691163584e0e..000000000000 --- a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/AlamofireImplementations.swift +++ /dev/null @@ -1,450 +0,0 @@ -// AlamofireImplementations.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -import Alamofire - -class AlamofireRequestBuilderFactory: RequestBuilderFactory { - func getNonDecodableBuilder() -> RequestBuilder.Type { - return AlamofireRequestBuilder.self - } - - func getBuilder() -> RequestBuilder.Type { - return AlamofireDecodableRequestBuilder.self - } -} - -private struct SynchronizedDictionary { - - private var dictionary = [K: V]() - private let queue = DispatchQueue( - label: "SynchronizedDictionary", - qos: DispatchQoS.userInitiated, - attributes: [DispatchQueue.Attributes.concurrent], - autoreleaseFrequency: DispatchQueue.AutoreleaseFrequency.inherit, - target: nil - ) - - internal subscript(key: K) -> V? { - get { - var value: V? - - queue.sync { - value = self.dictionary[key] - } - - return value - } - set { - queue.sync(flags: DispatchWorkItemFlags.barrier) { - self.dictionary[key] = newValue - } - } - } - } - -// Store manager to retain its reference -private var managerStore = SynchronizedDictionary() - -internal class AlamofireRequestBuilder: RequestBuilder { - required internal init(method: String, URLString: String, parameters: [String: Any]?, isBody: Bool, headers: [String: String] = [:]) { - super.init(method: method, URLString: URLString, parameters: parameters, isBody: isBody, headers: headers) - } - - /** - May be overridden by a subclass if you want to control the session - configuration. - */ - internal func createSessionManager() -> Alamofire.SessionManager { - let configuration = URLSessionConfiguration.default - configuration.httpAdditionalHeaders = buildHeaders() - return Alamofire.SessionManager(configuration: configuration) - } - - /** - May be overridden by a subclass if you want to custom request constructor. - */ - internal func createURLRequest() -> URLRequest? { - let encoding: ParameterEncoding = isBody ? JSONDataEncoding() : URLEncoding() - guard let originalRequest = try? URLRequest(url: URLString, method: HTTPMethod(rawValue: method)!, headers: buildHeaders()) else { return nil } - return try? encoding.encode(originalRequest, with: parameters) - } - - /** - May be overridden by a subclass if you want to control the Content-Type - that is given to an uploaded form part. - - Return nil to use the default behavior (inferring the Content-Type from - the file extension). Return the desired Content-Type otherwise. - */ - internal func contentTypeForFormPart(fileURL: URL) -> String? { - return nil - } - - /** - May be overridden by a subclass if you want to control the request - configuration (e.g. to override the cache policy). - */ - internal func makeRequest(manager: SessionManager, method: HTTPMethod, encoding: ParameterEncoding, headers: [String: String]) -> DataRequest { - return manager.request(URLString, method: method, parameters: parameters, encoding: encoding, headers: headers) - } - - override internal func execute(_ completion: @escaping (_ response: Response?, _ error: Error?) -> Void) { - let managerId: String = UUID().uuidString - // Create a new manager for each request to customize its request header - let manager = createSessionManager() - managerStore[managerId] = manager - - let encoding: ParameterEncoding = isBody ? JSONDataEncoding() : URLEncoding() - - let xMethod = Alamofire.HTTPMethod(rawValue: method) - let fileKeys = parameters == nil ? [] : parameters!.filter { $1 is NSURL } - .map { $0.0 } - - if fileKeys.count > 0 { - manager.upload(multipartFormData: { mpForm in - for (k, v) in self.parameters! { - switch v { - case let fileURL as URL: - if let mimeType = self.contentTypeForFormPart(fileURL: fileURL) { - mpForm.append(fileURL, withName: k, fileName: fileURL.lastPathComponent, mimeType: mimeType) - } else { - mpForm.append(fileURL, withName: k) - } - case let string as String: - mpForm.append(string.data(using: String.Encoding.utf8)!, withName: k) - case let number as NSNumber: - mpForm.append(number.stringValue.data(using: String.Encoding.utf8)!, withName: k) - default: - fatalError("Unprocessable value \(v) with key \(k)") - } - } - }, to: URLString, method: xMethod!, headers: nil, encodingCompletion: { encodingResult in - switch encodingResult { - case .success(let upload, _, _): - if let onProgressReady = self.onProgressReady { - onProgressReady(upload.uploadProgress) - } - self.processRequest(request: upload, managerId, completion) - case .failure(let encodingError): - completion(nil, ErrorResponse.error(415, nil, encodingError)) - } - }) - } else { - let request = makeRequest(manager: manager, method: xMethod!, encoding: encoding, headers: headers) - if let onProgressReady = self.onProgressReady { - onProgressReady(request.progress) - } - processRequest(request: request, managerId, completion) - } - - } - - fileprivate func processRequest(request: DataRequest, _ managerId: String, _ completion: @escaping (_ response: Response?, _ error: Error?) -> Void) { - if let credential = self.credential { - request.authenticate(usingCredential: credential) - } - - let cleanupRequest = { - managerStore[managerId] = nil - } - - let validatedRequest = request.validate() - - switch T.self { - case is String.Type: - validatedRequest.responseString(queue: PetstoreClientAPI.apiResponseQueue, completionHandler: { (stringResponse) in - cleanupRequest() - - if stringResponse.result.isFailure { - completion( - nil, - ErrorResponse.error(stringResponse.response?.statusCode ?? 500, stringResponse.data, stringResponse.result.error!) - ) - return - } - - completion( - Response( - response: stringResponse.response!, - body: ((stringResponse.result.value ?? "") as! T) - ), - nil - ) - }) - case is URL.Type: - validatedRequest.responseData(queue: PetstoreClientAPI.apiResponseQueue, completionHandler: { (dataResponse) in - cleanupRequest() - - do { - - guard !dataResponse.result.isFailure else { - throw DownloadException.responseFailed - } - - guard let data = dataResponse.data else { - throw DownloadException.responseDataMissing - } - - guard let request = request.request else { - throw DownloadException.requestMissing - } - - let fileManager = FileManager.default - let urlRequest = try request.asURLRequest() - let documentsDirectory = fileManager.urls(for: .documentDirectory, in: .userDomainMask)[0] - let requestURL = try self.getURL(from: urlRequest) - - var requestPath = try self.getPath(from: requestURL) - - if let headerFileName = self.getFileName(fromContentDisposition: dataResponse.response?.allHeaderFields["Content-Disposition"] as? String) { - requestPath = requestPath.appending("/\(headerFileName)") - } - - let filePath = documentsDirectory.appendingPathComponent(requestPath) - let directoryPath = filePath.deletingLastPathComponent().path - - try fileManager.createDirectory(atPath: directoryPath, withIntermediateDirectories: true, attributes: nil) - try data.write(to: filePath, options: .atomic) - - completion( - Response( - response: dataResponse.response!, - body: (filePath as! T) - ), - nil - ) - - } catch let requestParserError as DownloadException { - completion(nil, ErrorResponse.error(400, dataResponse.data, requestParserError)) - } catch let error { - completion(nil, ErrorResponse.error(400, dataResponse.data, error)) - } - return - }) - case is Void.Type: - validatedRequest.responseData(queue: PetstoreClientAPI.apiResponseQueue, completionHandler: { (voidResponse) in - cleanupRequest() - - if voidResponse.result.isFailure { - completion( - nil, - ErrorResponse.error(voidResponse.response?.statusCode ?? 500, voidResponse.data, voidResponse.result.error!) - ) - return - } - - completion( - Response( - response: voidResponse.response!, - body: nil), - nil - ) - }) - default: - validatedRequest.responseData(queue: PetstoreClientAPI.apiResponseQueue, completionHandler: { (dataResponse) in - cleanupRequest() - - if dataResponse.result.isFailure { - completion( - nil, - ErrorResponse.error(dataResponse.response?.statusCode ?? 500, dataResponse.data, dataResponse.result.error!) - ) - return - } - - completion( - Response( - response: dataResponse.response!, - body: (dataResponse.data as! T) - ), - nil - ) - }) - } - } - - internal func buildHeaders() -> [String: String] { - var httpHeaders = SessionManager.defaultHTTPHeaders - for (key, value) in self.headers { - httpHeaders[key] = value - } - return httpHeaders - } - - fileprivate func getFileName(fromContentDisposition contentDisposition: String?) -> String? { - - guard let contentDisposition = contentDisposition else { - return nil - } - - let items = contentDisposition.components(separatedBy: ";") - - var filename: String? - - for contentItem in items { - - let filenameKey = "filename=" - guard let range = contentItem.range(of: filenameKey) else { - break - } - - filename = contentItem - return filename? - .replacingCharacters(in: range, with: "") - .replacingOccurrences(of: "\"", with: "") - .trimmingCharacters(in: .whitespacesAndNewlines) - } - - return filename - - } - - fileprivate func getPath(from url: URL) throws -> String { - - guard var path = URLComponents(url: url, resolvingAgainstBaseURL: true)?.path else { - throw DownloadException.requestMissingPath - } - - if path.hasPrefix("/") { - path.remove(at: path.startIndex) - } - - return path - - } - - fileprivate func getURL(from urlRequest: URLRequest) throws -> URL { - - guard let url = urlRequest.url else { - throw DownloadException.requestMissingURL - } - - return url - } - -} - -private enum DownloadException: Error { - case responseDataMissing - case responseFailed - case requestMissing - case requestMissingPath - case requestMissingURL -} - -internal enum AlamofireDecodableRequestBuilderError: Error { - case emptyDataResponse - case nilHTTPResponse - case jsonDecoding(DecodingError) - case generalError(Error) -} - -internal class AlamofireDecodableRequestBuilder: AlamofireRequestBuilder { - - override fileprivate func processRequest(request: DataRequest, _ managerId: String, _ completion: @escaping (_ response: Response?, _ error: Error?) -> Void) { - if let credential = self.credential { - request.authenticate(usingCredential: credential) - } - - let cleanupRequest = { - managerStore[managerId] = nil - } - - let validatedRequest = request.validate() - - switch T.self { - case is String.Type: - validatedRequest.responseString(queue: PetstoreClientAPI.apiResponseQueue, completionHandler: { (stringResponse) in - cleanupRequest() - - if stringResponse.result.isFailure { - completion( - nil, - ErrorResponse.error(stringResponse.response?.statusCode ?? 500, stringResponse.data, stringResponse.result.error!) - ) - return - } - - completion( - Response( - response: stringResponse.response!, - body: ((stringResponse.result.value ?? "") as! T) - ), - nil - ) - }) - case is Void.Type: - validatedRequest.responseData(queue: PetstoreClientAPI.apiResponseQueue, completionHandler: { (voidResponse) in - cleanupRequest() - - if voidResponse.result.isFailure { - completion( - nil, - ErrorResponse.error(voidResponse.response?.statusCode ?? 500, voidResponse.data, voidResponse.result.error!) - ) - return - } - - completion( - Response( - response: voidResponse.response!, - body: nil), - nil - ) - }) - case is Data.Type: - validatedRequest.responseData(queue: PetstoreClientAPI.apiResponseQueue, completionHandler: { (dataResponse) in - cleanupRequest() - - if dataResponse.result.isFailure { - completion( - nil, - ErrorResponse.error(dataResponse.response?.statusCode ?? 500, dataResponse.data, dataResponse.result.error!) - ) - return - } - - completion( - Response( - response: dataResponse.response!, - body: (dataResponse.data as! T) - ), - nil - ) - }) - default: - validatedRequest.responseData(queue: PetstoreClientAPI.apiResponseQueue, completionHandler: { (dataResponse: DataResponse) in - cleanupRequest() - - guard dataResponse.result.isSuccess else { - completion(nil, ErrorResponse.error(dataResponse.response?.statusCode ?? 500, dataResponse.data, dataResponse.result.error!)) - return - } - - guard let data = dataResponse.data, !data.isEmpty else { - completion(nil, ErrorResponse.error(-1, nil, AlamofireDecodableRequestBuilderError.emptyDataResponse)) - return - } - - guard let httpResponse = dataResponse.response else { - completion(nil, ErrorResponse.error(-2, nil, AlamofireDecodableRequestBuilderError.nilHTTPResponse)) - return - } - - var responseObj: Response? - - let decodeResult: (decodableObj: T?, error: Error?) = CodableHelper.decode(T.self, from: data) - if decodeResult.error == nil { - responseObj = Response(response: httpResponse, body: decodeResult.decodableObj) - } - - completion(responseObj, decodeResult.error) - }) - } - } - -} diff --git a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/CodableHelper.swift b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/CodableHelper.swift deleted file mode 100644 index 86c1f884b2e9..000000000000 --- a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/CodableHelper.swift +++ /dev/null @@ -1,75 +0,0 @@ -// -// CodableHelper.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -internal typealias EncodeResult = (data: Data?, error: Error?) - -internal class CodableHelper { - - private static var customDateFormatter: DateFormatter? - private static var defaultDateFormatter: DateFormatter = { - let dateFormatter = DateFormatter() - dateFormatter.calendar = Calendar(identifier: .iso8601) - dateFormatter.locale = Locale(identifier: "en_US_POSIX") - dateFormatter.timeZone = TimeZone(secondsFromGMT: 0) - dateFormatter.dateFormat = Configuration.dateFormat - return dateFormatter - }() - private static var customJSONDecoder: JSONDecoder? - private static var defaultJSONDecoder: JSONDecoder = { - let decoder = JSONDecoder() - decoder.dateDecodingStrategy = .formatted(CodableHelper.dateFormatter) - return decoder - }() - private static var customJSONEncoder: JSONEncoder? - private static var defaultJSONEncoder: JSONEncoder = { - let encoder = JSONEncoder() - encoder.dateEncodingStrategy = .formatted(CodableHelper.dateFormatter) - encoder.outputFormatting = .prettyPrinted - return encoder - }() - - internal static var dateFormatter: DateFormatter { - get { return self.customDateFormatter ?? self.defaultDateFormatter } - set { self.customDateFormatter = newValue } - } - internal static var jsonDecoder: JSONDecoder { - get { return self.customJSONDecoder ?? self.defaultJSONDecoder } - set { self.customJSONDecoder = newValue } - } - internal static var jsonEncoder: JSONEncoder { - get { return self.customJSONEncoder ?? self.defaultJSONEncoder } - set { self.customJSONEncoder = newValue } - } - - internal class func decode(_ type: T.Type, from data: Data) -> (decodableObj: T?, error: Error?) where T: Decodable { - var returnedDecodable: T? - var returnedError: Error? - - do { - returnedDecodable = try self.jsonDecoder.decode(type, from: data) - } catch { - returnedError = error - } - - return (returnedDecodable, returnedError) - } - - internal class func encode(_ value: T) -> EncodeResult where T: Encodable { - var returnedData: Data? - var returnedError: Error? - - do { - returnedData = try self.jsonEncoder.encode(value) - } catch { - returnedError = error - } - - return (returnedData, returnedError) - } -} diff --git a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Configuration.swift b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Configuration.swift deleted file mode 100644 index bfcf939d4bb3..000000000000 --- a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Configuration.swift +++ /dev/null @@ -1,15 +0,0 @@ -// Configuration.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -internal class Configuration { - - // This value is used to configure the date formatter that is used to serialize dates into JSON format. - // You must set it prior to encoding any dates, and it will only be read once. - internal static var dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSZZZZZ" - -} diff --git a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Extensions.swift b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Extensions.swift deleted file mode 100644 index 66f407c1c5f9..000000000000 --- a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Extensions.swift +++ /dev/null @@ -1,173 +0,0 @@ -// Extensions.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -extension Bool: JSONEncodable { - func encodeToJSON() -> Any { return self as Any } -} - -extension Float: JSONEncodable { - func encodeToJSON() -> Any { return self as Any } -} - -extension Int: JSONEncodable { - func encodeToJSON() -> Any { return self as Any } -} - -extension Int32: JSONEncodable { - func encodeToJSON() -> Any { return NSNumber(value: self as Int32) } -} - -extension Int64: JSONEncodable { - func encodeToJSON() -> Any { return NSNumber(value: self as Int64) } -} - -extension Double: JSONEncodable { - func encodeToJSON() -> Any { return self as Any } -} - -extension String: JSONEncodable { - func encodeToJSON() -> Any { return self as Any } -} - -extension RawRepresentable where RawValue: JSONEncodable { - func encodeToJSON() -> Any { return self.rawValue as Any } -} - -private func encodeIfPossible(_ object: T) -> Any { - if let encodableObject = object as? JSONEncodable { - return encodableObject.encodeToJSON() - } else { - return object as Any - } -} - -extension Array: JSONEncodable { - func encodeToJSON() -> Any { - return self.map(encodeIfPossible) - } -} - -extension Dictionary: JSONEncodable { - func encodeToJSON() -> Any { - var dictionary = [AnyHashable: Any]() - for (key, value) in self { - dictionary[key] = encodeIfPossible(value) - } - return dictionary as Any - } -} - -extension Data: JSONEncodable { - func encodeToJSON() -> Any { - return self.base64EncodedString(options: Data.Base64EncodingOptions()) - } -} - -extension Date: JSONEncodable { - func encodeToJSON() -> Any { - return CodableHelper.dateFormatter.string(from: self) as Any - } -} - -extension URL: JSONEncodable { - func encodeToJSON() -> Any { - return self - } -} - -extension UUID: JSONEncodable { - func encodeToJSON() -> Any { - return self.uuidString - } -} - -extension String: CodingKey { - - public var stringValue: String { - return self - } - - public init?(stringValue: String) { - self.init(stringLiteral: stringValue) - } - - public var intValue: Int? { - return nil - } - - public init?(intValue: Int) { - return nil - } - -} - -extension KeyedEncodingContainerProtocol { - - internal mutating func encodeArray(_ values: [T], forKey key: Self.Key) throws where T: Encodable { - var arrayContainer = nestedUnkeyedContainer(forKey: key) - try arrayContainer.encode(contentsOf: values) - } - - internal mutating func encodeArrayIfPresent(_ values: [T]?, forKey key: Self.Key) throws where T: Encodable { - if let values = values { - try encodeArray(values, forKey: key) - } - } - - internal mutating func encodeMap(_ pairs: [Self.Key: T]) throws where T: Encodable { - for (key, value) in pairs { - try encode(value, forKey: key) - } - } - - internal mutating func encodeMapIfPresent(_ pairs: [Self.Key: T]?) throws where T: Encodable { - if let pairs = pairs { - try encodeMap(pairs) - } - } - -} - -extension KeyedDecodingContainerProtocol { - - internal func decodeArray(_ type: T.Type, forKey key: Self.Key) throws -> [T] where T: Decodable { - var tmpArray = [T]() - - var nestedContainer = try nestedUnkeyedContainer(forKey: key) - while !nestedContainer.isAtEnd { - let arrayValue = try nestedContainer.decode(T.self) - tmpArray.append(arrayValue) - } - - return tmpArray - } - - internal func decodeArrayIfPresent(_ type: T.Type, forKey key: Self.Key) throws -> [T]? where T: Decodable { - var tmpArray: [T]? - - if contains(key) { - tmpArray = try decodeArray(T.self, forKey: key) - } - - return tmpArray - } - - internal func decodeMap(_ type: T.Type, excludedKeys: Set) throws -> [Self.Key: T] where T: Decodable { - var map: [Self.Key: T] = [:] - - for key in allKeys { - if !excludedKeys.contains(key) { - let value = try decode(T.self, forKey: key) - map[key] = value - } - } - - return map - } - -} diff --git a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/JSONEncodableEncoding.swift b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/JSONEncodableEncoding.swift deleted file mode 100644 index bd9f3a2ed0d5..000000000000 --- a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/JSONEncodableEncoding.swift +++ /dev/null @@ -1,54 +0,0 @@ -// -// JSONDataEncoding.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -import Alamofire - -internal struct JSONDataEncoding: ParameterEncoding { - - // MARK: Properties - - private static let jsonDataKey = "jsonData" - - // MARK: Encoding - - /// Creates a URL request by encoding parameters and applying them onto an existing request. - /// - /// - parameter urlRequest: The request to have parameters applied. - /// - parameter parameters: The parameters to apply. This should have a single key/value - /// pair with "jsonData" as the key and a Data object as the value. - /// - /// - throws: An `Error` if the encoding process encounters an error. - /// - /// - returns: The encoded request. - internal func encode(_ urlRequest: URLRequestConvertible, with parameters: Parameters?) throws -> URLRequest { - var urlRequest = try urlRequest.asURLRequest() - - guard let jsonData = parameters?[JSONDataEncoding.jsonDataKey] as? Data, !jsonData.isEmpty else { - return urlRequest - } - - if urlRequest.value(forHTTPHeaderField: "Content-Type") == nil { - urlRequest.setValue("application/json", forHTTPHeaderField: "Content-Type") - } - - urlRequest.httpBody = jsonData - - return urlRequest - } - - internal static func encodingParameters(jsonData: Data?) -> Parameters? { - var returnedParams: Parameters? - if let jsonData = jsonData, !jsonData.isEmpty { - var params = Parameters() - params[jsonDataKey] = jsonData - returnedParams = params - } - return returnedParams - } - -} diff --git a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift deleted file mode 100644 index fe09f37cd02f..000000000000 --- a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift +++ /dev/null @@ -1,43 +0,0 @@ -// -// JSONEncodingHelper.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -import Alamofire - -internal class JSONEncodingHelper { - - internal class func encodingParameters(forEncodableObject encodableObj: T?) -> Parameters? { - var params: Parameters? - - // Encode the Encodable object - if let encodableObj = encodableObj { - let encodeResult = CodableHelper.encode(encodableObj) - if encodeResult.error == nil { - params = JSONDataEncoding.encodingParameters(jsonData: encodeResult.data) - } - } - - return params - } - - internal class func encodingParameters(forEncodableObject encodableObj: Any?) -> Parameters? { - var params: Parameters? - - if let encodableObj = encodableObj { - do { - let data = try JSONSerialization.data(withJSONObject: encodableObj, options: .prettyPrinted) - params = JSONDataEncoding.encodingParameters(jsonData: data) - } catch { - print(error) - return nil - } - } - - return params - } - -} diff --git a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models.swift b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models.swift deleted file mode 100644 index 5c253abc2c40..000000000000 --- a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models.swift +++ /dev/null @@ -1,36 +0,0 @@ -// Models.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -protocol JSONEncodable { - func encodeToJSON() -> Any -} - -internal enum ErrorResponse: Error { - case error(Int, Data?, Error) -} - -internal class Response { - internal let statusCode: Int - internal let header: [String: String] - internal let body: T? - - internal init(statusCode: Int, header: [String: String], body: T?) { - self.statusCode = statusCode - self.header = header - self.body = body - } - - internal convenience init(response: HTTPURLResponse, body: T?) { - let rawHeader = response.allHeaderFields - var header = [String: String]() - for case let (key, value) as (String, String) in rawHeader { - header[key] = value - } - self.init(statusCode: response.statusCode, header: header, body: body) - } -} diff --git a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift deleted file mode 100644 index 203d2c1a931d..000000000000 --- a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift +++ /dev/null @@ -1,25 +0,0 @@ -// -// AdditionalPropertiesClass.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -internal struct AdditionalPropertiesClass: Codable { - - internal var mapString: [String: String]? - internal var mapMapString: [String: [String: String]]? - - internal init(mapString: [String: String]?, mapMapString: [String: [String: String]]?) { - self.mapString = mapString - self.mapMapString = mapMapString - } - - internal enum CodingKeys: String, CodingKey { - case mapString = "map_string" - case mapMapString = "map_map_string" - } - -} diff --git a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift deleted file mode 100644 index ada7f86de509..000000000000 --- a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift +++ /dev/null @@ -1,20 +0,0 @@ -// -// Animal.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -internal struct Animal: Codable { - - internal var className: String - internal var color: String? = "red" - - internal init(className: String, color: String?) { - self.className = className - self.color = color - } - -} diff --git a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift deleted file mode 100644 index 3ebe9e9a5dea..000000000000 --- a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift +++ /dev/null @@ -1,10 +0,0 @@ -// -// AnimalFarm.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -internal typealias AnimalFarm = [Animal] diff --git a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift deleted file mode 100644 index b60d8999b4b2..000000000000 --- a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift +++ /dev/null @@ -1,22 +0,0 @@ -// -// ApiResponse.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -internal struct ApiResponse: Codable { - - internal var code: Int? - internal var type: String? - internal var message: String? - - internal init(code: Int?, type: String?, message: String?) { - self.code = code - self.type = type - self.message = message - } - -} diff --git a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift deleted file mode 100644 index ef26025dcd8f..000000000000 --- a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift +++ /dev/null @@ -1,22 +0,0 @@ -// -// ArrayOfArrayOfNumberOnly.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -internal struct ArrayOfArrayOfNumberOnly: Codable { - - internal var arrayArrayNumber: [[Double]]? - - internal init(arrayArrayNumber: [[Double]]?) { - self.arrayArrayNumber = arrayArrayNumber - } - - internal enum CodingKeys: String, CodingKey { - case arrayArrayNumber = "ArrayArrayNumber" - } - -} diff --git a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift deleted file mode 100644 index 1147e9394c72..000000000000 --- a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift +++ /dev/null @@ -1,22 +0,0 @@ -// -// ArrayOfNumberOnly.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -internal struct ArrayOfNumberOnly: Codable { - - internal var arrayNumber: [Double]? - - internal init(arrayNumber: [Double]?) { - self.arrayNumber = arrayNumber - } - - internal enum CodingKeys: String, CodingKey { - case arrayNumber = "ArrayNumber" - } - -} diff --git a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift deleted file mode 100644 index ffbc3ebc7367..000000000000 --- a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift +++ /dev/null @@ -1,28 +0,0 @@ -// -// ArrayTest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -internal struct ArrayTest: Codable { - - internal var arrayOfString: [String]? - internal var arrayArrayOfInteger: [[Int64]]? - internal var arrayArrayOfModel: [[ReadOnlyFirst]]? - - internal init(arrayOfString: [String]?, arrayArrayOfInteger: [[Int64]]?, arrayArrayOfModel: [[ReadOnlyFirst]]?) { - self.arrayOfString = arrayOfString - self.arrayArrayOfInteger = arrayArrayOfInteger - self.arrayArrayOfModel = arrayArrayOfModel - } - - internal enum CodingKeys: String, CodingKey { - case arrayOfString = "array_of_string" - case arrayArrayOfInteger = "array_array_of_integer" - case arrayArrayOfModel = "array_array_of_model" - } - -} diff --git a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift deleted file mode 100644 index 52cdbb01be79..000000000000 --- a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift +++ /dev/null @@ -1,38 +0,0 @@ -// -// Capitalization.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -internal struct Capitalization: Codable { - - internal var smallCamel: String? - internal var capitalCamel: String? - internal var smallSnake: String? - internal var capitalSnake: String? - internal var sCAETHFlowPoints: String? - /** Name of the pet */ - internal var ATT_NAME: String? - - internal init(smallCamel: String?, capitalCamel: String?, smallSnake: String?, capitalSnake: String?, sCAETHFlowPoints: String?, ATT_NAME: String?) { - self.smallCamel = smallCamel - self.capitalCamel = capitalCamel - self.smallSnake = smallSnake - self.capitalSnake = capitalSnake - self.sCAETHFlowPoints = sCAETHFlowPoints - self.ATT_NAME = ATT_NAME - } - - internal enum CodingKeys: String, CodingKey { - case smallCamel - case capitalCamel = "CapitalCamel" - case smallSnake = "small_Snake" - case capitalSnake = "Capital_Snake" - case sCAETHFlowPoints = "SCA_ETH_Flow_Points" - case ATT_NAME - } - -} diff --git a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift deleted file mode 100644 index 8a603dee5f1f..000000000000 --- a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift +++ /dev/null @@ -1,22 +0,0 @@ -// -// Cat.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -internal struct Cat: Codable { - - internal var className: String - internal var color: String? = "red" - internal var declawed: Bool? - - internal init(className: String, color: String?, declawed: Bool?) { - self.className = className - self.color = color - self.declawed = declawed - } - -} diff --git a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift deleted file mode 100644 index 45b7dbb26dcf..000000000000 --- a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift +++ /dev/null @@ -1,18 +0,0 @@ -// -// CatAllOf.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -internal struct CatAllOf: Codable { - - internal var declawed: Bool? - - internal init(declawed: Bool?) { - self.declawed = declawed - } - -} diff --git a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Category.swift b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Category.swift deleted file mode 100644 index 849bf788dfb3..000000000000 --- a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Category.swift +++ /dev/null @@ -1,20 +0,0 @@ -// -// Category.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -internal struct Category: Codable { - - internal var id: Int64? - internal var name: String = "default-name" - - internal init(id: Int64?, name: String) { - self.id = id - self.name = name - } - -} diff --git a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift deleted file mode 100644 index 0f1bc19fe595..000000000000 --- a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift +++ /dev/null @@ -1,19 +0,0 @@ -// -// ClassModel.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -/** Model for testing model with \"_class\" property */ -internal struct ClassModel: Codable { - - internal var _class: String? - - internal init(_class: String?) { - self._class = _class - } - -} diff --git a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Client.swift b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Client.swift deleted file mode 100644 index ddee836043fa..000000000000 --- a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Client.swift +++ /dev/null @@ -1,18 +0,0 @@ -// -// Client.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -internal struct Client: Codable { - - internal var client: String? - - internal init(client: String?) { - self.client = client - } - -} diff --git a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift deleted file mode 100644 index 6b5250de4a4a..000000000000 --- a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift +++ /dev/null @@ -1,22 +0,0 @@ -// -// Dog.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -internal struct Dog: Codable { - - internal var className: String - internal var color: String? = "red" - internal var breed: String? - - internal init(className: String, color: String?, breed: String?) { - self.className = className - self.color = color - self.breed = breed - } - -} diff --git a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift deleted file mode 100644 index ef3ff7f1d78b..000000000000 --- a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift +++ /dev/null @@ -1,18 +0,0 @@ -// -// DogAllOf.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -internal struct DogAllOf: Codable { - - internal var breed: String? - - internal init(breed: String?) { - self.breed = breed - } - -} diff --git a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift deleted file mode 100644 index b84e5e2e1e2f..000000000000 --- a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift +++ /dev/null @@ -1,33 +0,0 @@ -// -// EnumArrays.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -internal struct EnumArrays: Codable { - - internal enum JustSymbol: String, Codable { - case greaterThanOrEqualTo = ">=" - case dollar = "$" - } - internal enum ArrayEnum: String, Codable { - case fish = "fish" - case crab = "crab" - } - internal var justSymbol: JustSymbol? - internal var arrayEnum: [ArrayEnum]? - - internal init(justSymbol: JustSymbol?, arrayEnum: [ArrayEnum]?) { - self.justSymbol = justSymbol - self.arrayEnum = arrayEnum - } - - internal enum CodingKeys: String, CodingKey { - case justSymbol = "just_symbol" - case arrayEnum = "array_enum" - } - -} diff --git a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift deleted file mode 100644 index 2520f9bd8593..000000000000 --- a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift +++ /dev/null @@ -1,14 +0,0 @@ -// -// EnumClass.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -internal enum EnumClass: String, Codable { - case abc = "_abc" - case efg = "-efg" - case xyz = "(xyz)" -} diff --git a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift deleted file mode 100644 index eba9a8056efd..000000000000 --- a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift +++ /dev/null @@ -1,52 +0,0 @@ -// -// EnumTest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -internal struct EnumTest: Codable { - - internal enum EnumString: String, Codable { - case upper = "UPPER" - case lower = "lower" - case empty = "" - } - internal enum EnumStringRequired: String, Codable { - case upper = "UPPER" - case lower = "lower" - case empty = "" - } - internal enum EnumInteger: Int, Codable { - case _1 = 1 - case number1 = -1 - } - internal enum EnumNumber: Double, Codable { - case _11 = 1.1 - case number12 = -1.2 - } - internal var enumString: EnumString? - internal var enumStringRequired: EnumStringRequired - internal var enumInteger: EnumInteger? - internal var enumNumber: EnumNumber? - internal var outerEnum: OuterEnum? - - internal init(enumString: EnumString?, enumStringRequired: EnumStringRequired, enumInteger: EnumInteger?, enumNumber: EnumNumber?, outerEnum: OuterEnum?) { - self.enumString = enumString - self.enumStringRequired = enumStringRequired - self.enumInteger = enumInteger - self.enumNumber = enumNumber - self.outerEnum = outerEnum - } - - internal enum CodingKeys: String, CodingKey { - case enumString = "enum_string" - case enumStringRequired = "enum_string_required" - case enumInteger = "enum_integer" - case enumNumber = "enum_number" - case outerEnum - } - -} diff --git a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/File.swift b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/File.swift deleted file mode 100644 index 632402fb9e03..000000000000 --- a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/File.swift +++ /dev/null @@ -1,20 +0,0 @@ -// -// File.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -/** Must be named `File` for test. */ -internal struct File: Codable { - - /** Test capitalization */ - internal var sourceURI: String? - - internal init(sourceURI: String?) { - self.sourceURI = sourceURI - } - -} diff --git a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift deleted file mode 100644 index e478e6c4b7d1..000000000000 --- a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift +++ /dev/null @@ -1,20 +0,0 @@ -// -// FileSchemaTestClass.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -internal struct FileSchemaTestClass: Codable { - - internal var file: File? - internal var files: [File]? - - internal init(file: File?, files: [File]?) { - self.file = file - self.files = files - } - -} diff --git a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift deleted file mode 100644 index 23395c93b569..000000000000 --- a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift +++ /dev/null @@ -1,42 +0,0 @@ -// -// FormatTest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -internal struct FormatTest: Codable { - - internal var integer: Int? - internal var int32: Int? - internal var int64: Int64? - internal var number: Double - internal var float: Float? - internal var double: Double? - internal var string: String? - internal var byte: Data - internal var binary: URL? - internal var date: Date - internal var dateTime: Date? - internal var uuid: UUID? - internal var password: String - - internal init(integer: Int?, int32: Int?, int64: Int64?, number: Double, float: Float?, double: Double?, string: String?, byte: Data, binary: URL?, date: Date, dateTime: Date?, uuid: UUID?, password: String) { - self.integer = integer - self.int32 = int32 - self.int64 = int64 - self.number = number - self.float = float - self.double = double - self.string = string - self.byte = byte - self.binary = binary - self.date = date - self.dateTime = dateTime - self.uuid = uuid - self.password = password - } - -} diff --git a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift deleted file mode 100644 index 831963ba2ed2..000000000000 --- a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift +++ /dev/null @@ -1,20 +0,0 @@ -// -// HasOnlyReadOnly.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -internal struct HasOnlyReadOnly: Codable { - - internal var bar: String? - internal var foo: String? - - internal init(bar: String?, foo: String?) { - self.bar = bar - self.foo = foo - } - -} diff --git a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/List.swift b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/List.swift deleted file mode 100644 index ba9579996d19..000000000000 --- a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/List.swift +++ /dev/null @@ -1,22 +0,0 @@ -// -// List.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -internal struct List: Codable { - - internal var _123list: String? - - internal init(_123list: String?) { - self._123list = _123list - } - - internal enum CodingKeys: String, CodingKey { - case _123list = "123-list" - } - -} diff --git a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift deleted file mode 100644 index f59541f76751..000000000000 --- a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift +++ /dev/null @@ -1,35 +0,0 @@ -// -// MapTest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -internal struct MapTest: Codable { - - internal enum MapOfEnumString: String, Codable { - case upper = "UPPER" - case lower = "lower" - } - internal var mapMapOfString: [String: [String: String]]? - internal var mapOfEnumString: [String: String]? - internal var directMap: [String: Bool]? - internal var indirectMap: StringBooleanMap? - - internal init(mapMapOfString: [String: [String: String]]?, mapOfEnumString: [String: String]?, directMap: [String: Bool]?, indirectMap: StringBooleanMap?) { - self.mapMapOfString = mapMapOfString - self.mapOfEnumString = mapOfEnumString - self.directMap = directMap - self.indirectMap = indirectMap - } - - internal enum CodingKeys: String, CodingKey { - case mapMapOfString = "map_map_of_string" - case mapOfEnumString = "map_of_enum_string" - case directMap = "direct_map" - case indirectMap = "indirect_map" - } - -} diff --git a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift deleted file mode 100644 index c71bb9256b0a..000000000000 --- a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift +++ /dev/null @@ -1,22 +0,0 @@ -// -// MixedPropertiesAndAdditionalPropertiesClass.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -internal struct MixedPropertiesAndAdditionalPropertiesClass: Codable { - - internal var uuid: UUID? - internal var dateTime: Date? - internal var map: [String: Animal]? - - internal init(uuid: UUID?, dateTime: Date?, map: [String: Animal]?) { - self.uuid = uuid - self.dateTime = dateTime - self.map = map - } - -} diff --git a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift deleted file mode 100644 index bd288322e758..000000000000 --- a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift +++ /dev/null @@ -1,26 +0,0 @@ -// -// Model200Response.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -/** Model for testing model name starting with number */ -internal struct Model200Response: Codable { - - internal var name: Int? - internal var _class: String? - - internal init(name: Int?, _class: String?) { - self.name = name - self._class = _class - } - - internal enum CodingKeys: String, CodingKey { - case name - case _class = "class" - } - -} diff --git a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Name.swift b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Name.swift deleted file mode 100644 index 85a5b7953954..000000000000 --- a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Name.swift +++ /dev/null @@ -1,32 +0,0 @@ -// -// Name.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -/** Model for testing model name same as property name */ -internal struct Name: Codable { - - internal var name: Int - internal var snakeCase: Int? - internal var property: String? - internal var _123number: Int? - - internal init(name: Int, snakeCase: Int?, property: String?, _123number: Int?) { - self.name = name - self.snakeCase = snakeCase - self.property = property - self._123number = _123number - } - - internal enum CodingKeys: String, CodingKey { - case name - case snakeCase = "snake_case" - case property - case _123number = "123Number" - } - -} diff --git a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift deleted file mode 100644 index 7dbe99f1426c..000000000000 --- a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift +++ /dev/null @@ -1,22 +0,0 @@ -// -// NumberOnly.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -internal struct NumberOnly: Codable { - - internal var justNumber: Double? - - internal init(justNumber: Double?) { - self.justNumber = justNumber - } - - internal enum CodingKeys: String, CodingKey { - case justNumber = "JustNumber" - } - -} diff --git a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Order.swift b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Order.swift deleted file mode 100644 index 7f575485bf75..000000000000 --- a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Order.swift +++ /dev/null @@ -1,34 +0,0 @@ -// -// Order.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -internal struct Order: Codable { - - internal enum Status: String, Codable { - case placed = "placed" - case approved = "approved" - case delivered = "delivered" - } - internal var id: Int64? - internal var petId: Int64? - internal var quantity: Int? - internal var shipDate: Date? - /** Order Status */ - internal var status: Status? - internal var complete: Bool? = false - - internal init(id: Int64?, petId: Int64?, quantity: Int?, shipDate: Date?, status: Status?, complete: Bool?) { - self.id = id - self.petId = petId - self.quantity = quantity - self.shipDate = shipDate - self.status = status - self.complete = complete - } - -} diff --git a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift deleted file mode 100644 index 04fbad30ef76..000000000000 --- a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift +++ /dev/null @@ -1,28 +0,0 @@ -// -// OuterComposite.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -internal struct OuterComposite: Codable { - - internal var myNumber: Double? - internal var myString: String? - internal var myBoolean: Bool? - - internal init(myNumber: Double?, myString: String?, myBoolean: Bool?) { - self.myNumber = myNumber - self.myString = myString - self.myBoolean = myBoolean - } - - internal enum CodingKeys: String, CodingKey { - case myNumber = "my_number" - case myString = "my_string" - case myBoolean = "my_boolean" - } - -} diff --git a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift deleted file mode 100644 index fd2d4b4cdda6..000000000000 --- a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift +++ /dev/null @@ -1,14 +0,0 @@ -// -// OuterEnum.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -internal enum OuterEnum: String, Codable { - case placed = "placed" - case approved = "approved" - case delivered = "delivered" -} diff --git a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift deleted file mode 100644 index 951f5929f922..000000000000 --- a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift +++ /dev/null @@ -1,34 +0,0 @@ -// -// Pet.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -internal struct Pet: Codable { - - internal enum Status: String, Codable { - case available = "available" - case pending = "pending" - case sold = "sold" - } - internal var id: Int64? - internal var category: Category? - internal var name: String - internal var photoUrls: [String] - internal var tags: [Tag]? - /** pet status in the store */ - internal var status: Status? - - internal init(id: Int64?, category: Category?, name: String, photoUrls: [String], tags: [Tag]?, status: Status?) { - self.id = id - self.category = category - self.name = name - self.photoUrls = photoUrls - self.tags = tags - self.status = status - } - -} diff --git a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift deleted file mode 100644 index d02c6cc5fd9f..000000000000 --- a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift +++ /dev/null @@ -1,20 +0,0 @@ -// -// ReadOnlyFirst.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -internal struct ReadOnlyFirst: Codable { - - internal var bar: String? - internal var baz: String? - - internal init(bar: String?, baz: String?) { - self.bar = bar - self.baz = baz - } - -} diff --git a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Return.swift b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Return.swift deleted file mode 100644 index 2e28c04ef55d..000000000000 --- a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Return.swift +++ /dev/null @@ -1,23 +0,0 @@ -// -// Return.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -/** Model for testing reserved words */ -internal struct Return: Codable { - - internal var _return: Int? - - internal init(_return: Int?) { - self._return = _return - } - - internal enum CodingKeys: String, CodingKey { - case _return = "return" - } - -} diff --git a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift deleted file mode 100644 index b35724b1ca7a..000000000000 --- a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift +++ /dev/null @@ -1,22 +0,0 @@ -// -// SpecialModelName.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -internal struct SpecialModelName: Codable { - - internal var specialPropertyName: Int64? - - internal init(specialPropertyName: Int64?) { - self.specialPropertyName = specialPropertyName - } - - internal enum CodingKeys: String, CodingKey { - case specialPropertyName = "$special[property.name]" - } - -} diff --git a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift deleted file mode 100644 index dc3d00e13014..000000000000 --- a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift +++ /dev/null @@ -1,45 +0,0 @@ -// -// StringBooleanMap.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -internal struct StringBooleanMap: Codable { - - internal var additionalProperties: [String: Bool] = [:] - - internal subscript(key: String) -> Bool? { - get { - if let value = additionalProperties[key] { - return value - } - return nil - } - - set { - additionalProperties[key] = newValue - } - } - - // Encodable protocol methods - - internal func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - try container.encodeMap(additionalProperties) - } - - // Decodable protocol methods - - internal init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - var nonAdditionalPropertyKeys = Set() - additionalProperties = try container.decodeMap(Bool.self, excludedKeys: nonAdditionalPropertyKeys) - } - -} diff --git a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift deleted file mode 100644 index 1e4de951fb2c..000000000000 --- a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift +++ /dev/null @@ -1,20 +0,0 @@ -// -// Tag.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -internal struct Tag: Codable { - - internal var id: Int64? - internal var name: String? - - internal init(id: Int64?, name: String?) { - self.id = id - self.name = name - } - -} diff --git a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift deleted file mode 100644 index 0cff6b6a2f8b..000000000000 --- a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift +++ /dev/null @@ -1,34 +0,0 @@ -// -// TypeHolderDefault.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -internal struct TypeHolderDefault: Codable { - - internal var stringItem: String = "what" - internal var numberItem: Double - internal var integerItem: Int - internal var boolItem: Bool = true - internal var arrayItem: [Int] - - internal init(stringItem: String, numberItem: Double, integerItem: Int, boolItem: Bool, arrayItem: [Int]) { - self.stringItem = stringItem - self.numberItem = numberItem - self.integerItem = integerItem - self.boolItem = boolItem - self.arrayItem = arrayItem - } - - internal enum CodingKeys: String, CodingKey { - case stringItem = "string_item" - case numberItem = "number_item" - case integerItem = "integer_item" - case boolItem = "bool_item" - case arrayItem = "array_item" - } - -} diff --git a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift deleted file mode 100644 index 5d8f63dfe4ae..000000000000 --- a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift +++ /dev/null @@ -1,34 +0,0 @@ -// -// TypeHolderExample.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -internal struct TypeHolderExample: Codable { - - internal var stringItem: String - internal var numberItem: Double - internal var integerItem: Int - internal var boolItem: Bool - internal var arrayItem: [Int] - - internal init(stringItem: String, numberItem: Double, integerItem: Int, boolItem: Bool, arrayItem: [Int]) { - self.stringItem = stringItem - self.numberItem = numberItem - self.integerItem = integerItem - self.boolItem = boolItem - self.arrayItem = arrayItem - } - - internal enum CodingKeys: String, CodingKey { - case stringItem = "string_item" - case numberItem = "number_item" - case integerItem = "integer_item" - case boolItem = "bool_item" - case arrayItem = "array_item" - } - -} diff --git a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/User.swift b/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/User.swift deleted file mode 100644 index ada8a7f82d96..000000000000 --- a/samples/client/petstore/swift4/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/User.swift +++ /dev/null @@ -1,33 +0,0 @@ -// -// User.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -internal struct User: Codable { - - internal var id: Int64? - internal var username: String? - internal var firstName: String? - internal var lastName: String? - internal var email: String? - internal var password: String? - internal var phone: String? - /** User Status */ - internal var userStatus: Int? - - internal init(id: Int64?, username: String?, firstName: String?, lastName: String?, email: String?, password: String?, phone: String?, userStatus: Int?) { - self.id = id - self.username = username - self.firstName = firstName - self.lastName = lastName - self.email = email - self.password = password - self.phone = phone - self.userStatus = userStatus - } - -} diff --git a/samples/client/petstore/swift4/nonPublicApi/README.md b/samples/client/petstore/swift4/nonPublicApi/README.md deleted file mode 100644 index bd093317bd7a..000000000000 --- a/samples/client/petstore/swift4/nonPublicApi/README.md +++ /dev/null @@ -1,141 +0,0 @@ -# Swift4 API client for PetstoreClient - -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 API client 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 an API client. - -- API version: 1.0.0 -- Package version: -- Build package: org.openapitools.codegen.languages.Swift4Codegen - -## Installation - -### Carthage - -Run `carthage update` - -### CocoaPods - -Run `pod install` - -## Documentation for API Endpoints - -All URIs are relative to *http://petstore.swagger.io:80/v2* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*AnotherFakeAPI* | [**call123testSpecialTags**](docs/AnotherFakeAPI.md#call123testspecialtags) | **PATCH** /another-fake/dummy | To test special tags -*FakeAPI* | [**fakeOuterBooleanSerialize**](docs/FakeAPI.md#fakeouterbooleanserialize) | **POST** /fake/outer/boolean | -*FakeAPI* | [**fakeOuterCompositeSerialize**](docs/FakeAPI.md#fakeoutercompositeserialize) | **POST** /fake/outer/composite | -*FakeAPI* | [**fakeOuterNumberSerialize**](docs/FakeAPI.md#fakeouternumberserialize) | **POST** /fake/outer/number | -*FakeAPI* | [**fakeOuterStringSerialize**](docs/FakeAPI.md#fakeouterstringserialize) | **POST** /fake/outer/string | -*FakeAPI* | [**testBodyWithFileSchema**](docs/FakeAPI.md#testbodywithfileschema) | **PUT** /fake/body-with-file-schema | -*FakeAPI* | [**testBodyWithQueryParams**](docs/FakeAPI.md#testbodywithqueryparams) | **PUT** /fake/body-with-query-params | -*FakeAPI* | [**testClientModel**](docs/FakeAPI.md#testclientmodel) | **PATCH** /fake | To test \"client\" model -*FakeAPI* | [**testEndpointParameters**](docs/FakeAPI.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 -*FakeAPI* | [**testEnumParameters**](docs/FakeAPI.md#testenumparameters) | **GET** /fake | To test enum parameters -*FakeAPI* | [**testGroupParameters**](docs/FakeAPI.md#testgroupparameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) -*FakeAPI* | [**testInlineAdditionalProperties**](docs/FakeAPI.md#testinlineadditionalproperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties -*FakeAPI* | [**testJsonFormData**](docs/FakeAPI.md#testjsonformdata) | **GET** /fake/jsonFormData | test json serialization of form data -*FakeClassnameTags123API* | [**testClassname**](docs/FakeClassnameTags123API.md#testclassname) | **PATCH** /fake_classname_test | To test class name in snake case -*PetAPI* | [**addPet**](docs/PetAPI.md#addpet) | **POST** /pet | Add a new pet to the store -*PetAPI* | [**deletePet**](docs/PetAPI.md#deletepet) | **DELETE** /pet/{petId} | Deletes a pet -*PetAPI* | [**findPetsByStatus**](docs/PetAPI.md#findpetsbystatus) | **GET** /pet/findByStatus | Finds Pets by status -*PetAPI* | [**findPetsByTags**](docs/PetAPI.md#findpetsbytags) | **GET** /pet/findByTags | Finds Pets by tags -*PetAPI* | [**getPetById**](docs/PetAPI.md#getpetbyid) | **GET** /pet/{petId} | Find pet by ID -*PetAPI* | [**updatePet**](docs/PetAPI.md#updatepet) | **PUT** /pet | Update an existing pet -*PetAPI* | [**updatePetWithForm**](docs/PetAPI.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data -*PetAPI* | [**uploadFile**](docs/PetAPI.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image -*PetAPI* | [**uploadFileWithRequiredFile**](docs/PetAPI.md#uploadfilewithrequiredfile) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required) -*StoreAPI* | [**deleteOrder**](docs/StoreAPI.md#deleteorder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID -*StoreAPI* | [**getInventory**](docs/StoreAPI.md#getinventory) | **GET** /store/inventory | Returns pet inventories by status -*StoreAPI* | [**getOrderById**](docs/StoreAPI.md#getorderbyid) | **GET** /store/order/{order_id} | Find purchase order by ID -*StoreAPI* | [**placeOrder**](docs/StoreAPI.md#placeorder) | **POST** /store/order | Place an order for a pet -*UserAPI* | [**createUser**](docs/UserAPI.md#createuser) | **POST** /user | Create user -*UserAPI* | [**createUsersWithArrayInput**](docs/UserAPI.md#createuserswitharrayinput) | **POST** /user/createWithArray | Creates list of users with given input array -*UserAPI* | [**createUsersWithListInput**](docs/UserAPI.md#createuserswithlistinput) | **POST** /user/createWithList | Creates list of users with given input array -*UserAPI* | [**deleteUser**](docs/UserAPI.md#deleteuser) | **DELETE** /user/{username} | Delete user -*UserAPI* | [**getUserByName**](docs/UserAPI.md#getuserbyname) | **GET** /user/{username} | Get user by user name -*UserAPI* | [**loginUser**](docs/UserAPI.md#loginuser) | **GET** /user/login | Logs user into the system -*UserAPI* | [**logoutUser**](docs/UserAPI.md#logoutuser) | **GET** /user/logout | Logs out current logged in user session -*UserAPI* | [**updateUser**](docs/UserAPI.md#updateuser) | **PUT** /user/{username} | Updated user - - -## Documentation For Models - - - [AdditionalPropertiesClass](docs/AdditionalPropertiesClass.md) - - [Animal](docs/Animal.md) - - [AnimalFarm](docs/AnimalFarm.md) - - [ApiResponse](docs/ApiResponse.md) - - [ArrayOfArrayOfNumberOnly](docs/ArrayOfArrayOfNumberOnly.md) - - [ArrayOfNumberOnly](docs/ArrayOfNumberOnly.md) - - [ArrayTest](docs/ArrayTest.md) - - [Capitalization](docs/Capitalization.md) - - [Cat](docs/Cat.md) - - [CatAllOf](docs/CatAllOf.md) - - [Category](docs/Category.md) - - [ClassModel](docs/ClassModel.md) - - [Client](docs/Client.md) - - [Dog](docs/Dog.md) - - [DogAllOf](docs/DogAllOf.md) - - [EnumArrays](docs/EnumArrays.md) - - [EnumClass](docs/EnumClass.md) - - [EnumTest](docs/EnumTest.md) - - [File](docs/File.md) - - [FileSchemaTestClass](docs/FileSchemaTestClass.md) - - [FormatTest](docs/FormatTest.md) - - [HasOnlyReadOnly](docs/HasOnlyReadOnly.md) - - [List](docs/List.md) - - [MapTest](docs/MapTest.md) - - [MixedPropertiesAndAdditionalPropertiesClass](docs/MixedPropertiesAndAdditionalPropertiesClass.md) - - [Model200Response](docs/Model200Response.md) - - [Name](docs/Name.md) - - [NumberOnly](docs/NumberOnly.md) - - [Order](docs/Order.md) - - [OuterComposite](docs/OuterComposite.md) - - [OuterEnum](docs/OuterEnum.md) - - [Pet](docs/Pet.md) - - [ReadOnlyFirst](docs/ReadOnlyFirst.md) - - [Return](docs/Return.md) - - [SpecialModelName](docs/SpecialModelName.md) - - [StringBooleanMap](docs/StringBooleanMap.md) - - [Tag](docs/Tag.md) - - [TypeHolderDefault](docs/TypeHolderDefault.md) - - [TypeHolderExample](docs/TypeHolderExample.md) - - [User](docs/User.md) - - -## Documentation For Authorization - - -## api_key - -- **Type**: API key -- **API key parameter name**: api_key -- **Location**: HTTP header - -## api_key_query - -- **Type**: API key -- **API key parameter name**: api_key_query -- **Location**: URL query string - -## http_basic_test - -- **Type**: HTTP basic authentication - -## petstore_auth - -- **Type**: OAuth -- **Flow**: implicit -- **Authorization URL**: http://petstore.swagger.io/api/oauth/dialog -- **Scopes**: - - **write:pets**: modify pets in your account - - **read:pets**: read your pets - - -## Author - - - diff --git a/samples/client/petstore/swift4/nonPublicApi/docs/AdditionalPropertiesAnyType.md b/samples/client/petstore/swift4/nonPublicApi/docs/AdditionalPropertiesAnyType.md deleted file mode 100644 index bae60ab148f2..000000000000 --- a/samples/client/petstore/swift4/nonPublicApi/docs/AdditionalPropertiesAnyType.md +++ /dev/null @@ -1,10 +0,0 @@ -# AdditionalPropertiesAnyType - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **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/swift4/nonPublicApi/docs/AdditionalPropertiesArray.md b/samples/client/petstore/swift4/nonPublicApi/docs/AdditionalPropertiesArray.md deleted file mode 100644 index a371b5e28f32..000000000000 --- a/samples/client/petstore/swift4/nonPublicApi/docs/AdditionalPropertiesArray.md +++ /dev/null @@ -1,10 +0,0 @@ -# AdditionalPropertiesArray - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **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/swift4/nonPublicApi/docs/AdditionalPropertiesBoolean.md b/samples/client/petstore/swift4/nonPublicApi/docs/AdditionalPropertiesBoolean.md deleted file mode 100644 index d5f0d6da11ee..000000000000 --- a/samples/client/petstore/swift4/nonPublicApi/docs/AdditionalPropertiesBoolean.md +++ /dev/null @@ -1,10 +0,0 @@ -# AdditionalPropertiesBoolean - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **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/swift4/nonPublicApi/docs/AdditionalPropertiesClass.md b/samples/client/petstore/swift4/nonPublicApi/docs/AdditionalPropertiesClass.md deleted file mode 100644 index e22d28be1de6..000000000000 --- a/samples/client/petstore/swift4/nonPublicApi/docs/AdditionalPropertiesClass.md +++ /dev/null @@ -1,11 +0,0 @@ -# AdditionalPropertiesClass - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**mapString** | **[String:String]** | | [optional] -**mapMapString** | [String:[String: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/swift4/nonPublicApi/docs/AdditionalPropertiesInteger.md b/samples/client/petstore/swift4/nonPublicApi/docs/AdditionalPropertiesInteger.md deleted file mode 100644 index 629293abdfe9..000000000000 --- a/samples/client/petstore/swift4/nonPublicApi/docs/AdditionalPropertiesInteger.md +++ /dev/null @@ -1,10 +0,0 @@ -# AdditionalPropertiesInteger - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **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/swift4/nonPublicApi/docs/AdditionalPropertiesNumber.md b/samples/client/petstore/swift4/nonPublicApi/docs/AdditionalPropertiesNumber.md deleted file mode 100644 index 65adfe78137c..000000000000 --- a/samples/client/petstore/swift4/nonPublicApi/docs/AdditionalPropertiesNumber.md +++ /dev/null @@ -1,10 +0,0 @@ -# AdditionalPropertiesNumber - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **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/swift4/nonPublicApi/docs/AdditionalPropertiesObject.md b/samples/client/petstore/swift4/nonPublicApi/docs/AdditionalPropertiesObject.md deleted file mode 100644 index 99d69b7aae6a..000000000000 --- a/samples/client/petstore/swift4/nonPublicApi/docs/AdditionalPropertiesObject.md +++ /dev/null @@ -1,10 +0,0 @@ -# AdditionalPropertiesObject - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **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/swift4/nonPublicApi/docs/AdditionalPropertiesString.md b/samples/client/petstore/swift4/nonPublicApi/docs/AdditionalPropertiesString.md deleted file mode 100644 index 5bb8122887c4..000000000000 --- a/samples/client/petstore/swift4/nonPublicApi/docs/AdditionalPropertiesString.md +++ /dev/null @@ -1,10 +0,0 @@ -# AdditionalPropertiesString - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **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/swift4/nonPublicApi/docs/Animal.md b/samples/client/petstore/swift4/nonPublicApi/docs/Animal.md deleted file mode 100644 index 69c601455cd8..000000000000 --- a/samples/client/petstore/swift4/nonPublicApi/docs/Animal.md +++ /dev/null @@ -1,11 +0,0 @@ -# Animal - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**className** | **String** | | -**color** | **String** | | [optional] [default to "red"] - -[[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/swift4/nonPublicApi/docs/AnimalFarm.md b/samples/client/petstore/swift4/nonPublicApi/docs/AnimalFarm.md deleted file mode 100644 index df6bab21dae8..000000000000 --- a/samples/client/petstore/swift4/nonPublicApi/docs/AnimalFarm.md +++ /dev/null @@ -1,9 +0,0 @@ -# AnimalFarm - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/samples/client/petstore/swift4/nonPublicApi/docs/AnotherFakeAPI.md b/samples/client/petstore/swift4/nonPublicApi/docs/AnotherFakeAPI.md deleted file mode 100644 index 387f5f5bb0c9..000000000000 --- a/samples/client/petstore/swift4/nonPublicApi/docs/AnotherFakeAPI.md +++ /dev/null @@ -1,59 +0,0 @@ -# AnotherFakeAPI - -All URIs are relative to *http://petstore.swagger.io:80/v2* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**call123testSpecialTags**](AnotherFakeAPI.md#call123testspecialtags) | **PATCH** /another-fake/dummy | To test special tags - - -# **call123testSpecialTags** -```swift - internal class func call123testSpecialTags(body: Client, completion: @escaping (_ data: Client?, _ error: Error?) -> Void) -``` - -To test special tags - -To test special tags and operation ID starting with number - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let body = Client(client: "client_example") // Client | client model - -// To test special tags -AnotherFakeAPI.call123testSpecialTags(body: body) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Client**](Client.md) | client model | - -### Return type - -[**Client**](Client.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **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/swift4/nonPublicApi/docs/ApiResponse.md b/samples/client/petstore/swift4/nonPublicApi/docs/ApiResponse.md deleted file mode 100644 index c6d9768fe9bf..000000000000 --- a/samples/client/petstore/swift4/nonPublicApi/docs/ApiResponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# ApiResponse - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**code** | **Int** | | [optional] -**type** | **String** | | [optional] -**message** | **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/swift4/nonPublicApi/docs/ArrayOfArrayOfNumberOnly.md b/samples/client/petstore/swift4/nonPublicApi/docs/ArrayOfArrayOfNumberOnly.md deleted file mode 100644 index c6fceff5e08d..000000000000 --- a/samples/client/petstore/swift4/nonPublicApi/docs/ArrayOfArrayOfNumberOnly.md +++ /dev/null @@ -1,10 +0,0 @@ -# ArrayOfArrayOfNumberOnly - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**arrayArrayNumber** | [[Double]] | | [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/swift4/nonPublicApi/docs/ArrayOfNumberOnly.md b/samples/client/petstore/swift4/nonPublicApi/docs/ArrayOfNumberOnly.md deleted file mode 100644 index f09f8fa6f70f..000000000000 --- a/samples/client/petstore/swift4/nonPublicApi/docs/ArrayOfNumberOnly.md +++ /dev/null @@ -1,10 +0,0 @@ -# ArrayOfNumberOnly - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**arrayNumber** | **[Double]** | | [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/swift4/nonPublicApi/docs/ArrayTest.md b/samples/client/petstore/swift4/nonPublicApi/docs/ArrayTest.md deleted file mode 100644 index bf416b8330cc..000000000000 --- a/samples/client/petstore/swift4/nonPublicApi/docs/ArrayTest.md +++ /dev/null @@ -1,12 +0,0 @@ -# ArrayTest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**arrayOfString** | **[String]** | | [optional] -**arrayArrayOfInteger** | [[Int64]] | | [optional] -**arrayArrayOfModel** | [[ReadOnlyFirst]] | | [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/swift4/nonPublicApi/docs/Capitalization.md b/samples/client/petstore/swift4/nonPublicApi/docs/Capitalization.md deleted file mode 100644 index 95374216c773..000000000000 --- a/samples/client/petstore/swift4/nonPublicApi/docs/Capitalization.md +++ /dev/null @@ -1,15 +0,0 @@ -# Capitalization - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**smallCamel** | **String** | | [optional] -**capitalCamel** | **String** | | [optional] -**smallSnake** | **String** | | [optional] -**capitalSnake** | **String** | | [optional] -**sCAETHFlowPoints** | **String** | | [optional] -**ATT_NAME** | **String** | Name of the pet | [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/swift4/nonPublicApi/docs/Cat.md b/samples/client/petstore/swift4/nonPublicApi/docs/Cat.md deleted file mode 100644 index fb5949b15761..000000000000 --- a/samples/client/petstore/swift4/nonPublicApi/docs/Cat.md +++ /dev/null @@ -1,10 +0,0 @@ -# Cat - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**declawed** | **Bool** | | [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/swift4/nonPublicApi/docs/CatAllOf.md b/samples/client/petstore/swift4/nonPublicApi/docs/CatAllOf.md deleted file mode 100644 index 79789be61c01..000000000000 --- a/samples/client/petstore/swift4/nonPublicApi/docs/CatAllOf.md +++ /dev/null @@ -1,10 +0,0 @@ -# CatAllOf - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**declawed** | **Bool** | | [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/swift4/nonPublicApi/docs/Category.md b/samples/client/petstore/swift4/nonPublicApi/docs/Category.md deleted file mode 100644 index 5ca5408c0f96..000000000000 --- a/samples/client/petstore/swift4/nonPublicApi/docs/Category.md +++ /dev/null @@ -1,11 +0,0 @@ -# Category - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Int64** | | [optional] -**name** | **String** | | [default to "default-name"] - -[[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/swift4/nonPublicApi/docs/ClassModel.md b/samples/client/petstore/swift4/nonPublicApi/docs/ClassModel.md deleted file mode 100644 index e3912fdf0fd5..000000000000 --- a/samples/client/petstore/swift4/nonPublicApi/docs/ClassModel.md +++ /dev/null @@ -1,10 +0,0 @@ -# ClassModel - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**_class** | **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/swift4/nonPublicApi/docs/Client.md b/samples/client/petstore/swift4/nonPublicApi/docs/Client.md deleted file mode 100644 index 0de1b238c36f..000000000000 --- a/samples/client/petstore/swift4/nonPublicApi/docs/Client.md +++ /dev/null @@ -1,10 +0,0 @@ -# Client - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**client** | **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/swift4/nonPublicApi/docs/Dog.md b/samples/client/petstore/swift4/nonPublicApi/docs/Dog.md deleted file mode 100644 index 4824786da049..000000000000 --- a/samples/client/petstore/swift4/nonPublicApi/docs/Dog.md +++ /dev/null @@ -1,10 +0,0 @@ -# Dog - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**breed** | **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/swift4/nonPublicApi/docs/DogAllOf.md b/samples/client/petstore/swift4/nonPublicApi/docs/DogAllOf.md deleted file mode 100644 index 9302ef52e938..000000000000 --- a/samples/client/petstore/swift4/nonPublicApi/docs/DogAllOf.md +++ /dev/null @@ -1,10 +0,0 @@ -# DogAllOf - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**breed** | **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/swift4/nonPublicApi/docs/EnumArrays.md b/samples/client/petstore/swift4/nonPublicApi/docs/EnumArrays.md deleted file mode 100644 index b9a9807d3c8e..000000000000 --- a/samples/client/petstore/swift4/nonPublicApi/docs/EnumArrays.md +++ /dev/null @@ -1,11 +0,0 @@ -# EnumArrays - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**justSymbol** | **String** | | [optional] -**arrayEnum** | **[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/swift4/nonPublicApi/docs/EnumClass.md b/samples/client/petstore/swift4/nonPublicApi/docs/EnumClass.md deleted file mode 100644 index 67f017becd0c..000000000000 --- a/samples/client/petstore/swift4/nonPublicApi/docs/EnumClass.md +++ /dev/null @@ -1,9 +0,0 @@ -# EnumClass - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/samples/client/petstore/swift4/nonPublicApi/docs/EnumTest.md b/samples/client/petstore/swift4/nonPublicApi/docs/EnumTest.md deleted file mode 100644 index bc9b036dd769..000000000000 --- a/samples/client/petstore/swift4/nonPublicApi/docs/EnumTest.md +++ /dev/null @@ -1,14 +0,0 @@ -# EnumTest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**enumString** | **String** | | [optional] -**enumStringRequired** | **String** | | -**enumInteger** | **Int** | | [optional] -**enumNumber** | **Double** | | [optional] -**outerEnum** | [**OuterEnum**](OuterEnum.md) | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/samples/client/petstore/swift4/nonPublicApi/docs/FakeAPI.md b/samples/client/petstore/swift4/nonPublicApi/docs/FakeAPI.md deleted file mode 100644 index dd2d871bca84..000000000000 --- a/samples/client/petstore/swift4/nonPublicApi/docs/FakeAPI.md +++ /dev/null @@ -1,662 +0,0 @@ -# FakeAPI - -All URIs are relative to *http://petstore.swagger.io:80/v2* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**fakeOuterBooleanSerialize**](FakeAPI.md#fakeouterbooleanserialize) | **POST** /fake/outer/boolean | -[**fakeOuterCompositeSerialize**](FakeAPI.md#fakeoutercompositeserialize) | **POST** /fake/outer/composite | -[**fakeOuterNumberSerialize**](FakeAPI.md#fakeouternumberserialize) | **POST** /fake/outer/number | -[**fakeOuterStringSerialize**](FakeAPI.md#fakeouterstringserialize) | **POST** /fake/outer/string | -[**testBodyWithFileSchema**](FakeAPI.md#testbodywithfileschema) | **PUT** /fake/body-with-file-schema | -[**testBodyWithQueryParams**](FakeAPI.md#testbodywithqueryparams) | **PUT** /fake/body-with-query-params | -[**testClientModel**](FakeAPI.md#testclientmodel) | **PATCH** /fake | To test \"client\" model -[**testEndpointParameters**](FakeAPI.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 -[**testEnumParameters**](FakeAPI.md#testenumparameters) | **GET** /fake | To test enum parameters -[**testGroupParameters**](FakeAPI.md#testgroupparameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) -[**testInlineAdditionalProperties**](FakeAPI.md#testinlineadditionalproperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties -[**testJsonFormData**](FakeAPI.md#testjsonformdata) | **GET** /fake/jsonFormData | test json serialization of form data - - -# **fakeOuterBooleanSerialize** -```swift - internal class func fakeOuterBooleanSerialize(body: Bool? = nil, completion: @escaping (_ data: Bool?, _ error: Error?) -> Void) -``` - - - -Test serialization of outer boolean types - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let body = true // Bool | Input boolean as post body (optional) - -FakeAPI.fakeOuterBooleanSerialize(body: body) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | **Bool** | Input boolean as post body | [optional] - -### Return type - -**Bool** - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: */* - -[[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) - -# **fakeOuterCompositeSerialize** -```swift - internal class func fakeOuterCompositeSerialize(body: OuterComposite? = nil, completion: @escaping (_ data: OuterComposite?, _ error: Error?) -> Void) -``` - - - -Test serialization of object with outer number type - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let body = OuterComposite(myNumber: 123, myString: "myString_example", myBoolean: false) // OuterComposite | Input composite as post body (optional) - -FakeAPI.fakeOuterCompositeSerialize(body: body) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**OuterComposite**](OuterComposite.md) | Input composite as post body | [optional] - -### Return type - -[**OuterComposite**](OuterComposite.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: */* - -[[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) - -# **fakeOuterNumberSerialize** -```swift - internal class func fakeOuterNumberSerialize(body: Double? = nil, completion: @escaping (_ data: Double?, _ error: Error?) -> Void) -``` - - - -Test serialization of outer number types - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let body = 987 // Double | Input number as post body (optional) - -FakeAPI.fakeOuterNumberSerialize(body: body) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | **Double** | Input number as post body | [optional] - -### Return type - -**Double** - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: */* - -[[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) - -# **fakeOuterStringSerialize** -```swift - internal class func fakeOuterStringSerialize(body: String? = nil, completion: @escaping (_ data: String?, _ error: Error?) -> Void) -``` - - - -Test serialization of outer string types - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let body = "body_example" // String | Input string as post body (optional) - -FakeAPI.fakeOuterStringSerialize(body: body) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | **String** | Input string as post body | [optional] - -### Return type - -**String** - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: */* - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **testBodyWithFileSchema** -```swift - internal class func testBodyWithFileSchema(body: FileSchemaTestClass, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - - - -For this test, the body for this request much reference a schema named `File`. - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let body = FileSchemaTestClass(file: File(sourceURI: "sourceURI_example"), files: [File(sourceURI: "sourceURI_example")]) // FileSchemaTestClass | - -FakeAPI.testBodyWithFileSchema(body: body) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**FileSchemaTestClass**](FileSchemaTestClass.md) | | - -### Return type - -Void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **testBodyWithQueryParams** -```swift - internal class func testBodyWithQueryParams(query: String, body: User, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - - - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let query = "query_example" // String | -let body = User(id: 123, username: "username_example", firstName: "firstName_example", lastName: "lastName_example", email: "email_example", password: "password_example", phone: "phone_example", userStatus: 123) // User | - -FakeAPI.testBodyWithQueryParams(query: query, body: body) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **query** | **String** | | - **body** | [**User**](User.md) | | - -### Return type - -Void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **testClientModel** -```swift - internal class func testClientModel(body: Client, completion: @escaping (_ data: Client?, _ error: Error?) -> Void) -``` - -To test \"client\" model - -To test \"client\" model - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let body = Client(client: "client_example") // Client | client model - -// To test \"client\" model -FakeAPI.testClientModel(body: body) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Client**](Client.md) | client model | - -### Return type - -[**Client**](Client.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **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) - -# **testEndpointParameters** -```swift - internal class func testEndpointParameters(integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, number: Double, float: Float? = nil, double: Double, string: String? = nil, patternWithoutDelimiter: String, byte: Data, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - -Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - -Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let integer = 987 // Int | None (optional) -let int32 = 987 // Int | None (optional) -let int64 = 987 // Int64 | None (optional) -let number = 987 // Double | None -let float = 987 // Float | None (optional) -let double = 987 // Double | None -let string = "string_example" // String | None (optional) -let patternWithoutDelimiter = "patternWithoutDelimiter_example" // String | None -let byte = 987 // Data | None -let binary = URL(string: "https://example.com")! // URL | None (optional) -let date = Date() // Date | None (optional) -let dateTime = Date() // Date | None (optional) -let password = "password_example" // String | None (optional) -let callback = "callback_example" // String | None (optional) - -// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 -FakeAPI.testEndpointParameters(integer: integer, int32: int32, int64: int64, number: number, float: float, double: double, string: string, patternWithoutDelimiter: patternWithoutDelimiter, byte: byte, binary: binary, date: date, dateTime: dateTime, password: password, callback: callback) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **integer** | **Int** | None | [optional] - **int32** | **Int** | None | [optional] - **int64** | **Int64** | None | [optional] - **number** | **Double** | None | - **float** | **Float** | None | [optional] - **double** | **Double** | None | - **string** | **String** | None | [optional] - **patternWithoutDelimiter** | **String** | None | - **byte** | **Data** | None | - **binary** | **URL** | None | [optional] - **date** | **Date** | None | [optional] - **dateTime** | **Date** | None | [optional] - **password** | **String** | None | [optional] - **callback** | **String** | None | [optional] - -### Return type - -Void (empty response body) - -### Authorization - -[http_basic_test](../README.md#http_basic_test) - -### 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) - -# **testEnumParameters** -```swift - internal class func testEnumParameters(enumHeaderStringArray: [String]? = nil, enumHeaderString: EnumHeaderString_testEnumParameters? = nil, enumQueryStringArray: [String]? = nil, enumQueryString: EnumQueryString_testEnumParameters? = nil, enumQueryInteger: EnumQueryInteger_testEnumParameters? = nil, enumQueryDouble: EnumQueryDouble_testEnumParameters? = nil, enumFormStringArray: [String]? = nil, enumFormString: EnumFormString_testEnumParameters? = nil, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - -To test enum parameters - -To test enum parameters - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let enumHeaderStringArray = ["enumHeaderStringArray_example"] // [String] | Header parameter enum test (string array) (optional) -let enumHeaderString = "enumHeaderString_example" // String | Header parameter enum test (string) (optional) (default to .efg) -let enumQueryStringArray = ["enumQueryStringArray_example"] // [String] | Query parameter enum test (string array) (optional) -let enumQueryString = "enumQueryString_example" // String | Query parameter enum test (string) (optional) (default to .efg) -let enumQueryInteger = 987 // Int | Query parameter enum test (double) (optional) -let enumQueryDouble = 987 // Double | Query parameter enum test (double) (optional) -let enumFormStringArray = ["inner_example"] // [String] | Form parameter enum test (string array) (optional) (default to .dollar) -let enumFormString = "enumFormString_example" // String | Form parameter enum test (string) (optional) (default to .efg) - -// To test enum parameters -FakeAPI.testEnumParameters(enumHeaderStringArray: enumHeaderStringArray, enumHeaderString: enumHeaderString, enumQueryStringArray: enumQueryStringArray, enumQueryString: enumQueryString, enumQueryInteger: enumQueryInteger, enumQueryDouble: enumQueryDouble, enumFormStringArray: enumFormStringArray, enumFormString: enumFormString) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **enumHeaderStringArray** | [**[String]**](String.md) | Header parameter enum test (string array) | [optional] - **enumHeaderString** | **String** | Header parameter enum test (string) | [optional] [default to .efg] - **enumQueryStringArray** | [**[String]**](String.md) | Query parameter enum test (string array) | [optional] - **enumQueryString** | **String** | Query parameter enum test (string) | [optional] [default to .efg] - **enumQueryInteger** | **Int** | Query parameter enum test (double) | [optional] - **enumQueryDouble** | **Double** | Query parameter enum test (double) | [optional] - **enumFormStringArray** | [**[String]**](String.md) | Form parameter enum test (string array) | [optional] [default to .dollar] - **enumFormString** | **String** | Form parameter enum test (string) | [optional] [default to .efg] - -### Return type - -Void (empty response body) - -### Authorization - -No authorization required - -### 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) - -# **testGroupParameters** -```swift - internal class func testGroupParameters(requiredStringGroup: Int, requiredBooleanGroup: Bool, requiredInt64Group: Int64, stringGroup: Int? = nil, booleanGroup: Bool? = nil, int64Group: Int64? = nil, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - -Fake endpoint to test group parameters (optional) - -Fake endpoint to test group parameters (optional) - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let requiredStringGroup = 987 // Int | Required String in group parameters -let requiredBooleanGroup = true // Bool | Required Boolean in group parameters -let requiredInt64Group = 987 // Int64 | Required Integer in group parameters -let stringGroup = 987 // Int | String in group parameters (optional) -let booleanGroup = true // Bool | Boolean in group parameters (optional) -let int64Group = 987 // Int64 | Integer in group parameters (optional) - -// Fake endpoint to test group parameters (optional) -FakeAPI.testGroupParameters(requiredStringGroup: requiredStringGroup, requiredBooleanGroup: requiredBooleanGroup, requiredInt64Group: requiredInt64Group, stringGroup: stringGroup, booleanGroup: booleanGroup, int64Group: int64Group) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **requiredStringGroup** | **Int** | Required String in group parameters | - **requiredBooleanGroup** | **Bool** | Required Boolean in group parameters | - **requiredInt64Group** | **Int64** | Required Integer in group parameters | - **stringGroup** | **Int** | String in group parameters | [optional] - **booleanGroup** | **Bool** | Boolean in group parameters | [optional] - **int64Group** | **Int64** | Integer in group parameters | [optional] - -### Return type - -Void (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) - -# **testInlineAdditionalProperties** -```swift - internal class func testInlineAdditionalProperties(param: [String:String], completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - -test inline additionalProperties - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let param = "TODO" // [String:String] | request body - -// test inline additionalProperties -FakeAPI.testInlineAdditionalProperties(param: param) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **param** | [**[String:String]**](String.md) | request body | - -### Return type - -Void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **testJsonFormData** -```swift - internal class func testJsonFormData(param: String, param2: String, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - -test json serialization of form data - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let param = "param_example" // String | field1 -let param2 = "param2_example" // String | field2 - -// test json serialization of form data -FakeAPI.testJsonFormData(param: param, param2: param2) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **param** | **String** | field1 | - **param2** | **String** | field2 | - -### Return type - -Void (empty response body) - -### Authorization - -No authorization required - -### 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) - diff --git a/samples/client/petstore/swift4/nonPublicApi/docs/FakeClassnameTags123API.md b/samples/client/petstore/swift4/nonPublicApi/docs/FakeClassnameTags123API.md deleted file mode 100644 index 4d82fa29a547..000000000000 --- a/samples/client/petstore/swift4/nonPublicApi/docs/FakeClassnameTags123API.md +++ /dev/null @@ -1,59 +0,0 @@ -# FakeClassnameTags123API - -All URIs are relative to *http://petstore.swagger.io:80/v2* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**testClassname**](FakeClassnameTags123API.md#testclassname) | **PATCH** /fake_classname_test | To test class name in snake case - - -# **testClassname** -```swift - internal class func testClassname(body: Client, completion: @escaping (_ data: Client?, _ error: Error?) -> Void) -``` - -To test class name in snake case - -To test class name in snake case - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let body = Client(client: "client_example") // Client | client model - -// To test class name in snake case -FakeClassnameTags123API.testClassname(body: body) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Client**](Client.md) | client model | - -### Return type - -[**Client**](Client.md) - -### Authorization - -[api_key_query](../README.md#api_key_query) - -### HTTP request headers - - - **Content-Type**: application/json - - **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/swift4/nonPublicApi/docs/File.md b/samples/client/petstore/swift4/nonPublicApi/docs/File.md deleted file mode 100644 index 3edfef17b794..000000000000 --- a/samples/client/petstore/swift4/nonPublicApi/docs/File.md +++ /dev/null @@ -1,10 +0,0 @@ -# File - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**sourceURI** | **String** | Test capitalization | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/samples/client/petstore/swift4/nonPublicApi/docs/FileSchemaTestClass.md b/samples/client/petstore/swift4/nonPublicApi/docs/FileSchemaTestClass.md deleted file mode 100644 index afdacc60b2c3..000000000000 --- a/samples/client/petstore/swift4/nonPublicApi/docs/FileSchemaTestClass.md +++ /dev/null @@ -1,11 +0,0 @@ -# FileSchemaTestClass - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**file** | [**File**](File.md) | | [optional] -**files** | [File] | | [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/swift4/nonPublicApi/docs/FormatTest.md b/samples/client/petstore/swift4/nonPublicApi/docs/FormatTest.md deleted file mode 100644 index f74d94f6c46a..000000000000 --- a/samples/client/petstore/swift4/nonPublicApi/docs/FormatTest.md +++ /dev/null @@ -1,22 +0,0 @@ -# FormatTest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**integer** | **Int** | | [optional] -**int32** | **Int** | | [optional] -**int64** | **Int64** | | [optional] -**number** | **Double** | | -**float** | **Float** | | [optional] -**double** | **Double** | | [optional] -**string** | **String** | | [optional] -**byte** | **Data** | | -**binary** | **URL** | | [optional] -**date** | **Date** | | -**dateTime** | **Date** | | [optional] -**uuid** | **UUID** | | [optional] -**password** | **String** | | - -[[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/swift4/nonPublicApi/docs/HasOnlyReadOnly.md b/samples/client/petstore/swift4/nonPublicApi/docs/HasOnlyReadOnly.md deleted file mode 100644 index 57b6e3a17e67..000000000000 --- a/samples/client/petstore/swift4/nonPublicApi/docs/HasOnlyReadOnly.md +++ /dev/null @@ -1,11 +0,0 @@ -# HasOnlyReadOnly - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**bar** | **String** | | [optional] [readonly] -**foo** | **String** | | [optional] [readonly] - -[[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/swift4/nonPublicApi/docs/List.md b/samples/client/petstore/swift4/nonPublicApi/docs/List.md deleted file mode 100644 index b77718302edf..000000000000 --- a/samples/client/petstore/swift4/nonPublicApi/docs/List.md +++ /dev/null @@ -1,10 +0,0 @@ -# List - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**_123list** | **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/swift4/nonPublicApi/docs/MapTest.md b/samples/client/petstore/swift4/nonPublicApi/docs/MapTest.md deleted file mode 100644 index 56213c4113f6..000000000000 --- a/samples/client/petstore/swift4/nonPublicApi/docs/MapTest.md +++ /dev/null @@ -1,13 +0,0 @@ -# MapTest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**mapMapOfString** | [String:[String:String]] | | [optional] -**mapOfEnumString** | **[String:String]** | | [optional] -**directMap** | **[String:Bool]** | | [optional] -**indirectMap** | [**StringBooleanMap**](StringBooleanMap.md) | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/samples/client/petstore/swift4/nonPublicApi/docs/MixedPropertiesAndAdditionalPropertiesClass.md b/samples/client/petstore/swift4/nonPublicApi/docs/MixedPropertiesAndAdditionalPropertiesClass.md deleted file mode 100644 index fcffb8ecdbf3..000000000000 --- a/samples/client/petstore/swift4/nonPublicApi/docs/MixedPropertiesAndAdditionalPropertiesClass.md +++ /dev/null @@ -1,12 +0,0 @@ -# MixedPropertiesAndAdditionalPropertiesClass - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**uuid** | **UUID** | | [optional] -**dateTime** | **Date** | | [optional] -**map** | [String:Animal] | | [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/swift4/nonPublicApi/docs/Model200Response.md b/samples/client/petstore/swift4/nonPublicApi/docs/Model200Response.md deleted file mode 100644 index 5865ea690cc3..000000000000 --- a/samples/client/petstore/swift4/nonPublicApi/docs/Model200Response.md +++ /dev/null @@ -1,11 +0,0 @@ -# Model200Response - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **Int** | | [optional] -**_class** | **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/swift4/nonPublicApi/docs/Name.md b/samples/client/petstore/swift4/nonPublicApi/docs/Name.md deleted file mode 100644 index f7b180292cd6..000000000000 --- a/samples/client/petstore/swift4/nonPublicApi/docs/Name.md +++ /dev/null @@ -1,13 +0,0 @@ -# Name - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **Int** | | -**snakeCase** | **Int** | | [optional] [readonly] -**property** | **String** | | [optional] -**_123number** | **Int** | | [optional] [readonly] - -[[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/swift4/nonPublicApi/docs/NumberOnly.md b/samples/client/petstore/swift4/nonPublicApi/docs/NumberOnly.md deleted file mode 100644 index 72bd361168b5..000000000000 --- a/samples/client/petstore/swift4/nonPublicApi/docs/NumberOnly.md +++ /dev/null @@ -1,10 +0,0 @@ -# NumberOnly - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**justNumber** | **Double** | | [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/swift4/nonPublicApi/docs/Order.md b/samples/client/petstore/swift4/nonPublicApi/docs/Order.md deleted file mode 100644 index 15487f01175c..000000000000 --- a/samples/client/petstore/swift4/nonPublicApi/docs/Order.md +++ /dev/null @@ -1,15 +0,0 @@ -# Order - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Int64** | | [optional] -**petId** | **Int64** | | [optional] -**quantity** | **Int** | | [optional] -**shipDate** | **Date** | | [optional] -**status** | **String** | Order Status | [optional] -**complete** | **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/swift4/nonPublicApi/docs/OuterComposite.md b/samples/client/petstore/swift4/nonPublicApi/docs/OuterComposite.md deleted file mode 100644 index d6b3583bc3ff..000000000000 --- a/samples/client/petstore/swift4/nonPublicApi/docs/OuterComposite.md +++ /dev/null @@ -1,12 +0,0 @@ -# OuterComposite - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**myNumber** | **Double** | | [optional] -**myString** | **String** | | [optional] -**myBoolean** | **Bool** | | [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/swift4/nonPublicApi/docs/OuterEnum.md b/samples/client/petstore/swift4/nonPublicApi/docs/OuterEnum.md deleted file mode 100644 index 06d413b01680..000000000000 --- a/samples/client/petstore/swift4/nonPublicApi/docs/OuterEnum.md +++ /dev/null @@ -1,9 +0,0 @@ -# OuterEnum - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/samples/client/petstore/swift4/nonPublicApi/docs/Pet.md b/samples/client/petstore/swift4/nonPublicApi/docs/Pet.md deleted file mode 100644 index 5c05f98fad4a..000000000000 --- a/samples/client/petstore/swift4/nonPublicApi/docs/Pet.md +++ /dev/null @@ -1,15 +0,0 @@ -# Pet - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Int64** | | [optional] -**category** | [**Category**](Category.md) | | [optional] -**name** | **String** | | -**photoUrls** | **[String]** | | -**tags** | [Tag] | | [optional] -**status** | **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/swift4/nonPublicApi/docs/PetAPI.md b/samples/client/petstore/swift4/nonPublicApi/docs/PetAPI.md deleted file mode 100644 index 8fd9872c0e9a..000000000000 --- a/samples/client/petstore/swift4/nonPublicApi/docs/PetAPI.md +++ /dev/null @@ -1,469 +0,0 @@ -# PetAPI - -All URIs are relative to *http://petstore.swagger.io:80/v2* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**addPet**](PetAPI.md#addpet) | **POST** /pet | Add a new pet to the store -[**deletePet**](PetAPI.md#deletepet) | **DELETE** /pet/{petId} | Deletes a pet -[**findPetsByStatus**](PetAPI.md#findpetsbystatus) | **GET** /pet/findByStatus | Finds Pets by status -[**findPetsByTags**](PetAPI.md#findpetsbytags) | **GET** /pet/findByTags | Finds Pets by tags -[**getPetById**](PetAPI.md#getpetbyid) | **GET** /pet/{petId} | Find pet by ID -[**updatePet**](PetAPI.md#updatepet) | **PUT** /pet | Update an existing pet -[**updatePetWithForm**](PetAPI.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data -[**uploadFile**](PetAPI.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image -[**uploadFileWithRequiredFile**](PetAPI.md#uploadfilewithrequiredfile) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required) - - -# **addPet** -```swift - internal class func addPet(body: Pet, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - -Add a new pet to the store - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let body = Pet(id: 123, category: Category(id: 123, name: "name_example"), name: "name_example", photoUrls: ["photoUrls_example"], tags: [Tag(id: 123, name: "name_example")], status: "status_example") // Pet | Pet object that needs to be added to the store - -// Add a new pet to the store -PetAPI.addPet(body: body) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Pet**](Pet.md) | Pet object that needs to be added to the store | - -### Return type - -Void (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) - -# **deletePet** -```swift - internal class func deletePet(apiKey: String? = nil, petId: Int64, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - -Deletes a pet - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let apiKey = "apiKey_example" // String | (optional) -let petId = 987 // Int64 | Pet id to delete - -// Deletes a pet -PetAPI.deletePet(apiKey: apiKey, petId: petId) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **apiKey** | **String** | | [optional] - **petId** | **Int64** | Pet id to delete | - -### Return type - -Void (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) - -# **findPetsByStatus** -```swift - internal class func findPetsByStatus(status: [String], completion: @escaping (_ data: [Pet]?, _ error: Error?) -> Void) -``` - -Finds Pets by status - -Multiple status values can be provided with comma separated strings - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let status = ["status_example"] // [String] | Status values that need to be considered for filter - -// Finds Pets by status -PetAPI.findPetsByStatus(status: status) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **status** | [**[String]**](String.md) | Status values that need to be considered for filter | - -### Return type - -[**[Pet]**](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) - -# **findPetsByTags** -```swift - internal class func findPetsByTags(tags: [String], completion: @escaping (_ data: [Pet]?, _ error: Error?) -> Void) -``` - -Finds Pets by tags - -Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let tags = ["inner_example"] // [String] | Tags to filter by - -// Finds Pets by tags -PetAPI.findPetsByTags(tags: tags) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **tags** | [**[String]**](String.md) | Tags to filter by | - -### Return type - -[**[Pet]**](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) - -# **getPetById** -```swift - internal class func getPetById(petId: Int64, completion: @escaping (_ data: Pet?, _ error: Error?) -> Void) -``` - -Find pet by ID - -Returns a single pet - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let petId = 987 // Int64 | ID of pet to return - -// Find pet by ID -PetAPI.getPetById(petId: petId) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Int64** | ID of pet to return | - -### Return type - -[**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) - -# **updatePet** -```swift - internal class func updatePet(body: Pet, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - -Update an existing pet - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let body = Pet(id: 123, category: Category(id: 123, name: "name_example"), name: "name_example", photoUrls: ["photoUrls_example"], tags: [Tag(id: 123, name: "name_example")], status: "status_example") // Pet | Pet object that needs to be added to the store - -// Update an existing pet -PetAPI.updatePet(body: body) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Pet**](Pet.md) | Pet object that needs to be added to the store | - -### Return type - -Void (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) - -# **updatePetWithForm** -```swift - internal class func updatePetWithForm(petId: Int64, name: String? = nil, status: String? = nil, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - -Updates a pet in the store with form data - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let petId = 987 // Int64 | ID of pet that needs to be updated -let name = "name_example" // String | Updated name of the pet (optional) -let status = "status_example" // String | Updated status of the pet (optional) - -// Updates a pet in the store with form data -PetAPI.updatePetWithForm(petId: petId, name: name, status: status) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Int64** | ID of pet that needs to be updated | - **name** | **String** | Updated name of the pet | [optional] - **status** | **String** | Updated status of the pet | [optional] - -### Return type - -Void (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) - -# **uploadFile** -```swift - internal class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil, completion: @escaping (_ data: ApiResponse?, _ error: Error?) -> Void) -``` - -uploads an image - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let petId = 987 // Int64 | ID of pet to update -let additionalMetadata = "additionalMetadata_example" // String | Additional data to pass to server (optional) -let file = URL(string: "https://example.com")! // URL | file to upload (optional) - -// uploads an image -PetAPI.uploadFile(petId: petId, additionalMetadata: additionalMetadata, file: file) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Int64** | ID of pet to update | - **additionalMetadata** | **String** | Additional data to pass to server | [optional] - **file** | **URL** | file to upload | [optional] - -### Return type - -[**ApiResponse**](ApiResponse.md) - -### Authorization - -[petstore_auth](../README.md#petstore_auth) - -### HTTP request headers - - - **Content-Type**: multipart/form-data - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **uploadFileWithRequiredFile** -```swift - internal class func uploadFileWithRequiredFile(petId: Int64, additionalMetadata: String? = nil, requiredFile: URL, completion: @escaping (_ data: ApiResponse?, _ error: Error?) -> Void) -``` - -uploads an image (required) - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let petId = 987 // Int64 | ID of pet to update -let additionalMetadata = "additionalMetadata_example" // String | Additional data to pass to server (optional) -let requiredFile = URL(string: "https://example.com")! // URL | file to upload - -// uploads an image (required) -PetAPI.uploadFileWithRequiredFile(petId: petId, additionalMetadata: additionalMetadata, requiredFile: requiredFile) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Int64** | ID of pet to update | - **additionalMetadata** | **String** | Additional data to pass to server | [optional] - **requiredFile** | **URL** | file to upload | - -### Return type - -[**ApiResponse**](ApiResponse.md) - -### Authorization - -[petstore_auth](../README.md#petstore_auth) - -### HTTP request headers - - - **Content-Type**: multipart/form-data - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/samples/client/petstore/swift4/nonPublicApi/docs/ReadOnlyFirst.md b/samples/client/petstore/swift4/nonPublicApi/docs/ReadOnlyFirst.md deleted file mode 100644 index ed537b87598b..000000000000 --- a/samples/client/petstore/swift4/nonPublicApi/docs/ReadOnlyFirst.md +++ /dev/null @@ -1,11 +0,0 @@ -# ReadOnlyFirst - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**bar** | **String** | | [optional] [readonly] -**baz** | **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/swift4/nonPublicApi/docs/Return.md b/samples/client/petstore/swift4/nonPublicApi/docs/Return.md deleted file mode 100644 index 66d17c27c887..000000000000 --- a/samples/client/petstore/swift4/nonPublicApi/docs/Return.md +++ /dev/null @@ -1,10 +0,0 @@ -# Return - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**_return** | **Int** | | [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/swift4/nonPublicApi/docs/SpecialModelName.md b/samples/client/petstore/swift4/nonPublicApi/docs/SpecialModelName.md deleted file mode 100644 index 3ec27a38c2ac..000000000000 --- a/samples/client/petstore/swift4/nonPublicApi/docs/SpecialModelName.md +++ /dev/null @@ -1,10 +0,0 @@ -# SpecialModelName - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**specialPropertyName** | **Int64** | | [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/swift4/nonPublicApi/docs/StoreAPI.md b/samples/client/petstore/swift4/nonPublicApi/docs/StoreAPI.md deleted file mode 100644 index cec8acecb81e..000000000000 --- a/samples/client/petstore/swift4/nonPublicApi/docs/StoreAPI.md +++ /dev/null @@ -1,206 +0,0 @@ -# StoreAPI - -All URIs are relative to *http://petstore.swagger.io:80/v2* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**deleteOrder**](StoreAPI.md#deleteorder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID -[**getInventory**](StoreAPI.md#getinventory) | **GET** /store/inventory | Returns pet inventories by status -[**getOrderById**](StoreAPI.md#getorderbyid) | **GET** /store/order/{order_id} | Find purchase order by ID -[**placeOrder**](StoreAPI.md#placeorder) | **POST** /store/order | Place an order for a pet - - -# **deleteOrder** -```swift - internal class func deleteOrder(orderId: String, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - -Delete purchase order by ID - -For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let orderId = "orderId_example" // String | ID of the order that needs to be deleted - -// Delete purchase order by ID -StoreAPI.deleteOrder(orderId: orderId) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **orderId** | **String** | ID of the order that needs to be deleted | - -### Return type - -Void (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) - -# **getInventory** -```swift - internal class func getInventory(completion: @escaping (_ data: [String:Int]?, _ error: Error?) -> Void) -``` - -Returns pet inventories by status - -Returns a map of status codes to quantities - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - - -// Returns pet inventories by status -StoreAPI.getInventory() { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -**[String:Int]** - -### 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) - -# **getOrderById** -```swift - internal class func getOrderById(orderId: Int64, completion: @escaping (_ data: Order?, _ error: Error?) -> Void) -``` - -Find purchase order by ID - -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let orderId = 987 // Int64 | ID of pet that needs to be fetched - -// Find purchase order by ID -StoreAPI.getOrderById(orderId: orderId) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **orderId** | **Int64** | ID of pet that needs to be fetched | - -### Return type - -[**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) - -# **placeOrder** -```swift - internal class func placeOrder(body: Order, completion: @escaping (_ data: Order?, _ error: Error?) -> Void) -``` - -Place an order for a pet - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let body = Order(id: 123, petId: 123, quantity: 123, shipDate: Date(), status: "status_example", complete: false) // Order | order placed for purchasing the pet - -// Place an order for a pet -StoreAPI.placeOrder(body: body) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Order**](Order.md) | order placed for purchasing the pet | - -### Return type - -[**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/swift4/nonPublicApi/docs/StringBooleanMap.md b/samples/client/petstore/swift4/nonPublicApi/docs/StringBooleanMap.md deleted file mode 100644 index 7abf11ec68b1..000000000000 --- a/samples/client/petstore/swift4/nonPublicApi/docs/StringBooleanMap.md +++ /dev/null @@ -1,9 +0,0 @@ -# StringBooleanMap - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/samples/client/petstore/swift4/nonPublicApi/docs/Tag.md b/samples/client/petstore/swift4/nonPublicApi/docs/Tag.md deleted file mode 100644 index ff4ac8aa4519..000000000000 --- a/samples/client/petstore/swift4/nonPublicApi/docs/Tag.md +++ /dev/null @@ -1,11 +0,0 @@ -# Tag - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Int64** | | [optional] -**name** | **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/swift4/nonPublicApi/docs/TypeHolderDefault.md b/samples/client/petstore/swift4/nonPublicApi/docs/TypeHolderDefault.md deleted file mode 100644 index 5161394bdc3e..000000000000 --- a/samples/client/petstore/swift4/nonPublicApi/docs/TypeHolderDefault.md +++ /dev/null @@ -1,14 +0,0 @@ -# TypeHolderDefault - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**stringItem** | **String** | | [default to "what"] -**numberItem** | **Double** | | -**integerItem** | **Int** | | -**boolItem** | **Bool** | | [default to true] -**arrayItem** | **[Int]** | | - -[[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/swift4/nonPublicApi/docs/TypeHolderExample.md b/samples/client/petstore/swift4/nonPublicApi/docs/TypeHolderExample.md deleted file mode 100644 index 46d0471cd71a..000000000000 --- a/samples/client/petstore/swift4/nonPublicApi/docs/TypeHolderExample.md +++ /dev/null @@ -1,14 +0,0 @@ -# TypeHolderExample - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**stringItem** | **String** | | -**numberItem** | **Double** | | -**integerItem** | **Int** | | -**boolItem** | **Bool** | | -**arrayItem** | **[Int]** | | - -[[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/swift4/nonPublicApi/docs/User.md b/samples/client/petstore/swift4/nonPublicApi/docs/User.md deleted file mode 100644 index 5a439de0ff95..000000000000 --- a/samples/client/petstore/swift4/nonPublicApi/docs/User.md +++ /dev/null @@ -1,17 +0,0 @@ -# User - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Int64** | | [optional] -**username** | **String** | | [optional] -**firstName** | **String** | | [optional] -**lastName** | **String** | | [optional] -**email** | **String** | | [optional] -**password** | **String** | | [optional] -**phone** | **String** | | [optional] -**userStatus** | **Int** | 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/swift4/nonPublicApi/docs/UserAPI.md b/samples/client/petstore/swift4/nonPublicApi/docs/UserAPI.md deleted file mode 100644 index 56fba1b3c9eb..000000000000 --- a/samples/client/petstore/swift4/nonPublicApi/docs/UserAPI.md +++ /dev/null @@ -1,406 +0,0 @@ -# UserAPI - -All URIs are relative to *http://petstore.swagger.io:80/v2* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**createUser**](UserAPI.md#createuser) | **POST** /user | Create user -[**createUsersWithArrayInput**](UserAPI.md#createuserswitharrayinput) | **POST** /user/createWithArray | Creates list of users with given input array -[**createUsersWithListInput**](UserAPI.md#createuserswithlistinput) | **POST** /user/createWithList | Creates list of users with given input array -[**deleteUser**](UserAPI.md#deleteuser) | **DELETE** /user/{username} | Delete user -[**getUserByName**](UserAPI.md#getuserbyname) | **GET** /user/{username} | Get user by user name -[**loginUser**](UserAPI.md#loginuser) | **GET** /user/login | Logs user into the system -[**logoutUser**](UserAPI.md#logoutuser) | **GET** /user/logout | Logs out current logged in user session -[**updateUser**](UserAPI.md#updateuser) | **PUT** /user/{username} | Updated user - - -# **createUser** -```swift - internal class func createUser(body: User, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - -Create user - -This can only be done by the logged in user. - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let body = User(id: 123, username: "username_example", firstName: "firstName_example", lastName: "lastName_example", email: "email_example", password: "password_example", phone: "phone_example", userStatus: 123) // User | Created user object - -// Create user -UserAPI.createUser(body: body) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**User**](User.md) | Created user object | - -### Return type - -Void (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) - -# **createUsersWithArrayInput** -```swift - internal class func createUsersWithArrayInput(body: [User], completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - -Creates list of users with given input array - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let body = [User(id: 123, username: "username_example", firstName: "firstName_example", lastName: "lastName_example", email: "email_example", password: "password_example", phone: "phone_example", userStatus: 123)] // [User] | List of user object - -// Creates list of users with given input array -UserAPI.createUsersWithArrayInput(body: body) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**[User]**](User.md) | List of user object | - -### Return type - -Void (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) - -# **createUsersWithListInput** -```swift - internal class func createUsersWithListInput(body: [User], completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - -Creates list of users with given input array - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let body = [User(id: 123, username: "username_example", firstName: "firstName_example", lastName: "lastName_example", email: "email_example", password: "password_example", phone: "phone_example", userStatus: 123)] // [User] | List of user object - -// Creates list of users with given input array -UserAPI.createUsersWithListInput(body: body) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**[User]**](User.md) | List of user object | - -### Return type - -Void (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) - -# **deleteUser** -```swift - internal class func deleteUser(username: String, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - -Delete user - -This can only be done by the logged in user. - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let username = "username_example" // String | The name that needs to be deleted - -// Delete user -UserAPI.deleteUser(username: username) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **String** | The name that needs to be deleted | - -### Return type - -Void (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) - -# **getUserByName** -```swift - internal class func getUserByName(username: String, completion: @escaping (_ data: User?, _ error: Error?) -> Void) -``` - -Get user by user name - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let username = "username_example" // String | The name that needs to be fetched. Use user1 for testing. - -// Get user by user name -UserAPI.getUserByName(username: username) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **String** | The name that needs to be fetched. Use user1 for testing. | - -### Return type - -[**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) - -# **loginUser** -```swift - internal class func loginUser(username: String, password: String, completion: @escaping (_ data: String?, _ error: Error?) -> Void) -``` - -Logs user into the system - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let username = "username_example" // String | The user name for login -let password = "password_example" // String | The password for login in clear text - -// Logs user into the system -UserAPI.loginUser(username: username, password: password) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **String** | The user name for login | - **password** | **String** | The password for login in clear text | - -### 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) - -# **logoutUser** -```swift - internal class func logoutUser(completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - -Logs out current logged in user session - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - - -// Logs out current logged in user session -UserAPI.logoutUser() { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -Void (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) - -# **updateUser** -```swift - internal class func updateUser(username: String, body: User, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - -Updated user - -This can only be done by the logged in user. - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let username = "username_example" // String | name that need to be deleted -let body = User(id: 123, username: "username_example", firstName: "firstName_example", lastName: "lastName_example", email: "email_example", password: "password_example", phone: "phone_example", userStatus: 123) // User | Updated user object - -// Updated user -UserAPI.updateUser(username: username, body: body) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **String** | name that need to be deleted | - **body** | [**User**](User.md) | Updated user object | - -### Return type - -Void (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/swift4/nonPublicApi/docs/XmlItem.md b/samples/client/petstore/swift4/nonPublicApi/docs/XmlItem.md deleted file mode 100644 index 1a4eb4e9c836..000000000000 --- a/samples/client/petstore/swift4/nonPublicApi/docs/XmlItem.md +++ /dev/null @@ -1,38 +0,0 @@ -# XmlItem - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**attributeString** | **String** | | [optional] -**attributeNumber** | **Double** | | [optional] -**attributeInteger** | **Int** | | [optional] -**attributeBoolean** | **Bool** | | [optional] -**wrappedArray** | **[Int]** | | [optional] -**nameString** | **String** | | [optional] -**nameNumber** | **Double** | | [optional] -**nameInteger** | **Int** | | [optional] -**nameBoolean** | **Bool** | | [optional] -**nameArray** | **[Int]** | | [optional] -**nameWrappedArray** | **[Int]** | | [optional] -**prefixString** | **String** | | [optional] -**prefixNumber** | **Double** | | [optional] -**prefixInteger** | **Int** | | [optional] -**prefixBoolean** | **Bool** | | [optional] -**prefixArray** | **[Int]** | | [optional] -**prefixWrappedArray** | **[Int]** | | [optional] -**namespaceString** | **String** | | [optional] -**namespaceNumber** | **Double** | | [optional] -**namespaceInteger** | **Int** | | [optional] -**namespaceBoolean** | **Bool** | | [optional] -**namespaceArray** | **[Int]** | | [optional] -**namespaceWrappedArray** | **[Int]** | | [optional] -**prefixNsString** | **String** | | [optional] -**prefixNsNumber** | **Double** | | [optional] -**prefixNsInteger** | **Int** | | [optional] -**prefixNsBoolean** | **Bool** | | [optional] -**prefixNsArray** | **[Int]** | | [optional] -**prefixNsWrappedArray** | **[Int]** | | [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/swift4/nonPublicApi/git_push.sh b/samples/client/petstore/swift4/nonPublicApi/git_push.sh deleted file mode 100644 index ced3be2b0c7b..000000000000 --- a/samples/client/petstore/swift4/nonPublicApi/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/swift4/nonPublicApi/pom.xml b/samples/client/petstore/swift4/nonPublicApi/pom.xml deleted file mode 100644 index 5caba9cb4633..000000000000 --- a/samples/client/petstore/swift4/nonPublicApi/pom.xml +++ /dev/null @@ -1,43 +0,0 @@ - - 4.0.0 - io.swagger - Swift4PetstoreClientTests - pom - 1.0-SNAPSHOT - Swift4 Swagger Petstore Client - - - - maven-dependency-plugin - - - package - - copy-dependencies - - - ${project.build.directory} - - - - - - org.codehaus.mojo - exec-maven-plugin - 1.2.1 - - - xcodebuild-test - integration-test - - exec - - - ./run_spmbuild.sh - - - - - - - diff --git a/samples/client/petstore/swift4/nonPublicApi/project.yml b/samples/client/petstore/swift4/nonPublicApi/project.yml deleted file mode 100644 index 148b42517be9..000000000000 --- a/samples/client/petstore/swift4/nonPublicApi/project.yml +++ /dev/null @@ -1,15 +0,0 @@ -name: PetstoreClient -targets: - PetstoreClient: - type: framework - platform: iOS - deploymentTarget: "10.0" - sources: [PetstoreClient] - info: - path: ./Info.plist - version: 1.0.0 - settings: - APPLICATION_EXTENSION_API_ONLY: true - scheme: {} - dependencies: - - carthage: Alamofire diff --git a/samples/client/petstore/swift4/nonPublicApi/run_spmbuild.sh b/samples/client/petstore/swift4/nonPublicApi/run_spmbuild.sh deleted file mode 100755 index 1a9f585ad054..000000000000 --- a/samples/client/petstore/swift4/nonPublicApi/run_spmbuild.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -swift build && exit ${PIPESTATUS[0]} diff --git a/samples/client/petstore/swift4/objcCompatible/.gitignore b/samples/client/petstore/swift4/objcCompatible/.gitignore deleted file mode 100644 index 5e5d5cebcf47..000000000000 --- a/samples/client/petstore/swift4/objcCompatible/.gitignore +++ /dev/null @@ -1,63 +0,0 @@ -# Xcode -# -# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore - -## Build generated -build/ -DerivedData - -## Various settings -*.pbxuser -!default.pbxuser -*.mode1v3 -!default.mode1v3 -*.mode2v3 -!default.mode2v3 -*.perspectivev3 -!default.perspectivev3 -xcuserdata - -## Other -*.xccheckout -*.moved-aside -*.xcuserstate -*.xcscmblueprint - -## Obj-C/Swift specific -*.hmap -*.ipa - -## Playgrounds -timeline.xctimeline -playground.xcworkspace - -# Swift Package Manager -# -# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. -# Packages/ -.build/ - -# CocoaPods -# -# We recommend against adding the Pods directory to your .gitignore. However -# you should judge for yourself, the pros and cons are mentioned at: -# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control -# -# Pods/ - -# Carthage -# -# Add this line if you want to avoid checking in source code from Carthage dependencies. -# Carthage/Checkouts - -Carthage/Build - -# fastlane -# -# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the -# screenshots whenever they are needed. -# For more information about the recommended setup visit: -# https://github.com/fastlane/fastlane/blob/master/docs/Gitignore.md - -fastlane/report.xml -fastlane/screenshots diff --git a/samples/client/petstore/swift4/objcCompatible/.openapi-generator-ignore b/samples/client/petstore/swift4/objcCompatible/.openapi-generator-ignore deleted file mode 100644 index 7484ee590a38..000000000000 --- a/samples/client/petstore/swift4/objcCompatible/.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/swift4/objcCompatible/.openapi-generator/VERSION b/samples/client/petstore/swift4/objcCompatible/.openapi-generator/VERSION deleted file mode 100644 index b5d898602c2c..000000000000 --- a/samples/client/petstore/swift4/objcCompatible/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -4.3.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/swift4/objcCompatible/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata b/samples/client/petstore/swift4/objcCompatible/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 919434a6254f..000000000000 --- a/samples/client/petstore/swift4/objcCompatible/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/samples/client/petstore/swift4/objcCompatible/Cartfile b/samples/client/petstore/swift4/objcCompatible/Cartfile deleted file mode 100644 index 86748c63d90d..000000000000 --- a/samples/client/petstore/swift4/objcCompatible/Cartfile +++ /dev/null @@ -1 +0,0 @@ -github "Alamofire/Alamofire" ~> 4.9.0 diff --git a/samples/client/petstore/swift4/objcCompatible/Info.plist b/samples/client/petstore/swift4/objcCompatible/Info.plist deleted file mode 100644 index 323e5ecfc420..000000000000 --- a/samples/client/petstore/swift4/objcCompatible/Info.plist +++ /dev/null @@ -1,22 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.0 - CFBundleVersion - 1 - - diff --git a/samples/client/petstore/swift4/objcCompatible/Package.resolved b/samples/client/petstore/swift4/objcCompatible/Package.resolved deleted file mode 100644 index ca6137050ebc..000000000000 --- a/samples/client/petstore/swift4/objcCompatible/Package.resolved +++ /dev/null @@ -1,16 +0,0 @@ -{ - "object": { - "pins": [ - { - "package": "Alamofire", - "repositoryURL": "https://github.com/Alamofire/Alamofire.git", - "state": { - "branch": null, - "revision": "747c8db8d57b68d5e35275f10c92d55f982adbd4", - "version": "4.9.1" - } - } - ] - }, - "version": 1 -} diff --git a/samples/client/petstore/swift4/objcCompatible/Package.swift b/samples/client/petstore/swift4/objcCompatible/Package.swift deleted file mode 100644 index e5c5f0f33b82..000000000000 --- a/samples/client/petstore/swift4/objcCompatible/Package.swift +++ /dev/null @@ -1,27 +0,0 @@ -// swift-tools-version:4.2 -// The swift-tools-version declares the minimum version of Swift required to build this package. - -import PackageDescription - -let package = Package( - name: "PetstoreClient", - products: [ - // Products define the executables and libraries produced by a package, and make them visible to other packages. - .library( - name: "PetstoreClient", - targets: ["PetstoreClient"]) - ], - dependencies: [ - // Dependencies declare other packages that this package depends on. - .package(url: "https://github.com/Alamofire/Alamofire.git", from: "4.9.0") - ], - targets: [ - // Targets are the basic building blocks of a package. A target can define a module or a test suite. - // Targets can depend on other targets in this package, and on products in packages which this package depends on. - .target( - name: "PetstoreClient", - dependencies: ["Alamofire"], - path: "PetstoreClient/Classes" - ) - ] -) diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient.podspec b/samples/client/petstore/swift4/objcCompatible/PetstoreClient.podspec deleted file mode 100644 index a6c9a1f3d45e..000000000000 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient.podspec +++ /dev/null @@ -1,14 +0,0 @@ -Pod::Spec.new do |s| - s.name = 'PetstoreClient' - s.ios.deployment_target = '9.0' - s.osx.deployment_target = '10.11' - s.tvos.deployment_target = '9.0' - s.version = '1.0.0' - s.source = { :git => 'git@github.com:OpenAPITools/openapi-generator.git', :tag => 'v1.0.0' } - s.authors = '' - s.license = 'Proprietary' - s.homepage = 'https://github.com/openapitools/openapi-generator' - s.summary = 'PetstoreClient' - s.source_files = 'PetstoreClient/Classes/**/*.swift' - s.dependency 'Alamofire', '~> 4.9.0' -end diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient.xcodeproj/project.pbxproj b/samples/client/petstore/swift4/objcCompatible/PetstoreClient.xcodeproj/project.pbxproj deleted file mode 100644 index b606fe1ab100..000000000000 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient.xcodeproj/project.pbxproj +++ /dev/null @@ -1,576 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 51; - objects = { - -/* Begin PBXBuildFile section */ - 0299339D13C3571C4C57368A /* ApiResponse.swift in Sources */ = {isa = PBXBuildFile; fileRef = A8E7B833748B4F0C7CDA90C6 /* ApiResponse.swift */; }; - 081C0B80A989B1AAF2665121 /* MapTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7986861626C2B1CB49AD7000 /* MapTest.swift */; }; - 0C1E4C682F2D0AF7D9E431EE /* Dog.swift in Sources */ = {isa = PBXBuildFile; fileRef = C6C3E1129526A353B963EFD7 /* Dog.swift */; }; - 0E6932F1C55BA6880693C478 /* Order.swift in Sources */ = {isa = PBXBuildFile; fileRef = 27B2E9EF856E89FEAA359A3A /* Order.swift */; }; - 1E6C7C7F271A802DF8099330 /* APIHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 897716962D472FE162B723CB /* APIHelper.swift */; }; - 22FA6CA58E58550DE36AE750 /* JSONEncodableEncoding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9791B840B8D6EAA35343B00F /* JSONEncodableEncoding.swift */; }; - 248F2F0F29E8FDAE9CAD64C5 /* AdditionalPropertiesClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 396DEF3156BA0D12D0FC5C3C /* AdditionalPropertiesClass.swift */; }; - 269E3103C458C78EA5726EE2 /* Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = B8C298FC8929DCB369053F11 /* Extensions.swift */; }; - 294CDFA409BC369C0FDC5FB3 /* SpecialModelName.swift in Sources */ = {isa = PBXBuildFile; fileRef = 386FD590658E90509C121118 /* SpecialModelName.swift */; }; - 2B441CDFFFDDB343C04F5375 /* Animal.swift in Sources */ = {isa = PBXBuildFile; fileRef = 95568E7C35F119EB4A12B498 /* Animal.swift */; }; - 2C29D5B60E00DDA3878F1BDE /* Pet.swift in Sources */ = {isa = PBXBuildFile; fileRef = ECFEB4C6C257B3BB3CEA36D1 /* Pet.swift */; }; - 31DFF71D8CCCA0D2D2F8AC90 /* User.swift in Sources */ = {isa = PBXBuildFile; fileRef = E5565A447062C7B8F695F451 /* User.swift */; }; - 34C26979F4678B5B579D26E8 /* FakeClassnameTags123API.swift in Sources */ = {isa = PBXBuildFile; fileRef = B42354B407EC173BEB54E042 /* FakeClassnameTags123API.swift */; }; - 3691B017D3AA18404A563C67 /* ArrayOfNumberOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = B65BB72353DA24536A9049BE /* ArrayOfNumberOnly.swift */; }; - 37DEADD6CD0496690725B8A7 /* Name.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5AD994DFAA0DA93C188A4DBA /* Name.swift */; }; - 40E3027D2E38D8329C6AB01F /* APIs.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37DF825B8F3BADA2B2537D17 /* APIs.swift */; }; - 40E46046D2B16D1A672A08E3 /* AlamofireImplementations.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84A201508DF2B697D65F2631 /* AlamofireImplementations.swift */; }; - 418DB36F23C53C6E2C3CDE39 /* Alamofire.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A235FA3FDFB086CC69CDE83D /* Alamofire.framework */; }; - 41A491E9B577C510F927D126 /* OuterEnum.swift in Sources */ = {isa = PBXBuildFile; fileRef = C15008AABC804EB6FB4CDAC6 /* OuterEnum.swift */; }; - 45B3B29D7A62049F824751F8 /* AnimalFarm.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8D22BE01748F51106DE02332 /* AnimalFarm.swift */; }; - 4A344DF7ECE721B4BBEDCB4A /* CatAllOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AD0F94F512DFBC09F9CC79A /* CatAllOf.swift */; }; - 4B4BE77747413A9188CDABD2 /* ArrayOfArrayOfNumberOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B1B8B838B5D9D312F2002EB /* ArrayOfArrayOfNumberOnly.swift */; }; - 555DEA47352B42E49082922B /* NumberOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = B8E0B16084741FCB82389F58 /* NumberOnly.swift */; }; - 5695497F5DBF6C08842755A3 /* TypeHolderDefault.swift in Sources */ = {isa = PBXBuildFile; fileRef = EBC76F6D4D2AA8084B7EB50E /* TypeHolderDefault.swift */; }; - 61322FC4325F1A4FF24ACA48 /* EnumArrays.swift in Sources */ = {isa = PBXBuildFile; fileRef = 10503995D9EFD031A2EFB576 /* EnumArrays.swift */; }; - 64C48E3658CF53EBE8AF82F9 /* UserAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7C8D5F382979854D47F18DB1 /* UserAPI.swift */; }; - 6B638A04B34C82B2091D6EDD /* FormatTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3156CE41C001C80379B84BDB /* FormatTest.swift */; }; - 6FBD978F4D1ED92E7071FFBB /* CodableHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 02A6F6BB2152ACEE1416D44A /* CodableHelper.swift */; }; - 72547ECFB451A509409311EE /* Configuration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 28A444949BBC254798C3B3DD /* Configuration.swift */; }; - 72CE544C52BB33778D1B89B8 /* DogAllOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = A21A69C8402A60E01116ABBD /* DogAllOf.swift */; }; - 7441BBA84C31E06400338F89 /* ClassModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3C30827D8EAF8EA684E7BCEA /* ClassModel.swift */; }; - 7588B7E2960253174ADCCF16 /* JSONEncodingHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 35D710108A69DD8A5297F926 /* JSONEncodingHelper.swift */; }; - 86DE714469BE8BA28AFF710F /* HasOnlyReadOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C7FBC641752D2E13B150973 /* HasOnlyReadOnly.swift */; }; - 914F4D1FCB17773C067C4E68 /* ReadOnlyFirst.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6FD42727E001E799E458C292 /* ReadOnlyFirst.swift */; }; - 922BDADAB291907A7FD14314 /* OuterComposite.swift in Sources */ = {isa = PBXBuildFile; fileRef = F4E0AD8F60A91F72C7687560 /* OuterComposite.swift */; }; - 97F7B85BF07A325EEBF92C93 /* File.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3933D3B2A3AC4577094D0C23 /* File.swift */; }; - 9CA19AA4483F6EB50270A81E /* List.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A6070F581E611FF44AFD40A /* List.swift */; }; - 9CF06ACDA32CB0C3E74E435C /* Model200Response.swift in Sources */ = {isa = PBXBuildFile; fileRef = 82A2C3DC2235F0114C2B08E5 /* Model200Response.swift */; }; - 9DA1C6F8B4D6C8595F28C098 /* EnumTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = FD60AEA646791E0EDE885DE1 /* EnumTest.swift */; }; - A6E50CC6845FE58D8C236253 /* Return.swift in Sources */ = {isa = PBXBuildFile; fileRef = C81447828475F76C5CF4F08A /* Return.swift */; }; - A6E5A5629495DB0ED672B06F /* PetAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A019F500E546A3292CE716A /* PetAPI.swift */; }; - A85E190556818FFA79896E92 /* ArrayTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = F1A0379CDFC55705AE76C998 /* ArrayTest.swift */; }; - ACF3037926301D4D6E848745 /* EnumClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B2C97AE6ACA1E5FB88F5BAA /* EnumClass.swift */; }; - AD594BFB99E31A5E07579237 /* Client.swift in Sources */ = {isa = PBXBuildFile; fileRef = A913A57E72D723632E9A718F /* Client.swift */; }; - B301DB1B80F37C757550AA17 /* MixedPropertiesAndAdditionalPropertiesClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9AD714C7CC59BDD18DE8DF4E /* MixedPropertiesAndAdditionalPropertiesClass.swift */; }; - B3E35FE2773D4A8BA15CFA88 /* Tag.swift in Sources */ = {isa = PBXBuildFile; fileRef = B2896F8BFD1AA2965C8A3015 /* Tag.swift */; }; - BB1F3C6D50B8F0A8CC4F1749 /* Capitalization.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7B38FA00A494D13F4C382A3 /* Capitalization.swift */; }; - CA9B9B19882EA044EAD0B359 /* AnotherFakeAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9DF24D2714B9C4CF14146E88 /* AnotherFakeAPI.swift */; }; - CB68ABDBAADAF6B8D7B93A5D /* StoreAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = A53274D99BBDE1B79BF3521C /* StoreAPI.swift */; }; - D3BAB7C7A607392CA838C580 /* Models.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8699F7966F748ED026A6FB4C /* Models.swift */; }; - D95A5F83AAA7D5C95A29AB83 /* Cat.swift in Sources */ = {isa = PBXBuildFile; fileRef = 212AA914B7F1793A4E32C119 /* Cat.swift */; }; - DDBD4C0FBA3CD6A4DA3DF376 /* FakeAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6E00950725DC44436C5E238C /* FakeAPI.swift */; }; - DDF1D589267D56D9BED3C6E5 /* FileSchemaTestClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B3666552AA854DAF9C480A3 /* FileSchemaTestClass.swift */; }; - E8A58C6414E88AF3EAE45B69 /* Category.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F2985D01F8D60A4B1925C69 /* Category.swift */; }; - EDFC6C5121A43997014049CB /* StringBooleanMap.swift in Sources */ = {isa = PBXBuildFile; fileRef = 47B4DEBABEFE140768CFB70B /* StringBooleanMap.swift */; }; - FECA2E8C9D0BDFEC459E8996 /* TypeHolderExample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19B65C66C97F082718DDD703 /* TypeHolderExample.swift */; }; -/* End PBXBuildFile section */ - -/* Begin PBXFileReference section */ - 02A6F6BB2152ACEE1416D44A /* CodableHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CodableHelper.swift; sourceTree = ""; }; - 10503995D9EFD031A2EFB576 /* EnumArrays.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EnumArrays.swift; sourceTree = ""; }; - 164AD6EC9C4CCF634D7C4590 /* PetstoreClient.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = PetstoreClient.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 19B65C66C97F082718DDD703 /* TypeHolderExample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TypeHolderExample.swift; sourceTree = ""; }; - 212AA914B7F1793A4E32C119 /* Cat.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Cat.swift; sourceTree = ""; }; - 27B2E9EF856E89FEAA359A3A /* Order.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Order.swift; sourceTree = ""; }; - 28A444949BBC254798C3B3DD /* Configuration.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Configuration.swift; sourceTree = ""; }; - 3156CE41C001C80379B84BDB /* FormatTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FormatTest.swift; sourceTree = ""; }; - 35D710108A69DD8A5297F926 /* JSONEncodingHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JSONEncodingHelper.swift; sourceTree = ""; }; - 37DF825B8F3BADA2B2537D17 /* APIs.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = APIs.swift; sourceTree = ""; }; - 386FD590658E90509C121118 /* SpecialModelName.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SpecialModelName.swift; sourceTree = ""; }; - 3933D3B2A3AC4577094D0C23 /* File.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = File.swift; sourceTree = ""; }; - 396DEF3156BA0D12D0FC5C3C /* AdditionalPropertiesClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdditionalPropertiesClass.swift; sourceTree = ""; }; - 3AD0F94F512DFBC09F9CC79A /* CatAllOf.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CatAllOf.swift; sourceTree = ""; }; - 3C30827D8EAF8EA684E7BCEA /* ClassModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ClassModel.swift; sourceTree = ""; }; - 47B4DEBABEFE140768CFB70B /* StringBooleanMap.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StringBooleanMap.swift; sourceTree = ""; }; - 4B2C97AE6ACA1E5FB88F5BAA /* EnumClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EnumClass.swift; sourceTree = ""; }; - 4B3666552AA854DAF9C480A3 /* FileSchemaTestClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FileSchemaTestClass.swift; sourceTree = ""; }; - 4C7FBC641752D2E13B150973 /* HasOnlyReadOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HasOnlyReadOnly.swift; sourceTree = ""; }; - 5AD994DFAA0DA93C188A4DBA /* Name.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Name.swift; sourceTree = ""; }; - 6E00950725DC44436C5E238C /* FakeAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FakeAPI.swift; sourceTree = ""; }; - 6F2985D01F8D60A4B1925C69 /* Category.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Category.swift; sourceTree = ""; }; - 6FD42727E001E799E458C292 /* ReadOnlyFirst.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReadOnlyFirst.swift; sourceTree = ""; }; - 7986861626C2B1CB49AD7000 /* MapTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MapTest.swift; sourceTree = ""; }; - 7A6070F581E611FF44AFD40A /* List.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = List.swift; sourceTree = ""; }; - 7B1B8B838B5D9D312F2002EB /* ArrayOfArrayOfNumberOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArrayOfArrayOfNumberOnly.swift; sourceTree = ""; }; - 7C8D5F382979854D47F18DB1 /* UserAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserAPI.swift; sourceTree = ""; }; - 82A2C3DC2235F0114C2B08E5 /* Model200Response.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Model200Response.swift; sourceTree = ""; }; - 84A201508DF2B697D65F2631 /* AlamofireImplementations.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlamofireImplementations.swift; sourceTree = ""; }; - 8699F7966F748ED026A6FB4C /* Models.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Models.swift; sourceTree = ""; }; - 897716962D472FE162B723CB /* APIHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = APIHelper.swift; sourceTree = ""; }; - 8D22BE01748F51106DE02332 /* AnimalFarm.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnimalFarm.swift; sourceTree = ""; }; - 95568E7C35F119EB4A12B498 /* Animal.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Animal.swift; sourceTree = ""; }; - 9791B840B8D6EAA35343B00F /* JSONEncodableEncoding.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JSONEncodableEncoding.swift; sourceTree = ""; }; - 9A019F500E546A3292CE716A /* PetAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PetAPI.swift; sourceTree = ""; }; - 9AD714C7CC59BDD18DE8DF4E /* MixedPropertiesAndAdditionalPropertiesClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MixedPropertiesAndAdditionalPropertiesClass.swift; sourceTree = ""; }; - 9DF24D2714B9C4CF14146E88 /* AnotherFakeAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnotherFakeAPI.swift; sourceTree = ""; }; - A21A69C8402A60E01116ABBD /* DogAllOf.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DogAllOf.swift; sourceTree = ""; }; - A235FA3FDFB086CC69CDE83D /* Alamofire.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Alamofire.framework; sourceTree = ""; }; - A53274D99BBDE1B79BF3521C /* StoreAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StoreAPI.swift; sourceTree = ""; }; - A7B38FA00A494D13F4C382A3 /* Capitalization.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Capitalization.swift; sourceTree = ""; }; - A8E7B833748B4F0C7CDA90C6 /* ApiResponse.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ApiResponse.swift; sourceTree = ""; }; - A913A57E72D723632E9A718F /* Client.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Client.swift; sourceTree = ""; }; - B2896F8BFD1AA2965C8A3015 /* Tag.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Tag.swift; sourceTree = ""; }; - B42354B407EC173BEB54E042 /* FakeClassnameTags123API.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FakeClassnameTags123API.swift; sourceTree = ""; }; - B65BB72353DA24536A9049BE /* ArrayOfNumberOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArrayOfNumberOnly.swift; sourceTree = ""; }; - B8C298FC8929DCB369053F11 /* Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Extensions.swift; sourceTree = ""; }; - B8E0B16084741FCB82389F58 /* NumberOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NumberOnly.swift; sourceTree = ""; }; - C15008AABC804EB6FB4CDAC6 /* OuterEnum.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OuterEnum.swift; sourceTree = ""; }; - C6C3E1129526A353B963EFD7 /* Dog.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Dog.swift; sourceTree = ""; }; - C81447828475F76C5CF4F08A /* Return.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Return.swift; sourceTree = ""; }; - E5565A447062C7B8F695F451 /* User.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = User.swift; sourceTree = ""; }; - EBC76F6D4D2AA8084B7EB50E /* TypeHolderDefault.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TypeHolderDefault.swift; sourceTree = ""; }; - ECFEB4C6C257B3BB3CEA36D1 /* Pet.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Pet.swift; sourceTree = ""; }; - F1A0379CDFC55705AE76C998 /* ArrayTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArrayTest.swift; sourceTree = ""; }; - F4E0AD8F60A91F72C7687560 /* OuterComposite.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OuterComposite.swift; sourceTree = ""; }; - FD60AEA646791E0EDE885DE1 /* EnumTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EnumTest.swift; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - D1990C2A394CCF025EF98A2F /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 418DB36F23C53C6E2C3CDE39 /* Alamofire.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 1E464C0937FE0D3A7A0FE29A /* Frameworks */ = { - isa = PBXGroup; - children = ( - 7861EE241895128F64DD7873 /* Carthage */, - ); - name = Frameworks; - sourceTree = ""; - }; - 4FBDCF1330A9AB9122780DB3 /* Models */ = { - isa = PBXGroup; - children = ( - 396DEF3156BA0D12D0FC5C3C /* AdditionalPropertiesClass.swift */, - 95568E7C35F119EB4A12B498 /* Animal.swift */, - 8D22BE01748F51106DE02332 /* AnimalFarm.swift */, - A8E7B833748B4F0C7CDA90C6 /* ApiResponse.swift */, - 7B1B8B838B5D9D312F2002EB /* ArrayOfArrayOfNumberOnly.swift */, - B65BB72353DA24536A9049BE /* ArrayOfNumberOnly.swift */, - F1A0379CDFC55705AE76C998 /* ArrayTest.swift */, - A7B38FA00A494D13F4C382A3 /* Capitalization.swift */, - 212AA914B7F1793A4E32C119 /* Cat.swift */, - 3AD0F94F512DFBC09F9CC79A /* CatAllOf.swift */, - 6F2985D01F8D60A4B1925C69 /* Category.swift */, - 3C30827D8EAF8EA684E7BCEA /* ClassModel.swift */, - A913A57E72D723632E9A718F /* Client.swift */, - C6C3E1129526A353B963EFD7 /* Dog.swift */, - A21A69C8402A60E01116ABBD /* DogAllOf.swift */, - 10503995D9EFD031A2EFB576 /* EnumArrays.swift */, - 4B2C97AE6ACA1E5FB88F5BAA /* EnumClass.swift */, - FD60AEA646791E0EDE885DE1 /* EnumTest.swift */, - 3933D3B2A3AC4577094D0C23 /* File.swift */, - 4B3666552AA854DAF9C480A3 /* FileSchemaTestClass.swift */, - 3156CE41C001C80379B84BDB /* FormatTest.swift */, - 4C7FBC641752D2E13B150973 /* HasOnlyReadOnly.swift */, - 7A6070F581E611FF44AFD40A /* List.swift */, - 7986861626C2B1CB49AD7000 /* MapTest.swift */, - 9AD714C7CC59BDD18DE8DF4E /* MixedPropertiesAndAdditionalPropertiesClass.swift */, - 82A2C3DC2235F0114C2B08E5 /* Model200Response.swift */, - 5AD994DFAA0DA93C188A4DBA /* Name.swift */, - B8E0B16084741FCB82389F58 /* NumberOnly.swift */, - 27B2E9EF856E89FEAA359A3A /* Order.swift */, - F4E0AD8F60A91F72C7687560 /* OuterComposite.swift */, - C15008AABC804EB6FB4CDAC6 /* OuterEnum.swift */, - ECFEB4C6C257B3BB3CEA36D1 /* Pet.swift */, - 6FD42727E001E799E458C292 /* ReadOnlyFirst.swift */, - C81447828475F76C5CF4F08A /* Return.swift */, - 386FD590658E90509C121118 /* SpecialModelName.swift */, - 47B4DEBABEFE140768CFB70B /* StringBooleanMap.swift */, - B2896F8BFD1AA2965C8A3015 /* Tag.swift */, - EBC76F6D4D2AA8084B7EB50E /* TypeHolderDefault.swift */, - 19B65C66C97F082718DDD703 /* TypeHolderExample.swift */, - E5565A447062C7B8F695F451 /* User.swift */, - ); - path = Models; - sourceTree = ""; - }; - 5FBA6AE5F64CD737F88B4565 = { - isa = PBXGroup; - children = ( - 9B364C01750D7AA4F983B9E7 /* PetstoreClient */, - 1E464C0937FE0D3A7A0FE29A /* Frameworks */, - 857F0DEA1890CE66D6DAD556 /* Products */, - ); - sourceTree = ""; - }; - 67BF3478113E6B4DF1C4E04F /* OpenAPIs */ = { - isa = PBXGroup; - children = ( - 84A201508DF2B697D65F2631 /* AlamofireImplementations.swift */, - 897716962D472FE162B723CB /* APIHelper.swift */, - 37DF825B8F3BADA2B2537D17 /* APIs.swift */, - 02A6F6BB2152ACEE1416D44A /* CodableHelper.swift */, - 28A444949BBC254798C3B3DD /* Configuration.swift */, - B8C298FC8929DCB369053F11 /* Extensions.swift */, - 9791B840B8D6EAA35343B00F /* JSONEncodableEncoding.swift */, - 35D710108A69DD8A5297F926 /* JSONEncodingHelper.swift */, - 8699F7966F748ED026A6FB4C /* Models.swift */, - F956D0CCAE23BCFD1C7BDD5D /* APIs */, - 4FBDCF1330A9AB9122780DB3 /* Models */, - ); - path = OpenAPIs; - sourceTree = ""; - }; - 7861EE241895128F64DD7873 /* Carthage */ = { - isa = PBXGroup; - children = ( - A012205B41CB71A62B86EECD /* iOS */, - ); - name = Carthage; - path = Carthage/Build; - sourceTree = ""; - }; - 857F0DEA1890CE66D6DAD556 /* Products */ = { - isa = PBXGroup; - children = ( - 164AD6EC9C4CCF634D7C4590 /* PetstoreClient.framework */, - ); - name = Products; - sourceTree = ""; - }; - 9B364C01750D7AA4F983B9E7 /* PetstoreClient */ = { - isa = PBXGroup; - children = ( - EF4C81BDD734856ED5023B77 /* Classes */, - ); - path = PetstoreClient; - sourceTree = ""; - }; - A012205B41CB71A62B86EECD /* iOS */ = { - isa = PBXGroup; - children = ( - A235FA3FDFB086CC69CDE83D /* Alamofire.framework */, - ); - path = iOS; - sourceTree = ""; - }; - EF4C81BDD734856ED5023B77 /* Classes */ = { - isa = PBXGroup; - children = ( - 67BF3478113E6B4DF1C4E04F /* OpenAPIs */, - ); - path = Classes; - sourceTree = ""; - }; - F956D0CCAE23BCFD1C7BDD5D /* APIs */ = { - isa = PBXGroup; - children = ( - 9DF24D2714B9C4CF14146E88 /* AnotherFakeAPI.swift */, - 6E00950725DC44436C5E238C /* FakeAPI.swift */, - B42354B407EC173BEB54E042 /* FakeClassnameTags123API.swift */, - 9A019F500E546A3292CE716A /* PetAPI.swift */, - A53274D99BBDE1B79BF3521C /* StoreAPI.swift */, - 7C8D5F382979854D47F18DB1 /* UserAPI.swift */, - ); - path = APIs; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - C1282C2230015E0D204BEAED /* PetstoreClient */ = { - isa = PBXNativeTarget; - buildConfigurationList = B46EDEB1A7F0D78FE6394544 /* Build configuration list for PBXNativeTarget "PetstoreClient" */; - buildPhases = ( - E539708354CE60FE486F81ED /* Sources */, - D1990C2A394CCF025EF98A2F /* Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = PetstoreClient; - productName = PetstoreClient; - productReference = 164AD6EC9C4CCF634D7C4590 /* PetstoreClient.framework */; - productType = "com.apple.product-type.framework"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - E7D276EE2369D8C455513C2E /* Project object */ = { - isa = PBXProject; - attributes = { - LastUpgradeCheck = 1020; - }; - buildConfigurationList = ECAB17FF35111B5E14DAAC08 /* Build configuration list for PBXProject "PetstoreClient" */; - compatibilityVersion = "Xcode 10.0"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - Base, - en, - ); - mainGroup = 5FBA6AE5F64CD737F88B4565; - projectDirPath = ""; - projectRoot = ""; - targets = ( - C1282C2230015E0D204BEAED /* PetstoreClient */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXSourcesBuildPhase section */ - E539708354CE60FE486F81ED /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 1E6C7C7F271A802DF8099330 /* APIHelper.swift in Sources */, - 40E3027D2E38D8329C6AB01F /* APIs.swift in Sources */, - 248F2F0F29E8FDAE9CAD64C5 /* AdditionalPropertiesClass.swift in Sources */, - 40E46046D2B16D1A672A08E3 /* AlamofireImplementations.swift in Sources */, - 2B441CDFFFDDB343C04F5375 /* Animal.swift in Sources */, - 45B3B29D7A62049F824751F8 /* AnimalFarm.swift in Sources */, - CA9B9B19882EA044EAD0B359 /* AnotherFakeAPI.swift in Sources */, - 0299339D13C3571C4C57368A /* ApiResponse.swift in Sources */, - 4B4BE77747413A9188CDABD2 /* ArrayOfArrayOfNumberOnly.swift in Sources */, - 3691B017D3AA18404A563C67 /* ArrayOfNumberOnly.swift in Sources */, - A85E190556818FFA79896E92 /* ArrayTest.swift in Sources */, - BB1F3C6D50B8F0A8CC4F1749 /* Capitalization.swift in Sources */, - D95A5F83AAA7D5C95A29AB83 /* Cat.swift in Sources */, - 4A344DF7ECE721B4BBEDCB4A /* CatAllOf.swift in Sources */, - E8A58C6414E88AF3EAE45B69 /* Category.swift in Sources */, - 7441BBA84C31E06400338F89 /* ClassModel.swift in Sources */, - AD594BFB99E31A5E07579237 /* Client.swift in Sources */, - 6FBD978F4D1ED92E7071FFBB /* CodableHelper.swift in Sources */, - 72547ECFB451A509409311EE /* Configuration.swift in Sources */, - 0C1E4C682F2D0AF7D9E431EE /* Dog.swift in Sources */, - 72CE544C52BB33778D1B89B8 /* DogAllOf.swift in Sources */, - 61322FC4325F1A4FF24ACA48 /* EnumArrays.swift in Sources */, - ACF3037926301D4D6E848745 /* EnumClass.swift in Sources */, - 9DA1C6F8B4D6C8595F28C098 /* EnumTest.swift in Sources */, - 269E3103C458C78EA5726EE2 /* Extensions.swift in Sources */, - DDBD4C0FBA3CD6A4DA3DF376 /* FakeAPI.swift in Sources */, - 34C26979F4678B5B579D26E8 /* FakeClassnameTags123API.swift in Sources */, - 97F7B85BF07A325EEBF92C93 /* File.swift in Sources */, - DDF1D589267D56D9BED3C6E5 /* FileSchemaTestClass.swift in Sources */, - 6B638A04B34C82B2091D6EDD /* FormatTest.swift in Sources */, - 86DE714469BE8BA28AFF710F /* HasOnlyReadOnly.swift in Sources */, - 22FA6CA58E58550DE36AE750 /* JSONEncodableEncoding.swift in Sources */, - 7588B7E2960253174ADCCF16 /* JSONEncodingHelper.swift in Sources */, - 9CA19AA4483F6EB50270A81E /* List.swift in Sources */, - 081C0B80A989B1AAF2665121 /* MapTest.swift in Sources */, - B301DB1B80F37C757550AA17 /* MixedPropertiesAndAdditionalPropertiesClass.swift in Sources */, - 9CF06ACDA32CB0C3E74E435C /* Model200Response.swift in Sources */, - D3BAB7C7A607392CA838C580 /* Models.swift in Sources */, - 37DEADD6CD0496690725B8A7 /* Name.swift in Sources */, - 555DEA47352B42E49082922B /* NumberOnly.swift in Sources */, - 0E6932F1C55BA6880693C478 /* Order.swift in Sources */, - 922BDADAB291907A7FD14314 /* OuterComposite.swift in Sources */, - 41A491E9B577C510F927D126 /* OuterEnum.swift in Sources */, - 2C29D5B60E00DDA3878F1BDE /* Pet.swift in Sources */, - A6E5A5629495DB0ED672B06F /* PetAPI.swift in Sources */, - 914F4D1FCB17773C067C4E68 /* ReadOnlyFirst.swift in Sources */, - A6E50CC6845FE58D8C236253 /* Return.swift in Sources */, - 294CDFA409BC369C0FDC5FB3 /* SpecialModelName.swift in Sources */, - CB68ABDBAADAF6B8D7B93A5D /* StoreAPI.swift in Sources */, - EDFC6C5121A43997014049CB /* StringBooleanMap.swift in Sources */, - B3E35FE2773D4A8BA15CFA88 /* Tag.swift in Sources */, - 5695497F5DBF6C08842755A3 /* TypeHolderDefault.swift in Sources */, - FECA2E8C9D0BDFEC459E8996 /* TypeHolderExample.swift in Sources */, - 31DFF71D8CCCA0D2D2F8AC90 /* User.swift in Sources */, - 64C48E3658CF53EBE8AF82F9 /* UserAPI.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin XCBuildConfiguration section */ - 3B2C02AFB91CB5C82766ED5C /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - APPLICATION_EXTENSION_API_ONLY = YES; - CODE_SIGN_IDENTITY = ""; - CURRENT_PROJECT_VERSION = 1; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Carthage/Build/iOS", - ); - INFOPLIST_FILE = Info.plist; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Release; - }; - A9EB0A02B94C427CBACFEC7C /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "$(inherited)", - "DEBUG=1", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = iphoneos; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 5.0; - }; - name = Debug; - }; - DD3EEB93949E9EBA4437E9CD /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - APPLICATION_EXTENSION_API_ONLY = YES; - CODE_SIGN_IDENTITY = ""; - CURRENT_PROJECT_VERSION = 1; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Carthage/Build/iOS", - ); - INFOPLIST_FILE = Info.plist; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Debug; - }; - F81D4E5FECD46E9AA6DD2C29 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = iphoneos; - SWIFT_COMPILATION_MODE = wholemodule; - SWIFT_VERSION = 5.0; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - B46EDEB1A7F0D78FE6394544 /* Build configuration list for PBXNativeTarget "PetstoreClient" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - DD3EEB93949E9EBA4437E9CD /* Debug */, - 3B2C02AFB91CB5C82766ED5C /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = ""; - }; - ECAB17FF35111B5E14DAAC08 /* Build configuration list for PBXProject "PetstoreClient" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - A9EB0A02B94C427CBACFEC7C /* Debug */, - F81D4E5FECD46E9AA6DD2C29 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Debug; - }; -/* End XCConfigurationList section */ - }; - rootObject = E7D276EE2369D8C455513C2E /* Project object */; -} diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/samples/client/petstore/swift4/objcCompatible/PetstoreClient.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 919434a6254f..000000000000 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient.xcodeproj/xcshareddata/xcschemes/PetstoreClient.xcscheme b/samples/client/petstore/swift4/objcCompatible/PetstoreClient.xcodeproj/xcshareddata/xcschemes/PetstoreClient.xcscheme deleted file mode 100644 index 26d510552bb0..000000000000 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient.xcodeproj/xcshareddata/xcschemes/PetstoreClient.xcscheme +++ /dev/null @@ -1,99 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIHelper.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIHelper.swift deleted file mode 100644 index 200070096800..000000000000 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIHelper.swift +++ /dev/null @@ -1,70 +0,0 @@ -// APIHelper.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct APIHelper { - public static func rejectNil(_ source: [String: Any?]) -> [String: Any]? { - let destination = source.reduce(into: [String: Any]()) { (result, item) in - if let value = item.value { - result[item.key] = value - } - } - - if destination.isEmpty { - return nil - } - return destination - } - - public static func rejectNilHeaders(_ source: [String: Any?]) -> [String: String] { - return source.reduce(into: [String: String]()) { (result, item) in - if let collection = item.value as? [Any?] { - result[item.key] = collection.filter({ $0 != nil }).map { "\($0!)" }.joined(separator: ",") - } else if let value: Any = item.value { - result[item.key] = "\(value)" - } - } - } - - public static func convertBoolToString(_ source: [String: Any]?) -> [String: Any]? { - guard let source = source else { - return nil - } - - return source.reduce(into: [String: Any](), { (result, item) in - switch item.value { - case let x as Bool: - result[item.key] = x.description - default: - result[item.key] = item.value - } - }) - } - - public static func mapValueToPathItem(_ source: Any) -> Any { - if let collection = source as? [Any?] { - return collection.filter({ $0 != nil }).map({"\($0!)"}).joined(separator: ",") - } - return source - } - - public static func mapValuesToQueryItems(_ source: [String: Any?]) -> [URLQueryItem]? { - let destination = source.filter({ $0.value != nil}).reduce(into: [URLQueryItem]()) { (result, item) in - if let collection = item.value as? [Any?] { - let value = collection.filter({ $0 != nil }).map({"\($0!)"}).joined(separator: ",") - result.append(URLQueryItem(name: item.key, value: value)) - } else if let value = item.value { - result.append(URLQueryItem(name: item.key, value: "\(value)")) - } - } - - if destination.isEmpty { - return nil - } - return destination - } -} diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs.swift deleted file mode 100644 index 832282d224f8..000000000000 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs.swift +++ /dev/null @@ -1,62 +0,0 @@ -// APIs.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -open class PetstoreClientAPI { - public static var basePath = "http://petstore.swagger.io:80/v2" - public static var credential: URLCredential? - public static var customHeaders: [String: String] = [:] - public static var requestBuilderFactory: RequestBuilderFactory = AlamofireRequestBuilderFactory() - public static var apiResponseQueue: DispatchQueue = .main -} - -open class RequestBuilder { - var credential: URLCredential? - var headers: [String: String] - public let parameters: [String: Any]? - public let isBody: Bool - public let method: String - public let URLString: String - - /// Optional block to obtain a reference to the request's progress instance when available. - public var onProgressReady: ((Progress) -> Void)? - - required public init(method: String, URLString: String, parameters: [String: Any]?, isBody: Bool, headers: [String: String] = [:]) { - self.method = method - self.URLString = URLString - self.parameters = parameters - self.isBody = isBody - self.headers = headers - - addHeaders(PetstoreClientAPI.customHeaders) - } - - open func addHeaders(_ aHeaders: [String: String]) { - for (header, value) in aHeaders { - headers[header] = value - } - } - - open func execute(_ completion: @escaping (_ response: Response?, _ error: Error?) -> Void) { } - - public func addHeader(name: String, value: String) -> Self { - if !value.isEmpty { - headers[name] = value - } - return self - } - - open func addCredential() -> Self { - self.credential = PetstoreClientAPI.credential - return self - } -} - -public protocol RequestBuilderFactory { - func getNonDecodableBuilder() -> RequestBuilder.Type - func getBuilder() -> RequestBuilder.Type -} diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift deleted file mode 100644 index 89e7eb02109c..000000000000 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift +++ /dev/null @@ -1,42 +0,0 @@ -// -// AnotherFakeAPI.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -@objc open class AnotherFakeAPI: NSObject { - /** - To test special tags - - - parameter body: (body) client model - - parameter completion: completion handler to receive the data and the error objects - */ - open class func call123testSpecialTags(body: Client, completion: @escaping ((_ data: Client?, _ error: Error?) -> Void)) { - call123testSpecialTagsWithRequestBuilder(body: body).execute { (response, error) -> Void in - completion(response?.body, error) - } - } - - /** - To test special tags - - PATCH /another-fake/dummy - - To test special tags and operation ID starting with number - - parameter body: (body) client model - - returns: RequestBuilder - */ - open class func call123testSpecialTagsWithRequestBuilder(body: Client) -> RequestBuilder { - let path = "/another-fake/dummy" - let URLString = PetstoreClientAPI.basePath + path - let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "PATCH", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) - } - -} diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift deleted file mode 100644 index 19738e6b1e74..000000000000 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift +++ /dev/null @@ -1,575 +0,0 @@ -// -// FakeAPI.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -@objc open class FakeAPI: NSObject { - /** - - - parameter body: (body) Input boolean as post body (optional) - - parameter completion: completion handler to receive the data and the error objects - */ - open class func fakeOuterBooleanSerialize(body: Bool? = nil, completion: @escaping ((_ data: Bool?, _ error: Error?) -> Void)) { - fakeOuterBooleanSerializeWithRequestBuilder(body: body).execute { (response, error) -> Void in - completion(response?.body, error) - } - } - - /** - - POST /fake/outer/boolean - - Test serialization of outer boolean types - - parameter body: (body) Input boolean as post body (optional) - - returns: RequestBuilder - */ - open class func fakeOuterBooleanSerializeWithRequestBuilder(body: Bool? = nil) -> RequestBuilder { - let path = "/fake/outer/boolean" - let URLString = PetstoreClientAPI.basePath + path - let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) - } - - /** - - - parameter body: (body) Input composite as post body (optional) - - parameter completion: completion handler to receive the data and the error objects - */ - open class func fakeOuterCompositeSerialize(body: OuterComposite? = nil, completion: @escaping ((_ data: OuterComposite?, _ error: Error?) -> Void)) { - fakeOuterCompositeSerializeWithRequestBuilder(body: body).execute { (response, error) -> Void in - completion(response?.body, error) - } - } - - /** - - POST /fake/outer/composite - - Test serialization of object with outer number type - - parameter body: (body) Input composite as post body (optional) - - returns: RequestBuilder - */ - open class func fakeOuterCompositeSerializeWithRequestBuilder(body: OuterComposite? = nil) -> RequestBuilder { - let path = "/fake/outer/composite" - let URLString = PetstoreClientAPI.basePath + path - let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) - } - - /** - - - parameter body: (body) Input number as post body (optional) - - parameter completion: completion handler to receive the data and the error objects - */ - open class func fakeOuterNumberSerialize(body: Double? = nil, completion: @escaping ((_ data: Double?, _ error: Error?) -> Void)) { - fakeOuterNumberSerializeWithRequestBuilder(body: body).execute { (response, error) -> Void in - completion(response?.body, error) - } - } - - /** - - POST /fake/outer/number - - Test serialization of outer number types - - parameter body: (body) Input number as post body (optional) - - returns: RequestBuilder - */ - open class func fakeOuterNumberSerializeWithRequestBuilder(body: Double? = nil) -> RequestBuilder { - let path = "/fake/outer/number" - let URLString = PetstoreClientAPI.basePath + path - let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) - } - - /** - - - parameter body: (body) Input string as post body (optional) - - parameter completion: completion handler to receive the data and the error objects - */ - open class func fakeOuterStringSerialize(body: String? = nil, completion: @escaping ((_ data: String?, _ error: Error?) -> Void)) { - fakeOuterStringSerializeWithRequestBuilder(body: body).execute { (response, error) -> Void in - completion(response?.body, error) - } - } - - /** - - POST /fake/outer/string - - Test serialization of outer string types - - parameter body: (body) Input string as post body (optional) - - returns: RequestBuilder - */ - open class func fakeOuterStringSerializeWithRequestBuilder(body: String? = nil) -> RequestBuilder { - let path = "/fake/outer/string" - let URLString = PetstoreClientAPI.basePath + path - let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) - } - - /** - - - parameter body: (body) - - parameter completion: completion handler to receive the data and the error objects - */ - open class func testBodyWithFileSchema(body: FileSchemaTestClass, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - testBodyWithFileSchemaWithRequestBuilder(body: body).execute { (_, error) -> Void in - if error == nil { - completion((), error) - } else { - completion(nil, error) - } - } - } - - /** - - PUT /fake/body-with-file-schema - - For this test, the body for this request much reference a schema named `File`. - - parameter body: (body) - - returns: RequestBuilder - */ - open class func testBodyWithFileSchemaWithRequestBuilder(body: FileSchemaTestClass) -> RequestBuilder { - let path = "/fake/body-with-file-schema" - let URLString = PetstoreClientAPI.basePath + path - let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) - } - - /** - - - parameter query: (query) - - parameter body: (body) - - parameter completion: completion handler to receive the data and the error objects - */ - open class func testBodyWithQueryParams(query: String, body: User, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - testBodyWithQueryParamsWithRequestBuilder(query: query, body: body).execute { (_, error) -> Void in - if error == nil { - completion((), error) - } else { - completion(nil, error) - } - } - } - - /** - - PUT /fake/body-with-query-params - - parameter query: (query) - - parameter body: (body) - - returns: RequestBuilder - */ - open class func testBodyWithQueryParamsWithRequestBuilder(query: String, body: User) -> RequestBuilder { - let path = "/fake/body-with-query-params" - let URLString = PetstoreClientAPI.basePath + path - let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) - - var url = URLComponents(string: URLString) - url?.queryItems = APIHelper.mapValuesToQueryItems([ - "query": query.encodeToJSON() - ]) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) - } - - /** - To test \"client\" model - - - parameter body: (body) client model - - parameter completion: completion handler to receive the data and the error objects - */ - open class func testClientModel(body: Client, completion: @escaping ((_ data: Client?, _ error: Error?) -> Void)) { - testClientModelWithRequestBuilder(body: body).execute { (response, error) -> Void in - completion(response?.body, error) - } - } - - /** - To test \"client\" model - - PATCH /fake - - To test \"client\" model - - parameter body: (body) client model - - returns: RequestBuilder - */ - open class func testClientModelWithRequestBuilder(body: Client) -> RequestBuilder { - let path = "/fake" - let URLString = PetstoreClientAPI.basePath + path - let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "PATCH", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) - } - - /** - Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - - - parameter number: (form) None - - parameter double: (form) None - - parameter patternWithoutDelimiter: (form) None - - parameter byte: (form) None - - parameter integer: (form) None (optional) - - parameter int32: (form) None (optional) - - parameter int64: (form) None (optional) - - parameter float: (form) None (optional) - - parameter string: (form) None (optional) - - parameter binary: (form) None (optional) - - parameter date: (form) None (optional) - - parameter dateTime: (form) None (optional) - - parameter password: (form) None (optional) - - parameter callback: (form) None (optional) - - parameter completion: completion handler to receive the data and the error objects - */ - open class func testEndpointParameters(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - testEndpointParametersWithRequestBuilder(number: number, double: double, patternWithoutDelimiter: patternWithoutDelimiter, byte: byte, integer: integer, int32: int32, int64: int64, float: float, string: string, binary: binary, date: date, dateTime: dateTime, password: password, callback: callback).execute { (_, error) -> Void in - if error == nil { - completion((), error) - } else { - completion(nil, error) - } - } - } - - /** - Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - - POST /fake - - Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - - BASIC: - - type: http - - name: http_basic_test - - parameter number: (form) None - - parameter double: (form) None - - parameter patternWithoutDelimiter: (form) None - - parameter byte: (form) None - - parameter integer: (form) None (optional) - - parameter int32: (form) None (optional) - - parameter int64: (form) None (optional) - - parameter float: (form) None (optional) - - parameter string: (form) None (optional) - - parameter binary: (form) None (optional) - - parameter date: (form) None (optional) - - parameter dateTime: (form) None (optional) - - parameter password: (form) None (optional) - - parameter callback: (form) None (optional) - - returns: RequestBuilder - */ - open class func testEndpointParametersWithRequestBuilder(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil) -> RequestBuilder { - let path = "/fake" - let URLString = PetstoreClientAPI.basePath + path - let formParams: [String: Any?] = [ - "integer": integer?.encodeToJSON(), - "int32": int32?.encodeToJSON(), - "int64": int64?.encodeToJSON(), - "number": number.encodeToJSON(), - "float": float?.encodeToJSON(), - "double": double.encodeToJSON(), - "string": string?.encodeToJSON(), - "pattern_without_delimiter": patternWithoutDelimiter.encodeToJSON(), - "byte": byte.encodeToJSON(), - "binary": binary?.encodeToJSON(), - "date": date?.encodeToJSON(), - "dateTime": dateTime?.encodeToJSON(), - "password": password?.encodeToJSON(), - "callback": callback?.encodeToJSON() - ] - - let nonNullParameters = APIHelper.rejectNil(formParams) - let parameters = APIHelper.convertBoolToString(nonNullParameters) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } - - /** - * enum for parameter enumHeaderStringArray - */ - public enum EnumHeaderStringArray_testEnumParameters: String { - case greaterThan = ">" - case dollar = "$" - } - - /** - * enum for parameter enumHeaderString - */ - public enum EnumHeaderString_testEnumParameters: String { - case abc = "_abc" - case efg = "-efg" - case xyz = "(xyz)" - } - - /** - * enum for parameter enumQueryStringArray - */ - public enum EnumQueryStringArray_testEnumParameters: String { - case greaterThan = ">" - case dollar = "$" - } - - /** - * enum for parameter enumQueryString - */ - public enum EnumQueryString_testEnumParameters: String { - case abc = "_abc" - case efg = "-efg" - case xyz = "(xyz)" - } - - /** - * enum for parameter enumQueryInteger - */ - public enum EnumQueryInteger_testEnumParameters: Int { - case _1 = 1 - case number2 = -2 - } - - /** - * enum for parameter enumQueryDouble - */ - public enum EnumQueryDouble_testEnumParameters: Double { - case _11 = 1.1 - case number12 = -1.2 - } - - /** - * enum for parameter enumFormStringArray - */ - public enum EnumFormStringArray_testEnumParameters: String { - case greaterThan = ">" - case dollar = "$" - } - - /** - * enum for parameter enumFormString - */ - public enum EnumFormString_testEnumParameters: String { - case abc = "_abc" - case efg = "-efg" - case xyz = "(xyz)" - } - - /** - To test enum parameters - - - parameter enumHeaderStringArray: (header) Header parameter enum test (string array) (optional) - - parameter enumHeaderString: (header) Header parameter enum test (string) (optional, default to .efg) - - parameter enumQueryStringArray: (query) Query parameter enum test (string array) (optional) - - parameter enumQueryString: (query) Query parameter enum test (string) (optional, default to .efg) - - parameter enumQueryInteger: (query) Query parameter enum test (double) (optional) - - parameter enumQueryDouble: (query) Query parameter enum test (double) (optional) - - parameter enumFormStringArray: (form) Form parameter enum test (string array) (optional, default to .dollar) - - parameter enumFormString: (form) Form parameter enum test (string) (optional, default to .efg) - - parameter completion: completion handler to receive the data and the error objects - */ - open class func testEnumParameters(enumHeaderStringArray: [String]? = nil, enumHeaderString: EnumHeaderString_testEnumParameters? = nil, enumQueryStringArray: [String]? = nil, enumQueryString: EnumQueryString_testEnumParameters? = nil, enumQueryInteger: EnumQueryInteger_testEnumParameters? = nil, enumQueryDouble: EnumQueryDouble_testEnumParameters? = nil, enumFormStringArray: [String]? = nil, enumFormString: EnumFormString_testEnumParameters? = nil, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - testEnumParametersWithRequestBuilder(enumHeaderStringArray: enumHeaderStringArray, enumHeaderString: enumHeaderString, enumQueryStringArray: enumQueryStringArray, enumQueryString: enumQueryString, enumQueryInteger: enumQueryInteger, enumQueryDouble: enumQueryDouble, enumFormStringArray: enumFormStringArray, enumFormString: enumFormString).execute { (_, error) -> Void in - if error == nil { - completion((), error) - } else { - completion(nil, error) - } - } - } - - /** - To test enum parameters - - GET /fake - - To test enum parameters - - parameter enumHeaderStringArray: (header) Header parameter enum test (string array) (optional) - - parameter enumHeaderString: (header) Header parameter enum test (string) (optional, default to .efg) - - parameter enumQueryStringArray: (query) Query parameter enum test (string array) (optional) - - parameter enumQueryString: (query) Query parameter enum test (string) (optional, default to .efg) - - parameter enumQueryInteger: (query) Query parameter enum test (double) (optional) - - parameter enumQueryDouble: (query) Query parameter enum test (double) (optional) - - parameter enumFormStringArray: (form) Form parameter enum test (string array) (optional, default to .dollar) - - parameter enumFormString: (form) Form parameter enum test (string) (optional, default to .efg) - - returns: RequestBuilder - */ - open class func testEnumParametersWithRequestBuilder(enumHeaderStringArray: [String]? = nil, enumHeaderString: EnumHeaderString_testEnumParameters? = nil, enumQueryStringArray: [String]? = nil, enumQueryString: EnumQueryString_testEnumParameters? = nil, enumQueryInteger: EnumQueryInteger_testEnumParameters? = nil, enumQueryDouble: EnumQueryDouble_testEnumParameters? = nil, enumFormStringArray: [String]? = nil, enumFormString: EnumFormString_testEnumParameters? = nil) -> RequestBuilder { - let path = "/fake" - let URLString = PetstoreClientAPI.basePath + path - let formParams: [String: Any?] = [ - "enum_form_string_array": enumFormStringArray?.encodeToJSON(), - "enum_form_string": enumFormString?.encodeToJSON() - ] - - let nonNullParameters = APIHelper.rejectNil(formParams) - let parameters = APIHelper.convertBoolToString(nonNullParameters) - - var url = URLComponents(string: URLString) - url?.queryItems = APIHelper.mapValuesToQueryItems([ - "enum_query_string_array": enumQueryStringArray?.encodeToJSON(), - "enum_query_string": enumQueryString?.encodeToJSON(), - "enum_query_integer": enumQueryInteger?.encodeToJSON(), - "enum_query_double": enumQueryDouble?.encodeToJSON() - ]) - let nillableHeaders: [String: Any?] = [ - "enum_header_string_array": enumHeaderStringArray?.encodeToJSON(), - "enum_header_string": enumHeaderString?.encodeToJSON() - ] - let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false, headers: headerParameters) - } - - /** - Fake endpoint to test group parameters (optional) - - - parameter requiredStringGroup: (query) Required String in group parameters - - parameter requiredBooleanGroup: (header) Required Boolean in group parameters - - parameter requiredInt64Group: (query) Required Integer in group parameters - - parameter stringGroup: (query) String in group parameters (optional) - - parameter booleanGroup: (header) Boolean in group parameters (optional) - - parameter int64Group: (query) Integer in group parameters (optional) - - parameter completion: completion handler to receive the data and the error objects - */ - open class func testGroupParameters(requiredStringGroup: Int, requiredBooleanGroup: Bool, requiredInt64Group: Int64, stringGroup: Int? = nil, booleanGroup: Bool? = nil, int64Group: Int64? = nil, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - testGroupParametersWithRequestBuilder(requiredStringGroup: requiredStringGroup, requiredBooleanGroup: requiredBooleanGroup, requiredInt64Group: requiredInt64Group, stringGroup: stringGroup, booleanGroup: booleanGroup, int64Group: int64Group).execute { (_, error) -> Void in - if error == nil { - completion((), error) - } else { - completion(nil, error) - } - } - } - - /** - Fake endpoint to test group parameters (optional) - - DELETE /fake - - Fake endpoint to test group parameters (optional) - - parameter requiredStringGroup: (query) Required String in group parameters - - parameter requiredBooleanGroup: (header) Required Boolean in group parameters - - parameter requiredInt64Group: (query) Required Integer in group parameters - - parameter stringGroup: (query) String in group parameters (optional) - - parameter booleanGroup: (header) Boolean in group parameters (optional) - - parameter int64Group: (query) Integer in group parameters (optional) - - returns: RequestBuilder - */ - open class func testGroupParametersWithRequestBuilder(requiredStringGroup: Int, requiredBooleanGroup: Bool, requiredInt64Group: Int64, stringGroup: Int? = nil, booleanGroup: Bool? = nil, int64Group: Int64? = nil) -> RequestBuilder { - let path = "/fake" - let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - - var url = URLComponents(string: URLString) - url?.queryItems = APIHelper.mapValuesToQueryItems([ - "required_string_group": requiredStringGroup.encodeToJSON(), - "required_int64_group": requiredInt64Group.encodeToJSON(), - "string_group": stringGroup?.encodeToJSON(), - "int64_group": int64Group?.encodeToJSON() - ]) - let nillableHeaders: [String: Any?] = [ - "required_boolean_group": requiredBooleanGroup.encodeToJSON(), - "boolean_group": booleanGroup?.encodeToJSON() - ] - let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false, headers: headerParameters) - } - - /** - test inline additionalProperties - - - parameter param: (body) request body - - parameter completion: completion handler to receive the data and the error objects - */ - open class func testInlineAdditionalProperties(param: [String: String], completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - testInlineAdditionalPropertiesWithRequestBuilder(param: param).execute { (_, error) -> Void in - if error == nil { - completion((), error) - } else { - completion(nil, error) - } - } - } - - /** - test inline additionalProperties - - POST /fake/inline-additionalProperties - - parameter param: (body) request body - - returns: RequestBuilder - */ - open class func testInlineAdditionalPropertiesWithRequestBuilder(param: [String: String]) -> RequestBuilder { - let path = "/fake/inline-additionalProperties" - let URLString = PetstoreClientAPI.basePath + path - let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: param) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) - } - - /** - test json serialization of form data - - - parameter param: (form) field1 - - parameter param2: (form) field2 - - parameter completion: completion handler to receive the data and the error objects - */ - open class func testJsonFormData(param: String, param2: String, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - testJsonFormDataWithRequestBuilder(param: param, param2: param2).execute { (_, error) -> Void in - if error == nil { - completion((), error) - } else { - completion(nil, error) - } - } - } - - /** - test json serialization of form data - - GET /fake/jsonFormData - - parameter param: (form) field1 - - parameter param2: (form) field2 - - returns: RequestBuilder - */ - open class func testJsonFormDataWithRequestBuilder(param: String, param2: String) -> RequestBuilder { - let path = "/fake/jsonFormData" - let URLString = PetstoreClientAPI.basePath + path - let formParams: [String: Any?] = [ - "param": param.encodeToJSON(), - "param2": param2.encodeToJSON() - ] - - let nonNullParameters = APIHelper.rejectNil(formParams) - let parameters = APIHelper.convertBoolToString(nonNullParameters) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } - -} diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift deleted file mode 100644 index ba8571a22f9d..000000000000 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift +++ /dev/null @@ -1,45 +0,0 @@ -// -// FakeClassnameTags123API.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -@objc open class FakeClassnameTags123API: NSObject { - /** - To test class name in snake case - - - parameter body: (body) client model - - parameter completion: completion handler to receive the data and the error objects - */ - open class func testClassname(body: Client, completion: @escaping ((_ data: Client?, _ error: Error?) -> Void)) { - testClassnameWithRequestBuilder(body: body).execute { (response, error) -> Void in - completion(response?.body, error) - } - } - - /** - To test class name in snake case - - PATCH /fake_classname_test - - To test class name in snake case - - API Key: - - type: apiKey api_key_query (QUERY) - - name: api_key_query - - parameter body: (body) client model - - returns: RequestBuilder - */ - open class func testClassnameWithRequestBuilder(body: Client) -> RequestBuilder { - let path = "/fake_classname_test" - let URLString = PetstoreClientAPI.basePath + path - let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "PATCH", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) - } - -} diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift deleted file mode 100644 index 25c4dfc14918..000000000000 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift +++ /dev/null @@ -1,393 +0,0 @@ -// -// PetAPI.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -@objc open class PetAPI: NSObject { - /** - Add a new pet to the store - - - parameter body: (body) Pet object that needs to be added to the store - - parameter completion: completion handler to receive the data and the error objects - */ - open class func addPet(body: Pet, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - addPetWithRequestBuilder(body: body).execute { (_, error) -> Void in - if error == nil { - completion((), error) - } else { - completion(nil, error) - } - } - } - - /** - Add a new pet to the store - - POST /pet - - OAuth: - - type: oauth2 - - name: petstore_auth - - parameter body: (body) Pet object that needs to be added to the store - - returns: RequestBuilder - */ - open class func addPetWithRequestBuilder(body: Pet) -> RequestBuilder { - let path = "/pet" - let URLString = PetstoreClientAPI.basePath + path - let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) - } - - /** - Deletes a pet - - - parameter petId: (path) Pet id to delete - - parameter apiKey: (header) (optional) - - parameter completion: completion handler to receive the data and the error objects - */ - open class func deletePet(petId: Int64, apiKey: String? = nil, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - deletePetWithRequestBuilder(petId: petId, apiKey: apiKey).execute { (_, error) -> Void in - if error == nil { - completion((), error) - } else { - completion(nil, error) - } - } - } - - /** - Deletes a pet - - DELETE /pet/{petId} - - OAuth: - - type: oauth2 - - name: petstore_auth - - parameter petId: (path) Pet id to delete - - parameter apiKey: (header) (optional) - - returns: RequestBuilder - */ - open class func deletePetWithRequestBuilder(petId: Int64, apiKey: String? = nil) -> RequestBuilder { - var path = "/pet/{petId}" - let petIdPreEscape = "\(APIHelper.mapValueToPathItem(petId))" - let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{petId}", with: petIdPostEscape, options: .literal, range: nil) - let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - - let url = URLComponents(string: URLString) - let nillableHeaders: [String: Any?] = [ - "api_key": apiKey?.encodeToJSON() - ] - let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false, headers: headerParameters) - } - - /** - * enum for parameter status - */ - public enum Status_findPetsByStatus: String { - case available = "available" - case pending = "pending" - case sold = "sold" - } - - /** - Finds Pets by status - - - parameter status: (query) Status values that need to be considered for filter - - parameter completion: completion handler to receive the data and the error objects - */ - open class func findPetsByStatus(status: [String], completion: @escaping ((_ data: [Pet]?, _ error: Error?) -> Void)) { - findPetsByStatusWithRequestBuilder(status: status).execute { (response, error) -> Void in - completion(response?.body, error) - } - } - - /** - Finds Pets by status - - GET /pet/findByStatus - - Multiple status values can be provided with comma separated strings - - OAuth: - - type: oauth2 - - name: petstore_auth - - parameter status: (query) Status values that need to be considered for filter - - returns: RequestBuilder<[Pet]> - */ - open class func findPetsByStatusWithRequestBuilder(status: [String]) -> RequestBuilder<[Pet]> { - let path = "/pet/findByStatus" - let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - - var url = URLComponents(string: URLString) - url?.queryItems = APIHelper.mapValuesToQueryItems([ - "status": status.encodeToJSON() - ]) - - let requestBuilder: RequestBuilder<[Pet]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } - - /** - Finds Pets by tags - - - parameter tags: (query) Tags to filter by - - parameter completion: completion handler to receive the data and the error objects - */ - open class func findPetsByTags(tags: [String], completion: @escaping ((_ data: [Pet]?, _ error: Error?) -> Void)) { - findPetsByTagsWithRequestBuilder(tags: tags).execute { (response, error) -> Void in - completion(response?.body, error) - } - } - - /** - Finds Pets by tags - - GET /pet/findByTags - - Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. - - OAuth: - - type: oauth2 - - name: petstore_auth - - parameter tags: (query) Tags to filter by - - returns: RequestBuilder<[Pet]> - */ - open class func findPetsByTagsWithRequestBuilder(tags: [String]) -> RequestBuilder<[Pet]> { - let path = "/pet/findByTags" - let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - - var url = URLComponents(string: URLString) - url?.queryItems = APIHelper.mapValuesToQueryItems([ - "tags": tags.encodeToJSON() - ]) - - let requestBuilder: RequestBuilder<[Pet]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } - - /** - Find pet by ID - - - parameter petId: (path) ID of pet to return - - parameter completion: completion handler to receive the data and the error objects - */ - open class func getPetById(petId: Int64, completion: @escaping ((_ data: Pet?, _ error: Error?) -> Void)) { - getPetByIdWithRequestBuilder(petId: petId).execute { (response, error) -> Void in - completion(response?.body, error) - } - } - - /** - Find pet by ID - - GET /pet/{petId} - - Returns a single pet - - API Key: - - type: apiKey api_key - - name: api_key - - parameter petId: (path) ID of pet to return - - returns: RequestBuilder - */ - open class func getPetByIdWithRequestBuilder(petId: Int64) -> RequestBuilder { - var path = "/pet/{petId}" - let petIdPreEscape = "\(APIHelper.mapValueToPathItem(petId))" - let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{petId}", with: petIdPostEscape, options: .literal, range: nil) - let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } - - /** - Update an existing pet - - - parameter body: (body) Pet object that needs to be added to the store - - parameter completion: completion handler to receive the data and the error objects - */ - open class func updatePet(body: Pet, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - updatePetWithRequestBuilder(body: body).execute { (_, error) -> Void in - if error == nil { - completion((), error) - } else { - completion(nil, error) - } - } - } - - /** - Update an existing pet - - PUT /pet - - OAuth: - - type: oauth2 - - name: petstore_auth - - parameter body: (body) Pet object that needs to be added to the store - - returns: RequestBuilder - */ - open class func updatePetWithRequestBuilder(body: Pet) -> RequestBuilder { - let path = "/pet" - let URLString = PetstoreClientAPI.basePath + path - let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) - } - - /** - Updates a pet in the store with form data - - - parameter petId: (path) ID of pet that needs to be updated - - parameter name: (form) Updated name of the pet (optional) - - parameter status: (form) Updated status of the pet (optional) - - parameter completion: completion handler to receive the data and the error objects - */ - open class func updatePetWithForm(petId: Int64, name: String? = nil, status: String? = nil, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - updatePetWithFormWithRequestBuilder(petId: petId, name: name, status: status).execute { (_, error) -> Void in - if error == nil { - completion((), error) - } else { - completion(nil, error) - } - } - } - - /** - Updates a pet in the store with form data - - POST /pet/{petId} - - OAuth: - - type: oauth2 - - name: petstore_auth - - parameter petId: (path) ID of pet that needs to be updated - - parameter name: (form) Updated name of the pet (optional) - - parameter status: (form) Updated status of the pet (optional) - - returns: RequestBuilder - */ - open class func updatePetWithFormWithRequestBuilder(petId: Int64, name: String? = nil, status: String? = nil) -> RequestBuilder { - var path = "/pet/{petId}" - let petIdPreEscape = "\(APIHelper.mapValueToPathItem(petId))" - let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{petId}", with: petIdPostEscape, options: .literal, range: nil) - let URLString = PetstoreClientAPI.basePath + path - let formParams: [String: Any?] = [ - "name": name?.encodeToJSON(), - "status": status?.encodeToJSON() - ] - - let nonNullParameters = APIHelper.rejectNil(formParams) - let parameters = APIHelper.convertBoolToString(nonNullParameters) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } - - /** - uploads an image - - - parameter petId: (path) ID of pet to update - - parameter additionalMetadata: (form) Additional data to pass to server (optional) - - parameter file: (form) file to upload (optional) - - parameter completion: completion handler to receive the data and the error objects - */ - open class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil, completion: @escaping ((_ data: ApiResponse?, _ error: Error?) -> Void)) { - uploadFileWithRequestBuilder(petId: petId, additionalMetadata: additionalMetadata, file: file).execute { (response, error) -> Void in - completion(response?.body, error) - } - } - - /** - uploads an image - - POST /pet/{petId}/uploadImage - - OAuth: - - type: oauth2 - - name: petstore_auth - - parameter petId: (path) ID of pet to update - - parameter additionalMetadata: (form) Additional data to pass to server (optional) - - parameter file: (form) file to upload (optional) - - returns: RequestBuilder - */ - open class func uploadFileWithRequestBuilder(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil) -> RequestBuilder { - var path = "/pet/{petId}/uploadImage" - let petIdPreEscape = "\(APIHelper.mapValueToPathItem(petId))" - let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{petId}", with: petIdPostEscape, options: .literal, range: nil) - let URLString = PetstoreClientAPI.basePath + path - let formParams: [String: Any?] = [ - "additionalMetadata": additionalMetadata?.encodeToJSON(), - "file": file?.encodeToJSON() - ] - - let nonNullParameters = APIHelper.rejectNil(formParams) - let parameters = APIHelper.convertBoolToString(nonNullParameters) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } - - /** - uploads an image (required) - - - parameter petId: (path) ID of pet to update - - parameter requiredFile: (form) file to upload - - parameter additionalMetadata: (form) Additional data to pass to server (optional) - - parameter completion: completion handler to receive the data and the error objects - */ - open class func uploadFileWithRequiredFile(petId: Int64, requiredFile: URL, additionalMetadata: String? = nil, completion: @escaping ((_ data: ApiResponse?, _ error: Error?) -> Void)) { - uploadFileWithRequiredFileWithRequestBuilder(petId: petId, requiredFile: requiredFile, additionalMetadata: additionalMetadata).execute { (response, error) -> Void in - completion(response?.body, error) - } - } - - /** - uploads an image (required) - - POST /fake/{petId}/uploadImageWithRequiredFile - - OAuth: - - type: oauth2 - - name: petstore_auth - - parameter petId: (path) ID of pet to update - - parameter requiredFile: (form) file to upload - - parameter additionalMetadata: (form) Additional data to pass to server (optional) - - returns: RequestBuilder - */ - open class func uploadFileWithRequiredFileWithRequestBuilder(petId: Int64, requiredFile: URL, additionalMetadata: String? = nil) -> RequestBuilder { - var path = "/fake/{petId}/uploadImageWithRequiredFile" - let petIdPreEscape = "\(APIHelper.mapValueToPathItem(petId))" - let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{petId}", with: petIdPostEscape, options: .literal, range: nil) - let URLString = PetstoreClientAPI.basePath + path - let formParams: [String: Any?] = [ - "additionalMetadata": additionalMetadata?.encodeToJSON(), - "requiredFile": requiredFile.encodeToJSON() - ] - - let nonNullParameters = APIHelper.rejectNil(formParams) - let parameters = APIHelper.convertBoolToString(nonNullParameters) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } - -} diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift deleted file mode 100644 index c2d0578f0a47..000000000000 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift +++ /dev/null @@ -1,145 +0,0 @@ -// -// StoreAPI.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -@objc open class StoreAPI: NSObject { - /** - Delete purchase order by ID - - - parameter orderId: (path) ID of the order that needs to be deleted - - parameter completion: completion handler to receive the data and the error objects - */ - open class func deleteOrder(orderId: String, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - deleteOrderWithRequestBuilder(orderId: orderId).execute { (_, error) -> Void in - if error == nil { - completion((), error) - } else { - completion(nil, error) - } - } - } - - /** - Delete purchase order by ID - - DELETE /store/order/{order_id} - - For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors - - parameter orderId: (path) ID of the order that needs to be deleted - - returns: RequestBuilder - */ - open class func deleteOrderWithRequestBuilder(orderId: String) -> RequestBuilder { - var path = "/store/order/{order_id}" - let orderIdPreEscape = "\(APIHelper.mapValueToPathItem(orderId))" - let orderIdPostEscape = orderIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{order_id}", with: orderIdPostEscape, options: .literal, range: nil) - let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } - - /** - Returns pet inventories by status - - - parameter completion: completion handler to receive the data and the error objects - */ - open class func getInventory(completion: @escaping ((_ data: [String: Int]?, _ error: Error?) -> Void)) { - getInventoryWithRequestBuilder().execute { (response, error) -> Void in - completion(response?.body, error) - } - } - - /** - Returns pet inventories by status - - GET /store/inventory - - Returns a map of status codes to quantities - - API Key: - - type: apiKey api_key - - name: api_key - - returns: RequestBuilder<[String:Int]> - */ - open class func getInventoryWithRequestBuilder() -> RequestBuilder<[String: Int]> { - let path = "/store/inventory" - let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder<[String: Int]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } - - /** - Find purchase order by ID - - - parameter orderId: (path) ID of pet that needs to be fetched - - parameter completion: completion handler to receive the data and the error objects - */ - open class func getOrderById(orderId: Int64, completion: @escaping ((_ data: Order?, _ error: Error?) -> Void)) { - getOrderByIdWithRequestBuilder(orderId: orderId).execute { (response, error) -> Void in - completion(response?.body, error) - } - } - - /** - Find purchase order by ID - - GET /store/order/{order_id} - - For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions - - parameter orderId: (path) ID of pet that needs to be fetched - - returns: RequestBuilder - */ - open class func getOrderByIdWithRequestBuilder(orderId: Int64) -> RequestBuilder { - var path = "/store/order/{order_id}" - let orderIdPreEscape = "\(APIHelper.mapValueToPathItem(orderId))" - let orderIdPostEscape = orderIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{order_id}", with: orderIdPostEscape, options: .literal, range: nil) - let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } - - /** - Place an order for a pet - - - parameter body: (body) order placed for purchasing the pet - - parameter completion: completion handler to receive the data and the error objects - */ - open class func placeOrder(body: Order, completion: @escaping ((_ data: Order?, _ error: Error?) -> Void)) { - placeOrderWithRequestBuilder(body: body).execute { (response, error) -> Void in - completion(response?.body, error) - } - } - - /** - Place an order for a pet - - POST /store/order - - parameter body: (body) order placed for purchasing the pet - - returns: RequestBuilder - */ - open class func placeOrderWithRequestBuilder(body: Order) -> RequestBuilder { - let path = "/store/order" - let URLString = PetstoreClientAPI.basePath + path - let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) - } - -} diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift deleted file mode 100644 index ad10a9334db6..000000000000 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift +++ /dev/null @@ -1,294 +0,0 @@ -// -// UserAPI.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -@objc open class UserAPI: NSObject { - /** - Create user - - - parameter body: (body) Created user object - - parameter completion: completion handler to receive the data and the error objects - */ - open class func createUser(body: User, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - createUserWithRequestBuilder(body: body).execute { (_, error) -> Void in - if error == nil { - completion((), error) - } else { - completion(nil, error) - } - } - } - - /** - Create user - - POST /user - - This can only be done by the logged in user. - - parameter body: (body) Created user object - - returns: RequestBuilder - */ - open class func createUserWithRequestBuilder(body: User) -> RequestBuilder { - let path = "/user" - let URLString = PetstoreClientAPI.basePath + path - let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) - } - - /** - Creates list of users with given input array - - - parameter body: (body) List of user object - - parameter completion: completion handler to receive the data and the error objects - */ - open class func createUsersWithArrayInput(body: [User], completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - createUsersWithArrayInputWithRequestBuilder(body: body).execute { (_, error) -> Void in - if error == nil { - completion((), error) - } else { - completion(nil, error) - } - } - } - - /** - Creates list of users with given input array - - POST /user/createWithArray - - parameter body: (body) List of user object - - returns: RequestBuilder - */ - open class func createUsersWithArrayInputWithRequestBuilder(body: [User]) -> RequestBuilder { - let path = "/user/createWithArray" - let URLString = PetstoreClientAPI.basePath + path - let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) - } - - /** - Creates list of users with given input array - - - parameter body: (body) List of user object - - parameter completion: completion handler to receive the data and the error objects - */ - open class func createUsersWithListInput(body: [User], completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - createUsersWithListInputWithRequestBuilder(body: body).execute { (_, error) -> Void in - if error == nil { - completion((), error) - } else { - completion(nil, error) - } - } - } - - /** - Creates list of users with given input array - - POST /user/createWithList - - parameter body: (body) List of user object - - returns: RequestBuilder - */ - open class func createUsersWithListInputWithRequestBuilder(body: [User]) -> RequestBuilder { - let path = "/user/createWithList" - let URLString = PetstoreClientAPI.basePath + path - let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) - } - - /** - Delete user - - - parameter username: (path) The name that needs to be deleted - - parameter completion: completion handler to receive the data and the error objects - */ - open class func deleteUser(username: String, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - deleteUserWithRequestBuilder(username: username).execute { (_, error) -> Void in - if error == nil { - completion((), error) - } else { - completion(nil, error) - } - } - } - - /** - Delete user - - DELETE /user/{username} - - This can only be done by the logged in user. - - parameter username: (path) The name that needs to be deleted - - returns: RequestBuilder - */ - open class func deleteUserWithRequestBuilder(username: String) -> RequestBuilder { - var path = "/user/{username}" - let usernamePreEscape = "\(APIHelper.mapValueToPathItem(username))" - let usernamePostEscape = usernamePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{username}", with: usernamePostEscape, options: .literal, range: nil) - let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } - - /** - Get user by user name - - - parameter username: (path) The name that needs to be fetched. Use user1 for testing. - - parameter completion: completion handler to receive the data and the error objects - */ - open class func getUserByName(username: String, completion: @escaping ((_ data: User?, _ error: Error?) -> Void)) { - getUserByNameWithRequestBuilder(username: username).execute { (response, error) -> Void in - completion(response?.body, error) - } - } - - /** - Get user by user name - - GET /user/{username} - - parameter username: (path) The name that needs to be fetched. Use user1 for testing. - - returns: RequestBuilder - */ - open class func getUserByNameWithRequestBuilder(username: String) -> RequestBuilder { - var path = "/user/{username}" - let usernamePreEscape = "\(APIHelper.mapValueToPathItem(username))" - let usernamePostEscape = usernamePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{username}", with: usernamePostEscape, options: .literal, range: nil) - let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } - - /** - Logs user into the system - - - parameter username: (query) The user name for login - - parameter password: (query) The password for login in clear text - - parameter completion: completion handler to receive the data and the error objects - */ - open class func loginUser(username: String, password: String, completion: @escaping ((_ data: String?, _ error: Error?) -> Void)) { - loginUserWithRequestBuilder(username: username, password: password).execute { (response, error) -> Void in - completion(response?.body, error) - } - } - - /** - Logs user into the system - - GET /user/login - - responseHeaders: [X-Rate-Limit(Int), X-Expires-After(Date)] - - parameter username: (query) The user name for login - - parameter password: (query) The password for login in clear text - - returns: RequestBuilder - */ - open class func loginUserWithRequestBuilder(username: String, password: String) -> RequestBuilder { - let path = "/user/login" - let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - - var url = URLComponents(string: URLString) - url?.queryItems = APIHelper.mapValuesToQueryItems([ - "username": username.encodeToJSON(), - "password": password.encodeToJSON() - ]) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } - - /** - Logs out current logged in user session - - - parameter completion: completion handler to receive the data and the error objects - */ - open class func logoutUser(completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - logoutUserWithRequestBuilder().execute { (_, error) -> Void in - if error == nil { - completion((), error) - } else { - completion(nil, error) - } - } - } - - /** - Logs out current logged in user session - - GET /user/logout - - returns: RequestBuilder - */ - open class func logoutUserWithRequestBuilder() -> RequestBuilder { - let path = "/user/logout" - let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } - - /** - Updated user - - - parameter username: (path) name that need to be deleted - - parameter body: (body) Updated user object - - parameter completion: completion handler to receive the data and the error objects - */ - open class func updateUser(username: String, body: User, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - updateUserWithRequestBuilder(username: username, body: body).execute { (_, error) -> Void in - if error == nil { - completion((), error) - } else { - completion(nil, error) - } - } - } - - /** - Updated user - - PUT /user/{username} - - This can only be done by the logged in user. - - parameter username: (path) name that need to be deleted - - parameter body: (body) Updated user object - - returns: RequestBuilder - */ - open class func updateUserWithRequestBuilder(username: String, body: User) -> RequestBuilder { - var path = "/user/{username}" - let usernamePreEscape = "\(APIHelper.mapValueToPathItem(username))" - let usernamePostEscape = usernamePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{username}", with: usernamePostEscape, options: .literal, range: nil) - let URLString = PetstoreClientAPI.basePath + path - let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) - } - -} diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/AlamofireImplementations.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/AlamofireImplementations.swift deleted file mode 100644 index 1d54e695608b..000000000000 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/AlamofireImplementations.swift +++ /dev/null @@ -1,450 +0,0 @@ -// AlamofireImplementations.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -import Alamofire - -class AlamofireRequestBuilderFactory: RequestBuilderFactory { - func getNonDecodableBuilder() -> RequestBuilder.Type { - return AlamofireRequestBuilder.self - } - - func getBuilder() -> RequestBuilder.Type { - return AlamofireDecodableRequestBuilder.self - } -} - -private struct SynchronizedDictionary { - - private var dictionary = [K: V]() - private let queue = DispatchQueue( - label: "SynchronizedDictionary", - qos: DispatchQoS.userInitiated, - attributes: [DispatchQueue.Attributes.concurrent], - autoreleaseFrequency: DispatchQueue.AutoreleaseFrequency.inherit, - target: nil - ) - - public subscript(key: K) -> V? { - get { - var value: V? - - queue.sync { - value = self.dictionary[key] - } - - return value - } - set { - queue.sync(flags: DispatchWorkItemFlags.barrier) { - self.dictionary[key] = newValue - } - } - } - } - -// Store manager to retain its reference -private var managerStore = SynchronizedDictionary() - -open class AlamofireRequestBuilder: RequestBuilder { - required public init(method: String, URLString: String, parameters: [String: Any]?, isBody: Bool, headers: [String: String] = [:]) { - super.init(method: method, URLString: URLString, parameters: parameters, isBody: isBody, headers: headers) - } - - /** - May be overridden by a subclass if you want to control the session - configuration. - */ - open func createSessionManager() -> Alamofire.SessionManager { - let configuration = URLSessionConfiguration.default - configuration.httpAdditionalHeaders = buildHeaders() - return Alamofire.SessionManager(configuration: configuration) - } - - /** - May be overridden by a subclass if you want to custom request constructor. - */ - open func createURLRequest() -> URLRequest? { - let encoding: ParameterEncoding = isBody ? JSONDataEncoding() : URLEncoding() - guard let originalRequest = try? URLRequest(url: URLString, method: HTTPMethod(rawValue: method)!, headers: buildHeaders()) else { return nil } - return try? encoding.encode(originalRequest, with: parameters) - } - - /** - May be overridden by a subclass if you want to control the Content-Type - that is given to an uploaded form part. - - Return nil to use the default behavior (inferring the Content-Type from - the file extension). Return the desired Content-Type otherwise. - */ - open func contentTypeForFormPart(fileURL: URL) -> String? { - return nil - } - - /** - May be overridden by a subclass if you want to control the request - configuration (e.g. to override the cache policy). - */ - open func makeRequest(manager: SessionManager, method: HTTPMethod, encoding: ParameterEncoding, headers: [String: String]) -> DataRequest { - return manager.request(URLString, method: method, parameters: parameters, encoding: encoding, headers: headers) - } - - override open func execute(_ completion: @escaping (_ response: Response?, _ error: Error?) -> Void) { - let managerId: String = UUID().uuidString - // Create a new manager for each request to customize its request header - let manager = createSessionManager() - managerStore[managerId] = manager - - let encoding: ParameterEncoding = isBody ? JSONDataEncoding() : URLEncoding() - - let xMethod = Alamofire.HTTPMethod(rawValue: method) - let fileKeys = parameters == nil ? [] : parameters!.filter { $1 is NSURL } - .map { $0.0 } - - if fileKeys.count > 0 { - manager.upload(multipartFormData: { mpForm in - for (k, v) in self.parameters! { - switch v { - case let fileURL as URL: - if let mimeType = self.contentTypeForFormPart(fileURL: fileURL) { - mpForm.append(fileURL, withName: k, fileName: fileURL.lastPathComponent, mimeType: mimeType) - } else { - mpForm.append(fileURL, withName: k) - } - case let string as String: - mpForm.append(string.data(using: String.Encoding.utf8)!, withName: k) - case let number as NSNumber: - mpForm.append(number.stringValue.data(using: String.Encoding.utf8)!, withName: k) - default: - fatalError("Unprocessable value \(v) with key \(k)") - } - } - }, to: URLString, method: xMethod!, headers: nil, encodingCompletion: { encodingResult in - switch encodingResult { - case .success(let upload, _, _): - if let onProgressReady = self.onProgressReady { - onProgressReady(upload.uploadProgress) - } - self.processRequest(request: upload, managerId, completion) - case .failure(let encodingError): - completion(nil, ErrorResponse.error(415, nil, encodingError)) - } - }) - } else { - let request = makeRequest(manager: manager, method: xMethod!, encoding: encoding, headers: headers) - if let onProgressReady = self.onProgressReady { - onProgressReady(request.progress) - } - processRequest(request: request, managerId, completion) - } - - } - - fileprivate func processRequest(request: DataRequest, _ managerId: String, _ completion: @escaping (_ response: Response?, _ error: Error?) -> Void) { - if let credential = self.credential { - request.authenticate(usingCredential: credential) - } - - let cleanupRequest = { - managerStore[managerId] = nil - } - - let validatedRequest = request.validate() - - switch T.self { - case is String.Type: - validatedRequest.responseString(queue: PetstoreClientAPI.apiResponseQueue, completionHandler: { (stringResponse) in - cleanupRequest() - - if stringResponse.result.isFailure { - completion( - nil, - ErrorResponse.error(stringResponse.response?.statusCode ?? 500, stringResponse.data, stringResponse.result.error!) - ) - return - } - - completion( - Response( - response: stringResponse.response!, - body: ((stringResponse.result.value ?? "") as! T) - ), - nil - ) - }) - case is URL.Type: - validatedRequest.responseData(queue: PetstoreClientAPI.apiResponseQueue, completionHandler: { (dataResponse) in - cleanupRequest() - - do { - - guard !dataResponse.result.isFailure else { - throw DownloadException.responseFailed - } - - guard let data = dataResponse.data else { - throw DownloadException.responseDataMissing - } - - guard let request = request.request else { - throw DownloadException.requestMissing - } - - let fileManager = FileManager.default - let urlRequest = try request.asURLRequest() - let documentsDirectory = fileManager.urls(for: .documentDirectory, in: .userDomainMask)[0] - let requestURL = try self.getURL(from: urlRequest) - - var requestPath = try self.getPath(from: requestURL) - - if let headerFileName = self.getFileName(fromContentDisposition: dataResponse.response?.allHeaderFields["Content-Disposition"] as? String) { - requestPath = requestPath.appending("/\(headerFileName)") - } - - let filePath = documentsDirectory.appendingPathComponent(requestPath) - let directoryPath = filePath.deletingLastPathComponent().path - - try fileManager.createDirectory(atPath: directoryPath, withIntermediateDirectories: true, attributes: nil) - try data.write(to: filePath, options: .atomic) - - completion( - Response( - response: dataResponse.response!, - body: (filePath as! T) - ), - nil - ) - - } catch let requestParserError as DownloadException { - completion(nil, ErrorResponse.error(400, dataResponse.data, requestParserError)) - } catch let error { - completion(nil, ErrorResponse.error(400, dataResponse.data, error)) - } - return - }) - case is Void.Type: - validatedRequest.responseData(queue: PetstoreClientAPI.apiResponseQueue, completionHandler: { (voidResponse) in - cleanupRequest() - - if voidResponse.result.isFailure { - completion( - nil, - ErrorResponse.error(voidResponse.response?.statusCode ?? 500, voidResponse.data, voidResponse.result.error!) - ) - return - } - - completion( - Response( - response: voidResponse.response!, - body: nil), - nil - ) - }) - default: - validatedRequest.responseData(queue: PetstoreClientAPI.apiResponseQueue, completionHandler: { (dataResponse) in - cleanupRequest() - - if dataResponse.result.isFailure { - completion( - nil, - ErrorResponse.error(dataResponse.response?.statusCode ?? 500, dataResponse.data, dataResponse.result.error!) - ) - return - } - - completion( - Response( - response: dataResponse.response!, - body: (dataResponse.data as! T) - ), - nil - ) - }) - } - } - - open func buildHeaders() -> [String: String] { - var httpHeaders = SessionManager.defaultHTTPHeaders - for (key, value) in self.headers { - httpHeaders[key] = value - } - return httpHeaders - } - - fileprivate func getFileName(fromContentDisposition contentDisposition: String?) -> String? { - - guard let contentDisposition = contentDisposition else { - return nil - } - - let items = contentDisposition.components(separatedBy: ";") - - var filename: String? - - for contentItem in items { - - let filenameKey = "filename=" - guard let range = contentItem.range(of: filenameKey) else { - break - } - - filename = contentItem - return filename? - .replacingCharacters(in: range, with: "") - .replacingOccurrences(of: "\"", with: "") - .trimmingCharacters(in: .whitespacesAndNewlines) - } - - return filename - - } - - fileprivate func getPath(from url: URL) throws -> String { - - guard var path = URLComponents(url: url, resolvingAgainstBaseURL: true)?.path else { - throw DownloadException.requestMissingPath - } - - if path.hasPrefix("/") { - path.remove(at: path.startIndex) - } - - return path - - } - - fileprivate func getURL(from urlRequest: URLRequest) throws -> URL { - - guard let url = urlRequest.url else { - throw DownloadException.requestMissingURL - } - - return url - } - -} - -private enum DownloadException: Error { - case responseDataMissing - case responseFailed - case requestMissing - case requestMissingPath - case requestMissingURL -} - -public enum AlamofireDecodableRequestBuilderError: Error { - case emptyDataResponse - case nilHTTPResponse - case jsonDecoding(DecodingError) - case generalError(Error) -} - -open class AlamofireDecodableRequestBuilder: AlamofireRequestBuilder { - - override fileprivate func processRequest(request: DataRequest, _ managerId: String, _ completion: @escaping (_ response: Response?, _ error: Error?) -> Void) { - if let credential = self.credential { - request.authenticate(usingCredential: credential) - } - - let cleanupRequest = { - managerStore[managerId] = nil - } - - let validatedRequest = request.validate() - - switch T.self { - case is String.Type: - validatedRequest.responseString(queue: PetstoreClientAPI.apiResponseQueue, completionHandler: { (stringResponse) in - cleanupRequest() - - if stringResponse.result.isFailure { - completion( - nil, - ErrorResponse.error(stringResponse.response?.statusCode ?? 500, stringResponse.data, stringResponse.result.error!) - ) - return - } - - completion( - Response( - response: stringResponse.response!, - body: ((stringResponse.result.value ?? "") as! T) - ), - nil - ) - }) - case is Void.Type: - validatedRequest.responseData(queue: PetstoreClientAPI.apiResponseQueue, completionHandler: { (voidResponse) in - cleanupRequest() - - if voidResponse.result.isFailure { - completion( - nil, - ErrorResponse.error(voidResponse.response?.statusCode ?? 500, voidResponse.data, voidResponse.result.error!) - ) - return - } - - completion( - Response( - response: voidResponse.response!, - body: nil), - nil - ) - }) - case is Data.Type: - validatedRequest.responseData(queue: PetstoreClientAPI.apiResponseQueue, completionHandler: { (dataResponse) in - cleanupRequest() - - if dataResponse.result.isFailure { - completion( - nil, - ErrorResponse.error(dataResponse.response?.statusCode ?? 500, dataResponse.data, dataResponse.result.error!) - ) - return - } - - completion( - Response( - response: dataResponse.response!, - body: (dataResponse.data as! T) - ), - nil - ) - }) - default: - validatedRequest.responseData(queue: PetstoreClientAPI.apiResponseQueue, completionHandler: { (dataResponse: DataResponse) in - cleanupRequest() - - guard dataResponse.result.isSuccess else { - completion(nil, ErrorResponse.error(dataResponse.response?.statusCode ?? 500, dataResponse.data, dataResponse.result.error!)) - return - } - - guard let data = dataResponse.data, !data.isEmpty else { - completion(nil, ErrorResponse.error(-1, nil, AlamofireDecodableRequestBuilderError.emptyDataResponse)) - return - } - - guard let httpResponse = dataResponse.response else { - completion(nil, ErrorResponse.error(-2, nil, AlamofireDecodableRequestBuilderError.nilHTTPResponse)) - return - } - - var responseObj: Response? - - let decodeResult: (decodableObj: T?, error: Error?) = CodableHelper.decode(T.self, from: data) - if decodeResult.error == nil { - responseObj = Response(response: httpResponse, body: decodeResult.decodableObj) - } - - completion(responseObj, decodeResult.error) - }) - } - } - -} diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/CodableHelper.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/CodableHelper.swift deleted file mode 100644 index 27cf29c65600..000000000000 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/CodableHelper.swift +++ /dev/null @@ -1,75 +0,0 @@ -// -// CodableHelper.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public typealias EncodeResult = (data: Data?, error: Error?) - -open class CodableHelper { - - private static var customDateFormatter: DateFormatter? - private static var defaultDateFormatter: DateFormatter = { - let dateFormatter = DateFormatter() - dateFormatter.calendar = Calendar(identifier: .iso8601) - dateFormatter.locale = Locale(identifier: "en_US_POSIX") - dateFormatter.timeZone = TimeZone(secondsFromGMT: 0) - dateFormatter.dateFormat = Configuration.dateFormat - return dateFormatter - }() - private static var customJSONDecoder: JSONDecoder? - private static var defaultJSONDecoder: JSONDecoder = { - let decoder = JSONDecoder() - decoder.dateDecodingStrategy = .formatted(CodableHelper.dateFormatter) - return decoder - }() - private static var customJSONEncoder: JSONEncoder? - private static var defaultJSONEncoder: JSONEncoder = { - let encoder = JSONEncoder() - encoder.dateEncodingStrategy = .formatted(CodableHelper.dateFormatter) - encoder.outputFormatting = .prettyPrinted - return encoder - }() - - public static var dateFormatter: DateFormatter { - get { return self.customDateFormatter ?? self.defaultDateFormatter } - set { self.customDateFormatter = newValue } - } - public static var jsonDecoder: JSONDecoder { - get { return self.customJSONDecoder ?? self.defaultJSONDecoder } - set { self.customJSONDecoder = newValue } - } - public static var jsonEncoder: JSONEncoder { - get { return self.customJSONEncoder ?? self.defaultJSONEncoder } - set { self.customJSONEncoder = newValue } - } - - open class func decode(_ type: T.Type, from data: Data) -> (decodableObj: T?, error: Error?) where T: Decodable { - var returnedDecodable: T? - var returnedError: Error? - - do { - returnedDecodable = try self.jsonDecoder.decode(type, from: data) - } catch { - returnedError = error - } - - return (returnedDecodable, returnedError) - } - - open class func encode(_ value: T) -> EncodeResult where T: Encodable { - var returnedData: Data? - var returnedError: Error? - - do { - returnedData = try self.jsonEncoder.encode(value) - } catch { - returnedError = error - } - - return (returnedData, returnedError) - } -} diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Configuration.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Configuration.swift deleted file mode 100644 index e1ecb39726e7..000000000000 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Configuration.swift +++ /dev/null @@ -1,15 +0,0 @@ -// Configuration.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -open class Configuration { - - // This value is used to configure the date formatter that is used to serialize dates into JSON format. - // You must set it prior to encoding any dates, and it will only be read once. - public static var dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSZZZZZ" - -} diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Extensions.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Extensions.swift deleted file mode 100644 index 74fcfcf2ad49..000000000000 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Extensions.swift +++ /dev/null @@ -1,173 +0,0 @@ -// Extensions.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -extension Bool: JSONEncodable { - func encodeToJSON() -> Any { return self as Any } -} - -extension Float: JSONEncodable { - func encodeToJSON() -> Any { return self as Any } -} - -extension Int: JSONEncodable { - func encodeToJSON() -> Any { return self as Any } -} - -extension Int32: JSONEncodable { - func encodeToJSON() -> Any { return NSNumber(value: self as Int32) } -} - -extension Int64: JSONEncodable { - func encodeToJSON() -> Any { return NSNumber(value: self as Int64) } -} - -extension Double: JSONEncodable { - func encodeToJSON() -> Any { return self as Any } -} - -extension String: JSONEncodable { - func encodeToJSON() -> Any { return self as Any } -} - -extension RawRepresentable where RawValue: JSONEncodable { - func encodeToJSON() -> Any { return self.rawValue as Any } -} - -private func encodeIfPossible(_ object: T) -> Any { - if let encodableObject = object as? JSONEncodable { - return encodableObject.encodeToJSON() - } else { - return object as Any - } -} - -extension Array: JSONEncodable { - func encodeToJSON() -> Any { - return self.map(encodeIfPossible) - } -} - -extension Dictionary: JSONEncodable { - func encodeToJSON() -> Any { - var dictionary = [AnyHashable: Any]() - for (key, value) in self { - dictionary[key] = encodeIfPossible(value) - } - return dictionary as Any - } -} - -extension Data: JSONEncodable { - func encodeToJSON() -> Any { - return self.base64EncodedString(options: Data.Base64EncodingOptions()) - } -} - -extension Date: JSONEncodable { - func encodeToJSON() -> Any { - return CodableHelper.dateFormatter.string(from: self) as Any - } -} - -extension URL: JSONEncodable { - func encodeToJSON() -> Any { - return self - } -} - -extension UUID: JSONEncodable { - func encodeToJSON() -> Any { - return self.uuidString - } -} - -extension String: CodingKey { - - public var stringValue: String { - return self - } - - public init?(stringValue: String) { - self.init(stringLiteral: stringValue) - } - - public var intValue: Int? { - return nil - } - - public init?(intValue: Int) { - return nil - } - -} - -extension KeyedEncodingContainerProtocol { - - public mutating func encodeArray(_ values: [T], forKey key: Self.Key) throws where T: Encodable { - var arrayContainer = nestedUnkeyedContainer(forKey: key) - try arrayContainer.encode(contentsOf: values) - } - - public mutating func encodeArrayIfPresent(_ values: [T]?, forKey key: Self.Key) throws where T: Encodable { - if let values = values { - try encodeArray(values, forKey: key) - } - } - - public mutating func encodeMap(_ pairs: [Self.Key: T]) throws where T: Encodable { - for (key, value) in pairs { - try encode(value, forKey: key) - } - } - - public mutating func encodeMapIfPresent(_ pairs: [Self.Key: T]?) throws where T: Encodable { - if let pairs = pairs { - try encodeMap(pairs) - } - } - -} - -extension KeyedDecodingContainerProtocol { - - public func decodeArray(_ type: T.Type, forKey key: Self.Key) throws -> [T] where T: Decodable { - var tmpArray = [T]() - - var nestedContainer = try nestedUnkeyedContainer(forKey: key) - while !nestedContainer.isAtEnd { - let arrayValue = try nestedContainer.decode(T.self) - tmpArray.append(arrayValue) - } - - return tmpArray - } - - public func decodeArrayIfPresent(_ type: T.Type, forKey key: Self.Key) throws -> [T]? where T: Decodable { - var tmpArray: [T]? - - if contains(key) { - tmpArray = try decodeArray(T.self, forKey: key) - } - - return tmpArray - } - - public func decodeMap(_ type: T.Type, excludedKeys: Set) throws -> [Self.Key: T] where T: Decodable { - var map: [Self.Key: T] = [:] - - for key in allKeys { - if !excludedKeys.contains(key) { - let value = try decode(T.self, forKey: key) - map[key] = value - } - } - - return map - } - -} diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/JSONEncodableEncoding.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/JSONEncodableEncoding.swift deleted file mode 100644 index fb76bbed26f7..000000000000 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/JSONEncodableEncoding.swift +++ /dev/null @@ -1,54 +0,0 @@ -// -// JSONDataEncoding.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -import Alamofire - -public struct JSONDataEncoding: ParameterEncoding { - - // MARK: Properties - - private static let jsonDataKey = "jsonData" - - // MARK: Encoding - - /// Creates a URL request by encoding parameters and applying them onto an existing request. - /// - /// - parameter urlRequest: The request to have parameters applied. - /// - parameter parameters: The parameters to apply. This should have a single key/value - /// pair with "jsonData" as the key and a Data object as the value. - /// - /// - throws: An `Error` if the encoding process encounters an error. - /// - /// - returns: The encoded request. - public func encode(_ urlRequest: URLRequestConvertible, with parameters: Parameters?) throws -> URLRequest { - var urlRequest = try urlRequest.asURLRequest() - - guard let jsonData = parameters?[JSONDataEncoding.jsonDataKey] as? Data, !jsonData.isEmpty else { - return urlRequest - } - - if urlRequest.value(forHTTPHeaderField: "Content-Type") == nil { - urlRequest.setValue("application/json", forHTTPHeaderField: "Content-Type") - } - - urlRequest.httpBody = jsonData - - return urlRequest - } - - public static func encodingParameters(jsonData: Data?) -> Parameters? { - var returnedParams: Parameters? - if let jsonData = jsonData, !jsonData.isEmpty { - var params = Parameters() - params[jsonDataKey] = jsonData - returnedParams = params - } - return returnedParams - } - -} diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift deleted file mode 100644 index 827bdec87782..000000000000 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift +++ /dev/null @@ -1,43 +0,0 @@ -// -// JSONEncodingHelper.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -import Alamofire - -open class JSONEncodingHelper { - - open class func encodingParameters(forEncodableObject encodableObj: T?) -> Parameters? { - var params: Parameters? - - // Encode the Encodable object - if let encodableObj = encodableObj { - let encodeResult = CodableHelper.encode(encodableObj) - if encodeResult.error == nil { - params = JSONDataEncoding.encodingParameters(jsonData: encodeResult.data) - } - } - - return params - } - - open class func encodingParameters(forEncodableObject encodableObj: Any?) -> Parameters? { - var params: Parameters? - - if let encodableObj = encodableObj { - do { - let data = try JSONSerialization.data(withJSONObject: encodableObj, options: .prettyPrinted) - params = JSONDataEncoding.encodingParameters(jsonData: data) - } catch { - print(error) - return nil - } - } - - return params - } - -} diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models.swift deleted file mode 100644 index 25161165865e..000000000000 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models.swift +++ /dev/null @@ -1,36 +0,0 @@ -// Models.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -protocol JSONEncodable { - func encodeToJSON() -> Any -} - -public enum ErrorResponse: Error { - case error(Int, Data?, Error) -} - -open class Response { - public let statusCode: Int - public let header: [String: String] - public let body: T? - - public init(statusCode: Int, header: [String: String], body: T?) { - self.statusCode = statusCode - self.header = header - self.body = body - } - - public convenience init(response: HTTPURLResponse, body: T?) { - let rawHeader = response.allHeaderFields - var header = [String: String]() - for case let (key, value) as (String, String) in rawHeader { - header[key] = value - } - self.init(statusCode: response.statusCode, header: header, body: body) - } -} diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift deleted file mode 100644 index 25a2d8b46c03..000000000000 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift +++ /dev/null @@ -1,25 +0,0 @@ -// -// AdditionalPropertiesClass.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -@objc public class AdditionalPropertiesClass: NSObject, Codable { - - public var mapString: [String: String]? - public var mapMapString: [String: [String: String]]? - - public init(mapString: [String: String]?, mapMapString: [String: [String: String]]?) { - self.mapString = mapString - self.mapMapString = mapMapString - } - - public enum CodingKeys: String, CodingKey { - case mapString = "map_string" - case mapMapString = "map_map_string" - } - -} diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift deleted file mode 100644 index b63ebe3aad4d..000000000000 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift +++ /dev/null @@ -1,25 +0,0 @@ -// -// Animal.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -@objc public class Animal: NSObject, Codable { - - public var _className: String - public var color: String? = "red" - - public init(_className: String, color: String?) { - self._className = _className - self.color = color - } - - public enum CodingKeys: String, CodingKey { - case _className = "className" - case color - } - -} diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift deleted file mode 100644 index e09b0e9efdc8..000000000000 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift +++ /dev/null @@ -1,10 +0,0 @@ -// -// AnimalFarm.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public typealias AnimalFarm = [Animal] diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift deleted file mode 100644 index d0fcd4368854..000000000000 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift +++ /dev/null @@ -1,27 +0,0 @@ -// -// ApiResponse.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -@objc public class ApiResponse: NSObject, Codable { - - public var code: Int? - public var codeNum: NSNumber? { - get { - return code as NSNumber? - } - } - public var type: String? - public var message: String? - - public init(code: Int?, type: String?, message: String?) { - self.code = code - self.type = type - self.message = message - } - -} diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift deleted file mode 100644 index fddd1e8eb2e2..000000000000 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift +++ /dev/null @@ -1,22 +0,0 @@ -// -// ArrayOfArrayOfNumberOnly.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -@objc public class ArrayOfArrayOfNumberOnly: NSObject, Codable { - - public var arrayArrayNumber: [[Double]]? - - public init(arrayArrayNumber: [[Double]]?) { - self.arrayArrayNumber = arrayArrayNumber - } - - public enum CodingKeys: String, CodingKey { - case arrayArrayNumber = "ArrayArrayNumber" - } - -} diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift deleted file mode 100644 index 0a3450dd69f9..000000000000 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift +++ /dev/null @@ -1,22 +0,0 @@ -// -// ArrayOfNumberOnly.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -@objc public class ArrayOfNumberOnly: NSObject, Codable { - - public var arrayNumber: [Double]? - - public init(arrayNumber: [Double]?) { - self.arrayNumber = arrayNumber - } - - public enum CodingKeys: String, CodingKey { - case arrayNumber = "ArrayNumber" - } - -} diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift deleted file mode 100644 index dbc35d31065c..000000000000 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift +++ /dev/null @@ -1,28 +0,0 @@ -// -// ArrayTest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -@objc public class ArrayTest: NSObject, Codable { - - public var arrayOfString: [String]? - public var arrayArrayOfInteger: [[Int64]]? - public var arrayArrayOfModel: [[ReadOnlyFirst]]? - - public init(arrayOfString: [String]?, arrayArrayOfInteger: [[Int64]]?, arrayArrayOfModel: [[ReadOnlyFirst]]?) { - self.arrayOfString = arrayOfString - self.arrayArrayOfInteger = arrayArrayOfInteger - self.arrayArrayOfModel = arrayArrayOfModel - } - - public enum CodingKeys: String, CodingKey { - case arrayOfString = "array_of_string" - case arrayArrayOfInteger = "array_array_of_integer" - case arrayArrayOfModel = "array_array_of_model" - } - -} diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift deleted file mode 100644 index 27102732b74e..000000000000 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift +++ /dev/null @@ -1,38 +0,0 @@ -// -// Capitalization.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -@objc public class Capitalization: NSObject, Codable { - - public var smallCamel: String? - public var capitalCamel: String? - public var smallSnake: String? - public var capitalSnake: String? - public var sCAETHFlowPoints: String? - /** Name of the pet */ - public var ATT_NAME: String? - - public init(smallCamel: String?, capitalCamel: String?, smallSnake: String?, capitalSnake: String?, sCAETHFlowPoints: String?, ATT_NAME: String?) { - self.smallCamel = smallCamel - self.capitalCamel = capitalCamel - self.smallSnake = smallSnake - self.capitalSnake = capitalSnake - self.sCAETHFlowPoints = sCAETHFlowPoints - self.ATT_NAME = ATT_NAME - } - - public enum CodingKeys: String, CodingKey { - case smallCamel - case capitalCamel = "CapitalCamel" - case smallSnake = "small_Snake" - case capitalSnake = "Capital_Snake" - case sCAETHFlowPoints = "SCA_ETH_Flow_Points" - case ATT_NAME - } - -} diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift deleted file mode 100644 index c78d15eecbc9..000000000000 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift +++ /dev/null @@ -1,33 +0,0 @@ -// -// Cat.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -@objc public class Cat: NSObject, Codable { - - public var _className: String - public var color: String? = "red" - public var declawed: Bool? - public var declawedNum: NSNumber? { - get { - return declawed as NSNumber? - } - } - - public init(_className: String, color: String?, declawed: Bool?) { - self._className = _className - self.color = color - self.declawed = declawed - } - - public enum CodingKeys: String, CodingKey { - case _className = "className" - case color - case declawed - } - -} diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift deleted file mode 100644 index ef8cec45aff1..000000000000 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift +++ /dev/null @@ -1,23 +0,0 @@ -// -// CatAllOf.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -@objc public class CatAllOf: NSObject, Codable { - - public var declawed: Bool? - public var declawedNum: NSNumber? { - get { - return declawed as NSNumber? - } - } - - public init(declawed: Bool?) { - self.declawed = declawed - } - -} diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Category.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Category.swift deleted file mode 100644 index 94d01910abe8..000000000000 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Category.swift +++ /dev/null @@ -1,30 +0,0 @@ -// -// Category.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -@objc public class Category: NSObject, Codable { - - public var _id: Int64? - public var _idNum: NSNumber? { - get { - return _id as NSNumber? - } - } - public var name: String = "default-name" - - public init(_id: Int64?, name: String) { - self._id = _id - self.name = name - } - - public enum CodingKeys: String, CodingKey { - case _id = "id" - case name - } - -} diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift deleted file mode 100644 index 4197ffcaed6c..000000000000 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift +++ /dev/null @@ -1,20 +0,0 @@ -// -// ClassModel.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -/** Model for testing model with \"_class\" property */ - -@objc public class ClassModel: NSObject, Codable { - - public var _class: String? - - public init(_class: String?) { - self._class = _class - } - -} diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Client.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Client.swift deleted file mode 100644 index 517dbbba2ec2..000000000000 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Client.swift +++ /dev/null @@ -1,18 +0,0 @@ -// -// Client.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -@objc public class Client: NSObject, Codable { - - public var client: String? - - public init(client: String?) { - self.client = client - } - -} diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift deleted file mode 100644 index e6a878a1ea05..000000000000 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift +++ /dev/null @@ -1,28 +0,0 @@ -// -// Dog.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -@objc public class Dog: NSObject, Codable { - - public var _className: String - public var color: String? = "red" - public var breed: String? - - public init(_className: String, color: String?, breed: String?) { - self._className = _className - self.color = color - self.breed = breed - } - - public enum CodingKeys: String, CodingKey { - case _className = "className" - case color - case breed - } - -} diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift deleted file mode 100644 index 73fd1822725c..000000000000 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift +++ /dev/null @@ -1,18 +0,0 @@ -// -// DogAllOf.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -@objc public class DogAllOf: NSObject, Codable { - - public var breed: String? - - public init(breed: String?) { - self.breed = breed - } - -} diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift deleted file mode 100644 index 4e35e79a6820..000000000000 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift +++ /dev/null @@ -1,33 +0,0 @@ -// -// EnumArrays.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -@objc public class EnumArrays: NSObject, Codable { - - public enum JustSymbol: String, Codable { - case greaterThanOrEqualTo = ">=" - case dollar = "$" - } - public enum ArrayEnum: String, Codable { - case fish = "fish" - case crab = "crab" - } - public var justSymbol: JustSymbol? - public var arrayEnum: [ArrayEnum]? - - public init(justSymbol: JustSymbol?, arrayEnum: [ArrayEnum]?) { - self.justSymbol = justSymbol - self.arrayEnum = arrayEnum - } - - public enum CodingKeys: String, CodingKey { - case justSymbol = "just_symbol" - case arrayEnum = "array_enum" - } - -} diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift deleted file mode 100644 index 3c1dfcac577d..000000000000 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift +++ /dev/null @@ -1,14 +0,0 @@ -// -// EnumClass.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public enum EnumClass: String, Codable { - case abc = "_abc" - case efg = "-efg" - case xyz = "(xyz)" -} diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift deleted file mode 100644 index a6906e8bbef9..000000000000 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift +++ /dev/null @@ -1,52 +0,0 @@ -// -// EnumTest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -@objc public class EnumTest: NSObject, Codable { - - public enum EnumString: String, Codable { - case upper = "UPPER" - case lower = "lower" - case empty = "" - } - public enum EnumStringRequired: String, Codable { - case upper = "UPPER" - case lower = "lower" - case empty = "" - } - public enum EnumInteger: Int, Codable { - case _1 = 1 - case number1 = -1 - } - public enum EnumNumber: Double, Codable { - case _11 = 1.1 - case number12 = -1.2 - } - public var enumString: EnumString? - public var enumStringRequired: EnumStringRequired - public var enumInteger: EnumInteger? - public var enumNumber: EnumNumber? - public var outerEnum: OuterEnum? - - public init(enumString: EnumString?, enumStringRequired: EnumStringRequired, enumInteger: EnumInteger?, enumNumber: EnumNumber?, outerEnum: OuterEnum?) { - self.enumString = enumString - self.enumStringRequired = enumStringRequired - self.enumInteger = enumInteger - self.enumNumber = enumNumber - self.outerEnum = outerEnum - } - - public enum CodingKeys: String, CodingKey { - case enumString = "enum_string" - case enumStringRequired = "enum_string_required" - case enumInteger = "enum_integer" - case enumNumber = "enum_number" - case outerEnum - } - -} diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/File.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/File.swift deleted file mode 100644 index 7a320c177d38..000000000000 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/File.swift +++ /dev/null @@ -1,21 +0,0 @@ -// -// File.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -/** Must be named `File` for test. */ - -@objc public class File: NSObject, Codable { - - /** Test capitalization */ - public var sourceURI: String? - - public init(sourceURI: String?) { - self.sourceURI = sourceURI - } - -} diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift deleted file mode 100644 index a6437b4fe901..000000000000 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift +++ /dev/null @@ -1,20 +0,0 @@ -// -// FileSchemaTestClass.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -@objc public class FileSchemaTestClass: NSObject, Codable { - - public var file: File? - public var files: [File]? - - public init(file: File?, files: [File]?) { - self.file = file - self.files = files - } - -} diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift deleted file mode 100644 index df2c46d3757b..000000000000 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift +++ /dev/null @@ -1,67 +0,0 @@ -// -// FormatTest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -@objc public class FormatTest: NSObject, Codable { - - public var integer: Int? - public var integerNum: NSNumber? { - get { - return integer as NSNumber? - } - } - public var int32: Int? - public var int32Num: NSNumber? { - get { - return int32 as NSNumber? - } - } - public var int64: Int64? - public var int64Num: NSNumber? { - get { - return int64 as NSNumber? - } - } - public var number: Double - public var float: Float? - public var floatNum: NSNumber? { - get { - return float as NSNumber? - } - } - public var double: Double? - public var doubleNum: NSNumber? { - get { - return double as NSNumber? - } - } - public var string: String? - public var byte: Data - public var binary: URL? - public var date: Date - public var dateTime: Date? - public var uuid: UUID? - public var password: String - - public init(integer: Int?, int32: Int?, int64: Int64?, number: Double, float: Float?, double: Double?, string: String?, byte: Data, binary: URL?, date: Date, dateTime: Date?, uuid: UUID?, password: String) { - self.integer = integer - self.int32 = int32 - self.int64 = int64 - self.number = number - self.float = float - self.double = double - self.string = string - self.byte = byte - self.binary = binary - self.date = date - self.dateTime = dateTime - self.uuid = uuid - self.password = password - } - -} diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift deleted file mode 100644 index b9f5b39117d7..000000000000 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift +++ /dev/null @@ -1,20 +0,0 @@ -// -// HasOnlyReadOnly.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -@objc public class HasOnlyReadOnly: NSObject, Codable { - - public var bar: String? - public var foo: String? - - public init(bar: String?, foo: String?) { - self.bar = bar - self.foo = foo - } - -} diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/List.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/List.swift deleted file mode 100644 index 2ac4bfc90d84..000000000000 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/List.swift +++ /dev/null @@ -1,22 +0,0 @@ -// -// List.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -@objc public class List: NSObject, Codable { - - public var _123list: String? - - public init(_123list: String?) { - self._123list = _123list - } - - public enum CodingKeys: String, CodingKey { - case _123list = "123-list" - } - -} diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift deleted file mode 100644 index 4fb067a5ffab..000000000000 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift +++ /dev/null @@ -1,35 +0,0 @@ -// -// MapTest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -@objc public class MapTest: NSObject, Codable { - - public enum MapOfEnumString: String, Codable { - case upper = "UPPER" - case lower = "lower" - } - public var mapMapOfString: [String: [String: String]]? - public var mapOfEnumString: [String: String]? - public var directMap: [String: Bool]? - public var indirectMap: StringBooleanMap? - - public init(mapMapOfString: [String: [String: String]]?, mapOfEnumString: [String: String]?, directMap: [String: Bool]?, indirectMap: StringBooleanMap?) { - self.mapMapOfString = mapMapOfString - self.mapOfEnumString = mapOfEnumString - self.directMap = directMap - self.indirectMap = indirectMap - } - - public enum CodingKeys: String, CodingKey { - case mapMapOfString = "map_map_of_string" - case mapOfEnumString = "map_of_enum_string" - case directMap = "direct_map" - case indirectMap = "indirect_map" - } - -} diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift deleted file mode 100644 index e10adad0a7e1..000000000000 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift +++ /dev/null @@ -1,22 +0,0 @@ -// -// MixedPropertiesAndAdditionalPropertiesClass.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -@objc public class MixedPropertiesAndAdditionalPropertiesClass: NSObject, Codable { - - public var uuid: UUID? - public var dateTime: Date? - public var map: [String: Animal]? - - public init(uuid: UUID?, dateTime: Date?, map: [String: Animal]?) { - self.uuid = uuid - self.dateTime = dateTime - self.map = map - } - -} diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift deleted file mode 100644 index 2e9399332e6a..000000000000 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift +++ /dev/null @@ -1,32 +0,0 @@ -// -// Model200Response.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -/** Model for testing model name starting with number */ - -@objc public class Model200Response: NSObject, Codable { - - public var name: Int? - public var nameNum: NSNumber? { - get { - return name as NSNumber? - } - } - public var _class: String? - - public init(name: Int?, _class: String?) { - self.name = name - self._class = _class - } - - public enum CodingKeys: String, CodingKey { - case name - case _class = "class" - } - -} diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Name.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Name.swift deleted file mode 100644 index e30fd5a47152..000000000000 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Name.swift +++ /dev/null @@ -1,48 +0,0 @@ -// -// Name.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -/** Model for testing model name same as property name */ - -@objc public class Name: NSObject, Codable { - - public var name: Int - public var nameNum: NSNumber? { - get { - return name as NSNumber? - } - } - public var snakeCase: Int? - public var snakeCaseNum: NSNumber? { - get { - return snakeCase as NSNumber? - } - } - public var property: String? - public var _123number: Int? - public var _123numberNum: NSNumber? { - get { - return _123number as NSNumber? - } - } - - public init(name: Int, snakeCase: Int?, property: String?, _123number: Int?) { - self.name = name - self.snakeCase = snakeCase - self.property = property - self._123number = _123number - } - - public enum CodingKeys: String, CodingKey { - case name - case snakeCase = "snake_case" - case property - case _123number = "123Number" - } - -} diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift deleted file mode 100644 index 9a80fcacc6ca..000000000000 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift +++ /dev/null @@ -1,22 +0,0 @@ -// -// NumberOnly.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -@objc public class NumberOnly: NSObject, Codable { - - public var justNumber: Double? - - public init(justNumber: Double?) { - self.justNumber = justNumber - } - - public enum CodingKeys: String, CodingKey { - case justNumber = "JustNumber" - } - -} diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Order.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Order.swift deleted file mode 100644 index 37cfed6adb23..000000000000 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Order.swift +++ /dev/null @@ -1,63 +0,0 @@ -// -// Order.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -@objc public class Order: NSObject, Codable { - - public enum Status: String, Codable { - case placed = "placed" - case approved = "approved" - case delivered = "delivered" - } - public var _id: Int64? - public var _idNum: NSNumber? { - get { - return _id as NSNumber? - } - } - public var petId: Int64? - public var petIdNum: NSNumber? { - get { - return petId as NSNumber? - } - } - public var quantity: Int? - public var quantityNum: NSNumber? { - get { - return quantity as NSNumber? - } - } - public var shipDate: Date? - /** Order Status */ - public var status: Status? - public var complete: Bool? = false - public var completeNum: NSNumber? { - get { - return complete as NSNumber? - } - } - - public init(_id: Int64?, petId: Int64?, quantity: Int?, shipDate: Date?, status: Status?, complete: Bool?) { - self._id = _id - self.petId = petId - self.quantity = quantity - self.shipDate = shipDate - self.status = status - self.complete = complete - } - - public enum CodingKeys: String, CodingKey { - case _id = "id" - case petId - case quantity - case shipDate - case status - case complete - } - -} diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift deleted file mode 100644 index 85ed62455d10..000000000000 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift +++ /dev/null @@ -1,33 +0,0 @@ -// -// OuterComposite.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -@objc public class OuterComposite: NSObject, Codable { - - public var myNumber: Double? - public var myString: String? - public var myBoolean: Bool? - public var myBooleanNum: NSNumber? { - get { - return myBoolean as NSNumber? - } - } - - public init(myNumber: Double?, myString: String?, myBoolean: Bool?) { - self.myNumber = myNumber - self.myString = myString - self.myBoolean = myBoolean - } - - public enum CodingKeys: String, CodingKey { - case myNumber = "my_number" - case myString = "my_string" - case myBoolean = "my_boolean" - } - -} diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift deleted file mode 100644 index 9f80fc95ecf0..000000000000 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift +++ /dev/null @@ -1,14 +0,0 @@ -// -// OuterEnum.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public enum OuterEnum: String, Codable { - case placed = "placed" - case approved = "approved" - case delivered = "delivered" -} diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift deleted file mode 100644 index f99f4d790ec6..000000000000 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift +++ /dev/null @@ -1,48 +0,0 @@ -// -// Pet.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -@objc public class Pet: NSObject, Codable { - - public enum Status: String, Codable { - case available = "available" - case pending = "pending" - case sold = "sold" - } - public var _id: Int64? - public var _idNum: NSNumber? { - get { - return _id as NSNumber? - } - } - public var category: Category? - public var name: String - public var photoUrls: [String] - public var tags: [Tag]? - /** pet status in the store */ - public var status: Status? - - public init(_id: Int64?, category: Category?, name: String, photoUrls: [String], tags: [Tag]?, status: Status?) { - self._id = _id - self.category = category - self.name = name - self.photoUrls = photoUrls - self.tags = tags - self.status = status - } - - public enum CodingKeys: String, CodingKey { - case _id = "id" - case category - case name - case photoUrls - case tags - case status - } - -} diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift deleted file mode 100644 index d1252433b2d8..000000000000 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift +++ /dev/null @@ -1,20 +0,0 @@ -// -// ReadOnlyFirst.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -@objc public class ReadOnlyFirst: NSObject, Codable { - - public var bar: String? - public var baz: String? - - public init(bar: String?, baz: String?) { - self.bar = bar - self.baz = baz - } - -} diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Return.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Return.swift deleted file mode 100644 index 50c3614973df..000000000000 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Return.swift +++ /dev/null @@ -1,29 +0,0 @@ -// -// Return.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -/** Model for testing reserved words */ - -@objc public class Return: NSObject, Codable { - - public var _return: Int? - public var _returnNum: NSNumber? { - get { - return _return as NSNumber? - } - } - - public init(_return: Int?) { - self._return = _return - } - - public enum CodingKeys: String, CodingKey { - case _return = "return" - } - -} diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift deleted file mode 100644 index 0996025cce52..000000000000 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift +++ /dev/null @@ -1,27 +0,0 @@ -// -// SpecialModelName.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -@objc public class SpecialModelName: NSObject, Codable { - - public var specialPropertyName: Int64? - public var specialPropertyNameNum: NSNumber? { - get { - return specialPropertyName as NSNumber? - } - } - - public init(specialPropertyName: Int64?) { - self.specialPropertyName = specialPropertyName - } - - public enum CodingKeys: String, CodingKey { - case specialPropertyName = "$special[property.name]" - } - -} diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift deleted file mode 100644 index ffe9730a6fe4..000000000000 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift +++ /dev/null @@ -1,45 +0,0 @@ -// -// StringBooleanMap.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -@objc public class StringBooleanMap: NSObject, Codable { - - public var additionalProperties: [String: Bool] = [:] - - public subscript(key: String) -> Bool? { - get { - if let value = additionalProperties[key] { - return value - } - return nil - } - - set { - additionalProperties[key] = newValue - } - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - try container.encodeMap(additionalProperties) - } - - // Decodable protocol methods - - public required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - var nonAdditionalPropertyKeys = Set() - additionalProperties = try container.decodeMap(Bool.self, excludedKeys: nonAdditionalPropertyKeys) - } - -} diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift deleted file mode 100644 index a3994745e254..000000000000 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift +++ /dev/null @@ -1,30 +0,0 @@ -// -// Tag.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -@objc public class Tag: NSObject, Codable { - - public var _id: Int64? - public var _idNum: NSNumber? { - get { - return _id as NSNumber? - } - } - public var name: String? - - public init(_id: Int64?, name: String?) { - self._id = _id - self.name = name - } - - public enum CodingKeys: String, CodingKey { - case _id = "id" - case name - } - -} diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift deleted file mode 100644 index 382944d1b0d5..000000000000 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift +++ /dev/null @@ -1,44 +0,0 @@ -// -// TypeHolderDefault.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -@objc public class TypeHolderDefault: NSObject, Codable { - - public var stringItem: String = "what" - public var numberItem: Double - public var integerItem: Int - public var integerItemNum: NSNumber? { - get { - return integerItem as NSNumber? - } - } - public var boolItem: Bool = true - public var boolItemNum: NSNumber? { - get { - return boolItem as NSNumber? - } - } - public var arrayItem: [Int] - - public init(stringItem: String, numberItem: Double, integerItem: Int, boolItem: Bool, arrayItem: [Int]) { - self.stringItem = stringItem - self.numberItem = numberItem - self.integerItem = integerItem - self.boolItem = boolItem - self.arrayItem = arrayItem - } - - public enum CodingKeys: String, CodingKey { - case stringItem = "string_item" - case numberItem = "number_item" - case integerItem = "integer_item" - case boolItem = "bool_item" - case arrayItem = "array_item" - } - -} diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift deleted file mode 100644 index 0344e51e0e34..000000000000 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift +++ /dev/null @@ -1,44 +0,0 @@ -// -// TypeHolderExample.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -@objc public class TypeHolderExample: NSObject, Codable { - - public var stringItem: String - public var numberItem: Double - public var integerItem: Int - public var integerItemNum: NSNumber? { - get { - return integerItem as NSNumber? - } - } - public var boolItem: Bool - public var boolItemNum: NSNumber? { - get { - return boolItem as NSNumber? - } - } - public var arrayItem: [Int] - - public init(stringItem: String, numberItem: Double, integerItem: Int, boolItem: Bool, arrayItem: [Int]) { - self.stringItem = stringItem - self.numberItem = numberItem - self.integerItem = integerItem - self.boolItem = boolItem - self.arrayItem = arrayItem - } - - public enum CodingKeys: String, CodingKey { - case stringItem = "string_item" - case numberItem = "number_item" - case integerItem = "integer_item" - case boolItem = "bool_item" - case arrayItem = "array_item" - } - -} diff --git a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/User.swift b/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/User.swift deleted file mode 100644 index 9b9b03a946f8..000000000000 --- a/samples/client/petstore/swift4/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/User.swift +++ /dev/null @@ -1,54 +0,0 @@ -// -// User.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -@objc public class User: NSObject, Codable { - - public var _id: Int64? - public var _idNum: NSNumber? { - get { - return _id as NSNumber? - } - } - public var username: String? - public var firstName: String? - public var lastName: String? - public var email: String? - public var password: String? - public var phone: String? - /** User Status */ - public var userStatus: Int? - public var userStatusNum: NSNumber? { - get { - return userStatus as NSNumber? - } - } - - public init(_id: Int64?, username: String?, firstName: String?, lastName: String?, email: String?, password: String?, phone: String?, userStatus: Int?) { - self._id = _id - self.username = username - self.firstName = firstName - self.lastName = lastName - self.email = email - self.password = password - self.phone = phone - self.userStatus = userStatus - } - - public enum CodingKeys: String, CodingKey { - case _id = "id" - case username - case firstName - case lastName - case email - case password - case phone - case userStatus - } - -} diff --git a/samples/client/petstore/swift4/objcCompatible/README.md b/samples/client/petstore/swift4/objcCompatible/README.md deleted file mode 100644 index bd093317bd7a..000000000000 --- a/samples/client/petstore/swift4/objcCompatible/README.md +++ /dev/null @@ -1,141 +0,0 @@ -# Swift4 API client for PetstoreClient - -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 API client 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 an API client. - -- API version: 1.0.0 -- Package version: -- Build package: org.openapitools.codegen.languages.Swift4Codegen - -## Installation - -### Carthage - -Run `carthage update` - -### CocoaPods - -Run `pod install` - -## Documentation for API Endpoints - -All URIs are relative to *http://petstore.swagger.io:80/v2* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*AnotherFakeAPI* | [**call123testSpecialTags**](docs/AnotherFakeAPI.md#call123testspecialtags) | **PATCH** /another-fake/dummy | To test special tags -*FakeAPI* | [**fakeOuterBooleanSerialize**](docs/FakeAPI.md#fakeouterbooleanserialize) | **POST** /fake/outer/boolean | -*FakeAPI* | [**fakeOuterCompositeSerialize**](docs/FakeAPI.md#fakeoutercompositeserialize) | **POST** /fake/outer/composite | -*FakeAPI* | [**fakeOuterNumberSerialize**](docs/FakeAPI.md#fakeouternumberserialize) | **POST** /fake/outer/number | -*FakeAPI* | [**fakeOuterStringSerialize**](docs/FakeAPI.md#fakeouterstringserialize) | **POST** /fake/outer/string | -*FakeAPI* | [**testBodyWithFileSchema**](docs/FakeAPI.md#testbodywithfileschema) | **PUT** /fake/body-with-file-schema | -*FakeAPI* | [**testBodyWithQueryParams**](docs/FakeAPI.md#testbodywithqueryparams) | **PUT** /fake/body-with-query-params | -*FakeAPI* | [**testClientModel**](docs/FakeAPI.md#testclientmodel) | **PATCH** /fake | To test \"client\" model -*FakeAPI* | [**testEndpointParameters**](docs/FakeAPI.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 -*FakeAPI* | [**testEnumParameters**](docs/FakeAPI.md#testenumparameters) | **GET** /fake | To test enum parameters -*FakeAPI* | [**testGroupParameters**](docs/FakeAPI.md#testgroupparameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) -*FakeAPI* | [**testInlineAdditionalProperties**](docs/FakeAPI.md#testinlineadditionalproperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties -*FakeAPI* | [**testJsonFormData**](docs/FakeAPI.md#testjsonformdata) | **GET** /fake/jsonFormData | test json serialization of form data -*FakeClassnameTags123API* | [**testClassname**](docs/FakeClassnameTags123API.md#testclassname) | **PATCH** /fake_classname_test | To test class name in snake case -*PetAPI* | [**addPet**](docs/PetAPI.md#addpet) | **POST** /pet | Add a new pet to the store -*PetAPI* | [**deletePet**](docs/PetAPI.md#deletepet) | **DELETE** /pet/{petId} | Deletes a pet -*PetAPI* | [**findPetsByStatus**](docs/PetAPI.md#findpetsbystatus) | **GET** /pet/findByStatus | Finds Pets by status -*PetAPI* | [**findPetsByTags**](docs/PetAPI.md#findpetsbytags) | **GET** /pet/findByTags | Finds Pets by tags -*PetAPI* | [**getPetById**](docs/PetAPI.md#getpetbyid) | **GET** /pet/{petId} | Find pet by ID -*PetAPI* | [**updatePet**](docs/PetAPI.md#updatepet) | **PUT** /pet | Update an existing pet -*PetAPI* | [**updatePetWithForm**](docs/PetAPI.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data -*PetAPI* | [**uploadFile**](docs/PetAPI.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image -*PetAPI* | [**uploadFileWithRequiredFile**](docs/PetAPI.md#uploadfilewithrequiredfile) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required) -*StoreAPI* | [**deleteOrder**](docs/StoreAPI.md#deleteorder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID -*StoreAPI* | [**getInventory**](docs/StoreAPI.md#getinventory) | **GET** /store/inventory | Returns pet inventories by status -*StoreAPI* | [**getOrderById**](docs/StoreAPI.md#getorderbyid) | **GET** /store/order/{order_id} | Find purchase order by ID -*StoreAPI* | [**placeOrder**](docs/StoreAPI.md#placeorder) | **POST** /store/order | Place an order for a pet -*UserAPI* | [**createUser**](docs/UserAPI.md#createuser) | **POST** /user | Create user -*UserAPI* | [**createUsersWithArrayInput**](docs/UserAPI.md#createuserswitharrayinput) | **POST** /user/createWithArray | Creates list of users with given input array -*UserAPI* | [**createUsersWithListInput**](docs/UserAPI.md#createuserswithlistinput) | **POST** /user/createWithList | Creates list of users with given input array -*UserAPI* | [**deleteUser**](docs/UserAPI.md#deleteuser) | **DELETE** /user/{username} | Delete user -*UserAPI* | [**getUserByName**](docs/UserAPI.md#getuserbyname) | **GET** /user/{username} | Get user by user name -*UserAPI* | [**loginUser**](docs/UserAPI.md#loginuser) | **GET** /user/login | Logs user into the system -*UserAPI* | [**logoutUser**](docs/UserAPI.md#logoutuser) | **GET** /user/logout | Logs out current logged in user session -*UserAPI* | [**updateUser**](docs/UserAPI.md#updateuser) | **PUT** /user/{username} | Updated user - - -## Documentation For Models - - - [AdditionalPropertiesClass](docs/AdditionalPropertiesClass.md) - - [Animal](docs/Animal.md) - - [AnimalFarm](docs/AnimalFarm.md) - - [ApiResponse](docs/ApiResponse.md) - - [ArrayOfArrayOfNumberOnly](docs/ArrayOfArrayOfNumberOnly.md) - - [ArrayOfNumberOnly](docs/ArrayOfNumberOnly.md) - - [ArrayTest](docs/ArrayTest.md) - - [Capitalization](docs/Capitalization.md) - - [Cat](docs/Cat.md) - - [CatAllOf](docs/CatAllOf.md) - - [Category](docs/Category.md) - - [ClassModel](docs/ClassModel.md) - - [Client](docs/Client.md) - - [Dog](docs/Dog.md) - - [DogAllOf](docs/DogAllOf.md) - - [EnumArrays](docs/EnumArrays.md) - - [EnumClass](docs/EnumClass.md) - - [EnumTest](docs/EnumTest.md) - - [File](docs/File.md) - - [FileSchemaTestClass](docs/FileSchemaTestClass.md) - - [FormatTest](docs/FormatTest.md) - - [HasOnlyReadOnly](docs/HasOnlyReadOnly.md) - - [List](docs/List.md) - - [MapTest](docs/MapTest.md) - - [MixedPropertiesAndAdditionalPropertiesClass](docs/MixedPropertiesAndAdditionalPropertiesClass.md) - - [Model200Response](docs/Model200Response.md) - - [Name](docs/Name.md) - - [NumberOnly](docs/NumberOnly.md) - - [Order](docs/Order.md) - - [OuterComposite](docs/OuterComposite.md) - - [OuterEnum](docs/OuterEnum.md) - - [Pet](docs/Pet.md) - - [ReadOnlyFirst](docs/ReadOnlyFirst.md) - - [Return](docs/Return.md) - - [SpecialModelName](docs/SpecialModelName.md) - - [StringBooleanMap](docs/StringBooleanMap.md) - - [Tag](docs/Tag.md) - - [TypeHolderDefault](docs/TypeHolderDefault.md) - - [TypeHolderExample](docs/TypeHolderExample.md) - - [User](docs/User.md) - - -## Documentation For Authorization - - -## api_key - -- **Type**: API key -- **API key parameter name**: api_key -- **Location**: HTTP header - -## api_key_query - -- **Type**: API key -- **API key parameter name**: api_key_query -- **Location**: URL query string - -## http_basic_test - -- **Type**: HTTP basic authentication - -## petstore_auth - -- **Type**: OAuth -- **Flow**: implicit -- **Authorization URL**: http://petstore.swagger.io/api/oauth/dialog -- **Scopes**: - - **write:pets**: modify pets in your account - - **read:pets**: read your pets - - -## Author - - - diff --git a/samples/client/petstore/swift4/objcCompatible/docs/AdditionalPropertiesClass.md b/samples/client/petstore/swift4/objcCompatible/docs/AdditionalPropertiesClass.md deleted file mode 100644 index e22d28be1de6..000000000000 --- a/samples/client/petstore/swift4/objcCompatible/docs/AdditionalPropertiesClass.md +++ /dev/null @@ -1,11 +0,0 @@ -# AdditionalPropertiesClass - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**mapString** | **[String:String]** | | [optional] -**mapMapString** | [String:[String: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/swift4/objcCompatible/docs/Animal.md b/samples/client/petstore/swift4/objcCompatible/docs/Animal.md deleted file mode 100644 index 5ca136c87e86..000000000000 --- a/samples/client/petstore/swift4/objcCompatible/docs/Animal.md +++ /dev/null @@ -1,11 +0,0 @@ -# Animal - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**_className** | **String** | | -**color** | **String** | | [optional] [default to "red"] - -[[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/swift4/objcCompatible/docs/AnimalFarm.md b/samples/client/petstore/swift4/objcCompatible/docs/AnimalFarm.md deleted file mode 100644 index df6bab21dae8..000000000000 --- a/samples/client/petstore/swift4/objcCompatible/docs/AnimalFarm.md +++ /dev/null @@ -1,9 +0,0 @@ -# AnimalFarm - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/samples/client/petstore/swift4/objcCompatible/docs/AnotherFakeAPI.md b/samples/client/petstore/swift4/objcCompatible/docs/AnotherFakeAPI.md deleted file mode 100644 index aead5f1f980f..000000000000 --- a/samples/client/petstore/swift4/objcCompatible/docs/AnotherFakeAPI.md +++ /dev/null @@ -1,59 +0,0 @@ -# AnotherFakeAPI - -All URIs are relative to *http://petstore.swagger.io:80/v2* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**call123testSpecialTags**](AnotherFakeAPI.md#call123testspecialtags) | **PATCH** /another-fake/dummy | To test special tags - - -# **call123testSpecialTags** -```swift - open class func call123testSpecialTags(body: Client, completion: @escaping (_ data: Client?, _ error: Error?) -> Void) -``` - -To test special tags - -To test special tags and operation ID starting with number - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let body = Client(client: "client_example") // Client | client model - -// To test special tags -AnotherFakeAPI.call123testSpecialTags(body: body) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Client**](Client.md) | client model | - -### Return type - -[**Client**](Client.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **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/swift4/objcCompatible/docs/ApiResponse.md b/samples/client/petstore/swift4/objcCompatible/docs/ApiResponse.md deleted file mode 100644 index c6d9768fe9bf..000000000000 --- a/samples/client/petstore/swift4/objcCompatible/docs/ApiResponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# ApiResponse - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**code** | **Int** | | [optional] -**type** | **String** | | [optional] -**message** | **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/swift4/objcCompatible/docs/ArrayOfArrayOfNumberOnly.md b/samples/client/petstore/swift4/objcCompatible/docs/ArrayOfArrayOfNumberOnly.md deleted file mode 100644 index c6fceff5e08d..000000000000 --- a/samples/client/petstore/swift4/objcCompatible/docs/ArrayOfArrayOfNumberOnly.md +++ /dev/null @@ -1,10 +0,0 @@ -# ArrayOfArrayOfNumberOnly - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**arrayArrayNumber** | [[Double]] | | [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/swift4/objcCompatible/docs/ArrayOfNumberOnly.md b/samples/client/petstore/swift4/objcCompatible/docs/ArrayOfNumberOnly.md deleted file mode 100644 index f09f8fa6f70f..000000000000 --- a/samples/client/petstore/swift4/objcCompatible/docs/ArrayOfNumberOnly.md +++ /dev/null @@ -1,10 +0,0 @@ -# ArrayOfNumberOnly - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**arrayNumber** | **[Double]** | | [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/swift4/objcCompatible/docs/ArrayTest.md b/samples/client/petstore/swift4/objcCompatible/docs/ArrayTest.md deleted file mode 100644 index bf416b8330cc..000000000000 --- a/samples/client/petstore/swift4/objcCompatible/docs/ArrayTest.md +++ /dev/null @@ -1,12 +0,0 @@ -# ArrayTest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**arrayOfString** | **[String]** | | [optional] -**arrayArrayOfInteger** | [[Int64]] | | [optional] -**arrayArrayOfModel** | [[ReadOnlyFirst]] | | [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/swift4/objcCompatible/docs/Capitalization.md b/samples/client/petstore/swift4/objcCompatible/docs/Capitalization.md deleted file mode 100644 index 95374216c773..000000000000 --- a/samples/client/petstore/swift4/objcCompatible/docs/Capitalization.md +++ /dev/null @@ -1,15 +0,0 @@ -# Capitalization - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**smallCamel** | **String** | | [optional] -**capitalCamel** | **String** | | [optional] -**smallSnake** | **String** | | [optional] -**capitalSnake** | **String** | | [optional] -**sCAETHFlowPoints** | **String** | | [optional] -**ATT_NAME** | **String** | Name of the pet | [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/swift4/objcCompatible/docs/Cat.md b/samples/client/petstore/swift4/objcCompatible/docs/Cat.md deleted file mode 100644 index fb5949b15761..000000000000 --- a/samples/client/petstore/swift4/objcCompatible/docs/Cat.md +++ /dev/null @@ -1,10 +0,0 @@ -# Cat - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**declawed** | **Bool** | | [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/swift4/objcCompatible/docs/CatAllOf.md b/samples/client/petstore/swift4/objcCompatible/docs/CatAllOf.md deleted file mode 100644 index 79789be61c01..000000000000 --- a/samples/client/petstore/swift4/objcCompatible/docs/CatAllOf.md +++ /dev/null @@ -1,10 +0,0 @@ -# CatAllOf - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**declawed** | **Bool** | | [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/swift4/objcCompatible/docs/Category.md b/samples/client/petstore/swift4/objcCompatible/docs/Category.md deleted file mode 100644 index f9bf59e4ac49..000000000000 --- a/samples/client/petstore/swift4/objcCompatible/docs/Category.md +++ /dev/null @@ -1,11 +0,0 @@ -# Category - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**_id** | **Int64** | | [optional] -**name** | **String** | | [default to "default-name"] - -[[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/swift4/objcCompatible/docs/ClassModel.md b/samples/client/petstore/swift4/objcCompatible/docs/ClassModel.md deleted file mode 100644 index e3912fdf0fd5..000000000000 --- a/samples/client/petstore/swift4/objcCompatible/docs/ClassModel.md +++ /dev/null @@ -1,10 +0,0 @@ -# ClassModel - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**_class** | **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/swift4/objcCompatible/docs/Client.md b/samples/client/petstore/swift4/objcCompatible/docs/Client.md deleted file mode 100644 index 0de1b238c36f..000000000000 --- a/samples/client/petstore/swift4/objcCompatible/docs/Client.md +++ /dev/null @@ -1,10 +0,0 @@ -# Client - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**client** | **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/swift4/objcCompatible/docs/Dog.md b/samples/client/petstore/swift4/objcCompatible/docs/Dog.md deleted file mode 100644 index 4824786da049..000000000000 --- a/samples/client/petstore/swift4/objcCompatible/docs/Dog.md +++ /dev/null @@ -1,10 +0,0 @@ -# Dog - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**breed** | **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/swift4/objcCompatible/docs/DogAllOf.md b/samples/client/petstore/swift4/objcCompatible/docs/DogAllOf.md deleted file mode 100644 index 9302ef52e938..000000000000 --- a/samples/client/petstore/swift4/objcCompatible/docs/DogAllOf.md +++ /dev/null @@ -1,10 +0,0 @@ -# DogAllOf - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**breed** | **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/swift4/objcCompatible/docs/EnumArrays.md b/samples/client/petstore/swift4/objcCompatible/docs/EnumArrays.md deleted file mode 100644 index b9a9807d3c8e..000000000000 --- a/samples/client/petstore/swift4/objcCompatible/docs/EnumArrays.md +++ /dev/null @@ -1,11 +0,0 @@ -# EnumArrays - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**justSymbol** | **String** | | [optional] -**arrayEnum** | **[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/swift4/objcCompatible/docs/EnumClass.md b/samples/client/petstore/swift4/objcCompatible/docs/EnumClass.md deleted file mode 100644 index 67f017becd0c..000000000000 --- a/samples/client/petstore/swift4/objcCompatible/docs/EnumClass.md +++ /dev/null @@ -1,9 +0,0 @@ -# EnumClass - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/samples/client/petstore/swift4/objcCompatible/docs/EnumTest.md b/samples/client/petstore/swift4/objcCompatible/docs/EnumTest.md deleted file mode 100644 index bc9b036dd769..000000000000 --- a/samples/client/petstore/swift4/objcCompatible/docs/EnumTest.md +++ /dev/null @@ -1,14 +0,0 @@ -# EnumTest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**enumString** | **String** | | [optional] -**enumStringRequired** | **String** | | -**enumInteger** | **Int** | | [optional] -**enumNumber** | **Double** | | [optional] -**outerEnum** | [**OuterEnum**](OuterEnum.md) | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/samples/client/petstore/swift4/objcCompatible/docs/FakeAPI.md b/samples/client/petstore/swift4/objcCompatible/docs/FakeAPI.md deleted file mode 100644 index f7faf3aa2aa6..000000000000 --- a/samples/client/petstore/swift4/objcCompatible/docs/FakeAPI.md +++ /dev/null @@ -1,662 +0,0 @@ -# FakeAPI - -All URIs are relative to *http://petstore.swagger.io:80/v2* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**fakeOuterBooleanSerialize**](FakeAPI.md#fakeouterbooleanserialize) | **POST** /fake/outer/boolean | -[**fakeOuterCompositeSerialize**](FakeAPI.md#fakeoutercompositeserialize) | **POST** /fake/outer/composite | -[**fakeOuterNumberSerialize**](FakeAPI.md#fakeouternumberserialize) | **POST** /fake/outer/number | -[**fakeOuterStringSerialize**](FakeAPI.md#fakeouterstringserialize) | **POST** /fake/outer/string | -[**testBodyWithFileSchema**](FakeAPI.md#testbodywithfileschema) | **PUT** /fake/body-with-file-schema | -[**testBodyWithQueryParams**](FakeAPI.md#testbodywithqueryparams) | **PUT** /fake/body-with-query-params | -[**testClientModel**](FakeAPI.md#testclientmodel) | **PATCH** /fake | To test \"client\" model -[**testEndpointParameters**](FakeAPI.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 -[**testEnumParameters**](FakeAPI.md#testenumparameters) | **GET** /fake | To test enum parameters -[**testGroupParameters**](FakeAPI.md#testgroupparameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) -[**testInlineAdditionalProperties**](FakeAPI.md#testinlineadditionalproperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties -[**testJsonFormData**](FakeAPI.md#testjsonformdata) | **GET** /fake/jsonFormData | test json serialization of form data - - -# **fakeOuterBooleanSerialize** -```swift - open class func fakeOuterBooleanSerialize(body: Bool? = nil, completion: @escaping (_ data: Bool?, _ error: Error?) -> Void) -``` - - - -Test serialization of outer boolean types - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let body = true // Bool | Input boolean as post body (optional) - -FakeAPI.fakeOuterBooleanSerialize(body: body) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | **Bool** | Input boolean as post body | [optional] - -### Return type - -**Bool** - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: */* - -[[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) - -# **fakeOuterCompositeSerialize** -```swift - open class func fakeOuterCompositeSerialize(body: OuterComposite? = nil, completion: @escaping (_ data: OuterComposite?, _ error: Error?) -> Void) -``` - - - -Test serialization of object with outer number type - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let body = OuterComposite(myNumber: 123, myString: "myString_example", myBoolean: false) // OuterComposite | Input composite as post body (optional) - -FakeAPI.fakeOuterCompositeSerialize(body: body) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**OuterComposite**](OuterComposite.md) | Input composite as post body | [optional] - -### Return type - -[**OuterComposite**](OuterComposite.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: */* - -[[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) - -# **fakeOuterNumberSerialize** -```swift - open class func fakeOuterNumberSerialize(body: Double? = nil, completion: @escaping (_ data: Double?, _ error: Error?) -> Void) -``` - - - -Test serialization of outer number types - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let body = 987 // Double | Input number as post body (optional) - -FakeAPI.fakeOuterNumberSerialize(body: body) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | **Double** | Input number as post body | [optional] - -### Return type - -**Double** - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: */* - -[[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) - -# **fakeOuterStringSerialize** -```swift - open class func fakeOuterStringSerialize(body: String? = nil, completion: @escaping (_ data: String?, _ error: Error?) -> Void) -``` - - - -Test serialization of outer string types - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let body = "body_example" // String | Input string as post body (optional) - -FakeAPI.fakeOuterStringSerialize(body: body) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | **String** | Input string as post body | [optional] - -### Return type - -**String** - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: */* - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **testBodyWithFileSchema** -```swift - open class func testBodyWithFileSchema(body: FileSchemaTestClass, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - - - -For this test, the body for this request much reference a schema named `File`. - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let body = FileSchemaTestClass(file: File(sourceURI: "sourceURI_example"), files: [File(sourceURI: "sourceURI_example")]) // FileSchemaTestClass | - -FakeAPI.testBodyWithFileSchema(body: body) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**FileSchemaTestClass**](FileSchemaTestClass.md) | | - -### Return type - -Void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **testBodyWithQueryParams** -```swift - open class func testBodyWithQueryParams(query: String, body: User, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - - - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let query = "query_example" // String | -let body = User(_id: 123, username: "username_example", firstName: "firstName_example", lastName: "lastName_example", email: "email_example", password: "password_example", phone: "phone_example", userStatus: 123) // User | - -FakeAPI.testBodyWithQueryParams(query: query, body: body) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **query** | **String** | | - **body** | [**User**](User.md) | | - -### Return type - -Void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **testClientModel** -```swift - open class func testClientModel(body: Client, completion: @escaping (_ data: Client?, _ error: Error?) -> Void) -``` - -To test \"client\" model - -To test \"client\" model - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let body = Client(client: "client_example") // Client | client model - -// To test \"client\" model -FakeAPI.testClientModel(body: body) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Client**](Client.md) | client model | - -### Return type - -[**Client**](Client.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **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) - -# **testEndpointParameters** -```swift - open class func testEndpointParameters(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - -Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - -Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let number = 987 // Double | None -let double = 987 // Double | None -let patternWithoutDelimiter = "patternWithoutDelimiter_example" // String | None -let byte = 987 // Data | None -let integer = 987 // Int | None (optional) -let int32 = 987 // Int | None (optional) -let int64 = 987 // Int64 | None (optional) -let float = 987 // Float | None (optional) -let string = "string_example" // String | None (optional) -let binary = URL(string: "https://example.com")! // URL | None (optional) -let date = Date() // Date | None (optional) -let dateTime = Date() // Date | None (optional) -let password = "password_example" // String | None (optional) -let callback = "callback_example" // String | None (optional) - -// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 -FakeAPI.testEndpointParameters(number: number, double: double, patternWithoutDelimiter: patternWithoutDelimiter, byte: byte, integer: integer, int32: int32, int64: int64, float: float, string: string, binary: binary, date: date, dateTime: dateTime, password: password, callback: callback) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **number** | **Double** | None | - **double** | **Double** | None | - **patternWithoutDelimiter** | **String** | None | - **byte** | **Data** | None | - **integer** | **Int** | None | [optional] - **int32** | **Int** | None | [optional] - **int64** | **Int64** | None | [optional] - **float** | **Float** | None | [optional] - **string** | **String** | None | [optional] - **binary** | **URL** | None | [optional] - **date** | **Date** | None | [optional] - **dateTime** | **Date** | None | [optional] - **password** | **String** | None | [optional] - **callback** | **String** | None | [optional] - -### Return type - -Void (empty response body) - -### Authorization - -[http_basic_test](../README.md#http_basic_test) - -### 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) - -# **testEnumParameters** -```swift - open class func testEnumParameters(enumHeaderStringArray: [String]? = nil, enumHeaderString: EnumHeaderString_testEnumParameters? = nil, enumQueryStringArray: [String]? = nil, enumQueryString: EnumQueryString_testEnumParameters? = nil, enumQueryInteger: EnumQueryInteger_testEnumParameters? = nil, enumQueryDouble: EnumQueryDouble_testEnumParameters? = nil, enumFormStringArray: [String]? = nil, enumFormString: EnumFormString_testEnumParameters? = nil, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - -To test enum parameters - -To test enum parameters - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let enumHeaderStringArray = ["enumHeaderStringArray_example"] // [String] | Header parameter enum test (string array) (optional) -let enumHeaderString = "enumHeaderString_example" // String | Header parameter enum test (string) (optional) (default to .efg) -let enumQueryStringArray = ["enumQueryStringArray_example"] // [String] | Query parameter enum test (string array) (optional) -let enumQueryString = "enumQueryString_example" // String | Query parameter enum test (string) (optional) (default to .efg) -let enumQueryInteger = 987 // Int | Query parameter enum test (double) (optional) -let enumQueryDouble = 987 // Double | Query parameter enum test (double) (optional) -let enumFormStringArray = ["inner_example"] // [String] | Form parameter enum test (string array) (optional) (default to .dollar) -let enumFormString = "enumFormString_example" // String | Form parameter enum test (string) (optional) (default to .efg) - -// To test enum parameters -FakeAPI.testEnumParameters(enumHeaderStringArray: enumHeaderStringArray, enumHeaderString: enumHeaderString, enumQueryStringArray: enumQueryStringArray, enumQueryString: enumQueryString, enumQueryInteger: enumQueryInteger, enumQueryDouble: enumQueryDouble, enumFormStringArray: enumFormStringArray, enumFormString: enumFormString) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **enumHeaderStringArray** | [**[String]**](String.md) | Header parameter enum test (string array) | [optional] - **enumHeaderString** | **String** | Header parameter enum test (string) | [optional] [default to .efg] - **enumQueryStringArray** | [**[String]**](String.md) | Query parameter enum test (string array) | [optional] - **enumQueryString** | **String** | Query parameter enum test (string) | [optional] [default to .efg] - **enumQueryInteger** | **Int** | Query parameter enum test (double) | [optional] - **enumQueryDouble** | **Double** | Query parameter enum test (double) | [optional] - **enumFormStringArray** | [**[String]**](String.md) | Form parameter enum test (string array) | [optional] [default to .dollar] - **enumFormString** | **String** | Form parameter enum test (string) | [optional] [default to .efg] - -### Return type - -Void (empty response body) - -### Authorization - -No authorization required - -### 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) - -# **testGroupParameters** -```swift - open class func testGroupParameters(requiredStringGroup: Int, requiredBooleanGroup: Bool, requiredInt64Group: Int64, stringGroup: Int? = nil, booleanGroup: Bool? = nil, int64Group: Int64? = nil, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - -Fake endpoint to test group parameters (optional) - -Fake endpoint to test group parameters (optional) - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let requiredStringGroup = 987 // Int | Required String in group parameters -let requiredBooleanGroup = true // Bool | Required Boolean in group parameters -let requiredInt64Group = 987 // Int64 | Required Integer in group parameters -let stringGroup = 987 // Int | String in group parameters (optional) -let booleanGroup = true // Bool | Boolean in group parameters (optional) -let int64Group = 987 // Int64 | Integer in group parameters (optional) - -// Fake endpoint to test group parameters (optional) -FakeAPI.testGroupParameters(requiredStringGroup: requiredStringGroup, requiredBooleanGroup: requiredBooleanGroup, requiredInt64Group: requiredInt64Group, stringGroup: stringGroup, booleanGroup: booleanGroup, int64Group: int64Group) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **requiredStringGroup** | **Int** | Required String in group parameters | - **requiredBooleanGroup** | **Bool** | Required Boolean in group parameters | - **requiredInt64Group** | **Int64** | Required Integer in group parameters | - **stringGroup** | **Int** | String in group parameters | [optional] - **booleanGroup** | **Bool** | Boolean in group parameters | [optional] - **int64Group** | **Int64** | Integer in group parameters | [optional] - -### Return type - -Void (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) - -# **testInlineAdditionalProperties** -```swift - open class func testInlineAdditionalProperties(param: [String:String], completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - -test inline additionalProperties - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let param = "TODO" // [String:String] | request body - -// test inline additionalProperties -FakeAPI.testInlineAdditionalProperties(param: param) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **param** | [**[String:String]**](String.md) | request body | - -### Return type - -Void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **testJsonFormData** -```swift - open class func testJsonFormData(param: String, param2: String, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - -test json serialization of form data - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let param = "param_example" // String | field1 -let param2 = "param2_example" // String | field2 - -// test json serialization of form data -FakeAPI.testJsonFormData(param: param, param2: param2) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **param** | **String** | field1 | - **param2** | **String** | field2 | - -### Return type - -Void (empty response body) - -### Authorization - -No authorization required - -### 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) - diff --git a/samples/client/petstore/swift4/objcCompatible/docs/FakeClassnameTags123API.md b/samples/client/petstore/swift4/objcCompatible/docs/FakeClassnameTags123API.md deleted file mode 100644 index 9f24b46edbc3..000000000000 --- a/samples/client/petstore/swift4/objcCompatible/docs/FakeClassnameTags123API.md +++ /dev/null @@ -1,59 +0,0 @@ -# FakeClassnameTags123API - -All URIs are relative to *http://petstore.swagger.io:80/v2* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**testClassname**](FakeClassnameTags123API.md#testclassname) | **PATCH** /fake_classname_test | To test class name in snake case - - -# **testClassname** -```swift - open class func testClassname(body: Client, completion: @escaping (_ data: Client?, _ error: Error?) -> Void) -``` - -To test class name in snake case - -To test class name in snake case - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let body = Client(client: "client_example") // Client | client model - -// To test class name in snake case -FakeClassnameTags123API.testClassname(body: body) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Client**](Client.md) | client model | - -### Return type - -[**Client**](Client.md) - -### Authorization - -[api_key_query](../README.md#api_key_query) - -### HTTP request headers - - - **Content-Type**: application/json - - **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/swift4/objcCompatible/docs/File.md b/samples/client/petstore/swift4/objcCompatible/docs/File.md deleted file mode 100644 index 3edfef17b794..000000000000 --- a/samples/client/petstore/swift4/objcCompatible/docs/File.md +++ /dev/null @@ -1,10 +0,0 @@ -# File - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**sourceURI** | **String** | Test capitalization | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/samples/client/petstore/swift4/objcCompatible/docs/FileSchemaTestClass.md b/samples/client/petstore/swift4/objcCompatible/docs/FileSchemaTestClass.md deleted file mode 100644 index afdacc60b2c3..000000000000 --- a/samples/client/petstore/swift4/objcCompatible/docs/FileSchemaTestClass.md +++ /dev/null @@ -1,11 +0,0 @@ -# FileSchemaTestClass - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**file** | [**File**](File.md) | | [optional] -**files** | [File] | | [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/swift4/objcCompatible/docs/FormatTest.md b/samples/client/petstore/swift4/objcCompatible/docs/FormatTest.md deleted file mode 100644 index f74d94f6c46a..000000000000 --- a/samples/client/petstore/swift4/objcCompatible/docs/FormatTest.md +++ /dev/null @@ -1,22 +0,0 @@ -# FormatTest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**integer** | **Int** | | [optional] -**int32** | **Int** | | [optional] -**int64** | **Int64** | | [optional] -**number** | **Double** | | -**float** | **Float** | | [optional] -**double** | **Double** | | [optional] -**string** | **String** | | [optional] -**byte** | **Data** | | -**binary** | **URL** | | [optional] -**date** | **Date** | | -**dateTime** | **Date** | | [optional] -**uuid** | **UUID** | | [optional] -**password** | **String** | | - -[[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/swift4/objcCompatible/docs/HasOnlyReadOnly.md b/samples/client/petstore/swift4/objcCompatible/docs/HasOnlyReadOnly.md deleted file mode 100644 index 57b6e3a17e67..000000000000 --- a/samples/client/petstore/swift4/objcCompatible/docs/HasOnlyReadOnly.md +++ /dev/null @@ -1,11 +0,0 @@ -# HasOnlyReadOnly - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**bar** | **String** | | [optional] [readonly] -**foo** | **String** | | [optional] [readonly] - -[[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/swift4/objcCompatible/docs/List.md b/samples/client/petstore/swift4/objcCompatible/docs/List.md deleted file mode 100644 index b77718302edf..000000000000 --- a/samples/client/petstore/swift4/objcCompatible/docs/List.md +++ /dev/null @@ -1,10 +0,0 @@ -# List - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**_123list** | **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/swift4/objcCompatible/docs/MapTest.md b/samples/client/petstore/swift4/objcCompatible/docs/MapTest.md deleted file mode 100644 index 56213c4113f6..000000000000 --- a/samples/client/petstore/swift4/objcCompatible/docs/MapTest.md +++ /dev/null @@ -1,13 +0,0 @@ -# MapTest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**mapMapOfString** | [String:[String:String]] | | [optional] -**mapOfEnumString** | **[String:String]** | | [optional] -**directMap** | **[String:Bool]** | | [optional] -**indirectMap** | [**StringBooleanMap**](StringBooleanMap.md) | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/samples/client/petstore/swift4/objcCompatible/docs/MixedPropertiesAndAdditionalPropertiesClass.md b/samples/client/petstore/swift4/objcCompatible/docs/MixedPropertiesAndAdditionalPropertiesClass.md deleted file mode 100644 index fcffb8ecdbf3..000000000000 --- a/samples/client/petstore/swift4/objcCompatible/docs/MixedPropertiesAndAdditionalPropertiesClass.md +++ /dev/null @@ -1,12 +0,0 @@ -# MixedPropertiesAndAdditionalPropertiesClass - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**uuid** | **UUID** | | [optional] -**dateTime** | **Date** | | [optional] -**map** | [String:Animal] | | [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/swift4/objcCompatible/docs/Model200Response.md b/samples/client/petstore/swift4/objcCompatible/docs/Model200Response.md deleted file mode 100644 index 5865ea690cc3..000000000000 --- a/samples/client/petstore/swift4/objcCompatible/docs/Model200Response.md +++ /dev/null @@ -1,11 +0,0 @@ -# Model200Response - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **Int** | | [optional] -**_class** | **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/swift4/objcCompatible/docs/Name.md b/samples/client/petstore/swift4/objcCompatible/docs/Name.md deleted file mode 100644 index f7b180292cd6..000000000000 --- a/samples/client/petstore/swift4/objcCompatible/docs/Name.md +++ /dev/null @@ -1,13 +0,0 @@ -# Name - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **Int** | | -**snakeCase** | **Int** | | [optional] [readonly] -**property** | **String** | | [optional] -**_123number** | **Int** | | [optional] [readonly] - -[[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/swift4/objcCompatible/docs/NumberOnly.md b/samples/client/petstore/swift4/objcCompatible/docs/NumberOnly.md deleted file mode 100644 index 72bd361168b5..000000000000 --- a/samples/client/petstore/swift4/objcCompatible/docs/NumberOnly.md +++ /dev/null @@ -1,10 +0,0 @@ -# NumberOnly - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**justNumber** | **Double** | | [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/swift4/objcCompatible/docs/Order.md b/samples/client/petstore/swift4/objcCompatible/docs/Order.md deleted file mode 100644 index 006916ec7411..000000000000 --- a/samples/client/petstore/swift4/objcCompatible/docs/Order.md +++ /dev/null @@ -1,15 +0,0 @@ -# Order - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**_id** | **Int64** | | [optional] -**petId** | **Int64** | | [optional] -**quantity** | **Int** | | [optional] -**shipDate** | **Date** | | [optional] -**status** | **String** | Order Status | [optional] -**complete** | **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/swift4/objcCompatible/docs/OuterComposite.md b/samples/client/petstore/swift4/objcCompatible/docs/OuterComposite.md deleted file mode 100644 index d6b3583bc3ff..000000000000 --- a/samples/client/petstore/swift4/objcCompatible/docs/OuterComposite.md +++ /dev/null @@ -1,12 +0,0 @@ -# OuterComposite - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**myNumber** | **Double** | | [optional] -**myString** | **String** | | [optional] -**myBoolean** | **Bool** | | [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/swift4/objcCompatible/docs/OuterEnum.md b/samples/client/petstore/swift4/objcCompatible/docs/OuterEnum.md deleted file mode 100644 index 06d413b01680..000000000000 --- a/samples/client/petstore/swift4/objcCompatible/docs/OuterEnum.md +++ /dev/null @@ -1,9 +0,0 @@ -# OuterEnum - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/samples/client/petstore/swift4/objcCompatible/docs/Pet.md b/samples/client/petstore/swift4/objcCompatible/docs/Pet.md deleted file mode 100644 index 26c07cc4ba73..000000000000 --- a/samples/client/petstore/swift4/objcCompatible/docs/Pet.md +++ /dev/null @@ -1,15 +0,0 @@ -# Pet - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**_id** | **Int64** | | [optional] -**category** | [**Category**](Category.md) | | [optional] -**name** | **String** | | -**photoUrls** | **[String]** | | -**tags** | [Tag] | | [optional] -**status** | **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/swift4/objcCompatible/docs/PetAPI.md b/samples/client/petstore/swift4/objcCompatible/docs/PetAPI.md deleted file mode 100644 index c03e60bc084e..000000000000 --- a/samples/client/petstore/swift4/objcCompatible/docs/PetAPI.md +++ /dev/null @@ -1,469 +0,0 @@ -# PetAPI - -All URIs are relative to *http://petstore.swagger.io:80/v2* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**addPet**](PetAPI.md#addpet) | **POST** /pet | Add a new pet to the store -[**deletePet**](PetAPI.md#deletepet) | **DELETE** /pet/{petId} | Deletes a pet -[**findPetsByStatus**](PetAPI.md#findpetsbystatus) | **GET** /pet/findByStatus | Finds Pets by status -[**findPetsByTags**](PetAPI.md#findpetsbytags) | **GET** /pet/findByTags | Finds Pets by tags -[**getPetById**](PetAPI.md#getpetbyid) | **GET** /pet/{petId} | Find pet by ID -[**updatePet**](PetAPI.md#updatepet) | **PUT** /pet | Update an existing pet -[**updatePetWithForm**](PetAPI.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data -[**uploadFile**](PetAPI.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image -[**uploadFileWithRequiredFile**](PetAPI.md#uploadfilewithrequiredfile) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required) - - -# **addPet** -```swift - open class func addPet(body: Pet, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - -Add a new pet to the store - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let body = Pet(_id: 123, category: Category(_id: 123, name: "name_example"), name: "name_example", photoUrls: ["photoUrls_example"], tags: [Tag(_id: 123, name: "name_example")], status: "status_example") // Pet | Pet object that needs to be added to the store - -// Add a new pet to the store -PetAPI.addPet(body: body) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Pet**](Pet.md) | Pet object that needs to be added to the store | - -### Return type - -Void (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) - -# **deletePet** -```swift - open class func deletePet(petId: Int64, apiKey: String? = nil, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - -Deletes a pet - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let petId = 987 // Int64 | Pet id to delete -let apiKey = "apiKey_example" // String | (optional) - -// Deletes a pet -PetAPI.deletePet(petId: petId, apiKey: apiKey) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Int64** | Pet id to delete | - **apiKey** | **String** | | [optional] - -### Return type - -Void (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) - -# **findPetsByStatus** -```swift - open class func findPetsByStatus(status: [String], completion: @escaping (_ data: [Pet]?, _ error: Error?) -> Void) -``` - -Finds Pets by status - -Multiple status values can be provided with comma separated strings - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let status = ["status_example"] // [String] | Status values that need to be considered for filter - -// Finds Pets by status -PetAPI.findPetsByStatus(status: status) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **status** | [**[String]**](String.md) | Status values that need to be considered for filter | - -### Return type - -[**[Pet]**](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) - -# **findPetsByTags** -```swift - open class func findPetsByTags(tags: [String], completion: @escaping (_ data: [Pet]?, _ error: Error?) -> Void) -``` - -Finds Pets by tags - -Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let tags = ["inner_example"] // [String] | Tags to filter by - -// Finds Pets by tags -PetAPI.findPetsByTags(tags: tags) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **tags** | [**[String]**](String.md) | Tags to filter by | - -### Return type - -[**[Pet]**](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) - -# **getPetById** -```swift - open class func getPetById(petId: Int64, completion: @escaping (_ data: Pet?, _ error: Error?) -> Void) -``` - -Find pet by ID - -Returns a single pet - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let petId = 987 // Int64 | ID of pet to return - -// Find pet by ID -PetAPI.getPetById(petId: petId) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Int64** | ID of pet to return | - -### Return type - -[**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) - -# **updatePet** -```swift - open class func updatePet(body: Pet, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - -Update an existing pet - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let body = Pet(_id: 123, category: Category(_id: 123, name: "name_example"), name: "name_example", photoUrls: ["photoUrls_example"], tags: [Tag(_id: 123, name: "name_example")], status: "status_example") // Pet | Pet object that needs to be added to the store - -// Update an existing pet -PetAPI.updatePet(body: body) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Pet**](Pet.md) | Pet object that needs to be added to the store | - -### Return type - -Void (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) - -# **updatePetWithForm** -```swift - open class func updatePetWithForm(petId: Int64, name: String? = nil, status: String? = nil, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - -Updates a pet in the store with form data - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let petId = 987 // Int64 | ID of pet that needs to be updated -let name = "name_example" // String | Updated name of the pet (optional) -let status = "status_example" // String | Updated status of the pet (optional) - -// Updates a pet in the store with form data -PetAPI.updatePetWithForm(petId: petId, name: name, status: status) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Int64** | ID of pet that needs to be updated | - **name** | **String** | Updated name of the pet | [optional] - **status** | **String** | Updated status of the pet | [optional] - -### Return type - -Void (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) - -# **uploadFile** -```swift - open class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil, completion: @escaping (_ data: ApiResponse?, _ error: Error?) -> Void) -``` - -uploads an image - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let petId = 987 // Int64 | ID of pet to update -let additionalMetadata = "additionalMetadata_example" // String | Additional data to pass to server (optional) -let file = URL(string: "https://example.com")! // URL | file to upload (optional) - -// uploads an image -PetAPI.uploadFile(petId: petId, additionalMetadata: additionalMetadata, file: file) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Int64** | ID of pet to update | - **additionalMetadata** | **String** | Additional data to pass to server | [optional] - **file** | **URL** | file to upload | [optional] - -### Return type - -[**ApiResponse**](ApiResponse.md) - -### Authorization - -[petstore_auth](../README.md#petstore_auth) - -### HTTP request headers - - - **Content-Type**: multipart/form-data - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **uploadFileWithRequiredFile** -```swift - open class func uploadFileWithRequiredFile(petId: Int64, requiredFile: URL, additionalMetadata: String? = nil, completion: @escaping (_ data: ApiResponse?, _ error: Error?) -> Void) -``` - -uploads an image (required) - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let petId = 987 // Int64 | ID of pet to update -let requiredFile = URL(string: "https://example.com")! // URL | file to upload -let additionalMetadata = "additionalMetadata_example" // String | Additional data to pass to server (optional) - -// uploads an image (required) -PetAPI.uploadFileWithRequiredFile(petId: petId, requiredFile: requiredFile, additionalMetadata: additionalMetadata) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Int64** | ID of pet to update | - **requiredFile** | **URL** | file to upload | - **additionalMetadata** | **String** | Additional data to pass to server | [optional] - -### Return type - -[**ApiResponse**](ApiResponse.md) - -### Authorization - -[petstore_auth](../README.md#petstore_auth) - -### HTTP request headers - - - **Content-Type**: multipart/form-data - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/samples/client/petstore/swift4/objcCompatible/docs/ReadOnlyFirst.md b/samples/client/petstore/swift4/objcCompatible/docs/ReadOnlyFirst.md deleted file mode 100644 index ed537b87598b..000000000000 --- a/samples/client/petstore/swift4/objcCompatible/docs/ReadOnlyFirst.md +++ /dev/null @@ -1,11 +0,0 @@ -# ReadOnlyFirst - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**bar** | **String** | | [optional] [readonly] -**baz** | **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/swift4/objcCompatible/docs/Return.md b/samples/client/petstore/swift4/objcCompatible/docs/Return.md deleted file mode 100644 index 66d17c27c887..000000000000 --- a/samples/client/petstore/swift4/objcCompatible/docs/Return.md +++ /dev/null @@ -1,10 +0,0 @@ -# Return - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**_return** | **Int** | | [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/swift4/objcCompatible/docs/SpecialModelName.md b/samples/client/petstore/swift4/objcCompatible/docs/SpecialModelName.md deleted file mode 100644 index 3ec27a38c2ac..000000000000 --- a/samples/client/petstore/swift4/objcCompatible/docs/SpecialModelName.md +++ /dev/null @@ -1,10 +0,0 @@ -# SpecialModelName - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**specialPropertyName** | **Int64** | | [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/swift4/objcCompatible/docs/StoreAPI.md b/samples/client/petstore/swift4/objcCompatible/docs/StoreAPI.md deleted file mode 100644 index ba59be9d5433..000000000000 --- a/samples/client/petstore/swift4/objcCompatible/docs/StoreAPI.md +++ /dev/null @@ -1,206 +0,0 @@ -# StoreAPI - -All URIs are relative to *http://petstore.swagger.io:80/v2* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**deleteOrder**](StoreAPI.md#deleteorder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID -[**getInventory**](StoreAPI.md#getinventory) | **GET** /store/inventory | Returns pet inventories by status -[**getOrderById**](StoreAPI.md#getorderbyid) | **GET** /store/order/{order_id} | Find purchase order by ID -[**placeOrder**](StoreAPI.md#placeorder) | **POST** /store/order | Place an order for a pet - - -# **deleteOrder** -```swift - open class func deleteOrder(orderId: String, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - -Delete purchase order by ID - -For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let orderId = "orderId_example" // String | ID of the order that needs to be deleted - -// Delete purchase order by ID -StoreAPI.deleteOrder(orderId: orderId) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **orderId** | **String** | ID of the order that needs to be deleted | - -### Return type - -Void (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) - -# **getInventory** -```swift - open class func getInventory(completion: @escaping (_ data: [String:Int]?, _ error: Error?) -> Void) -``` - -Returns pet inventories by status - -Returns a map of status codes to quantities - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - - -// Returns pet inventories by status -StoreAPI.getInventory() { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -**[String:Int]** - -### 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) - -# **getOrderById** -```swift - open class func getOrderById(orderId: Int64, completion: @escaping (_ data: Order?, _ error: Error?) -> Void) -``` - -Find purchase order by ID - -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let orderId = 987 // Int64 | ID of pet that needs to be fetched - -// Find purchase order by ID -StoreAPI.getOrderById(orderId: orderId) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **orderId** | **Int64** | ID of pet that needs to be fetched | - -### Return type - -[**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) - -# **placeOrder** -```swift - open class func placeOrder(body: Order, completion: @escaping (_ data: Order?, _ error: Error?) -> Void) -``` - -Place an order for a pet - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let body = Order(_id: 123, petId: 123, quantity: 123, shipDate: Date(), status: "status_example", complete: false) // Order | order placed for purchasing the pet - -// Place an order for a pet -StoreAPI.placeOrder(body: body) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Order**](Order.md) | order placed for purchasing the pet | - -### Return type - -[**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/swift4/objcCompatible/docs/StringBooleanMap.md b/samples/client/petstore/swift4/objcCompatible/docs/StringBooleanMap.md deleted file mode 100644 index 7abf11ec68b1..000000000000 --- a/samples/client/petstore/swift4/objcCompatible/docs/StringBooleanMap.md +++ /dev/null @@ -1,9 +0,0 @@ -# StringBooleanMap - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/samples/client/petstore/swift4/objcCompatible/docs/Tag.md b/samples/client/petstore/swift4/objcCompatible/docs/Tag.md deleted file mode 100644 index 24a050117abc..000000000000 --- a/samples/client/petstore/swift4/objcCompatible/docs/Tag.md +++ /dev/null @@ -1,11 +0,0 @@ -# Tag - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**_id** | **Int64** | | [optional] -**name** | **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/swift4/objcCompatible/docs/TypeHolderDefault.md b/samples/client/petstore/swift4/objcCompatible/docs/TypeHolderDefault.md deleted file mode 100644 index 5161394bdc3e..000000000000 --- a/samples/client/petstore/swift4/objcCompatible/docs/TypeHolderDefault.md +++ /dev/null @@ -1,14 +0,0 @@ -# TypeHolderDefault - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**stringItem** | **String** | | [default to "what"] -**numberItem** | **Double** | | -**integerItem** | **Int** | | -**boolItem** | **Bool** | | [default to true] -**arrayItem** | **[Int]** | | - -[[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/swift4/objcCompatible/docs/TypeHolderExample.md b/samples/client/petstore/swift4/objcCompatible/docs/TypeHolderExample.md deleted file mode 100644 index 46d0471cd71a..000000000000 --- a/samples/client/petstore/swift4/objcCompatible/docs/TypeHolderExample.md +++ /dev/null @@ -1,14 +0,0 @@ -# TypeHolderExample - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**stringItem** | **String** | | -**numberItem** | **Double** | | -**integerItem** | **Int** | | -**boolItem** | **Bool** | | -**arrayItem** | **[Int]** | | - -[[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/swift4/objcCompatible/docs/User.md b/samples/client/petstore/swift4/objcCompatible/docs/User.md deleted file mode 100644 index a8791643e76d..000000000000 --- a/samples/client/petstore/swift4/objcCompatible/docs/User.md +++ /dev/null @@ -1,17 +0,0 @@ -# User - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**_id** | **Int64** | | [optional] -**username** | **String** | | [optional] -**firstName** | **String** | | [optional] -**lastName** | **String** | | [optional] -**email** | **String** | | [optional] -**password** | **String** | | [optional] -**phone** | **String** | | [optional] -**userStatus** | **Int** | 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/swift4/objcCompatible/docs/UserAPI.md b/samples/client/petstore/swift4/objcCompatible/docs/UserAPI.md deleted file mode 100644 index 18e233420ab3..000000000000 --- a/samples/client/petstore/swift4/objcCompatible/docs/UserAPI.md +++ /dev/null @@ -1,406 +0,0 @@ -# UserAPI - -All URIs are relative to *http://petstore.swagger.io:80/v2* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**createUser**](UserAPI.md#createuser) | **POST** /user | Create user -[**createUsersWithArrayInput**](UserAPI.md#createuserswitharrayinput) | **POST** /user/createWithArray | Creates list of users with given input array -[**createUsersWithListInput**](UserAPI.md#createuserswithlistinput) | **POST** /user/createWithList | Creates list of users with given input array -[**deleteUser**](UserAPI.md#deleteuser) | **DELETE** /user/{username} | Delete user -[**getUserByName**](UserAPI.md#getuserbyname) | **GET** /user/{username} | Get user by user name -[**loginUser**](UserAPI.md#loginuser) | **GET** /user/login | Logs user into the system -[**logoutUser**](UserAPI.md#logoutuser) | **GET** /user/logout | Logs out current logged in user session -[**updateUser**](UserAPI.md#updateuser) | **PUT** /user/{username} | Updated user - - -# **createUser** -```swift - open class func createUser(body: User, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - -Create user - -This can only be done by the logged in user. - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let body = User(_id: 123, username: "username_example", firstName: "firstName_example", lastName: "lastName_example", email: "email_example", password: "password_example", phone: "phone_example", userStatus: 123) // User | Created user object - -// Create user -UserAPI.createUser(body: body) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**User**](User.md) | Created user object | - -### Return type - -Void (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) - -# **createUsersWithArrayInput** -```swift - open class func createUsersWithArrayInput(body: [User], completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - -Creates list of users with given input array - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let body = [User(_id: 123, username: "username_example", firstName: "firstName_example", lastName: "lastName_example", email: "email_example", password: "password_example", phone: "phone_example", userStatus: 123)] // [User] | List of user object - -// Creates list of users with given input array -UserAPI.createUsersWithArrayInput(body: body) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**[User]**](User.md) | List of user object | - -### Return type - -Void (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) - -# **createUsersWithListInput** -```swift - open class func createUsersWithListInput(body: [User], completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - -Creates list of users with given input array - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let body = [User(_id: 123, username: "username_example", firstName: "firstName_example", lastName: "lastName_example", email: "email_example", password: "password_example", phone: "phone_example", userStatus: 123)] // [User] | List of user object - -// Creates list of users with given input array -UserAPI.createUsersWithListInput(body: body) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**[User]**](User.md) | List of user object | - -### Return type - -Void (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) - -# **deleteUser** -```swift - open class func deleteUser(username: String, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - -Delete user - -This can only be done by the logged in user. - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let username = "username_example" // String | The name that needs to be deleted - -// Delete user -UserAPI.deleteUser(username: username) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **String** | The name that needs to be deleted | - -### Return type - -Void (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) - -# **getUserByName** -```swift - open class func getUserByName(username: String, completion: @escaping (_ data: User?, _ error: Error?) -> Void) -``` - -Get user by user name - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let username = "username_example" // String | The name that needs to be fetched. Use user1 for testing. - -// Get user by user name -UserAPI.getUserByName(username: username) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **String** | The name that needs to be fetched. Use user1 for testing. | - -### Return type - -[**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) - -# **loginUser** -```swift - open class func loginUser(username: String, password: String, completion: @escaping (_ data: String?, _ error: Error?) -> Void) -``` - -Logs user into the system - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let username = "username_example" // String | The user name for login -let password = "password_example" // String | The password for login in clear text - -// Logs user into the system -UserAPI.loginUser(username: username, password: password) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **String** | The user name for login | - **password** | **String** | The password for login in clear text | - -### 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) - -# **logoutUser** -```swift - open class func logoutUser(completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - -Logs out current logged in user session - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - - -// Logs out current logged in user session -UserAPI.logoutUser() { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -Void (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) - -# **updateUser** -```swift - open class func updateUser(username: String, body: User, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - -Updated user - -This can only be done by the logged in user. - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let username = "username_example" // String | name that need to be deleted -let body = User(_id: 123, username: "username_example", firstName: "firstName_example", lastName: "lastName_example", email: "email_example", password: "password_example", phone: "phone_example", userStatus: 123) // User | Updated user object - -// Updated user -UserAPI.updateUser(username: username, body: body) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **String** | name that need to be deleted | - **body** | [**User**](User.md) | Updated user object | - -### Return type - -Void (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/swift4/objcCompatible/git_push.sh b/samples/client/petstore/swift4/objcCompatible/git_push.sh deleted file mode 100644 index ced3be2b0c7b..000000000000 --- a/samples/client/petstore/swift4/objcCompatible/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/swift4/objcCompatible/pom.xml b/samples/client/petstore/swift4/objcCompatible/pom.xml deleted file mode 100644 index 5caba9cb4633..000000000000 --- a/samples/client/petstore/swift4/objcCompatible/pom.xml +++ /dev/null @@ -1,43 +0,0 @@ - - 4.0.0 - io.swagger - Swift4PetstoreClientTests - pom - 1.0-SNAPSHOT - Swift4 Swagger Petstore Client - - - - maven-dependency-plugin - - - package - - copy-dependencies - - - ${project.build.directory} - - - - - - org.codehaus.mojo - exec-maven-plugin - 1.2.1 - - - xcodebuild-test - integration-test - - exec - - - ./run_spmbuild.sh - - - - - - - diff --git a/samples/client/petstore/swift4/objcCompatible/project.yml b/samples/client/petstore/swift4/objcCompatible/project.yml deleted file mode 100644 index 148b42517be9..000000000000 --- a/samples/client/petstore/swift4/objcCompatible/project.yml +++ /dev/null @@ -1,15 +0,0 @@ -name: PetstoreClient -targets: - PetstoreClient: - type: framework - platform: iOS - deploymentTarget: "10.0" - sources: [PetstoreClient] - info: - path: ./Info.plist - version: 1.0.0 - settings: - APPLICATION_EXTENSION_API_ONLY: true - scheme: {} - dependencies: - - carthage: Alamofire diff --git a/samples/client/petstore/swift4/objcCompatible/run_spmbuild.sh b/samples/client/petstore/swift4/objcCompatible/run_spmbuild.sh deleted file mode 100755 index 1a9f585ad054..000000000000 --- a/samples/client/petstore/swift4/objcCompatible/run_spmbuild.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -swift build && exit ${PIPESTATUS[0]} diff --git a/samples/client/petstore/swift4/promisekitLibrary/.gitignore b/samples/client/petstore/swift4/promisekitLibrary/.gitignore deleted file mode 100644 index 5e5d5cebcf47..000000000000 --- a/samples/client/petstore/swift4/promisekitLibrary/.gitignore +++ /dev/null @@ -1,63 +0,0 @@ -# Xcode -# -# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore - -## Build generated -build/ -DerivedData - -## Various settings -*.pbxuser -!default.pbxuser -*.mode1v3 -!default.mode1v3 -*.mode2v3 -!default.mode2v3 -*.perspectivev3 -!default.perspectivev3 -xcuserdata - -## Other -*.xccheckout -*.moved-aside -*.xcuserstate -*.xcscmblueprint - -## Obj-C/Swift specific -*.hmap -*.ipa - -## Playgrounds -timeline.xctimeline -playground.xcworkspace - -# Swift Package Manager -# -# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. -# Packages/ -.build/ - -# CocoaPods -# -# We recommend against adding the Pods directory to your .gitignore. However -# you should judge for yourself, the pros and cons are mentioned at: -# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control -# -# Pods/ - -# Carthage -# -# Add this line if you want to avoid checking in source code from Carthage dependencies. -# Carthage/Checkouts - -Carthage/Build - -# fastlane -# -# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the -# screenshots whenever they are needed. -# For more information about the recommended setup visit: -# https://github.com/fastlane/fastlane/blob/master/docs/Gitignore.md - -fastlane/report.xml -fastlane/screenshots diff --git a/samples/client/petstore/swift4/promisekitLibrary/.openapi-generator-ignore b/samples/client/petstore/swift4/promisekitLibrary/.openapi-generator-ignore deleted file mode 100644 index 7484ee590a38..000000000000 --- a/samples/client/petstore/swift4/promisekitLibrary/.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/swift4/promisekitLibrary/.openapi-generator/VERSION b/samples/client/petstore/swift4/promisekitLibrary/.openapi-generator/VERSION deleted file mode 100644 index b5d898602c2c..000000000000 --- a/samples/client/petstore/swift4/promisekitLibrary/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -4.3.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/swift4/promisekitLibrary/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata b/samples/client/petstore/swift4/promisekitLibrary/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 919434a6254f..000000000000 --- a/samples/client/petstore/swift4/promisekitLibrary/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/samples/client/petstore/swift4/promisekitLibrary/Cartfile b/samples/client/petstore/swift4/promisekitLibrary/Cartfile deleted file mode 100644 index 91e7f6005189..000000000000 --- a/samples/client/petstore/swift4/promisekitLibrary/Cartfile +++ /dev/null @@ -1,2 +0,0 @@ -github "Alamofire/Alamofire" ~> 4.9.0 -github "mxcl/PromiseKit" ~> 6.11.0 diff --git a/samples/client/petstore/swift4/promisekitLibrary/Info.plist b/samples/client/petstore/swift4/promisekitLibrary/Info.plist deleted file mode 100644 index 323e5ecfc420..000000000000 --- a/samples/client/petstore/swift4/promisekitLibrary/Info.plist +++ /dev/null @@ -1,22 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.0 - CFBundleVersion - 1 - - diff --git a/samples/client/petstore/swift4/promisekitLibrary/Package.resolved b/samples/client/petstore/swift4/promisekitLibrary/Package.resolved deleted file mode 100644 index 1537327e9535..000000000000 --- a/samples/client/petstore/swift4/promisekitLibrary/Package.resolved +++ /dev/null @@ -1,25 +0,0 @@ -{ - "object": { - "pins": [ - { - "package": "Alamofire", - "repositoryURL": "https://github.com/Alamofire/Alamofire.git", - "state": { - "branch": null, - "revision": "747c8db8d57b68d5e35275f10c92d55f982adbd4", - "version": "4.9.1" - } - }, - { - "package": "PromiseKit", - "repositoryURL": "https://github.com/mxcl/PromiseKit.git", - "state": { - "branch": null, - "revision": "80963d4317bcdc03891e0fbaa744f20511d1bc08", - "version": "6.12.0" - } - } - ] - }, - "version": 1 -} diff --git a/samples/client/petstore/swift4/promisekitLibrary/Package.swift b/samples/client/petstore/swift4/promisekitLibrary/Package.swift deleted file mode 100644 index 7ba5c67b456c..000000000000 --- a/samples/client/petstore/swift4/promisekitLibrary/Package.swift +++ /dev/null @@ -1,28 +0,0 @@ -// swift-tools-version:4.2 -// The swift-tools-version declares the minimum version of Swift required to build this package. - -import PackageDescription - -let package = Package( - name: "PetstoreClient", - products: [ - // Products define the executables and libraries produced by a package, and make them visible to other packages. - .library( - name: "PetstoreClient", - targets: ["PetstoreClient"]) - ], - dependencies: [ - // Dependencies declare other packages that this package depends on. - .package(url: "https://github.com/Alamofire/Alamofire.git", from: "4.9.0"), - .package(url: "https://github.com/mxcl/PromiseKit.git", from: "6.11.0") - ], - targets: [ - // Targets are the basic building blocks of a package. A target can define a module or a test suite. - // Targets can depend on other targets in this package, and on products in packages which this package depends on. - .target( - name: "PetstoreClient", - dependencies: ["Alamofire", "PromiseKit"], - path: "PetstoreClient/Classes" - ) - ] -) diff --git a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient.podspec b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient.podspec deleted file mode 100644 index 373b3f26afc8..000000000000 --- a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient.podspec +++ /dev/null @@ -1,15 +0,0 @@ -Pod::Spec.new do |s| - s.name = 'PetstoreClient' - s.ios.deployment_target = '9.0' - s.osx.deployment_target = '10.11' - s.tvos.deployment_target = '9.0' - s.version = '1.0.0' - s.source = { :git => 'git@github.com:OpenAPITools/openapi-generator.git', :tag => 'v1.0.0' } - s.authors = '' - s.license = 'Proprietary' - s.homepage = 'https://github.com/openapitools/openapi-generator' - s.summary = 'PetstoreClient' - s.source_files = 'PetstoreClient/Classes/**/*.swift' - s.dependency 'PromiseKit/CorePromise', '~> 6.11.0' - s.dependency 'Alamofire', '~> 4.9.0' -end diff --git a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient.xcodeproj/project.pbxproj b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient.xcodeproj/project.pbxproj deleted file mode 100644 index c2e04850669d..000000000000 --- a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient.xcodeproj/project.pbxproj +++ /dev/null @@ -1,580 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 51; - objects = { - -/* Begin PBXBuildFile section */ - 0299339D13C3571C4C57368A /* ApiResponse.swift in Sources */ = {isa = PBXBuildFile; fileRef = A8E7B833748B4F0C7CDA90C6 /* ApiResponse.swift */; }; - 081C0B80A989B1AAF2665121 /* MapTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7986861626C2B1CB49AD7000 /* MapTest.swift */; }; - 0C1E4C682F2D0AF7D9E431EE /* Dog.swift in Sources */ = {isa = PBXBuildFile; fileRef = C6C3E1129526A353B963EFD7 /* Dog.swift */; }; - 0E6932F1C55BA6880693C478 /* Order.swift in Sources */ = {isa = PBXBuildFile; fileRef = 27B2E9EF856E89FEAA359A3A /* Order.swift */; }; - 1E6C7C7F271A802DF8099330 /* APIHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 897716962D472FE162B723CB /* APIHelper.swift */; }; - 22FA6CA58E58550DE36AE750 /* JSONEncodableEncoding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9791B840B8D6EAA35343B00F /* JSONEncodableEncoding.swift */; }; - 248F2F0F29E8FDAE9CAD64C5 /* AdditionalPropertiesClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 396DEF3156BA0D12D0FC5C3C /* AdditionalPropertiesClass.swift */; }; - 269E3103C458C78EA5726EE2 /* Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = B8C298FC8929DCB369053F11 /* Extensions.swift */; }; - 294CDFA409BC369C0FDC5FB3 /* SpecialModelName.swift in Sources */ = {isa = PBXBuildFile; fileRef = 386FD590658E90509C121118 /* SpecialModelName.swift */; }; - 2B441CDFFFDDB343C04F5375 /* Animal.swift in Sources */ = {isa = PBXBuildFile; fileRef = 95568E7C35F119EB4A12B498 /* Animal.swift */; }; - 2C29D5B60E00DDA3878F1BDE /* Pet.swift in Sources */ = {isa = PBXBuildFile; fileRef = ECFEB4C6C257B3BB3CEA36D1 /* Pet.swift */; }; - 31DFF71D8CCCA0D2D2F8AC90 /* User.swift in Sources */ = {isa = PBXBuildFile; fileRef = E5565A447062C7B8F695F451 /* User.swift */; }; - 34C26979F4678B5B579D26E8 /* FakeClassnameTags123API.swift in Sources */ = {isa = PBXBuildFile; fileRef = B42354B407EC173BEB54E042 /* FakeClassnameTags123API.swift */; }; - 3691B017D3AA18404A563C67 /* ArrayOfNumberOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = B65BB72353DA24536A9049BE /* ArrayOfNumberOnly.swift */; }; - 37DEADD6CD0496690725B8A7 /* Name.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5AD994DFAA0DA93C188A4DBA /* Name.swift */; }; - 40E3027D2E38D8329C6AB01F /* APIs.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37DF825B8F3BADA2B2537D17 /* APIs.swift */; }; - 40E46046D2B16D1A672A08E3 /* AlamofireImplementations.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84A201508DF2B697D65F2631 /* AlamofireImplementations.swift */; }; - 418DB36F23C53C6E2C3CDE39 /* Alamofire.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A235FA3FDFB086CC69CDE83D /* Alamofire.framework */; }; - 41A491E9B577C510F927D126 /* OuterEnum.swift in Sources */ = {isa = PBXBuildFile; fileRef = C15008AABC804EB6FB4CDAC6 /* OuterEnum.swift */; }; - 45B3B29D7A62049F824751F8 /* AnimalFarm.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8D22BE01748F51106DE02332 /* AnimalFarm.swift */; }; - 4A344DF7ECE721B4BBEDCB4A /* CatAllOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AD0F94F512DFBC09F9CC79A /* CatAllOf.swift */; }; - 4B4BE77747413A9188CDABD2 /* ArrayOfArrayOfNumberOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B1B8B838B5D9D312F2002EB /* ArrayOfArrayOfNumberOnly.swift */; }; - 555DEA47352B42E49082922B /* NumberOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = B8E0B16084741FCB82389F58 /* NumberOnly.swift */; }; - 5695497F5DBF6C08842755A3 /* TypeHolderDefault.swift in Sources */ = {isa = PBXBuildFile; fileRef = EBC76F6D4D2AA8084B7EB50E /* TypeHolderDefault.swift */; }; - 61322FC4325F1A4FF24ACA48 /* EnumArrays.swift in Sources */ = {isa = PBXBuildFile; fileRef = 10503995D9EFD031A2EFB576 /* EnumArrays.swift */; }; - 64C48E3658CF53EBE8AF82F9 /* UserAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7C8D5F382979854D47F18DB1 /* UserAPI.swift */; }; - 6B638A04B34C82B2091D6EDD /* FormatTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3156CE41C001C80379B84BDB /* FormatTest.swift */; }; - 6FBD978F4D1ED92E7071FFBB /* CodableHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 02A6F6BB2152ACEE1416D44A /* CodableHelper.swift */; }; - 72547ECFB451A509409311EE /* Configuration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 28A444949BBC254798C3B3DD /* Configuration.swift */; }; - 72CE544C52BB33778D1B89B8 /* DogAllOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = A21A69C8402A60E01116ABBD /* DogAllOf.swift */; }; - 731043E4ECC8708558821B31 /* PromiseKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A586582C92491DF9C12D27E2 /* PromiseKit.framework */; }; - 7441BBA84C31E06400338F89 /* ClassModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3C30827D8EAF8EA684E7BCEA /* ClassModel.swift */; }; - 7588B7E2960253174ADCCF16 /* JSONEncodingHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 35D710108A69DD8A5297F926 /* JSONEncodingHelper.swift */; }; - 86DE714469BE8BA28AFF710F /* HasOnlyReadOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C7FBC641752D2E13B150973 /* HasOnlyReadOnly.swift */; }; - 914F4D1FCB17773C067C4E68 /* ReadOnlyFirst.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6FD42727E001E799E458C292 /* ReadOnlyFirst.swift */; }; - 922BDADAB291907A7FD14314 /* OuterComposite.swift in Sources */ = {isa = PBXBuildFile; fileRef = F4E0AD8F60A91F72C7687560 /* OuterComposite.swift */; }; - 97F7B85BF07A325EEBF92C93 /* File.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3933D3B2A3AC4577094D0C23 /* File.swift */; }; - 9CA19AA4483F6EB50270A81E /* List.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A6070F581E611FF44AFD40A /* List.swift */; }; - 9CF06ACDA32CB0C3E74E435C /* Model200Response.swift in Sources */ = {isa = PBXBuildFile; fileRef = 82A2C3DC2235F0114C2B08E5 /* Model200Response.swift */; }; - 9DA1C6F8B4D6C8595F28C098 /* EnumTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = FD60AEA646791E0EDE885DE1 /* EnumTest.swift */; }; - A6E50CC6845FE58D8C236253 /* Return.swift in Sources */ = {isa = PBXBuildFile; fileRef = C81447828475F76C5CF4F08A /* Return.swift */; }; - A6E5A5629495DB0ED672B06F /* PetAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A019F500E546A3292CE716A /* PetAPI.swift */; }; - A85E190556818FFA79896E92 /* ArrayTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = F1A0379CDFC55705AE76C998 /* ArrayTest.swift */; }; - ACF3037926301D4D6E848745 /* EnumClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B2C97AE6ACA1E5FB88F5BAA /* EnumClass.swift */; }; - AD594BFB99E31A5E07579237 /* Client.swift in Sources */ = {isa = PBXBuildFile; fileRef = A913A57E72D723632E9A718F /* Client.swift */; }; - B301DB1B80F37C757550AA17 /* MixedPropertiesAndAdditionalPropertiesClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9AD714C7CC59BDD18DE8DF4E /* MixedPropertiesAndAdditionalPropertiesClass.swift */; }; - B3E35FE2773D4A8BA15CFA88 /* Tag.swift in Sources */ = {isa = PBXBuildFile; fileRef = B2896F8BFD1AA2965C8A3015 /* Tag.swift */; }; - BB1F3C6D50B8F0A8CC4F1749 /* Capitalization.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7B38FA00A494D13F4C382A3 /* Capitalization.swift */; }; - CA9B9B19882EA044EAD0B359 /* AnotherFakeAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9DF24D2714B9C4CF14146E88 /* AnotherFakeAPI.swift */; }; - CB68ABDBAADAF6B8D7B93A5D /* StoreAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = A53274D99BBDE1B79BF3521C /* StoreAPI.swift */; }; - D3BAB7C7A607392CA838C580 /* Models.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8699F7966F748ED026A6FB4C /* Models.swift */; }; - D95A5F83AAA7D5C95A29AB83 /* Cat.swift in Sources */ = {isa = PBXBuildFile; fileRef = 212AA914B7F1793A4E32C119 /* Cat.swift */; }; - DDBD4C0FBA3CD6A4DA3DF376 /* FakeAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6E00950725DC44436C5E238C /* FakeAPI.swift */; }; - DDF1D589267D56D9BED3C6E5 /* FileSchemaTestClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B3666552AA854DAF9C480A3 /* FileSchemaTestClass.swift */; }; - E8A58C6414E88AF3EAE45B69 /* Category.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F2985D01F8D60A4B1925C69 /* Category.swift */; }; - EDFC6C5121A43997014049CB /* StringBooleanMap.swift in Sources */ = {isa = PBXBuildFile; fileRef = 47B4DEBABEFE140768CFB70B /* StringBooleanMap.swift */; }; - FECA2E8C9D0BDFEC459E8996 /* TypeHolderExample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19B65C66C97F082718DDD703 /* TypeHolderExample.swift */; }; -/* End PBXBuildFile section */ - -/* Begin PBXFileReference section */ - 02A6F6BB2152ACEE1416D44A /* CodableHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CodableHelper.swift; sourceTree = ""; }; - 10503995D9EFD031A2EFB576 /* EnumArrays.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EnumArrays.swift; sourceTree = ""; }; - 164AD6EC9C4CCF634D7C4590 /* PetstoreClient.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = PetstoreClient.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 19B65C66C97F082718DDD703 /* TypeHolderExample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TypeHolderExample.swift; sourceTree = ""; }; - 212AA914B7F1793A4E32C119 /* Cat.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Cat.swift; sourceTree = ""; }; - 27B2E9EF856E89FEAA359A3A /* Order.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Order.swift; sourceTree = ""; }; - 28A444949BBC254798C3B3DD /* Configuration.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Configuration.swift; sourceTree = ""; }; - 3156CE41C001C80379B84BDB /* FormatTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FormatTest.swift; sourceTree = ""; }; - 35D710108A69DD8A5297F926 /* JSONEncodingHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JSONEncodingHelper.swift; sourceTree = ""; }; - 37DF825B8F3BADA2B2537D17 /* APIs.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = APIs.swift; sourceTree = ""; }; - 386FD590658E90509C121118 /* SpecialModelName.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SpecialModelName.swift; sourceTree = ""; }; - 3933D3B2A3AC4577094D0C23 /* File.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = File.swift; sourceTree = ""; }; - 396DEF3156BA0D12D0FC5C3C /* AdditionalPropertiesClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdditionalPropertiesClass.swift; sourceTree = ""; }; - 3AD0F94F512DFBC09F9CC79A /* CatAllOf.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CatAllOf.swift; sourceTree = ""; }; - 3C30827D8EAF8EA684E7BCEA /* ClassModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ClassModel.swift; sourceTree = ""; }; - 47B4DEBABEFE140768CFB70B /* StringBooleanMap.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StringBooleanMap.swift; sourceTree = ""; }; - 4B2C97AE6ACA1E5FB88F5BAA /* EnumClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EnumClass.swift; sourceTree = ""; }; - 4B3666552AA854DAF9C480A3 /* FileSchemaTestClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FileSchemaTestClass.swift; sourceTree = ""; }; - 4C7FBC641752D2E13B150973 /* HasOnlyReadOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HasOnlyReadOnly.swift; sourceTree = ""; }; - 5AD994DFAA0DA93C188A4DBA /* Name.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Name.swift; sourceTree = ""; }; - 6E00950725DC44436C5E238C /* FakeAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FakeAPI.swift; sourceTree = ""; }; - 6F2985D01F8D60A4B1925C69 /* Category.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Category.swift; sourceTree = ""; }; - 6FD42727E001E799E458C292 /* ReadOnlyFirst.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReadOnlyFirst.swift; sourceTree = ""; }; - 7986861626C2B1CB49AD7000 /* MapTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MapTest.swift; sourceTree = ""; }; - 7A6070F581E611FF44AFD40A /* List.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = List.swift; sourceTree = ""; }; - 7B1B8B838B5D9D312F2002EB /* ArrayOfArrayOfNumberOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArrayOfArrayOfNumberOnly.swift; sourceTree = ""; }; - 7C8D5F382979854D47F18DB1 /* UserAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserAPI.swift; sourceTree = ""; }; - 82A2C3DC2235F0114C2B08E5 /* Model200Response.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Model200Response.swift; sourceTree = ""; }; - 84A201508DF2B697D65F2631 /* AlamofireImplementations.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlamofireImplementations.swift; sourceTree = ""; }; - 8699F7966F748ED026A6FB4C /* Models.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Models.swift; sourceTree = ""; }; - 897716962D472FE162B723CB /* APIHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = APIHelper.swift; sourceTree = ""; }; - 8D22BE01748F51106DE02332 /* AnimalFarm.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnimalFarm.swift; sourceTree = ""; }; - 95568E7C35F119EB4A12B498 /* Animal.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Animal.swift; sourceTree = ""; }; - 9791B840B8D6EAA35343B00F /* JSONEncodableEncoding.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JSONEncodableEncoding.swift; sourceTree = ""; }; - 9A019F500E546A3292CE716A /* PetAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PetAPI.swift; sourceTree = ""; }; - 9AD714C7CC59BDD18DE8DF4E /* MixedPropertiesAndAdditionalPropertiesClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MixedPropertiesAndAdditionalPropertiesClass.swift; sourceTree = ""; }; - 9DF24D2714B9C4CF14146E88 /* AnotherFakeAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnotherFakeAPI.swift; sourceTree = ""; }; - A21A69C8402A60E01116ABBD /* DogAllOf.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DogAllOf.swift; sourceTree = ""; }; - A235FA3FDFB086CC69CDE83D /* Alamofire.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Alamofire.framework; sourceTree = ""; }; - A53274D99BBDE1B79BF3521C /* StoreAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StoreAPI.swift; sourceTree = ""; }; - A586582C92491DF9C12D27E2 /* PromiseKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = PromiseKit.framework; sourceTree = ""; }; - A7B38FA00A494D13F4C382A3 /* Capitalization.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Capitalization.swift; sourceTree = ""; }; - A8E7B833748B4F0C7CDA90C6 /* ApiResponse.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ApiResponse.swift; sourceTree = ""; }; - A913A57E72D723632E9A718F /* Client.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Client.swift; sourceTree = ""; }; - B2896F8BFD1AA2965C8A3015 /* Tag.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Tag.swift; sourceTree = ""; }; - B42354B407EC173BEB54E042 /* FakeClassnameTags123API.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FakeClassnameTags123API.swift; sourceTree = ""; }; - B65BB72353DA24536A9049BE /* ArrayOfNumberOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArrayOfNumberOnly.swift; sourceTree = ""; }; - B8C298FC8929DCB369053F11 /* Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Extensions.swift; sourceTree = ""; }; - B8E0B16084741FCB82389F58 /* NumberOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NumberOnly.swift; sourceTree = ""; }; - C15008AABC804EB6FB4CDAC6 /* OuterEnum.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OuterEnum.swift; sourceTree = ""; }; - C6C3E1129526A353B963EFD7 /* Dog.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Dog.swift; sourceTree = ""; }; - C81447828475F76C5CF4F08A /* Return.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Return.swift; sourceTree = ""; }; - E5565A447062C7B8F695F451 /* User.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = User.swift; sourceTree = ""; }; - EBC76F6D4D2AA8084B7EB50E /* TypeHolderDefault.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TypeHolderDefault.swift; sourceTree = ""; }; - ECFEB4C6C257B3BB3CEA36D1 /* Pet.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Pet.swift; sourceTree = ""; }; - F1A0379CDFC55705AE76C998 /* ArrayTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArrayTest.swift; sourceTree = ""; }; - F4E0AD8F60A91F72C7687560 /* OuterComposite.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OuterComposite.swift; sourceTree = ""; }; - FD60AEA646791E0EDE885DE1 /* EnumTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EnumTest.swift; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - D1990C2A394CCF025EF98A2F /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 418DB36F23C53C6E2C3CDE39 /* Alamofire.framework in Frameworks */, - 731043E4ECC8708558821B31 /* PromiseKit.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 1E464C0937FE0D3A7A0FE29A /* Frameworks */ = { - isa = PBXGroup; - children = ( - 7861EE241895128F64DD7873 /* Carthage */, - ); - name = Frameworks; - sourceTree = ""; - }; - 4FBDCF1330A9AB9122780DB3 /* Models */ = { - isa = PBXGroup; - children = ( - 396DEF3156BA0D12D0FC5C3C /* AdditionalPropertiesClass.swift */, - 95568E7C35F119EB4A12B498 /* Animal.swift */, - 8D22BE01748F51106DE02332 /* AnimalFarm.swift */, - A8E7B833748B4F0C7CDA90C6 /* ApiResponse.swift */, - 7B1B8B838B5D9D312F2002EB /* ArrayOfArrayOfNumberOnly.swift */, - B65BB72353DA24536A9049BE /* ArrayOfNumberOnly.swift */, - F1A0379CDFC55705AE76C998 /* ArrayTest.swift */, - A7B38FA00A494D13F4C382A3 /* Capitalization.swift */, - 212AA914B7F1793A4E32C119 /* Cat.swift */, - 3AD0F94F512DFBC09F9CC79A /* CatAllOf.swift */, - 6F2985D01F8D60A4B1925C69 /* Category.swift */, - 3C30827D8EAF8EA684E7BCEA /* ClassModel.swift */, - A913A57E72D723632E9A718F /* Client.swift */, - C6C3E1129526A353B963EFD7 /* Dog.swift */, - A21A69C8402A60E01116ABBD /* DogAllOf.swift */, - 10503995D9EFD031A2EFB576 /* EnumArrays.swift */, - 4B2C97AE6ACA1E5FB88F5BAA /* EnumClass.swift */, - FD60AEA646791E0EDE885DE1 /* EnumTest.swift */, - 3933D3B2A3AC4577094D0C23 /* File.swift */, - 4B3666552AA854DAF9C480A3 /* FileSchemaTestClass.swift */, - 3156CE41C001C80379B84BDB /* FormatTest.swift */, - 4C7FBC641752D2E13B150973 /* HasOnlyReadOnly.swift */, - 7A6070F581E611FF44AFD40A /* List.swift */, - 7986861626C2B1CB49AD7000 /* MapTest.swift */, - 9AD714C7CC59BDD18DE8DF4E /* MixedPropertiesAndAdditionalPropertiesClass.swift */, - 82A2C3DC2235F0114C2B08E5 /* Model200Response.swift */, - 5AD994DFAA0DA93C188A4DBA /* Name.swift */, - B8E0B16084741FCB82389F58 /* NumberOnly.swift */, - 27B2E9EF856E89FEAA359A3A /* Order.swift */, - F4E0AD8F60A91F72C7687560 /* OuterComposite.swift */, - C15008AABC804EB6FB4CDAC6 /* OuterEnum.swift */, - ECFEB4C6C257B3BB3CEA36D1 /* Pet.swift */, - 6FD42727E001E799E458C292 /* ReadOnlyFirst.swift */, - C81447828475F76C5CF4F08A /* Return.swift */, - 386FD590658E90509C121118 /* SpecialModelName.swift */, - 47B4DEBABEFE140768CFB70B /* StringBooleanMap.swift */, - B2896F8BFD1AA2965C8A3015 /* Tag.swift */, - EBC76F6D4D2AA8084B7EB50E /* TypeHolderDefault.swift */, - 19B65C66C97F082718DDD703 /* TypeHolderExample.swift */, - E5565A447062C7B8F695F451 /* User.swift */, - ); - path = Models; - sourceTree = ""; - }; - 5FBA6AE5F64CD737F88B4565 = { - isa = PBXGroup; - children = ( - 9B364C01750D7AA4F983B9E7 /* PetstoreClient */, - 1E464C0937FE0D3A7A0FE29A /* Frameworks */, - 857F0DEA1890CE66D6DAD556 /* Products */, - ); - sourceTree = ""; - }; - 67BF3478113E6B4DF1C4E04F /* OpenAPIs */ = { - isa = PBXGroup; - children = ( - 84A201508DF2B697D65F2631 /* AlamofireImplementations.swift */, - 897716962D472FE162B723CB /* APIHelper.swift */, - 37DF825B8F3BADA2B2537D17 /* APIs.swift */, - 02A6F6BB2152ACEE1416D44A /* CodableHelper.swift */, - 28A444949BBC254798C3B3DD /* Configuration.swift */, - B8C298FC8929DCB369053F11 /* Extensions.swift */, - 9791B840B8D6EAA35343B00F /* JSONEncodableEncoding.swift */, - 35D710108A69DD8A5297F926 /* JSONEncodingHelper.swift */, - 8699F7966F748ED026A6FB4C /* Models.swift */, - F956D0CCAE23BCFD1C7BDD5D /* APIs */, - 4FBDCF1330A9AB9122780DB3 /* Models */, - ); - path = OpenAPIs; - sourceTree = ""; - }; - 7861EE241895128F64DD7873 /* Carthage */ = { - isa = PBXGroup; - children = ( - A012205B41CB71A62B86EECD /* iOS */, - ); - name = Carthage; - path = Carthage/Build; - sourceTree = ""; - }; - 857F0DEA1890CE66D6DAD556 /* Products */ = { - isa = PBXGroup; - children = ( - 164AD6EC9C4CCF634D7C4590 /* PetstoreClient.framework */, - ); - name = Products; - sourceTree = ""; - }; - 9B364C01750D7AA4F983B9E7 /* PetstoreClient */ = { - isa = PBXGroup; - children = ( - EF4C81BDD734856ED5023B77 /* Classes */, - ); - path = PetstoreClient; - sourceTree = ""; - }; - A012205B41CB71A62B86EECD /* iOS */ = { - isa = PBXGroup; - children = ( - A235FA3FDFB086CC69CDE83D /* Alamofire.framework */, - A586582C92491DF9C12D27E2 /* PromiseKit.framework */, - ); - path = iOS; - sourceTree = ""; - }; - EF4C81BDD734856ED5023B77 /* Classes */ = { - isa = PBXGroup; - children = ( - 67BF3478113E6B4DF1C4E04F /* OpenAPIs */, - ); - path = Classes; - sourceTree = ""; - }; - F956D0CCAE23BCFD1C7BDD5D /* APIs */ = { - isa = PBXGroup; - children = ( - 9DF24D2714B9C4CF14146E88 /* AnotherFakeAPI.swift */, - 6E00950725DC44436C5E238C /* FakeAPI.swift */, - B42354B407EC173BEB54E042 /* FakeClassnameTags123API.swift */, - 9A019F500E546A3292CE716A /* PetAPI.swift */, - A53274D99BBDE1B79BF3521C /* StoreAPI.swift */, - 7C8D5F382979854D47F18DB1 /* UserAPI.swift */, - ); - path = APIs; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - C1282C2230015E0D204BEAED /* PetstoreClient */ = { - isa = PBXNativeTarget; - buildConfigurationList = B46EDEB1A7F0D78FE6394544 /* Build configuration list for PBXNativeTarget "PetstoreClient" */; - buildPhases = ( - E539708354CE60FE486F81ED /* Sources */, - D1990C2A394CCF025EF98A2F /* Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = PetstoreClient; - productName = PetstoreClient; - productReference = 164AD6EC9C4CCF634D7C4590 /* PetstoreClient.framework */; - productType = "com.apple.product-type.framework"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - E7D276EE2369D8C455513C2E /* Project object */ = { - isa = PBXProject; - attributes = { - LastUpgradeCheck = 1020; - }; - buildConfigurationList = ECAB17FF35111B5E14DAAC08 /* Build configuration list for PBXProject "PetstoreClient" */; - compatibilityVersion = "Xcode 10.0"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - Base, - en, - ); - mainGroup = 5FBA6AE5F64CD737F88B4565; - projectDirPath = ""; - projectRoot = ""; - targets = ( - C1282C2230015E0D204BEAED /* PetstoreClient */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXSourcesBuildPhase section */ - E539708354CE60FE486F81ED /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 1E6C7C7F271A802DF8099330 /* APIHelper.swift in Sources */, - 40E3027D2E38D8329C6AB01F /* APIs.swift in Sources */, - 248F2F0F29E8FDAE9CAD64C5 /* AdditionalPropertiesClass.swift in Sources */, - 40E46046D2B16D1A672A08E3 /* AlamofireImplementations.swift in Sources */, - 2B441CDFFFDDB343C04F5375 /* Animal.swift in Sources */, - 45B3B29D7A62049F824751F8 /* AnimalFarm.swift in Sources */, - CA9B9B19882EA044EAD0B359 /* AnotherFakeAPI.swift in Sources */, - 0299339D13C3571C4C57368A /* ApiResponse.swift in Sources */, - 4B4BE77747413A9188CDABD2 /* ArrayOfArrayOfNumberOnly.swift in Sources */, - 3691B017D3AA18404A563C67 /* ArrayOfNumberOnly.swift in Sources */, - A85E190556818FFA79896E92 /* ArrayTest.swift in Sources */, - BB1F3C6D50B8F0A8CC4F1749 /* Capitalization.swift in Sources */, - D95A5F83AAA7D5C95A29AB83 /* Cat.swift in Sources */, - 4A344DF7ECE721B4BBEDCB4A /* CatAllOf.swift in Sources */, - E8A58C6414E88AF3EAE45B69 /* Category.swift in Sources */, - 7441BBA84C31E06400338F89 /* ClassModel.swift in Sources */, - AD594BFB99E31A5E07579237 /* Client.swift in Sources */, - 6FBD978F4D1ED92E7071FFBB /* CodableHelper.swift in Sources */, - 72547ECFB451A509409311EE /* Configuration.swift in Sources */, - 0C1E4C682F2D0AF7D9E431EE /* Dog.swift in Sources */, - 72CE544C52BB33778D1B89B8 /* DogAllOf.swift in Sources */, - 61322FC4325F1A4FF24ACA48 /* EnumArrays.swift in Sources */, - ACF3037926301D4D6E848745 /* EnumClass.swift in Sources */, - 9DA1C6F8B4D6C8595F28C098 /* EnumTest.swift in Sources */, - 269E3103C458C78EA5726EE2 /* Extensions.swift in Sources */, - DDBD4C0FBA3CD6A4DA3DF376 /* FakeAPI.swift in Sources */, - 34C26979F4678B5B579D26E8 /* FakeClassnameTags123API.swift in Sources */, - 97F7B85BF07A325EEBF92C93 /* File.swift in Sources */, - DDF1D589267D56D9BED3C6E5 /* FileSchemaTestClass.swift in Sources */, - 6B638A04B34C82B2091D6EDD /* FormatTest.swift in Sources */, - 86DE714469BE8BA28AFF710F /* HasOnlyReadOnly.swift in Sources */, - 22FA6CA58E58550DE36AE750 /* JSONEncodableEncoding.swift in Sources */, - 7588B7E2960253174ADCCF16 /* JSONEncodingHelper.swift in Sources */, - 9CA19AA4483F6EB50270A81E /* List.swift in Sources */, - 081C0B80A989B1AAF2665121 /* MapTest.swift in Sources */, - B301DB1B80F37C757550AA17 /* MixedPropertiesAndAdditionalPropertiesClass.swift in Sources */, - 9CF06ACDA32CB0C3E74E435C /* Model200Response.swift in Sources */, - D3BAB7C7A607392CA838C580 /* Models.swift in Sources */, - 37DEADD6CD0496690725B8A7 /* Name.swift in Sources */, - 555DEA47352B42E49082922B /* NumberOnly.swift in Sources */, - 0E6932F1C55BA6880693C478 /* Order.swift in Sources */, - 922BDADAB291907A7FD14314 /* OuterComposite.swift in Sources */, - 41A491E9B577C510F927D126 /* OuterEnum.swift in Sources */, - 2C29D5B60E00DDA3878F1BDE /* Pet.swift in Sources */, - A6E5A5629495DB0ED672B06F /* PetAPI.swift in Sources */, - 914F4D1FCB17773C067C4E68 /* ReadOnlyFirst.swift in Sources */, - A6E50CC6845FE58D8C236253 /* Return.swift in Sources */, - 294CDFA409BC369C0FDC5FB3 /* SpecialModelName.swift in Sources */, - CB68ABDBAADAF6B8D7B93A5D /* StoreAPI.swift in Sources */, - EDFC6C5121A43997014049CB /* StringBooleanMap.swift in Sources */, - B3E35FE2773D4A8BA15CFA88 /* Tag.swift in Sources */, - 5695497F5DBF6C08842755A3 /* TypeHolderDefault.swift in Sources */, - FECA2E8C9D0BDFEC459E8996 /* TypeHolderExample.swift in Sources */, - 31DFF71D8CCCA0D2D2F8AC90 /* User.swift in Sources */, - 64C48E3658CF53EBE8AF82F9 /* UserAPI.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin XCBuildConfiguration section */ - 3B2C02AFB91CB5C82766ED5C /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - APPLICATION_EXTENSION_API_ONLY = YES; - CODE_SIGN_IDENTITY = ""; - CURRENT_PROJECT_VERSION = 1; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Carthage/Build/iOS", - ); - INFOPLIST_FILE = Info.plist; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Release; - }; - A9EB0A02B94C427CBACFEC7C /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "$(inherited)", - "DEBUG=1", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = iphoneos; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 5.0; - }; - name = Debug; - }; - DD3EEB93949E9EBA4437E9CD /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - APPLICATION_EXTENSION_API_ONLY = YES; - CODE_SIGN_IDENTITY = ""; - CURRENT_PROJECT_VERSION = 1; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Carthage/Build/iOS", - ); - INFOPLIST_FILE = Info.plist; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Debug; - }; - F81D4E5FECD46E9AA6DD2C29 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = iphoneos; - SWIFT_COMPILATION_MODE = wholemodule; - SWIFT_VERSION = 5.0; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - B46EDEB1A7F0D78FE6394544 /* Build configuration list for PBXNativeTarget "PetstoreClient" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - DD3EEB93949E9EBA4437E9CD /* Debug */, - 3B2C02AFB91CB5C82766ED5C /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = ""; - }; - ECAB17FF35111B5E14DAAC08 /* Build configuration list for PBXProject "PetstoreClient" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - A9EB0A02B94C427CBACFEC7C /* Debug */, - F81D4E5FECD46E9AA6DD2C29 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Debug; - }; -/* End XCConfigurationList section */ - }; - rootObject = E7D276EE2369D8C455513C2E /* Project object */; -} diff --git a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 919434a6254f..000000000000 --- a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient.xcodeproj/xcshareddata/xcschemes/PetstoreClient.xcscheme b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient.xcodeproj/xcshareddata/xcschemes/PetstoreClient.xcscheme deleted file mode 100644 index 26d510552bb0..000000000000 --- a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient.xcodeproj/xcshareddata/xcschemes/PetstoreClient.xcscheme +++ /dev/null @@ -1,99 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIHelper.swift b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIHelper.swift deleted file mode 100644 index 200070096800..000000000000 --- a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIHelper.swift +++ /dev/null @@ -1,70 +0,0 @@ -// APIHelper.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct APIHelper { - public static func rejectNil(_ source: [String: Any?]) -> [String: Any]? { - let destination = source.reduce(into: [String: Any]()) { (result, item) in - if let value = item.value { - result[item.key] = value - } - } - - if destination.isEmpty { - return nil - } - return destination - } - - public static func rejectNilHeaders(_ source: [String: Any?]) -> [String: String] { - return source.reduce(into: [String: String]()) { (result, item) in - if let collection = item.value as? [Any?] { - result[item.key] = collection.filter({ $0 != nil }).map { "\($0!)" }.joined(separator: ",") - } else if let value: Any = item.value { - result[item.key] = "\(value)" - } - } - } - - public static func convertBoolToString(_ source: [String: Any]?) -> [String: Any]? { - guard let source = source else { - return nil - } - - return source.reduce(into: [String: Any](), { (result, item) in - switch item.value { - case let x as Bool: - result[item.key] = x.description - default: - result[item.key] = item.value - } - }) - } - - public static func mapValueToPathItem(_ source: Any) -> Any { - if let collection = source as? [Any?] { - return collection.filter({ $0 != nil }).map({"\($0!)"}).joined(separator: ",") - } - return source - } - - public static func mapValuesToQueryItems(_ source: [String: Any?]) -> [URLQueryItem]? { - let destination = source.filter({ $0.value != nil}).reduce(into: [URLQueryItem]()) { (result, item) in - if let collection = item.value as? [Any?] { - let value = collection.filter({ $0 != nil }).map({"\($0!)"}).joined(separator: ",") - result.append(URLQueryItem(name: item.key, value: value)) - } else if let value = item.value { - result.append(URLQueryItem(name: item.key, value: "\(value)")) - } - } - - if destination.isEmpty { - return nil - } - return destination - } -} diff --git a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs.swift b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs.swift deleted file mode 100644 index 832282d224f8..000000000000 --- a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs.swift +++ /dev/null @@ -1,62 +0,0 @@ -// APIs.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -open class PetstoreClientAPI { - public static var basePath = "http://petstore.swagger.io:80/v2" - public static var credential: URLCredential? - public static var customHeaders: [String: String] = [:] - public static var requestBuilderFactory: RequestBuilderFactory = AlamofireRequestBuilderFactory() - public static var apiResponseQueue: DispatchQueue = .main -} - -open class RequestBuilder { - var credential: URLCredential? - var headers: [String: String] - public let parameters: [String: Any]? - public let isBody: Bool - public let method: String - public let URLString: String - - /// Optional block to obtain a reference to the request's progress instance when available. - public var onProgressReady: ((Progress) -> Void)? - - required public init(method: String, URLString: String, parameters: [String: Any]?, isBody: Bool, headers: [String: String] = [:]) { - self.method = method - self.URLString = URLString - self.parameters = parameters - self.isBody = isBody - self.headers = headers - - addHeaders(PetstoreClientAPI.customHeaders) - } - - open func addHeaders(_ aHeaders: [String: String]) { - for (header, value) in aHeaders { - headers[header] = value - } - } - - open func execute(_ completion: @escaping (_ response: Response?, _ error: Error?) -> Void) { } - - public func addHeader(name: String, value: String) -> Self { - if !value.isEmpty { - headers[name] = value - } - return self - } - - open func addCredential() -> Self { - self.credential = PetstoreClientAPI.credential - return self - } -} - -public protocol RequestBuilderFactory { - func getNonDecodableBuilder() -> RequestBuilder.Type - func getBuilder() -> RequestBuilder.Type -} diff --git a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift deleted file mode 100644 index 5b75a4da29fe..000000000000 --- a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift +++ /dev/null @@ -1,51 +0,0 @@ -// -// AnotherFakeAPI.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -import PromiseKit - -open class AnotherFakeAPI { - /** - To test special tags - - - parameter body: (body) client model - - returns: Promise - */ - open class func call123testSpecialTags( body: Client) -> Promise { - let deferred = Promise.pending() - call123testSpecialTagsWithRequestBuilder(body: body).execute { (response, error) -> Void in - if let error = error { - deferred.resolver.reject(error) - } else if let response = response { - deferred.resolver.fulfill(response.body!) - } else { - fatalError() - } - } - return deferred.promise - } - - /** - To test special tags - - PATCH /another-fake/dummy - - To test special tags and operation ID starting with number - - parameter body: (body) client model - - returns: RequestBuilder - */ - open class func call123testSpecialTagsWithRequestBuilder(body: Client) -> RequestBuilder { - let path = "/another-fake/dummy" - let URLString = PetstoreClientAPI.basePath + path - let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "PATCH", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) - } - -} diff --git a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift deleted file mode 100644 index 9ce9e5b16ae0..000000000000 --- a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift +++ /dev/null @@ -1,630 +0,0 @@ -// -// FakeAPI.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -import PromiseKit - -open class FakeAPI { - /** - - - parameter body: (body) Input boolean as post body (optional) - - returns: Promise - */ - open class func fakeOuterBooleanSerialize( body: Bool? = nil) -> Promise { - let deferred = Promise.pending() - fakeOuterBooleanSerializeWithRequestBuilder(body: body).execute { (response, error) -> Void in - if let error = error { - deferred.resolver.reject(error) - } else if let response = response { - deferred.resolver.fulfill(response.body!) - } else { - fatalError() - } - } - return deferred.promise - } - - /** - - POST /fake/outer/boolean - - Test serialization of outer boolean types - - parameter body: (body) Input boolean as post body (optional) - - returns: RequestBuilder - */ - open class func fakeOuterBooleanSerializeWithRequestBuilder(body: Bool? = nil) -> RequestBuilder { - let path = "/fake/outer/boolean" - let URLString = PetstoreClientAPI.basePath + path - let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) - } - - /** - - - parameter body: (body) Input composite as post body (optional) - - returns: Promise - */ - open class func fakeOuterCompositeSerialize( body: OuterComposite? = nil) -> Promise { - let deferred = Promise.pending() - fakeOuterCompositeSerializeWithRequestBuilder(body: body).execute { (response, error) -> Void in - if let error = error { - deferred.resolver.reject(error) - } else if let response = response { - deferred.resolver.fulfill(response.body!) - } else { - fatalError() - } - } - return deferred.promise - } - - /** - - POST /fake/outer/composite - - Test serialization of object with outer number type - - parameter body: (body) Input composite as post body (optional) - - returns: RequestBuilder - */ - open class func fakeOuterCompositeSerializeWithRequestBuilder(body: OuterComposite? = nil) -> RequestBuilder { - let path = "/fake/outer/composite" - let URLString = PetstoreClientAPI.basePath + path - let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) - } - - /** - - - parameter body: (body) Input number as post body (optional) - - returns: Promise - */ - open class func fakeOuterNumberSerialize( body: Double? = nil) -> Promise { - let deferred = Promise.pending() - fakeOuterNumberSerializeWithRequestBuilder(body: body).execute { (response, error) -> Void in - if let error = error { - deferred.resolver.reject(error) - } else if let response = response { - deferred.resolver.fulfill(response.body!) - } else { - fatalError() - } - } - return deferred.promise - } - - /** - - POST /fake/outer/number - - Test serialization of outer number types - - parameter body: (body) Input number as post body (optional) - - returns: RequestBuilder - */ - open class func fakeOuterNumberSerializeWithRequestBuilder(body: Double? = nil) -> RequestBuilder { - let path = "/fake/outer/number" - let URLString = PetstoreClientAPI.basePath + path - let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) - } - - /** - - - parameter body: (body) Input string as post body (optional) - - returns: Promise - */ - open class func fakeOuterStringSerialize( body: String? = nil) -> Promise { - let deferred = Promise.pending() - fakeOuterStringSerializeWithRequestBuilder(body: body).execute { (response, error) -> Void in - if let error = error { - deferred.resolver.reject(error) - } else if let response = response { - deferred.resolver.fulfill(response.body!) - } else { - fatalError() - } - } - return deferred.promise - } - - /** - - POST /fake/outer/string - - Test serialization of outer string types - - parameter body: (body) Input string as post body (optional) - - returns: RequestBuilder - */ - open class func fakeOuterStringSerializeWithRequestBuilder(body: String? = nil) -> RequestBuilder { - let path = "/fake/outer/string" - let URLString = PetstoreClientAPI.basePath + path - let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) - } - - /** - - - parameter body: (body) - - returns: Promise - */ - open class func testBodyWithFileSchema( body: FileSchemaTestClass) -> Promise { - let deferred = Promise.pending() - testBodyWithFileSchemaWithRequestBuilder(body: body).execute { (_, error) -> Void in - if let error = error { - deferred.resolver.reject(error) - } else { - deferred.resolver.fulfill(()) - } - } - return deferred.promise - } - - /** - - PUT /fake/body-with-file-schema - - For this test, the body for this request much reference a schema named `File`. - - parameter body: (body) - - returns: RequestBuilder - */ - open class func testBodyWithFileSchemaWithRequestBuilder(body: FileSchemaTestClass) -> RequestBuilder { - let path = "/fake/body-with-file-schema" - let URLString = PetstoreClientAPI.basePath + path - let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) - } - - /** - - - parameter query: (query) - - parameter body: (body) - - returns: Promise - */ - open class func testBodyWithQueryParams( query: String, body: User) -> Promise { - let deferred = Promise.pending() - testBodyWithQueryParamsWithRequestBuilder(query: query, body: body).execute { (_, error) -> Void in - if let error = error { - deferred.resolver.reject(error) - } else { - deferred.resolver.fulfill(()) - } - } - return deferred.promise - } - - /** - - PUT /fake/body-with-query-params - - parameter query: (query) - - parameter body: (body) - - returns: RequestBuilder - */ - open class func testBodyWithQueryParamsWithRequestBuilder(query: String, body: User) -> RequestBuilder { - let path = "/fake/body-with-query-params" - let URLString = PetstoreClientAPI.basePath + path - let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) - - var url = URLComponents(string: URLString) - url?.queryItems = APIHelper.mapValuesToQueryItems([ - "query": query.encodeToJSON() - ]) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) - } - - /** - To test \"client\" model - - - parameter body: (body) client model - - returns: Promise - */ - open class func testClientModel( body: Client) -> Promise { - let deferred = Promise.pending() - testClientModelWithRequestBuilder(body: body).execute { (response, error) -> Void in - if let error = error { - deferred.resolver.reject(error) - } else if let response = response { - deferred.resolver.fulfill(response.body!) - } else { - fatalError() - } - } - return deferred.promise - } - - /** - To test \"client\" model - - PATCH /fake - - To test \"client\" model - - parameter body: (body) client model - - returns: RequestBuilder - */ - open class func testClientModelWithRequestBuilder(body: Client) -> RequestBuilder { - let path = "/fake" - let URLString = PetstoreClientAPI.basePath + path - let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "PATCH", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) - } - - /** - Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - - - parameter number: (form) None - - parameter double: (form) None - - parameter patternWithoutDelimiter: (form) None - - parameter byte: (form) None - - parameter integer: (form) None (optional) - - parameter int32: (form) None (optional) - - parameter int64: (form) None (optional) - - parameter float: (form) None (optional) - - parameter string: (form) None (optional) - - parameter binary: (form) None (optional) - - parameter date: (form) None (optional) - - parameter dateTime: (form) None (optional) - - parameter password: (form) None (optional) - - parameter callback: (form) None (optional) - - returns: Promise - */ - open class func testEndpointParameters( number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil) -> Promise { - let deferred = Promise.pending() - testEndpointParametersWithRequestBuilder(number: number, double: double, patternWithoutDelimiter: patternWithoutDelimiter, byte: byte, integer: integer, int32: int32, int64: int64, float: float, string: string, binary: binary, date: date, dateTime: dateTime, password: password, callback: callback).execute { (_, error) -> Void in - if let error = error { - deferred.resolver.reject(error) - } else { - deferred.resolver.fulfill(()) - } - } - return deferred.promise - } - - /** - Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - - POST /fake - - Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - - BASIC: - - type: http - - name: http_basic_test - - parameter number: (form) None - - parameter double: (form) None - - parameter patternWithoutDelimiter: (form) None - - parameter byte: (form) None - - parameter integer: (form) None (optional) - - parameter int32: (form) None (optional) - - parameter int64: (form) None (optional) - - parameter float: (form) None (optional) - - parameter string: (form) None (optional) - - parameter binary: (form) None (optional) - - parameter date: (form) None (optional) - - parameter dateTime: (form) None (optional) - - parameter password: (form) None (optional) - - parameter callback: (form) None (optional) - - returns: RequestBuilder - */ - open class func testEndpointParametersWithRequestBuilder(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil) -> RequestBuilder { - let path = "/fake" - let URLString = PetstoreClientAPI.basePath + path - let formParams: [String: Any?] = [ - "integer": integer?.encodeToJSON(), - "int32": int32?.encodeToJSON(), - "int64": int64?.encodeToJSON(), - "number": number.encodeToJSON(), - "float": float?.encodeToJSON(), - "double": double.encodeToJSON(), - "string": string?.encodeToJSON(), - "pattern_without_delimiter": patternWithoutDelimiter.encodeToJSON(), - "byte": byte.encodeToJSON(), - "binary": binary?.encodeToJSON(), - "date": date?.encodeToJSON(), - "dateTime": dateTime?.encodeToJSON(), - "password": password?.encodeToJSON(), - "callback": callback?.encodeToJSON() - ] - - let nonNullParameters = APIHelper.rejectNil(formParams) - let parameters = APIHelper.convertBoolToString(nonNullParameters) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } - - /** - * enum for parameter enumHeaderStringArray - */ - public enum EnumHeaderStringArray_testEnumParameters: String { - case greaterThan = ">" - case dollar = "$" - } - - /** - * enum for parameter enumHeaderString - */ - public enum EnumHeaderString_testEnumParameters: String { - case abc = "_abc" - case efg = "-efg" - case xyz = "(xyz)" - } - - /** - * enum for parameter enumQueryStringArray - */ - public enum EnumQueryStringArray_testEnumParameters: String { - case greaterThan = ">" - case dollar = "$" - } - - /** - * enum for parameter enumQueryString - */ - public enum EnumQueryString_testEnumParameters: String { - case abc = "_abc" - case efg = "-efg" - case xyz = "(xyz)" - } - - /** - * enum for parameter enumQueryInteger - */ - public enum EnumQueryInteger_testEnumParameters: Int { - case _1 = 1 - case number2 = -2 - } - - /** - * enum for parameter enumQueryDouble - */ - public enum EnumQueryDouble_testEnumParameters: Double { - case _11 = 1.1 - case number12 = -1.2 - } - - /** - * enum for parameter enumFormStringArray - */ - public enum EnumFormStringArray_testEnumParameters: String { - case greaterThan = ">" - case dollar = "$" - } - - /** - * enum for parameter enumFormString - */ - public enum EnumFormString_testEnumParameters: String { - case abc = "_abc" - case efg = "-efg" - case xyz = "(xyz)" - } - - /** - To test enum parameters - - - parameter enumHeaderStringArray: (header) Header parameter enum test (string array) (optional) - - parameter enumHeaderString: (header) Header parameter enum test (string) (optional, default to .efg) - - parameter enumQueryStringArray: (query) Query parameter enum test (string array) (optional) - - parameter enumQueryString: (query) Query parameter enum test (string) (optional, default to .efg) - - parameter enumQueryInteger: (query) Query parameter enum test (double) (optional) - - parameter enumQueryDouble: (query) Query parameter enum test (double) (optional) - - parameter enumFormStringArray: (form) Form parameter enum test (string array) (optional, default to .dollar) - - parameter enumFormString: (form) Form parameter enum test (string) (optional, default to .efg) - - returns: Promise - */ - open class func testEnumParameters( enumHeaderStringArray: [String]? = nil, enumHeaderString: EnumHeaderString_testEnumParameters? = nil, enumQueryStringArray: [String]? = nil, enumQueryString: EnumQueryString_testEnumParameters? = nil, enumQueryInteger: EnumQueryInteger_testEnumParameters? = nil, enumQueryDouble: EnumQueryDouble_testEnumParameters? = nil, enumFormStringArray: [String]? = nil, enumFormString: EnumFormString_testEnumParameters? = nil) -> Promise { - let deferred = Promise.pending() - testEnumParametersWithRequestBuilder(enumHeaderStringArray: enumHeaderStringArray, enumHeaderString: enumHeaderString, enumQueryStringArray: enumQueryStringArray, enumQueryString: enumQueryString, enumQueryInteger: enumQueryInteger, enumQueryDouble: enumQueryDouble, enumFormStringArray: enumFormStringArray, enumFormString: enumFormString).execute { (_, error) -> Void in - if let error = error { - deferred.resolver.reject(error) - } else { - deferred.resolver.fulfill(()) - } - } - return deferred.promise - } - - /** - To test enum parameters - - GET /fake - - To test enum parameters - - parameter enumHeaderStringArray: (header) Header parameter enum test (string array) (optional) - - parameter enumHeaderString: (header) Header parameter enum test (string) (optional, default to .efg) - - parameter enumQueryStringArray: (query) Query parameter enum test (string array) (optional) - - parameter enumQueryString: (query) Query parameter enum test (string) (optional, default to .efg) - - parameter enumQueryInteger: (query) Query parameter enum test (double) (optional) - - parameter enumQueryDouble: (query) Query parameter enum test (double) (optional) - - parameter enumFormStringArray: (form) Form parameter enum test (string array) (optional, default to .dollar) - - parameter enumFormString: (form) Form parameter enum test (string) (optional, default to .efg) - - returns: RequestBuilder - */ - open class func testEnumParametersWithRequestBuilder(enumHeaderStringArray: [String]? = nil, enumHeaderString: EnumHeaderString_testEnumParameters? = nil, enumQueryStringArray: [String]? = nil, enumQueryString: EnumQueryString_testEnumParameters? = nil, enumQueryInteger: EnumQueryInteger_testEnumParameters? = nil, enumQueryDouble: EnumQueryDouble_testEnumParameters? = nil, enumFormStringArray: [String]? = nil, enumFormString: EnumFormString_testEnumParameters? = nil) -> RequestBuilder { - let path = "/fake" - let URLString = PetstoreClientAPI.basePath + path - let formParams: [String: Any?] = [ - "enum_form_string_array": enumFormStringArray?.encodeToJSON(), - "enum_form_string": enumFormString?.encodeToJSON() - ] - - let nonNullParameters = APIHelper.rejectNil(formParams) - let parameters = APIHelper.convertBoolToString(nonNullParameters) - - var url = URLComponents(string: URLString) - url?.queryItems = APIHelper.mapValuesToQueryItems([ - "enum_query_string_array": enumQueryStringArray?.encodeToJSON(), - "enum_query_string": enumQueryString?.encodeToJSON(), - "enum_query_integer": enumQueryInteger?.encodeToJSON(), - "enum_query_double": enumQueryDouble?.encodeToJSON() - ]) - let nillableHeaders: [String: Any?] = [ - "enum_header_string_array": enumHeaderStringArray?.encodeToJSON(), - "enum_header_string": enumHeaderString?.encodeToJSON() - ] - let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false, headers: headerParameters) - } - - /** - Fake endpoint to test group parameters (optional) - - - parameter requiredStringGroup: (query) Required String in group parameters - - parameter requiredBooleanGroup: (header) Required Boolean in group parameters - - parameter requiredInt64Group: (query) Required Integer in group parameters - - parameter stringGroup: (query) String in group parameters (optional) - - parameter booleanGroup: (header) Boolean in group parameters (optional) - - parameter int64Group: (query) Integer in group parameters (optional) - - returns: Promise - */ - open class func testGroupParameters( requiredStringGroup: Int, requiredBooleanGroup: Bool, requiredInt64Group: Int64, stringGroup: Int? = nil, booleanGroup: Bool? = nil, int64Group: Int64? = nil) -> Promise { - let deferred = Promise.pending() - testGroupParametersWithRequestBuilder(requiredStringGroup: requiredStringGroup, requiredBooleanGroup: requiredBooleanGroup, requiredInt64Group: requiredInt64Group, stringGroup: stringGroup, booleanGroup: booleanGroup, int64Group: int64Group).execute { (_, error) -> Void in - if let error = error { - deferred.resolver.reject(error) - } else { - deferred.resolver.fulfill(()) - } - } - return deferred.promise - } - - /** - Fake endpoint to test group parameters (optional) - - DELETE /fake - - Fake endpoint to test group parameters (optional) - - parameter requiredStringGroup: (query) Required String in group parameters - - parameter requiredBooleanGroup: (header) Required Boolean in group parameters - - parameter requiredInt64Group: (query) Required Integer in group parameters - - parameter stringGroup: (query) String in group parameters (optional) - - parameter booleanGroup: (header) Boolean in group parameters (optional) - - parameter int64Group: (query) Integer in group parameters (optional) - - returns: RequestBuilder - */ - open class func testGroupParametersWithRequestBuilder(requiredStringGroup: Int, requiredBooleanGroup: Bool, requiredInt64Group: Int64, stringGroup: Int? = nil, booleanGroup: Bool? = nil, int64Group: Int64? = nil) -> RequestBuilder { - let path = "/fake" - let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - - var url = URLComponents(string: URLString) - url?.queryItems = APIHelper.mapValuesToQueryItems([ - "required_string_group": requiredStringGroup.encodeToJSON(), - "required_int64_group": requiredInt64Group.encodeToJSON(), - "string_group": stringGroup?.encodeToJSON(), - "int64_group": int64Group?.encodeToJSON() - ]) - let nillableHeaders: [String: Any?] = [ - "required_boolean_group": requiredBooleanGroup.encodeToJSON(), - "boolean_group": booleanGroup?.encodeToJSON() - ] - let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false, headers: headerParameters) - } - - /** - test inline additionalProperties - - - parameter param: (body) request body - - returns: Promise - */ - open class func testInlineAdditionalProperties( param: [String: String]) -> Promise { - let deferred = Promise.pending() - testInlineAdditionalPropertiesWithRequestBuilder(param: param).execute { (_, error) -> Void in - if let error = error { - deferred.resolver.reject(error) - } else { - deferred.resolver.fulfill(()) - } - } - return deferred.promise - } - - /** - test inline additionalProperties - - POST /fake/inline-additionalProperties - - parameter param: (body) request body - - returns: RequestBuilder - */ - open class func testInlineAdditionalPropertiesWithRequestBuilder(param: [String: String]) -> RequestBuilder { - let path = "/fake/inline-additionalProperties" - let URLString = PetstoreClientAPI.basePath + path - let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: param) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) - } - - /** - test json serialization of form data - - - parameter param: (form) field1 - - parameter param2: (form) field2 - - returns: Promise - */ - open class func testJsonFormData( param: String, param2: String) -> Promise { - let deferred = Promise.pending() - testJsonFormDataWithRequestBuilder(param: param, param2: param2).execute { (_, error) -> Void in - if let error = error { - deferred.resolver.reject(error) - } else { - deferred.resolver.fulfill(()) - } - } - return deferred.promise - } - - /** - test json serialization of form data - - GET /fake/jsonFormData - - parameter param: (form) field1 - - parameter param2: (form) field2 - - returns: RequestBuilder - */ - open class func testJsonFormDataWithRequestBuilder(param: String, param2: String) -> RequestBuilder { - let path = "/fake/jsonFormData" - let URLString = PetstoreClientAPI.basePath + path - let formParams: [String: Any?] = [ - "param": param.encodeToJSON(), - "param2": param2.encodeToJSON() - ] - - let nonNullParameters = APIHelper.rejectNil(formParams) - let parameters = APIHelper.convertBoolToString(nonNullParameters) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } - -} diff --git a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift deleted file mode 100644 index 574ec49021ba..000000000000 --- a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift +++ /dev/null @@ -1,54 +0,0 @@ -// -// FakeClassnameTags123API.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -import PromiseKit - -open class FakeClassnameTags123API { - /** - To test class name in snake case - - - parameter body: (body) client model - - returns: Promise - */ - open class func testClassname( body: Client) -> Promise { - let deferred = Promise.pending() - testClassnameWithRequestBuilder(body: body).execute { (response, error) -> Void in - if let error = error { - deferred.resolver.reject(error) - } else if let response = response { - deferred.resolver.fulfill(response.body!) - } else { - fatalError() - } - } - return deferred.promise - } - - /** - To test class name in snake case - - PATCH /fake_classname_test - - To test class name in snake case - - API Key: - - type: apiKey api_key_query (QUERY) - - name: api_key_query - - parameter body: (body) client model - - returns: RequestBuilder - */ - open class func testClassnameWithRequestBuilder(body: Client) -> RequestBuilder { - let path = "/fake_classname_test" - let URLString = PetstoreClientAPI.basePath + path - let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "PATCH", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) - } - -} diff --git a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift deleted file mode 100644 index 8d31c177eb97..000000000000 --- a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift +++ /dev/null @@ -1,442 +0,0 @@ -// -// PetAPI.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -import PromiseKit - -open class PetAPI { - /** - Add a new pet to the store - - - parameter body: (body) Pet object that needs to be added to the store - - returns: Promise - */ - open class func addPet( body: Pet) -> Promise { - let deferred = Promise.pending() - addPetWithRequestBuilder(body: body).execute { (_, error) -> Void in - if let error = error { - deferred.resolver.reject(error) - } else { - deferred.resolver.fulfill(()) - } - } - return deferred.promise - } - - /** - Add a new pet to the store - - POST /pet - - OAuth: - - type: oauth2 - - name: petstore_auth - - parameter body: (body) Pet object that needs to be added to the store - - returns: RequestBuilder - */ - open class func addPetWithRequestBuilder(body: Pet) -> RequestBuilder { - let path = "/pet" - let URLString = PetstoreClientAPI.basePath + path - let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) - } - - /** - Deletes a pet - - - parameter petId: (path) Pet id to delete - - parameter apiKey: (header) (optional) - - returns: Promise - */ - open class func deletePet( petId: Int64, apiKey: String? = nil) -> Promise { - let deferred = Promise.pending() - deletePetWithRequestBuilder(petId: petId, apiKey: apiKey).execute { (_, error) -> Void in - if let error = error { - deferred.resolver.reject(error) - } else { - deferred.resolver.fulfill(()) - } - } - return deferred.promise - } - - /** - Deletes a pet - - DELETE /pet/{petId} - - OAuth: - - type: oauth2 - - name: petstore_auth - - parameter petId: (path) Pet id to delete - - parameter apiKey: (header) (optional) - - returns: RequestBuilder - */ - open class func deletePetWithRequestBuilder(petId: Int64, apiKey: String? = nil) -> RequestBuilder { - var path = "/pet/{petId}" - let petIdPreEscape = "\(APIHelper.mapValueToPathItem(petId))" - let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{petId}", with: petIdPostEscape, options: .literal, range: nil) - let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - - let url = URLComponents(string: URLString) - let nillableHeaders: [String: Any?] = [ - "api_key": apiKey?.encodeToJSON() - ] - let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false, headers: headerParameters) - } - - /** - * enum for parameter status - */ - public enum Status_findPetsByStatus: String { - case available = "available" - case pending = "pending" - case sold = "sold" - } - - /** - Finds Pets by status - - - parameter status: (query) Status values that need to be considered for filter - - returns: Promise<[Pet]> - */ - open class func findPetsByStatus( status: [String]) -> Promise<[Pet]> { - let deferred = Promise<[Pet]>.pending() - findPetsByStatusWithRequestBuilder(status: status).execute { (response, error) -> Void in - if let error = error { - deferred.resolver.reject(error) - } else if let response = response { - deferred.resolver.fulfill(response.body!) - } else { - fatalError() - } - } - return deferred.promise - } - - /** - Finds Pets by status - - GET /pet/findByStatus - - Multiple status values can be provided with comma separated strings - - OAuth: - - type: oauth2 - - name: petstore_auth - - parameter status: (query) Status values that need to be considered for filter - - returns: RequestBuilder<[Pet]> - */ - open class func findPetsByStatusWithRequestBuilder(status: [String]) -> RequestBuilder<[Pet]> { - let path = "/pet/findByStatus" - let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - - var url = URLComponents(string: URLString) - url?.queryItems = APIHelper.mapValuesToQueryItems([ - "status": status.encodeToJSON() - ]) - - let requestBuilder: RequestBuilder<[Pet]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } - - /** - Finds Pets by tags - - - parameter tags: (query) Tags to filter by - - returns: Promise<[Pet]> - */ - open class func findPetsByTags( tags: [String]) -> Promise<[Pet]> { - let deferred = Promise<[Pet]>.pending() - findPetsByTagsWithRequestBuilder(tags: tags).execute { (response, error) -> Void in - if let error = error { - deferred.resolver.reject(error) - } else if let response = response { - deferred.resolver.fulfill(response.body!) - } else { - fatalError() - } - } - return deferred.promise - } - - /** - Finds Pets by tags - - GET /pet/findByTags - - Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. - - OAuth: - - type: oauth2 - - name: petstore_auth - - parameter tags: (query) Tags to filter by - - returns: RequestBuilder<[Pet]> - */ - open class func findPetsByTagsWithRequestBuilder(tags: [String]) -> RequestBuilder<[Pet]> { - let path = "/pet/findByTags" - let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - - var url = URLComponents(string: URLString) - url?.queryItems = APIHelper.mapValuesToQueryItems([ - "tags": tags.encodeToJSON() - ]) - - let requestBuilder: RequestBuilder<[Pet]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } - - /** - Find pet by ID - - - parameter petId: (path) ID of pet to return - - returns: Promise - */ - open class func getPetById( petId: Int64) -> Promise { - let deferred = Promise.pending() - getPetByIdWithRequestBuilder(petId: petId).execute { (response, error) -> Void in - if let error = error { - deferred.resolver.reject(error) - } else if let response = response { - deferred.resolver.fulfill(response.body!) - } else { - fatalError() - } - } - return deferred.promise - } - - /** - Find pet by ID - - GET /pet/{petId} - - Returns a single pet - - API Key: - - type: apiKey api_key - - name: api_key - - parameter petId: (path) ID of pet to return - - returns: RequestBuilder - */ - open class func getPetByIdWithRequestBuilder(petId: Int64) -> RequestBuilder { - var path = "/pet/{petId}" - let petIdPreEscape = "\(APIHelper.mapValueToPathItem(petId))" - let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{petId}", with: petIdPostEscape, options: .literal, range: nil) - let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } - - /** - Update an existing pet - - - parameter body: (body) Pet object that needs to be added to the store - - returns: Promise - */ - open class func updatePet( body: Pet) -> Promise { - let deferred = Promise.pending() - updatePetWithRequestBuilder(body: body).execute { (_, error) -> Void in - if let error = error { - deferred.resolver.reject(error) - } else { - deferred.resolver.fulfill(()) - } - } - return deferred.promise - } - - /** - Update an existing pet - - PUT /pet - - OAuth: - - type: oauth2 - - name: petstore_auth - - parameter body: (body) Pet object that needs to be added to the store - - returns: RequestBuilder - */ - open class func updatePetWithRequestBuilder(body: Pet) -> RequestBuilder { - let path = "/pet" - let URLString = PetstoreClientAPI.basePath + path - let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) - } - - /** - Updates a pet in the store with form data - - - parameter petId: (path) ID of pet that needs to be updated - - parameter name: (form) Updated name of the pet (optional) - - parameter status: (form) Updated status of the pet (optional) - - returns: Promise - */ - open class func updatePetWithForm( petId: Int64, name: String? = nil, status: String? = nil) -> Promise { - let deferred = Promise.pending() - updatePetWithFormWithRequestBuilder(petId: petId, name: name, status: status).execute { (_, error) -> Void in - if let error = error { - deferred.resolver.reject(error) - } else { - deferred.resolver.fulfill(()) - } - } - return deferred.promise - } - - /** - Updates a pet in the store with form data - - POST /pet/{petId} - - OAuth: - - type: oauth2 - - name: petstore_auth - - parameter petId: (path) ID of pet that needs to be updated - - parameter name: (form) Updated name of the pet (optional) - - parameter status: (form) Updated status of the pet (optional) - - returns: RequestBuilder - */ - open class func updatePetWithFormWithRequestBuilder(petId: Int64, name: String? = nil, status: String? = nil) -> RequestBuilder { - var path = "/pet/{petId}" - let petIdPreEscape = "\(APIHelper.mapValueToPathItem(petId))" - let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{petId}", with: petIdPostEscape, options: .literal, range: nil) - let URLString = PetstoreClientAPI.basePath + path - let formParams: [String: Any?] = [ - "name": name?.encodeToJSON(), - "status": status?.encodeToJSON() - ] - - let nonNullParameters = APIHelper.rejectNil(formParams) - let parameters = APIHelper.convertBoolToString(nonNullParameters) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } - - /** - uploads an image - - - parameter petId: (path) ID of pet to update - - parameter additionalMetadata: (form) Additional data to pass to server (optional) - - parameter file: (form) file to upload (optional) - - returns: Promise - */ - open class func uploadFile( petId: Int64, additionalMetadata: String? = nil, file: URL? = nil) -> Promise { - let deferred = Promise.pending() - uploadFileWithRequestBuilder(petId: petId, additionalMetadata: additionalMetadata, file: file).execute { (response, error) -> Void in - if let error = error { - deferred.resolver.reject(error) - } else if let response = response { - deferred.resolver.fulfill(response.body!) - } else { - fatalError() - } - } - return deferred.promise - } - - /** - uploads an image - - POST /pet/{petId}/uploadImage - - OAuth: - - type: oauth2 - - name: petstore_auth - - parameter petId: (path) ID of pet to update - - parameter additionalMetadata: (form) Additional data to pass to server (optional) - - parameter file: (form) file to upload (optional) - - returns: RequestBuilder - */ - open class func uploadFileWithRequestBuilder(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil) -> RequestBuilder { - var path = "/pet/{petId}/uploadImage" - let petIdPreEscape = "\(APIHelper.mapValueToPathItem(petId))" - let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{petId}", with: petIdPostEscape, options: .literal, range: nil) - let URLString = PetstoreClientAPI.basePath + path - let formParams: [String: Any?] = [ - "additionalMetadata": additionalMetadata?.encodeToJSON(), - "file": file?.encodeToJSON() - ] - - let nonNullParameters = APIHelper.rejectNil(formParams) - let parameters = APIHelper.convertBoolToString(nonNullParameters) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } - - /** - uploads an image (required) - - - parameter petId: (path) ID of pet to update - - parameter requiredFile: (form) file to upload - - parameter additionalMetadata: (form) Additional data to pass to server (optional) - - returns: Promise - */ - open class func uploadFileWithRequiredFile( petId: Int64, requiredFile: URL, additionalMetadata: String? = nil) -> Promise { - let deferred = Promise.pending() - uploadFileWithRequiredFileWithRequestBuilder(petId: petId, requiredFile: requiredFile, additionalMetadata: additionalMetadata).execute { (response, error) -> Void in - if let error = error { - deferred.resolver.reject(error) - } else if let response = response { - deferred.resolver.fulfill(response.body!) - } else { - fatalError() - } - } - return deferred.promise - } - - /** - uploads an image (required) - - POST /fake/{petId}/uploadImageWithRequiredFile - - OAuth: - - type: oauth2 - - name: petstore_auth - - parameter petId: (path) ID of pet to update - - parameter requiredFile: (form) file to upload - - parameter additionalMetadata: (form) Additional data to pass to server (optional) - - returns: RequestBuilder - */ - open class func uploadFileWithRequiredFileWithRequestBuilder(petId: Int64, requiredFile: URL, additionalMetadata: String? = nil) -> RequestBuilder { - var path = "/fake/{petId}/uploadImageWithRequiredFile" - let petIdPreEscape = "\(APIHelper.mapValueToPathItem(petId))" - let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{petId}", with: petIdPostEscape, options: .literal, range: nil) - let URLString = PetstoreClientAPI.basePath + path - let formParams: [String: Any?] = [ - "additionalMetadata": additionalMetadata?.encodeToJSON(), - "requiredFile": requiredFile.encodeToJSON() - ] - - let nonNullParameters = APIHelper.rejectNil(formParams) - let parameters = APIHelper.convertBoolToString(nonNullParameters) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } - -} diff --git a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift deleted file mode 100644 index 685827cebe6a..000000000000 --- a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift +++ /dev/null @@ -1,172 +0,0 @@ -// -// StoreAPI.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -import PromiseKit - -open class StoreAPI { - /** - Delete purchase order by ID - - - parameter orderId: (path) ID of the order that needs to be deleted - - returns: Promise - */ - open class func deleteOrder( orderId: String) -> Promise { - let deferred = Promise.pending() - deleteOrderWithRequestBuilder(orderId: orderId).execute { (_, error) -> Void in - if let error = error { - deferred.resolver.reject(error) - } else { - deferred.resolver.fulfill(()) - } - } - return deferred.promise - } - - /** - Delete purchase order by ID - - DELETE /store/order/{order_id} - - For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors - - parameter orderId: (path) ID of the order that needs to be deleted - - returns: RequestBuilder - */ - open class func deleteOrderWithRequestBuilder(orderId: String) -> RequestBuilder { - var path = "/store/order/{order_id}" - let orderIdPreEscape = "\(APIHelper.mapValueToPathItem(orderId))" - let orderIdPostEscape = orderIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{order_id}", with: orderIdPostEscape, options: .literal, range: nil) - let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } - - /** - Returns pet inventories by status - - - returns: Promise<[String:Int]> - */ - open class func getInventory() -> Promise<[String: Int]> { - let deferred = Promise<[String: Int]>.pending() - getInventoryWithRequestBuilder().execute { (response, error) -> Void in - if let error = error { - deferred.resolver.reject(error) - } else if let response = response { - deferred.resolver.fulfill(response.body!) - } else { - fatalError() - } - } - return deferred.promise - } - - /** - Returns pet inventories by status - - GET /store/inventory - - Returns a map of status codes to quantities - - API Key: - - type: apiKey api_key - - name: api_key - - returns: RequestBuilder<[String:Int]> - */ - open class func getInventoryWithRequestBuilder() -> RequestBuilder<[String: Int]> { - let path = "/store/inventory" - let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder<[String: Int]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } - - /** - Find purchase order by ID - - - parameter orderId: (path) ID of pet that needs to be fetched - - returns: Promise - */ - open class func getOrderById( orderId: Int64) -> Promise { - let deferred = Promise.pending() - getOrderByIdWithRequestBuilder(orderId: orderId).execute { (response, error) -> Void in - if let error = error { - deferred.resolver.reject(error) - } else if let response = response { - deferred.resolver.fulfill(response.body!) - } else { - fatalError() - } - } - return deferred.promise - } - - /** - Find purchase order by ID - - GET /store/order/{order_id} - - For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions - - parameter orderId: (path) ID of pet that needs to be fetched - - returns: RequestBuilder - */ - open class func getOrderByIdWithRequestBuilder(orderId: Int64) -> RequestBuilder { - var path = "/store/order/{order_id}" - let orderIdPreEscape = "\(APIHelper.mapValueToPathItem(orderId))" - let orderIdPostEscape = orderIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{order_id}", with: orderIdPostEscape, options: .literal, range: nil) - let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } - - /** - Place an order for a pet - - - parameter body: (body) order placed for purchasing the pet - - returns: Promise - */ - open class func placeOrder( body: Order) -> Promise { - let deferred = Promise.pending() - placeOrderWithRequestBuilder(body: body).execute { (response, error) -> Void in - if let error = error { - deferred.resolver.reject(error) - } else if let response = response { - deferred.resolver.fulfill(response.body!) - } else { - fatalError() - } - } - return deferred.promise - } - - /** - Place an order for a pet - - POST /store/order - - parameter body: (body) order placed for purchasing the pet - - returns: RequestBuilder - */ - open class func placeOrderWithRequestBuilder(body: Order) -> RequestBuilder { - let path = "/store/order" - let URLString = PetstoreClientAPI.basePath + path - let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) - } - -} diff --git a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift deleted file mode 100644 index 83f4674553cb..000000000000 --- a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift +++ /dev/null @@ -1,323 +0,0 @@ -// -// UserAPI.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -import PromiseKit - -open class UserAPI { - /** - Create user - - - parameter body: (body) Created user object - - returns: Promise - */ - open class func createUser( body: User) -> Promise { - let deferred = Promise.pending() - createUserWithRequestBuilder(body: body).execute { (_, error) -> Void in - if let error = error { - deferred.resolver.reject(error) - } else { - deferred.resolver.fulfill(()) - } - } - return deferred.promise - } - - /** - Create user - - POST /user - - This can only be done by the logged in user. - - parameter body: (body) Created user object - - returns: RequestBuilder - */ - open class func createUserWithRequestBuilder(body: User) -> RequestBuilder { - let path = "/user" - let URLString = PetstoreClientAPI.basePath + path - let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) - } - - /** - Creates list of users with given input array - - - parameter body: (body) List of user object - - returns: Promise - */ - open class func createUsersWithArrayInput( body: [User]) -> Promise { - let deferred = Promise.pending() - createUsersWithArrayInputWithRequestBuilder(body: body).execute { (_, error) -> Void in - if let error = error { - deferred.resolver.reject(error) - } else { - deferred.resolver.fulfill(()) - } - } - return deferred.promise - } - - /** - Creates list of users with given input array - - POST /user/createWithArray - - parameter body: (body) List of user object - - returns: RequestBuilder - */ - open class func createUsersWithArrayInputWithRequestBuilder(body: [User]) -> RequestBuilder { - let path = "/user/createWithArray" - let URLString = PetstoreClientAPI.basePath + path - let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) - } - - /** - Creates list of users with given input array - - - parameter body: (body) List of user object - - returns: Promise - */ - open class func createUsersWithListInput( body: [User]) -> Promise { - let deferred = Promise.pending() - createUsersWithListInputWithRequestBuilder(body: body).execute { (_, error) -> Void in - if let error = error { - deferred.resolver.reject(error) - } else { - deferred.resolver.fulfill(()) - } - } - return deferred.promise - } - - /** - Creates list of users with given input array - - POST /user/createWithList - - parameter body: (body) List of user object - - returns: RequestBuilder - */ - open class func createUsersWithListInputWithRequestBuilder(body: [User]) -> RequestBuilder { - let path = "/user/createWithList" - let URLString = PetstoreClientAPI.basePath + path - let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) - } - - /** - Delete user - - - parameter username: (path) The name that needs to be deleted - - returns: Promise - */ - open class func deleteUser( username: String) -> Promise { - let deferred = Promise.pending() - deleteUserWithRequestBuilder(username: username).execute { (_, error) -> Void in - if let error = error { - deferred.resolver.reject(error) - } else { - deferred.resolver.fulfill(()) - } - } - return deferred.promise - } - - /** - Delete user - - DELETE /user/{username} - - This can only be done by the logged in user. - - parameter username: (path) The name that needs to be deleted - - returns: RequestBuilder - */ - open class func deleteUserWithRequestBuilder(username: String) -> RequestBuilder { - var path = "/user/{username}" - let usernamePreEscape = "\(APIHelper.mapValueToPathItem(username))" - let usernamePostEscape = usernamePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{username}", with: usernamePostEscape, options: .literal, range: nil) - let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } - - /** - Get user by user name - - - parameter username: (path) The name that needs to be fetched. Use user1 for testing. - - returns: Promise - */ - open class func getUserByName( username: String) -> Promise { - let deferred = Promise.pending() - getUserByNameWithRequestBuilder(username: username).execute { (response, error) -> Void in - if let error = error { - deferred.resolver.reject(error) - } else if let response = response { - deferred.resolver.fulfill(response.body!) - } else { - fatalError() - } - } - return deferred.promise - } - - /** - Get user by user name - - GET /user/{username} - - parameter username: (path) The name that needs to be fetched. Use user1 for testing. - - returns: RequestBuilder - */ - open class func getUserByNameWithRequestBuilder(username: String) -> RequestBuilder { - var path = "/user/{username}" - let usernamePreEscape = "\(APIHelper.mapValueToPathItem(username))" - let usernamePostEscape = usernamePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{username}", with: usernamePostEscape, options: .literal, range: nil) - let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } - - /** - Logs user into the system - - - parameter username: (query) The user name for login - - parameter password: (query) The password for login in clear text - - returns: Promise - */ - open class func loginUser( username: String, password: String) -> Promise { - let deferred = Promise.pending() - loginUserWithRequestBuilder(username: username, password: password).execute { (response, error) -> Void in - if let error = error { - deferred.resolver.reject(error) - } else if let response = response { - deferred.resolver.fulfill(response.body!) - } else { - fatalError() - } - } - return deferred.promise - } - - /** - Logs user into the system - - GET /user/login - - responseHeaders: [X-Rate-Limit(Int), X-Expires-After(Date)] - - parameter username: (query) The user name for login - - parameter password: (query) The password for login in clear text - - returns: RequestBuilder - */ - open class func loginUserWithRequestBuilder(username: String, password: String) -> RequestBuilder { - let path = "/user/login" - let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - - var url = URLComponents(string: URLString) - url?.queryItems = APIHelper.mapValuesToQueryItems([ - "username": username.encodeToJSON(), - "password": password.encodeToJSON() - ]) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } - - /** - Logs out current logged in user session - - - returns: Promise - */ - open class func logoutUser() -> Promise { - let deferred = Promise.pending() - logoutUserWithRequestBuilder().execute { (_, error) -> Void in - if let error = error { - deferred.resolver.reject(error) - } else { - deferred.resolver.fulfill(()) - } - } - return deferred.promise - } - - /** - Logs out current logged in user session - - GET /user/logout - - returns: RequestBuilder - */ - open class func logoutUserWithRequestBuilder() -> RequestBuilder { - let path = "/user/logout" - let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } - - /** - Updated user - - - parameter username: (path) name that need to be deleted - - parameter body: (body) Updated user object - - returns: Promise - */ - open class func updateUser( username: String, body: User) -> Promise { - let deferred = Promise.pending() - updateUserWithRequestBuilder(username: username, body: body).execute { (_, error) -> Void in - if let error = error { - deferred.resolver.reject(error) - } else { - deferred.resolver.fulfill(()) - } - } - return deferred.promise - } - - /** - Updated user - - PUT /user/{username} - - This can only be done by the logged in user. - - parameter username: (path) name that need to be deleted - - parameter body: (body) Updated user object - - returns: RequestBuilder - */ - open class func updateUserWithRequestBuilder(username: String, body: User) -> RequestBuilder { - var path = "/user/{username}" - let usernamePreEscape = "\(APIHelper.mapValueToPathItem(username))" - let usernamePostEscape = usernamePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{username}", with: usernamePostEscape, options: .literal, range: nil) - let URLString = PetstoreClientAPI.basePath + path - let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) - } - -} diff --git a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/AlamofireImplementations.swift b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/AlamofireImplementations.swift deleted file mode 100644 index 1d54e695608b..000000000000 --- a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/AlamofireImplementations.swift +++ /dev/null @@ -1,450 +0,0 @@ -// AlamofireImplementations.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -import Alamofire - -class AlamofireRequestBuilderFactory: RequestBuilderFactory { - func getNonDecodableBuilder() -> RequestBuilder.Type { - return AlamofireRequestBuilder.self - } - - func getBuilder() -> RequestBuilder.Type { - return AlamofireDecodableRequestBuilder.self - } -} - -private struct SynchronizedDictionary { - - private var dictionary = [K: V]() - private let queue = DispatchQueue( - label: "SynchronizedDictionary", - qos: DispatchQoS.userInitiated, - attributes: [DispatchQueue.Attributes.concurrent], - autoreleaseFrequency: DispatchQueue.AutoreleaseFrequency.inherit, - target: nil - ) - - public subscript(key: K) -> V? { - get { - var value: V? - - queue.sync { - value = self.dictionary[key] - } - - return value - } - set { - queue.sync(flags: DispatchWorkItemFlags.barrier) { - self.dictionary[key] = newValue - } - } - } - } - -// Store manager to retain its reference -private var managerStore = SynchronizedDictionary() - -open class AlamofireRequestBuilder: RequestBuilder { - required public init(method: String, URLString: String, parameters: [String: Any]?, isBody: Bool, headers: [String: String] = [:]) { - super.init(method: method, URLString: URLString, parameters: parameters, isBody: isBody, headers: headers) - } - - /** - May be overridden by a subclass if you want to control the session - configuration. - */ - open func createSessionManager() -> Alamofire.SessionManager { - let configuration = URLSessionConfiguration.default - configuration.httpAdditionalHeaders = buildHeaders() - return Alamofire.SessionManager(configuration: configuration) - } - - /** - May be overridden by a subclass if you want to custom request constructor. - */ - open func createURLRequest() -> URLRequest? { - let encoding: ParameterEncoding = isBody ? JSONDataEncoding() : URLEncoding() - guard let originalRequest = try? URLRequest(url: URLString, method: HTTPMethod(rawValue: method)!, headers: buildHeaders()) else { return nil } - return try? encoding.encode(originalRequest, with: parameters) - } - - /** - May be overridden by a subclass if you want to control the Content-Type - that is given to an uploaded form part. - - Return nil to use the default behavior (inferring the Content-Type from - the file extension). Return the desired Content-Type otherwise. - */ - open func contentTypeForFormPart(fileURL: URL) -> String? { - return nil - } - - /** - May be overridden by a subclass if you want to control the request - configuration (e.g. to override the cache policy). - */ - open func makeRequest(manager: SessionManager, method: HTTPMethod, encoding: ParameterEncoding, headers: [String: String]) -> DataRequest { - return manager.request(URLString, method: method, parameters: parameters, encoding: encoding, headers: headers) - } - - override open func execute(_ completion: @escaping (_ response: Response?, _ error: Error?) -> Void) { - let managerId: String = UUID().uuidString - // Create a new manager for each request to customize its request header - let manager = createSessionManager() - managerStore[managerId] = manager - - let encoding: ParameterEncoding = isBody ? JSONDataEncoding() : URLEncoding() - - let xMethod = Alamofire.HTTPMethod(rawValue: method) - let fileKeys = parameters == nil ? [] : parameters!.filter { $1 is NSURL } - .map { $0.0 } - - if fileKeys.count > 0 { - manager.upload(multipartFormData: { mpForm in - for (k, v) in self.parameters! { - switch v { - case let fileURL as URL: - if let mimeType = self.contentTypeForFormPart(fileURL: fileURL) { - mpForm.append(fileURL, withName: k, fileName: fileURL.lastPathComponent, mimeType: mimeType) - } else { - mpForm.append(fileURL, withName: k) - } - case let string as String: - mpForm.append(string.data(using: String.Encoding.utf8)!, withName: k) - case let number as NSNumber: - mpForm.append(number.stringValue.data(using: String.Encoding.utf8)!, withName: k) - default: - fatalError("Unprocessable value \(v) with key \(k)") - } - } - }, to: URLString, method: xMethod!, headers: nil, encodingCompletion: { encodingResult in - switch encodingResult { - case .success(let upload, _, _): - if let onProgressReady = self.onProgressReady { - onProgressReady(upload.uploadProgress) - } - self.processRequest(request: upload, managerId, completion) - case .failure(let encodingError): - completion(nil, ErrorResponse.error(415, nil, encodingError)) - } - }) - } else { - let request = makeRequest(manager: manager, method: xMethod!, encoding: encoding, headers: headers) - if let onProgressReady = self.onProgressReady { - onProgressReady(request.progress) - } - processRequest(request: request, managerId, completion) - } - - } - - fileprivate func processRequest(request: DataRequest, _ managerId: String, _ completion: @escaping (_ response: Response?, _ error: Error?) -> Void) { - if let credential = self.credential { - request.authenticate(usingCredential: credential) - } - - let cleanupRequest = { - managerStore[managerId] = nil - } - - let validatedRequest = request.validate() - - switch T.self { - case is String.Type: - validatedRequest.responseString(queue: PetstoreClientAPI.apiResponseQueue, completionHandler: { (stringResponse) in - cleanupRequest() - - if stringResponse.result.isFailure { - completion( - nil, - ErrorResponse.error(stringResponse.response?.statusCode ?? 500, stringResponse.data, stringResponse.result.error!) - ) - return - } - - completion( - Response( - response: stringResponse.response!, - body: ((stringResponse.result.value ?? "") as! T) - ), - nil - ) - }) - case is URL.Type: - validatedRequest.responseData(queue: PetstoreClientAPI.apiResponseQueue, completionHandler: { (dataResponse) in - cleanupRequest() - - do { - - guard !dataResponse.result.isFailure else { - throw DownloadException.responseFailed - } - - guard let data = dataResponse.data else { - throw DownloadException.responseDataMissing - } - - guard let request = request.request else { - throw DownloadException.requestMissing - } - - let fileManager = FileManager.default - let urlRequest = try request.asURLRequest() - let documentsDirectory = fileManager.urls(for: .documentDirectory, in: .userDomainMask)[0] - let requestURL = try self.getURL(from: urlRequest) - - var requestPath = try self.getPath(from: requestURL) - - if let headerFileName = self.getFileName(fromContentDisposition: dataResponse.response?.allHeaderFields["Content-Disposition"] as? String) { - requestPath = requestPath.appending("/\(headerFileName)") - } - - let filePath = documentsDirectory.appendingPathComponent(requestPath) - let directoryPath = filePath.deletingLastPathComponent().path - - try fileManager.createDirectory(atPath: directoryPath, withIntermediateDirectories: true, attributes: nil) - try data.write(to: filePath, options: .atomic) - - completion( - Response( - response: dataResponse.response!, - body: (filePath as! T) - ), - nil - ) - - } catch let requestParserError as DownloadException { - completion(nil, ErrorResponse.error(400, dataResponse.data, requestParserError)) - } catch let error { - completion(nil, ErrorResponse.error(400, dataResponse.data, error)) - } - return - }) - case is Void.Type: - validatedRequest.responseData(queue: PetstoreClientAPI.apiResponseQueue, completionHandler: { (voidResponse) in - cleanupRequest() - - if voidResponse.result.isFailure { - completion( - nil, - ErrorResponse.error(voidResponse.response?.statusCode ?? 500, voidResponse.data, voidResponse.result.error!) - ) - return - } - - completion( - Response( - response: voidResponse.response!, - body: nil), - nil - ) - }) - default: - validatedRequest.responseData(queue: PetstoreClientAPI.apiResponseQueue, completionHandler: { (dataResponse) in - cleanupRequest() - - if dataResponse.result.isFailure { - completion( - nil, - ErrorResponse.error(dataResponse.response?.statusCode ?? 500, dataResponse.data, dataResponse.result.error!) - ) - return - } - - completion( - Response( - response: dataResponse.response!, - body: (dataResponse.data as! T) - ), - nil - ) - }) - } - } - - open func buildHeaders() -> [String: String] { - var httpHeaders = SessionManager.defaultHTTPHeaders - for (key, value) in self.headers { - httpHeaders[key] = value - } - return httpHeaders - } - - fileprivate func getFileName(fromContentDisposition contentDisposition: String?) -> String? { - - guard let contentDisposition = contentDisposition else { - return nil - } - - let items = contentDisposition.components(separatedBy: ";") - - var filename: String? - - for contentItem in items { - - let filenameKey = "filename=" - guard let range = contentItem.range(of: filenameKey) else { - break - } - - filename = contentItem - return filename? - .replacingCharacters(in: range, with: "") - .replacingOccurrences(of: "\"", with: "") - .trimmingCharacters(in: .whitespacesAndNewlines) - } - - return filename - - } - - fileprivate func getPath(from url: URL) throws -> String { - - guard var path = URLComponents(url: url, resolvingAgainstBaseURL: true)?.path else { - throw DownloadException.requestMissingPath - } - - if path.hasPrefix("/") { - path.remove(at: path.startIndex) - } - - return path - - } - - fileprivate func getURL(from urlRequest: URLRequest) throws -> URL { - - guard let url = urlRequest.url else { - throw DownloadException.requestMissingURL - } - - return url - } - -} - -private enum DownloadException: Error { - case responseDataMissing - case responseFailed - case requestMissing - case requestMissingPath - case requestMissingURL -} - -public enum AlamofireDecodableRequestBuilderError: Error { - case emptyDataResponse - case nilHTTPResponse - case jsonDecoding(DecodingError) - case generalError(Error) -} - -open class AlamofireDecodableRequestBuilder: AlamofireRequestBuilder { - - override fileprivate func processRequest(request: DataRequest, _ managerId: String, _ completion: @escaping (_ response: Response?, _ error: Error?) -> Void) { - if let credential = self.credential { - request.authenticate(usingCredential: credential) - } - - let cleanupRequest = { - managerStore[managerId] = nil - } - - let validatedRequest = request.validate() - - switch T.self { - case is String.Type: - validatedRequest.responseString(queue: PetstoreClientAPI.apiResponseQueue, completionHandler: { (stringResponse) in - cleanupRequest() - - if stringResponse.result.isFailure { - completion( - nil, - ErrorResponse.error(stringResponse.response?.statusCode ?? 500, stringResponse.data, stringResponse.result.error!) - ) - return - } - - completion( - Response( - response: stringResponse.response!, - body: ((stringResponse.result.value ?? "") as! T) - ), - nil - ) - }) - case is Void.Type: - validatedRequest.responseData(queue: PetstoreClientAPI.apiResponseQueue, completionHandler: { (voidResponse) in - cleanupRequest() - - if voidResponse.result.isFailure { - completion( - nil, - ErrorResponse.error(voidResponse.response?.statusCode ?? 500, voidResponse.data, voidResponse.result.error!) - ) - return - } - - completion( - Response( - response: voidResponse.response!, - body: nil), - nil - ) - }) - case is Data.Type: - validatedRequest.responseData(queue: PetstoreClientAPI.apiResponseQueue, completionHandler: { (dataResponse) in - cleanupRequest() - - if dataResponse.result.isFailure { - completion( - nil, - ErrorResponse.error(dataResponse.response?.statusCode ?? 500, dataResponse.data, dataResponse.result.error!) - ) - return - } - - completion( - Response( - response: dataResponse.response!, - body: (dataResponse.data as! T) - ), - nil - ) - }) - default: - validatedRequest.responseData(queue: PetstoreClientAPI.apiResponseQueue, completionHandler: { (dataResponse: DataResponse) in - cleanupRequest() - - guard dataResponse.result.isSuccess else { - completion(nil, ErrorResponse.error(dataResponse.response?.statusCode ?? 500, dataResponse.data, dataResponse.result.error!)) - return - } - - guard let data = dataResponse.data, !data.isEmpty else { - completion(nil, ErrorResponse.error(-1, nil, AlamofireDecodableRequestBuilderError.emptyDataResponse)) - return - } - - guard let httpResponse = dataResponse.response else { - completion(nil, ErrorResponse.error(-2, nil, AlamofireDecodableRequestBuilderError.nilHTTPResponse)) - return - } - - var responseObj: Response? - - let decodeResult: (decodableObj: T?, error: Error?) = CodableHelper.decode(T.self, from: data) - if decodeResult.error == nil { - responseObj = Response(response: httpResponse, body: decodeResult.decodableObj) - } - - completion(responseObj, decodeResult.error) - }) - } - } - -} diff --git a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/CodableHelper.swift b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/CodableHelper.swift deleted file mode 100644 index 27cf29c65600..000000000000 --- a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/CodableHelper.swift +++ /dev/null @@ -1,75 +0,0 @@ -// -// CodableHelper.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public typealias EncodeResult = (data: Data?, error: Error?) - -open class CodableHelper { - - private static var customDateFormatter: DateFormatter? - private static var defaultDateFormatter: DateFormatter = { - let dateFormatter = DateFormatter() - dateFormatter.calendar = Calendar(identifier: .iso8601) - dateFormatter.locale = Locale(identifier: "en_US_POSIX") - dateFormatter.timeZone = TimeZone(secondsFromGMT: 0) - dateFormatter.dateFormat = Configuration.dateFormat - return dateFormatter - }() - private static var customJSONDecoder: JSONDecoder? - private static var defaultJSONDecoder: JSONDecoder = { - let decoder = JSONDecoder() - decoder.dateDecodingStrategy = .formatted(CodableHelper.dateFormatter) - return decoder - }() - private static var customJSONEncoder: JSONEncoder? - private static var defaultJSONEncoder: JSONEncoder = { - let encoder = JSONEncoder() - encoder.dateEncodingStrategy = .formatted(CodableHelper.dateFormatter) - encoder.outputFormatting = .prettyPrinted - return encoder - }() - - public static var dateFormatter: DateFormatter { - get { return self.customDateFormatter ?? self.defaultDateFormatter } - set { self.customDateFormatter = newValue } - } - public static var jsonDecoder: JSONDecoder { - get { return self.customJSONDecoder ?? self.defaultJSONDecoder } - set { self.customJSONDecoder = newValue } - } - public static var jsonEncoder: JSONEncoder { - get { return self.customJSONEncoder ?? self.defaultJSONEncoder } - set { self.customJSONEncoder = newValue } - } - - open class func decode(_ type: T.Type, from data: Data) -> (decodableObj: T?, error: Error?) where T: Decodable { - var returnedDecodable: T? - var returnedError: Error? - - do { - returnedDecodable = try self.jsonDecoder.decode(type, from: data) - } catch { - returnedError = error - } - - return (returnedDecodable, returnedError) - } - - open class func encode(_ value: T) -> EncodeResult where T: Encodable { - var returnedData: Data? - var returnedError: Error? - - do { - returnedData = try self.jsonEncoder.encode(value) - } catch { - returnedError = error - } - - return (returnedData, returnedError) - } -} diff --git a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Configuration.swift b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Configuration.swift deleted file mode 100644 index e1ecb39726e7..000000000000 --- a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Configuration.swift +++ /dev/null @@ -1,15 +0,0 @@ -// Configuration.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -open class Configuration { - - // This value is used to configure the date formatter that is used to serialize dates into JSON format. - // You must set it prior to encoding any dates, and it will only be read once. - public static var dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSZZZZZ" - -} diff --git a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift deleted file mode 100644 index 0ee7b7f0f6d8..000000000000 --- a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift +++ /dev/null @@ -1,188 +0,0 @@ -// Extensions.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -import PromiseKit - -extension Bool: JSONEncodable { - func encodeToJSON() -> Any { return self as Any } -} - -extension Float: JSONEncodable { - func encodeToJSON() -> Any { return self as Any } -} - -extension Int: JSONEncodable { - func encodeToJSON() -> Any { return self as Any } -} - -extension Int32: JSONEncodable { - func encodeToJSON() -> Any { return NSNumber(value: self as Int32) } -} - -extension Int64: JSONEncodable { - func encodeToJSON() -> Any { return NSNumber(value: self as Int64) } -} - -extension Double: JSONEncodable { - func encodeToJSON() -> Any { return self as Any } -} - -extension String: JSONEncodable { - func encodeToJSON() -> Any { return self as Any } -} - -extension RawRepresentable where RawValue: JSONEncodable { - func encodeToJSON() -> Any { return self.rawValue as Any } -} - -private func encodeIfPossible(_ object: T) -> Any { - if let encodableObject = object as? JSONEncodable { - return encodableObject.encodeToJSON() - } else { - return object as Any - } -} - -extension Array: JSONEncodable { - func encodeToJSON() -> Any { - return self.map(encodeIfPossible) - } -} - -extension Dictionary: JSONEncodable { - func encodeToJSON() -> Any { - var dictionary = [AnyHashable: Any]() - for (key, value) in self { - dictionary[key] = encodeIfPossible(value) - } - return dictionary as Any - } -} - -extension Data: JSONEncodable { - func encodeToJSON() -> Any { - return self.base64EncodedString(options: Data.Base64EncodingOptions()) - } -} - -extension Date: JSONEncodable { - func encodeToJSON() -> Any { - return CodableHelper.dateFormatter.string(from: self) as Any - } -} - -extension URL: JSONEncodable { - func encodeToJSON() -> Any { - return self - } -} - -extension UUID: JSONEncodable { - func encodeToJSON() -> Any { - return self.uuidString - } -} - -extension String: CodingKey { - - public var stringValue: String { - return self - } - - public init?(stringValue: String) { - self.init(stringLiteral: stringValue) - } - - public var intValue: Int? { - return nil - } - - public init?(intValue: Int) { - return nil - } - -} - -extension KeyedEncodingContainerProtocol { - - public mutating func encodeArray(_ values: [T], forKey key: Self.Key) throws where T: Encodable { - var arrayContainer = nestedUnkeyedContainer(forKey: key) - try arrayContainer.encode(contentsOf: values) - } - - public mutating func encodeArrayIfPresent(_ values: [T]?, forKey key: Self.Key) throws where T: Encodable { - if let values = values { - try encodeArray(values, forKey: key) - } - } - - public mutating func encodeMap(_ pairs: [Self.Key: T]) throws where T: Encodable { - for (key, value) in pairs { - try encode(value, forKey: key) - } - } - - public mutating func encodeMapIfPresent(_ pairs: [Self.Key: T]?) throws where T: Encodable { - if let pairs = pairs { - try encodeMap(pairs) - } - } - -} - -extension KeyedDecodingContainerProtocol { - - public func decodeArray(_ type: T.Type, forKey key: Self.Key) throws -> [T] where T: Decodable { - var tmpArray = [T]() - - var nestedContainer = try nestedUnkeyedContainer(forKey: key) - while !nestedContainer.isAtEnd { - let arrayValue = try nestedContainer.decode(T.self) - tmpArray.append(arrayValue) - } - - return tmpArray - } - - public func decodeArrayIfPresent(_ type: T.Type, forKey key: Self.Key) throws -> [T]? where T: Decodable { - var tmpArray: [T]? - - if contains(key) { - tmpArray = try decodeArray(T.self, forKey: key) - } - - return tmpArray - } - - public func decodeMap(_ type: T.Type, excludedKeys: Set) throws -> [Self.Key: T] where T: Decodable { - var map: [Self.Key: T] = [:] - - for key in allKeys { - if !excludedKeys.contains(key) { - let value = try decode(T.self, forKey: key) - map[key] = value - } - } - - return map - } - -} - -extension RequestBuilder { - public func execute() -> Promise> { - let deferred = Promise>.pending() - self.execute { (response: Response?, error: Error?) in - if let response = response { - deferred.resolver.fulfill(response) - } else { - deferred.resolver.reject(error!) - } - } - return deferred.promise - } -} diff --git a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/JSONEncodableEncoding.swift b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/JSONEncodableEncoding.swift deleted file mode 100644 index fb76bbed26f7..000000000000 --- a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/JSONEncodableEncoding.swift +++ /dev/null @@ -1,54 +0,0 @@ -// -// JSONDataEncoding.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -import Alamofire - -public struct JSONDataEncoding: ParameterEncoding { - - // MARK: Properties - - private static let jsonDataKey = "jsonData" - - // MARK: Encoding - - /// Creates a URL request by encoding parameters and applying them onto an existing request. - /// - /// - parameter urlRequest: The request to have parameters applied. - /// - parameter parameters: The parameters to apply. This should have a single key/value - /// pair with "jsonData" as the key and a Data object as the value. - /// - /// - throws: An `Error` if the encoding process encounters an error. - /// - /// - returns: The encoded request. - public func encode(_ urlRequest: URLRequestConvertible, with parameters: Parameters?) throws -> URLRequest { - var urlRequest = try urlRequest.asURLRequest() - - guard let jsonData = parameters?[JSONDataEncoding.jsonDataKey] as? Data, !jsonData.isEmpty else { - return urlRequest - } - - if urlRequest.value(forHTTPHeaderField: "Content-Type") == nil { - urlRequest.setValue("application/json", forHTTPHeaderField: "Content-Type") - } - - urlRequest.httpBody = jsonData - - return urlRequest - } - - public static func encodingParameters(jsonData: Data?) -> Parameters? { - var returnedParams: Parameters? - if let jsonData = jsonData, !jsonData.isEmpty { - var params = Parameters() - params[jsonDataKey] = jsonData - returnedParams = params - } - return returnedParams - } - -} diff --git a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift deleted file mode 100644 index 827bdec87782..000000000000 --- a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift +++ /dev/null @@ -1,43 +0,0 @@ -// -// JSONEncodingHelper.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -import Alamofire - -open class JSONEncodingHelper { - - open class func encodingParameters(forEncodableObject encodableObj: T?) -> Parameters? { - var params: Parameters? - - // Encode the Encodable object - if let encodableObj = encodableObj { - let encodeResult = CodableHelper.encode(encodableObj) - if encodeResult.error == nil { - params = JSONDataEncoding.encodingParameters(jsonData: encodeResult.data) - } - } - - return params - } - - open class func encodingParameters(forEncodableObject encodableObj: Any?) -> Parameters? { - var params: Parameters? - - if let encodableObj = encodableObj { - do { - let data = try JSONSerialization.data(withJSONObject: encodableObj, options: .prettyPrinted) - params = JSONDataEncoding.encodingParameters(jsonData: data) - } catch { - print(error) - return nil - } - } - - return params - } - -} diff --git a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift deleted file mode 100644 index 25161165865e..000000000000 --- a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift +++ /dev/null @@ -1,36 +0,0 @@ -// Models.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -protocol JSONEncodable { - func encodeToJSON() -> Any -} - -public enum ErrorResponse: Error { - case error(Int, Data?, Error) -} - -open class Response { - public let statusCode: Int - public let header: [String: String] - public let body: T? - - public init(statusCode: Int, header: [String: String], body: T?) { - self.statusCode = statusCode - self.header = header - self.body = body - } - - public convenience init(response: HTTPURLResponse, body: T?) { - let rawHeader = response.allHeaderFields - var header = [String: String]() - for case let (key, value) as (String, String) in rawHeader { - header[key] = value - } - self.init(statusCode: response.statusCode, header: header, body: body) - } -} diff --git a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift deleted file mode 100644 index 83a06951ccd6..000000000000 --- a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift +++ /dev/null @@ -1,25 +0,0 @@ -// -// AdditionalPropertiesClass.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct AdditionalPropertiesClass: Codable { - - public var mapString: [String: String]? - public var mapMapString: [String: [String: String]]? - - public init(mapString: [String: String]?, mapMapString: [String: [String: String]]?) { - self.mapString = mapString - self.mapMapString = mapMapString - } - - public enum CodingKeys: String, CodingKey { - case mapString = "map_string" - case mapMapString = "map_map_string" - } - -} diff --git a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift deleted file mode 100644 index 5ed9f31e2a36..000000000000 --- a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift +++ /dev/null @@ -1,20 +0,0 @@ -// -// Animal.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct Animal: Codable { - - public var className: String - public var color: String? = "red" - - public init(className: String, color: String?) { - self.className = className - self.color = color - } - -} diff --git a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift deleted file mode 100644 index e09b0e9efdc8..000000000000 --- a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift +++ /dev/null @@ -1,10 +0,0 @@ -// -// AnimalFarm.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public typealias AnimalFarm = [Animal] diff --git a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift deleted file mode 100644 index ec270da89074..000000000000 --- a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift +++ /dev/null @@ -1,22 +0,0 @@ -// -// ApiResponse.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct ApiResponse: Codable { - - public var code: Int? - public var type: String? - public var message: String? - - public init(code: Int?, type: String?, message: String?) { - self.code = code - self.type = type - self.message = message - } - -} diff --git a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift deleted file mode 100644 index 3843287630b1..000000000000 --- a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift +++ /dev/null @@ -1,22 +0,0 @@ -// -// ArrayOfArrayOfNumberOnly.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct ArrayOfArrayOfNumberOnly: Codable { - - public var arrayArrayNumber: [[Double]]? - - public init(arrayArrayNumber: [[Double]]?) { - self.arrayArrayNumber = arrayArrayNumber - } - - public enum CodingKeys: String, CodingKey { - case arrayArrayNumber = "ArrayArrayNumber" - } - -} diff --git a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift deleted file mode 100644 index f8b198e81f50..000000000000 --- a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift +++ /dev/null @@ -1,22 +0,0 @@ -// -// ArrayOfNumberOnly.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct ArrayOfNumberOnly: Codable { - - public var arrayNumber: [Double]? - - public init(arrayNumber: [Double]?) { - self.arrayNumber = arrayNumber - } - - public enum CodingKeys: String, CodingKey { - case arrayNumber = "ArrayNumber" - } - -} diff --git a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift deleted file mode 100644 index 67f7f7e5151f..000000000000 --- a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift +++ /dev/null @@ -1,28 +0,0 @@ -// -// ArrayTest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct ArrayTest: Codable { - - public var arrayOfString: [String]? - public var arrayArrayOfInteger: [[Int64]]? - public var arrayArrayOfModel: [[ReadOnlyFirst]]? - - public init(arrayOfString: [String]?, arrayArrayOfInteger: [[Int64]]?, arrayArrayOfModel: [[ReadOnlyFirst]]?) { - self.arrayOfString = arrayOfString - self.arrayArrayOfInteger = arrayArrayOfInteger - self.arrayArrayOfModel = arrayArrayOfModel - } - - public enum CodingKeys: String, CodingKey { - case arrayOfString = "array_of_string" - case arrayArrayOfInteger = "array_array_of_integer" - case arrayArrayOfModel = "array_array_of_model" - } - -} diff --git a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift deleted file mode 100644 index d576b50b1c9c..000000000000 --- a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift +++ /dev/null @@ -1,38 +0,0 @@ -// -// Capitalization.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct Capitalization: Codable { - - public var smallCamel: String? - public var capitalCamel: String? - public var smallSnake: String? - public var capitalSnake: String? - public var sCAETHFlowPoints: String? - /** Name of the pet */ - public var ATT_NAME: String? - - public init(smallCamel: String?, capitalCamel: String?, smallSnake: String?, capitalSnake: String?, sCAETHFlowPoints: String?, ATT_NAME: String?) { - self.smallCamel = smallCamel - self.capitalCamel = capitalCamel - self.smallSnake = smallSnake - self.capitalSnake = capitalSnake - self.sCAETHFlowPoints = sCAETHFlowPoints - self.ATT_NAME = ATT_NAME - } - - public enum CodingKeys: String, CodingKey { - case smallCamel - case capitalCamel = "CapitalCamel" - case smallSnake = "small_Snake" - case capitalSnake = "Capital_Snake" - case sCAETHFlowPoints = "SCA_ETH_Flow_Points" - case ATT_NAME - } - -} diff --git a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift deleted file mode 100644 index 7ab887f3113f..000000000000 --- a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift +++ /dev/null @@ -1,22 +0,0 @@ -// -// Cat.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct Cat: Codable { - - public var className: String - public var color: String? = "red" - public var declawed: Bool? - - public init(className: String, color: String?, declawed: Bool?) { - self.className = className - self.color = color - self.declawed = declawed - } - -} diff --git a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift deleted file mode 100644 index a51ad0dffab1..000000000000 --- a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift +++ /dev/null @@ -1,18 +0,0 @@ -// -// CatAllOf.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct CatAllOf: Codable { - - public var declawed: Bool? - - public init(declawed: Bool?) { - self.declawed = declawed - } - -} diff --git a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Category.swift b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Category.swift deleted file mode 100644 index eb8f7e5e1974..000000000000 --- a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Category.swift +++ /dev/null @@ -1,20 +0,0 @@ -// -// Category.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct Category: Codable { - - public var id: Int64? - public var name: String = "default-name" - - public init(id: Int64?, name: String) { - self.id = id - self.name = name - } - -} diff --git a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift deleted file mode 100644 index e2a7d4427a06..000000000000 --- a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift +++ /dev/null @@ -1,19 +0,0 @@ -// -// ClassModel.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -/** Model for testing model with \"_class\" property */ -public struct ClassModel: Codable { - - public var _class: String? - - public init(_class: String?) { - self._class = _class - } - -} diff --git a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Client.swift b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Client.swift deleted file mode 100644 index 00245ca37280..000000000000 --- a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Client.swift +++ /dev/null @@ -1,18 +0,0 @@ -// -// Client.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct Client: Codable { - - public var client: String? - - public init(client: String?) { - self.client = client - } - -} diff --git a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift deleted file mode 100644 index 492c1228008e..000000000000 --- a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift +++ /dev/null @@ -1,22 +0,0 @@ -// -// Dog.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct Dog: Codable { - - public var className: String - public var color: String? = "red" - public var breed: String? - - public init(className: String, color: String?, breed: String?) { - self.className = className - self.color = color - self.breed = breed - } - -} diff --git a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift deleted file mode 100644 index 7786f8acc5ae..000000000000 --- a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift +++ /dev/null @@ -1,18 +0,0 @@ -// -// DogAllOf.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct DogAllOf: Codable { - - public var breed: String? - - public init(breed: String?) { - self.breed = breed - } - -} diff --git a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift deleted file mode 100644 index 5034ff0b8c68..000000000000 --- a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift +++ /dev/null @@ -1,33 +0,0 @@ -// -// EnumArrays.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct EnumArrays: Codable { - - public enum JustSymbol: String, Codable { - case greaterThanOrEqualTo = ">=" - case dollar = "$" - } - public enum ArrayEnum: String, Codable { - case fish = "fish" - case crab = "crab" - } - public var justSymbol: JustSymbol? - public var arrayEnum: [ArrayEnum]? - - public init(justSymbol: JustSymbol?, arrayEnum: [ArrayEnum]?) { - self.justSymbol = justSymbol - self.arrayEnum = arrayEnum - } - - public enum CodingKeys: String, CodingKey { - case justSymbol = "just_symbol" - case arrayEnum = "array_enum" - } - -} diff --git a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift deleted file mode 100644 index 3c1dfcac577d..000000000000 --- a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift +++ /dev/null @@ -1,14 +0,0 @@ -// -// EnumClass.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public enum EnumClass: String, Codable { - case abc = "_abc" - case efg = "-efg" - case xyz = "(xyz)" -} diff --git a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift deleted file mode 100644 index 6db9b34d183b..000000000000 --- a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift +++ /dev/null @@ -1,52 +0,0 @@ -// -// EnumTest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct EnumTest: Codable { - - public enum EnumString: String, Codable { - case upper = "UPPER" - case lower = "lower" - case empty = "" - } - public enum EnumStringRequired: String, Codable { - case upper = "UPPER" - case lower = "lower" - case empty = "" - } - public enum EnumInteger: Int, Codable { - case _1 = 1 - case number1 = -1 - } - public enum EnumNumber: Double, Codable { - case _11 = 1.1 - case number12 = -1.2 - } - public var enumString: EnumString? - public var enumStringRequired: EnumStringRequired - public var enumInteger: EnumInteger? - public var enumNumber: EnumNumber? - public var outerEnum: OuterEnum? - - public init(enumString: EnumString?, enumStringRequired: EnumStringRequired, enumInteger: EnumInteger?, enumNumber: EnumNumber?, outerEnum: OuterEnum?) { - self.enumString = enumString - self.enumStringRequired = enumStringRequired - self.enumInteger = enumInteger - self.enumNumber = enumNumber - self.outerEnum = outerEnum - } - - public enum CodingKeys: String, CodingKey { - case enumString = "enum_string" - case enumStringRequired = "enum_string_required" - case enumInteger = "enum_integer" - case enumNumber = "enum_number" - case outerEnum - } - -} diff --git a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/File.swift b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/File.swift deleted file mode 100644 index abf3ccffc485..000000000000 --- a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/File.swift +++ /dev/null @@ -1,20 +0,0 @@ -// -// File.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -/** Must be named `File` for test. */ -public struct File: Codable { - - /** Test capitalization */ - public var sourceURI: String? - - public init(sourceURI: String?) { - self.sourceURI = sourceURI - } - -} diff --git a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift deleted file mode 100644 index 532f1457939a..000000000000 --- a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift +++ /dev/null @@ -1,20 +0,0 @@ -// -// FileSchemaTestClass.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct FileSchemaTestClass: Codable { - - public var file: File? - public var files: [File]? - - public init(file: File?, files: [File]?) { - self.file = file - self.files = files - } - -} diff --git a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift deleted file mode 100644 index 20bd6d103b3d..000000000000 --- a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift +++ /dev/null @@ -1,42 +0,0 @@ -// -// FormatTest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct FormatTest: Codable { - - public var integer: Int? - public var int32: Int? - public var int64: Int64? - public var number: Double - public var float: Float? - public var double: Double? - public var string: String? - public var byte: Data - public var binary: URL? - public var date: Date - public var dateTime: Date? - public var uuid: UUID? - public var password: String - - public init(integer: Int?, int32: Int?, int64: Int64?, number: Double, float: Float?, double: Double?, string: String?, byte: Data, binary: URL?, date: Date, dateTime: Date?, uuid: UUID?, password: String) { - self.integer = integer - self.int32 = int32 - self.int64 = int64 - self.number = number - self.float = float - self.double = double - self.string = string - self.byte = byte - self.binary = binary - self.date = date - self.dateTime = dateTime - self.uuid = uuid - self.password = password - } - -} diff --git a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift deleted file mode 100644 index 906ddb06fb17..000000000000 --- a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift +++ /dev/null @@ -1,20 +0,0 @@ -// -// HasOnlyReadOnly.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct HasOnlyReadOnly: Codable { - - public var bar: String? - public var foo: String? - - public init(bar: String?, foo: String?) { - self.bar = bar - self.foo = foo - } - -} diff --git a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/List.swift b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/List.swift deleted file mode 100644 index 08d59953873e..000000000000 --- a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/List.swift +++ /dev/null @@ -1,22 +0,0 @@ -// -// List.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct List: Codable { - - public var _123list: String? - - public init(_123list: String?) { - self._123list = _123list - } - - public enum CodingKeys: String, CodingKey { - case _123list = "123-list" - } - -} diff --git a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift deleted file mode 100644 index 3a10a7dfcaf6..000000000000 --- a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift +++ /dev/null @@ -1,35 +0,0 @@ -// -// MapTest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct MapTest: Codable { - - public enum MapOfEnumString: String, Codable { - case upper = "UPPER" - case lower = "lower" - } - public var mapMapOfString: [String: [String: String]]? - public var mapOfEnumString: [String: String]? - public var directMap: [String: Bool]? - public var indirectMap: StringBooleanMap? - - public init(mapMapOfString: [String: [String: String]]?, mapOfEnumString: [String: String]?, directMap: [String: Bool]?, indirectMap: StringBooleanMap?) { - self.mapMapOfString = mapMapOfString - self.mapOfEnumString = mapOfEnumString - self.directMap = directMap - self.indirectMap = indirectMap - } - - public enum CodingKeys: String, CodingKey { - case mapMapOfString = "map_map_of_string" - case mapOfEnumString = "map_of_enum_string" - case directMap = "direct_map" - case indirectMap = "indirect_map" - } - -} diff --git a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift deleted file mode 100644 index c3deb2f28932..000000000000 --- a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift +++ /dev/null @@ -1,22 +0,0 @@ -// -// MixedPropertiesAndAdditionalPropertiesClass.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct MixedPropertiesAndAdditionalPropertiesClass: Codable { - - public var uuid: UUID? - public var dateTime: Date? - public var map: [String: Animal]? - - public init(uuid: UUID?, dateTime: Date?, map: [String: Animal]?) { - self.uuid = uuid - self.dateTime = dateTime - self.map = map - } - -} diff --git a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift deleted file mode 100644 index 78917d75b44d..000000000000 --- a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift +++ /dev/null @@ -1,26 +0,0 @@ -// -// Model200Response.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -/** Model for testing model name starting with number */ -public struct Model200Response: Codable { - - public var name: Int? - public var _class: String? - - public init(name: Int?, _class: String?) { - self.name = name - self._class = _class - } - - public enum CodingKeys: String, CodingKey { - case name - case _class = "class" - } - -} diff --git a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift deleted file mode 100644 index 43c4891e1e23..000000000000 --- a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift +++ /dev/null @@ -1,32 +0,0 @@ -// -// Name.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -/** Model for testing model name same as property name */ -public struct Name: Codable { - - public var name: Int - public var snakeCase: Int? - public var property: String? - public var _123number: Int? - - public init(name: Int, snakeCase: Int?, property: String?, _123number: Int?) { - self.name = name - self.snakeCase = snakeCase - self.property = property - self._123number = _123number - } - - public enum CodingKeys: String, CodingKey { - case name - case snakeCase = "snake_case" - case property - case _123number = "123Number" - } - -} diff --git a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift deleted file mode 100644 index abd2269e8e76..000000000000 --- a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift +++ /dev/null @@ -1,22 +0,0 @@ -// -// NumberOnly.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct NumberOnly: Codable { - - public var justNumber: Double? - - public init(justNumber: Double?) { - self.justNumber = justNumber - } - - public enum CodingKeys: String, CodingKey { - case justNumber = "JustNumber" - } - -} diff --git a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Order.swift b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Order.swift deleted file mode 100644 index a6e1b1d2e5e4..000000000000 --- a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Order.swift +++ /dev/null @@ -1,34 +0,0 @@ -// -// Order.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct Order: Codable { - - public enum Status: String, Codable { - case placed = "placed" - case approved = "approved" - case delivered = "delivered" - } - public var id: Int64? - public var petId: Int64? - public var quantity: Int? - public var shipDate: Date? - /** Order Status */ - public var status: Status? - public var complete: Bool? = false - - public init(id: Int64?, petId: Int64?, quantity: Int?, shipDate: Date?, status: Status?, complete: Bool?) { - self.id = id - self.petId = petId - self.quantity = quantity - self.shipDate = shipDate - self.status = status - self.complete = complete - } - -} diff --git a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift deleted file mode 100644 index 49aec001c5db..000000000000 --- a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift +++ /dev/null @@ -1,28 +0,0 @@ -// -// OuterComposite.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct OuterComposite: Codable { - - public var myNumber: Double? - public var myString: String? - public var myBoolean: Bool? - - public init(myNumber: Double?, myString: String?, myBoolean: Bool?) { - self.myNumber = myNumber - self.myString = myString - self.myBoolean = myBoolean - } - - public enum CodingKeys: String, CodingKey { - case myNumber = "my_number" - case myString = "my_string" - case myBoolean = "my_boolean" - } - -} diff --git a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift deleted file mode 100644 index 9f80fc95ecf0..000000000000 --- a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift +++ /dev/null @@ -1,14 +0,0 @@ -// -// OuterEnum.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public enum OuterEnum: String, Codable { - case placed = "placed" - case approved = "approved" - case delivered = "delivered" -} diff --git a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift deleted file mode 100644 index af60a550bb19..000000000000 --- a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift +++ /dev/null @@ -1,34 +0,0 @@ -// -// Pet.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct Pet: Codable { - - public enum Status: String, Codable { - case available = "available" - case pending = "pending" - case sold = "sold" - } - public var id: Int64? - public var category: Category? - public var name: String - public var photoUrls: [String] - public var tags: [Tag]? - /** pet status in the store */ - public var status: Status? - - public init(id: Int64?, category: Category?, name: String, photoUrls: [String], tags: [Tag]?, status: Status?) { - self.id = id - self.category = category - self.name = name - self.photoUrls = photoUrls - self.tags = tags - self.status = status - } - -} diff --git a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift deleted file mode 100644 index 0acd21fd1000..000000000000 --- a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift +++ /dev/null @@ -1,20 +0,0 @@ -// -// ReadOnlyFirst.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct ReadOnlyFirst: Codable { - - public var bar: String? - public var baz: String? - - public init(bar: String?, baz: String?) { - self.bar = bar - self.baz = baz - } - -} diff --git a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Return.swift b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Return.swift deleted file mode 100644 index b34ddc68142d..000000000000 --- a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Return.swift +++ /dev/null @@ -1,23 +0,0 @@ -// -// Return.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -/** Model for testing reserved words */ -public struct Return: Codable { - - public var _return: Int? - - public init(_return: Int?) { - self._return = _return - } - - public enum CodingKeys: String, CodingKey { - case _return = "return" - } - -} diff --git a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift deleted file mode 100644 index e79fc45c0e91..000000000000 --- a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift +++ /dev/null @@ -1,22 +0,0 @@ -// -// SpecialModelName.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct SpecialModelName: Codable { - - public var specialPropertyName: Int64? - - public init(specialPropertyName: Int64?) { - self.specialPropertyName = specialPropertyName - } - - public enum CodingKeys: String, CodingKey { - case specialPropertyName = "$special[property.name]" - } - -} diff --git a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift deleted file mode 100644 index 3f1237fee477..000000000000 --- a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift +++ /dev/null @@ -1,45 +0,0 @@ -// -// StringBooleanMap.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct StringBooleanMap: Codable { - - public var additionalProperties: [String: Bool] = [:] - - public subscript(key: String) -> Bool? { - get { - if let value = additionalProperties[key] { - return value - } - return nil - } - - set { - additionalProperties[key] = newValue - } - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - try container.encodeMap(additionalProperties) - } - - // Decodable protocol methods - - public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - var nonAdditionalPropertyKeys = Set() - additionalProperties = try container.decodeMap(Bool.self, excludedKeys: nonAdditionalPropertyKeys) - } - -} diff --git a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift deleted file mode 100644 index 4dd8a9a9f5a0..000000000000 --- a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift +++ /dev/null @@ -1,20 +0,0 @@ -// -// Tag.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct Tag: Codable { - - public var id: Int64? - public var name: String? - - public init(id: Int64?, name: String?) { - self.id = id - self.name = name - } - -} diff --git a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift deleted file mode 100644 index bf0006e1a266..000000000000 --- a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift +++ /dev/null @@ -1,34 +0,0 @@ -// -// TypeHolderDefault.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct TypeHolderDefault: Codable { - - public var stringItem: String = "what" - public var numberItem: Double - public var integerItem: Int - public var boolItem: Bool = true - public var arrayItem: [Int] - - public init(stringItem: String, numberItem: Double, integerItem: Int, boolItem: Bool, arrayItem: [Int]) { - self.stringItem = stringItem - self.numberItem = numberItem - self.integerItem = integerItem - self.boolItem = boolItem - self.arrayItem = arrayItem - } - - public enum CodingKeys: String, CodingKey { - case stringItem = "string_item" - case numberItem = "number_item" - case integerItem = "integer_item" - case boolItem = "bool_item" - case arrayItem = "array_item" - } - -} diff --git a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift deleted file mode 100644 index 602a2a6d185a..000000000000 --- a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift +++ /dev/null @@ -1,34 +0,0 @@ -// -// TypeHolderExample.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct TypeHolderExample: Codable { - - public var stringItem: String - public var numberItem: Double - public var integerItem: Int - public var boolItem: Bool - public var arrayItem: [Int] - - public init(stringItem: String, numberItem: Double, integerItem: Int, boolItem: Bool, arrayItem: [Int]) { - self.stringItem = stringItem - self.numberItem = numberItem - self.integerItem = integerItem - self.boolItem = boolItem - self.arrayItem = arrayItem - } - - public enum CodingKeys: String, CodingKey { - case stringItem = "string_item" - case numberItem = "number_item" - case integerItem = "integer_item" - case boolItem = "bool_item" - case arrayItem = "array_item" - } - -} diff --git a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/User.swift b/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/User.swift deleted file mode 100644 index 79f271ed7356..000000000000 --- a/samples/client/petstore/swift4/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/User.swift +++ /dev/null @@ -1,33 +0,0 @@ -// -// User.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct User: Codable { - - public var id: Int64? - public var username: String? - public var firstName: String? - public var lastName: String? - public var email: String? - public var password: String? - public var phone: String? - /** User Status */ - public var userStatus: Int? - - public init(id: Int64?, username: String?, firstName: String?, lastName: String?, email: String?, password: String?, phone: String?, userStatus: Int?) { - self.id = id - self.username = username - self.firstName = firstName - self.lastName = lastName - self.email = email - self.password = password - self.phone = phone - self.userStatus = userStatus - } - -} diff --git a/samples/client/petstore/swift4/promisekitLibrary/README.md b/samples/client/petstore/swift4/promisekitLibrary/README.md deleted file mode 100644 index bd093317bd7a..000000000000 --- a/samples/client/petstore/swift4/promisekitLibrary/README.md +++ /dev/null @@ -1,141 +0,0 @@ -# Swift4 API client for PetstoreClient - -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 API client 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 an API client. - -- API version: 1.0.0 -- Package version: -- Build package: org.openapitools.codegen.languages.Swift4Codegen - -## Installation - -### Carthage - -Run `carthage update` - -### CocoaPods - -Run `pod install` - -## Documentation for API Endpoints - -All URIs are relative to *http://petstore.swagger.io:80/v2* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*AnotherFakeAPI* | [**call123testSpecialTags**](docs/AnotherFakeAPI.md#call123testspecialtags) | **PATCH** /another-fake/dummy | To test special tags -*FakeAPI* | [**fakeOuterBooleanSerialize**](docs/FakeAPI.md#fakeouterbooleanserialize) | **POST** /fake/outer/boolean | -*FakeAPI* | [**fakeOuterCompositeSerialize**](docs/FakeAPI.md#fakeoutercompositeserialize) | **POST** /fake/outer/composite | -*FakeAPI* | [**fakeOuterNumberSerialize**](docs/FakeAPI.md#fakeouternumberserialize) | **POST** /fake/outer/number | -*FakeAPI* | [**fakeOuterStringSerialize**](docs/FakeAPI.md#fakeouterstringserialize) | **POST** /fake/outer/string | -*FakeAPI* | [**testBodyWithFileSchema**](docs/FakeAPI.md#testbodywithfileschema) | **PUT** /fake/body-with-file-schema | -*FakeAPI* | [**testBodyWithQueryParams**](docs/FakeAPI.md#testbodywithqueryparams) | **PUT** /fake/body-with-query-params | -*FakeAPI* | [**testClientModel**](docs/FakeAPI.md#testclientmodel) | **PATCH** /fake | To test \"client\" model -*FakeAPI* | [**testEndpointParameters**](docs/FakeAPI.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 -*FakeAPI* | [**testEnumParameters**](docs/FakeAPI.md#testenumparameters) | **GET** /fake | To test enum parameters -*FakeAPI* | [**testGroupParameters**](docs/FakeAPI.md#testgroupparameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) -*FakeAPI* | [**testInlineAdditionalProperties**](docs/FakeAPI.md#testinlineadditionalproperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties -*FakeAPI* | [**testJsonFormData**](docs/FakeAPI.md#testjsonformdata) | **GET** /fake/jsonFormData | test json serialization of form data -*FakeClassnameTags123API* | [**testClassname**](docs/FakeClassnameTags123API.md#testclassname) | **PATCH** /fake_classname_test | To test class name in snake case -*PetAPI* | [**addPet**](docs/PetAPI.md#addpet) | **POST** /pet | Add a new pet to the store -*PetAPI* | [**deletePet**](docs/PetAPI.md#deletepet) | **DELETE** /pet/{petId} | Deletes a pet -*PetAPI* | [**findPetsByStatus**](docs/PetAPI.md#findpetsbystatus) | **GET** /pet/findByStatus | Finds Pets by status -*PetAPI* | [**findPetsByTags**](docs/PetAPI.md#findpetsbytags) | **GET** /pet/findByTags | Finds Pets by tags -*PetAPI* | [**getPetById**](docs/PetAPI.md#getpetbyid) | **GET** /pet/{petId} | Find pet by ID -*PetAPI* | [**updatePet**](docs/PetAPI.md#updatepet) | **PUT** /pet | Update an existing pet -*PetAPI* | [**updatePetWithForm**](docs/PetAPI.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data -*PetAPI* | [**uploadFile**](docs/PetAPI.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image -*PetAPI* | [**uploadFileWithRequiredFile**](docs/PetAPI.md#uploadfilewithrequiredfile) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required) -*StoreAPI* | [**deleteOrder**](docs/StoreAPI.md#deleteorder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID -*StoreAPI* | [**getInventory**](docs/StoreAPI.md#getinventory) | **GET** /store/inventory | Returns pet inventories by status -*StoreAPI* | [**getOrderById**](docs/StoreAPI.md#getorderbyid) | **GET** /store/order/{order_id} | Find purchase order by ID -*StoreAPI* | [**placeOrder**](docs/StoreAPI.md#placeorder) | **POST** /store/order | Place an order for a pet -*UserAPI* | [**createUser**](docs/UserAPI.md#createuser) | **POST** /user | Create user -*UserAPI* | [**createUsersWithArrayInput**](docs/UserAPI.md#createuserswitharrayinput) | **POST** /user/createWithArray | Creates list of users with given input array -*UserAPI* | [**createUsersWithListInput**](docs/UserAPI.md#createuserswithlistinput) | **POST** /user/createWithList | Creates list of users with given input array -*UserAPI* | [**deleteUser**](docs/UserAPI.md#deleteuser) | **DELETE** /user/{username} | Delete user -*UserAPI* | [**getUserByName**](docs/UserAPI.md#getuserbyname) | **GET** /user/{username} | Get user by user name -*UserAPI* | [**loginUser**](docs/UserAPI.md#loginuser) | **GET** /user/login | Logs user into the system -*UserAPI* | [**logoutUser**](docs/UserAPI.md#logoutuser) | **GET** /user/logout | Logs out current logged in user session -*UserAPI* | [**updateUser**](docs/UserAPI.md#updateuser) | **PUT** /user/{username} | Updated user - - -## Documentation For Models - - - [AdditionalPropertiesClass](docs/AdditionalPropertiesClass.md) - - [Animal](docs/Animal.md) - - [AnimalFarm](docs/AnimalFarm.md) - - [ApiResponse](docs/ApiResponse.md) - - [ArrayOfArrayOfNumberOnly](docs/ArrayOfArrayOfNumberOnly.md) - - [ArrayOfNumberOnly](docs/ArrayOfNumberOnly.md) - - [ArrayTest](docs/ArrayTest.md) - - [Capitalization](docs/Capitalization.md) - - [Cat](docs/Cat.md) - - [CatAllOf](docs/CatAllOf.md) - - [Category](docs/Category.md) - - [ClassModel](docs/ClassModel.md) - - [Client](docs/Client.md) - - [Dog](docs/Dog.md) - - [DogAllOf](docs/DogAllOf.md) - - [EnumArrays](docs/EnumArrays.md) - - [EnumClass](docs/EnumClass.md) - - [EnumTest](docs/EnumTest.md) - - [File](docs/File.md) - - [FileSchemaTestClass](docs/FileSchemaTestClass.md) - - [FormatTest](docs/FormatTest.md) - - [HasOnlyReadOnly](docs/HasOnlyReadOnly.md) - - [List](docs/List.md) - - [MapTest](docs/MapTest.md) - - [MixedPropertiesAndAdditionalPropertiesClass](docs/MixedPropertiesAndAdditionalPropertiesClass.md) - - [Model200Response](docs/Model200Response.md) - - [Name](docs/Name.md) - - [NumberOnly](docs/NumberOnly.md) - - [Order](docs/Order.md) - - [OuterComposite](docs/OuterComposite.md) - - [OuterEnum](docs/OuterEnum.md) - - [Pet](docs/Pet.md) - - [ReadOnlyFirst](docs/ReadOnlyFirst.md) - - [Return](docs/Return.md) - - [SpecialModelName](docs/SpecialModelName.md) - - [StringBooleanMap](docs/StringBooleanMap.md) - - [Tag](docs/Tag.md) - - [TypeHolderDefault](docs/TypeHolderDefault.md) - - [TypeHolderExample](docs/TypeHolderExample.md) - - [User](docs/User.md) - - -## Documentation For Authorization - - -## api_key - -- **Type**: API key -- **API key parameter name**: api_key -- **Location**: HTTP header - -## api_key_query - -- **Type**: API key -- **API key parameter name**: api_key_query -- **Location**: URL query string - -## http_basic_test - -- **Type**: HTTP basic authentication - -## petstore_auth - -- **Type**: OAuth -- **Flow**: implicit -- **Authorization URL**: http://petstore.swagger.io/api/oauth/dialog -- **Scopes**: - - **write:pets**: modify pets in your account - - **read:pets**: read your pets - - -## Author - - - diff --git a/samples/client/petstore/swift4/promisekitLibrary/SwaggerClientTests/.gitignore b/samples/client/petstore/swift4/promisekitLibrary/SwaggerClientTests/.gitignore deleted file mode 100644 index 0269c2f56db9..000000000000 --- a/samples/client/petstore/swift4/promisekitLibrary/SwaggerClientTests/.gitignore +++ /dev/null @@ -1,72 +0,0 @@ -### https://raw.github.com/github/gitignore/7792e50daeaa6c07460484704671d1dc9f0045a7/Swift.gitignore - -# Xcode -# -# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore - -## Build generated -build/ -DerivedData/ - -## Various settings -*.pbxuser -!default.pbxuser -*.mode1v3 -!default.mode1v3 -*.mode2v3 -!default.mode2v3 -*.perspectivev3 -!default.perspectivev3 -xcuserdata/ - -## Other -*.moved-aside -*.xccheckout -*.xcscmblueprint - -## Obj-C/Swift specific -*.hmap -*.ipa -*.dSYM.zip -*.dSYM - -## Playgrounds -timeline.xctimeline -playground.xcworkspace - -# Swift Package Manager -# -# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. -# Packages/ -# Package.pins -# Package.resolved -.build/ - -# CocoaPods -# -# We recommend against adding the Pods directory to your .gitignore. However -# you should judge for yourself, the pros and cons are mentioned at: -# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control -# -Pods/ - -# Carthage -# -# Add this line if you want to avoid checking in source code from Carthage dependencies. -Carthage/Checkouts - -Carthage/Build - -# fastlane -# -# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the -# screenshots whenever they are needed. -# For more information about the recommended setup visit: -# https://docs.fastlane.tools/best-practices/source-control/#source-control - -fastlane/report.xml -fastlane/Preview.html -fastlane/screenshots -fastlane/test_output - - diff --git a/samples/client/petstore/swift4/promisekitLibrary/SwaggerClientTests/Podfile b/samples/client/petstore/swift4/promisekitLibrary/SwaggerClientTests/Podfile deleted file mode 100644 index 77432f9eee92..000000000000 --- a/samples/client/petstore/swift4/promisekitLibrary/SwaggerClientTests/Podfile +++ /dev/null @@ -1,13 +0,0 @@ -platform :ios, '9.0' - -source 'https://cdn.cocoapods.org/' - -use_frameworks! - -target 'SwaggerClient' do - pod "PetstoreClient", :path => "../" - - target 'SwaggerClientTests' do - inherit! :search_paths - end -end diff --git a/samples/client/petstore/swift4/promisekitLibrary/SwaggerClientTests/Podfile.lock b/samples/client/petstore/swift4/promisekitLibrary/SwaggerClientTests/Podfile.lock deleted file mode 100644 index a373110b37be..000000000000 --- a/samples/client/petstore/swift4/promisekitLibrary/SwaggerClientTests/Podfile.lock +++ /dev/null @@ -1,27 +0,0 @@ -PODS: - - Alamofire (4.9.0) - - PetstoreClient (1.0.0): - - Alamofire (~> 4.9.0) - - PromiseKit/CorePromise (~> 6.11.0) - - PromiseKit/CorePromise (6.11.0) - -DEPENDENCIES: - - PetstoreClient (from `../`) - -SPEC REPOS: - trunk: - - Alamofire - - PromiseKit - -EXTERNAL SOURCES: - PetstoreClient: - :path: "../" - -SPEC CHECKSUMS: - Alamofire: afc3e7c6db61476cb45cdd23fed06bad03bbc321 - PetstoreClient: 57248512c92ab99e6079feab8d035215a58535c5 - PromiseKit: e4863d06976e7dee5e41c04fc7371c16b3600292 - -PODFILE CHECKSUM: 509bec696cc1d8641751b52e4fe4bef04ac4542c - -COCOAPODS: 1.8.4 diff --git a/samples/client/petstore/swift4/promisekitLibrary/SwaggerClientTests/SwaggerClient.xcodeproj/project.pbxproj b/samples/client/petstore/swift4/promisekitLibrary/SwaggerClientTests/SwaggerClient.xcodeproj/project.pbxproj deleted file mode 100644 index 514ec061c2af..000000000000 --- a/samples/client/petstore/swift4/promisekitLibrary/SwaggerClientTests/SwaggerClient.xcodeproj/project.pbxproj +++ /dev/null @@ -1,524 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 54DA06C1D70D78EC0EC72B61 /* Pods_SwaggerClientTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F65B6638217EDDC99D103B16 /* Pods_SwaggerClientTests.framework */; }; - 6D4EFB951C692C6300B96B06 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D4EFB941C692C6300B96B06 /* AppDelegate.swift */; }; - 6D4EFB971C692C6300B96B06 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D4EFB961C692C6300B96B06 /* ViewController.swift */; }; - 6D4EFB9A1C692C6300B96B06 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 6D4EFB981C692C6300B96B06 /* Main.storyboard */; }; - 6D4EFB9C1C692C6300B96B06 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 6D4EFB9B1C692C6300B96B06 /* Assets.xcassets */; }; - 6D4EFB9F1C692C6300B96B06 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 6D4EFB9D1C692C6300B96B06 /* LaunchScreen.storyboard */; }; - 6D4EFBB51C693BE200B96B06 /* PetAPITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D4EFBB41C693BE200B96B06 /* PetAPITests.swift */; }; - 6D4EFBB71C693BED00B96B06 /* StoreAPITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D4EFBB61C693BED00B96B06 /* StoreAPITests.swift */; }; - 6D4EFBB91C693BFC00B96B06 /* UserAPITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D4EFBB81C693BFC00B96B06 /* UserAPITests.swift */; }; - 751C65B82F596107A3DC8ED9 /* Pods_SwaggerClient.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8F60AECFF321A25553B6A5B0 /* Pods_SwaggerClient.framework */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 6D4EFBA61C692C6300B96B06 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6D4EFB891C692C6300B96B06 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 6D4EFB901C692C6300B96B06; - remoteInfo = SwaggerClient; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXFileReference section */ - 289E8A9E9C0BB66AD190C7C6 /* Pods-SwaggerClientTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwaggerClientTests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests.debug.xcconfig"; sourceTree = ""; }; - 6D4EFB911C692C6300B96B06 /* SwaggerClient.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SwaggerClient.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 6D4EFB941C692C6300B96B06 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; - 6D4EFB961C692C6300B96B06 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; - 6D4EFB991C692C6300B96B06 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; - 6D4EFB9B1C692C6300B96B06 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; - 6D4EFB9E1C692C6300B96B06 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; - 6D4EFBA01C692C6300B96B06 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 6D4EFBA51C692C6300B96B06 /* SwaggerClientTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = SwaggerClientTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - 6D4EFBAB1C692C6300B96B06 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 6D4EFBB41C693BE200B96B06 /* PetAPITests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PetAPITests.swift; sourceTree = ""; }; - 6D4EFBB61C693BED00B96B06 /* StoreAPITests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StoreAPITests.swift; sourceTree = ""; }; - 6D4EFBB81C693BFC00B96B06 /* UserAPITests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UserAPITests.swift; sourceTree = ""; }; - 8F60AECFF321A25553B6A5B0 /* Pods_SwaggerClient.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_SwaggerClient.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - A638467ACFB30852DEA51F7A /* Pods-SwaggerClient.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwaggerClient.debug.xcconfig"; path = "Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient.debug.xcconfig"; sourceTree = ""; }; - B4B2BEC2ECA535C616F2F3FE /* Pods-SwaggerClientTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwaggerClientTests.release.xcconfig"; path = "Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests.release.xcconfig"; sourceTree = ""; }; - C07EC0A94AA0F86D60668B32 /* Pods.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - F65B6638217EDDC99D103B16 /* Pods_SwaggerClientTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_SwaggerClientTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - FC60BDC7328C2AA916F25840 /* Pods-SwaggerClient.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwaggerClient.release.xcconfig"; path = "Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient.release.xcconfig"; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 6D4EFB8E1C692C6300B96B06 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 751C65B82F596107A3DC8ED9 /* Pods_SwaggerClient.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 6D4EFBA21C692C6300B96B06 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 54DA06C1D70D78EC0EC72B61 /* Pods_SwaggerClientTests.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 0CAA98BEFA303B94D3664C7D /* Pods */ = { - isa = PBXGroup; - children = ( - A638467ACFB30852DEA51F7A /* Pods-SwaggerClient.debug.xcconfig */, - FC60BDC7328C2AA916F25840 /* Pods-SwaggerClient.release.xcconfig */, - 289E8A9E9C0BB66AD190C7C6 /* Pods-SwaggerClientTests.debug.xcconfig */, - B4B2BEC2ECA535C616F2F3FE /* Pods-SwaggerClientTests.release.xcconfig */, - ); - name = Pods; - sourceTree = ""; - }; - 3FABC56EC0BA84CBF4F99564 /* Frameworks */ = { - isa = PBXGroup; - children = ( - C07EC0A94AA0F86D60668B32 /* Pods.framework */, - 8F60AECFF321A25553B6A5B0 /* Pods_SwaggerClient.framework */, - F65B6638217EDDC99D103B16 /* Pods_SwaggerClientTests.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; - 6D4EFB881C692C6300B96B06 = { - isa = PBXGroup; - children = ( - 6D4EFB931C692C6300B96B06 /* SwaggerClient */, - 6D4EFBA81C692C6300B96B06 /* SwaggerClientTests */, - 6D4EFB921C692C6300B96B06 /* Products */, - 3FABC56EC0BA84CBF4F99564 /* Frameworks */, - 0CAA98BEFA303B94D3664C7D /* Pods */, - ); - sourceTree = ""; - }; - 6D4EFB921C692C6300B96B06 /* Products */ = { - isa = PBXGroup; - children = ( - 6D4EFB911C692C6300B96B06 /* SwaggerClient.app */, - 6D4EFBA51C692C6300B96B06 /* SwaggerClientTests.xctest */, - ); - name = Products; - sourceTree = ""; - }; - 6D4EFB931C692C6300B96B06 /* SwaggerClient */ = { - isa = PBXGroup; - children = ( - 6D4EFB941C692C6300B96B06 /* AppDelegate.swift */, - 6D4EFB961C692C6300B96B06 /* ViewController.swift */, - 6D4EFB981C692C6300B96B06 /* Main.storyboard */, - 6D4EFB9B1C692C6300B96B06 /* Assets.xcassets */, - 6D4EFB9D1C692C6300B96B06 /* LaunchScreen.storyboard */, - 6D4EFBA01C692C6300B96B06 /* Info.plist */, - ); - path = SwaggerClient; - sourceTree = ""; - }; - 6D4EFBA81C692C6300B96B06 /* SwaggerClientTests */ = { - isa = PBXGroup; - children = ( - 6D4EFBAB1C692C6300B96B06 /* Info.plist */, - 6D4EFBB41C693BE200B96B06 /* PetAPITests.swift */, - 6D4EFBB61C693BED00B96B06 /* StoreAPITests.swift */, - 6D4EFBB81C693BFC00B96B06 /* UserAPITests.swift */, - ); - path = SwaggerClientTests; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 6D4EFB901C692C6300B96B06 /* SwaggerClient */ = { - isa = PBXNativeTarget; - buildConfigurationList = 6D4EFBAE1C692C6300B96B06 /* Build configuration list for PBXNativeTarget "SwaggerClient" */; - buildPhases = ( - 1F03F780DC2D9727E5E64BA9 /* [CP] Check Pods Manifest.lock */, - 6D4EFB8D1C692C6300B96B06 /* Sources */, - 6D4EFB8E1C692C6300B96B06 /* Frameworks */, - 6D4EFB8F1C692C6300B96B06 /* Resources */, - 4485A75250058E2D5BBDF63F /* [CP] Embed Pods Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = SwaggerClient; - productName = SwaggerClient; - productReference = 6D4EFB911C692C6300B96B06 /* SwaggerClient.app */; - productType = "com.apple.product-type.application"; - }; - 6D4EFBA41C692C6300B96B06 /* SwaggerClientTests */ = { - isa = PBXNativeTarget; - buildConfigurationList = 6D4EFBB11C692C6300B96B06 /* Build configuration list for PBXNativeTarget "SwaggerClientTests" */; - buildPhases = ( - 79FE27B09B2DD354C831BD49 /* [CP] Check Pods Manifest.lock */, - 6D4EFBA11C692C6300B96B06 /* Sources */, - 6D4EFBA21C692C6300B96B06 /* Frameworks */, - 6D4EFBA31C692C6300B96B06 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - 6D4EFBA71C692C6300B96B06 /* PBXTargetDependency */, - ); - name = SwaggerClientTests; - productName = SwaggerClientTests; - productReference = 6D4EFBA51C692C6300B96B06 /* SwaggerClientTests.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 6D4EFB891C692C6300B96B06 /* Project object */ = { - isa = PBXProject; - attributes = { - LastSwiftUpdateCheck = 0720; - LastUpgradeCheck = 0800; - ORGANIZATIONNAME = Swagger; - TargetAttributes = { - 6D4EFB901C692C6300B96B06 = { - CreatedOnToolsVersion = 7.2.1; - LastSwiftMigration = 0800; - }; - 6D4EFBA41C692C6300B96B06 = { - CreatedOnToolsVersion = 7.2.1; - LastSwiftMigration = 0800; - TestTargetID = 6D4EFB901C692C6300B96B06; - }; - }; - }; - buildConfigurationList = 6D4EFB8C1C692C6300B96B06 /* Build configuration list for PBXProject "SwaggerClient" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = 6D4EFB881C692C6300B96B06; - productRefGroup = 6D4EFB921C692C6300B96B06 /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 6D4EFB901C692C6300B96B06 /* SwaggerClient */, - 6D4EFBA41C692C6300B96B06 /* SwaggerClientTests */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 6D4EFB8F1C692C6300B96B06 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 6D4EFB9F1C692C6300B96B06 /* LaunchScreen.storyboard in Resources */, - 6D4EFB9C1C692C6300B96B06 /* Assets.xcassets in Resources */, - 6D4EFB9A1C692C6300B96B06 /* Main.storyboard in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 6D4EFBA31C692C6300B96B06 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXShellScriptBuildPhase section */ - 1F03F780DC2D9727E5E64BA9 /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-SwaggerClient-checkManifestLockResult.txt", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; - }; - 4485A75250058E2D5BBDF63F /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-frameworks.sh", - "${BUILT_PRODUCTS_DIR}/Alamofire/Alamofire.framework", - "${BUILT_PRODUCTS_DIR}/PetstoreClient/PetstoreClient.framework", - "${BUILT_PRODUCTS_DIR}/PromiseKit/PromiseKit.framework", - ); - name = "[CP] Embed Pods Frameworks"; - outputPaths = ( - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Alamofire.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/PetstoreClient.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/PromiseKit.framework", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; - 79FE27B09B2DD354C831BD49 /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-SwaggerClientTests-checkManifestLockResult.txt", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 6D4EFB8D1C692C6300B96B06 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 6D4EFB971C692C6300B96B06 /* ViewController.swift in Sources */, - 6D4EFB951C692C6300B96B06 /* AppDelegate.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 6D4EFBA11C692C6300B96B06 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 6D4EFBB71C693BED00B96B06 /* StoreAPITests.swift in Sources */, - 6D4EFBB91C693BFC00B96B06 /* UserAPITests.swift in Sources */, - 6D4EFBB51C693BE200B96B06 /* PetAPITests.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 6D4EFBA71C692C6300B96B06 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 6D4EFB901C692C6300B96B06 /* SwaggerClient */; - targetProxy = 6D4EFBA61C692C6300B96B06 /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin PBXVariantGroup section */ - 6D4EFB981C692C6300B96B06 /* Main.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 6D4EFB991C692C6300B96B06 /* Base */, - ); - name = Main.storyboard; - sourceTree = ""; - }; - 6D4EFB9D1C692C6300B96B06 /* LaunchScreen.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 6D4EFB9E1C692C6300B96B06 /* Base */, - ); - name = LaunchScreen.storyboard; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - -/* Begin XCBuildConfiguration section */ - 6D4EFBAC1C692C6300B96B06 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.2; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = iphoneos; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 4.0; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Debug; - }; - 6D4EFBAD1C692C6300B96B06 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.2; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_VERSION = 4.0; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - 6D4EFBAF1C692C6300B96B06 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = A638467ACFB30852DEA51F7A /* Pods-SwaggerClient.debug.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - INFOPLIST_FILE = SwaggerClient/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = com.swagger.SwaggerClient; - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Debug; - }; - 6D4EFBB01C692C6300B96B06 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = FC60BDC7328C2AA916F25840 /* Pods-SwaggerClient.release.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - INFOPLIST_FILE = SwaggerClient/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = com.swagger.SwaggerClient; - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Release; - }; - 6D4EFBB21C692C6300B96B06 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 289E8A9E9C0BB66AD190C7C6 /* Pods-SwaggerClientTests.debug.xcconfig */; - buildSettings = { - BUNDLE_LOADER = "$(TEST_HOST)"; - INFOPLIST_FILE = SwaggerClientTests/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = com.swagger.SwaggerClientTests; - PRODUCT_NAME = "$(TARGET_NAME)"; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/SwaggerClient.app/SwaggerClient"; - }; - name = Debug; - }; - 6D4EFBB31C692C6300B96B06 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = B4B2BEC2ECA535C616F2F3FE /* Pods-SwaggerClientTests.release.xcconfig */; - buildSettings = { - BUNDLE_LOADER = "$(TEST_HOST)"; - INFOPLIST_FILE = SwaggerClientTests/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = com.swagger.SwaggerClientTests; - PRODUCT_NAME = "$(TARGET_NAME)"; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/SwaggerClient.app/SwaggerClient"; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 6D4EFB8C1C692C6300B96B06 /* Build configuration list for PBXProject "SwaggerClient" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 6D4EFBAC1C692C6300B96B06 /* Debug */, - 6D4EFBAD1C692C6300B96B06 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 6D4EFBAE1C692C6300B96B06 /* Build configuration list for PBXNativeTarget "SwaggerClient" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 6D4EFBAF1C692C6300B96B06 /* Debug */, - 6D4EFBB01C692C6300B96B06 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 6D4EFBB11C692C6300B96B06 /* Build configuration list for PBXNativeTarget "SwaggerClientTests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 6D4EFBB21C692C6300B96B06 /* Debug */, - 6D4EFBB31C692C6300B96B06 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 6D4EFB891C692C6300B96B06 /* Project object */; -} diff --git a/samples/client/petstore/swift4/promisekitLibrary/SwaggerClientTests/SwaggerClient.xcodeproj/xcshareddata/xcschemes/SwaggerClient.xcscheme b/samples/client/petstore/swift4/promisekitLibrary/SwaggerClientTests/SwaggerClient.xcodeproj/xcshareddata/xcschemes/SwaggerClient.xcscheme deleted file mode 100644 index 4d00ed5f92e4..000000000000 --- a/samples/client/petstore/swift4/promisekitLibrary/SwaggerClientTests/SwaggerClient.xcodeproj/xcshareddata/xcschemes/SwaggerClient.xcscheme +++ /dev/null @@ -1,101 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/samples/client/petstore/swift4/promisekitLibrary/SwaggerClientTests/SwaggerClient.xcworkspace/contents.xcworkspacedata b/samples/client/petstore/swift4/promisekitLibrary/SwaggerClientTests/SwaggerClient.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 9b3fa18954f7..000000000000 --- a/samples/client/petstore/swift4/promisekitLibrary/SwaggerClientTests/SwaggerClient.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - diff --git a/samples/client/petstore/swift4/promisekitLibrary/SwaggerClientTests/SwaggerClient.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/samples/client/petstore/swift4/promisekitLibrary/SwaggerClientTests/SwaggerClient.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d981003d68..000000000000 --- a/samples/client/petstore/swift4/promisekitLibrary/SwaggerClientTests/SwaggerClient.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/samples/client/petstore/swift4/promisekitLibrary/SwaggerClientTests/SwaggerClient/AppDelegate.swift b/samples/client/petstore/swift4/promisekitLibrary/SwaggerClientTests/SwaggerClient/AppDelegate.swift deleted file mode 100644 index 821a4aea705c..000000000000 --- a/samples/client/petstore/swift4/promisekitLibrary/SwaggerClientTests/SwaggerClient/AppDelegate.swift +++ /dev/null @@ -1,43 +0,0 @@ -// -// AppDelegate.swift -// SwaggerClient -// -// Created by Joseph Zuromski on 2/8/16. -// Copyright © 2016 Swagger. All rights reserved. -// - -import UIKit - -@UIApplicationMain -class AppDelegate: UIResponder, UIApplicationDelegate { - - var window: UIWindow? - - func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { - // Override point for customization after application launch. - return true - } - - func applicationWillResignActive(_ application: UIApplication) { - // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. - // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. - } - - func applicationDidEnterBackground(_ application: UIApplication) { - // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. - // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. - } - - func applicationWillEnterForeground(_ application: UIApplication) { - // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. - } - - func applicationDidBecomeActive(_ application: UIApplication) { - // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. - } - - func applicationWillTerminate(_ application: UIApplication) { - // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. - } - -} diff --git a/samples/client/petstore/swift4/promisekitLibrary/SwaggerClientTests/SwaggerClient/Assets.xcassets/AppIcon.appiconset/Contents.json b/samples/client/petstore/swift4/promisekitLibrary/SwaggerClientTests/SwaggerClient/Assets.xcassets/AppIcon.appiconset/Contents.json deleted file mode 100644 index 1d060ed28827..000000000000 --- a/samples/client/petstore/swift4/promisekitLibrary/SwaggerClientTests/SwaggerClient/Assets.xcassets/AppIcon.appiconset/Contents.json +++ /dev/null @@ -1,93 +0,0 @@ -{ - "images" : [ - { - "idiom" : "iphone", - "size" : "20x20", - "scale" : "2x" - }, - { - "idiom" : "iphone", - "size" : "20x20", - "scale" : "3x" - }, - { - "idiom" : "iphone", - "size" : "29x29", - "scale" : "2x" - }, - { - "idiom" : "iphone", - "size" : "29x29", - "scale" : "3x" - }, - { - "idiom" : "iphone", - "size" : "40x40", - "scale" : "2x" - }, - { - "idiom" : "iphone", - "size" : "40x40", - "scale" : "3x" - }, - { - "idiom" : "iphone", - "size" : "60x60", - "scale" : "2x" - }, - { - "idiom" : "iphone", - "size" : "60x60", - "scale" : "3x" - }, - { - "idiom" : "ipad", - "size" : "20x20", - "scale" : "1x" - }, - { - "idiom" : "ipad", - "size" : "20x20", - "scale" : "2x" - }, - { - "idiom" : "ipad", - "size" : "29x29", - "scale" : "1x" - }, - { - "idiom" : "ipad", - "size" : "29x29", - "scale" : "2x" - }, - { - "idiom" : "ipad", - "size" : "40x40", - "scale" : "1x" - }, - { - "idiom" : "ipad", - "size" : "40x40", - "scale" : "2x" - }, - { - "idiom" : "ipad", - "size" : "76x76", - "scale" : "1x" - }, - { - "idiom" : "ipad", - "size" : "76x76", - "scale" : "2x" - }, - { - "idiom" : "ipad", - "size" : "83.5x83.5", - "scale" : "2x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/samples/client/petstore/swift4/promisekitLibrary/SwaggerClientTests/SwaggerClient/Base.lproj/LaunchScreen.storyboard b/samples/client/petstore/swift4/promisekitLibrary/SwaggerClientTests/SwaggerClient/Base.lproj/LaunchScreen.storyboard deleted file mode 100644 index 2e721e1833f0..000000000000 --- a/samples/client/petstore/swift4/promisekitLibrary/SwaggerClientTests/SwaggerClient/Base.lproj/LaunchScreen.storyboard +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/samples/client/petstore/swift4/promisekitLibrary/SwaggerClientTests/SwaggerClient/Base.lproj/Main.storyboard b/samples/client/petstore/swift4/promisekitLibrary/SwaggerClientTests/SwaggerClient/Base.lproj/Main.storyboard deleted file mode 100644 index 3a2a49bad8c6..000000000000 --- a/samples/client/petstore/swift4/promisekitLibrary/SwaggerClientTests/SwaggerClient/Base.lproj/Main.storyboard +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/samples/client/petstore/swift4/promisekitLibrary/SwaggerClientTests/SwaggerClient/Info.plist b/samples/client/petstore/swift4/promisekitLibrary/SwaggerClientTests/SwaggerClient/Info.plist deleted file mode 100644 index bb71d00fa8ae..000000000000 --- a/samples/client/petstore/swift4/promisekitLibrary/SwaggerClientTests/SwaggerClient/Info.plist +++ /dev/null @@ -1,59 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - APPL - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1 - LSRequiresIPhoneOS - - UILaunchStoryboardName - LaunchScreen - UIMainStoryboardFile - Main - UIRequiredDeviceCapabilities - - armv7 - - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UISupportedInterfaceOrientations~ipad - - UIInterfaceOrientationPortrait - UIInterfaceOrientationPortraitUpsideDown - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - NSAppTransportSecurity - - NSExceptionDomains - - petstore.swagger.io - - - NSTemporaryExceptionAllowsInsecureHTTPLoads - - - - - - diff --git a/samples/client/petstore/swift4/promisekitLibrary/SwaggerClientTests/SwaggerClient/ViewController.swift b/samples/client/petstore/swift4/promisekitLibrary/SwaggerClientTests/SwaggerClient/ViewController.swift deleted file mode 100644 index 8dad16b10f16..000000000000 --- a/samples/client/petstore/swift4/promisekitLibrary/SwaggerClientTests/SwaggerClient/ViewController.swift +++ /dev/null @@ -1,23 +0,0 @@ -// -// ViewController.swift -// SwaggerClient -// -// Created by Joseph Zuromski on 2/8/16. -// Copyright © 2016 Swagger. All rights reserved. -// - -import UIKit - -class ViewController: UIViewController { - - override func viewDidLoad() { - super.viewDidLoad() - // Do any additional setup after loading the view, typically from a nib. - } - - override func didReceiveMemoryWarning() { - super.didReceiveMemoryWarning() - // Dispose of any resources that can be recreated. - } - -} diff --git a/samples/client/petstore/swift4/promisekitLibrary/SwaggerClientTests/SwaggerClientTests/Info.plist b/samples/client/petstore/swift4/promisekitLibrary/SwaggerClientTests/SwaggerClientTests/Info.plist deleted file mode 100644 index 802f84f540d0..000000000000 --- a/samples/client/petstore/swift4/promisekitLibrary/SwaggerClientTests/SwaggerClientTests/Info.plist +++ /dev/null @@ -1,36 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - BNDL - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1 - NSAppTransportSecurity - - NSExceptionDomains - - petstore.swagger.io - - - NSTemporaryExceptionAllowsInsecureHTTPLoads - - - - - - diff --git a/samples/client/petstore/swift4/promisekitLibrary/SwaggerClientTests/SwaggerClientTests/PetAPITests.swift b/samples/client/petstore/swift4/promisekitLibrary/SwaggerClientTests/SwaggerClientTests/PetAPITests.swift deleted file mode 100644 index 46fa30ba0cae..000000000000 --- a/samples/client/petstore/swift4/promisekitLibrary/SwaggerClientTests/SwaggerClientTests/PetAPITests.swift +++ /dev/null @@ -1,63 +0,0 @@ -// -// PetAPITests.swift -// SwaggerClient -// -// Created by Joseph Zuromski on 2/8/16. -// Copyright © 2016 Swagger. All rights reserved. -// - -import PetstoreClient -import PromiseKit -import XCTest -@testable import SwaggerClient - -class PetAPITests: XCTestCase { - - let testTimeout = 10.0 - - override func setUp() { - super.setUp() - // Put setup code here. This method is called before the invocation of each test method in the class. - } - - override func tearDown() { - // Put teardown code here. This method is called after the invocation of each test method in the class. - super.tearDown() - } - - func test1CreatePet() { - let expectation = self.expectation(description: "testCreatePet") - let category = PetstoreClient.Category(id: 1234, name: "eyeColor") - let tags = [Tag(id: 1234, name: "New York"), Tag(id: 124321, name: "Jose")] - let newPet = Pet(id: 1000, category: category, name: "Fluffy", photoUrls: ["https://petstore.com/sample/photo1.jpg", "https://petstore.com/sample/photo2.jpg"], tags: tags, status: .available) - - PetAPI.addPet(body: newPet).done { - expectation.fulfill() - }.catch { _ in - XCTFail("error creating pet") - } - self.waitForExpectations(timeout: testTimeout, handler: nil) - } - - func test2GetPet() { - let expectation = self.expectation(description: "testGetPet") - PetAPI.getPetById(petId: 1000).done { pet in - XCTAssert(pet.id == 1000, "invalid id") - XCTAssert(pet.name == "Fluffy", "invalid name") - expectation.fulfill() - }.catch { _ in - XCTFail("error creating pet") - } - self.waitForExpectations(timeout: testTimeout, handler: nil) - } - - func test3DeletePet() { - let expectation = self.expectation(description: "testDeletePet") - PetAPI.deletePet(petId: 1000).done { - expectation.fulfill() - }.catch { (_) in - XCTFail("error deleting pet") - } - self.waitForExpectations(timeout: testTimeout, handler: nil) - } -} diff --git a/samples/client/petstore/swift4/promisekitLibrary/SwaggerClientTests/SwaggerClientTests/StoreAPITests.swift b/samples/client/petstore/swift4/promisekitLibrary/SwaggerClientTests/SwaggerClientTests/StoreAPITests.swift deleted file mode 100644 index d43f88565742..000000000000 --- a/samples/client/petstore/swift4/promisekitLibrary/SwaggerClientTests/SwaggerClientTests/StoreAPITests.swift +++ /dev/null @@ -1,80 +0,0 @@ -// -// StoreAPITests.swift -// SwaggerClient -// -// Created by Joseph Zuromski on 2/8/16. -// Copyright © 2016 Swagger. All rights reserved. -// - -import PetstoreClient -import PromiseKit -import XCTest -@testable import SwaggerClient - -class StoreAPITests: XCTestCase { - - let isoDateFormat = "yyyy-MM-dd'T'HH:mm:ssZ" - - let testTimeout = 10.0 -/* - func test1PlaceOrder() { - // use explicit naming to reference the enum so that we test we don't regress on enum naming - let shipDate = Date() - let order = Order(id: 1000, petId: 1000, quantity: 10, shipDate: shipDate, status: .placed, complete: true) - let expectation = self.expectation(description: "testPlaceOrder") - StoreAPI.placeOrder(body: order).done { order in - XCTAssert(order.id == 1000, "invalid id") - XCTAssert(order.quantity == 10, "invalid quantity") - XCTAssert(order.status == .placed, "invalid status") - XCTAssert(order.shipDate!.isEqual(shipDate, format: self.isoDateFormat), - "Date should be idempotent") - - expectation.fulfill() - }.catch { _ in - XCTFail("error placing order") - } - self.waitForExpectations(timeout: testTimeout, handler: nil) - } - - func test2GetOrder() { - let expectation = self.expectation(description: "testGetOrder") - StoreAPI.getOrderById(orderId: 1000).done { order in - XCTAssert(order.id == 1000, "invalid id") - XCTAssert(order.quantity == 10, "invalid quantity") - XCTAssert(order.status == .placed, "invalid status") - expectation.fulfill() - }.catch { _ in - XCTFail("error placing order") - } - self.waitForExpectations(timeout: testTimeout, handler: nil) - } - - func test3DeleteOrder() { - let expectation = self.expectation(description: "testDeleteOrder") - StoreAPI.deleteOrder(orderId: "1000").done { - expectation.fulfill() - }.catch { (_) in - XCTFail("error deleting order") - } - self.waitForExpectations(timeout: testTimeout, handler: nil) - } -*/ -} - -private extension Date { - - /** - Returns true if the dates are equal given the format string. - - - parameter date: The date to compare to. - - parameter format: The format string to use to compare. - - - returns: true if the dates are equal, given the format string. - */ - func isEqual(_ date: Date, format: String) -> Bool { - let fmt = DateFormatter() - fmt.dateFormat = format - return fmt.string(from: self).isEqual(fmt.string(from: date)) - } - -} diff --git a/samples/client/petstore/swift4/promisekitLibrary/SwaggerClientTests/SwaggerClientTests/UserAPITests.swift b/samples/client/petstore/swift4/promisekitLibrary/SwaggerClientTests/SwaggerClientTests/UserAPITests.swift deleted file mode 100644 index d369895def70..000000000000 --- a/samples/client/petstore/swift4/promisekitLibrary/SwaggerClientTests/SwaggerClientTests/UserAPITests.swift +++ /dev/null @@ -1,37 +0,0 @@ -// -// UserAPITests.swift -// SwaggerClient -// -// Created by Joseph Zuromski on 2/8/16. -// Copyright © 2016 Swagger. All rights reserved. -// - -import PetstoreClient -import PromiseKit -import XCTest -@testable import SwaggerClient - -class UserAPITests: XCTestCase { - - let testTimeout = 10.0 - - func testLogin() { - let expectation = self.expectation(description: "testLogin") - UserAPI.loginUser(username: "swiftTester", password: "swift").done { _ in - expectation.fulfill() - }.catch { _ in - XCTFail("login error") - } - self.waitForExpectations(timeout: testTimeout, handler: nil) - } - - func testLogout() { - let expectation = self.expectation(description: "testLogout") - UserAPI.logoutUser().done { - expectation.fulfill() - }.catch { _ in - XCTFail("") - } - self.waitForExpectations(timeout: testTimeout, handler: nil) - } -} diff --git a/samples/client/petstore/swift4/promisekitLibrary/SwaggerClientTests/pom.xml b/samples/client/petstore/swift4/promisekitLibrary/SwaggerClientTests/pom.xml deleted file mode 100644 index 3756c726a129..000000000000 --- a/samples/client/petstore/swift4/promisekitLibrary/SwaggerClientTests/pom.xml +++ /dev/null @@ -1,43 +0,0 @@ - - 4.0.0 - io.swagger - Swift4PromiseKitPetstoreClientTests - pom - 1.0-SNAPSHOT - Swift4 PromiseKit Swagger Petstore Client - - - - maven-dependency-plugin - - - package - - copy-dependencies - - - ${project.build.directory} - - - - - - org.codehaus.mojo - exec-maven-plugin - 1.2.1 - - - xcodebuild-test - integration-test - - exec - - - ./run_xcodebuild.sh - - - - - - - diff --git a/samples/client/petstore/swift4/promisekitLibrary/SwaggerClientTests/run_xcodebuild.sh b/samples/client/petstore/swift4/promisekitLibrary/SwaggerClientTests/run_xcodebuild.sh deleted file mode 100755 index 79520c7fc38c..000000000000 --- a/samples/client/petstore/swift4/promisekitLibrary/SwaggerClientTests/run_xcodebuild.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh - -pod install - -xcodebuild -workspace "SwaggerClient.xcworkspace" -scheme "SwaggerClient" test -destination "platform=iOS Simulator,name=iPhone 8,OS=latest" | xcpretty && exit ${PIPESTATUS[0]} diff --git a/samples/client/petstore/swift4/promisekitLibrary/docs/AdditionalPropertiesClass.md b/samples/client/petstore/swift4/promisekitLibrary/docs/AdditionalPropertiesClass.md deleted file mode 100644 index e22d28be1de6..000000000000 --- a/samples/client/petstore/swift4/promisekitLibrary/docs/AdditionalPropertiesClass.md +++ /dev/null @@ -1,11 +0,0 @@ -# AdditionalPropertiesClass - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**mapString** | **[String:String]** | | [optional] -**mapMapString** | [String:[String: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/swift4/promisekitLibrary/docs/Animal.md b/samples/client/petstore/swift4/promisekitLibrary/docs/Animal.md deleted file mode 100644 index 69c601455cd8..000000000000 --- a/samples/client/petstore/swift4/promisekitLibrary/docs/Animal.md +++ /dev/null @@ -1,11 +0,0 @@ -# Animal - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**className** | **String** | | -**color** | **String** | | [optional] [default to "red"] - -[[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/swift4/promisekitLibrary/docs/AnimalFarm.md b/samples/client/petstore/swift4/promisekitLibrary/docs/AnimalFarm.md deleted file mode 100644 index df6bab21dae8..000000000000 --- a/samples/client/petstore/swift4/promisekitLibrary/docs/AnimalFarm.md +++ /dev/null @@ -1,9 +0,0 @@ -# AnimalFarm - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/samples/client/petstore/swift4/promisekitLibrary/docs/AnotherFakeAPI.md b/samples/client/petstore/swift4/promisekitLibrary/docs/AnotherFakeAPI.md deleted file mode 100644 index 7ac52a2b1272..000000000000 --- a/samples/client/petstore/swift4/promisekitLibrary/docs/AnotherFakeAPI.md +++ /dev/null @@ -1,56 +0,0 @@ -# AnotherFakeAPI - -All URIs are relative to *http://petstore.swagger.io:80/v2* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**call123testSpecialTags**](AnotherFakeAPI.md#call123testspecialtags) | **PATCH** /another-fake/dummy | To test special tags - - -# **call123testSpecialTags** -```swift - open class func call123testSpecialTags( body: Client) -> Promise -``` - -To test special tags - -To test special tags and operation ID starting with number - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let body = Client(client: "client_example") // Client | client model - -// To test special tags -AnotherFakeAPI.call123testSpecialTags(body: body).then { - // when the promise is fulfilled - }.always { - // regardless of whether the promise is fulfilled, or rejected - }.catch { errorType in - // when the promise is rejected -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Client**](Client.md) | client model | - -### Return type - -[**Client**](Client.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **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/swift4/promisekitLibrary/docs/ApiResponse.md b/samples/client/petstore/swift4/promisekitLibrary/docs/ApiResponse.md deleted file mode 100644 index c6d9768fe9bf..000000000000 --- a/samples/client/petstore/swift4/promisekitLibrary/docs/ApiResponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# ApiResponse - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**code** | **Int** | | [optional] -**type** | **String** | | [optional] -**message** | **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/swift4/promisekitLibrary/docs/ArrayOfArrayOfNumberOnly.md b/samples/client/petstore/swift4/promisekitLibrary/docs/ArrayOfArrayOfNumberOnly.md deleted file mode 100644 index c6fceff5e08d..000000000000 --- a/samples/client/petstore/swift4/promisekitLibrary/docs/ArrayOfArrayOfNumberOnly.md +++ /dev/null @@ -1,10 +0,0 @@ -# ArrayOfArrayOfNumberOnly - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**arrayArrayNumber** | [[Double]] | | [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/swift4/promisekitLibrary/docs/ArrayOfNumberOnly.md b/samples/client/petstore/swift4/promisekitLibrary/docs/ArrayOfNumberOnly.md deleted file mode 100644 index f09f8fa6f70f..000000000000 --- a/samples/client/petstore/swift4/promisekitLibrary/docs/ArrayOfNumberOnly.md +++ /dev/null @@ -1,10 +0,0 @@ -# ArrayOfNumberOnly - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**arrayNumber** | **[Double]** | | [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/swift4/promisekitLibrary/docs/ArrayTest.md b/samples/client/petstore/swift4/promisekitLibrary/docs/ArrayTest.md deleted file mode 100644 index bf416b8330cc..000000000000 --- a/samples/client/petstore/swift4/promisekitLibrary/docs/ArrayTest.md +++ /dev/null @@ -1,12 +0,0 @@ -# ArrayTest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**arrayOfString** | **[String]** | | [optional] -**arrayArrayOfInteger** | [[Int64]] | | [optional] -**arrayArrayOfModel** | [[ReadOnlyFirst]] | | [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/swift4/promisekitLibrary/docs/Capitalization.md b/samples/client/petstore/swift4/promisekitLibrary/docs/Capitalization.md deleted file mode 100644 index 95374216c773..000000000000 --- a/samples/client/petstore/swift4/promisekitLibrary/docs/Capitalization.md +++ /dev/null @@ -1,15 +0,0 @@ -# Capitalization - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**smallCamel** | **String** | | [optional] -**capitalCamel** | **String** | | [optional] -**smallSnake** | **String** | | [optional] -**capitalSnake** | **String** | | [optional] -**sCAETHFlowPoints** | **String** | | [optional] -**ATT_NAME** | **String** | Name of the pet | [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/swift4/promisekitLibrary/docs/Cat.md b/samples/client/petstore/swift4/promisekitLibrary/docs/Cat.md deleted file mode 100644 index fb5949b15761..000000000000 --- a/samples/client/petstore/swift4/promisekitLibrary/docs/Cat.md +++ /dev/null @@ -1,10 +0,0 @@ -# Cat - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**declawed** | **Bool** | | [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/swift4/promisekitLibrary/docs/CatAllOf.md b/samples/client/petstore/swift4/promisekitLibrary/docs/CatAllOf.md deleted file mode 100644 index 79789be61c01..000000000000 --- a/samples/client/petstore/swift4/promisekitLibrary/docs/CatAllOf.md +++ /dev/null @@ -1,10 +0,0 @@ -# CatAllOf - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**declawed** | **Bool** | | [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/swift4/promisekitLibrary/docs/Category.md b/samples/client/petstore/swift4/promisekitLibrary/docs/Category.md deleted file mode 100644 index 5ca5408c0f96..000000000000 --- a/samples/client/petstore/swift4/promisekitLibrary/docs/Category.md +++ /dev/null @@ -1,11 +0,0 @@ -# Category - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Int64** | | [optional] -**name** | **String** | | [default to "default-name"] - -[[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/swift4/promisekitLibrary/docs/ClassModel.md b/samples/client/petstore/swift4/promisekitLibrary/docs/ClassModel.md deleted file mode 100644 index e3912fdf0fd5..000000000000 --- a/samples/client/petstore/swift4/promisekitLibrary/docs/ClassModel.md +++ /dev/null @@ -1,10 +0,0 @@ -# ClassModel - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**_class** | **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/swift4/promisekitLibrary/docs/Client.md b/samples/client/petstore/swift4/promisekitLibrary/docs/Client.md deleted file mode 100644 index 0de1b238c36f..000000000000 --- a/samples/client/petstore/swift4/promisekitLibrary/docs/Client.md +++ /dev/null @@ -1,10 +0,0 @@ -# Client - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**client** | **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/swift4/promisekitLibrary/docs/Dog.md b/samples/client/petstore/swift4/promisekitLibrary/docs/Dog.md deleted file mode 100644 index 4824786da049..000000000000 --- a/samples/client/petstore/swift4/promisekitLibrary/docs/Dog.md +++ /dev/null @@ -1,10 +0,0 @@ -# Dog - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**breed** | **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/swift4/promisekitLibrary/docs/DogAllOf.md b/samples/client/petstore/swift4/promisekitLibrary/docs/DogAllOf.md deleted file mode 100644 index 9302ef52e938..000000000000 --- a/samples/client/petstore/swift4/promisekitLibrary/docs/DogAllOf.md +++ /dev/null @@ -1,10 +0,0 @@ -# DogAllOf - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**breed** | **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/swift4/promisekitLibrary/docs/EnumArrays.md b/samples/client/petstore/swift4/promisekitLibrary/docs/EnumArrays.md deleted file mode 100644 index b9a9807d3c8e..000000000000 --- a/samples/client/petstore/swift4/promisekitLibrary/docs/EnumArrays.md +++ /dev/null @@ -1,11 +0,0 @@ -# EnumArrays - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**justSymbol** | **String** | | [optional] -**arrayEnum** | **[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/swift4/promisekitLibrary/docs/EnumClass.md b/samples/client/petstore/swift4/promisekitLibrary/docs/EnumClass.md deleted file mode 100644 index 67f017becd0c..000000000000 --- a/samples/client/petstore/swift4/promisekitLibrary/docs/EnumClass.md +++ /dev/null @@ -1,9 +0,0 @@ -# EnumClass - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/samples/client/petstore/swift4/promisekitLibrary/docs/EnumTest.md b/samples/client/petstore/swift4/promisekitLibrary/docs/EnumTest.md deleted file mode 100644 index bc9b036dd769..000000000000 --- a/samples/client/petstore/swift4/promisekitLibrary/docs/EnumTest.md +++ /dev/null @@ -1,14 +0,0 @@ -# EnumTest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**enumString** | **String** | | [optional] -**enumStringRequired** | **String** | | -**enumInteger** | **Int** | | [optional] -**enumNumber** | **Double** | | [optional] -**outerEnum** | [**OuterEnum**](OuterEnum.md) | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/samples/client/petstore/swift4/promisekitLibrary/docs/FakeAPI.md b/samples/client/petstore/swift4/promisekitLibrary/docs/FakeAPI.md deleted file mode 100644 index 5519037c52cb..000000000000 --- a/samples/client/petstore/swift4/promisekitLibrary/docs/FakeAPI.md +++ /dev/null @@ -1,626 +0,0 @@ -# FakeAPI - -All URIs are relative to *http://petstore.swagger.io:80/v2* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**fakeOuterBooleanSerialize**](FakeAPI.md#fakeouterbooleanserialize) | **POST** /fake/outer/boolean | -[**fakeOuterCompositeSerialize**](FakeAPI.md#fakeoutercompositeserialize) | **POST** /fake/outer/composite | -[**fakeOuterNumberSerialize**](FakeAPI.md#fakeouternumberserialize) | **POST** /fake/outer/number | -[**fakeOuterStringSerialize**](FakeAPI.md#fakeouterstringserialize) | **POST** /fake/outer/string | -[**testBodyWithFileSchema**](FakeAPI.md#testbodywithfileschema) | **PUT** /fake/body-with-file-schema | -[**testBodyWithQueryParams**](FakeAPI.md#testbodywithqueryparams) | **PUT** /fake/body-with-query-params | -[**testClientModel**](FakeAPI.md#testclientmodel) | **PATCH** /fake | To test \"client\" model -[**testEndpointParameters**](FakeAPI.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 -[**testEnumParameters**](FakeAPI.md#testenumparameters) | **GET** /fake | To test enum parameters -[**testGroupParameters**](FakeAPI.md#testgroupparameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) -[**testInlineAdditionalProperties**](FakeAPI.md#testinlineadditionalproperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties -[**testJsonFormData**](FakeAPI.md#testjsonformdata) | **GET** /fake/jsonFormData | test json serialization of form data - - -# **fakeOuterBooleanSerialize** -```swift - open class func fakeOuterBooleanSerialize( body: Bool? = nil) -> Promise -``` - - - -Test serialization of outer boolean types - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let body = true // Bool | Input boolean as post body (optional) - -FakeAPI.fakeOuterBooleanSerialize(body: body).then { - // when the promise is fulfilled - }.always { - // regardless of whether the promise is fulfilled, or rejected - }.catch { errorType in - // when the promise is rejected -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | **Bool** | Input boolean as post body | [optional] - -### Return type - -**Bool** - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: */* - -[[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) - -# **fakeOuterCompositeSerialize** -```swift - open class func fakeOuterCompositeSerialize( body: OuterComposite? = nil) -> Promise -``` - - - -Test serialization of object with outer number type - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let body = OuterComposite(myNumber: 123, myString: "myString_example", myBoolean: false) // OuterComposite | Input composite as post body (optional) - -FakeAPI.fakeOuterCompositeSerialize(body: body).then { - // when the promise is fulfilled - }.always { - // regardless of whether the promise is fulfilled, or rejected - }.catch { errorType in - // when the promise is rejected -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**OuterComposite**](OuterComposite.md) | Input composite as post body | [optional] - -### Return type - -[**OuterComposite**](OuterComposite.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: */* - -[[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) - -# **fakeOuterNumberSerialize** -```swift - open class func fakeOuterNumberSerialize( body: Double? = nil) -> Promise -``` - - - -Test serialization of outer number types - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let body = 987 // Double | Input number as post body (optional) - -FakeAPI.fakeOuterNumberSerialize(body: body).then { - // when the promise is fulfilled - }.always { - // regardless of whether the promise is fulfilled, or rejected - }.catch { errorType in - // when the promise is rejected -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | **Double** | Input number as post body | [optional] - -### Return type - -**Double** - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: */* - -[[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) - -# **fakeOuterStringSerialize** -```swift - open class func fakeOuterStringSerialize( body: String? = nil) -> Promise -``` - - - -Test serialization of outer string types - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let body = "body_example" // String | Input string as post body (optional) - -FakeAPI.fakeOuterStringSerialize(body: body).then { - // when the promise is fulfilled - }.always { - // regardless of whether the promise is fulfilled, or rejected - }.catch { errorType in - // when the promise is rejected -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | **String** | Input string as post body | [optional] - -### Return type - -**String** - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: */* - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **testBodyWithFileSchema** -```swift - open class func testBodyWithFileSchema( body: FileSchemaTestClass) -> Promise -``` - - - -For this test, the body for this request much reference a schema named `File`. - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let body = FileSchemaTestClass(file: File(sourceURI: "sourceURI_example"), files: [File(sourceURI: "sourceURI_example")]) // FileSchemaTestClass | - -FakeAPI.testBodyWithFileSchema(body: body).then { - // when the promise is fulfilled - }.always { - // regardless of whether the promise is fulfilled, or rejected - }.catch { errorType in - // when the promise is rejected -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**FileSchemaTestClass**](FileSchemaTestClass.md) | | - -### Return type - -Void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **testBodyWithQueryParams** -```swift - open class func testBodyWithQueryParams( query: String, body: User) -> Promise -``` - - - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let query = "query_example" // String | -let body = User(id: 123, username: "username_example", firstName: "firstName_example", lastName: "lastName_example", email: "email_example", password: "password_example", phone: "phone_example", userStatus: 123) // User | - -FakeAPI.testBodyWithQueryParams(query: query, body: body).then { - // when the promise is fulfilled - }.always { - // regardless of whether the promise is fulfilled, or rejected - }.catch { errorType in - // when the promise is rejected -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **query** | **String** | | - **body** | [**User**](User.md) | | - -### Return type - -Void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **testClientModel** -```swift - open class func testClientModel( body: Client) -> Promise -``` - -To test \"client\" model - -To test \"client\" model - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let body = Client(client: "client_example") // Client | client model - -// To test \"client\" model -FakeAPI.testClientModel(body: body).then { - // when the promise is fulfilled - }.always { - // regardless of whether the promise is fulfilled, or rejected - }.catch { errorType in - // when the promise is rejected -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Client**](Client.md) | client model | - -### Return type - -[**Client**](Client.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **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) - -# **testEndpointParameters** -```swift - open class func testEndpointParameters( number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil) -> Promise -``` - -Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - -Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let number = 987 // Double | None -let double = 987 // Double | None -let patternWithoutDelimiter = "patternWithoutDelimiter_example" // String | None -let byte = 987 // Data | None -let integer = 987 // Int | None (optional) -let int32 = 987 // Int | None (optional) -let int64 = 987 // Int64 | None (optional) -let float = 987 // Float | None (optional) -let string = "string_example" // String | None (optional) -let binary = URL(string: "https://example.com")! // URL | None (optional) -let date = Date() // Date | None (optional) -let dateTime = Date() // Date | None (optional) -let password = "password_example" // String | None (optional) -let callback = "callback_example" // String | None (optional) - -// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 -FakeAPI.testEndpointParameters(number: number, double: double, patternWithoutDelimiter: patternWithoutDelimiter, byte: byte, integer: integer, int32: int32, int64: int64, float: float, string: string, binary: binary, date: date, dateTime: dateTime, password: password, callback: callback).then { - // when the promise is fulfilled - }.always { - // regardless of whether the promise is fulfilled, or rejected - }.catch { errorType in - // when the promise is rejected -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **number** | **Double** | None | - **double** | **Double** | None | - **patternWithoutDelimiter** | **String** | None | - **byte** | **Data** | None | - **integer** | **Int** | None | [optional] - **int32** | **Int** | None | [optional] - **int64** | **Int64** | None | [optional] - **float** | **Float** | None | [optional] - **string** | **String** | None | [optional] - **binary** | **URL** | None | [optional] - **date** | **Date** | None | [optional] - **dateTime** | **Date** | None | [optional] - **password** | **String** | None | [optional] - **callback** | **String** | None | [optional] - -### Return type - -Void (empty response body) - -### Authorization - -[http_basic_test](../README.md#http_basic_test) - -### 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) - -# **testEnumParameters** -```swift - open class func testEnumParameters( enumHeaderStringArray: [String]? = nil, enumHeaderString: EnumHeaderString_testEnumParameters? = nil, enumQueryStringArray: [String]? = nil, enumQueryString: EnumQueryString_testEnumParameters? = nil, enumQueryInteger: EnumQueryInteger_testEnumParameters? = nil, enumQueryDouble: EnumQueryDouble_testEnumParameters? = nil, enumFormStringArray: [String]? = nil, enumFormString: EnumFormString_testEnumParameters? = nil) -> Promise -``` - -To test enum parameters - -To test enum parameters - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let enumHeaderStringArray = ["enumHeaderStringArray_example"] // [String] | Header parameter enum test (string array) (optional) -let enumHeaderString = "enumHeaderString_example" // String | Header parameter enum test (string) (optional) (default to .efg) -let enumQueryStringArray = ["enumQueryStringArray_example"] // [String] | Query parameter enum test (string array) (optional) -let enumQueryString = "enumQueryString_example" // String | Query parameter enum test (string) (optional) (default to .efg) -let enumQueryInteger = 987 // Int | Query parameter enum test (double) (optional) -let enumQueryDouble = 987 // Double | Query parameter enum test (double) (optional) -let enumFormStringArray = ["inner_example"] // [String] | Form parameter enum test (string array) (optional) (default to .dollar) -let enumFormString = "enumFormString_example" // String | Form parameter enum test (string) (optional) (default to .efg) - -// To test enum parameters -FakeAPI.testEnumParameters(enumHeaderStringArray: enumHeaderStringArray, enumHeaderString: enumHeaderString, enumQueryStringArray: enumQueryStringArray, enumQueryString: enumQueryString, enumQueryInteger: enumQueryInteger, enumQueryDouble: enumQueryDouble, enumFormStringArray: enumFormStringArray, enumFormString: enumFormString).then { - // when the promise is fulfilled - }.always { - // regardless of whether the promise is fulfilled, or rejected - }.catch { errorType in - // when the promise is rejected -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **enumHeaderStringArray** | [**[String]**](String.md) | Header parameter enum test (string array) | [optional] - **enumHeaderString** | **String** | Header parameter enum test (string) | [optional] [default to .efg] - **enumQueryStringArray** | [**[String]**](String.md) | Query parameter enum test (string array) | [optional] - **enumQueryString** | **String** | Query parameter enum test (string) | [optional] [default to .efg] - **enumQueryInteger** | **Int** | Query parameter enum test (double) | [optional] - **enumQueryDouble** | **Double** | Query parameter enum test (double) | [optional] - **enumFormStringArray** | [**[String]**](String.md) | Form parameter enum test (string array) | [optional] [default to .dollar] - **enumFormString** | **String** | Form parameter enum test (string) | [optional] [default to .efg] - -### Return type - -Void (empty response body) - -### Authorization - -No authorization required - -### 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) - -# **testGroupParameters** -```swift - open class func testGroupParameters( requiredStringGroup: Int, requiredBooleanGroup: Bool, requiredInt64Group: Int64, stringGroup: Int? = nil, booleanGroup: Bool? = nil, int64Group: Int64? = nil) -> Promise -``` - -Fake endpoint to test group parameters (optional) - -Fake endpoint to test group parameters (optional) - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let requiredStringGroup = 987 // Int | Required String in group parameters -let requiredBooleanGroup = true // Bool | Required Boolean in group parameters -let requiredInt64Group = 987 // Int64 | Required Integer in group parameters -let stringGroup = 987 // Int | String in group parameters (optional) -let booleanGroup = true // Bool | Boolean in group parameters (optional) -let int64Group = 987 // Int64 | Integer in group parameters (optional) - -// Fake endpoint to test group parameters (optional) -FakeAPI.testGroupParameters(requiredStringGroup: requiredStringGroup, requiredBooleanGroup: requiredBooleanGroup, requiredInt64Group: requiredInt64Group, stringGroup: stringGroup, booleanGroup: booleanGroup, int64Group: int64Group).then { - // when the promise is fulfilled - }.always { - // regardless of whether the promise is fulfilled, or rejected - }.catch { errorType in - // when the promise is rejected -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **requiredStringGroup** | **Int** | Required String in group parameters | - **requiredBooleanGroup** | **Bool** | Required Boolean in group parameters | - **requiredInt64Group** | **Int64** | Required Integer in group parameters | - **stringGroup** | **Int** | String in group parameters | [optional] - **booleanGroup** | **Bool** | Boolean in group parameters | [optional] - **int64Group** | **Int64** | Integer in group parameters | [optional] - -### Return type - -Void (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) - -# **testInlineAdditionalProperties** -```swift - open class func testInlineAdditionalProperties( param: [String:String]) -> Promise -``` - -test inline additionalProperties - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let param = "TODO" // [String:String] | request body - -// test inline additionalProperties -FakeAPI.testInlineAdditionalProperties(param: param).then { - // when the promise is fulfilled - }.always { - // regardless of whether the promise is fulfilled, or rejected - }.catch { errorType in - // when the promise is rejected -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **param** | [**[String:String]**](String.md) | request body | - -### Return type - -Void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **testJsonFormData** -```swift - open class func testJsonFormData( param: String, param2: String) -> Promise -``` - -test json serialization of form data - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let param = "param_example" // String | field1 -let param2 = "param2_example" // String | field2 - -// test json serialization of form data -FakeAPI.testJsonFormData(param: param, param2: param2).then { - // when the promise is fulfilled - }.always { - // regardless of whether the promise is fulfilled, or rejected - }.catch { errorType in - // when the promise is rejected -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **param** | **String** | field1 | - **param2** | **String** | field2 | - -### Return type - -Void (empty response body) - -### Authorization - -No authorization required - -### 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) - diff --git a/samples/client/petstore/swift4/promisekitLibrary/docs/FakeClassnameTags123API.md b/samples/client/petstore/swift4/promisekitLibrary/docs/FakeClassnameTags123API.md deleted file mode 100644 index 1b1b9c141024..000000000000 --- a/samples/client/petstore/swift4/promisekitLibrary/docs/FakeClassnameTags123API.md +++ /dev/null @@ -1,56 +0,0 @@ -# FakeClassnameTags123API - -All URIs are relative to *http://petstore.swagger.io:80/v2* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**testClassname**](FakeClassnameTags123API.md#testclassname) | **PATCH** /fake_classname_test | To test class name in snake case - - -# **testClassname** -```swift - open class func testClassname( body: Client) -> Promise -``` - -To test class name in snake case - -To test class name in snake case - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let body = Client(client: "client_example") // Client | client model - -// To test class name in snake case -FakeClassnameTags123API.testClassname(body: body).then { - // when the promise is fulfilled - }.always { - // regardless of whether the promise is fulfilled, or rejected - }.catch { errorType in - // when the promise is rejected -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Client**](Client.md) | client model | - -### Return type - -[**Client**](Client.md) - -### Authorization - -[api_key_query](../README.md#api_key_query) - -### HTTP request headers - - - **Content-Type**: application/json - - **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/swift4/promisekitLibrary/docs/File.md b/samples/client/petstore/swift4/promisekitLibrary/docs/File.md deleted file mode 100644 index 3edfef17b794..000000000000 --- a/samples/client/petstore/swift4/promisekitLibrary/docs/File.md +++ /dev/null @@ -1,10 +0,0 @@ -# File - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**sourceURI** | **String** | Test capitalization | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/samples/client/petstore/swift4/promisekitLibrary/docs/FileSchemaTestClass.md b/samples/client/petstore/swift4/promisekitLibrary/docs/FileSchemaTestClass.md deleted file mode 100644 index afdacc60b2c3..000000000000 --- a/samples/client/petstore/swift4/promisekitLibrary/docs/FileSchemaTestClass.md +++ /dev/null @@ -1,11 +0,0 @@ -# FileSchemaTestClass - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**file** | [**File**](File.md) | | [optional] -**files** | [File] | | [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/swift4/promisekitLibrary/docs/FormatTest.md b/samples/client/petstore/swift4/promisekitLibrary/docs/FormatTest.md deleted file mode 100644 index f74d94f6c46a..000000000000 --- a/samples/client/petstore/swift4/promisekitLibrary/docs/FormatTest.md +++ /dev/null @@ -1,22 +0,0 @@ -# FormatTest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**integer** | **Int** | | [optional] -**int32** | **Int** | | [optional] -**int64** | **Int64** | | [optional] -**number** | **Double** | | -**float** | **Float** | | [optional] -**double** | **Double** | | [optional] -**string** | **String** | | [optional] -**byte** | **Data** | | -**binary** | **URL** | | [optional] -**date** | **Date** | | -**dateTime** | **Date** | | [optional] -**uuid** | **UUID** | | [optional] -**password** | **String** | | - -[[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/swift4/promisekitLibrary/docs/HasOnlyReadOnly.md b/samples/client/petstore/swift4/promisekitLibrary/docs/HasOnlyReadOnly.md deleted file mode 100644 index 57b6e3a17e67..000000000000 --- a/samples/client/petstore/swift4/promisekitLibrary/docs/HasOnlyReadOnly.md +++ /dev/null @@ -1,11 +0,0 @@ -# HasOnlyReadOnly - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**bar** | **String** | | [optional] [readonly] -**foo** | **String** | | [optional] [readonly] - -[[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/swift4/promisekitLibrary/docs/List.md b/samples/client/petstore/swift4/promisekitLibrary/docs/List.md deleted file mode 100644 index b77718302edf..000000000000 --- a/samples/client/petstore/swift4/promisekitLibrary/docs/List.md +++ /dev/null @@ -1,10 +0,0 @@ -# List - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**_123list** | **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/swift4/promisekitLibrary/docs/MapTest.md b/samples/client/petstore/swift4/promisekitLibrary/docs/MapTest.md deleted file mode 100644 index 56213c4113f6..000000000000 --- a/samples/client/petstore/swift4/promisekitLibrary/docs/MapTest.md +++ /dev/null @@ -1,13 +0,0 @@ -# MapTest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**mapMapOfString** | [String:[String:String]] | | [optional] -**mapOfEnumString** | **[String:String]** | | [optional] -**directMap** | **[String:Bool]** | | [optional] -**indirectMap** | [**StringBooleanMap**](StringBooleanMap.md) | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/samples/client/petstore/swift4/promisekitLibrary/docs/MixedPropertiesAndAdditionalPropertiesClass.md b/samples/client/petstore/swift4/promisekitLibrary/docs/MixedPropertiesAndAdditionalPropertiesClass.md deleted file mode 100644 index fcffb8ecdbf3..000000000000 --- a/samples/client/petstore/swift4/promisekitLibrary/docs/MixedPropertiesAndAdditionalPropertiesClass.md +++ /dev/null @@ -1,12 +0,0 @@ -# MixedPropertiesAndAdditionalPropertiesClass - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**uuid** | **UUID** | | [optional] -**dateTime** | **Date** | | [optional] -**map** | [String:Animal] | | [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/swift4/promisekitLibrary/docs/Model200Response.md b/samples/client/petstore/swift4/promisekitLibrary/docs/Model200Response.md deleted file mode 100644 index 5865ea690cc3..000000000000 --- a/samples/client/petstore/swift4/promisekitLibrary/docs/Model200Response.md +++ /dev/null @@ -1,11 +0,0 @@ -# Model200Response - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **Int** | | [optional] -**_class** | **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/swift4/promisekitLibrary/docs/Name.md b/samples/client/petstore/swift4/promisekitLibrary/docs/Name.md deleted file mode 100644 index f7b180292cd6..000000000000 --- a/samples/client/petstore/swift4/promisekitLibrary/docs/Name.md +++ /dev/null @@ -1,13 +0,0 @@ -# Name - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **Int** | | -**snakeCase** | **Int** | | [optional] [readonly] -**property** | **String** | | [optional] -**_123number** | **Int** | | [optional] [readonly] - -[[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/swift4/promisekitLibrary/docs/NumberOnly.md b/samples/client/petstore/swift4/promisekitLibrary/docs/NumberOnly.md deleted file mode 100644 index 72bd361168b5..000000000000 --- a/samples/client/petstore/swift4/promisekitLibrary/docs/NumberOnly.md +++ /dev/null @@ -1,10 +0,0 @@ -# NumberOnly - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**justNumber** | **Double** | | [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/swift4/promisekitLibrary/docs/Order.md b/samples/client/petstore/swift4/promisekitLibrary/docs/Order.md deleted file mode 100644 index 15487f01175c..000000000000 --- a/samples/client/petstore/swift4/promisekitLibrary/docs/Order.md +++ /dev/null @@ -1,15 +0,0 @@ -# Order - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Int64** | | [optional] -**petId** | **Int64** | | [optional] -**quantity** | **Int** | | [optional] -**shipDate** | **Date** | | [optional] -**status** | **String** | Order Status | [optional] -**complete** | **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/swift4/promisekitLibrary/docs/OuterComposite.md b/samples/client/petstore/swift4/promisekitLibrary/docs/OuterComposite.md deleted file mode 100644 index d6b3583bc3ff..000000000000 --- a/samples/client/petstore/swift4/promisekitLibrary/docs/OuterComposite.md +++ /dev/null @@ -1,12 +0,0 @@ -# OuterComposite - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**myNumber** | **Double** | | [optional] -**myString** | **String** | | [optional] -**myBoolean** | **Bool** | | [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/swift4/promisekitLibrary/docs/OuterEnum.md b/samples/client/petstore/swift4/promisekitLibrary/docs/OuterEnum.md deleted file mode 100644 index 06d413b01680..000000000000 --- a/samples/client/petstore/swift4/promisekitLibrary/docs/OuterEnum.md +++ /dev/null @@ -1,9 +0,0 @@ -# OuterEnum - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/samples/client/petstore/swift4/promisekitLibrary/docs/Pet.md b/samples/client/petstore/swift4/promisekitLibrary/docs/Pet.md deleted file mode 100644 index 5c05f98fad4a..000000000000 --- a/samples/client/petstore/swift4/promisekitLibrary/docs/Pet.md +++ /dev/null @@ -1,15 +0,0 @@ -# Pet - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Int64** | | [optional] -**category** | [**Category**](Category.md) | | [optional] -**name** | **String** | | -**photoUrls** | **[String]** | | -**tags** | [Tag] | | [optional] -**status** | **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/swift4/promisekitLibrary/docs/PetAPI.md b/samples/client/petstore/swift4/promisekitLibrary/docs/PetAPI.md deleted file mode 100644 index e767ea772f89..000000000000 --- a/samples/client/petstore/swift4/promisekitLibrary/docs/PetAPI.md +++ /dev/null @@ -1,442 +0,0 @@ -# PetAPI - -All URIs are relative to *http://petstore.swagger.io:80/v2* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**addPet**](PetAPI.md#addpet) | **POST** /pet | Add a new pet to the store -[**deletePet**](PetAPI.md#deletepet) | **DELETE** /pet/{petId} | Deletes a pet -[**findPetsByStatus**](PetAPI.md#findpetsbystatus) | **GET** /pet/findByStatus | Finds Pets by status -[**findPetsByTags**](PetAPI.md#findpetsbytags) | **GET** /pet/findByTags | Finds Pets by tags -[**getPetById**](PetAPI.md#getpetbyid) | **GET** /pet/{petId} | Find pet by ID -[**updatePet**](PetAPI.md#updatepet) | **PUT** /pet | Update an existing pet -[**updatePetWithForm**](PetAPI.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data -[**uploadFile**](PetAPI.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image -[**uploadFileWithRequiredFile**](PetAPI.md#uploadfilewithrequiredfile) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required) - - -# **addPet** -```swift - open class func addPet( body: Pet) -> Promise -``` - -Add a new pet to the store - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let body = Pet(id: 123, category: Category(id: 123, name: "name_example"), name: "name_example", photoUrls: ["photoUrls_example"], tags: [Tag(id: 123, name: "name_example")], status: "status_example") // Pet | Pet object that needs to be added to the store - -// Add a new pet to the store -PetAPI.addPet(body: body).then { - // when the promise is fulfilled - }.always { - // regardless of whether the promise is fulfilled, or rejected - }.catch { errorType in - // when the promise is rejected -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Pet**](Pet.md) | Pet object that needs to be added to the store | - -### Return type - -Void (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) - -# **deletePet** -```swift - open class func deletePet( petId: Int64, apiKey: String? = nil) -> Promise -``` - -Deletes a pet - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let petId = 987 // Int64 | Pet id to delete -let apiKey = "apiKey_example" // String | (optional) - -// Deletes a pet -PetAPI.deletePet(petId: petId, apiKey: apiKey).then { - // when the promise is fulfilled - }.always { - // regardless of whether the promise is fulfilled, or rejected - }.catch { errorType in - // when the promise is rejected -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Int64** | Pet id to delete | - **apiKey** | **String** | | [optional] - -### Return type - -Void (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) - -# **findPetsByStatus** -```swift - open class func findPetsByStatus( status: [String]) -> Promise<[Pet]> -``` - -Finds Pets by status - -Multiple status values can be provided with comma separated strings - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let status = ["status_example"] // [String] | Status values that need to be considered for filter - -// Finds Pets by status -PetAPI.findPetsByStatus(status: status).then { - // when the promise is fulfilled - }.always { - // regardless of whether the promise is fulfilled, or rejected - }.catch { errorType in - // when the promise is rejected -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **status** | [**[String]**](String.md) | Status values that need to be considered for filter | - -### Return type - -[**[Pet]**](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) - -# **findPetsByTags** -```swift - open class func findPetsByTags( tags: [String]) -> Promise<[Pet]> -``` - -Finds Pets by tags - -Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let tags = ["inner_example"] // [String] | Tags to filter by - -// Finds Pets by tags -PetAPI.findPetsByTags(tags: tags).then { - // when the promise is fulfilled - }.always { - // regardless of whether the promise is fulfilled, or rejected - }.catch { errorType in - // when the promise is rejected -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **tags** | [**[String]**](String.md) | Tags to filter by | - -### Return type - -[**[Pet]**](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) - -# **getPetById** -```swift - open class func getPetById( petId: Int64) -> Promise -``` - -Find pet by ID - -Returns a single pet - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let petId = 987 // Int64 | ID of pet to return - -// Find pet by ID -PetAPI.getPetById(petId: petId).then { - // when the promise is fulfilled - }.always { - // regardless of whether the promise is fulfilled, or rejected - }.catch { errorType in - // when the promise is rejected -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Int64** | ID of pet to return | - -### Return type - -[**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) - -# **updatePet** -```swift - open class func updatePet( body: Pet) -> Promise -``` - -Update an existing pet - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let body = Pet(id: 123, category: Category(id: 123, name: "name_example"), name: "name_example", photoUrls: ["photoUrls_example"], tags: [Tag(id: 123, name: "name_example")], status: "status_example") // Pet | Pet object that needs to be added to the store - -// Update an existing pet -PetAPI.updatePet(body: body).then { - // when the promise is fulfilled - }.always { - // regardless of whether the promise is fulfilled, or rejected - }.catch { errorType in - // when the promise is rejected -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Pet**](Pet.md) | Pet object that needs to be added to the store | - -### Return type - -Void (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) - -# **updatePetWithForm** -```swift - open class func updatePetWithForm( petId: Int64, name: String? = nil, status: String? = nil) -> Promise -``` - -Updates a pet in the store with form data - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let petId = 987 // Int64 | ID of pet that needs to be updated -let name = "name_example" // String | Updated name of the pet (optional) -let status = "status_example" // String | Updated status of the pet (optional) - -// Updates a pet in the store with form data -PetAPI.updatePetWithForm(petId: petId, name: name, status: status).then { - // when the promise is fulfilled - }.always { - // regardless of whether the promise is fulfilled, or rejected - }.catch { errorType in - // when the promise is rejected -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Int64** | ID of pet that needs to be updated | - **name** | **String** | Updated name of the pet | [optional] - **status** | **String** | Updated status of the pet | [optional] - -### Return type - -Void (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) - -# **uploadFile** -```swift - open class func uploadFile( petId: Int64, additionalMetadata: String? = nil, file: URL? = nil) -> Promise -``` - -uploads an image - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let petId = 987 // Int64 | ID of pet to update -let additionalMetadata = "additionalMetadata_example" // String | Additional data to pass to server (optional) -let file = URL(string: "https://example.com")! // URL | file to upload (optional) - -// uploads an image -PetAPI.uploadFile(petId: petId, additionalMetadata: additionalMetadata, file: file).then { - // when the promise is fulfilled - }.always { - // regardless of whether the promise is fulfilled, or rejected - }.catch { errorType in - // when the promise is rejected -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Int64** | ID of pet to update | - **additionalMetadata** | **String** | Additional data to pass to server | [optional] - **file** | **URL** | file to upload | [optional] - -### Return type - -[**ApiResponse**](ApiResponse.md) - -### Authorization - -[petstore_auth](../README.md#petstore_auth) - -### HTTP request headers - - - **Content-Type**: multipart/form-data - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **uploadFileWithRequiredFile** -```swift - open class func uploadFileWithRequiredFile( petId: Int64, requiredFile: URL, additionalMetadata: String? = nil) -> Promise -``` - -uploads an image (required) - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let petId = 987 // Int64 | ID of pet to update -let requiredFile = URL(string: "https://example.com")! // URL | file to upload -let additionalMetadata = "additionalMetadata_example" // String | Additional data to pass to server (optional) - -// uploads an image (required) -PetAPI.uploadFileWithRequiredFile(petId: petId, requiredFile: requiredFile, additionalMetadata: additionalMetadata).then { - // when the promise is fulfilled - }.always { - // regardless of whether the promise is fulfilled, or rejected - }.catch { errorType in - // when the promise is rejected -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Int64** | ID of pet to update | - **requiredFile** | **URL** | file to upload | - **additionalMetadata** | **String** | Additional data to pass to server | [optional] - -### Return type - -[**ApiResponse**](ApiResponse.md) - -### Authorization - -[petstore_auth](../README.md#petstore_auth) - -### HTTP request headers - - - **Content-Type**: multipart/form-data - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/samples/client/petstore/swift4/promisekitLibrary/docs/ReadOnlyFirst.md b/samples/client/petstore/swift4/promisekitLibrary/docs/ReadOnlyFirst.md deleted file mode 100644 index ed537b87598b..000000000000 --- a/samples/client/petstore/swift4/promisekitLibrary/docs/ReadOnlyFirst.md +++ /dev/null @@ -1,11 +0,0 @@ -# ReadOnlyFirst - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**bar** | **String** | | [optional] [readonly] -**baz** | **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/swift4/promisekitLibrary/docs/Return.md b/samples/client/petstore/swift4/promisekitLibrary/docs/Return.md deleted file mode 100644 index 66d17c27c887..000000000000 --- a/samples/client/petstore/swift4/promisekitLibrary/docs/Return.md +++ /dev/null @@ -1,10 +0,0 @@ -# Return - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**_return** | **Int** | | [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/swift4/promisekitLibrary/docs/SpecialModelName.md b/samples/client/petstore/swift4/promisekitLibrary/docs/SpecialModelName.md deleted file mode 100644 index 3ec27a38c2ac..000000000000 --- a/samples/client/petstore/swift4/promisekitLibrary/docs/SpecialModelName.md +++ /dev/null @@ -1,10 +0,0 @@ -# SpecialModelName - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**specialPropertyName** | **Int64** | | [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/swift4/promisekitLibrary/docs/StoreAPI.md b/samples/client/petstore/swift4/promisekitLibrary/docs/StoreAPI.md deleted file mode 100644 index 085d479bce24..000000000000 --- a/samples/client/petstore/swift4/promisekitLibrary/docs/StoreAPI.md +++ /dev/null @@ -1,194 +0,0 @@ -# StoreAPI - -All URIs are relative to *http://petstore.swagger.io:80/v2* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**deleteOrder**](StoreAPI.md#deleteorder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID -[**getInventory**](StoreAPI.md#getinventory) | **GET** /store/inventory | Returns pet inventories by status -[**getOrderById**](StoreAPI.md#getorderbyid) | **GET** /store/order/{order_id} | Find purchase order by ID -[**placeOrder**](StoreAPI.md#placeorder) | **POST** /store/order | Place an order for a pet - - -# **deleteOrder** -```swift - open class func deleteOrder( orderId: String) -> Promise -``` - -Delete purchase order by ID - -For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let orderId = "orderId_example" // String | ID of the order that needs to be deleted - -// Delete purchase order by ID -StoreAPI.deleteOrder(orderId: orderId).then { - // when the promise is fulfilled - }.always { - // regardless of whether the promise is fulfilled, or rejected - }.catch { errorType in - // when the promise is rejected -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **orderId** | **String** | ID of the order that needs to be deleted | - -### Return type - -Void (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) - -# **getInventory** -```swift - open class func getInventory() -> Promise<[String:Int]> -``` - -Returns pet inventories by status - -Returns a map of status codes to quantities - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - - -// Returns pet inventories by status -StoreAPI.getInventory().then { - // when the promise is fulfilled - }.always { - // regardless of whether the promise is fulfilled, or rejected - }.catch { errorType in - // when the promise is rejected -} -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -**[String:Int]** - -### 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) - -# **getOrderById** -```swift - open class func getOrderById( orderId: Int64) -> Promise -``` - -Find purchase order by ID - -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let orderId = 987 // Int64 | ID of pet that needs to be fetched - -// Find purchase order by ID -StoreAPI.getOrderById(orderId: orderId).then { - // when the promise is fulfilled - }.always { - // regardless of whether the promise is fulfilled, or rejected - }.catch { errorType in - // when the promise is rejected -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **orderId** | **Int64** | ID of pet that needs to be fetched | - -### Return type - -[**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) - -# **placeOrder** -```swift - open class func placeOrder( body: Order) -> Promise -``` - -Place an order for a pet - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let body = Order(id: 123, petId: 123, quantity: 123, shipDate: Date(), status: "status_example", complete: false) // Order | order placed for purchasing the pet - -// Place an order for a pet -StoreAPI.placeOrder(body: body).then { - // when the promise is fulfilled - }.always { - // regardless of whether the promise is fulfilled, or rejected - }.catch { errorType in - // when the promise is rejected -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Order**](Order.md) | order placed for purchasing the pet | - -### Return type - -[**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/swift4/promisekitLibrary/docs/StringBooleanMap.md b/samples/client/petstore/swift4/promisekitLibrary/docs/StringBooleanMap.md deleted file mode 100644 index 7abf11ec68b1..000000000000 --- a/samples/client/petstore/swift4/promisekitLibrary/docs/StringBooleanMap.md +++ /dev/null @@ -1,9 +0,0 @@ -# StringBooleanMap - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/samples/client/petstore/swift4/promisekitLibrary/docs/Tag.md b/samples/client/petstore/swift4/promisekitLibrary/docs/Tag.md deleted file mode 100644 index ff4ac8aa4519..000000000000 --- a/samples/client/petstore/swift4/promisekitLibrary/docs/Tag.md +++ /dev/null @@ -1,11 +0,0 @@ -# Tag - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Int64** | | [optional] -**name** | **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/swift4/promisekitLibrary/docs/TypeHolderDefault.md b/samples/client/petstore/swift4/promisekitLibrary/docs/TypeHolderDefault.md deleted file mode 100644 index 5161394bdc3e..000000000000 --- a/samples/client/petstore/swift4/promisekitLibrary/docs/TypeHolderDefault.md +++ /dev/null @@ -1,14 +0,0 @@ -# TypeHolderDefault - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**stringItem** | **String** | | [default to "what"] -**numberItem** | **Double** | | -**integerItem** | **Int** | | -**boolItem** | **Bool** | | [default to true] -**arrayItem** | **[Int]** | | - -[[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/swift4/promisekitLibrary/docs/TypeHolderExample.md b/samples/client/petstore/swift4/promisekitLibrary/docs/TypeHolderExample.md deleted file mode 100644 index 46d0471cd71a..000000000000 --- a/samples/client/petstore/swift4/promisekitLibrary/docs/TypeHolderExample.md +++ /dev/null @@ -1,14 +0,0 @@ -# TypeHolderExample - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**stringItem** | **String** | | -**numberItem** | **Double** | | -**integerItem** | **Int** | | -**boolItem** | **Bool** | | -**arrayItem** | **[Int]** | | - -[[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/swift4/promisekitLibrary/docs/User.md b/samples/client/petstore/swift4/promisekitLibrary/docs/User.md deleted file mode 100644 index 5a439de0ff95..000000000000 --- a/samples/client/petstore/swift4/promisekitLibrary/docs/User.md +++ /dev/null @@ -1,17 +0,0 @@ -# User - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Int64** | | [optional] -**username** | **String** | | [optional] -**firstName** | **String** | | [optional] -**lastName** | **String** | | [optional] -**email** | **String** | | [optional] -**password** | **String** | | [optional] -**phone** | **String** | | [optional] -**userStatus** | **Int** | 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/swift4/promisekitLibrary/docs/UserAPI.md b/samples/client/petstore/swift4/promisekitLibrary/docs/UserAPI.md deleted file mode 100644 index e18cc451e98e..000000000000 --- a/samples/client/petstore/swift4/promisekitLibrary/docs/UserAPI.md +++ /dev/null @@ -1,382 +0,0 @@ -# UserAPI - -All URIs are relative to *http://petstore.swagger.io:80/v2* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**createUser**](UserAPI.md#createuser) | **POST** /user | Create user -[**createUsersWithArrayInput**](UserAPI.md#createuserswitharrayinput) | **POST** /user/createWithArray | Creates list of users with given input array -[**createUsersWithListInput**](UserAPI.md#createuserswithlistinput) | **POST** /user/createWithList | Creates list of users with given input array -[**deleteUser**](UserAPI.md#deleteuser) | **DELETE** /user/{username} | Delete user -[**getUserByName**](UserAPI.md#getuserbyname) | **GET** /user/{username} | Get user by user name -[**loginUser**](UserAPI.md#loginuser) | **GET** /user/login | Logs user into the system -[**logoutUser**](UserAPI.md#logoutuser) | **GET** /user/logout | Logs out current logged in user session -[**updateUser**](UserAPI.md#updateuser) | **PUT** /user/{username} | Updated user - - -# **createUser** -```swift - open class func createUser( body: User) -> Promise -``` - -Create user - -This can only be done by the logged in user. - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let body = User(id: 123, username: "username_example", firstName: "firstName_example", lastName: "lastName_example", email: "email_example", password: "password_example", phone: "phone_example", userStatus: 123) // User | Created user object - -// Create user -UserAPI.createUser(body: body).then { - // when the promise is fulfilled - }.always { - // regardless of whether the promise is fulfilled, or rejected - }.catch { errorType in - // when the promise is rejected -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**User**](User.md) | Created user object | - -### Return type - -Void (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) - -# **createUsersWithArrayInput** -```swift - open class func createUsersWithArrayInput( body: [User]) -> Promise -``` - -Creates list of users with given input array - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let body = [User(id: 123, username: "username_example", firstName: "firstName_example", lastName: "lastName_example", email: "email_example", password: "password_example", phone: "phone_example", userStatus: 123)] // [User] | List of user object - -// Creates list of users with given input array -UserAPI.createUsersWithArrayInput(body: body).then { - // when the promise is fulfilled - }.always { - // regardless of whether the promise is fulfilled, or rejected - }.catch { errorType in - // when the promise is rejected -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**[User]**](User.md) | List of user object | - -### Return type - -Void (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) - -# **createUsersWithListInput** -```swift - open class func createUsersWithListInput( body: [User]) -> Promise -``` - -Creates list of users with given input array - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let body = [User(id: 123, username: "username_example", firstName: "firstName_example", lastName: "lastName_example", email: "email_example", password: "password_example", phone: "phone_example", userStatus: 123)] // [User] | List of user object - -// Creates list of users with given input array -UserAPI.createUsersWithListInput(body: body).then { - // when the promise is fulfilled - }.always { - // regardless of whether the promise is fulfilled, or rejected - }.catch { errorType in - // when the promise is rejected -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**[User]**](User.md) | List of user object | - -### Return type - -Void (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) - -# **deleteUser** -```swift - open class func deleteUser( username: String) -> Promise -``` - -Delete user - -This can only be done by the logged in user. - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let username = "username_example" // String | The name that needs to be deleted - -// Delete user -UserAPI.deleteUser(username: username).then { - // when the promise is fulfilled - }.always { - // regardless of whether the promise is fulfilled, or rejected - }.catch { errorType in - // when the promise is rejected -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **String** | The name that needs to be deleted | - -### Return type - -Void (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) - -# **getUserByName** -```swift - open class func getUserByName( username: String) -> Promise -``` - -Get user by user name - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let username = "username_example" // String | The name that needs to be fetched. Use user1 for testing. - -// Get user by user name -UserAPI.getUserByName(username: username).then { - // when the promise is fulfilled - }.always { - // regardless of whether the promise is fulfilled, or rejected - }.catch { errorType in - // when the promise is rejected -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **String** | The name that needs to be fetched. Use user1 for testing. | - -### Return type - -[**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) - -# **loginUser** -```swift - open class func loginUser( username: String, password: String) -> Promise -``` - -Logs user into the system - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let username = "username_example" // String | The user name for login -let password = "password_example" // String | The password for login in clear text - -// Logs user into the system -UserAPI.loginUser(username: username, password: password).then { - // when the promise is fulfilled - }.always { - // regardless of whether the promise is fulfilled, or rejected - }.catch { errorType in - // when the promise is rejected -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **String** | The user name for login | - **password** | **String** | The password for login in clear text | - -### 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) - -# **logoutUser** -```swift - open class func logoutUser() -> Promise -``` - -Logs out current logged in user session - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - - -// Logs out current logged in user session -UserAPI.logoutUser().then { - // when the promise is fulfilled - }.always { - // regardless of whether the promise is fulfilled, or rejected - }.catch { errorType in - // when the promise is rejected -} -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -Void (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) - -# **updateUser** -```swift - open class func updateUser( username: String, body: User) -> Promise -``` - -Updated user - -This can only be done by the logged in user. - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let username = "username_example" // String | name that need to be deleted -let body = User(id: 123, username: "username_example", firstName: "firstName_example", lastName: "lastName_example", email: "email_example", password: "password_example", phone: "phone_example", userStatus: 123) // User | Updated user object - -// Updated user -UserAPI.updateUser(username: username, body: body).then { - // when the promise is fulfilled - }.always { - // regardless of whether the promise is fulfilled, or rejected - }.catch { errorType in - // when the promise is rejected -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **String** | name that need to be deleted | - **body** | [**User**](User.md) | Updated user object | - -### Return type - -Void (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/swift4/promisekitLibrary/git_push.sh b/samples/client/petstore/swift4/promisekitLibrary/git_push.sh deleted file mode 100644 index ced3be2b0c7b..000000000000 --- a/samples/client/petstore/swift4/promisekitLibrary/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/swift4/promisekitLibrary/pom.xml b/samples/client/petstore/swift4/promisekitLibrary/pom.xml deleted file mode 100644 index 5caba9cb4633..000000000000 --- a/samples/client/petstore/swift4/promisekitLibrary/pom.xml +++ /dev/null @@ -1,43 +0,0 @@ - - 4.0.0 - io.swagger - Swift4PetstoreClientTests - pom - 1.0-SNAPSHOT - Swift4 Swagger Petstore Client - - - - maven-dependency-plugin - - - package - - copy-dependencies - - - ${project.build.directory} - - - - - - org.codehaus.mojo - exec-maven-plugin - 1.2.1 - - - xcodebuild-test - integration-test - - exec - - - ./run_spmbuild.sh - - - - - - - diff --git a/samples/client/petstore/swift4/promisekitLibrary/project.yml b/samples/client/petstore/swift4/promisekitLibrary/project.yml deleted file mode 100644 index e35045a1d068..000000000000 --- a/samples/client/petstore/swift4/promisekitLibrary/project.yml +++ /dev/null @@ -1,16 +0,0 @@ -name: PetstoreClient -targets: - PetstoreClient: - type: framework - platform: iOS - deploymentTarget: "10.0" - sources: [PetstoreClient] - info: - path: ./Info.plist - version: 1.0.0 - settings: - APPLICATION_EXTENSION_API_ONLY: true - scheme: {} - dependencies: - - carthage: Alamofire - - carthage: PromiseKit diff --git a/samples/client/petstore/swift4/promisekitLibrary/run_spmbuild.sh b/samples/client/petstore/swift4/promisekitLibrary/run_spmbuild.sh deleted file mode 100755 index 1a9f585ad054..000000000000 --- a/samples/client/petstore/swift4/promisekitLibrary/run_spmbuild.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -swift build && exit ${PIPESTATUS[0]} diff --git a/samples/client/petstore/swift4/resultLibrary/.gitignore b/samples/client/petstore/swift4/resultLibrary/.gitignore deleted file mode 100644 index 5e5d5cebcf47..000000000000 --- a/samples/client/petstore/swift4/resultLibrary/.gitignore +++ /dev/null @@ -1,63 +0,0 @@ -# Xcode -# -# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore - -## Build generated -build/ -DerivedData - -## Various settings -*.pbxuser -!default.pbxuser -*.mode1v3 -!default.mode1v3 -*.mode2v3 -!default.mode2v3 -*.perspectivev3 -!default.perspectivev3 -xcuserdata - -## Other -*.xccheckout -*.moved-aside -*.xcuserstate -*.xcscmblueprint - -## Obj-C/Swift specific -*.hmap -*.ipa - -## Playgrounds -timeline.xctimeline -playground.xcworkspace - -# Swift Package Manager -# -# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. -# Packages/ -.build/ - -# CocoaPods -# -# We recommend against adding the Pods directory to your .gitignore. However -# you should judge for yourself, the pros and cons are mentioned at: -# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control -# -# Pods/ - -# Carthage -# -# Add this line if you want to avoid checking in source code from Carthage dependencies. -# Carthage/Checkouts - -Carthage/Build - -# fastlane -# -# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the -# screenshots whenever they are needed. -# For more information about the recommended setup visit: -# https://github.com/fastlane/fastlane/blob/master/docs/Gitignore.md - -fastlane/report.xml -fastlane/screenshots diff --git a/samples/client/petstore/swift4/resultLibrary/.openapi-generator-ignore b/samples/client/petstore/swift4/resultLibrary/.openapi-generator-ignore deleted file mode 100644 index 7484ee590a38..000000000000 --- a/samples/client/petstore/swift4/resultLibrary/.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/swift4/resultLibrary/.openapi-generator/VERSION b/samples/client/petstore/swift4/resultLibrary/.openapi-generator/VERSION deleted file mode 100644 index b5d898602c2c..000000000000 --- a/samples/client/petstore/swift4/resultLibrary/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -4.3.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/swift4/resultLibrary/Cartfile b/samples/client/petstore/swift4/resultLibrary/Cartfile deleted file mode 100644 index 86748c63d90d..000000000000 --- a/samples/client/petstore/swift4/resultLibrary/Cartfile +++ /dev/null @@ -1 +0,0 @@ -github "Alamofire/Alamofire" ~> 4.9.0 diff --git a/samples/client/petstore/swift4/resultLibrary/Info.plist b/samples/client/petstore/swift4/resultLibrary/Info.plist deleted file mode 100644 index 323e5ecfc420..000000000000 --- a/samples/client/petstore/swift4/resultLibrary/Info.plist +++ /dev/null @@ -1,22 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.0 - CFBundleVersion - 1 - - diff --git a/samples/client/petstore/swift4/resultLibrary/Package.resolved b/samples/client/petstore/swift4/resultLibrary/Package.resolved deleted file mode 100644 index ca6137050ebc..000000000000 --- a/samples/client/petstore/swift4/resultLibrary/Package.resolved +++ /dev/null @@ -1,16 +0,0 @@ -{ - "object": { - "pins": [ - { - "package": "Alamofire", - "repositoryURL": "https://github.com/Alamofire/Alamofire.git", - "state": { - "branch": null, - "revision": "747c8db8d57b68d5e35275f10c92d55f982adbd4", - "version": "4.9.1" - } - } - ] - }, - "version": 1 -} diff --git a/samples/client/petstore/swift4/resultLibrary/Package.swift b/samples/client/petstore/swift4/resultLibrary/Package.swift deleted file mode 100644 index e5c5f0f33b82..000000000000 --- a/samples/client/petstore/swift4/resultLibrary/Package.swift +++ /dev/null @@ -1,27 +0,0 @@ -// swift-tools-version:4.2 -// The swift-tools-version declares the minimum version of Swift required to build this package. - -import PackageDescription - -let package = Package( - name: "PetstoreClient", - products: [ - // Products define the executables and libraries produced by a package, and make them visible to other packages. - .library( - name: "PetstoreClient", - targets: ["PetstoreClient"]) - ], - dependencies: [ - // Dependencies declare other packages that this package depends on. - .package(url: "https://github.com/Alamofire/Alamofire.git", from: "4.9.0") - ], - targets: [ - // Targets are the basic building blocks of a package. A target can define a module or a test suite. - // Targets can depend on other targets in this package, and on products in packages which this package depends on. - .target( - name: "PetstoreClient", - dependencies: ["Alamofire"], - path: "PetstoreClient/Classes" - ) - ] -) diff --git a/samples/client/petstore/swift4/resultLibrary/PetstoreClient.podspec b/samples/client/petstore/swift4/resultLibrary/PetstoreClient.podspec deleted file mode 100644 index a6c9a1f3d45e..000000000000 --- a/samples/client/petstore/swift4/resultLibrary/PetstoreClient.podspec +++ /dev/null @@ -1,14 +0,0 @@ -Pod::Spec.new do |s| - s.name = 'PetstoreClient' - s.ios.deployment_target = '9.0' - s.osx.deployment_target = '10.11' - s.tvos.deployment_target = '9.0' - s.version = '1.0.0' - s.source = { :git => 'git@github.com:OpenAPITools/openapi-generator.git', :tag => 'v1.0.0' } - s.authors = '' - s.license = 'Proprietary' - s.homepage = 'https://github.com/openapitools/openapi-generator' - s.summary = 'PetstoreClient' - s.source_files = 'PetstoreClient/Classes/**/*.swift' - s.dependency 'Alamofire', '~> 4.9.0' -end diff --git a/samples/client/petstore/swift4/resultLibrary/PetstoreClient.xcodeproj/project.pbxproj b/samples/client/petstore/swift4/resultLibrary/PetstoreClient.xcodeproj/project.pbxproj deleted file mode 100644 index 49e6ca81fd81..000000000000 --- a/samples/client/petstore/swift4/resultLibrary/PetstoreClient.xcodeproj/project.pbxproj +++ /dev/null @@ -1,580 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 51; - objects = { - -/* Begin PBXBuildFile section */ - 0299339D13C3571C4C57368A /* ApiResponse.swift in Sources */ = {isa = PBXBuildFile; fileRef = A8E7B833748B4F0C7CDA90C6 /* ApiResponse.swift */; }; - 081C0B80A989B1AAF2665121 /* MapTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7986861626C2B1CB49AD7000 /* MapTest.swift */; }; - 0C1E4C682F2D0AF7D9E431EE /* Dog.swift in Sources */ = {isa = PBXBuildFile; fileRef = C6C3E1129526A353B963EFD7 /* Dog.swift */; }; - 0E6932F1C55BA6880693C478 /* Order.swift in Sources */ = {isa = PBXBuildFile; fileRef = 27B2E9EF856E89FEAA359A3A /* Order.swift */; }; - 1E6C7C7F271A802DF8099330 /* APIHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 897716962D472FE162B723CB /* APIHelper.swift */; }; - 22FA6CA58E58550DE36AE750 /* JSONEncodableEncoding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9791B840B8D6EAA35343B00F /* JSONEncodableEncoding.swift */; }; - 248F2F0F29E8FDAE9CAD64C5 /* AdditionalPropertiesClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 396DEF3156BA0D12D0FC5C3C /* AdditionalPropertiesClass.swift */; }; - 269E3103C458C78EA5726EE2 /* Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = B8C298FC8929DCB369053F11 /* Extensions.swift */; }; - 294CDFA409BC369C0FDC5FB3 /* SpecialModelName.swift in Sources */ = {isa = PBXBuildFile; fileRef = 386FD590658E90509C121118 /* SpecialModelName.swift */; }; - 2B441CDFFFDDB343C04F5375 /* Animal.swift in Sources */ = {isa = PBXBuildFile; fileRef = 95568E7C35F119EB4A12B498 /* Animal.swift */; }; - 2C29D5B60E00DDA3878F1BDE /* Pet.swift in Sources */ = {isa = PBXBuildFile; fileRef = ECFEB4C6C257B3BB3CEA36D1 /* Pet.swift */; }; - 31DFF71D8CCCA0D2D2F8AC90 /* User.swift in Sources */ = {isa = PBXBuildFile; fileRef = E5565A447062C7B8F695F451 /* User.swift */; }; - 34C26979F4678B5B579D26E8 /* FakeClassnameTags123API.swift in Sources */ = {isa = PBXBuildFile; fileRef = B42354B407EC173BEB54E042 /* FakeClassnameTags123API.swift */; }; - 3691B017D3AA18404A563C67 /* ArrayOfNumberOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = B65BB72353DA24536A9049BE /* ArrayOfNumberOnly.swift */; }; - 37DEADD6CD0496690725B8A7 /* Name.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5AD994DFAA0DA93C188A4DBA /* Name.swift */; }; - 40E3027D2E38D8329C6AB01F /* APIs.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37DF825B8F3BADA2B2537D17 /* APIs.swift */; }; - 40E46046D2B16D1A672A08E3 /* AlamofireImplementations.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84A201508DF2B697D65F2631 /* AlamofireImplementations.swift */; }; - 418DB36F23C53C6E2C3CDE39 /* Alamofire.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A235FA3FDFB086CC69CDE83D /* Alamofire.framework */; }; - 41A491E9B577C510F927D126 /* OuterEnum.swift in Sources */ = {isa = PBXBuildFile; fileRef = C15008AABC804EB6FB4CDAC6 /* OuterEnum.swift */; }; - 45B3B29D7A62049F824751F8 /* AnimalFarm.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8D22BE01748F51106DE02332 /* AnimalFarm.swift */; }; - 4A344DF7ECE721B4BBEDCB4A /* CatAllOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AD0F94F512DFBC09F9CC79A /* CatAllOf.swift */; }; - 4B4BE77747413A9188CDABD2 /* ArrayOfArrayOfNumberOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B1B8B838B5D9D312F2002EB /* ArrayOfArrayOfNumberOnly.swift */; }; - 555DEA47352B42E49082922B /* NumberOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = B8E0B16084741FCB82389F58 /* NumberOnly.swift */; }; - 5695497F5DBF6C08842755A3 /* TypeHolderDefault.swift in Sources */ = {isa = PBXBuildFile; fileRef = EBC76F6D4D2AA8084B7EB50E /* TypeHolderDefault.swift */; }; - 61322FC4325F1A4FF24ACA48 /* EnumArrays.swift in Sources */ = {isa = PBXBuildFile; fileRef = 10503995D9EFD031A2EFB576 /* EnumArrays.swift */; }; - 64C48E3658CF53EBE8AF82F9 /* UserAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7C8D5F382979854D47F18DB1 /* UserAPI.swift */; }; - 6B638A04B34C82B2091D6EDD /* FormatTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3156CE41C001C80379B84BDB /* FormatTest.swift */; }; - 6FBD978F4D1ED92E7071FFBB /* CodableHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 02A6F6BB2152ACEE1416D44A /* CodableHelper.swift */; }; - 72547ECFB451A509409311EE /* Configuration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 28A444949BBC254798C3B3DD /* Configuration.swift */; }; - 72CE544C52BB33778D1B89B8 /* DogAllOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = A21A69C8402A60E01116ABBD /* DogAllOf.swift */; }; - 7441BBA84C31E06400338F89 /* ClassModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3C30827D8EAF8EA684E7BCEA /* ClassModel.swift */; }; - 7588B7E2960253174ADCCF16 /* JSONEncodingHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 35D710108A69DD8A5297F926 /* JSONEncodingHelper.swift */; }; - 86DE714469BE8BA28AFF710F /* HasOnlyReadOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C7FBC641752D2E13B150973 /* HasOnlyReadOnly.swift */; }; - 913B0BA470D8357FF8A2FFD3 /* Result.swift in Sources */ = {isa = PBXBuildFile; fileRef = 099A5E845AF5E1409204325B /* Result.swift */; }; - 914F4D1FCB17773C067C4E68 /* ReadOnlyFirst.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6FD42727E001E799E458C292 /* ReadOnlyFirst.swift */; }; - 922BDADAB291907A7FD14314 /* OuterComposite.swift in Sources */ = {isa = PBXBuildFile; fileRef = F4E0AD8F60A91F72C7687560 /* OuterComposite.swift */; }; - 97F7B85BF07A325EEBF92C93 /* File.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3933D3B2A3AC4577094D0C23 /* File.swift */; }; - 9CA19AA4483F6EB50270A81E /* List.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A6070F581E611FF44AFD40A /* List.swift */; }; - 9CF06ACDA32CB0C3E74E435C /* Model200Response.swift in Sources */ = {isa = PBXBuildFile; fileRef = 82A2C3DC2235F0114C2B08E5 /* Model200Response.swift */; }; - 9DA1C6F8B4D6C8595F28C098 /* EnumTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = FD60AEA646791E0EDE885DE1 /* EnumTest.swift */; }; - A6E50CC6845FE58D8C236253 /* Return.swift in Sources */ = {isa = PBXBuildFile; fileRef = C81447828475F76C5CF4F08A /* Return.swift */; }; - A6E5A5629495DB0ED672B06F /* PetAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A019F500E546A3292CE716A /* PetAPI.swift */; }; - A85E190556818FFA79896E92 /* ArrayTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = F1A0379CDFC55705AE76C998 /* ArrayTest.swift */; }; - ACF3037926301D4D6E848745 /* EnumClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B2C97AE6ACA1E5FB88F5BAA /* EnumClass.swift */; }; - AD594BFB99E31A5E07579237 /* Client.swift in Sources */ = {isa = PBXBuildFile; fileRef = A913A57E72D723632E9A718F /* Client.swift */; }; - B301DB1B80F37C757550AA17 /* MixedPropertiesAndAdditionalPropertiesClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9AD714C7CC59BDD18DE8DF4E /* MixedPropertiesAndAdditionalPropertiesClass.swift */; }; - B3E35FE2773D4A8BA15CFA88 /* Tag.swift in Sources */ = {isa = PBXBuildFile; fileRef = B2896F8BFD1AA2965C8A3015 /* Tag.swift */; }; - BB1F3C6D50B8F0A8CC4F1749 /* Capitalization.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7B38FA00A494D13F4C382A3 /* Capitalization.swift */; }; - CA9B9B19882EA044EAD0B359 /* AnotherFakeAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9DF24D2714B9C4CF14146E88 /* AnotherFakeAPI.swift */; }; - CB68ABDBAADAF6B8D7B93A5D /* StoreAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = A53274D99BBDE1B79BF3521C /* StoreAPI.swift */; }; - D3BAB7C7A607392CA838C580 /* Models.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8699F7966F748ED026A6FB4C /* Models.swift */; }; - D95A5F83AAA7D5C95A29AB83 /* Cat.swift in Sources */ = {isa = PBXBuildFile; fileRef = 212AA914B7F1793A4E32C119 /* Cat.swift */; }; - DDBD4C0FBA3CD6A4DA3DF376 /* FakeAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6E00950725DC44436C5E238C /* FakeAPI.swift */; }; - DDF1D589267D56D9BED3C6E5 /* FileSchemaTestClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B3666552AA854DAF9C480A3 /* FileSchemaTestClass.swift */; }; - E8A58C6414E88AF3EAE45B69 /* Category.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F2985D01F8D60A4B1925C69 /* Category.swift */; }; - EDFC6C5121A43997014049CB /* StringBooleanMap.swift in Sources */ = {isa = PBXBuildFile; fileRef = 47B4DEBABEFE140768CFB70B /* StringBooleanMap.swift */; }; - FECA2E8C9D0BDFEC459E8996 /* TypeHolderExample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19B65C66C97F082718DDD703 /* TypeHolderExample.swift */; }; -/* End PBXBuildFile section */ - -/* Begin PBXFileReference section */ - 02A6F6BB2152ACEE1416D44A /* CodableHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CodableHelper.swift; sourceTree = ""; }; - 099A5E845AF5E1409204325B /* Result.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Result.swift; sourceTree = ""; }; - 10503995D9EFD031A2EFB576 /* EnumArrays.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EnumArrays.swift; sourceTree = ""; }; - 164AD6EC9C4CCF634D7C4590 /* PetstoreClient.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = PetstoreClient.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 19B65C66C97F082718DDD703 /* TypeHolderExample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TypeHolderExample.swift; sourceTree = ""; }; - 212AA914B7F1793A4E32C119 /* Cat.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Cat.swift; sourceTree = ""; }; - 27B2E9EF856E89FEAA359A3A /* Order.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Order.swift; sourceTree = ""; }; - 28A444949BBC254798C3B3DD /* Configuration.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Configuration.swift; sourceTree = ""; }; - 3156CE41C001C80379B84BDB /* FormatTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FormatTest.swift; sourceTree = ""; }; - 35D710108A69DD8A5297F926 /* JSONEncodingHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JSONEncodingHelper.swift; sourceTree = ""; }; - 37DF825B8F3BADA2B2537D17 /* APIs.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = APIs.swift; sourceTree = ""; }; - 386FD590658E90509C121118 /* SpecialModelName.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SpecialModelName.swift; sourceTree = ""; }; - 3933D3B2A3AC4577094D0C23 /* File.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = File.swift; sourceTree = ""; }; - 396DEF3156BA0D12D0FC5C3C /* AdditionalPropertiesClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdditionalPropertiesClass.swift; sourceTree = ""; }; - 3AD0F94F512DFBC09F9CC79A /* CatAllOf.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CatAllOf.swift; sourceTree = ""; }; - 3C30827D8EAF8EA684E7BCEA /* ClassModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ClassModel.swift; sourceTree = ""; }; - 47B4DEBABEFE140768CFB70B /* StringBooleanMap.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StringBooleanMap.swift; sourceTree = ""; }; - 4B2C97AE6ACA1E5FB88F5BAA /* EnumClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EnumClass.swift; sourceTree = ""; }; - 4B3666552AA854DAF9C480A3 /* FileSchemaTestClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FileSchemaTestClass.swift; sourceTree = ""; }; - 4C7FBC641752D2E13B150973 /* HasOnlyReadOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HasOnlyReadOnly.swift; sourceTree = ""; }; - 5AD994DFAA0DA93C188A4DBA /* Name.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Name.swift; sourceTree = ""; }; - 6E00950725DC44436C5E238C /* FakeAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FakeAPI.swift; sourceTree = ""; }; - 6F2985D01F8D60A4B1925C69 /* Category.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Category.swift; sourceTree = ""; }; - 6FD42727E001E799E458C292 /* ReadOnlyFirst.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReadOnlyFirst.swift; sourceTree = ""; }; - 7986861626C2B1CB49AD7000 /* MapTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MapTest.swift; sourceTree = ""; }; - 7A6070F581E611FF44AFD40A /* List.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = List.swift; sourceTree = ""; }; - 7B1B8B838B5D9D312F2002EB /* ArrayOfArrayOfNumberOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArrayOfArrayOfNumberOnly.swift; sourceTree = ""; }; - 7C8D5F382979854D47F18DB1 /* UserAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserAPI.swift; sourceTree = ""; }; - 82A2C3DC2235F0114C2B08E5 /* Model200Response.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Model200Response.swift; sourceTree = ""; }; - 84A201508DF2B697D65F2631 /* AlamofireImplementations.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlamofireImplementations.swift; sourceTree = ""; }; - 8699F7966F748ED026A6FB4C /* Models.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Models.swift; sourceTree = ""; }; - 897716962D472FE162B723CB /* APIHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = APIHelper.swift; sourceTree = ""; }; - 8D22BE01748F51106DE02332 /* AnimalFarm.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnimalFarm.swift; sourceTree = ""; }; - 95568E7C35F119EB4A12B498 /* Animal.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Animal.swift; sourceTree = ""; }; - 9791B840B8D6EAA35343B00F /* JSONEncodableEncoding.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JSONEncodableEncoding.swift; sourceTree = ""; }; - 9A019F500E546A3292CE716A /* PetAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PetAPI.swift; sourceTree = ""; }; - 9AD714C7CC59BDD18DE8DF4E /* MixedPropertiesAndAdditionalPropertiesClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MixedPropertiesAndAdditionalPropertiesClass.swift; sourceTree = ""; }; - 9DF24D2714B9C4CF14146E88 /* AnotherFakeAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnotherFakeAPI.swift; sourceTree = ""; }; - A21A69C8402A60E01116ABBD /* DogAllOf.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DogAllOf.swift; sourceTree = ""; }; - A235FA3FDFB086CC69CDE83D /* Alamofire.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Alamofire.framework; sourceTree = ""; }; - A53274D99BBDE1B79BF3521C /* StoreAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StoreAPI.swift; sourceTree = ""; }; - A7B38FA00A494D13F4C382A3 /* Capitalization.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Capitalization.swift; sourceTree = ""; }; - A8E7B833748B4F0C7CDA90C6 /* ApiResponse.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ApiResponse.swift; sourceTree = ""; }; - A913A57E72D723632E9A718F /* Client.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Client.swift; sourceTree = ""; }; - B2896F8BFD1AA2965C8A3015 /* Tag.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Tag.swift; sourceTree = ""; }; - B42354B407EC173BEB54E042 /* FakeClassnameTags123API.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FakeClassnameTags123API.swift; sourceTree = ""; }; - B65BB72353DA24536A9049BE /* ArrayOfNumberOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArrayOfNumberOnly.swift; sourceTree = ""; }; - B8C298FC8929DCB369053F11 /* Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Extensions.swift; sourceTree = ""; }; - B8E0B16084741FCB82389F58 /* NumberOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NumberOnly.swift; sourceTree = ""; }; - C15008AABC804EB6FB4CDAC6 /* OuterEnum.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OuterEnum.swift; sourceTree = ""; }; - C6C3E1129526A353B963EFD7 /* Dog.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Dog.swift; sourceTree = ""; }; - C81447828475F76C5CF4F08A /* Return.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Return.swift; sourceTree = ""; }; - E5565A447062C7B8F695F451 /* User.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = User.swift; sourceTree = ""; }; - EBC76F6D4D2AA8084B7EB50E /* TypeHolderDefault.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TypeHolderDefault.swift; sourceTree = ""; }; - ECFEB4C6C257B3BB3CEA36D1 /* Pet.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Pet.swift; sourceTree = ""; }; - F1A0379CDFC55705AE76C998 /* ArrayTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArrayTest.swift; sourceTree = ""; }; - F4E0AD8F60A91F72C7687560 /* OuterComposite.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OuterComposite.swift; sourceTree = ""; }; - FD60AEA646791E0EDE885DE1 /* EnumTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EnumTest.swift; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - D1990C2A394CCF025EF98A2F /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 418DB36F23C53C6E2C3CDE39 /* Alamofire.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 1E464C0937FE0D3A7A0FE29A /* Frameworks */ = { - isa = PBXGroup; - children = ( - 7861EE241895128F64DD7873 /* Carthage */, - ); - name = Frameworks; - sourceTree = ""; - }; - 4FBDCF1330A9AB9122780DB3 /* Models */ = { - isa = PBXGroup; - children = ( - 396DEF3156BA0D12D0FC5C3C /* AdditionalPropertiesClass.swift */, - 95568E7C35F119EB4A12B498 /* Animal.swift */, - 8D22BE01748F51106DE02332 /* AnimalFarm.swift */, - A8E7B833748B4F0C7CDA90C6 /* ApiResponse.swift */, - 7B1B8B838B5D9D312F2002EB /* ArrayOfArrayOfNumberOnly.swift */, - B65BB72353DA24536A9049BE /* ArrayOfNumberOnly.swift */, - F1A0379CDFC55705AE76C998 /* ArrayTest.swift */, - A7B38FA00A494D13F4C382A3 /* Capitalization.swift */, - 212AA914B7F1793A4E32C119 /* Cat.swift */, - 3AD0F94F512DFBC09F9CC79A /* CatAllOf.swift */, - 6F2985D01F8D60A4B1925C69 /* Category.swift */, - 3C30827D8EAF8EA684E7BCEA /* ClassModel.swift */, - A913A57E72D723632E9A718F /* Client.swift */, - C6C3E1129526A353B963EFD7 /* Dog.swift */, - A21A69C8402A60E01116ABBD /* DogAllOf.swift */, - 10503995D9EFD031A2EFB576 /* EnumArrays.swift */, - 4B2C97AE6ACA1E5FB88F5BAA /* EnumClass.swift */, - FD60AEA646791E0EDE885DE1 /* EnumTest.swift */, - 3933D3B2A3AC4577094D0C23 /* File.swift */, - 4B3666552AA854DAF9C480A3 /* FileSchemaTestClass.swift */, - 3156CE41C001C80379B84BDB /* FormatTest.swift */, - 4C7FBC641752D2E13B150973 /* HasOnlyReadOnly.swift */, - 7A6070F581E611FF44AFD40A /* List.swift */, - 7986861626C2B1CB49AD7000 /* MapTest.swift */, - 9AD714C7CC59BDD18DE8DF4E /* MixedPropertiesAndAdditionalPropertiesClass.swift */, - 82A2C3DC2235F0114C2B08E5 /* Model200Response.swift */, - 5AD994DFAA0DA93C188A4DBA /* Name.swift */, - B8E0B16084741FCB82389F58 /* NumberOnly.swift */, - 27B2E9EF856E89FEAA359A3A /* Order.swift */, - F4E0AD8F60A91F72C7687560 /* OuterComposite.swift */, - C15008AABC804EB6FB4CDAC6 /* OuterEnum.swift */, - ECFEB4C6C257B3BB3CEA36D1 /* Pet.swift */, - 6FD42727E001E799E458C292 /* ReadOnlyFirst.swift */, - C81447828475F76C5CF4F08A /* Return.swift */, - 386FD590658E90509C121118 /* SpecialModelName.swift */, - 47B4DEBABEFE140768CFB70B /* StringBooleanMap.swift */, - B2896F8BFD1AA2965C8A3015 /* Tag.swift */, - EBC76F6D4D2AA8084B7EB50E /* TypeHolderDefault.swift */, - 19B65C66C97F082718DDD703 /* TypeHolderExample.swift */, - E5565A447062C7B8F695F451 /* User.swift */, - ); - path = Models; - sourceTree = ""; - }; - 5FBA6AE5F64CD737F88B4565 = { - isa = PBXGroup; - children = ( - 9B364C01750D7AA4F983B9E7 /* PetstoreClient */, - 1E464C0937FE0D3A7A0FE29A /* Frameworks */, - 857F0DEA1890CE66D6DAD556 /* Products */, - ); - sourceTree = ""; - }; - 67BF3478113E6B4DF1C4E04F /* OpenAPIs */ = { - isa = PBXGroup; - children = ( - 84A201508DF2B697D65F2631 /* AlamofireImplementations.swift */, - 897716962D472FE162B723CB /* APIHelper.swift */, - 37DF825B8F3BADA2B2537D17 /* APIs.swift */, - 02A6F6BB2152ACEE1416D44A /* CodableHelper.swift */, - 28A444949BBC254798C3B3DD /* Configuration.swift */, - B8C298FC8929DCB369053F11 /* Extensions.swift */, - 9791B840B8D6EAA35343B00F /* JSONEncodableEncoding.swift */, - 35D710108A69DD8A5297F926 /* JSONEncodingHelper.swift */, - 8699F7966F748ED026A6FB4C /* Models.swift */, - 099A5E845AF5E1409204325B /* Result.swift */, - F956D0CCAE23BCFD1C7BDD5D /* APIs */, - 4FBDCF1330A9AB9122780DB3 /* Models */, - ); - path = OpenAPIs; - sourceTree = ""; - }; - 7861EE241895128F64DD7873 /* Carthage */ = { - isa = PBXGroup; - children = ( - A012205B41CB71A62B86EECD /* iOS */, - ); - name = Carthage; - path = Carthage/Build; - sourceTree = ""; - }; - 857F0DEA1890CE66D6DAD556 /* Products */ = { - isa = PBXGroup; - children = ( - 164AD6EC9C4CCF634D7C4590 /* PetstoreClient.framework */, - ); - name = Products; - sourceTree = ""; - }; - 9B364C01750D7AA4F983B9E7 /* PetstoreClient */ = { - isa = PBXGroup; - children = ( - EF4C81BDD734856ED5023B77 /* Classes */, - ); - path = PetstoreClient; - sourceTree = ""; - }; - A012205B41CB71A62B86EECD /* iOS */ = { - isa = PBXGroup; - children = ( - A235FA3FDFB086CC69CDE83D /* Alamofire.framework */, - ); - path = iOS; - sourceTree = ""; - }; - EF4C81BDD734856ED5023B77 /* Classes */ = { - isa = PBXGroup; - children = ( - 67BF3478113E6B4DF1C4E04F /* OpenAPIs */, - ); - path = Classes; - sourceTree = ""; - }; - F956D0CCAE23BCFD1C7BDD5D /* APIs */ = { - isa = PBXGroup; - children = ( - 9DF24D2714B9C4CF14146E88 /* AnotherFakeAPI.swift */, - 6E00950725DC44436C5E238C /* FakeAPI.swift */, - B42354B407EC173BEB54E042 /* FakeClassnameTags123API.swift */, - 9A019F500E546A3292CE716A /* PetAPI.swift */, - A53274D99BBDE1B79BF3521C /* StoreAPI.swift */, - 7C8D5F382979854D47F18DB1 /* UserAPI.swift */, - ); - path = APIs; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - C1282C2230015E0D204BEAED /* PetstoreClient */ = { - isa = PBXNativeTarget; - buildConfigurationList = B46EDEB1A7F0D78FE6394544 /* Build configuration list for PBXNativeTarget "PetstoreClient" */; - buildPhases = ( - E539708354CE60FE486F81ED /* Sources */, - D1990C2A394CCF025EF98A2F /* Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = PetstoreClient; - productName = PetstoreClient; - productReference = 164AD6EC9C4CCF634D7C4590 /* PetstoreClient.framework */; - productType = "com.apple.product-type.framework"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - E7D276EE2369D8C455513C2E /* Project object */ = { - isa = PBXProject; - attributes = { - LastUpgradeCheck = 1020; - }; - buildConfigurationList = ECAB17FF35111B5E14DAAC08 /* Build configuration list for PBXProject "PetstoreClient" */; - compatibilityVersion = "Xcode 10.0"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - Base, - en, - ); - mainGroup = 5FBA6AE5F64CD737F88B4565; - projectDirPath = ""; - projectRoot = ""; - targets = ( - C1282C2230015E0D204BEAED /* PetstoreClient */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXSourcesBuildPhase section */ - E539708354CE60FE486F81ED /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 1E6C7C7F271A802DF8099330 /* APIHelper.swift in Sources */, - 40E3027D2E38D8329C6AB01F /* APIs.swift in Sources */, - 248F2F0F29E8FDAE9CAD64C5 /* AdditionalPropertiesClass.swift in Sources */, - 40E46046D2B16D1A672A08E3 /* AlamofireImplementations.swift in Sources */, - 2B441CDFFFDDB343C04F5375 /* Animal.swift in Sources */, - 45B3B29D7A62049F824751F8 /* AnimalFarm.swift in Sources */, - CA9B9B19882EA044EAD0B359 /* AnotherFakeAPI.swift in Sources */, - 0299339D13C3571C4C57368A /* ApiResponse.swift in Sources */, - 4B4BE77747413A9188CDABD2 /* ArrayOfArrayOfNumberOnly.swift in Sources */, - 3691B017D3AA18404A563C67 /* ArrayOfNumberOnly.swift in Sources */, - A85E190556818FFA79896E92 /* ArrayTest.swift in Sources */, - BB1F3C6D50B8F0A8CC4F1749 /* Capitalization.swift in Sources */, - D95A5F83AAA7D5C95A29AB83 /* Cat.swift in Sources */, - 4A344DF7ECE721B4BBEDCB4A /* CatAllOf.swift in Sources */, - E8A58C6414E88AF3EAE45B69 /* Category.swift in Sources */, - 7441BBA84C31E06400338F89 /* ClassModel.swift in Sources */, - AD594BFB99E31A5E07579237 /* Client.swift in Sources */, - 6FBD978F4D1ED92E7071FFBB /* CodableHelper.swift in Sources */, - 72547ECFB451A509409311EE /* Configuration.swift in Sources */, - 0C1E4C682F2D0AF7D9E431EE /* Dog.swift in Sources */, - 72CE544C52BB33778D1B89B8 /* DogAllOf.swift in Sources */, - 61322FC4325F1A4FF24ACA48 /* EnumArrays.swift in Sources */, - ACF3037926301D4D6E848745 /* EnumClass.swift in Sources */, - 9DA1C6F8B4D6C8595F28C098 /* EnumTest.swift in Sources */, - 269E3103C458C78EA5726EE2 /* Extensions.swift in Sources */, - DDBD4C0FBA3CD6A4DA3DF376 /* FakeAPI.swift in Sources */, - 34C26979F4678B5B579D26E8 /* FakeClassnameTags123API.swift in Sources */, - 97F7B85BF07A325EEBF92C93 /* File.swift in Sources */, - DDF1D589267D56D9BED3C6E5 /* FileSchemaTestClass.swift in Sources */, - 6B638A04B34C82B2091D6EDD /* FormatTest.swift in Sources */, - 86DE714469BE8BA28AFF710F /* HasOnlyReadOnly.swift in Sources */, - 22FA6CA58E58550DE36AE750 /* JSONEncodableEncoding.swift in Sources */, - 7588B7E2960253174ADCCF16 /* JSONEncodingHelper.swift in Sources */, - 9CA19AA4483F6EB50270A81E /* List.swift in Sources */, - 081C0B80A989B1AAF2665121 /* MapTest.swift in Sources */, - B301DB1B80F37C757550AA17 /* MixedPropertiesAndAdditionalPropertiesClass.swift in Sources */, - 9CF06ACDA32CB0C3E74E435C /* Model200Response.swift in Sources */, - D3BAB7C7A607392CA838C580 /* Models.swift in Sources */, - 37DEADD6CD0496690725B8A7 /* Name.swift in Sources */, - 555DEA47352B42E49082922B /* NumberOnly.swift in Sources */, - 0E6932F1C55BA6880693C478 /* Order.swift in Sources */, - 922BDADAB291907A7FD14314 /* OuterComposite.swift in Sources */, - 41A491E9B577C510F927D126 /* OuterEnum.swift in Sources */, - 2C29D5B60E00DDA3878F1BDE /* Pet.swift in Sources */, - A6E5A5629495DB0ED672B06F /* PetAPI.swift in Sources */, - 914F4D1FCB17773C067C4E68 /* ReadOnlyFirst.swift in Sources */, - 913B0BA470D8357FF8A2FFD3 /* Result.swift in Sources */, - A6E50CC6845FE58D8C236253 /* Return.swift in Sources */, - 294CDFA409BC369C0FDC5FB3 /* SpecialModelName.swift in Sources */, - CB68ABDBAADAF6B8D7B93A5D /* StoreAPI.swift in Sources */, - EDFC6C5121A43997014049CB /* StringBooleanMap.swift in Sources */, - B3E35FE2773D4A8BA15CFA88 /* Tag.swift in Sources */, - 5695497F5DBF6C08842755A3 /* TypeHolderDefault.swift in Sources */, - FECA2E8C9D0BDFEC459E8996 /* TypeHolderExample.swift in Sources */, - 31DFF71D8CCCA0D2D2F8AC90 /* User.swift in Sources */, - 64C48E3658CF53EBE8AF82F9 /* UserAPI.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin XCBuildConfiguration section */ - 3B2C02AFB91CB5C82766ED5C /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - APPLICATION_EXTENSION_API_ONLY = YES; - CODE_SIGN_IDENTITY = ""; - CURRENT_PROJECT_VERSION = 1; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Carthage/Build/iOS", - ); - INFOPLIST_FILE = Info.plist; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Release; - }; - A9EB0A02B94C427CBACFEC7C /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "$(inherited)", - "DEBUG=1", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = iphoneos; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 5.0; - }; - name = Debug; - }; - DD3EEB93949E9EBA4437E9CD /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - APPLICATION_EXTENSION_API_ONLY = YES; - CODE_SIGN_IDENTITY = ""; - CURRENT_PROJECT_VERSION = 1; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Carthage/Build/iOS", - ); - INFOPLIST_FILE = Info.plist; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Debug; - }; - F81D4E5FECD46E9AA6DD2C29 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = iphoneos; - SWIFT_COMPILATION_MODE = wholemodule; - SWIFT_VERSION = 5.0; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - B46EDEB1A7F0D78FE6394544 /* Build configuration list for PBXNativeTarget "PetstoreClient" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - DD3EEB93949E9EBA4437E9CD /* Debug */, - 3B2C02AFB91CB5C82766ED5C /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = ""; - }; - ECAB17FF35111B5E14DAAC08 /* Build configuration list for PBXProject "PetstoreClient" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - A9EB0A02B94C427CBACFEC7C /* Debug */, - F81D4E5FECD46E9AA6DD2C29 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Debug; - }; -/* End XCConfigurationList section */ - }; - rootObject = E7D276EE2369D8C455513C2E /* Project object */; -} diff --git a/samples/client/petstore/swift4/resultLibrary/PetstoreClient.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/samples/client/petstore/swift4/resultLibrary/PetstoreClient.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 919434a6254f..000000000000 --- a/samples/client/petstore/swift4/resultLibrary/PetstoreClient.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/samples/client/petstore/swift4/resultLibrary/PetstoreClient.xcodeproj/xcshareddata/xcschemes/PetstoreClient.xcscheme b/samples/client/petstore/swift4/resultLibrary/PetstoreClient.xcodeproj/xcshareddata/xcschemes/PetstoreClient.xcscheme deleted file mode 100644 index 26d510552bb0..000000000000 --- a/samples/client/petstore/swift4/resultLibrary/PetstoreClient.xcodeproj/xcshareddata/xcschemes/PetstoreClient.xcscheme +++ /dev/null @@ -1,99 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIHelper.swift b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIHelper.swift deleted file mode 100644 index 200070096800..000000000000 --- a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIHelper.swift +++ /dev/null @@ -1,70 +0,0 @@ -// APIHelper.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct APIHelper { - public static func rejectNil(_ source: [String: Any?]) -> [String: Any]? { - let destination = source.reduce(into: [String: Any]()) { (result, item) in - if let value = item.value { - result[item.key] = value - } - } - - if destination.isEmpty { - return nil - } - return destination - } - - public static func rejectNilHeaders(_ source: [String: Any?]) -> [String: String] { - return source.reduce(into: [String: String]()) { (result, item) in - if let collection = item.value as? [Any?] { - result[item.key] = collection.filter({ $0 != nil }).map { "\($0!)" }.joined(separator: ",") - } else if let value: Any = item.value { - result[item.key] = "\(value)" - } - } - } - - public static func convertBoolToString(_ source: [String: Any]?) -> [String: Any]? { - guard let source = source else { - return nil - } - - return source.reduce(into: [String: Any](), { (result, item) in - switch item.value { - case let x as Bool: - result[item.key] = x.description - default: - result[item.key] = item.value - } - }) - } - - public static func mapValueToPathItem(_ source: Any) -> Any { - if let collection = source as? [Any?] { - return collection.filter({ $0 != nil }).map({"\($0!)"}).joined(separator: ",") - } - return source - } - - public static func mapValuesToQueryItems(_ source: [String: Any?]) -> [URLQueryItem]? { - let destination = source.filter({ $0.value != nil}).reduce(into: [URLQueryItem]()) { (result, item) in - if let collection = item.value as? [Any?] { - let value = collection.filter({ $0 != nil }).map({"\($0!)"}).joined(separator: ",") - result.append(URLQueryItem(name: item.key, value: value)) - } else if let value = item.value { - result.append(URLQueryItem(name: item.key, value: "\(value)")) - } - } - - if destination.isEmpty { - return nil - } - return destination - } -} diff --git a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs.swift b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs.swift deleted file mode 100644 index 832282d224f8..000000000000 --- a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs.swift +++ /dev/null @@ -1,62 +0,0 @@ -// APIs.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -open class PetstoreClientAPI { - public static var basePath = "http://petstore.swagger.io:80/v2" - public static var credential: URLCredential? - public static var customHeaders: [String: String] = [:] - public static var requestBuilderFactory: RequestBuilderFactory = AlamofireRequestBuilderFactory() - public static var apiResponseQueue: DispatchQueue = .main -} - -open class RequestBuilder { - var credential: URLCredential? - var headers: [String: String] - public let parameters: [String: Any]? - public let isBody: Bool - public let method: String - public let URLString: String - - /// Optional block to obtain a reference to the request's progress instance when available. - public var onProgressReady: ((Progress) -> Void)? - - required public init(method: String, URLString: String, parameters: [String: Any]?, isBody: Bool, headers: [String: String] = [:]) { - self.method = method - self.URLString = URLString - self.parameters = parameters - self.isBody = isBody - self.headers = headers - - addHeaders(PetstoreClientAPI.customHeaders) - } - - open func addHeaders(_ aHeaders: [String: String]) { - for (header, value) in aHeaders { - headers[header] = value - } - } - - open func execute(_ completion: @escaping (_ response: Response?, _ error: Error?) -> Void) { } - - public func addHeader(name: String, value: String) -> Self { - if !value.isEmpty { - headers[name] = value - } - return self - } - - open func addCredential() -> Self { - self.credential = PetstoreClientAPI.credential - return self - } -} - -public protocol RequestBuilderFactory { - func getNonDecodableBuilder() -> RequestBuilder.Type - func getBuilder() -> RequestBuilder.Type -} diff --git a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift deleted file mode 100644 index fb4bb8cfdb43..000000000000 --- a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift +++ /dev/null @@ -1,59 +0,0 @@ -// -// AnotherFakeAPI.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -open class AnotherFakeAPI { - /** - To test special tags - - - parameter body: (body) client model - - parameter completion: completion handler to receive the data and the error objects - */ - open class func call123testSpecialTags(body: Client, completion: @escaping ((_ data: Client?, _ error: Error?) -> Void)) { - call123testSpecialTagsWithRequestBuilder(body: body).execute { (response, error) -> Void in - completion(response?.body, error) - } - } - /** - To test special tags - - - parameter body: (body) client model - - parameter completion: completion handler to receive the result - */ - open class func call123testSpecialTags(body: Client, completion: @escaping ((_ result: Result) -> Void)) { - call123testSpecialTagsWithRequestBuilder(body: body).execute { (response, error) -> Void in - if let error = error { - completion(.failure(error)) - } else if let response = response { - completion(.success(response.body!)) - } else { - fatalError() - } - } - } - - /** - To test special tags - - PATCH /another-fake/dummy - - To test special tags and operation ID starting with number - - parameter body: (body) client model - - returns: RequestBuilder - */ - open class func call123testSpecialTagsWithRequestBuilder(body: Client) -> RequestBuilder { - let path = "/another-fake/dummy" - let URLString = PetstoreClientAPI.basePath + path - let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "PATCH", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) - } - -} diff --git a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift deleted file mode 100644 index 341e23d3685b..000000000000 --- a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift +++ /dev/null @@ -1,786 +0,0 @@ -// -// FakeAPI.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -open class FakeAPI { - /** - - - parameter body: (body) Input boolean as post body (optional) - - parameter completion: completion handler to receive the data and the error objects - */ - open class func fakeOuterBooleanSerialize(body: Bool? = nil, completion: @escaping ((_ data: Bool?, _ error: Error?) -> Void)) { - fakeOuterBooleanSerializeWithRequestBuilder(body: body).execute { (response, error) -> Void in - completion(response?.body, error) - } - } - /** - - - parameter body: (body) Input boolean as post body (optional) - - parameter completion: completion handler to receive the result - */ - open class func fakeOuterBooleanSerialize(body: Bool? = nil, completion: @escaping ((_ result: Result) -> Void)) { - fakeOuterBooleanSerializeWithRequestBuilder(body: body).execute { (response, error) -> Void in - if let error = error { - completion(.failure(error)) - } else if let response = response { - completion(.success(response.body!)) - } else { - fatalError() - } - } - } - - /** - - POST /fake/outer/boolean - - Test serialization of outer boolean types - - parameter body: (body) Input boolean as post body (optional) - - returns: RequestBuilder - */ - open class func fakeOuterBooleanSerializeWithRequestBuilder(body: Bool? = nil) -> RequestBuilder { - let path = "/fake/outer/boolean" - let URLString = PetstoreClientAPI.basePath + path - let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) - } - - /** - - - parameter body: (body) Input composite as post body (optional) - - parameter completion: completion handler to receive the data and the error objects - */ - open class func fakeOuterCompositeSerialize(body: OuterComposite? = nil, completion: @escaping ((_ data: OuterComposite?, _ error: Error?) -> Void)) { - fakeOuterCompositeSerializeWithRequestBuilder(body: body).execute { (response, error) -> Void in - completion(response?.body, error) - } - } - /** - - - parameter body: (body) Input composite as post body (optional) - - parameter completion: completion handler to receive the result - */ - open class func fakeOuterCompositeSerialize(body: OuterComposite? = nil, completion: @escaping ((_ result: Result) -> Void)) { - fakeOuterCompositeSerializeWithRequestBuilder(body: body).execute { (response, error) -> Void in - if let error = error { - completion(.failure(error)) - } else if let response = response { - completion(.success(response.body!)) - } else { - fatalError() - } - } - } - - /** - - POST /fake/outer/composite - - Test serialization of object with outer number type - - parameter body: (body) Input composite as post body (optional) - - returns: RequestBuilder - */ - open class func fakeOuterCompositeSerializeWithRequestBuilder(body: OuterComposite? = nil) -> RequestBuilder { - let path = "/fake/outer/composite" - let URLString = PetstoreClientAPI.basePath + path - let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) - } - - /** - - - parameter body: (body) Input number as post body (optional) - - parameter completion: completion handler to receive the data and the error objects - */ - open class func fakeOuterNumberSerialize(body: Double? = nil, completion: @escaping ((_ data: Double?, _ error: Error?) -> Void)) { - fakeOuterNumberSerializeWithRequestBuilder(body: body).execute { (response, error) -> Void in - completion(response?.body, error) - } - } - /** - - - parameter body: (body) Input number as post body (optional) - - parameter completion: completion handler to receive the result - */ - open class func fakeOuterNumberSerialize(body: Double? = nil, completion: @escaping ((_ result: Result) -> Void)) { - fakeOuterNumberSerializeWithRequestBuilder(body: body).execute { (response, error) -> Void in - if let error = error { - completion(.failure(error)) - } else if let response = response { - completion(.success(response.body!)) - } else { - fatalError() - } - } - } - - /** - - POST /fake/outer/number - - Test serialization of outer number types - - parameter body: (body) Input number as post body (optional) - - returns: RequestBuilder - */ - open class func fakeOuterNumberSerializeWithRequestBuilder(body: Double? = nil) -> RequestBuilder { - let path = "/fake/outer/number" - let URLString = PetstoreClientAPI.basePath + path - let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) - } - - /** - - - parameter body: (body) Input string as post body (optional) - - parameter completion: completion handler to receive the data and the error objects - */ - open class func fakeOuterStringSerialize(body: String? = nil, completion: @escaping ((_ data: String?, _ error: Error?) -> Void)) { - fakeOuterStringSerializeWithRequestBuilder(body: body).execute { (response, error) -> Void in - completion(response?.body, error) - } - } - /** - - - parameter body: (body) Input string as post body (optional) - - parameter completion: completion handler to receive the result - */ - open class func fakeOuterStringSerialize(body: String? = nil, completion: @escaping ((_ result: Result) -> Void)) { - fakeOuterStringSerializeWithRequestBuilder(body: body).execute { (response, error) -> Void in - if let error = error { - completion(.failure(error)) - } else if let response = response { - completion(.success(response.body!)) - } else { - fatalError() - } - } - } - - /** - - POST /fake/outer/string - - Test serialization of outer string types - - parameter body: (body) Input string as post body (optional) - - returns: RequestBuilder - */ - open class func fakeOuterStringSerializeWithRequestBuilder(body: String? = nil) -> RequestBuilder { - let path = "/fake/outer/string" - let URLString = PetstoreClientAPI.basePath + path - let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) - } - - /** - - - parameter body: (body) - - parameter completion: completion handler to receive the data and the error objects - */ - open class func testBodyWithFileSchema(body: FileSchemaTestClass, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - testBodyWithFileSchemaWithRequestBuilder(body: body).execute { (_, error) -> Void in - if error == nil { - completion((), error) - } else { - completion(nil, error) - } - } - } - /** - - - parameter body: (body) - - parameter completion: completion handler to receive the result - */ - open class func testBodyWithFileSchema(body: FileSchemaTestClass, completion: @escaping ((_ result: Result) -> Void)) { - testBodyWithFileSchemaWithRequestBuilder(body: body).execute { (_, error) -> Void in - if let error = error { - completion(.failure(error)) - } else { - completion(.success(())) - } - } - } - - /** - - PUT /fake/body-with-file-schema - - For this test, the body for this request much reference a schema named `File`. - - parameter body: (body) - - returns: RequestBuilder - */ - open class func testBodyWithFileSchemaWithRequestBuilder(body: FileSchemaTestClass) -> RequestBuilder { - let path = "/fake/body-with-file-schema" - let URLString = PetstoreClientAPI.basePath + path - let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) - } - - /** - - - parameter query: (query) - - parameter body: (body) - - parameter completion: completion handler to receive the data and the error objects - */ - open class func testBodyWithQueryParams(query: String, body: User, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - testBodyWithQueryParamsWithRequestBuilder(query: query, body: body).execute { (_, error) -> Void in - if error == nil { - completion((), error) - } else { - completion(nil, error) - } - } - } - /** - - - parameter query: (query) - - parameter body: (body) - - parameter completion: completion handler to receive the result - */ - open class func testBodyWithQueryParams(query: String, body: User, completion: @escaping ((_ result: Result) -> Void)) { - testBodyWithQueryParamsWithRequestBuilder(query: query, body: body).execute { (_, error) -> Void in - if let error = error { - completion(.failure(error)) - } else { - completion(.success(())) - } - } - } - - /** - - PUT /fake/body-with-query-params - - parameter query: (query) - - parameter body: (body) - - returns: RequestBuilder - */ - open class func testBodyWithQueryParamsWithRequestBuilder(query: String, body: User) -> RequestBuilder { - let path = "/fake/body-with-query-params" - let URLString = PetstoreClientAPI.basePath + path - let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) - - var url = URLComponents(string: URLString) - url?.queryItems = APIHelper.mapValuesToQueryItems([ - "query": query.encodeToJSON() - ]) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) - } - - /** - To test \"client\" model - - - parameter body: (body) client model - - parameter completion: completion handler to receive the data and the error objects - */ - open class func testClientModel(body: Client, completion: @escaping ((_ data: Client?, _ error: Error?) -> Void)) { - testClientModelWithRequestBuilder(body: body).execute { (response, error) -> Void in - completion(response?.body, error) - } - } - /** - To test \"client\" model - - - parameter body: (body) client model - - parameter completion: completion handler to receive the result - */ - open class func testClientModel(body: Client, completion: @escaping ((_ result: Result) -> Void)) { - testClientModelWithRequestBuilder(body: body).execute { (response, error) -> Void in - if let error = error { - completion(.failure(error)) - } else if let response = response { - completion(.success(response.body!)) - } else { - fatalError() - } - } - } - - /** - To test \"client\" model - - PATCH /fake - - To test \"client\" model - - parameter body: (body) client model - - returns: RequestBuilder - */ - open class func testClientModelWithRequestBuilder(body: Client) -> RequestBuilder { - let path = "/fake" - let URLString = PetstoreClientAPI.basePath + path - let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "PATCH", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) - } - - /** - Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - - - parameter number: (form) None - - parameter double: (form) None - - parameter patternWithoutDelimiter: (form) None - - parameter byte: (form) None - - parameter integer: (form) None (optional) - - parameter int32: (form) None (optional) - - parameter int64: (form) None (optional) - - parameter float: (form) None (optional) - - parameter string: (form) None (optional) - - parameter binary: (form) None (optional) - - parameter date: (form) None (optional) - - parameter dateTime: (form) None (optional) - - parameter password: (form) None (optional) - - parameter callback: (form) None (optional) - - parameter completion: completion handler to receive the data and the error objects - */ - open class func testEndpointParameters(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - testEndpointParametersWithRequestBuilder(number: number, double: double, patternWithoutDelimiter: patternWithoutDelimiter, byte: byte, integer: integer, int32: int32, int64: int64, float: float, string: string, binary: binary, date: date, dateTime: dateTime, password: password, callback: callback).execute { (_, error) -> Void in - if error == nil { - completion((), error) - } else { - completion(nil, error) - } - } - } - /** - Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - - - parameter number: (form) None - - parameter double: (form) None - - parameter patternWithoutDelimiter: (form) None - - parameter byte: (form) None - - parameter integer: (form) None (optional) - - parameter int32: (form) None (optional) - - parameter int64: (form) None (optional) - - parameter float: (form) None (optional) - - parameter string: (form) None (optional) - - parameter binary: (form) None (optional) - - parameter date: (form) None (optional) - - parameter dateTime: (form) None (optional) - - parameter password: (form) None (optional) - - parameter callback: (form) None (optional) - - parameter completion: completion handler to receive the result - */ - open class func testEndpointParameters(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil, completion: @escaping ((_ result: Result) -> Void)) { - testEndpointParametersWithRequestBuilder(number: number, double: double, patternWithoutDelimiter: patternWithoutDelimiter, byte: byte, integer: integer, int32: int32, int64: int64, float: float, string: string, binary: binary, date: date, dateTime: dateTime, password: password, callback: callback).execute { (_, error) -> Void in - if let error = error { - completion(.failure(error)) - } else { - completion(.success(())) - } - } - } - - /** - Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - - POST /fake - - Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - - BASIC: - - type: http - - name: http_basic_test - - parameter number: (form) None - - parameter double: (form) None - - parameter patternWithoutDelimiter: (form) None - - parameter byte: (form) None - - parameter integer: (form) None (optional) - - parameter int32: (form) None (optional) - - parameter int64: (form) None (optional) - - parameter float: (form) None (optional) - - parameter string: (form) None (optional) - - parameter binary: (form) None (optional) - - parameter date: (form) None (optional) - - parameter dateTime: (form) None (optional) - - parameter password: (form) None (optional) - - parameter callback: (form) None (optional) - - returns: RequestBuilder - */ - open class func testEndpointParametersWithRequestBuilder(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil) -> RequestBuilder { - let path = "/fake" - let URLString = PetstoreClientAPI.basePath + path - let formParams: [String: Any?] = [ - "integer": integer?.encodeToJSON(), - "int32": int32?.encodeToJSON(), - "int64": int64?.encodeToJSON(), - "number": number.encodeToJSON(), - "float": float?.encodeToJSON(), - "double": double.encodeToJSON(), - "string": string?.encodeToJSON(), - "pattern_without_delimiter": patternWithoutDelimiter.encodeToJSON(), - "byte": byte.encodeToJSON(), - "binary": binary?.encodeToJSON(), - "date": date?.encodeToJSON(), - "dateTime": dateTime?.encodeToJSON(), - "password": password?.encodeToJSON(), - "callback": callback?.encodeToJSON() - ] - - let nonNullParameters = APIHelper.rejectNil(formParams) - let parameters = APIHelper.convertBoolToString(nonNullParameters) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } - - /** - * enum for parameter enumHeaderStringArray - */ - public enum EnumHeaderStringArray_testEnumParameters: String { - case greaterThan = ">" - case dollar = "$" - } - - /** - * enum for parameter enumHeaderString - */ - public enum EnumHeaderString_testEnumParameters: String { - case abc = "_abc" - case efg = "-efg" - case xyz = "(xyz)" - } - - /** - * enum for parameter enumQueryStringArray - */ - public enum EnumQueryStringArray_testEnumParameters: String { - case greaterThan = ">" - case dollar = "$" - } - - /** - * enum for parameter enumQueryString - */ - public enum EnumQueryString_testEnumParameters: String { - case abc = "_abc" - case efg = "-efg" - case xyz = "(xyz)" - } - - /** - * enum for parameter enumQueryInteger - */ - public enum EnumQueryInteger_testEnumParameters: Int { - case _1 = 1 - case number2 = -2 - } - - /** - * enum for parameter enumQueryDouble - */ - public enum EnumQueryDouble_testEnumParameters: Double { - case _11 = 1.1 - case number12 = -1.2 - } - - /** - * enum for parameter enumFormStringArray - */ - public enum EnumFormStringArray_testEnumParameters: String { - case greaterThan = ">" - case dollar = "$" - } - - /** - * enum for parameter enumFormString - */ - public enum EnumFormString_testEnumParameters: String { - case abc = "_abc" - case efg = "-efg" - case xyz = "(xyz)" - } - - /** - To test enum parameters - - - parameter enumHeaderStringArray: (header) Header parameter enum test (string array) (optional) - - parameter enumHeaderString: (header) Header parameter enum test (string) (optional, default to .efg) - - parameter enumQueryStringArray: (query) Query parameter enum test (string array) (optional) - - parameter enumQueryString: (query) Query parameter enum test (string) (optional, default to .efg) - - parameter enumQueryInteger: (query) Query parameter enum test (double) (optional) - - parameter enumQueryDouble: (query) Query parameter enum test (double) (optional) - - parameter enumFormStringArray: (form) Form parameter enum test (string array) (optional, default to .dollar) - - parameter enumFormString: (form) Form parameter enum test (string) (optional, default to .efg) - - parameter completion: completion handler to receive the data and the error objects - */ - open class func testEnumParameters(enumHeaderStringArray: [String]? = nil, enumHeaderString: EnumHeaderString_testEnumParameters? = nil, enumQueryStringArray: [String]? = nil, enumQueryString: EnumQueryString_testEnumParameters? = nil, enumQueryInteger: EnumQueryInteger_testEnumParameters? = nil, enumQueryDouble: EnumQueryDouble_testEnumParameters? = nil, enumFormStringArray: [String]? = nil, enumFormString: EnumFormString_testEnumParameters? = nil, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - testEnumParametersWithRequestBuilder(enumHeaderStringArray: enumHeaderStringArray, enumHeaderString: enumHeaderString, enumQueryStringArray: enumQueryStringArray, enumQueryString: enumQueryString, enumQueryInteger: enumQueryInteger, enumQueryDouble: enumQueryDouble, enumFormStringArray: enumFormStringArray, enumFormString: enumFormString).execute { (_, error) -> Void in - if error == nil { - completion((), error) - } else { - completion(nil, error) - } - } - } - /** - To test enum parameters - - - parameter enumHeaderStringArray: (header) Header parameter enum test (string array) (optional) - - parameter enumHeaderString: (header) Header parameter enum test (string) (optional, default to .efg) - - parameter enumQueryStringArray: (query) Query parameter enum test (string array) (optional) - - parameter enumQueryString: (query) Query parameter enum test (string) (optional, default to .efg) - - parameter enumQueryInteger: (query) Query parameter enum test (double) (optional) - - parameter enumQueryDouble: (query) Query parameter enum test (double) (optional) - - parameter enumFormStringArray: (form) Form parameter enum test (string array) (optional, default to .dollar) - - parameter enumFormString: (form) Form parameter enum test (string) (optional, default to .efg) - - parameter completion: completion handler to receive the result - */ - open class func testEnumParameters(enumHeaderStringArray: [String]? = nil, enumHeaderString: EnumHeaderString_testEnumParameters? = nil, enumQueryStringArray: [String]? = nil, enumQueryString: EnumQueryString_testEnumParameters? = nil, enumQueryInteger: EnumQueryInteger_testEnumParameters? = nil, enumQueryDouble: EnumQueryDouble_testEnumParameters? = nil, enumFormStringArray: [String]? = nil, enumFormString: EnumFormString_testEnumParameters? = nil, completion: @escaping ((_ result: Result) -> Void)) { - testEnumParametersWithRequestBuilder(enumHeaderStringArray: enumHeaderStringArray, enumHeaderString: enumHeaderString, enumQueryStringArray: enumQueryStringArray, enumQueryString: enumQueryString, enumQueryInteger: enumQueryInteger, enumQueryDouble: enumQueryDouble, enumFormStringArray: enumFormStringArray, enumFormString: enumFormString).execute { (_, error) -> Void in - if let error = error { - completion(.failure(error)) - } else { - completion(.success(())) - } - } - } - - /** - To test enum parameters - - GET /fake - - To test enum parameters - - parameter enumHeaderStringArray: (header) Header parameter enum test (string array) (optional) - - parameter enumHeaderString: (header) Header parameter enum test (string) (optional, default to .efg) - - parameter enumQueryStringArray: (query) Query parameter enum test (string array) (optional) - - parameter enumQueryString: (query) Query parameter enum test (string) (optional, default to .efg) - - parameter enumQueryInteger: (query) Query parameter enum test (double) (optional) - - parameter enumQueryDouble: (query) Query parameter enum test (double) (optional) - - parameter enumFormStringArray: (form) Form parameter enum test (string array) (optional, default to .dollar) - - parameter enumFormString: (form) Form parameter enum test (string) (optional, default to .efg) - - returns: RequestBuilder - */ - open class func testEnumParametersWithRequestBuilder(enumHeaderStringArray: [String]? = nil, enumHeaderString: EnumHeaderString_testEnumParameters? = nil, enumQueryStringArray: [String]? = nil, enumQueryString: EnumQueryString_testEnumParameters? = nil, enumQueryInteger: EnumQueryInteger_testEnumParameters? = nil, enumQueryDouble: EnumQueryDouble_testEnumParameters? = nil, enumFormStringArray: [String]? = nil, enumFormString: EnumFormString_testEnumParameters? = nil) -> RequestBuilder { - let path = "/fake" - let URLString = PetstoreClientAPI.basePath + path - let formParams: [String: Any?] = [ - "enum_form_string_array": enumFormStringArray?.encodeToJSON(), - "enum_form_string": enumFormString?.encodeToJSON() - ] - - let nonNullParameters = APIHelper.rejectNil(formParams) - let parameters = APIHelper.convertBoolToString(nonNullParameters) - - var url = URLComponents(string: URLString) - url?.queryItems = APIHelper.mapValuesToQueryItems([ - "enum_query_string_array": enumQueryStringArray?.encodeToJSON(), - "enum_query_string": enumQueryString?.encodeToJSON(), - "enum_query_integer": enumQueryInteger?.encodeToJSON(), - "enum_query_double": enumQueryDouble?.encodeToJSON() - ]) - let nillableHeaders: [String: Any?] = [ - "enum_header_string_array": enumHeaderStringArray?.encodeToJSON(), - "enum_header_string": enumHeaderString?.encodeToJSON() - ] - let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false, headers: headerParameters) - } - - /** - Fake endpoint to test group parameters (optional) - - - parameter requiredStringGroup: (query) Required String in group parameters - - parameter requiredBooleanGroup: (header) Required Boolean in group parameters - - parameter requiredInt64Group: (query) Required Integer in group parameters - - parameter stringGroup: (query) String in group parameters (optional) - - parameter booleanGroup: (header) Boolean in group parameters (optional) - - parameter int64Group: (query) Integer in group parameters (optional) - - parameter completion: completion handler to receive the data and the error objects - */ - open class func testGroupParameters(requiredStringGroup: Int, requiredBooleanGroup: Bool, requiredInt64Group: Int64, stringGroup: Int? = nil, booleanGroup: Bool? = nil, int64Group: Int64? = nil, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - testGroupParametersWithRequestBuilder(requiredStringGroup: requiredStringGroup, requiredBooleanGroup: requiredBooleanGroup, requiredInt64Group: requiredInt64Group, stringGroup: stringGroup, booleanGroup: booleanGroup, int64Group: int64Group).execute { (_, error) -> Void in - if error == nil { - completion((), error) - } else { - completion(nil, error) - } - } - } - /** - Fake endpoint to test group parameters (optional) - - - parameter requiredStringGroup: (query) Required String in group parameters - - parameter requiredBooleanGroup: (header) Required Boolean in group parameters - - parameter requiredInt64Group: (query) Required Integer in group parameters - - parameter stringGroup: (query) String in group parameters (optional) - - parameter booleanGroup: (header) Boolean in group parameters (optional) - - parameter int64Group: (query) Integer in group parameters (optional) - - parameter completion: completion handler to receive the result - */ - open class func testGroupParameters(requiredStringGroup: Int, requiredBooleanGroup: Bool, requiredInt64Group: Int64, stringGroup: Int? = nil, booleanGroup: Bool? = nil, int64Group: Int64? = nil, completion: @escaping ((_ result: Result) -> Void)) { - testGroupParametersWithRequestBuilder(requiredStringGroup: requiredStringGroup, requiredBooleanGroup: requiredBooleanGroup, requiredInt64Group: requiredInt64Group, stringGroup: stringGroup, booleanGroup: booleanGroup, int64Group: int64Group).execute { (_, error) -> Void in - if let error = error { - completion(.failure(error)) - } else { - completion(.success(())) - } - } - } - - /** - Fake endpoint to test group parameters (optional) - - DELETE /fake - - Fake endpoint to test group parameters (optional) - - parameter requiredStringGroup: (query) Required String in group parameters - - parameter requiredBooleanGroup: (header) Required Boolean in group parameters - - parameter requiredInt64Group: (query) Required Integer in group parameters - - parameter stringGroup: (query) String in group parameters (optional) - - parameter booleanGroup: (header) Boolean in group parameters (optional) - - parameter int64Group: (query) Integer in group parameters (optional) - - returns: RequestBuilder - */ - open class func testGroupParametersWithRequestBuilder(requiredStringGroup: Int, requiredBooleanGroup: Bool, requiredInt64Group: Int64, stringGroup: Int? = nil, booleanGroup: Bool? = nil, int64Group: Int64? = nil) -> RequestBuilder { - let path = "/fake" - let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - - var url = URLComponents(string: URLString) - url?.queryItems = APIHelper.mapValuesToQueryItems([ - "required_string_group": requiredStringGroup.encodeToJSON(), - "required_int64_group": requiredInt64Group.encodeToJSON(), - "string_group": stringGroup?.encodeToJSON(), - "int64_group": int64Group?.encodeToJSON() - ]) - let nillableHeaders: [String: Any?] = [ - "required_boolean_group": requiredBooleanGroup.encodeToJSON(), - "boolean_group": booleanGroup?.encodeToJSON() - ] - let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false, headers: headerParameters) - } - - /** - test inline additionalProperties - - - parameter param: (body) request body - - parameter completion: completion handler to receive the data and the error objects - */ - open class func testInlineAdditionalProperties(param: [String: String], completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - testInlineAdditionalPropertiesWithRequestBuilder(param: param).execute { (_, error) -> Void in - if error == nil { - completion((), error) - } else { - completion(nil, error) - } - } - } - /** - test inline additionalProperties - - - parameter param: (body) request body - - parameter completion: completion handler to receive the result - */ - open class func testInlineAdditionalProperties(param: [String: String], completion: @escaping ((_ result: Result) -> Void)) { - testInlineAdditionalPropertiesWithRequestBuilder(param: param).execute { (_, error) -> Void in - if let error = error { - completion(.failure(error)) - } else { - completion(.success(())) - } - } - } - - /** - test inline additionalProperties - - POST /fake/inline-additionalProperties - - parameter param: (body) request body - - returns: RequestBuilder - */ - open class func testInlineAdditionalPropertiesWithRequestBuilder(param: [String: String]) -> RequestBuilder { - let path = "/fake/inline-additionalProperties" - let URLString = PetstoreClientAPI.basePath + path - let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: param) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) - } - - /** - test json serialization of form data - - - parameter param: (form) field1 - - parameter param2: (form) field2 - - parameter completion: completion handler to receive the data and the error objects - */ - open class func testJsonFormData(param: String, param2: String, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - testJsonFormDataWithRequestBuilder(param: param, param2: param2).execute { (_, error) -> Void in - if error == nil { - completion((), error) - } else { - completion(nil, error) - } - } - } - /** - test json serialization of form data - - - parameter param: (form) field1 - - parameter param2: (form) field2 - - parameter completion: completion handler to receive the result - */ - open class func testJsonFormData(param: String, param2: String, completion: @escaping ((_ result: Result) -> Void)) { - testJsonFormDataWithRequestBuilder(param: param, param2: param2).execute { (_, error) -> Void in - if let error = error { - completion(.failure(error)) - } else { - completion(.success(())) - } - } - } - - /** - test json serialization of form data - - GET /fake/jsonFormData - - parameter param: (form) field1 - - parameter param2: (form) field2 - - returns: RequestBuilder - */ - open class func testJsonFormDataWithRequestBuilder(param: String, param2: String) -> RequestBuilder { - let path = "/fake/jsonFormData" - let URLString = PetstoreClientAPI.basePath + path - let formParams: [String: Any?] = [ - "param": param.encodeToJSON(), - "param2": param2.encodeToJSON() - ] - - let nonNullParameters = APIHelper.rejectNil(formParams) - let parameters = APIHelper.convertBoolToString(nonNullParameters) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } - -} diff --git a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift deleted file mode 100644 index 09c9696dec65..000000000000 --- a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift +++ /dev/null @@ -1,62 +0,0 @@ -// -// FakeClassnameTags123API.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -open class FakeClassnameTags123API { - /** - To test class name in snake case - - - parameter body: (body) client model - - parameter completion: completion handler to receive the data and the error objects - */ - open class func testClassname(body: Client, completion: @escaping ((_ data: Client?, _ error: Error?) -> Void)) { - testClassnameWithRequestBuilder(body: body).execute { (response, error) -> Void in - completion(response?.body, error) - } - } - /** - To test class name in snake case - - - parameter body: (body) client model - - parameter completion: completion handler to receive the result - */ - open class func testClassname(body: Client, completion: @escaping ((_ result: Result) -> Void)) { - testClassnameWithRequestBuilder(body: body).execute { (response, error) -> Void in - if let error = error { - completion(.failure(error)) - } else if let response = response { - completion(.success(response.body!)) - } else { - fatalError() - } - } - } - - /** - To test class name in snake case - - PATCH /fake_classname_test - - To test class name in snake case - - API Key: - - type: apiKey api_key_query (QUERY) - - name: api_key_query - - parameter body: (body) client model - - returns: RequestBuilder - */ - open class func testClassnameWithRequestBuilder(body: Client) -> RequestBuilder { - let path = "/fake_classname_test" - let URLString = PetstoreClientAPI.basePath + path - let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "PATCH", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) - } - -} diff --git a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift deleted file mode 100644 index 3c0ac53738ab..000000000000 --- a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift +++ /dev/null @@ -1,545 +0,0 @@ -// -// PetAPI.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -open class PetAPI { - /** - Add a new pet to the store - - - parameter body: (body) Pet object that needs to be added to the store - - parameter completion: completion handler to receive the data and the error objects - */ - open class func addPet(body: Pet, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - addPetWithRequestBuilder(body: body).execute { (_, error) -> Void in - if error == nil { - completion((), error) - } else { - completion(nil, error) - } - } - } - /** - Add a new pet to the store - - - parameter body: (body) Pet object that needs to be added to the store - - parameter completion: completion handler to receive the result - */ - open class func addPet(body: Pet, completion: @escaping ((_ result: Result) -> Void)) { - addPetWithRequestBuilder(body: body).execute { (_, error) -> Void in - if let error = error { - completion(.failure(error)) - } else { - completion(.success(())) - } - } - } - - /** - Add a new pet to the store - - POST /pet - - OAuth: - - type: oauth2 - - name: petstore_auth - - parameter body: (body) Pet object that needs to be added to the store - - returns: RequestBuilder - */ - open class func addPetWithRequestBuilder(body: Pet) -> RequestBuilder { - let path = "/pet" - let URLString = PetstoreClientAPI.basePath + path - let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) - } - - /** - Deletes a pet - - - parameter petId: (path) Pet id to delete - - parameter apiKey: (header) (optional) - - parameter completion: completion handler to receive the data and the error objects - */ - open class func deletePet(petId: Int64, apiKey: String? = nil, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - deletePetWithRequestBuilder(petId: petId, apiKey: apiKey).execute { (_, error) -> Void in - if error == nil { - completion((), error) - } else { - completion(nil, error) - } - } - } - /** - Deletes a pet - - - parameter petId: (path) Pet id to delete - - parameter apiKey: (header) (optional) - - parameter completion: completion handler to receive the result - */ - open class func deletePet(petId: Int64, apiKey: String? = nil, completion: @escaping ((_ result: Result) -> Void)) { - deletePetWithRequestBuilder(petId: petId, apiKey: apiKey).execute { (_, error) -> Void in - if let error = error { - completion(.failure(error)) - } else { - completion(.success(())) - } - } - } - - /** - Deletes a pet - - DELETE /pet/{petId} - - OAuth: - - type: oauth2 - - name: petstore_auth - - parameter petId: (path) Pet id to delete - - parameter apiKey: (header) (optional) - - returns: RequestBuilder - */ - open class func deletePetWithRequestBuilder(petId: Int64, apiKey: String? = nil) -> RequestBuilder { - var path = "/pet/{petId}" - let petIdPreEscape = "\(APIHelper.mapValueToPathItem(petId))" - let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{petId}", with: petIdPostEscape, options: .literal, range: nil) - let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - - let url = URLComponents(string: URLString) - let nillableHeaders: [String: Any?] = [ - "api_key": apiKey?.encodeToJSON() - ] - let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false, headers: headerParameters) - } - - /** - * enum for parameter status - */ - public enum Status_findPetsByStatus: String { - case available = "available" - case pending = "pending" - case sold = "sold" - } - - /** - Finds Pets by status - - - parameter status: (query) Status values that need to be considered for filter - - parameter completion: completion handler to receive the data and the error objects - */ - open class func findPetsByStatus(status: [String], completion: @escaping ((_ data: [Pet]?, _ error: Error?) -> Void)) { - findPetsByStatusWithRequestBuilder(status: status).execute { (response, error) -> Void in - completion(response?.body, error) - } - } - /** - Finds Pets by status - - - parameter status: (query) Status values that need to be considered for filter - - parameter completion: completion handler to receive the result - */ - open class func findPetsByStatus(status: [String], completion: @escaping ((_ result: Result<[Pet], Error>) -> Void)) { - findPetsByStatusWithRequestBuilder(status: status).execute { (response, error) -> Void in - if let error = error { - completion(.failure(error)) - } else if let response = response { - completion(.success(response.body!)) - } else { - fatalError() - } - } - } - - /** - Finds Pets by status - - GET /pet/findByStatus - - Multiple status values can be provided with comma separated strings - - OAuth: - - type: oauth2 - - name: petstore_auth - - parameter status: (query) Status values that need to be considered for filter - - returns: RequestBuilder<[Pet]> - */ - open class func findPetsByStatusWithRequestBuilder(status: [String]) -> RequestBuilder<[Pet]> { - let path = "/pet/findByStatus" - let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - - var url = URLComponents(string: URLString) - url?.queryItems = APIHelper.mapValuesToQueryItems([ - "status": status.encodeToJSON() - ]) - - let requestBuilder: RequestBuilder<[Pet]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } - - /** - Finds Pets by tags - - - parameter tags: (query) Tags to filter by - - parameter completion: completion handler to receive the data and the error objects - */ - open class func findPetsByTags(tags: [String], completion: @escaping ((_ data: [Pet]?, _ error: Error?) -> Void)) { - findPetsByTagsWithRequestBuilder(tags: tags).execute { (response, error) -> Void in - completion(response?.body, error) - } - } - /** - Finds Pets by tags - - - parameter tags: (query) Tags to filter by - - parameter completion: completion handler to receive the result - */ - open class func findPetsByTags(tags: [String], completion: @escaping ((_ result: Result<[Pet], Error>) -> Void)) { - findPetsByTagsWithRequestBuilder(tags: tags).execute { (response, error) -> Void in - if let error = error { - completion(.failure(error)) - } else if let response = response { - completion(.success(response.body!)) - } else { - fatalError() - } - } - } - - /** - Finds Pets by tags - - GET /pet/findByTags - - Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. - - OAuth: - - type: oauth2 - - name: petstore_auth - - parameter tags: (query) Tags to filter by - - returns: RequestBuilder<[Pet]> - */ - open class func findPetsByTagsWithRequestBuilder(tags: [String]) -> RequestBuilder<[Pet]> { - let path = "/pet/findByTags" - let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - - var url = URLComponents(string: URLString) - url?.queryItems = APIHelper.mapValuesToQueryItems([ - "tags": tags.encodeToJSON() - ]) - - let requestBuilder: RequestBuilder<[Pet]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } - - /** - Find pet by ID - - - parameter petId: (path) ID of pet to return - - parameter completion: completion handler to receive the data and the error objects - */ - open class func getPetById(petId: Int64, completion: @escaping ((_ data: Pet?, _ error: Error?) -> Void)) { - getPetByIdWithRequestBuilder(petId: petId).execute { (response, error) -> Void in - completion(response?.body, error) - } - } - /** - Find pet by ID - - - parameter petId: (path) ID of pet to return - - parameter completion: completion handler to receive the result - */ - open class func getPetById(petId: Int64, completion: @escaping ((_ result: Result) -> Void)) { - getPetByIdWithRequestBuilder(petId: petId).execute { (response, error) -> Void in - if let error = error { - completion(.failure(error)) - } else if let response = response { - completion(.success(response.body!)) - } else { - fatalError() - } - } - } - - /** - Find pet by ID - - GET /pet/{petId} - - Returns a single pet - - API Key: - - type: apiKey api_key - - name: api_key - - parameter petId: (path) ID of pet to return - - returns: RequestBuilder - */ - open class func getPetByIdWithRequestBuilder(petId: Int64) -> RequestBuilder { - var path = "/pet/{petId}" - let petIdPreEscape = "\(APIHelper.mapValueToPathItem(petId))" - let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{petId}", with: petIdPostEscape, options: .literal, range: nil) - let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } - - /** - Update an existing pet - - - parameter body: (body) Pet object that needs to be added to the store - - parameter completion: completion handler to receive the data and the error objects - */ - open class func updatePet(body: Pet, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - updatePetWithRequestBuilder(body: body).execute { (_, error) -> Void in - if error == nil { - completion((), error) - } else { - completion(nil, error) - } - } - } - /** - Update an existing pet - - - parameter body: (body) Pet object that needs to be added to the store - - parameter completion: completion handler to receive the result - */ - open class func updatePet(body: Pet, completion: @escaping ((_ result: Result) -> Void)) { - updatePetWithRequestBuilder(body: body).execute { (_, error) -> Void in - if let error = error { - completion(.failure(error)) - } else { - completion(.success(())) - } - } - } - - /** - Update an existing pet - - PUT /pet - - OAuth: - - type: oauth2 - - name: petstore_auth - - parameter body: (body) Pet object that needs to be added to the store - - returns: RequestBuilder - */ - open class func updatePetWithRequestBuilder(body: Pet) -> RequestBuilder { - let path = "/pet" - let URLString = PetstoreClientAPI.basePath + path - let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) - } - - /** - Updates a pet in the store with form data - - - parameter petId: (path) ID of pet that needs to be updated - - parameter name: (form) Updated name of the pet (optional) - - parameter status: (form) Updated status of the pet (optional) - - parameter completion: completion handler to receive the data and the error objects - */ - open class func updatePetWithForm(petId: Int64, name: String? = nil, status: String? = nil, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - updatePetWithFormWithRequestBuilder(petId: petId, name: name, status: status).execute { (_, error) -> Void in - if error == nil { - completion((), error) - } else { - completion(nil, error) - } - } - } - /** - Updates a pet in the store with form data - - - parameter petId: (path) ID of pet that needs to be updated - - parameter name: (form) Updated name of the pet (optional) - - parameter status: (form) Updated status of the pet (optional) - - parameter completion: completion handler to receive the result - */ - open class func updatePetWithForm(petId: Int64, name: String? = nil, status: String? = nil, completion: @escaping ((_ result: Result) -> Void)) { - updatePetWithFormWithRequestBuilder(petId: petId, name: name, status: status).execute { (_, error) -> Void in - if let error = error { - completion(.failure(error)) - } else { - completion(.success(())) - } - } - } - - /** - Updates a pet in the store with form data - - POST /pet/{petId} - - OAuth: - - type: oauth2 - - name: petstore_auth - - parameter petId: (path) ID of pet that needs to be updated - - parameter name: (form) Updated name of the pet (optional) - - parameter status: (form) Updated status of the pet (optional) - - returns: RequestBuilder - */ - open class func updatePetWithFormWithRequestBuilder(petId: Int64, name: String? = nil, status: String? = nil) -> RequestBuilder { - var path = "/pet/{petId}" - let petIdPreEscape = "\(APIHelper.mapValueToPathItem(petId))" - let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{petId}", with: petIdPostEscape, options: .literal, range: nil) - let URLString = PetstoreClientAPI.basePath + path - let formParams: [String: Any?] = [ - "name": name?.encodeToJSON(), - "status": status?.encodeToJSON() - ] - - let nonNullParameters = APIHelper.rejectNil(formParams) - let parameters = APIHelper.convertBoolToString(nonNullParameters) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } - - /** - uploads an image - - - parameter petId: (path) ID of pet to update - - parameter additionalMetadata: (form) Additional data to pass to server (optional) - - parameter file: (form) file to upload (optional) - - parameter completion: completion handler to receive the data and the error objects - */ - open class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil, completion: @escaping ((_ data: ApiResponse?, _ error: Error?) -> Void)) { - uploadFileWithRequestBuilder(petId: petId, additionalMetadata: additionalMetadata, file: file).execute { (response, error) -> Void in - completion(response?.body, error) - } - } - /** - uploads an image - - - parameter petId: (path) ID of pet to update - - parameter additionalMetadata: (form) Additional data to pass to server (optional) - - parameter file: (form) file to upload (optional) - - parameter completion: completion handler to receive the result - */ - open class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil, completion: @escaping ((_ result: Result) -> Void)) { - uploadFileWithRequestBuilder(petId: petId, additionalMetadata: additionalMetadata, file: file).execute { (response, error) -> Void in - if let error = error { - completion(.failure(error)) - } else if let response = response { - completion(.success(response.body!)) - } else { - fatalError() - } - } - } - - /** - uploads an image - - POST /pet/{petId}/uploadImage - - OAuth: - - type: oauth2 - - name: petstore_auth - - parameter petId: (path) ID of pet to update - - parameter additionalMetadata: (form) Additional data to pass to server (optional) - - parameter file: (form) file to upload (optional) - - returns: RequestBuilder - */ - open class func uploadFileWithRequestBuilder(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil) -> RequestBuilder { - var path = "/pet/{petId}/uploadImage" - let petIdPreEscape = "\(APIHelper.mapValueToPathItem(petId))" - let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{petId}", with: petIdPostEscape, options: .literal, range: nil) - let URLString = PetstoreClientAPI.basePath + path - let formParams: [String: Any?] = [ - "additionalMetadata": additionalMetadata?.encodeToJSON(), - "file": file?.encodeToJSON() - ] - - let nonNullParameters = APIHelper.rejectNil(formParams) - let parameters = APIHelper.convertBoolToString(nonNullParameters) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } - - /** - uploads an image (required) - - - parameter petId: (path) ID of pet to update - - parameter requiredFile: (form) file to upload - - parameter additionalMetadata: (form) Additional data to pass to server (optional) - - parameter completion: completion handler to receive the data and the error objects - */ - open class func uploadFileWithRequiredFile(petId: Int64, requiredFile: URL, additionalMetadata: String? = nil, completion: @escaping ((_ data: ApiResponse?, _ error: Error?) -> Void)) { - uploadFileWithRequiredFileWithRequestBuilder(petId: petId, requiredFile: requiredFile, additionalMetadata: additionalMetadata).execute { (response, error) -> Void in - completion(response?.body, error) - } - } - /** - uploads an image (required) - - - parameter petId: (path) ID of pet to update - - parameter requiredFile: (form) file to upload - - parameter additionalMetadata: (form) Additional data to pass to server (optional) - - parameter completion: completion handler to receive the result - */ - open class func uploadFileWithRequiredFile(petId: Int64, requiredFile: URL, additionalMetadata: String? = nil, completion: @escaping ((_ result: Result) -> Void)) { - uploadFileWithRequiredFileWithRequestBuilder(petId: petId, requiredFile: requiredFile, additionalMetadata: additionalMetadata).execute { (response, error) -> Void in - if let error = error { - completion(.failure(error)) - } else if let response = response { - completion(.success(response.body!)) - } else { - fatalError() - } - } - } - - /** - uploads an image (required) - - POST /fake/{petId}/uploadImageWithRequiredFile - - OAuth: - - type: oauth2 - - name: petstore_auth - - parameter petId: (path) ID of pet to update - - parameter requiredFile: (form) file to upload - - parameter additionalMetadata: (form) Additional data to pass to server (optional) - - returns: RequestBuilder - */ - open class func uploadFileWithRequiredFileWithRequestBuilder(petId: Int64, requiredFile: URL, additionalMetadata: String? = nil) -> RequestBuilder { - var path = "/fake/{petId}/uploadImageWithRequiredFile" - let petIdPreEscape = "\(APIHelper.mapValueToPathItem(petId))" - let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{petId}", with: petIdPostEscape, options: .literal, range: nil) - let URLString = PetstoreClientAPI.basePath + path - let formParams: [String: Any?] = [ - "additionalMetadata": additionalMetadata?.encodeToJSON(), - "requiredFile": requiredFile.encodeToJSON() - ] - - let nonNullParameters = APIHelper.rejectNil(formParams) - let parameters = APIHelper.convertBoolToString(nonNullParameters) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } - -} diff --git a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift deleted file mode 100644 index 62ae519105c5..000000000000 --- a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift +++ /dev/null @@ -1,210 +0,0 @@ -// -// StoreAPI.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -open class StoreAPI { - /** - Delete purchase order by ID - - - parameter orderId: (path) ID of the order that needs to be deleted - - parameter completion: completion handler to receive the data and the error objects - */ - open class func deleteOrder(orderId: String, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - deleteOrderWithRequestBuilder(orderId: orderId).execute { (_, error) -> Void in - if error == nil { - completion((), error) - } else { - completion(nil, error) - } - } - } - /** - Delete purchase order by ID - - - parameter orderId: (path) ID of the order that needs to be deleted - - parameter completion: completion handler to receive the result - */ - open class func deleteOrder(orderId: String, completion: @escaping ((_ result: Result) -> Void)) { - deleteOrderWithRequestBuilder(orderId: orderId).execute { (_, error) -> Void in - if let error = error { - completion(.failure(error)) - } else { - completion(.success(())) - } - } - } - - /** - Delete purchase order by ID - - DELETE /store/order/{order_id} - - For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors - - parameter orderId: (path) ID of the order that needs to be deleted - - returns: RequestBuilder - */ - open class func deleteOrderWithRequestBuilder(orderId: String) -> RequestBuilder { - var path = "/store/order/{order_id}" - let orderIdPreEscape = "\(APIHelper.mapValueToPathItem(orderId))" - let orderIdPostEscape = orderIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{order_id}", with: orderIdPostEscape, options: .literal, range: nil) - let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } - - /** - Returns pet inventories by status - - - parameter completion: completion handler to receive the data and the error objects - */ - open class func getInventory(completion: @escaping ((_ data: [String: Int]?, _ error: Error?) -> Void)) { - getInventoryWithRequestBuilder().execute { (response, error) -> Void in - completion(response?.body, error) - } - } - /** - Returns pet inventories by status - - - parameter completion: completion handler to receive the result - */ - open class func getInventory(completion: @escaping ((_ result: Result<[String: Int], Error>) -> Void)) { - getInventoryWithRequestBuilder().execute { (response, error) -> Void in - if let error = error { - completion(.failure(error)) - } else if let response = response { - completion(.success(response.body!)) - } else { - fatalError() - } - } - } - - /** - Returns pet inventories by status - - GET /store/inventory - - Returns a map of status codes to quantities - - API Key: - - type: apiKey api_key - - name: api_key - - returns: RequestBuilder<[String:Int]> - */ - open class func getInventoryWithRequestBuilder() -> RequestBuilder<[String: Int]> { - let path = "/store/inventory" - let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder<[String: Int]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } - - /** - Find purchase order by ID - - - parameter orderId: (path) ID of pet that needs to be fetched - - parameter completion: completion handler to receive the data and the error objects - */ - open class func getOrderById(orderId: Int64, completion: @escaping ((_ data: Order?, _ error: Error?) -> Void)) { - getOrderByIdWithRequestBuilder(orderId: orderId).execute { (response, error) -> Void in - completion(response?.body, error) - } - } - /** - Find purchase order by ID - - - parameter orderId: (path) ID of pet that needs to be fetched - - parameter completion: completion handler to receive the result - */ - open class func getOrderById(orderId: Int64, completion: @escaping ((_ result: Result) -> Void)) { - getOrderByIdWithRequestBuilder(orderId: orderId).execute { (response, error) -> Void in - if let error = error { - completion(.failure(error)) - } else if let response = response { - completion(.success(response.body!)) - } else { - fatalError() - } - } - } - - /** - Find purchase order by ID - - GET /store/order/{order_id} - - For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions - - parameter orderId: (path) ID of pet that needs to be fetched - - returns: RequestBuilder - */ - open class func getOrderByIdWithRequestBuilder(orderId: Int64) -> RequestBuilder { - var path = "/store/order/{order_id}" - let orderIdPreEscape = "\(APIHelper.mapValueToPathItem(orderId))" - let orderIdPostEscape = orderIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{order_id}", with: orderIdPostEscape, options: .literal, range: nil) - let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } - - /** - Place an order for a pet - - - parameter body: (body) order placed for purchasing the pet - - parameter completion: completion handler to receive the data and the error objects - */ - open class func placeOrder(body: Order, completion: @escaping ((_ data: Order?, _ error: Error?) -> Void)) { - placeOrderWithRequestBuilder(body: body).execute { (response, error) -> Void in - completion(response?.body, error) - } - } - /** - Place an order for a pet - - - parameter body: (body) order placed for purchasing the pet - - parameter completion: completion handler to receive the result - */ - open class func placeOrder(body: Order, completion: @escaping ((_ result: Result) -> Void)) { - placeOrderWithRequestBuilder(body: body).execute { (response, error) -> Void in - if let error = error { - completion(.failure(error)) - } else if let response = response { - completion(.success(response.body!)) - } else { - fatalError() - } - } - } - - /** - Place an order for a pet - - POST /store/order - - parameter body: (body) order placed for purchasing the pet - - returns: RequestBuilder - */ - open class func placeOrderWithRequestBuilder(body: Order) -> RequestBuilder { - let path = "/store/order" - let URLString = PetstoreClientAPI.basePath + path - let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) - } - -} diff --git a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift deleted file mode 100644 index c65cdfa1bce3..000000000000 --- a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift +++ /dev/null @@ -1,419 +0,0 @@ -// -// UserAPI.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -open class UserAPI { - /** - Create user - - - parameter body: (body) Created user object - - parameter completion: completion handler to receive the data and the error objects - */ - open class func createUser(body: User, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - createUserWithRequestBuilder(body: body).execute { (_, error) -> Void in - if error == nil { - completion((), error) - } else { - completion(nil, error) - } - } - } - /** - Create user - - - parameter body: (body) Created user object - - parameter completion: completion handler to receive the result - */ - open class func createUser(body: User, completion: @escaping ((_ result: Result) -> Void)) { - createUserWithRequestBuilder(body: body).execute { (_, error) -> Void in - if let error = error { - completion(.failure(error)) - } else { - completion(.success(())) - } - } - } - - /** - Create user - - POST /user - - This can only be done by the logged in user. - - parameter body: (body) Created user object - - returns: RequestBuilder - */ - open class func createUserWithRequestBuilder(body: User) -> RequestBuilder { - let path = "/user" - let URLString = PetstoreClientAPI.basePath + path - let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) - } - - /** - Creates list of users with given input array - - - parameter body: (body) List of user object - - parameter completion: completion handler to receive the data and the error objects - */ - open class func createUsersWithArrayInput(body: [User], completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - createUsersWithArrayInputWithRequestBuilder(body: body).execute { (_, error) -> Void in - if error == nil { - completion((), error) - } else { - completion(nil, error) - } - } - } - /** - Creates list of users with given input array - - - parameter body: (body) List of user object - - parameter completion: completion handler to receive the result - */ - open class func createUsersWithArrayInput(body: [User], completion: @escaping ((_ result: Result) -> Void)) { - createUsersWithArrayInputWithRequestBuilder(body: body).execute { (_, error) -> Void in - if let error = error { - completion(.failure(error)) - } else { - completion(.success(())) - } - } - } - - /** - Creates list of users with given input array - - POST /user/createWithArray - - parameter body: (body) List of user object - - returns: RequestBuilder - */ - open class func createUsersWithArrayInputWithRequestBuilder(body: [User]) -> RequestBuilder { - let path = "/user/createWithArray" - let URLString = PetstoreClientAPI.basePath + path - let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) - } - - /** - Creates list of users with given input array - - - parameter body: (body) List of user object - - parameter completion: completion handler to receive the data and the error objects - */ - open class func createUsersWithListInput(body: [User], completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - createUsersWithListInputWithRequestBuilder(body: body).execute { (_, error) -> Void in - if error == nil { - completion((), error) - } else { - completion(nil, error) - } - } - } - /** - Creates list of users with given input array - - - parameter body: (body) List of user object - - parameter completion: completion handler to receive the result - */ - open class func createUsersWithListInput(body: [User], completion: @escaping ((_ result: Result) -> Void)) { - createUsersWithListInputWithRequestBuilder(body: body).execute { (_, error) -> Void in - if let error = error { - completion(.failure(error)) - } else { - completion(.success(())) - } - } - } - - /** - Creates list of users with given input array - - POST /user/createWithList - - parameter body: (body) List of user object - - returns: RequestBuilder - */ - open class func createUsersWithListInputWithRequestBuilder(body: [User]) -> RequestBuilder { - let path = "/user/createWithList" - let URLString = PetstoreClientAPI.basePath + path - let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) - } - - /** - Delete user - - - parameter username: (path) The name that needs to be deleted - - parameter completion: completion handler to receive the data and the error objects - */ - open class func deleteUser(username: String, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - deleteUserWithRequestBuilder(username: username).execute { (_, error) -> Void in - if error == nil { - completion((), error) - } else { - completion(nil, error) - } - } - } - /** - Delete user - - - parameter username: (path) The name that needs to be deleted - - parameter completion: completion handler to receive the result - */ - open class func deleteUser(username: String, completion: @escaping ((_ result: Result) -> Void)) { - deleteUserWithRequestBuilder(username: username).execute { (_, error) -> Void in - if let error = error { - completion(.failure(error)) - } else { - completion(.success(())) - } - } - } - - /** - Delete user - - DELETE /user/{username} - - This can only be done by the logged in user. - - parameter username: (path) The name that needs to be deleted - - returns: RequestBuilder - */ - open class func deleteUserWithRequestBuilder(username: String) -> RequestBuilder { - var path = "/user/{username}" - let usernamePreEscape = "\(APIHelper.mapValueToPathItem(username))" - let usernamePostEscape = usernamePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{username}", with: usernamePostEscape, options: .literal, range: nil) - let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } - - /** - Get user by user name - - - parameter username: (path) The name that needs to be fetched. Use user1 for testing. - - parameter completion: completion handler to receive the data and the error objects - */ - open class func getUserByName(username: String, completion: @escaping ((_ data: User?, _ error: Error?) -> Void)) { - getUserByNameWithRequestBuilder(username: username).execute { (response, error) -> Void in - completion(response?.body, error) - } - } - /** - Get user by user name - - - parameter username: (path) The name that needs to be fetched. Use user1 for testing. - - parameter completion: completion handler to receive the result - */ - open class func getUserByName(username: String, completion: @escaping ((_ result: Result) -> Void)) { - getUserByNameWithRequestBuilder(username: username).execute { (response, error) -> Void in - if let error = error { - completion(.failure(error)) - } else if let response = response { - completion(.success(response.body!)) - } else { - fatalError() - } - } - } - - /** - Get user by user name - - GET /user/{username} - - parameter username: (path) The name that needs to be fetched. Use user1 for testing. - - returns: RequestBuilder - */ - open class func getUserByNameWithRequestBuilder(username: String) -> RequestBuilder { - var path = "/user/{username}" - let usernamePreEscape = "\(APIHelper.mapValueToPathItem(username))" - let usernamePostEscape = usernamePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{username}", with: usernamePostEscape, options: .literal, range: nil) - let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } - - /** - Logs user into the system - - - parameter username: (query) The user name for login - - parameter password: (query) The password for login in clear text - - parameter completion: completion handler to receive the data and the error objects - */ - open class func loginUser(username: String, password: String, completion: @escaping ((_ data: String?, _ error: Error?) -> Void)) { - loginUserWithRequestBuilder(username: username, password: password).execute { (response, error) -> Void in - completion(response?.body, error) - } - } - /** - Logs user into the system - - - parameter username: (query) The user name for login - - parameter password: (query) The password for login in clear text - - parameter completion: completion handler to receive the result - */ - open class func loginUser(username: String, password: String, completion: @escaping ((_ result: Result) -> Void)) { - loginUserWithRequestBuilder(username: username, password: password).execute { (response, error) -> Void in - if let error = error { - completion(.failure(error)) - } else if let response = response { - completion(.success(response.body!)) - } else { - fatalError() - } - } - } - - /** - Logs user into the system - - GET /user/login - - responseHeaders: [X-Rate-Limit(Int), X-Expires-After(Date)] - - parameter username: (query) The user name for login - - parameter password: (query) The password for login in clear text - - returns: RequestBuilder - */ - open class func loginUserWithRequestBuilder(username: String, password: String) -> RequestBuilder { - let path = "/user/login" - let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - - var url = URLComponents(string: URLString) - url?.queryItems = APIHelper.mapValuesToQueryItems([ - "username": username.encodeToJSON(), - "password": password.encodeToJSON() - ]) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } - - /** - Logs out current logged in user session - - - parameter completion: completion handler to receive the data and the error objects - */ - open class func logoutUser(completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - logoutUserWithRequestBuilder().execute { (_, error) -> Void in - if error == nil { - completion((), error) - } else { - completion(nil, error) - } - } - } - /** - Logs out current logged in user session - - - parameter completion: completion handler to receive the result - */ - open class func logoutUser(completion: @escaping ((_ result: Result) -> Void)) { - logoutUserWithRequestBuilder().execute { (_, error) -> Void in - if let error = error { - completion(.failure(error)) - } else { - completion(.success(())) - } - } - } - - /** - Logs out current logged in user session - - GET /user/logout - - returns: RequestBuilder - */ - open class func logoutUserWithRequestBuilder() -> RequestBuilder { - let path = "/user/logout" - let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } - - /** - Updated user - - - parameter username: (path) name that need to be deleted - - parameter body: (body) Updated user object - - parameter completion: completion handler to receive the data and the error objects - */ - open class func updateUser(username: String, body: User, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - updateUserWithRequestBuilder(username: username, body: body).execute { (_, error) -> Void in - if error == nil { - completion((), error) - } else { - completion(nil, error) - } - } - } - /** - Updated user - - - parameter username: (path) name that need to be deleted - - parameter body: (body) Updated user object - - parameter completion: completion handler to receive the result - */ - open class func updateUser(username: String, body: User, completion: @escaping ((_ result: Result) -> Void)) { - updateUserWithRequestBuilder(username: username, body: body).execute { (_, error) -> Void in - if let error = error { - completion(.failure(error)) - } else { - completion(.success(())) - } - } - } - - /** - Updated user - - PUT /user/{username} - - This can only be done by the logged in user. - - parameter username: (path) name that need to be deleted - - parameter body: (body) Updated user object - - returns: RequestBuilder - */ - open class func updateUserWithRequestBuilder(username: String, body: User) -> RequestBuilder { - var path = "/user/{username}" - let usernamePreEscape = "\(APIHelper.mapValueToPathItem(username))" - let usernamePostEscape = usernamePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{username}", with: usernamePostEscape, options: .literal, range: nil) - let URLString = PetstoreClientAPI.basePath + path - let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) - } - -} diff --git a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/AlamofireImplementations.swift b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/AlamofireImplementations.swift deleted file mode 100644 index 1d54e695608b..000000000000 --- a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/AlamofireImplementations.swift +++ /dev/null @@ -1,450 +0,0 @@ -// AlamofireImplementations.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -import Alamofire - -class AlamofireRequestBuilderFactory: RequestBuilderFactory { - func getNonDecodableBuilder() -> RequestBuilder.Type { - return AlamofireRequestBuilder.self - } - - func getBuilder() -> RequestBuilder.Type { - return AlamofireDecodableRequestBuilder.self - } -} - -private struct SynchronizedDictionary { - - private var dictionary = [K: V]() - private let queue = DispatchQueue( - label: "SynchronizedDictionary", - qos: DispatchQoS.userInitiated, - attributes: [DispatchQueue.Attributes.concurrent], - autoreleaseFrequency: DispatchQueue.AutoreleaseFrequency.inherit, - target: nil - ) - - public subscript(key: K) -> V? { - get { - var value: V? - - queue.sync { - value = self.dictionary[key] - } - - return value - } - set { - queue.sync(flags: DispatchWorkItemFlags.barrier) { - self.dictionary[key] = newValue - } - } - } - } - -// Store manager to retain its reference -private var managerStore = SynchronizedDictionary() - -open class AlamofireRequestBuilder: RequestBuilder { - required public init(method: String, URLString: String, parameters: [String: Any]?, isBody: Bool, headers: [String: String] = [:]) { - super.init(method: method, URLString: URLString, parameters: parameters, isBody: isBody, headers: headers) - } - - /** - May be overridden by a subclass if you want to control the session - configuration. - */ - open func createSessionManager() -> Alamofire.SessionManager { - let configuration = URLSessionConfiguration.default - configuration.httpAdditionalHeaders = buildHeaders() - return Alamofire.SessionManager(configuration: configuration) - } - - /** - May be overridden by a subclass if you want to custom request constructor. - */ - open func createURLRequest() -> URLRequest? { - let encoding: ParameterEncoding = isBody ? JSONDataEncoding() : URLEncoding() - guard let originalRequest = try? URLRequest(url: URLString, method: HTTPMethod(rawValue: method)!, headers: buildHeaders()) else { return nil } - return try? encoding.encode(originalRequest, with: parameters) - } - - /** - May be overridden by a subclass if you want to control the Content-Type - that is given to an uploaded form part. - - Return nil to use the default behavior (inferring the Content-Type from - the file extension). Return the desired Content-Type otherwise. - */ - open func contentTypeForFormPart(fileURL: URL) -> String? { - return nil - } - - /** - May be overridden by a subclass if you want to control the request - configuration (e.g. to override the cache policy). - */ - open func makeRequest(manager: SessionManager, method: HTTPMethod, encoding: ParameterEncoding, headers: [String: String]) -> DataRequest { - return manager.request(URLString, method: method, parameters: parameters, encoding: encoding, headers: headers) - } - - override open func execute(_ completion: @escaping (_ response: Response?, _ error: Error?) -> Void) { - let managerId: String = UUID().uuidString - // Create a new manager for each request to customize its request header - let manager = createSessionManager() - managerStore[managerId] = manager - - let encoding: ParameterEncoding = isBody ? JSONDataEncoding() : URLEncoding() - - let xMethod = Alamofire.HTTPMethod(rawValue: method) - let fileKeys = parameters == nil ? [] : parameters!.filter { $1 is NSURL } - .map { $0.0 } - - if fileKeys.count > 0 { - manager.upload(multipartFormData: { mpForm in - for (k, v) in self.parameters! { - switch v { - case let fileURL as URL: - if let mimeType = self.contentTypeForFormPart(fileURL: fileURL) { - mpForm.append(fileURL, withName: k, fileName: fileURL.lastPathComponent, mimeType: mimeType) - } else { - mpForm.append(fileURL, withName: k) - } - case let string as String: - mpForm.append(string.data(using: String.Encoding.utf8)!, withName: k) - case let number as NSNumber: - mpForm.append(number.stringValue.data(using: String.Encoding.utf8)!, withName: k) - default: - fatalError("Unprocessable value \(v) with key \(k)") - } - } - }, to: URLString, method: xMethod!, headers: nil, encodingCompletion: { encodingResult in - switch encodingResult { - case .success(let upload, _, _): - if let onProgressReady = self.onProgressReady { - onProgressReady(upload.uploadProgress) - } - self.processRequest(request: upload, managerId, completion) - case .failure(let encodingError): - completion(nil, ErrorResponse.error(415, nil, encodingError)) - } - }) - } else { - let request = makeRequest(manager: manager, method: xMethod!, encoding: encoding, headers: headers) - if let onProgressReady = self.onProgressReady { - onProgressReady(request.progress) - } - processRequest(request: request, managerId, completion) - } - - } - - fileprivate func processRequest(request: DataRequest, _ managerId: String, _ completion: @escaping (_ response: Response?, _ error: Error?) -> Void) { - if let credential = self.credential { - request.authenticate(usingCredential: credential) - } - - let cleanupRequest = { - managerStore[managerId] = nil - } - - let validatedRequest = request.validate() - - switch T.self { - case is String.Type: - validatedRequest.responseString(queue: PetstoreClientAPI.apiResponseQueue, completionHandler: { (stringResponse) in - cleanupRequest() - - if stringResponse.result.isFailure { - completion( - nil, - ErrorResponse.error(stringResponse.response?.statusCode ?? 500, stringResponse.data, stringResponse.result.error!) - ) - return - } - - completion( - Response( - response: stringResponse.response!, - body: ((stringResponse.result.value ?? "") as! T) - ), - nil - ) - }) - case is URL.Type: - validatedRequest.responseData(queue: PetstoreClientAPI.apiResponseQueue, completionHandler: { (dataResponse) in - cleanupRequest() - - do { - - guard !dataResponse.result.isFailure else { - throw DownloadException.responseFailed - } - - guard let data = dataResponse.data else { - throw DownloadException.responseDataMissing - } - - guard let request = request.request else { - throw DownloadException.requestMissing - } - - let fileManager = FileManager.default - let urlRequest = try request.asURLRequest() - let documentsDirectory = fileManager.urls(for: .documentDirectory, in: .userDomainMask)[0] - let requestURL = try self.getURL(from: urlRequest) - - var requestPath = try self.getPath(from: requestURL) - - if let headerFileName = self.getFileName(fromContentDisposition: dataResponse.response?.allHeaderFields["Content-Disposition"] as? String) { - requestPath = requestPath.appending("/\(headerFileName)") - } - - let filePath = documentsDirectory.appendingPathComponent(requestPath) - let directoryPath = filePath.deletingLastPathComponent().path - - try fileManager.createDirectory(atPath: directoryPath, withIntermediateDirectories: true, attributes: nil) - try data.write(to: filePath, options: .atomic) - - completion( - Response( - response: dataResponse.response!, - body: (filePath as! T) - ), - nil - ) - - } catch let requestParserError as DownloadException { - completion(nil, ErrorResponse.error(400, dataResponse.data, requestParserError)) - } catch let error { - completion(nil, ErrorResponse.error(400, dataResponse.data, error)) - } - return - }) - case is Void.Type: - validatedRequest.responseData(queue: PetstoreClientAPI.apiResponseQueue, completionHandler: { (voidResponse) in - cleanupRequest() - - if voidResponse.result.isFailure { - completion( - nil, - ErrorResponse.error(voidResponse.response?.statusCode ?? 500, voidResponse.data, voidResponse.result.error!) - ) - return - } - - completion( - Response( - response: voidResponse.response!, - body: nil), - nil - ) - }) - default: - validatedRequest.responseData(queue: PetstoreClientAPI.apiResponseQueue, completionHandler: { (dataResponse) in - cleanupRequest() - - if dataResponse.result.isFailure { - completion( - nil, - ErrorResponse.error(dataResponse.response?.statusCode ?? 500, dataResponse.data, dataResponse.result.error!) - ) - return - } - - completion( - Response( - response: dataResponse.response!, - body: (dataResponse.data as! T) - ), - nil - ) - }) - } - } - - open func buildHeaders() -> [String: String] { - var httpHeaders = SessionManager.defaultHTTPHeaders - for (key, value) in self.headers { - httpHeaders[key] = value - } - return httpHeaders - } - - fileprivate func getFileName(fromContentDisposition contentDisposition: String?) -> String? { - - guard let contentDisposition = contentDisposition else { - return nil - } - - let items = contentDisposition.components(separatedBy: ";") - - var filename: String? - - for contentItem in items { - - let filenameKey = "filename=" - guard let range = contentItem.range(of: filenameKey) else { - break - } - - filename = contentItem - return filename? - .replacingCharacters(in: range, with: "") - .replacingOccurrences(of: "\"", with: "") - .trimmingCharacters(in: .whitespacesAndNewlines) - } - - return filename - - } - - fileprivate func getPath(from url: URL) throws -> String { - - guard var path = URLComponents(url: url, resolvingAgainstBaseURL: true)?.path else { - throw DownloadException.requestMissingPath - } - - if path.hasPrefix("/") { - path.remove(at: path.startIndex) - } - - return path - - } - - fileprivate func getURL(from urlRequest: URLRequest) throws -> URL { - - guard let url = urlRequest.url else { - throw DownloadException.requestMissingURL - } - - return url - } - -} - -private enum DownloadException: Error { - case responseDataMissing - case responseFailed - case requestMissing - case requestMissingPath - case requestMissingURL -} - -public enum AlamofireDecodableRequestBuilderError: Error { - case emptyDataResponse - case nilHTTPResponse - case jsonDecoding(DecodingError) - case generalError(Error) -} - -open class AlamofireDecodableRequestBuilder: AlamofireRequestBuilder { - - override fileprivate func processRequest(request: DataRequest, _ managerId: String, _ completion: @escaping (_ response: Response?, _ error: Error?) -> Void) { - if let credential = self.credential { - request.authenticate(usingCredential: credential) - } - - let cleanupRequest = { - managerStore[managerId] = nil - } - - let validatedRequest = request.validate() - - switch T.self { - case is String.Type: - validatedRequest.responseString(queue: PetstoreClientAPI.apiResponseQueue, completionHandler: { (stringResponse) in - cleanupRequest() - - if stringResponse.result.isFailure { - completion( - nil, - ErrorResponse.error(stringResponse.response?.statusCode ?? 500, stringResponse.data, stringResponse.result.error!) - ) - return - } - - completion( - Response( - response: stringResponse.response!, - body: ((stringResponse.result.value ?? "") as! T) - ), - nil - ) - }) - case is Void.Type: - validatedRequest.responseData(queue: PetstoreClientAPI.apiResponseQueue, completionHandler: { (voidResponse) in - cleanupRequest() - - if voidResponse.result.isFailure { - completion( - nil, - ErrorResponse.error(voidResponse.response?.statusCode ?? 500, voidResponse.data, voidResponse.result.error!) - ) - return - } - - completion( - Response( - response: voidResponse.response!, - body: nil), - nil - ) - }) - case is Data.Type: - validatedRequest.responseData(queue: PetstoreClientAPI.apiResponseQueue, completionHandler: { (dataResponse) in - cleanupRequest() - - if dataResponse.result.isFailure { - completion( - nil, - ErrorResponse.error(dataResponse.response?.statusCode ?? 500, dataResponse.data, dataResponse.result.error!) - ) - return - } - - completion( - Response( - response: dataResponse.response!, - body: (dataResponse.data as! T) - ), - nil - ) - }) - default: - validatedRequest.responseData(queue: PetstoreClientAPI.apiResponseQueue, completionHandler: { (dataResponse: DataResponse) in - cleanupRequest() - - guard dataResponse.result.isSuccess else { - completion(nil, ErrorResponse.error(dataResponse.response?.statusCode ?? 500, dataResponse.data, dataResponse.result.error!)) - return - } - - guard let data = dataResponse.data, !data.isEmpty else { - completion(nil, ErrorResponse.error(-1, nil, AlamofireDecodableRequestBuilderError.emptyDataResponse)) - return - } - - guard let httpResponse = dataResponse.response else { - completion(nil, ErrorResponse.error(-2, nil, AlamofireDecodableRequestBuilderError.nilHTTPResponse)) - return - } - - var responseObj: Response? - - let decodeResult: (decodableObj: T?, error: Error?) = CodableHelper.decode(T.self, from: data) - if decodeResult.error == nil { - responseObj = Response(response: httpResponse, body: decodeResult.decodableObj) - } - - completion(responseObj, decodeResult.error) - }) - } - } - -} diff --git a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/CodableHelper.swift b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/CodableHelper.swift deleted file mode 100644 index 27cf29c65600..000000000000 --- a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/CodableHelper.swift +++ /dev/null @@ -1,75 +0,0 @@ -// -// CodableHelper.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public typealias EncodeResult = (data: Data?, error: Error?) - -open class CodableHelper { - - private static var customDateFormatter: DateFormatter? - private static var defaultDateFormatter: DateFormatter = { - let dateFormatter = DateFormatter() - dateFormatter.calendar = Calendar(identifier: .iso8601) - dateFormatter.locale = Locale(identifier: "en_US_POSIX") - dateFormatter.timeZone = TimeZone(secondsFromGMT: 0) - dateFormatter.dateFormat = Configuration.dateFormat - return dateFormatter - }() - private static var customJSONDecoder: JSONDecoder? - private static var defaultJSONDecoder: JSONDecoder = { - let decoder = JSONDecoder() - decoder.dateDecodingStrategy = .formatted(CodableHelper.dateFormatter) - return decoder - }() - private static var customJSONEncoder: JSONEncoder? - private static var defaultJSONEncoder: JSONEncoder = { - let encoder = JSONEncoder() - encoder.dateEncodingStrategy = .formatted(CodableHelper.dateFormatter) - encoder.outputFormatting = .prettyPrinted - return encoder - }() - - public static var dateFormatter: DateFormatter { - get { return self.customDateFormatter ?? self.defaultDateFormatter } - set { self.customDateFormatter = newValue } - } - public static var jsonDecoder: JSONDecoder { - get { return self.customJSONDecoder ?? self.defaultJSONDecoder } - set { self.customJSONDecoder = newValue } - } - public static var jsonEncoder: JSONEncoder { - get { return self.customJSONEncoder ?? self.defaultJSONEncoder } - set { self.customJSONEncoder = newValue } - } - - open class func decode(_ type: T.Type, from data: Data) -> (decodableObj: T?, error: Error?) where T: Decodable { - var returnedDecodable: T? - var returnedError: Error? - - do { - returnedDecodable = try self.jsonDecoder.decode(type, from: data) - } catch { - returnedError = error - } - - return (returnedDecodable, returnedError) - } - - open class func encode(_ value: T) -> EncodeResult where T: Encodable { - var returnedData: Data? - var returnedError: Error? - - do { - returnedData = try self.jsonEncoder.encode(value) - } catch { - returnedError = error - } - - return (returnedData, returnedError) - } -} diff --git a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Configuration.swift b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Configuration.swift deleted file mode 100644 index e1ecb39726e7..000000000000 --- a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Configuration.swift +++ /dev/null @@ -1,15 +0,0 @@ -// Configuration.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -open class Configuration { - - // This value is used to configure the date formatter that is used to serialize dates into JSON format. - // You must set it prior to encoding any dates, and it will only be read once. - public static var dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSZZZZZ" - -} diff --git a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift deleted file mode 100644 index 74fcfcf2ad49..000000000000 --- a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift +++ /dev/null @@ -1,173 +0,0 @@ -// Extensions.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -extension Bool: JSONEncodable { - func encodeToJSON() -> Any { return self as Any } -} - -extension Float: JSONEncodable { - func encodeToJSON() -> Any { return self as Any } -} - -extension Int: JSONEncodable { - func encodeToJSON() -> Any { return self as Any } -} - -extension Int32: JSONEncodable { - func encodeToJSON() -> Any { return NSNumber(value: self as Int32) } -} - -extension Int64: JSONEncodable { - func encodeToJSON() -> Any { return NSNumber(value: self as Int64) } -} - -extension Double: JSONEncodable { - func encodeToJSON() -> Any { return self as Any } -} - -extension String: JSONEncodable { - func encodeToJSON() -> Any { return self as Any } -} - -extension RawRepresentable where RawValue: JSONEncodable { - func encodeToJSON() -> Any { return self.rawValue as Any } -} - -private func encodeIfPossible(_ object: T) -> Any { - if let encodableObject = object as? JSONEncodable { - return encodableObject.encodeToJSON() - } else { - return object as Any - } -} - -extension Array: JSONEncodable { - func encodeToJSON() -> Any { - return self.map(encodeIfPossible) - } -} - -extension Dictionary: JSONEncodable { - func encodeToJSON() -> Any { - var dictionary = [AnyHashable: Any]() - for (key, value) in self { - dictionary[key] = encodeIfPossible(value) - } - return dictionary as Any - } -} - -extension Data: JSONEncodable { - func encodeToJSON() -> Any { - return self.base64EncodedString(options: Data.Base64EncodingOptions()) - } -} - -extension Date: JSONEncodable { - func encodeToJSON() -> Any { - return CodableHelper.dateFormatter.string(from: self) as Any - } -} - -extension URL: JSONEncodable { - func encodeToJSON() -> Any { - return self - } -} - -extension UUID: JSONEncodable { - func encodeToJSON() -> Any { - return self.uuidString - } -} - -extension String: CodingKey { - - public var stringValue: String { - return self - } - - public init?(stringValue: String) { - self.init(stringLiteral: stringValue) - } - - public var intValue: Int? { - return nil - } - - public init?(intValue: Int) { - return nil - } - -} - -extension KeyedEncodingContainerProtocol { - - public mutating func encodeArray(_ values: [T], forKey key: Self.Key) throws where T: Encodable { - var arrayContainer = nestedUnkeyedContainer(forKey: key) - try arrayContainer.encode(contentsOf: values) - } - - public mutating func encodeArrayIfPresent(_ values: [T]?, forKey key: Self.Key) throws where T: Encodable { - if let values = values { - try encodeArray(values, forKey: key) - } - } - - public mutating func encodeMap(_ pairs: [Self.Key: T]) throws where T: Encodable { - for (key, value) in pairs { - try encode(value, forKey: key) - } - } - - public mutating func encodeMapIfPresent(_ pairs: [Self.Key: T]?) throws where T: Encodable { - if let pairs = pairs { - try encodeMap(pairs) - } - } - -} - -extension KeyedDecodingContainerProtocol { - - public func decodeArray(_ type: T.Type, forKey key: Self.Key) throws -> [T] where T: Decodable { - var tmpArray = [T]() - - var nestedContainer = try nestedUnkeyedContainer(forKey: key) - while !nestedContainer.isAtEnd { - let arrayValue = try nestedContainer.decode(T.self) - tmpArray.append(arrayValue) - } - - return tmpArray - } - - public func decodeArrayIfPresent(_ type: T.Type, forKey key: Self.Key) throws -> [T]? where T: Decodable { - var tmpArray: [T]? - - if contains(key) { - tmpArray = try decodeArray(T.self, forKey: key) - } - - return tmpArray - } - - public func decodeMap(_ type: T.Type, excludedKeys: Set) throws -> [Self.Key: T] where T: Decodable { - var map: [Self.Key: T] = [:] - - for key in allKeys { - if !excludedKeys.contains(key) { - let value = try decode(T.self, forKey: key) - map[key] = value - } - } - - return map - } - -} diff --git a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/JSONEncodableEncoding.swift b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/JSONEncodableEncoding.swift deleted file mode 100644 index fb76bbed26f7..000000000000 --- a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/JSONEncodableEncoding.swift +++ /dev/null @@ -1,54 +0,0 @@ -// -// JSONDataEncoding.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -import Alamofire - -public struct JSONDataEncoding: ParameterEncoding { - - // MARK: Properties - - private static let jsonDataKey = "jsonData" - - // MARK: Encoding - - /// Creates a URL request by encoding parameters and applying them onto an existing request. - /// - /// - parameter urlRequest: The request to have parameters applied. - /// - parameter parameters: The parameters to apply. This should have a single key/value - /// pair with "jsonData" as the key and a Data object as the value. - /// - /// - throws: An `Error` if the encoding process encounters an error. - /// - /// - returns: The encoded request. - public func encode(_ urlRequest: URLRequestConvertible, with parameters: Parameters?) throws -> URLRequest { - var urlRequest = try urlRequest.asURLRequest() - - guard let jsonData = parameters?[JSONDataEncoding.jsonDataKey] as? Data, !jsonData.isEmpty else { - return urlRequest - } - - if urlRequest.value(forHTTPHeaderField: "Content-Type") == nil { - urlRequest.setValue("application/json", forHTTPHeaderField: "Content-Type") - } - - urlRequest.httpBody = jsonData - - return urlRequest - } - - public static func encodingParameters(jsonData: Data?) -> Parameters? { - var returnedParams: Parameters? - if let jsonData = jsonData, !jsonData.isEmpty { - var params = Parameters() - params[jsonDataKey] = jsonData - returnedParams = params - } - return returnedParams - } - -} diff --git a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift deleted file mode 100644 index 827bdec87782..000000000000 --- a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift +++ /dev/null @@ -1,43 +0,0 @@ -// -// JSONEncodingHelper.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -import Alamofire - -open class JSONEncodingHelper { - - open class func encodingParameters(forEncodableObject encodableObj: T?) -> Parameters? { - var params: Parameters? - - // Encode the Encodable object - if let encodableObj = encodableObj { - let encodeResult = CodableHelper.encode(encodableObj) - if encodeResult.error == nil { - params = JSONDataEncoding.encodingParameters(jsonData: encodeResult.data) - } - } - - return params - } - - open class func encodingParameters(forEncodableObject encodableObj: Any?) -> Parameters? { - var params: Parameters? - - if let encodableObj = encodableObj { - do { - let data = try JSONSerialization.data(withJSONObject: encodableObj, options: .prettyPrinted) - params = JSONDataEncoding.encodingParameters(jsonData: data) - } catch { - print(error) - return nil - } - } - - return params - } - -} diff --git a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift deleted file mode 100644 index 25161165865e..000000000000 --- a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift +++ /dev/null @@ -1,36 +0,0 @@ -// Models.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -protocol JSONEncodable { - func encodeToJSON() -> Any -} - -public enum ErrorResponse: Error { - case error(Int, Data?, Error) -} - -open class Response { - public let statusCode: Int - public let header: [String: String] - public let body: T? - - public init(statusCode: Int, header: [String: String], body: T?) { - self.statusCode = statusCode - self.header = header - self.body = body - } - - public convenience init(response: HTTPURLResponse, body: T?) { - let rawHeader = response.allHeaderFields - var header = [String: String]() - for case let (key, value) as (String, String) in rawHeader { - header[key] = value - } - self.init(statusCode: response.statusCode, header: header, body: body) - } -} diff --git a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift deleted file mode 100644 index 83a06951ccd6..000000000000 --- a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift +++ /dev/null @@ -1,25 +0,0 @@ -// -// AdditionalPropertiesClass.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct AdditionalPropertiesClass: Codable { - - public var mapString: [String: String]? - public var mapMapString: [String: [String: String]]? - - public init(mapString: [String: String]?, mapMapString: [String: [String: String]]?) { - self.mapString = mapString - self.mapMapString = mapMapString - } - - public enum CodingKeys: String, CodingKey { - case mapString = "map_string" - case mapMapString = "map_map_string" - } - -} diff --git a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift deleted file mode 100644 index 5ed9f31e2a36..000000000000 --- a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift +++ /dev/null @@ -1,20 +0,0 @@ -// -// Animal.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct Animal: Codable { - - public var className: String - public var color: String? = "red" - - public init(className: String, color: String?) { - self.className = className - self.color = color - } - -} diff --git a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift deleted file mode 100644 index e09b0e9efdc8..000000000000 --- a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift +++ /dev/null @@ -1,10 +0,0 @@ -// -// AnimalFarm.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public typealias AnimalFarm = [Animal] diff --git a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift deleted file mode 100644 index ec270da89074..000000000000 --- a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift +++ /dev/null @@ -1,22 +0,0 @@ -// -// ApiResponse.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct ApiResponse: Codable { - - public var code: Int? - public var type: String? - public var message: String? - - public init(code: Int?, type: String?, message: String?) { - self.code = code - self.type = type - self.message = message - } - -} diff --git a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift deleted file mode 100644 index 3843287630b1..000000000000 --- a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift +++ /dev/null @@ -1,22 +0,0 @@ -// -// ArrayOfArrayOfNumberOnly.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct ArrayOfArrayOfNumberOnly: Codable { - - public var arrayArrayNumber: [[Double]]? - - public init(arrayArrayNumber: [[Double]]?) { - self.arrayArrayNumber = arrayArrayNumber - } - - public enum CodingKeys: String, CodingKey { - case arrayArrayNumber = "ArrayArrayNumber" - } - -} diff --git a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift deleted file mode 100644 index f8b198e81f50..000000000000 --- a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift +++ /dev/null @@ -1,22 +0,0 @@ -// -// ArrayOfNumberOnly.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct ArrayOfNumberOnly: Codable { - - public var arrayNumber: [Double]? - - public init(arrayNumber: [Double]?) { - self.arrayNumber = arrayNumber - } - - public enum CodingKeys: String, CodingKey { - case arrayNumber = "ArrayNumber" - } - -} diff --git a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift deleted file mode 100644 index 67f7f7e5151f..000000000000 --- a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift +++ /dev/null @@ -1,28 +0,0 @@ -// -// ArrayTest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct ArrayTest: Codable { - - public var arrayOfString: [String]? - public var arrayArrayOfInteger: [[Int64]]? - public var arrayArrayOfModel: [[ReadOnlyFirst]]? - - public init(arrayOfString: [String]?, arrayArrayOfInteger: [[Int64]]?, arrayArrayOfModel: [[ReadOnlyFirst]]?) { - self.arrayOfString = arrayOfString - self.arrayArrayOfInteger = arrayArrayOfInteger - self.arrayArrayOfModel = arrayArrayOfModel - } - - public enum CodingKeys: String, CodingKey { - case arrayOfString = "array_of_string" - case arrayArrayOfInteger = "array_array_of_integer" - case arrayArrayOfModel = "array_array_of_model" - } - -} diff --git a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift deleted file mode 100644 index d576b50b1c9c..000000000000 --- a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift +++ /dev/null @@ -1,38 +0,0 @@ -// -// Capitalization.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct Capitalization: Codable { - - public var smallCamel: String? - public var capitalCamel: String? - public var smallSnake: String? - public var capitalSnake: String? - public var sCAETHFlowPoints: String? - /** Name of the pet */ - public var ATT_NAME: String? - - public init(smallCamel: String?, capitalCamel: String?, smallSnake: String?, capitalSnake: String?, sCAETHFlowPoints: String?, ATT_NAME: String?) { - self.smallCamel = smallCamel - self.capitalCamel = capitalCamel - self.smallSnake = smallSnake - self.capitalSnake = capitalSnake - self.sCAETHFlowPoints = sCAETHFlowPoints - self.ATT_NAME = ATT_NAME - } - - public enum CodingKeys: String, CodingKey { - case smallCamel - case capitalCamel = "CapitalCamel" - case smallSnake = "small_Snake" - case capitalSnake = "Capital_Snake" - case sCAETHFlowPoints = "SCA_ETH_Flow_Points" - case ATT_NAME - } - -} diff --git a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift deleted file mode 100644 index 7ab887f3113f..000000000000 --- a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift +++ /dev/null @@ -1,22 +0,0 @@ -// -// Cat.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct Cat: Codable { - - public var className: String - public var color: String? = "red" - public var declawed: Bool? - - public init(className: String, color: String?, declawed: Bool?) { - self.className = className - self.color = color - self.declawed = declawed - } - -} diff --git a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift deleted file mode 100644 index a51ad0dffab1..000000000000 --- a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift +++ /dev/null @@ -1,18 +0,0 @@ -// -// CatAllOf.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct CatAllOf: Codable { - - public var declawed: Bool? - - public init(declawed: Bool?) { - self.declawed = declawed - } - -} diff --git a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Category.swift b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Category.swift deleted file mode 100644 index eb8f7e5e1974..000000000000 --- a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Category.swift +++ /dev/null @@ -1,20 +0,0 @@ -// -// Category.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct Category: Codable { - - public var id: Int64? - public var name: String = "default-name" - - public init(id: Int64?, name: String) { - self.id = id - self.name = name - } - -} diff --git a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift deleted file mode 100644 index e2a7d4427a06..000000000000 --- a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift +++ /dev/null @@ -1,19 +0,0 @@ -// -// ClassModel.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -/** Model for testing model with \"_class\" property */ -public struct ClassModel: Codable { - - public var _class: String? - - public init(_class: String?) { - self._class = _class - } - -} diff --git a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Client.swift b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Client.swift deleted file mode 100644 index 00245ca37280..000000000000 --- a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Client.swift +++ /dev/null @@ -1,18 +0,0 @@ -// -// Client.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct Client: Codable { - - public var client: String? - - public init(client: String?) { - self.client = client - } - -} diff --git a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift deleted file mode 100644 index 492c1228008e..000000000000 --- a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift +++ /dev/null @@ -1,22 +0,0 @@ -// -// Dog.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct Dog: Codable { - - public var className: String - public var color: String? = "red" - public var breed: String? - - public init(className: String, color: String?, breed: String?) { - self.className = className - self.color = color - self.breed = breed - } - -} diff --git a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift deleted file mode 100644 index 7786f8acc5ae..000000000000 --- a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift +++ /dev/null @@ -1,18 +0,0 @@ -// -// DogAllOf.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct DogAllOf: Codable { - - public var breed: String? - - public init(breed: String?) { - self.breed = breed - } - -} diff --git a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift deleted file mode 100644 index 5034ff0b8c68..000000000000 --- a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift +++ /dev/null @@ -1,33 +0,0 @@ -// -// EnumArrays.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct EnumArrays: Codable { - - public enum JustSymbol: String, Codable { - case greaterThanOrEqualTo = ">=" - case dollar = "$" - } - public enum ArrayEnum: String, Codable { - case fish = "fish" - case crab = "crab" - } - public var justSymbol: JustSymbol? - public var arrayEnum: [ArrayEnum]? - - public init(justSymbol: JustSymbol?, arrayEnum: [ArrayEnum]?) { - self.justSymbol = justSymbol - self.arrayEnum = arrayEnum - } - - public enum CodingKeys: String, CodingKey { - case justSymbol = "just_symbol" - case arrayEnum = "array_enum" - } - -} diff --git a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift deleted file mode 100644 index 3c1dfcac577d..000000000000 --- a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift +++ /dev/null @@ -1,14 +0,0 @@ -// -// EnumClass.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public enum EnumClass: String, Codable { - case abc = "_abc" - case efg = "-efg" - case xyz = "(xyz)" -} diff --git a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift deleted file mode 100644 index 6db9b34d183b..000000000000 --- a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift +++ /dev/null @@ -1,52 +0,0 @@ -// -// EnumTest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct EnumTest: Codable { - - public enum EnumString: String, Codable { - case upper = "UPPER" - case lower = "lower" - case empty = "" - } - public enum EnumStringRequired: String, Codable { - case upper = "UPPER" - case lower = "lower" - case empty = "" - } - public enum EnumInteger: Int, Codable { - case _1 = 1 - case number1 = -1 - } - public enum EnumNumber: Double, Codable { - case _11 = 1.1 - case number12 = -1.2 - } - public var enumString: EnumString? - public var enumStringRequired: EnumStringRequired - public var enumInteger: EnumInteger? - public var enumNumber: EnumNumber? - public var outerEnum: OuterEnum? - - public init(enumString: EnumString?, enumStringRequired: EnumStringRequired, enumInteger: EnumInteger?, enumNumber: EnumNumber?, outerEnum: OuterEnum?) { - self.enumString = enumString - self.enumStringRequired = enumStringRequired - self.enumInteger = enumInteger - self.enumNumber = enumNumber - self.outerEnum = outerEnum - } - - public enum CodingKeys: String, CodingKey { - case enumString = "enum_string" - case enumStringRequired = "enum_string_required" - case enumInteger = "enum_integer" - case enumNumber = "enum_number" - case outerEnum - } - -} diff --git a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/File.swift b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/File.swift deleted file mode 100644 index abf3ccffc485..000000000000 --- a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/File.swift +++ /dev/null @@ -1,20 +0,0 @@ -// -// File.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -/** Must be named `File` for test. */ -public struct File: Codable { - - /** Test capitalization */ - public var sourceURI: String? - - public init(sourceURI: String?) { - self.sourceURI = sourceURI - } - -} diff --git a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift deleted file mode 100644 index 532f1457939a..000000000000 --- a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift +++ /dev/null @@ -1,20 +0,0 @@ -// -// FileSchemaTestClass.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct FileSchemaTestClass: Codable { - - public var file: File? - public var files: [File]? - - public init(file: File?, files: [File]?) { - self.file = file - self.files = files - } - -} diff --git a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift deleted file mode 100644 index 20bd6d103b3d..000000000000 --- a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift +++ /dev/null @@ -1,42 +0,0 @@ -// -// FormatTest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct FormatTest: Codable { - - public var integer: Int? - public var int32: Int? - public var int64: Int64? - public var number: Double - public var float: Float? - public var double: Double? - public var string: String? - public var byte: Data - public var binary: URL? - public var date: Date - public var dateTime: Date? - public var uuid: UUID? - public var password: String - - public init(integer: Int?, int32: Int?, int64: Int64?, number: Double, float: Float?, double: Double?, string: String?, byte: Data, binary: URL?, date: Date, dateTime: Date?, uuid: UUID?, password: String) { - self.integer = integer - self.int32 = int32 - self.int64 = int64 - self.number = number - self.float = float - self.double = double - self.string = string - self.byte = byte - self.binary = binary - self.date = date - self.dateTime = dateTime - self.uuid = uuid - self.password = password - } - -} diff --git a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift deleted file mode 100644 index 906ddb06fb17..000000000000 --- a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift +++ /dev/null @@ -1,20 +0,0 @@ -// -// HasOnlyReadOnly.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct HasOnlyReadOnly: Codable { - - public var bar: String? - public var foo: String? - - public init(bar: String?, foo: String?) { - self.bar = bar - self.foo = foo - } - -} diff --git a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/List.swift b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/List.swift deleted file mode 100644 index 08d59953873e..000000000000 --- a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/List.swift +++ /dev/null @@ -1,22 +0,0 @@ -// -// List.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct List: Codable { - - public var _123list: String? - - public init(_123list: String?) { - self._123list = _123list - } - - public enum CodingKeys: String, CodingKey { - case _123list = "123-list" - } - -} diff --git a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift deleted file mode 100644 index 3a10a7dfcaf6..000000000000 --- a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift +++ /dev/null @@ -1,35 +0,0 @@ -// -// MapTest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct MapTest: Codable { - - public enum MapOfEnumString: String, Codable { - case upper = "UPPER" - case lower = "lower" - } - public var mapMapOfString: [String: [String: String]]? - public var mapOfEnumString: [String: String]? - public var directMap: [String: Bool]? - public var indirectMap: StringBooleanMap? - - public init(mapMapOfString: [String: [String: String]]?, mapOfEnumString: [String: String]?, directMap: [String: Bool]?, indirectMap: StringBooleanMap?) { - self.mapMapOfString = mapMapOfString - self.mapOfEnumString = mapOfEnumString - self.directMap = directMap - self.indirectMap = indirectMap - } - - public enum CodingKeys: String, CodingKey { - case mapMapOfString = "map_map_of_string" - case mapOfEnumString = "map_of_enum_string" - case directMap = "direct_map" - case indirectMap = "indirect_map" - } - -} diff --git a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift deleted file mode 100644 index c3deb2f28932..000000000000 --- a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift +++ /dev/null @@ -1,22 +0,0 @@ -// -// MixedPropertiesAndAdditionalPropertiesClass.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct MixedPropertiesAndAdditionalPropertiesClass: Codable { - - public var uuid: UUID? - public var dateTime: Date? - public var map: [String: Animal]? - - public init(uuid: UUID?, dateTime: Date?, map: [String: Animal]?) { - self.uuid = uuid - self.dateTime = dateTime - self.map = map - } - -} diff --git a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift deleted file mode 100644 index 78917d75b44d..000000000000 --- a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift +++ /dev/null @@ -1,26 +0,0 @@ -// -// Model200Response.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -/** Model for testing model name starting with number */ -public struct Model200Response: Codable { - - public var name: Int? - public var _class: String? - - public init(name: Int?, _class: String?) { - self.name = name - self._class = _class - } - - public enum CodingKeys: String, CodingKey { - case name - case _class = "class" - } - -} diff --git a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift deleted file mode 100644 index 43c4891e1e23..000000000000 --- a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift +++ /dev/null @@ -1,32 +0,0 @@ -// -// Name.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -/** Model for testing model name same as property name */ -public struct Name: Codable { - - public var name: Int - public var snakeCase: Int? - public var property: String? - public var _123number: Int? - - public init(name: Int, snakeCase: Int?, property: String?, _123number: Int?) { - self.name = name - self.snakeCase = snakeCase - self.property = property - self._123number = _123number - } - - public enum CodingKeys: String, CodingKey { - case name - case snakeCase = "snake_case" - case property - case _123number = "123Number" - } - -} diff --git a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift deleted file mode 100644 index abd2269e8e76..000000000000 --- a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift +++ /dev/null @@ -1,22 +0,0 @@ -// -// NumberOnly.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct NumberOnly: Codable { - - public var justNumber: Double? - - public init(justNumber: Double?) { - self.justNumber = justNumber - } - - public enum CodingKeys: String, CodingKey { - case justNumber = "JustNumber" - } - -} diff --git a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Order.swift b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Order.swift deleted file mode 100644 index a6e1b1d2e5e4..000000000000 --- a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Order.swift +++ /dev/null @@ -1,34 +0,0 @@ -// -// Order.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct Order: Codable { - - public enum Status: String, Codable { - case placed = "placed" - case approved = "approved" - case delivered = "delivered" - } - public var id: Int64? - public var petId: Int64? - public var quantity: Int? - public var shipDate: Date? - /** Order Status */ - public var status: Status? - public var complete: Bool? = false - - public init(id: Int64?, petId: Int64?, quantity: Int?, shipDate: Date?, status: Status?, complete: Bool?) { - self.id = id - self.petId = petId - self.quantity = quantity - self.shipDate = shipDate - self.status = status - self.complete = complete - } - -} diff --git a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift deleted file mode 100644 index 49aec001c5db..000000000000 --- a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift +++ /dev/null @@ -1,28 +0,0 @@ -// -// OuterComposite.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct OuterComposite: Codable { - - public var myNumber: Double? - public var myString: String? - public var myBoolean: Bool? - - public init(myNumber: Double?, myString: String?, myBoolean: Bool?) { - self.myNumber = myNumber - self.myString = myString - self.myBoolean = myBoolean - } - - public enum CodingKeys: String, CodingKey { - case myNumber = "my_number" - case myString = "my_string" - case myBoolean = "my_boolean" - } - -} diff --git a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift deleted file mode 100644 index 9f80fc95ecf0..000000000000 --- a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift +++ /dev/null @@ -1,14 +0,0 @@ -// -// OuterEnum.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public enum OuterEnum: String, Codable { - case placed = "placed" - case approved = "approved" - case delivered = "delivered" -} diff --git a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift deleted file mode 100644 index af60a550bb19..000000000000 --- a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift +++ /dev/null @@ -1,34 +0,0 @@ -// -// Pet.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct Pet: Codable { - - public enum Status: String, Codable { - case available = "available" - case pending = "pending" - case sold = "sold" - } - public var id: Int64? - public var category: Category? - public var name: String - public var photoUrls: [String] - public var tags: [Tag]? - /** pet status in the store */ - public var status: Status? - - public init(id: Int64?, category: Category?, name: String, photoUrls: [String], tags: [Tag]?, status: Status?) { - self.id = id - self.category = category - self.name = name - self.photoUrls = photoUrls - self.tags = tags - self.status = status - } - -} diff --git a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift deleted file mode 100644 index 0acd21fd1000..000000000000 --- a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift +++ /dev/null @@ -1,20 +0,0 @@ -// -// ReadOnlyFirst.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct ReadOnlyFirst: Codable { - - public var bar: String? - public var baz: String? - - public init(bar: String?, baz: String?) { - self.bar = bar - self.baz = baz - } - -} diff --git a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Return.swift b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Return.swift deleted file mode 100644 index b34ddc68142d..000000000000 --- a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Return.swift +++ /dev/null @@ -1,23 +0,0 @@ -// -// Return.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -/** Model for testing reserved words */ -public struct Return: Codable { - - public var _return: Int? - - public init(_return: Int?) { - self._return = _return - } - - public enum CodingKeys: String, CodingKey { - case _return = "return" - } - -} diff --git a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift deleted file mode 100644 index e79fc45c0e91..000000000000 --- a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift +++ /dev/null @@ -1,22 +0,0 @@ -// -// SpecialModelName.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct SpecialModelName: Codable { - - public var specialPropertyName: Int64? - - public init(specialPropertyName: Int64?) { - self.specialPropertyName = specialPropertyName - } - - public enum CodingKeys: String, CodingKey { - case specialPropertyName = "$special[property.name]" - } - -} diff --git a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift deleted file mode 100644 index 3f1237fee477..000000000000 --- a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift +++ /dev/null @@ -1,45 +0,0 @@ -// -// StringBooleanMap.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct StringBooleanMap: Codable { - - public var additionalProperties: [String: Bool] = [:] - - public subscript(key: String) -> Bool? { - get { - if let value = additionalProperties[key] { - return value - } - return nil - } - - set { - additionalProperties[key] = newValue - } - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - try container.encodeMap(additionalProperties) - } - - // Decodable protocol methods - - public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - var nonAdditionalPropertyKeys = Set() - additionalProperties = try container.decodeMap(Bool.self, excludedKeys: nonAdditionalPropertyKeys) - } - -} diff --git a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift deleted file mode 100644 index 4dd8a9a9f5a0..000000000000 --- a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift +++ /dev/null @@ -1,20 +0,0 @@ -// -// Tag.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct Tag: Codable { - - public var id: Int64? - public var name: String? - - public init(id: Int64?, name: String?) { - self.id = id - self.name = name - } - -} diff --git a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift deleted file mode 100644 index bf0006e1a266..000000000000 --- a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift +++ /dev/null @@ -1,34 +0,0 @@ -// -// TypeHolderDefault.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct TypeHolderDefault: Codable { - - public var stringItem: String = "what" - public var numberItem: Double - public var integerItem: Int - public var boolItem: Bool = true - public var arrayItem: [Int] - - public init(stringItem: String, numberItem: Double, integerItem: Int, boolItem: Bool, arrayItem: [Int]) { - self.stringItem = stringItem - self.numberItem = numberItem - self.integerItem = integerItem - self.boolItem = boolItem - self.arrayItem = arrayItem - } - - public enum CodingKeys: String, CodingKey { - case stringItem = "string_item" - case numberItem = "number_item" - case integerItem = "integer_item" - case boolItem = "bool_item" - case arrayItem = "array_item" - } - -} diff --git a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift deleted file mode 100644 index 602a2a6d185a..000000000000 --- a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift +++ /dev/null @@ -1,34 +0,0 @@ -// -// TypeHolderExample.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct TypeHolderExample: Codable { - - public var stringItem: String - public var numberItem: Double - public var integerItem: Int - public var boolItem: Bool - public var arrayItem: [Int] - - public init(stringItem: String, numberItem: Double, integerItem: Int, boolItem: Bool, arrayItem: [Int]) { - self.stringItem = stringItem - self.numberItem = numberItem - self.integerItem = integerItem - self.boolItem = boolItem - self.arrayItem = arrayItem - } - - public enum CodingKeys: String, CodingKey { - case stringItem = "string_item" - case numberItem = "number_item" - case integerItem = "integer_item" - case boolItem = "bool_item" - case arrayItem = "array_item" - } - -} diff --git a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/User.swift b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/User.swift deleted file mode 100644 index 79f271ed7356..000000000000 --- a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/User.swift +++ /dev/null @@ -1,33 +0,0 @@ -// -// User.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct User: Codable { - - public var id: Int64? - public var username: String? - public var firstName: String? - public var lastName: String? - public var email: String? - public var password: String? - public var phone: String? - /** User Status */ - public var userStatus: Int? - - public init(id: Int64?, username: String?, firstName: String?, lastName: String?, email: String?, password: String?, phone: String?, userStatus: Int?) { - self.id = id - self.username = username - self.firstName = firstName - self.lastName = lastName - self.email = email - self.password = password - self.phone = phone - self.userStatus = userStatus - } - -} diff --git a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Result.swift b/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Result.swift deleted file mode 100644 index 06477859ae11..000000000000 --- a/samples/client/petstore/swift4/resultLibrary/PetstoreClient/Classes/OpenAPIs/Result.swift +++ /dev/null @@ -1,17 +0,0 @@ -// -// Result.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -#if swift(<5) - -public enum Result { - case success(Value) - case failure(Error) -} - -#endif diff --git a/samples/client/petstore/swift4/resultLibrary/README.md b/samples/client/petstore/swift4/resultLibrary/README.md deleted file mode 100644 index bd093317bd7a..000000000000 --- a/samples/client/petstore/swift4/resultLibrary/README.md +++ /dev/null @@ -1,141 +0,0 @@ -# Swift4 API client for PetstoreClient - -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 API client 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 an API client. - -- API version: 1.0.0 -- Package version: -- Build package: org.openapitools.codegen.languages.Swift4Codegen - -## Installation - -### Carthage - -Run `carthage update` - -### CocoaPods - -Run `pod install` - -## Documentation for API Endpoints - -All URIs are relative to *http://petstore.swagger.io:80/v2* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*AnotherFakeAPI* | [**call123testSpecialTags**](docs/AnotherFakeAPI.md#call123testspecialtags) | **PATCH** /another-fake/dummy | To test special tags -*FakeAPI* | [**fakeOuterBooleanSerialize**](docs/FakeAPI.md#fakeouterbooleanserialize) | **POST** /fake/outer/boolean | -*FakeAPI* | [**fakeOuterCompositeSerialize**](docs/FakeAPI.md#fakeoutercompositeserialize) | **POST** /fake/outer/composite | -*FakeAPI* | [**fakeOuterNumberSerialize**](docs/FakeAPI.md#fakeouternumberserialize) | **POST** /fake/outer/number | -*FakeAPI* | [**fakeOuterStringSerialize**](docs/FakeAPI.md#fakeouterstringserialize) | **POST** /fake/outer/string | -*FakeAPI* | [**testBodyWithFileSchema**](docs/FakeAPI.md#testbodywithfileschema) | **PUT** /fake/body-with-file-schema | -*FakeAPI* | [**testBodyWithQueryParams**](docs/FakeAPI.md#testbodywithqueryparams) | **PUT** /fake/body-with-query-params | -*FakeAPI* | [**testClientModel**](docs/FakeAPI.md#testclientmodel) | **PATCH** /fake | To test \"client\" model -*FakeAPI* | [**testEndpointParameters**](docs/FakeAPI.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 -*FakeAPI* | [**testEnumParameters**](docs/FakeAPI.md#testenumparameters) | **GET** /fake | To test enum parameters -*FakeAPI* | [**testGroupParameters**](docs/FakeAPI.md#testgroupparameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) -*FakeAPI* | [**testInlineAdditionalProperties**](docs/FakeAPI.md#testinlineadditionalproperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties -*FakeAPI* | [**testJsonFormData**](docs/FakeAPI.md#testjsonformdata) | **GET** /fake/jsonFormData | test json serialization of form data -*FakeClassnameTags123API* | [**testClassname**](docs/FakeClassnameTags123API.md#testclassname) | **PATCH** /fake_classname_test | To test class name in snake case -*PetAPI* | [**addPet**](docs/PetAPI.md#addpet) | **POST** /pet | Add a new pet to the store -*PetAPI* | [**deletePet**](docs/PetAPI.md#deletepet) | **DELETE** /pet/{petId} | Deletes a pet -*PetAPI* | [**findPetsByStatus**](docs/PetAPI.md#findpetsbystatus) | **GET** /pet/findByStatus | Finds Pets by status -*PetAPI* | [**findPetsByTags**](docs/PetAPI.md#findpetsbytags) | **GET** /pet/findByTags | Finds Pets by tags -*PetAPI* | [**getPetById**](docs/PetAPI.md#getpetbyid) | **GET** /pet/{petId} | Find pet by ID -*PetAPI* | [**updatePet**](docs/PetAPI.md#updatepet) | **PUT** /pet | Update an existing pet -*PetAPI* | [**updatePetWithForm**](docs/PetAPI.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data -*PetAPI* | [**uploadFile**](docs/PetAPI.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image -*PetAPI* | [**uploadFileWithRequiredFile**](docs/PetAPI.md#uploadfilewithrequiredfile) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required) -*StoreAPI* | [**deleteOrder**](docs/StoreAPI.md#deleteorder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID -*StoreAPI* | [**getInventory**](docs/StoreAPI.md#getinventory) | **GET** /store/inventory | Returns pet inventories by status -*StoreAPI* | [**getOrderById**](docs/StoreAPI.md#getorderbyid) | **GET** /store/order/{order_id} | Find purchase order by ID -*StoreAPI* | [**placeOrder**](docs/StoreAPI.md#placeorder) | **POST** /store/order | Place an order for a pet -*UserAPI* | [**createUser**](docs/UserAPI.md#createuser) | **POST** /user | Create user -*UserAPI* | [**createUsersWithArrayInput**](docs/UserAPI.md#createuserswitharrayinput) | **POST** /user/createWithArray | Creates list of users with given input array -*UserAPI* | [**createUsersWithListInput**](docs/UserAPI.md#createuserswithlistinput) | **POST** /user/createWithList | Creates list of users with given input array -*UserAPI* | [**deleteUser**](docs/UserAPI.md#deleteuser) | **DELETE** /user/{username} | Delete user -*UserAPI* | [**getUserByName**](docs/UserAPI.md#getuserbyname) | **GET** /user/{username} | Get user by user name -*UserAPI* | [**loginUser**](docs/UserAPI.md#loginuser) | **GET** /user/login | Logs user into the system -*UserAPI* | [**logoutUser**](docs/UserAPI.md#logoutuser) | **GET** /user/logout | Logs out current logged in user session -*UserAPI* | [**updateUser**](docs/UserAPI.md#updateuser) | **PUT** /user/{username} | Updated user - - -## Documentation For Models - - - [AdditionalPropertiesClass](docs/AdditionalPropertiesClass.md) - - [Animal](docs/Animal.md) - - [AnimalFarm](docs/AnimalFarm.md) - - [ApiResponse](docs/ApiResponse.md) - - [ArrayOfArrayOfNumberOnly](docs/ArrayOfArrayOfNumberOnly.md) - - [ArrayOfNumberOnly](docs/ArrayOfNumberOnly.md) - - [ArrayTest](docs/ArrayTest.md) - - [Capitalization](docs/Capitalization.md) - - [Cat](docs/Cat.md) - - [CatAllOf](docs/CatAllOf.md) - - [Category](docs/Category.md) - - [ClassModel](docs/ClassModel.md) - - [Client](docs/Client.md) - - [Dog](docs/Dog.md) - - [DogAllOf](docs/DogAllOf.md) - - [EnumArrays](docs/EnumArrays.md) - - [EnumClass](docs/EnumClass.md) - - [EnumTest](docs/EnumTest.md) - - [File](docs/File.md) - - [FileSchemaTestClass](docs/FileSchemaTestClass.md) - - [FormatTest](docs/FormatTest.md) - - [HasOnlyReadOnly](docs/HasOnlyReadOnly.md) - - [List](docs/List.md) - - [MapTest](docs/MapTest.md) - - [MixedPropertiesAndAdditionalPropertiesClass](docs/MixedPropertiesAndAdditionalPropertiesClass.md) - - [Model200Response](docs/Model200Response.md) - - [Name](docs/Name.md) - - [NumberOnly](docs/NumberOnly.md) - - [Order](docs/Order.md) - - [OuterComposite](docs/OuterComposite.md) - - [OuterEnum](docs/OuterEnum.md) - - [Pet](docs/Pet.md) - - [ReadOnlyFirst](docs/ReadOnlyFirst.md) - - [Return](docs/Return.md) - - [SpecialModelName](docs/SpecialModelName.md) - - [StringBooleanMap](docs/StringBooleanMap.md) - - [Tag](docs/Tag.md) - - [TypeHolderDefault](docs/TypeHolderDefault.md) - - [TypeHolderExample](docs/TypeHolderExample.md) - - [User](docs/User.md) - - -## Documentation For Authorization - - -## api_key - -- **Type**: API key -- **API key parameter name**: api_key -- **Location**: HTTP header - -## api_key_query - -- **Type**: API key -- **API key parameter name**: api_key_query -- **Location**: URL query string - -## http_basic_test - -- **Type**: HTTP basic authentication - -## petstore_auth - -- **Type**: OAuth -- **Flow**: implicit -- **Authorization URL**: http://petstore.swagger.io/api/oauth/dialog -- **Scopes**: - - **write:pets**: modify pets in your account - - **read:pets**: read your pets - - -## Author - - - diff --git a/samples/client/petstore/swift4/resultLibrary/docs/AdditionalPropertiesClass.md b/samples/client/petstore/swift4/resultLibrary/docs/AdditionalPropertiesClass.md deleted file mode 100644 index e22d28be1de6..000000000000 --- a/samples/client/petstore/swift4/resultLibrary/docs/AdditionalPropertiesClass.md +++ /dev/null @@ -1,11 +0,0 @@ -# AdditionalPropertiesClass - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**mapString** | **[String:String]** | | [optional] -**mapMapString** | [String:[String: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/swift4/resultLibrary/docs/Animal.md b/samples/client/petstore/swift4/resultLibrary/docs/Animal.md deleted file mode 100644 index 69c601455cd8..000000000000 --- a/samples/client/petstore/swift4/resultLibrary/docs/Animal.md +++ /dev/null @@ -1,11 +0,0 @@ -# Animal - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**className** | **String** | | -**color** | **String** | | [optional] [default to "red"] - -[[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/swift4/resultLibrary/docs/AnimalFarm.md b/samples/client/petstore/swift4/resultLibrary/docs/AnimalFarm.md deleted file mode 100644 index df6bab21dae8..000000000000 --- a/samples/client/petstore/swift4/resultLibrary/docs/AnimalFarm.md +++ /dev/null @@ -1,9 +0,0 @@ -# AnimalFarm - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/samples/client/petstore/swift4/resultLibrary/docs/AnotherFakeAPI.md b/samples/client/petstore/swift4/resultLibrary/docs/AnotherFakeAPI.md deleted file mode 100644 index aead5f1f980f..000000000000 --- a/samples/client/petstore/swift4/resultLibrary/docs/AnotherFakeAPI.md +++ /dev/null @@ -1,59 +0,0 @@ -# AnotherFakeAPI - -All URIs are relative to *http://petstore.swagger.io:80/v2* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**call123testSpecialTags**](AnotherFakeAPI.md#call123testspecialtags) | **PATCH** /another-fake/dummy | To test special tags - - -# **call123testSpecialTags** -```swift - open class func call123testSpecialTags(body: Client, completion: @escaping (_ data: Client?, _ error: Error?) -> Void) -``` - -To test special tags - -To test special tags and operation ID starting with number - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let body = Client(client: "client_example") // Client | client model - -// To test special tags -AnotherFakeAPI.call123testSpecialTags(body: body) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Client**](Client.md) | client model | - -### Return type - -[**Client**](Client.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **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/swift4/resultLibrary/docs/ApiResponse.md b/samples/client/petstore/swift4/resultLibrary/docs/ApiResponse.md deleted file mode 100644 index c6d9768fe9bf..000000000000 --- a/samples/client/petstore/swift4/resultLibrary/docs/ApiResponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# ApiResponse - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**code** | **Int** | | [optional] -**type** | **String** | | [optional] -**message** | **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/swift4/resultLibrary/docs/ArrayOfArrayOfNumberOnly.md b/samples/client/petstore/swift4/resultLibrary/docs/ArrayOfArrayOfNumberOnly.md deleted file mode 100644 index c6fceff5e08d..000000000000 --- a/samples/client/petstore/swift4/resultLibrary/docs/ArrayOfArrayOfNumberOnly.md +++ /dev/null @@ -1,10 +0,0 @@ -# ArrayOfArrayOfNumberOnly - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**arrayArrayNumber** | [[Double]] | | [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/swift4/resultLibrary/docs/ArrayOfNumberOnly.md b/samples/client/petstore/swift4/resultLibrary/docs/ArrayOfNumberOnly.md deleted file mode 100644 index f09f8fa6f70f..000000000000 --- a/samples/client/petstore/swift4/resultLibrary/docs/ArrayOfNumberOnly.md +++ /dev/null @@ -1,10 +0,0 @@ -# ArrayOfNumberOnly - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**arrayNumber** | **[Double]** | | [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/swift4/resultLibrary/docs/ArrayTest.md b/samples/client/petstore/swift4/resultLibrary/docs/ArrayTest.md deleted file mode 100644 index bf416b8330cc..000000000000 --- a/samples/client/petstore/swift4/resultLibrary/docs/ArrayTest.md +++ /dev/null @@ -1,12 +0,0 @@ -# ArrayTest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**arrayOfString** | **[String]** | | [optional] -**arrayArrayOfInteger** | [[Int64]] | | [optional] -**arrayArrayOfModel** | [[ReadOnlyFirst]] | | [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/swift4/resultLibrary/docs/Capitalization.md b/samples/client/petstore/swift4/resultLibrary/docs/Capitalization.md deleted file mode 100644 index 95374216c773..000000000000 --- a/samples/client/petstore/swift4/resultLibrary/docs/Capitalization.md +++ /dev/null @@ -1,15 +0,0 @@ -# Capitalization - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**smallCamel** | **String** | | [optional] -**capitalCamel** | **String** | | [optional] -**smallSnake** | **String** | | [optional] -**capitalSnake** | **String** | | [optional] -**sCAETHFlowPoints** | **String** | | [optional] -**ATT_NAME** | **String** | Name of the pet | [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/swift4/resultLibrary/docs/Cat.md b/samples/client/petstore/swift4/resultLibrary/docs/Cat.md deleted file mode 100644 index fb5949b15761..000000000000 --- a/samples/client/petstore/swift4/resultLibrary/docs/Cat.md +++ /dev/null @@ -1,10 +0,0 @@ -# Cat - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**declawed** | **Bool** | | [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/swift4/resultLibrary/docs/CatAllOf.md b/samples/client/petstore/swift4/resultLibrary/docs/CatAllOf.md deleted file mode 100644 index 79789be61c01..000000000000 --- a/samples/client/petstore/swift4/resultLibrary/docs/CatAllOf.md +++ /dev/null @@ -1,10 +0,0 @@ -# CatAllOf - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**declawed** | **Bool** | | [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/swift4/resultLibrary/docs/Category.md b/samples/client/petstore/swift4/resultLibrary/docs/Category.md deleted file mode 100644 index 5ca5408c0f96..000000000000 --- a/samples/client/petstore/swift4/resultLibrary/docs/Category.md +++ /dev/null @@ -1,11 +0,0 @@ -# Category - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Int64** | | [optional] -**name** | **String** | | [default to "default-name"] - -[[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/swift4/resultLibrary/docs/ClassModel.md b/samples/client/petstore/swift4/resultLibrary/docs/ClassModel.md deleted file mode 100644 index e3912fdf0fd5..000000000000 --- a/samples/client/petstore/swift4/resultLibrary/docs/ClassModel.md +++ /dev/null @@ -1,10 +0,0 @@ -# ClassModel - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**_class** | **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/swift4/resultLibrary/docs/Client.md b/samples/client/petstore/swift4/resultLibrary/docs/Client.md deleted file mode 100644 index 0de1b238c36f..000000000000 --- a/samples/client/petstore/swift4/resultLibrary/docs/Client.md +++ /dev/null @@ -1,10 +0,0 @@ -# Client - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**client** | **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/swift4/resultLibrary/docs/Dog.md b/samples/client/petstore/swift4/resultLibrary/docs/Dog.md deleted file mode 100644 index 4824786da049..000000000000 --- a/samples/client/petstore/swift4/resultLibrary/docs/Dog.md +++ /dev/null @@ -1,10 +0,0 @@ -# Dog - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**breed** | **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/swift4/resultLibrary/docs/DogAllOf.md b/samples/client/petstore/swift4/resultLibrary/docs/DogAllOf.md deleted file mode 100644 index 9302ef52e938..000000000000 --- a/samples/client/petstore/swift4/resultLibrary/docs/DogAllOf.md +++ /dev/null @@ -1,10 +0,0 @@ -# DogAllOf - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**breed** | **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/swift4/resultLibrary/docs/EnumArrays.md b/samples/client/petstore/swift4/resultLibrary/docs/EnumArrays.md deleted file mode 100644 index b9a9807d3c8e..000000000000 --- a/samples/client/petstore/swift4/resultLibrary/docs/EnumArrays.md +++ /dev/null @@ -1,11 +0,0 @@ -# EnumArrays - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**justSymbol** | **String** | | [optional] -**arrayEnum** | **[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/swift4/resultLibrary/docs/EnumClass.md b/samples/client/petstore/swift4/resultLibrary/docs/EnumClass.md deleted file mode 100644 index 67f017becd0c..000000000000 --- a/samples/client/petstore/swift4/resultLibrary/docs/EnumClass.md +++ /dev/null @@ -1,9 +0,0 @@ -# EnumClass - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/samples/client/petstore/swift4/resultLibrary/docs/EnumTest.md b/samples/client/petstore/swift4/resultLibrary/docs/EnumTest.md deleted file mode 100644 index bc9b036dd769..000000000000 --- a/samples/client/petstore/swift4/resultLibrary/docs/EnumTest.md +++ /dev/null @@ -1,14 +0,0 @@ -# EnumTest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**enumString** | **String** | | [optional] -**enumStringRequired** | **String** | | -**enumInteger** | **Int** | | [optional] -**enumNumber** | **Double** | | [optional] -**outerEnum** | [**OuterEnum**](OuterEnum.md) | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/samples/client/petstore/swift4/resultLibrary/docs/FakeAPI.md b/samples/client/petstore/swift4/resultLibrary/docs/FakeAPI.md deleted file mode 100644 index d0ab705d4e4b..000000000000 --- a/samples/client/petstore/swift4/resultLibrary/docs/FakeAPI.md +++ /dev/null @@ -1,662 +0,0 @@ -# FakeAPI - -All URIs are relative to *http://petstore.swagger.io:80/v2* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**fakeOuterBooleanSerialize**](FakeAPI.md#fakeouterbooleanserialize) | **POST** /fake/outer/boolean | -[**fakeOuterCompositeSerialize**](FakeAPI.md#fakeoutercompositeserialize) | **POST** /fake/outer/composite | -[**fakeOuterNumberSerialize**](FakeAPI.md#fakeouternumberserialize) | **POST** /fake/outer/number | -[**fakeOuterStringSerialize**](FakeAPI.md#fakeouterstringserialize) | **POST** /fake/outer/string | -[**testBodyWithFileSchema**](FakeAPI.md#testbodywithfileschema) | **PUT** /fake/body-with-file-schema | -[**testBodyWithQueryParams**](FakeAPI.md#testbodywithqueryparams) | **PUT** /fake/body-with-query-params | -[**testClientModel**](FakeAPI.md#testclientmodel) | **PATCH** /fake | To test \"client\" model -[**testEndpointParameters**](FakeAPI.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 -[**testEnumParameters**](FakeAPI.md#testenumparameters) | **GET** /fake | To test enum parameters -[**testGroupParameters**](FakeAPI.md#testgroupparameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) -[**testInlineAdditionalProperties**](FakeAPI.md#testinlineadditionalproperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties -[**testJsonFormData**](FakeAPI.md#testjsonformdata) | **GET** /fake/jsonFormData | test json serialization of form data - - -# **fakeOuterBooleanSerialize** -```swift - open class func fakeOuterBooleanSerialize(body: Bool? = nil, completion: @escaping (_ data: Bool?, _ error: Error?) -> Void) -``` - - - -Test serialization of outer boolean types - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let body = true // Bool | Input boolean as post body (optional) - -FakeAPI.fakeOuterBooleanSerialize(body: body) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | **Bool** | Input boolean as post body | [optional] - -### Return type - -**Bool** - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: */* - -[[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) - -# **fakeOuterCompositeSerialize** -```swift - open class func fakeOuterCompositeSerialize(body: OuterComposite? = nil, completion: @escaping (_ data: OuterComposite?, _ error: Error?) -> Void) -``` - - - -Test serialization of object with outer number type - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let body = OuterComposite(myNumber: 123, myString: "myString_example", myBoolean: false) // OuterComposite | Input composite as post body (optional) - -FakeAPI.fakeOuterCompositeSerialize(body: body) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**OuterComposite**](OuterComposite.md) | Input composite as post body | [optional] - -### Return type - -[**OuterComposite**](OuterComposite.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: */* - -[[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) - -# **fakeOuterNumberSerialize** -```swift - open class func fakeOuterNumberSerialize(body: Double? = nil, completion: @escaping (_ data: Double?, _ error: Error?) -> Void) -``` - - - -Test serialization of outer number types - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let body = 987 // Double | Input number as post body (optional) - -FakeAPI.fakeOuterNumberSerialize(body: body) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | **Double** | Input number as post body | [optional] - -### Return type - -**Double** - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: */* - -[[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) - -# **fakeOuterStringSerialize** -```swift - open class func fakeOuterStringSerialize(body: String? = nil, completion: @escaping (_ data: String?, _ error: Error?) -> Void) -``` - - - -Test serialization of outer string types - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let body = "body_example" // String | Input string as post body (optional) - -FakeAPI.fakeOuterStringSerialize(body: body) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | **String** | Input string as post body | [optional] - -### Return type - -**String** - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: */* - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **testBodyWithFileSchema** -```swift - open class func testBodyWithFileSchema(body: FileSchemaTestClass, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - - - -For this test, the body for this request much reference a schema named `File`. - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let body = FileSchemaTestClass(file: File(sourceURI: "sourceURI_example"), files: [File(sourceURI: "sourceURI_example")]) // FileSchemaTestClass | - -FakeAPI.testBodyWithFileSchema(body: body) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**FileSchemaTestClass**](FileSchemaTestClass.md) | | - -### Return type - -Void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **testBodyWithQueryParams** -```swift - open class func testBodyWithQueryParams(query: String, body: User, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - - - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let query = "query_example" // String | -let body = User(id: 123, username: "username_example", firstName: "firstName_example", lastName: "lastName_example", email: "email_example", password: "password_example", phone: "phone_example", userStatus: 123) // User | - -FakeAPI.testBodyWithQueryParams(query: query, body: body) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **query** | **String** | | - **body** | [**User**](User.md) | | - -### Return type - -Void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **testClientModel** -```swift - open class func testClientModel(body: Client, completion: @escaping (_ data: Client?, _ error: Error?) -> Void) -``` - -To test \"client\" model - -To test \"client\" model - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let body = Client(client: "client_example") // Client | client model - -// To test \"client\" model -FakeAPI.testClientModel(body: body) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Client**](Client.md) | client model | - -### Return type - -[**Client**](Client.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **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) - -# **testEndpointParameters** -```swift - open class func testEndpointParameters(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - -Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - -Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let number = 987 // Double | None -let double = 987 // Double | None -let patternWithoutDelimiter = "patternWithoutDelimiter_example" // String | None -let byte = 987 // Data | None -let integer = 987 // Int | None (optional) -let int32 = 987 // Int | None (optional) -let int64 = 987 // Int64 | None (optional) -let float = 987 // Float | None (optional) -let string = "string_example" // String | None (optional) -let binary = URL(string: "https://example.com")! // URL | None (optional) -let date = Date() // Date | None (optional) -let dateTime = Date() // Date | None (optional) -let password = "password_example" // String | None (optional) -let callback = "callback_example" // String | None (optional) - -// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 -FakeAPI.testEndpointParameters(number: number, double: double, patternWithoutDelimiter: patternWithoutDelimiter, byte: byte, integer: integer, int32: int32, int64: int64, float: float, string: string, binary: binary, date: date, dateTime: dateTime, password: password, callback: callback) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **number** | **Double** | None | - **double** | **Double** | None | - **patternWithoutDelimiter** | **String** | None | - **byte** | **Data** | None | - **integer** | **Int** | None | [optional] - **int32** | **Int** | None | [optional] - **int64** | **Int64** | None | [optional] - **float** | **Float** | None | [optional] - **string** | **String** | None | [optional] - **binary** | **URL** | None | [optional] - **date** | **Date** | None | [optional] - **dateTime** | **Date** | None | [optional] - **password** | **String** | None | [optional] - **callback** | **String** | None | [optional] - -### Return type - -Void (empty response body) - -### Authorization - -[http_basic_test](../README.md#http_basic_test) - -### 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) - -# **testEnumParameters** -```swift - open class func testEnumParameters(enumHeaderStringArray: [String]? = nil, enumHeaderString: EnumHeaderString_testEnumParameters? = nil, enumQueryStringArray: [String]? = nil, enumQueryString: EnumQueryString_testEnumParameters? = nil, enumQueryInteger: EnumQueryInteger_testEnumParameters? = nil, enumQueryDouble: EnumQueryDouble_testEnumParameters? = nil, enumFormStringArray: [String]? = nil, enumFormString: EnumFormString_testEnumParameters? = nil, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - -To test enum parameters - -To test enum parameters - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let enumHeaderStringArray = ["enumHeaderStringArray_example"] // [String] | Header parameter enum test (string array) (optional) -let enumHeaderString = "enumHeaderString_example" // String | Header parameter enum test (string) (optional) (default to .efg) -let enumQueryStringArray = ["enumQueryStringArray_example"] // [String] | Query parameter enum test (string array) (optional) -let enumQueryString = "enumQueryString_example" // String | Query parameter enum test (string) (optional) (default to .efg) -let enumQueryInteger = 987 // Int | Query parameter enum test (double) (optional) -let enumQueryDouble = 987 // Double | Query parameter enum test (double) (optional) -let enumFormStringArray = ["inner_example"] // [String] | Form parameter enum test (string array) (optional) (default to .dollar) -let enumFormString = "enumFormString_example" // String | Form parameter enum test (string) (optional) (default to .efg) - -// To test enum parameters -FakeAPI.testEnumParameters(enumHeaderStringArray: enumHeaderStringArray, enumHeaderString: enumHeaderString, enumQueryStringArray: enumQueryStringArray, enumQueryString: enumQueryString, enumQueryInteger: enumQueryInteger, enumQueryDouble: enumQueryDouble, enumFormStringArray: enumFormStringArray, enumFormString: enumFormString) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **enumHeaderStringArray** | [**[String]**](String.md) | Header parameter enum test (string array) | [optional] - **enumHeaderString** | **String** | Header parameter enum test (string) | [optional] [default to .efg] - **enumQueryStringArray** | [**[String]**](String.md) | Query parameter enum test (string array) | [optional] - **enumQueryString** | **String** | Query parameter enum test (string) | [optional] [default to .efg] - **enumQueryInteger** | **Int** | Query parameter enum test (double) | [optional] - **enumQueryDouble** | **Double** | Query parameter enum test (double) | [optional] - **enumFormStringArray** | [**[String]**](String.md) | Form parameter enum test (string array) | [optional] [default to .dollar] - **enumFormString** | **String** | Form parameter enum test (string) | [optional] [default to .efg] - -### Return type - -Void (empty response body) - -### Authorization - -No authorization required - -### 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) - -# **testGroupParameters** -```swift - open class func testGroupParameters(requiredStringGroup: Int, requiredBooleanGroup: Bool, requiredInt64Group: Int64, stringGroup: Int? = nil, booleanGroup: Bool? = nil, int64Group: Int64? = nil, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - -Fake endpoint to test group parameters (optional) - -Fake endpoint to test group parameters (optional) - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let requiredStringGroup = 987 // Int | Required String in group parameters -let requiredBooleanGroup = true // Bool | Required Boolean in group parameters -let requiredInt64Group = 987 // Int64 | Required Integer in group parameters -let stringGroup = 987 // Int | String in group parameters (optional) -let booleanGroup = true // Bool | Boolean in group parameters (optional) -let int64Group = 987 // Int64 | Integer in group parameters (optional) - -// Fake endpoint to test group parameters (optional) -FakeAPI.testGroupParameters(requiredStringGroup: requiredStringGroup, requiredBooleanGroup: requiredBooleanGroup, requiredInt64Group: requiredInt64Group, stringGroup: stringGroup, booleanGroup: booleanGroup, int64Group: int64Group) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **requiredStringGroup** | **Int** | Required String in group parameters | - **requiredBooleanGroup** | **Bool** | Required Boolean in group parameters | - **requiredInt64Group** | **Int64** | Required Integer in group parameters | - **stringGroup** | **Int** | String in group parameters | [optional] - **booleanGroup** | **Bool** | Boolean in group parameters | [optional] - **int64Group** | **Int64** | Integer in group parameters | [optional] - -### Return type - -Void (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) - -# **testInlineAdditionalProperties** -```swift - open class func testInlineAdditionalProperties(param: [String:String], completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - -test inline additionalProperties - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let param = "TODO" // [String:String] | request body - -// test inline additionalProperties -FakeAPI.testInlineAdditionalProperties(param: param) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **param** | [**[String:String]**](String.md) | request body | - -### Return type - -Void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **testJsonFormData** -```swift - open class func testJsonFormData(param: String, param2: String, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - -test json serialization of form data - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let param = "param_example" // String | field1 -let param2 = "param2_example" // String | field2 - -// test json serialization of form data -FakeAPI.testJsonFormData(param: param, param2: param2) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **param** | **String** | field1 | - **param2** | **String** | field2 | - -### Return type - -Void (empty response body) - -### Authorization - -No authorization required - -### 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) - diff --git a/samples/client/petstore/swift4/resultLibrary/docs/FakeClassnameTags123API.md b/samples/client/petstore/swift4/resultLibrary/docs/FakeClassnameTags123API.md deleted file mode 100644 index 9f24b46edbc3..000000000000 --- a/samples/client/petstore/swift4/resultLibrary/docs/FakeClassnameTags123API.md +++ /dev/null @@ -1,59 +0,0 @@ -# FakeClassnameTags123API - -All URIs are relative to *http://petstore.swagger.io:80/v2* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**testClassname**](FakeClassnameTags123API.md#testclassname) | **PATCH** /fake_classname_test | To test class name in snake case - - -# **testClassname** -```swift - open class func testClassname(body: Client, completion: @escaping (_ data: Client?, _ error: Error?) -> Void) -``` - -To test class name in snake case - -To test class name in snake case - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let body = Client(client: "client_example") // Client | client model - -// To test class name in snake case -FakeClassnameTags123API.testClassname(body: body) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Client**](Client.md) | client model | - -### Return type - -[**Client**](Client.md) - -### Authorization - -[api_key_query](../README.md#api_key_query) - -### HTTP request headers - - - **Content-Type**: application/json - - **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/swift4/resultLibrary/docs/File.md b/samples/client/petstore/swift4/resultLibrary/docs/File.md deleted file mode 100644 index 3edfef17b794..000000000000 --- a/samples/client/petstore/swift4/resultLibrary/docs/File.md +++ /dev/null @@ -1,10 +0,0 @@ -# File - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**sourceURI** | **String** | Test capitalization | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/samples/client/petstore/swift4/resultLibrary/docs/FileSchemaTestClass.md b/samples/client/petstore/swift4/resultLibrary/docs/FileSchemaTestClass.md deleted file mode 100644 index afdacc60b2c3..000000000000 --- a/samples/client/petstore/swift4/resultLibrary/docs/FileSchemaTestClass.md +++ /dev/null @@ -1,11 +0,0 @@ -# FileSchemaTestClass - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**file** | [**File**](File.md) | | [optional] -**files** | [File] | | [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/swift4/resultLibrary/docs/FormatTest.md b/samples/client/petstore/swift4/resultLibrary/docs/FormatTest.md deleted file mode 100644 index f74d94f6c46a..000000000000 --- a/samples/client/petstore/swift4/resultLibrary/docs/FormatTest.md +++ /dev/null @@ -1,22 +0,0 @@ -# FormatTest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**integer** | **Int** | | [optional] -**int32** | **Int** | | [optional] -**int64** | **Int64** | | [optional] -**number** | **Double** | | -**float** | **Float** | | [optional] -**double** | **Double** | | [optional] -**string** | **String** | | [optional] -**byte** | **Data** | | -**binary** | **URL** | | [optional] -**date** | **Date** | | -**dateTime** | **Date** | | [optional] -**uuid** | **UUID** | | [optional] -**password** | **String** | | - -[[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/swift4/resultLibrary/docs/HasOnlyReadOnly.md b/samples/client/petstore/swift4/resultLibrary/docs/HasOnlyReadOnly.md deleted file mode 100644 index 57b6e3a17e67..000000000000 --- a/samples/client/petstore/swift4/resultLibrary/docs/HasOnlyReadOnly.md +++ /dev/null @@ -1,11 +0,0 @@ -# HasOnlyReadOnly - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**bar** | **String** | | [optional] [readonly] -**foo** | **String** | | [optional] [readonly] - -[[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/swift4/resultLibrary/docs/List.md b/samples/client/petstore/swift4/resultLibrary/docs/List.md deleted file mode 100644 index b77718302edf..000000000000 --- a/samples/client/petstore/swift4/resultLibrary/docs/List.md +++ /dev/null @@ -1,10 +0,0 @@ -# List - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**_123list** | **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/swift4/resultLibrary/docs/MapTest.md b/samples/client/petstore/swift4/resultLibrary/docs/MapTest.md deleted file mode 100644 index 56213c4113f6..000000000000 --- a/samples/client/petstore/swift4/resultLibrary/docs/MapTest.md +++ /dev/null @@ -1,13 +0,0 @@ -# MapTest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**mapMapOfString** | [String:[String:String]] | | [optional] -**mapOfEnumString** | **[String:String]** | | [optional] -**directMap** | **[String:Bool]** | | [optional] -**indirectMap** | [**StringBooleanMap**](StringBooleanMap.md) | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/samples/client/petstore/swift4/resultLibrary/docs/MixedPropertiesAndAdditionalPropertiesClass.md b/samples/client/petstore/swift4/resultLibrary/docs/MixedPropertiesAndAdditionalPropertiesClass.md deleted file mode 100644 index fcffb8ecdbf3..000000000000 --- a/samples/client/petstore/swift4/resultLibrary/docs/MixedPropertiesAndAdditionalPropertiesClass.md +++ /dev/null @@ -1,12 +0,0 @@ -# MixedPropertiesAndAdditionalPropertiesClass - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**uuid** | **UUID** | | [optional] -**dateTime** | **Date** | | [optional] -**map** | [String:Animal] | | [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/swift4/resultLibrary/docs/Model200Response.md b/samples/client/petstore/swift4/resultLibrary/docs/Model200Response.md deleted file mode 100644 index 5865ea690cc3..000000000000 --- a/samples/client/petstore/swift4/resultLibrary/docs/Model200Response.md +++ /dev/null @@ -1,11 +0,0 @@ -# Model200Response - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **Int** | | [optional] -**_class** | **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/swift4/resultLibrary/docs/Name.md b/samples/client/petstore/swift4/resultLibrary/docs/Name.md deleted file mode 100644 index f7b180292cd6..000000000000 --- a/samples/client/petstore/swift4/resultLibrary/docs/Name.md +++ /dev/null @@ -1,13 +0,0 @@ -# Name - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **Int** | | -**snakeCase** | **Int** | | [optional] [readonly] -**property** | **String** | | [optional] -**_123number** | **Int** | | [optional] [readonly] - -[[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/swift4/resultLibrary/docs/NumberOnly.md b/samples/client/petstore/swift4/resultLibrary/docs/NumberOnly.md deleted file mode 100644 index 72bd361168b5..000000000000 --- a/samples/client/petstore/swift4/resultLibrary/docs/NumberOnly.md +++ /dev/null @@ -1,10 +0,0 @@ -# NumberOnly - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**justNumber** | **Double** | | [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/swift4/resultLibrary/docs/Order.md b/samples/client/petstore/swift4/resultLibrary/docs/Order.md deleted file mode 100644 index 15487f01175c..000000000000 --- a/samples/client/petstore/swift4/resultLibrary/docs/Order.md +++ /dev/null @@ -1,15 +0,0 @@ -# Order - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Int64** | | [optional] -**petId** | **Int64** | | [optional] -**quantity** | **Int** | | [optional] -**shipDate** | **Date** | | [optional] -**status** | **String** | Order Status | [optional] -**complete** | **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/swift4/resultLibrary/docs/OuterComposite.md b/samples/client/petstore/swift4/resultLibrary/docs/OuterComposite.md deleted file mode 100644 index d6b3583bc3ff..000000000000 --- a/samples/client/petstore/swift4/resultLibrary/docs/OuterComposite.md +++ /dev/null @@ -1,12 +0,0 @@ -# OuterComposite - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**myNumber** | **Double** | | [optional] -**myString** | **String** | | [optional] -**myBoolean** | **Bool** | | [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/swift4/resultLibrary/docs/OuterEnum.md b/samples/client/petstore/swift4/resultLibrary/docs/OuterEnum.md deleted file mode 100644 index 06d413b01680..000000000000 --- a/samples/client/petstore/swift4/resultLibrary/docs/OuterEnum.md +++ /dev/null @@ -1,9 +0,0 @@ -# OuterEnum - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/samples/client/petstore/swift4/resultLibrary/docs/Pet.md b/samples/client/petstore/swift4/resultLibrary/docs/Pet.md deleted file mode 100644 index 5c05f98fad4a..000000000000 --- a/samples/client/petstore/swift4/resultLibrary/docs/Pet.md +++ /dev/null @@ -1,15 +0,0 @@ -# Pet - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Int64** | | [optional] -**category** | [**Category**](Category.md) | | [optional] -**name** | **String** | | -**photoUrls** | **[String]** | | -**tags** | [Tag] | | [optional] -**status** | **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/swift4/resultLibrary/docs/PetAPI.md b/samples/client/petstore/swift4/resultLibrary/docs/PetAPI.md deleted file mode 100644 index 27efe0833476..000000000000 --- a/samples/client/petstore/swift4/resultLibrary/docs/PetAPI.md +++ /dev/null @@ -1,469 +0,0 @@ -# PetAPI - -All URIs are relative to *http://petstore.swagger.io:80/v2* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**addPet**](PetAPI.md#addpet) | **POST** /pet | Add a new pet to the store -[**deletePet**](PetAPI.md#deletepet) | **DELETE** /pet/{petId} | Deletes a pet -[**findPetsByStatus**](PetAPI.md#findpetsbystatus) | **GET** /pet/findByStatus | Finds Pets by status -[**findPetsByTags**](PetAPI.md#findpetsbytags) | **GET** /pet/findByTags | Finds Pets by tags -[**getPetById**](PetAPI.md#getpetbyid) | **GET** /pet/{petId} | Find pet by ID -[**updatePet**](PetAPI.md#updatepet) | **PUT** /pet | Update an existing pet -[**updatePetWithForm**](PetAPI.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data -[**uploadFile**](PetAPI.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image -[**uploadFileWithRequiredFile**](PetAPI.md#uploadfilewithrequiredfile) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required) - - -# **addPet** -```swift - open class func addPet(body: Pet, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - -Add a new pet to the store - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let body = Pet(id: 123, category: Category(id: 123, name: "name_example"), name: "name_example", photoUrls: ["photoUrls_example"], tags: [Tag(id: 123, name: "name_example")], status: "status_example") // Pet | Pet object that needs to be added to the store - -// Add a new pet to the store -PetAPI.addPet(body: body) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Pet**](Pet.md) | Pet object that needs to be added to the store | - -### Return type - -Void (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) - -# **deletePet** -```swift - open class func deletePet(petId: Int64, apiKey: String? = nil, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - -Deletes a pet - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let petId = 987 // Int64 | Pet id to delete -let apiKey = "apiKey_example" // String | (optional) - -// Deletes a pet -PetAPI.deletePet(petId: petId, apiKey: apiKey) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Int64** | Pet id to delete | - **apiKey** | **String** | | [optional] - -### Return type - -Void (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) - -# **findPetsByStatus** -```swift - open class func findPetsByStatus(status: [String], completion: @escaping (_ data: [Pet]?, _ error: Error?) -> Void) -``` - -Finds Pets by status - -Multiple status values can be provided with comma separated strings - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let status = ["status_example"] // [String] | Status values that need to be considered for filter - -// Finds Pets by status -PetAPI.findPetsByStatus(status: status) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **status** | [**[String]**](String.md) | Status values that need to be considered for filter | - -### Return type - -[**[Pet]**](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) - -# **findPetsByTags** -```swift - open class func findPetsByTags(tags: [String], completion: @escaping (_ data: [Pet]?, _ error: Error?) -> Void) -``` - -Finds Pets by tags - -Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let tags = ["inner_example"] // [String] | Tags to filter by - -// Finds Pets by tags -PetAPI.findPetsByTags(tags: tags) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **tags** | [**[String]**](String.md) | Tags to filter by | - -### Return type - -[**[Pet]**](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) - -# **getPetById** -```swift - open class func getPetById(petId: Int64, completion: @escaping (_ data: Pet?, _ error: Error?) -> Void) -``` - -Find pet by ID - -Returns a single pet - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let petId = 987 // Int64 | ID of pet to return - -// Find pet by ID -PetAPI.getPetById(petId: petId) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Int64** | ID of pet to return | - -### Return type - -[**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) - -# **updatePet** -```swift - open class func updatePet(body: Pet, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - -Update an existing pet - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let body = Pet(id: 123, category: Category(id: 123, name: "name_example"), name: "name_example", photoUrls: ["photoUrls_example"], tags: [Tag(id: 123, name: "name_example")], status: "status_example") // Pet | Pet object that needs to be added to the store - -// Update an existing pet -PetAPI.updatePet(body: body) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Pet**](Pet.md) | Pet object that needs to be added to the store | - -### Return type - -Void (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) - -# **updatePetWithForm** -```swift - open class func updatePetWithForm(petId: Int64, name: String? = nil, status: String? = nil, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - -Updates a pet in the store with form data - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let petId = 987 // Int64 | ID of pet that needs to be updated -let name = "name_example" // String | Updated name of the pet (optional) -let status = "status_example" // String | Updated status of the pet (optional) - -// Updates a pet in the store with form data -PetAPI.updatePetWithForm(petId: petId, name: name, status: status) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Int64** | ID of pet that needs to be updated | - **name** | **String** | Updated name of the pet | [optional] - **status** | **String** | Updated status of the pet | [optional] - -### Return type - -Void (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) - -# **uploadFile** -```swift - open class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil, completion: @escaping (_ data: ApiResponse?, _ error: Error?) -> Void) -``` - -uploads an image - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let petId = 987 // Int64 | ID of pet to update -let additionalMetadata = "additionalMetadata_example" // String | Additional data to pass to server (optional) -let file = URL(string: "https://example.com")! // URL | file to upload (optional) - -// uploads an image -PetAPI.uploadFile(petId: petId, additionalMetadata: additionalMetadata, file: file) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Int64** | ID of pet to update | - **additionalMetadata** | **String** | Additional data to pass to server | [optional] - **file** | **URL** | file to upload | [optional] - -### Return type - -[**ApiResponse**](ApiResponse.md) - -### Authorization - -[petstore_auth](../README.md#petstore_auth) - -### HTTP request headers - - - **Content-Type**: multipart/form-data - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **uploadFileWithRequiredFile** -```swift - open class func uploadFileWithRequiredFile(petId: Int64, requiredFile: URL, additionalMetadata: String? = nil, completion: @escaping (_ data: ApiResponse?, _ error: Error?) -> Void) -``` - -uploads an image (required) - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let petId = 987 // Int64 | ID of pet to update -let requiredFile = URL(string: "https://example.com")! // URL | file to upload -let additionalMetadata = "additionalMetadata_example" // String | Additional data to pass to server (optional) - -// uploads an image (required) -PetAPI.uploadFileWithRequiredFile(petId: petId, requiredFile: requiredFile, additionalMetadata: additionalMetadata) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Int64** | ID of pet to update | - **requiredFile** | **URL** | file to upload | - **additionalMetadata** | **String** | Additional data to pass to server | [optional] - -### Return type - -[**ApiResponse**](ApiResponse.md) - -### Authorization - -[petstore_auth](../README.md#petstore_auth) - -### HTTP request headers - - - **Content-Type**: multipart/form-data - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/samples/client/petstore/swift4/resultLibrary/docs/ReadOnlyFirst.md b/samples/client/petstore/swift4/resultLibrary/docs/ReadOnlyFirst.md deleted file mode 100644 index ed537b87598b..000000000000 --- a/samples/client/petstore/swift4/resultLibrary/docs/ReadOnlyFirst.md +++ /dev/null @@ -1,11 +0,0 @@ -# ReadOnlyFirst - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**bar** | **String** | | [optional] [readonly] -**baz** | **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/swift4/resultLibrary/docs/Return.md b/samples/client/petstore/swift4/resultLibrary/docs/Return.md deleted file mode 100644 index 66d17c27c887..000000000000 --- a/samples/client/petstore/swift4/resultLibrary/docs/Return.md +++ /dev/null @@ -1,10 +0,0 @@ -# Return - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**_return** | **Int** | | [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/swift4/resultLibrary/docs/SpecialModelName.md b/samples/client/petstore/swift4/resultLibrary/docs/SpecialModelName.md deleted file mode 100644 index 3ec27a38c2ac..000000000000 --- a/samples/client/petstore/swift4/resultLibrary/docs/SpecialModelName.md +++ /dev/null @@ -1,10 +0,0 @@ -# SpecialModelName - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**specialPropertyName** | **Int64** | | [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/swift4/resultLibrary/docs/StoreAPI.md b/samples/client/petstore/swift4/resultLibrary/docs/StoreAPI.md deleted file mode 100644 index 36365ca51993..000000000000 --- a/samples/client/petstore/swift4/resultLibrary/docs/StoreAPI.md +++ /dev/null @@ -1,206 +0,0 @@ -# StoreAPI - -All URIs are relative to *http://petstore.swagger.io:80/v2* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**deleteOrder**](StoreAPI.md#deleteorder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID -[**getInventory**](StoreAPI.md#getinventory) | **GET** /store/inventory | Returns pet inventories by status -[**getOrderById**](StoreAPI.md#getorderbyid) | **GET** /store/order/{order_id} | Find purchase order by ID -[**placeOrder**](StoreAPI.md#placeorder) | **POST** /store/order | Place an order for a pet - - -# **deleteOrder** -```swift - open class func deleteOrder(orderId: String, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - -Delete purchase order by ID - -For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let orderId = "orderId_example" // String | ID of the order that needs to be deleted - -// Delete purchase order by ID -StoreAPI.deleteOrder(orderId: orderId) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **orderId** | **String** | ID of the order that needs to be deleted | - -### Return type - -Void (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) - -# **getInventory** -```swift - open class func getInventory(completion: @escaping (_ data: [String:Int]?, _ error: Error?) -> Void) -``` - -Returns pet inventories by status - -Returns a map of status codes to quantities - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - - -// Returns pet inventories by status -StoreAPI.getInventory() { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -**[String:Int]** - -### 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) - -# **getOrderById** -```swift - open class func getOrderById(orderId: Int64, completion: @escaping (_ data: Order?, _ error: Error?) -> Void) -``` - -Find purchase order by ID - -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let orderId = 987 // Int64 | ID of pet that needs to be fetched - -// Find purchase order by ID -StoreAPI.getOrderById(orderId: orderId) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **orderId** | **Int64** | ID of pet that needs to be fetched | - -### Return type - -[**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) - -# **placeOrder** -```swift - open class func placeOrder(body: Order, completion: @escaping (_ data: Order?, _ error: Error?) -> Void) -``` - -Place an order for a pet - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let body = Order(id: 123, petId: 123, quantity: 123, shipDate: Date(), status: "status_example", complete: false) // Order | order placed for purchasing the pet - -// Place an order for a pet -StoreAPI.placeOrder(body: body) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Order**](Order.md) | order placed for purchasing the pet | - -### Return type - -[**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/swift4/resultLibrary/docs/StringBooleanMap.md b/samples/client/petstore/swift4/resultLibrary/docs/StringBooleanMap.md deleted file mode 100644 index 7abf11ec68b1..000000000000 --- a/samples/client/petstore/swift4/resultLibrary/docs/StringBooleanMap.md +++ /dev/null @@ -1,9 +0,0 @@ -# StringBooleanMap - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/samples/client/petstore/swift4/resultLibrary/docs/Tag.md b/samples/client/petstore/swift4/resultLibrary/docs/Tag.md deleted file mode 100644 index ff4ac8aa4519..000000000000 --- a/samples/client/petstore/swift4/resultLibrary/docs/Tag.md +++ /dev/null @@ -1,11 +0,0 @@ -# Tag - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Int64** | | [optional] -**name** | **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/swift4/resultLibrary/docs/TypeHolderDefault.md b/samples/client/petstore/swift4/resultLibrary/docs/TypeHolderDefault.md deleted file mode 100644 index 5161394bdc3e..000000000000 --- a/samples/client/petstore/swift4/resultLibrary/docs/TypeHolderDefault.md +++ /dev/null @@ -1,14 +0,0 @@ -# TypeHolderDefault - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**stringItem** | **String** | | [default to "what"] -**numberItem** | **Double** | | -**integerItem** | **Int** | | -**boolItem** | **Bool** | | [default to true] -**arrayItem** | **[Int]** | | - -[[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/swift4/resultLibrary/docs/TypeHolderExample.md b/samples/client/petstore/swift4/resultLibrary/docs/TypeHolderExample.md deleted file mode 100644 index 46d0471cd71a..000000000000 --- a/samples/client/petstore/swift4/resultLibrary/docs/TypeHolderExample.md +++ /dev/null @@ -1,14 +0,0 @@ -# TypeHolderExample - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**stringItem** | **String** | | -**numberItem** | **Double** | | -**integerItem** | **Int** | | -**boolItem** | **Bool** | | -**arrayItem** | **[Int]** | | - -[[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/swift4/resultLibrary/docs/User.md b/samples/client/petstore/swift4/resultLibrary/docs/User.md deleted file mode 100644 index 5a439de0ff95..000000000000 --- a/samples/client/petstore/swift4/resultLibrary/docs/User.md +++ /dev/null @@ -1,17 +0,0 @@ -# User - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Int64** | | [optional] -**username** | **String** | | [optional] -**firstName** | **String** | | [optional] -**lastName** | **String** | | [optional] -**email** | **String** | | [optional] -**password** | **String** | | [optional] -**phone** | **String** | | [optional] -**userStatus** | **Int** | 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/swift4/resultLibrary/docs/UserAPI.md b/samples/client/petstore/swift4/resultLibrary/docs/UserAPI.md deleted file mode 100644 index 380813bc68c0..000000000000 --- a/samples/client/petstore/swift4/resultLibrary/docs/UserAPI.md +++ /dev/null @@ -1,406 +0,0 @@ -# UserAPI - -All URIs are relative to *http://petstore.swagger.io:80/v2* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**createUser**](UserAPI.md#createuser) | **POST** /user | Create user -[**createUsersWithArrayInput**](UserAPI.md#createuserswitharrayinput) | **POST** /user/createWithArray | Creates list of users with given input array -[**createUsersWithListInput**](UserAPI.md#createuserswithlistinput) | **POST** /user/createWithList | Creates list of users with given input array -[**deleteUser**](UserAPI.md#deleteuser) | **DELETE** /user/{username} | Delete user -[**getUserByName**](UserAPI.md#getuserbyname) | **GET** /user/{username} | Get user by user name -[**loginUser**](UserAPI.md#loginuser) | **GET** /user/login | Logs user into the system -[**logoutUser**](UserAPI.md#logoutuser) | **GET** /user/logout | Logs out current logged in user session -[**updateUser**](UserAPI.md#updateuser) | **PUT** /user/{username} | Updated user - - -# **createUser** -```swift - open class func createUser(body: User, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - -Create user - -This can only be done by the logged in user. - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let body = User(id: 123, username: "username_example", firstName: "firstName_example", lastName: "lastName_example", email: "email_example", password: "password_example", phone: "phone_example", userStatus: 123) // User | Created user object - -// Create user -UserAPI.createUser(body: body) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**User**](User.md) | Created user object | - -### Return type - -Void (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) - -# **createUsersWithArrayInput** -```swift - open class func createUsersWithArrayInput(body: [User], completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - -Creates list of users with given input array - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let body = [User(id: 123, username: "username_example", firstName: "firstName_example", lastName: "lastName_example", email: "email_example", password: "password_example", phone: "phone_example", userStatus: 123)] // [User] | List of user object - -// Creates list of users with given input array -UserAPI.createUsersWithArrayInput(body: body) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**[User]**](User.md) | List of user object | - -### Return type - -Void (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) - -# **createUsersWithListInput** -```swift - open class func createUsersWithListInput(body: [User], completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - -Creates list of users with given input array - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let body = [User(id: 123, username: "username_example", firstName: "firstName_example", lastName: "lastName_example", email: "email_example", password: "password_example", phone: "phone_example", userStatus: 123)] // [User] | List of user object - -// Creates list of users with given input array -UserAPI.createUsersWithListInput(body: body) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**[User]**](User.md) | List of user object | - -### Return type - -Void (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) - -# **deleteUser** -```swift - open class func deleteUser(username: String, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - -Delete user - -This can only be done by the logged in user. - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let username = "username_example" // String | The name that needs to be deleted - -// Delete user -UserAPI.deleteUser(username: username) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **String** | The name that needs to be deleted | - -### Return type - -Void (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) - -# **getUserByName** -```swift - open class func getUserByName(username: String, completion: @escaping (_ data: User?, _ error: Error?) -> Void) -``` - -Get user by user name - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let username = "username_example" // String | The name that needs to be fetched. Use user1 for testing. - -// Get user by user name -UserAPI.getUserByName(username: username) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **String** | The name that needs to be fetched. Use user1 for testing. | - -### Return type - -[**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) - -# **loginUser** -```swift - open class func loginUser(username: String, password: String, completion: @escaping (_ data: String?, _ error: Error?) -> Void) -``` - -Logs user into the system - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let username = "username_example" // String | The user name for login -let password = "password_example" // String | The password for login in clear text - -// Logs user into the system -UserAPI.loginUser(username: username, password: password) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **String** | The user name for login | - **password** | **String** | The password for login in clear text | - -### 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) - -# **logoutUser** -```swift - open class func logoutUser(completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - -Logs out current logged in user session - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - - -// Logs out current logged in user session -UserAPI.logoutUser() { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -Void (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) - -# **updateUser** -```swift - open class func updateUser(username: String, body: User, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - -Updated user - -This can only be done by the logged in user. - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let username = "username_example" // String | name that need to be deleted -let body = User(id: 123, username: "username_example", firstName: "firstName_example", lastName: "lastName_example", email: "email_example", password: "password_example", phone: "phone_example", userStatus: 123) // User | Updated user object - -// Updated user -UserAPI.updateUser(username: username, body: body) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **String** | name that need to be deleted | - **body** | [**User**](User.md) | Updated user object | - -### Return type - -Void (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/swift4/resultLibrary/git_push.sh b/samples/client/petstore/swift4/resultLibrary/git_push.sh deleted file mode 100644 index ced3be2b0c7b..000000000000 --- a/samples/client/petstore/swift4/resultLibrary/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/swift4/resultLibrary/pom.xml b/samples/client/petstore/swift4/resultLibrary/pom.xml deleted file mode 100644 index 5caba9cb4633..000000000000 --- a/samples/client/petstore/swift4/resultLibrary/pom.xml +++ /dev/null @@ -1,43 +0,0 @@ - - 4.0.0 - io.swagger - Swift4PetstoreClientTests - pom - 1.0-SNAPSHOT - Swift4 Swagger Petstore Client - - - - maven-dependency-plugin - - - package - - copy-dependencies - - - ${project.build.directory} - - - - - - org.codehaus.mojo - exec-maven-plugin - 1.2.1 - - - xcodebuild-test - integration-test - - exec - - - ./run_spmbuild.sh - - - - - - - diff --git a/samples/client/petstore/swift4/resultLibrary/project.yml b/samples/client/petstore/swift4/resultLibrary/project.yml deleted file mode 100644 index 148b42517be9..000000000000 --- a/samples/client/petstore/swift4/resultLibrary/project.yml +++ /dev/null @@ -1,15 +0,0 @@ -name: PetstoreClient -targets: - PetstoreClient: - type: framework - platform: iOS - deploymentTarget: "10.0" - sources: [PetstoreClient] - info: - path: ./Info.plist - version: 1.0.0 - settings: - APPLICATION_EXTENSION_API_ONLY: true - scheme: {} - dependencies: - - carthage: Alamofire diff --git a/samples/client/petstore/swift4/resultLibrary/run_spmbuild.sh b/samples/client/petstore/swift4/resultLibrary/run_spmbuild.sh deleted file mode 100755 index 1a9f585ad054..000000000000 --- a/samples/client/petstore/swift4/resultLibrary/run_spmbuild.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -swift build && exit ${PIPESTATUS[0]} diff --git a/samples/client/petstore/swift4/rxswiftLibrary/.gitignore b/samples/client/petstore/swift4/rxswiftLibrary/.gitignore deleted file mode 100644 index 5e5d5cebcf47..000000000000 --- a/samples/client/petstore/swift4/rxswiftLibrary/.gitignore +++ /dev/null @@ -1,63 +0,0 @@ -# Xcode -# -# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore - -## Build generated -build/ -DerivedData - -## Various settings -*.pbxuser -!default.pbxuser -*.mode1v3 -!default.mode1v3 -*.mode2v3 -!default.mode2v3 -*.perspectivev3 -!default.perspectivev3 -xcuserdata - -## Other -*.xccheckout -*.moved-aside -*.xcuserstate -*.xcscmblueprint - -## Obj-C/Swift specific -*.hmap -*.ipa - -## Playgrounds -timeline.xctimeline -playground.xcworkspace - -# Swift Package Manager -# -# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. -# Packages/ -.build/ - -# CocoaPods -# -# We recommend against adding the Pods directory to your .gitignore. However -# you should judge for yourself, the pros and cons are mentioned at: -# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control -# -# Pods/ - -# Carthage -# -# Add this line if you want to avoid checking in source code from Carthage dependencies. -# Carthage/Checkouts - -Carthage/Build - -# fastlane -# -# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the -# screenshots whenever they are needed. -# For more information about the recommended setup visit: -# https://github.com/fastlane/fastlane/blob/master/docs/Gitignore.md - -fastlane/report.xml -fastlane/screenshots diff --git a/samples/client/petstore/swift4/rxswiftLibrary/.openapi-generator-ignore b/samples/client/petstore/swift4/rxswiftLibrary/.openapi-generator-ignore deleted file mode 100644 index 7484ee590a38..000000000000 --- a/samples/client/petstore/swift4/rxswiftLibrary/.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/swift4/rxswiftLibrary/.openapi-generator/VERSION b/samples/client/petstore/swift4/rxswiftLibrary/.openapi-generator/VERSION deleted file mode 100644 index b5d898602c2c..000000000000 --- a/samples/client/petstore/swift4/rxswiftLibrary/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -4.3.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/swift4/rxswiftLibrary/Cartfile b/samples/client/petstore/swift4/rxswiftLibrary/Cartfile deleted file mode 100644 index 7f3452d07ee6..000000000000 --- a/samples/client/petstore/swift4/rxswiftLibrary/Cartfile +++ /dev/null @@ -1,2 +0,0 @@ -github "Alamofire/Alamofire" ~> 4.9.0 -github "ReactiveX/RxSwift" ~> 4.5.0 diff --git a/samples/client/petstore/swift4/rxswiftLibrary/Info.plist b/samples/client/petstore/swift4/rxswiftLibrary/Info.plist deleted file mode 100644 index 323e5ecfc420..000000000000 --- a/samples/client/petstore/swift4/rxswiftLibrary/Info.plist +++ /dev/null @@ -1,22 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.0 - CFBundleVersion - 1 - - diff --git a/samples/client/petstore/swift4/rxswiftLibrary/Package.resolved b/samples/client/petstore/swift4/rxswiftLibrary/Package.resolved deleted file mode 100644 index 41ab73313b83..000000000000 --- a/samples/client/petstore/swift4/rxswiftLibrary/Package.resolved +++ /dev/null @@ -1,25 +0,0 @@ -{ - "object": { - "pins": [ - { - "package": "Alamofire", - "repositoryURL": "https://github.com/Alamofire/Alamofire.git", - "state": { - "branch": null, - "revision": "747c8db8d57b68d5e35275f10c92d55f982adbd4", - "version": "4.9.1" - } - }, - { - "package": "RxSwift", - "repositoryURL": "https://github.com/ReactiveX/RxSwift.git", - "state": { - "branch": null, - "revision": "cce95dd704bc08cd3d69c087a05a6fc3118e2722", - "version": "4.5.0" - } - } - ] - }, - "version": 1 -} diff --git a/samples/client/petstore/swift4/rxswiftLibrary/Package.swift b/samples/client/petstore/swift4/rxswiftLibrary/Package.swift deleted file mode 100644 index 6c19a2b64cc6..000000000000 --- a/samples/client/petstore/swift4/rxswiftLibrary/Package.swift +++ /dev/null @@ -1,28 +0,0 @@ -// swift-tools-version:4.2 -// The swift-tools-version declares the minimum version of Swift required to build this package. - -import PackageDescription - -let package = Package( - name: "PetstoreClient", - products: [ - // Products define the executables and libraries produced by a package, and make them visible to other packages. - .library( - name: "PetstoreClient", - targets: ["PetstoreClient"]) - ], - dependencies: [ - // Dependencies declare other packages that this package depends on. - .package(url: "https://github.com/Alamofire/Alamofire.git", from: "4.9.0"), - .package(url: "https://github.com/ReactiveX/RxSwift.git", from: "4.5.0") - ], - targets: [ - // Targets are the basic building blocks of a package. A target can define a module or a test suite. - // Targets can depend on other targets in this package, and on products in packages which this package depends on. - .target( - name: "PetstoreClient", - dependencies: ["Alamofire", "RxSwift"], - path: "PetstoreClient/Classes" - ) - ] -) diff --git a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient.podspec b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient.podspec deleted file mode 100644 index f520f827f0be..000000000000 --- a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient.podspec +++ /dev/null @@ -1,15 +0,0 @@ -Pod::Spec.new do |s| - s.name = 'PetstoreClient' - s.ios.deployment_target = '9.0' - s.osx.deployment_target = '10.11' - s.tvos.deployment_target = '9.0' - s.version = '1.0.0' - s.source = { :git => 'git@github.com:OpenAPITools/openapi-generator.git', :tag => 'v1.0.0' } - s.authors = '' - s.license = 'Proprietary' - s.homepage = 'https://github.com/openapitools/openapi-generator' - s.summary = 'PetstoreClient' - s.source_files = 'PetstoreClient/Classes/**/*.swift' - s.dependency 'RxSwift', '~> 4.5.0' - s.dependency 'Alamofire', '~> 4.9.0' -end diff --git a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient.xcodeproj/project.pbxproj b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient.xcodeproj/project.pbxproj deleted file mode 100644 index 43e65668d5ae..000000000000 --- a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient.xcodeproj/project.pbxproj +++ /dev/null @@ -1,580 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 51; - objects = { - -/* Begin PBXBuildFile section */ - 0299339D13C3571C4C57368A /* ApiResponse.swift in Sources */ = {isa = PBXBuildFile; fileRef = A8E7B833748B4F0C7CDA90C6 /* ApiResponse.swift */; }; - 081C0B80A989B1AAF2665121 /* MapTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7986861626C2B1CB49AD7000 /* MapTest.swift */; }; - 0C1E4C682F2D0AF7D9E431EE /* Dog.swift in Sources */ = {isa = PBXBuildFile; fileRef = C6C3E1129526A353B963EFD7 /* Dog.swift */; }; - 0E6932F1C55BA6880693C478 /* Order.swift in Sources */ = {isa = PBXBuildFile; fileRef = 27B2E9EF856E89FEAA359A3A /* Order.swift */; }; - 1E6C7C7F271A802DF8099330 /* APIHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 897716962D472FE162B723CB /* APIHelper.swift */; }; - 22FA6CA58E58550DE36AE750 /* JSONEncodableEncoding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9791B840B8D6EAA35343B00F /* JSONEncodableEncoding.swift */; }; - 248F2F0F29E8FDAE9CAD64C5 /* AdditionalPropertiesClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 396DEF3156BA0D12D0FC5C3C /* AdditionalPropertiesClass.swift */; }; - 269E3103C458C78EA5726EE2 /* Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = B8C298FC8929DCB369053F11 /* Extensions.swift */; }; - 294CDFA409BC369C0FDC5FB3 /* SpecialModelName.swift in Sources */ = {isa = PBXBuildFile; fileRef = 386FD590658E90509C121118 /* SpecialModelName.swift */; }; - 2B441CDFFFDDB343C04F5375 /* Animal.swift in Sources */ = {isa = PBXBuildFile; fileRef = 95568E7C35F119EB4A12B498 /* Animal.swift */; }; - 2C29D5B60E00DDA3878F1BDE /* Pet.swift in Sources */ = {isa = PBXBuildFile; fileRef = ECFEB4C6C257B3BB3CEA36D1 /* Pet.swift */; }; - 31DFF71D8CCCA0D2D2F8AC90 /* User.swift in Sources */ = {isa = PBXBuildFile; fileRef = E5565A447062C7B8F695F451 /* User.swift */; }; - 34C26979F4678B5B579D26E8 /* FakeClassnameTags123API.swift in Sources */ = {isa = PBXBuildFile; fileRef = B42354B407EC173BEB54E042 /* FakeClassnameTags123API.swift */; }; - 3691B017D3AA18404A563C67 /* ArrayOfNumberOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = B65BB72353DA24536A9049BE /* ArrayOfNumberOnly.swift */; }; - 37DEADD6CD0496690725B8A7 /* Name.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5AD994DFAA0DA93C188A4DBA /* Name.swift */; }; - 40E3027D2E38D8329C6AB01F /* APIs.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37DF825B8F3BADA2B2537D17 /* APIs.swift */; }; - 40E46046D2B16D1A672A08E3 /* AlamofireImplementations.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84A201508DF2B697D65F2631 /* AlamofireImplementations.swift */; }; - 418DB36F23C53C6E2C3CDE39 /* Alamofire.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A235FA3FDFB086CC69CDE83D /* Alamofire.framework */; }; - 41A491E9B577C510F927D126 /* OuterEnum.swift in Sources */ = {isa = PBXBuildFile; fileRef = C15008AABC804EB6FB4CDAC6 /* OuterEnum.swift */; }; - 45B3B29D7A62049F824751F8 /* AnimalFarm.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8D22BE01748F51106DE02332 /* AnimalFarm.swift */; }; - 4A344DF7ECE721B4BBEDCB4A /* CatAllOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AD0F94F512DFBC09F9CC79A /* CatAllOf.swift */; }; - 4B4BE77747413A9188CDABD2 /* ArrayOfArrayOfNumberOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B1B8B838B5D9D312F2002EB /* ArrayOfArrayOfNumberOnly.swift */; }; - 555DEA47352B42E49082922B /* NumberOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = B8E0B16084741FCB82389F58 /* NumberOnly.swift */; }; - 5695497F5DBF6C08842755A3 /* TypeHolderDefault.swift in Sources */ = {isa = PBXBuildFile; fileRef = EBC76F6D4D2AA8084B7EB50E /* TypeHolderDefault.swift */; }; - 61322FC4325F1A4FF24ACA48 /* EnumArrays.swift in Sources */ = {isa = PBXBuildFile; fileRef = 10503995D9EFD031A2EFB576 /* EnumArrays.swift */; }; - 64C48E3658CF53EBE8AF82F9 /* UserAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7C8D5F382979854D47F18DB1 /* UserAPI.swift */; }; - 6B638A04B34C82B2091D6EDD /* FormatTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3156CE41C001C80379B84BDB /* FormatTest.swift */; }; - 6FBD978F4D1ED92E7071FFBB /* CodableHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 02A6F6BB2152ACEE1416D44A /* CodableHelper.swift */; }; - 72547ECFB451A509409311EE /* Configuration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 28A444949BBC254798C3B3DD /* Configuration.swift */; }; - 72CE544C52BB33778D1B89B8 /* DogAllOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = A21A69C8402A60E01116ABBD /* DogAllOf.swift */; }; - 7441BBA84C31E06400338F89 /* ClassModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3C30827D8EAF8EA684E7BCEA /* ClassModel.swift */; }; - 7588B7E2960253174ADCCF16 /* JSONEncodingHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 35D710108A69DD8A5297F926 /* JSONEncodingHelper.swift */; }; - 86DE714469BE8BA28AFF710F /* HasOnlyReadOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C7FBC641752D2E13B150973 /* HasOnlyReadOnly.swift */; }; - 914F4D1FCB17773C067C4E68 /* ReadOnlyFirst.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6FD42727E001E799E458C292 /* ReadOnlyFirst.swift */; }; - 922BDADAB291907A7FD14314 /* OuterComposite.swift in Sources */ = {isa = PBXBuildFile; fileRef = F4E0AD8F60A91F72C7687560 /* OuterComposite.swift */; }; - 97F7B85BF07A325EEBF92C93 /* File.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3933D3B2A3AC4577094D0C23 /* File.swift */; }; - 9CA19AA4483F6EB50270A81E /* List.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A6070F581E611FF44AFD40A /* List.swift */; }; - 9CF06ACDA32CB0C3E74E435C /* Model200Response.swift in Sources */ = {isa = PBXBuildFile; fileRef = 82A2C3DC2235F0114C2B08E5 /* Model200Response.swift */; }; - 9DA1C6F8B4D6C8595F28C098 /* EnumTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = FD60AEA646791E0EDE885DE1 /* EnumTest.swift */; }; - A6E50CC6845FE58D8C236253 /* Return.swift in Sources */ = {isa = PBXBuildFile; fileRef = C81447828475F76C5CF4F08A /* Return.swift */; }; - A6E5A5629495DB0ED672B06F /* PetAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A019F500E546A3292CE716A /* PetAPI.swift */; }; - A85E190556818FFA79896E92 /* ArrayTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = F1A0379CDFC55705AE76C998 /* ArrayTest.swift */; }; - ACF3037926301D4D6E848745 /* EnumClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B2C97AE6ACA1E5FB88F5BAA /* EnumClass.swift */; }; - AD594BFB99E31A5E07579237 /* Client.swift in Sources */ = {isa = PBXBuildFile; fileRef = A913A57E72D723632E9A718F /* Client.swift */; }; - B301DB1B80F37C757550AA17 /* MixedPropertiesAndAdditionalPropertiesClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9AD714C7CC59BDD18DE8DF4E /* MixedPropertiesAndAdditionalPropertiesClass.swift */; }; - B3E35FE2773D4A8BA15CFA88 /* Tag.swift in Sources */ = {isa = PBXBuildFile; fileRef = B2896F8BFD1AA2965C8A3015 /* Tag.swift */; }; - BB1F3C6D50B8F0A8CC4F1749 /* Capitalization.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7B38FA00A494D13F4C382A3 /* Capitalization.swift */; }; - BC097E527F96131FEA12D864 /* RxSwift.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 69DB3E1D94EB0566C0052331 /* RxSwift.framework */; }; - CA9B9B19882EA044EAD0B359 /* AnotherFakeAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9DF24D2714B9C4CF14146E88 /* AnotherFakeAPI.swift */; }; - CB68ABDBAADAF6B8D7B93A5D /* StoreAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = A53274D99BBDE1B79BF3521C /* StoreAPI.swift */; }; - D3BAB7C7A607392CA838C580 /* Models.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8699F7966F748ED026A6FB4C /* Models.swift */; }; - D95A5F83AAA7D5C95A29AB83 /* Cat.swift in Sources */ = {isa = PBXBuildFile; fileRef = 212AA914B7F1793A4E32C119 /* Cat.swift */; }; - DDBD4C0FBA3CD6A4DA3DF376 /* FakeAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6E00950725DC44436C5E238C /* FakeAPI.swift */; }; - DDF1D589267D56D9BED3C6E5 /* FileSchemaTestClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B3666552AA854DAF9C480A3 /* FileSchemaTestClass.swift */; }; - E8A58C6414E88AF3EAE45B69 /* Category.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F2985D01F8D60A4B1925C69 /* Category.swift */; }; - EDFC6C5121A43997014049CB /* StringBooleanMap.swift in Sources */ = {isa = PBXBuildFile; fileRef = 47B4DEBABEFE140768CFB70B /* StringBooleanMap.swift */; }; - FECA2E8C9D0BDFEC459E8996 /* TypeHolderExample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19B65C66C97F082718DDD703 /* TypeHolderExample.swift */; }; -/* End PBXBuildFile section */ - -/* Begin PBXFileReference section */ - 02A6F6BB2152ACEE1416D44A /* CodableHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CodableHelper.swift; sourceTree = ""; }; - 10503995D9EFD031A2EFB576 /* EnumArrays.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EnumArrays.swift; sourceTree = ""; }; - 164AD6EC9C4CCF634D7C4590 /* PetstoreClient.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = PetstoreClient.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 19B65C66C97F082718DDD703 /* TypeHolderExample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TypeHolderExample.swift; sourceTree = ""; }; - 212AA914B7F1793A4E32C119 /* Cat.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Cat.swift; sourceTree = ""; }; - 27B2E9EF856E89FEAA359A3A /* Order.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Order.swift; sourceTree = ""; }; - 28A444949BBC254798C3B3DD /* Configuration.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Configuration.swift; sourceTree = ""; }; - 3156CE41C001C80379B84BDB /* FormatTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FormatTest.swift; sourceTree = ""; }; - 35D710108A69DD8A5297F926 /* JSONEncodingHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JSONEncodingHelper.swift; sourceTree = ""; }; - 37DF825B8F3BADA2B2537D17 /* APIs.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = APIs.swift; sourceTree = ""; }; - 386FD590658E90509C121118 /* SpecialModelName.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SpecialModelName.swift; sourceTree = ""; }; - 3933D3B2A3AC4577094D0C23 /* File.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = File.swift; sourceTree = ""; }; - 396DEF3156BA0D12D0FC5C3C /* AdditionalPropertiesClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdditionalPropertiesClass.swift; sourceTree = ""; }; - 3AD0F94F512DFBC09F9CC79A /* CatAllOf.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CatAllOf.swift; sourceTree = ""; }; - 3C30827D8EAF8EA684E7BCEA /* ClassModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ClassModel.swift; sourceTree = ""; }; - 47B4DEBABEFE140768CFB70B /* StringBooleanMap.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StringBooleanMap.swift; sourceTree = ""; }; - 4B2C97AE6ACA1E5FB88F5BAA /* EnumClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EnumClass.swift; sourceTree = ""; }; - 4B3666552AA854DAF9C480A3 /* FileSchemaTestClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FileSchemaTestClass.swift; sourceTree = ""; }; - 4C7FBC641752D2E13B150973 /* HasOnlyReadOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HasOnlyReadOnly.swift; sourceTree = ""; }; - 5AD994DFAA0DA93C188A4DBA /* Name.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Name.swift; sourceTree = ""; }; - 69DB3E1D94EB0566C0052331 /* RxSwift.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = RxSwift.framework; sourceTree = ""; }; - 6E00950725DC44436C5E238C /* FakeAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FakeAPI.swift; sourceTree = ""; }; - 6F2985D01F8D60A4B1925C69 /* Category.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Category.swift; sourceTree = ""; }; - 6FD42727E001E799E458C292 /* ReadOnlyFirst.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReadOnlyFirst.swift; sourceTree = ""; }; - 7986861626C2B1CB49AD7000 /* MapTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MapTest.swift; sourceTree = ""; }; - 7A6070F581E611FF44AFD40A /* List.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = List.swift; sourceTree = ""; }; - 7B1B8B838B5D9D312F2002EB /* ArrayOfArrayOfNumberOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArrayOfArrayOfNumberOnly.swift; sourceTree = ""; }; - 7C8D5F382979854D47F18DB1 /* UserAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserAPI.swift; sourceTree = ""; }; - 82A2C3DC2235F0114C2B08E5 /* Model200Response.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Model200Response.swift; sourceTree = ""; }; - 84A201508DF2B697D65F2631 /* AlamofireImplementations.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlamofireImplementations.swift; sourceTree = ""; }; - 8699F7966F748ED026A6FB4C /* Models.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Models.swift; sourceTree = ""; }; - 897716962D472FE162B723CB /* APIHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = APIHelper.swift; sourceTree = ""; }; - 8D22BE01748F51106DE02332 /* AnimalFarm.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnimalFarm.swift; sourceTree = ""; }; - 95568E7C35F119EB4A12B498 /* Animal.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Animal.swift; sourceTree = ""; }; - 9791B840B8D6EAA35343B00F /* JSONEncodableEncoding.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JSONEncodableEncoding.swift; sourceTree = ""; }; - 9A019F500E546A3292CE716A /* PetAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PetAPI.swift; sourceTree = ""; }; - 9AD714C7CC59BDD18DE8DF4E /* MixedPropertiesAndAdditionalPropertiesClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MixedPropertiesAndAdditionalPropertiesClass.swift; sourceTree = ""; }; - 9DF24D2714B9C4CF14146E88 /* AnotherFakeAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnotherFakeAPI.swift; sourceTree = ""; }; - A21A69C8402A60E01116ABBD /* DogAllOf.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DogAllOf.swift; sourceTree = ""; }; - A235FA3FDFB086CC69CDE83D /* Alamofire.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Alamofire.framework; sourceTree = ""; }; - A53274D99BBDE1B79BF3521C /* StoreAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StoreAPI.swift; sourceTree = ""; }; - A7B38FA00A494D13F4C382A3 /* Capitalization.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Capitalization.swift; sourceTree = ""; }; - A8E7B833748B4F0C7CDA90C6 /* ApiResponse.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ApiResponse.swift; sourceTree = ""; }; - A913A57E72D723632E9A718F /* Client.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Client.swift; sourceTree = ""; }; - B2896F8BFD1AA2965C8A3015 /* Tag.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Tag.swift; sourceTree = ""; }; - B42354B407EC173BEB54E042 /* FakeClassnameTags123API.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FakeClassnameTags123API.swift; sourceTree = ""; }; - B65BB72353DA24536A9049BE /* ArrayOfNumberOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArrayOfNumberOnly.swift; sourceTree = ""; }; - B8C298FC8929DCB369053F11 /* Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Extensions.swift; sourceTree = ""; }; - B8E0B16084741FCB82389F58 /* NumberOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NumberOnly.swift; sourceTree = ""; }; - C15008AABC804EB6FB4CDAC6 /* OuterEnum.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OuterEnum.swift; sourceTree = ""; }; - C6C3E1129526A353B963EFD7 /* Dog.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Dog.swift; sourceTree = ""; }; - C81447828475F76C5CF4F08A /* Return.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Return.swift; sourceTree = ""; }; - E5565A447062C7B8F695F451 /* User.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = User.swift; sourceTree = ""; }; - EBC76F6D4D2AA8084B7EB50E /* TypeHolderDefault.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TypeHolderDefault.swift; sourceTree = ""; }; - ECFEB4C6C257B3BB3CEA36D1 /* Pet.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Pet.swift; sourceTree = ""; }; - F1A0379CDFC55705AE76C998 /* ArrayTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArrayTest.swift; sourceTree = ""; }; - F4E0AD8F60A91F72C7687560 /* OuterComposite.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OuterComposite.swift; sourceTree = ""; }; - FD60AEA646791E0EDE885DE1 /* EnumTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EnumTest.swift; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - D1990C2A394CCF025EF98A2F /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 418DB36F23C53C6E2C3CDE39 /* Alamofire.framework in Frameworks */, - BC097E527F96131FEA12D864 /* RxSwift.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 1E464C0937FE0D3A7A0FE29A /* Frameworks */ = { - isa = PBXGroup; - children = ( - 7861EE241895128F64DD7873 /* Carthage */, - ); - name = Frameworks; - sourceTree = ""; - }; - 4FBDCF1330A9AB9122780DB3 /* Models */ = { - isa = PBXGroup; - children = ( - 396DEF3156BA0D12D0FC5C3C /* AdditionalPropertiesClass.swift */, - 95568E7C35F119EB4A12B498 /* Animal.swift */, - 8D22BE01748F51106DE02332 /* AnimalFarm.swift */, - A8E7B833748B4F0C7CDA90C6 /* ApiResponse.swift */, - 7B1B8B838B5D9D312F2002EB /* ArrayOfArrayOfNumberOnly.swift */, - B65BB72353DA24536A9049BE /* ArrayOfNumberOnly.swift */, - F1A0379CDFC55705AE76C998 /* ArrayTest.swift */, - A7B38FA00A494D13F4C382A3 /* Capitalization.swift */, - 212AA914B7F1793A4E32C119 /* Cat.swift */, - 3AD0F94F512DFBC09F9CC79A /* CatAllOf.swift */, - 6F2985D01F8D60A4B1925C69 /* Category.swift */, - 3C30827D8EAF8EA684E7BCEA /* ClassModel.swift */, - A913A57E72D723632E9A718F /* Client.swift */, - C6C3E1129526A353B963EFD7 /* Dog.swift */, - A21A69C8402A60E01116ABBD /* DogAllOf.swift */, - 10503995D9EFD031A2EFB576 /* EnumArrays.swift */, - 4B2C97AE6ACA1E5FB88F5BAA /* EnumClass.swift */, - FD60AEA646791E0EDE885DE1 /* EnumTest.swift */, - 3933D3B2A3AC4577094D0C23 /* File.swift */, - 4B3666552AA854DAF9C480A3 /* FileSchemaTestClass.swift */, - 3156CE41C001C80379B84BDB /* FormatTest.swift */, - 4C7FBC641752D2E13B150973 /* HasOnlyReadOnly.swift */, - 7A6070F581E611FF44AFD40A /* List.swift */, - 7986861626C2B1CB49AD7000 /* MapTest.swift */, - 9AD714C7CC59BDD18DE8DF4E /* MixedPropertiesAndAdditionalPropertiesClass.swift */, - 82A2C3DC2235F0114C2B08E5 /* Model200Response.swift */, - 5AD994DFAA0DA93C188A4DBA /* Name.swift */, - B8E0B16084741FCB82389F58 /* NumberOnly.swift */, - 27B2E9EF856E89FEAA359A3A /* Order.swift */, - F4E0AD8F60A91F72C7687560 /* OuterComposite.swift */, - C15008AABC804EB6FB4CDAC6 /* OuterEnum.swift */, - ECFEB4C6C257B3BB3CEA36D1 /* Pet.swift */, - 6FD42727E001E799E458C292 /* ReadOnlyFirst.swift */, - C81447828475F76C5CF4F08A /* Return.swift */, - 386FD590658E90509C121118 /* SpecialModelName.swift */, - 47B4DEBABEFE140768CFB70B /* StringBooleanMap.swift */, - B2896F8BFD1AA2965C8A3015 /* Tag.swift */, - EBC76F6D4D2AA8084B7EB50E /* TypeHolderDefault.swift */, - 19B65C66C97F082718DDD703 /* TypeHolderExample.swift */, - E5565A447062C7B8F695F451 /* User.swift */, - ); - path = Models; - sourceTree = ""; - }; - 5FBA6AE5F64CD737F88B4565 = { - isa = PBXGroup; - children = ( - 9B364C01750D7AA4F983B9E7 /* PetstoreClient */, - 1E464C0937FE0D3A7A0FE29A /* Frameworks */, - 857F0DEA1890CE66D6DAD556 /* Products */, - ); - sourceTree = ""; - }; - 67BF3478113E6B4DF1C4E04F /* OpenAPIs */ = { - isa = PBXGroup; - children = ( - 84A201508DF2B697D65F2631 /* AlamofireImplementations.swift */, - 897716962D472FE162B723CB /* APIHelper.swift */, - 37DF825B8F3BADA2B2537D17 /* APIs.swift */, - 02A6F6BB2152ACEE1416D44A /* CodableHelper.swift */, - 28A444949BBC254798C3B3DD /* Configuration.swift */, - B8C298FC8929DCB369053F11 /* Extensions.swift */, - 9791B840B8D6EAA35343B00F /* JSONEncodableEncoding.swift */, - 35D710108A69DD8A5297F926 /* JSONEncodingHelper.swift */, - 8699F7966F748ED026A6FB4C /* Models.swift */, - F956D0CCAE23BCFD1C7BDD5D /* APIs */, - 4FBDCF1330A9AB9122780DB3 /* Models */, - ); - path = OpenAPIs; - sourceTree = ""; - }; - 7861EE241895128F64DD7873 /* Carthage */ = { - isa = PBXGroup; - children = ( - A012205B41CB71A62B86EECD /* iOS */, - ); - name = Carthage; - path = Carthage/Build; - sourceTree = ""; - }; - 857F0DEA1890CE66D6DAD556 /* Products */ = { - isa = PBXGroup; - children = ( - 164AD6EC9C4CCF634D7C4590 /* PetstoreClient.framework */, - ); - name = Products; - sourceTree = ""; - }; - 9B364C01750D7AA4F983B9E7 /* PetstoreClient */ = { - isa = PBXGroup; - children = ( - EF4C81BDD734856ED5023B77 /* Classes */, - ); - path = PetstoreClient; - sourceTree = ""; - }; - A012205B41CB71A62B86EECD /* iOS */ = { - isa = PBXGroup; - children = ( - A235FA3FDFB086CC69CDE83D /* Alamofire.framework */, - 69DB3E1D94EB0566C0052331 /* RxSwift.framework */, - ); - path = iOS; - sourceTree = ""; - }; - EF4C81BDD734856ED5023B77 /* Classes */ = { - isa = PBXGroup; - children = ( - 67BF3478113E6B4DF1C4E04F /* OpenAPIs */, - ); - path = Classes; - sourceTree = ""; - }; - F956D0CCAE23BCFD1C7BDD5D /* APIs */ = { - isa = PBXGroup; - children = ( - 9DF24D2714B9C4CF14146E88 /* AnotherFakeAPI.swift */, - 6E00950725DC44436C5E238C /* FakeAPI.swift */, - B42354B407EC173BEB54E042 /* FakeClassnameTags123API.swift */, - 9A019F500E546A3292CE716A /* PetAPI.swift */, - A53274D99BBDE1B79BF3521C /* StoreAPI.swift */, - 7C8D5F382979854D47F18DB1 /* UserAPI.swift */, - ); - path = APIs; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - C1282C2230015E0D204BEAED /* PetstoreClient */ = { - isa = PBXNativeTarget; - buildConfigurationList = B46EDEB1A7F0D78FE6394544 /* Build configuration list for PBXNativeTarget "PetstoreClient" */; - buildPhases = ( - E539708354CE60FE486F81ED /* Sources */, - D1990C2A394CCF025EF98A2F /* Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = PetstoreClient; - productName = PetstoreClient; - productReference = 164AD6EC9C4CCF634D7C4590 /* PetstoreClient.framework */; - productType = "com.apple.product-type.framework"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - E7D276EE2369D8C455513C2E /* Project object */ = { - isa = PBXProject; - attributes = { - LastUpgradeCheck = 1020; - }; - buildConfigurationList = ECAB17FF35111B5E14DAAC08 /* Build configuration list for PBXProject "PetstoreClient" */; - compatibilityVersion = "Xcode 10.0"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - Base, - en, - ); - mainGroup = 5FBA6AE5F64CD737F88B4565; - projectDirPath = ""; - projectRoot = ""; - targets = ( - C1282C2230015E0D204BEAED /* PetstoreClient */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXSourcesBuildPhase section */ - E539708354CE60FE486F81ED /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 1E6C7C7F271A802DF8099330 /* APIHelper.swift in Sources */, - 40E3027D2E38D8329C6AB01F /* APIs.swift in Sources */, - 248F2F0F29E8FDAE9CAD64C5 /* AdditionalPropertiesClass.swift in Sources */, - 40E46046D2B16D1A672A08E3 /* AlamofireImplementations.swift in Sources */, - 2B441CDFFFDDB343C04F5375 /* Animal.swift in Sources */, - 45B3B29D7A62049F824751F8 /* AnimalFarm.swift in Sources */, - CA9B9B19882EA044EAD0B359 /* AnotherFakeAPI.swift in Sources */, - 0299339D13C3571C4C57368A /* ApiResponse.swift in Sources */, - 4B4BE77747413A9188CDABD2 /* ArrayOfArrayOfNumberOnly.swift in Sources */, - 3691B017D3AA18404A563C67 /* ArrayOfNumberOnly.swift in Sources */, - A85E190556818FFA79896E92 /* ArrayTest.swift in Sources */, - BB1F3C6D50B8F0A8CC4F1749 /* Capitalization.swift in Sources */, - D95A5F83AAA7D5C95A29AB83 /* Cat.swift in Sources */, - 4A344DF7ECE721B4BBEDCB4A /* CatAllOf.swift in Sources */, - E8A58C6414E88AF3EAE45B69 /* Category.swift in Sources */, - 7441BBA84C31E06400338F89 /* ClassModel.swift in Sources */, - AD594BFB99E31A5E07579237 /* Client.swift in Sources */, - 6FBD978F4D1ED92E7071FFBB /* CodableHelper.swift in Sources */, - 72547ECFB451A509409311EE /* Configuration.swift in Sources */, - 0C1E4C682F2D0AF7D9E431EE /* Dog.swift in Sources */, - 72CE544C52BB33778D1B89B8 /* DogAllOf.swift in Sources */, - 61322FC4325F1A4FF24ACA48 /* EnumArrays.swift in Sources */, - ACF3037926301D4D6E848745 /* EnumClass.swift in Sources */, - 9DA1C6F8B4D6C8595F28C098 /* EnumTest.swift in Sources */, - 269E3103C458C78EA5726EE2 /* Extensions.swift in Sources */, - DDBD4C0FBA3CD6A4DA3DF376 /* FakeAPI.swift in Sources */, - 34C26979F4678B5B579D26E8 /* FakeClassnameTags123API.swift in Sources */, - 97F7B85BF07A325EEBF92C93 /* File.swift in Sources */, - DDF1D589267D56D9BED3C6E5 /* FileSchemaTestClass.swift in Sources */, - 6B638A04B34C82B2091D6EDD /* FormatTest.swift in Sources */, - 86DE714469BE8BA28AFF710F /* HasOnlyReadOnly.swift in Sources */, - 22FA6CA58E58550DE36AE750 /* JSONEncodableEncoding.swift in Sources */, - 7588B7E2960253174ADCCF16 /* JSONEncodingHelper.swift in Sources */, - 9CA19AA4483F6EB50270A81E /* List.swift in Sources */, - 081C0B80A989B1AAF2665121 /* MapTest.swift in Sources */, - B301DB1B80F37C757550AA17 /* MixedPropertiesAndAdditionalPropertiesClass.swift in Sources */, - 9CF06ACDA32CB0C3E74E435C /* Model200Response.swift in Sources */, - D3BAB7C7A607392CA838C580 /* Models.swift in Sources */, - 37DEADD6CD0496690725B8A7 /* Name.swift in Sources */, - 555DEA47352B42E49082922B /* NumberOnly.swift in Sources */, - 0E6932F1C55BA6880693C478 /* Order.swift in Sources */, - 922BDADAB291907A7FD14314 /* OuterComposite.swift in Sources */, - 41A491E9B577C510F927D126 /* OuterEnum.swift in Sources */, - 2C29D5B60E00DDA3878F1BDE /* Pet.swift in Sources */, - A6E5A5629495DB0ED672B06F /* PetAPI.swift in Sources */, - 914F4D1FCB17773C067C4E68 /* ReadOnlyFirst.swift in Sources */, - A6E50CC6845FE58D8C236253 /* Return.swift in Sources */, - 294CDFA409BC369C0FDC5FB3 /* SpecialModelName.swift in Sources */, - CB68ABDBAADAF6B8D7B93A5D /* StoreAPI.swift in Sources */, - EDFC6C5121A43997014049CB /* StringBooleanMap.swift in Sources */, - B3E35FE2773D4A8BA15CFA88 /* Tag.swift in Sources */, - 5695497F5DBF6C08842755A3 /* TypeHolderDefault.swift in Sources */, - FECA2E8C9D0BDFEC459E8996 /* TypeHolderExample.swift in Sources */, - 31DFF71D8CCCA0D2D2F8AC90 /* User.swift in Sources */, - 64C48E3658CF53EBE8AF82F9 /* UserAPI.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin XCBuildConfiguration section */ - 3B2C02AFB91CB5C82766ED5C /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - APPLICATION_EXTENSION_API_ONLY = YES; - CODE_SIGN_IDENTITY = ""; - CURRENT_PROJECT_VERSION = 1; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Carthage/Build/iOS", - ); - INFOPLIST_FILE = Info.plist; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Release; - }; - A9EB0A02B94C427CBACFEC7C /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "$(inherited)", - "DEBUG=1", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = iphoneos; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 5.0; - }; - name = Debug; - }; - DD3EEB93949E9EBA4437E9CD /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - APPLICATION_EXTENSION_API_ONLY = YES; - CODE_SIGN_IDENTITY = ""; - CURRENT_PROJECT_VERSION = 1; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Carthage/Build/iOS", - ); - INFOPLIST_FILE = Info.plist; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Debug; - }; - F81D4E5FECD46E9AA6DD2C29 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = iphoneos; - SWIFT_COMPILATION_MODE = wholemodule; - SWIFT_VERSION = 5.0; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - B46EDEB1A7F0D78FE6394544 /* Build configuration list for PBXNativeTarget "PetstoreClient" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - DD3EEB93949E9EBA4437E9CD /* Debug */, - 3B2C02AFB91CB5C82766ED5C /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = ""; - }; - ECAB17FF35111B5E14DAAC08 /* Build configuration list for PBXProject "PetstoreClient" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - A9EB0A02B94C427CBACFEC7C /* Debug */, - F81D4E5FECD46E9AA6DD2C29 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Debug; - }; -/* End XCConfigurationList section */ - }; - rootObject = E7D276EE2369D8C455513C2E /* Project object */; -} diff --git a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 919434a6254f..000000000000 --- a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient.xcodeproj/xcshareddata/xcschemes/PetstoreClient.xcscheme b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient.xcodeproj/xcshareddata/xcschemes/PetstoreClient.xcscheme deleted file mode 100644 index 26d510552bb0..000000000000 --- a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient.xcodeproj/xcshareddata/xcschemes/PetstoreClient.xcscheme +++ /dev/null @@ -1,99 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIHelper.swift b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIHelper.swift deleted file mode 100644 index 200070096800..000000000000 --- a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIHelper.swift +++ /dev/null @@ -1,70 +0,0 @@ -// APIHelper.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct APIHelper { - public static func rejectNil(_ source: [String: Any?]) -> [String: Any]? { - let destination = source.reduce(into: [String: Any]()) { (result, item) in - if let value = item.value { - result[item.key] = value - } - } - - if destination.isEmpty { - return nil - } - return destination - } - - public static func rejectNilHeaders(_ source: [String: Any?]) -> [String: String] { - return source.reduce(into: [String: String]()) { (result, item) in - if let collection = item.value as? [Any?] { - result[item.key] = collection.filter({ $0 != nil }).map { "\($0!)" }.joined(separator: ",") - } else if let value: Any = item.value { - result[item.key] = "\(value)" - } - } - } - - public static func convertBoolToString(_ source: [String: Any]?) -> [String: Any]? { - guard let source = source else { - return nil - } - - return source.reduce(into: [String: Any](), { (result, item) in - switch item.value { - case let x as Bool: - result[item.key] = x.description - default: - result[item.key] = item.value - } - }) - } - - public static func mapValueToPathItem(_ source: Any) -> Any { - if let collection = source as? [Any?] { - return collection.filter({ $0 != nil }).map({"\($0!)"}).joined(separator: ",") - } - return source - } - - public static func mapValuesToQueryItems(_ source: [String: Any?]) -> [URLQueryItem]? { - let destination = source.filter({ $0.value != nil}).reduce(into: [URLQueryItem]()) { (result, item) in - if let collection = item.value as? [Any?] { - let value = collection.filter({ $0 != nil }).map({"\($0!)"}).joined(separator: ",") - result.append(URLQueryItem(name: item.key, value: value)) - } else if let value = item.value { - result.append(URLQueryItem(name: item.key, value: "\(value)")) - } - } - - if destination.isEmpty { - return nil - } - return destination - } -} diff --git a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs.swift b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs.swift deleted file mode 100644 index 832282d224f8..000000000000 --- a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs.swift +++ /dev/null @@ -1,62 +0,0 @@ -// APIs.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -open class PetstoreClientAPI { - public static var basePath = "http://petstore.swagger.io:80/v2" - public static var credential: URLCredential? - public static var customHeaders: [String: String] = [:] - public static var requestBuilderFactory: RequestBuilderFactory = AlamofireRequestBuilderFactory() - public static var apiResponseQueue: DispatchQueue = .main -} - -open class RequestBuilder { - var credential: URLCredential? - var headers: [String: String] - public let parameters: [String: Any]? - public let isBody: Bool - public let method: String - public let URLString: String - - /// Optional block to obtain a reference to the request's progress instance when available. - public var onProgressReady: ((Progress) -> Void)? - - required public init(method: String, URLString: String, parameters: [String: Any]?, isBody: Bool, headers: [String: String] = [:]) { - self.method = method - self.URLString = URLString - self.parameters = parameters - self.isBody = isBody - self.headers = headers - - addHeaders(PetstoreClientAPI.customHeaders) - } - - open func addHeaders(_ aHeaders: [String: String]) { - for (header, value) in aHeaders { - headers[header] = value - } - } - - open func execute(_ completion: @escaping (_ response: Response?, _ error: Error?) -> Void) { } - - public func addHeader(name: String, value: String) -> Self { - if !value.isEmpty { - headers[name] = value - } - return self - } - - open func addCredential() -> Self { - self.credential = PetstoreClientAPI.credential - return self - } -} - -public protocol RequestBuilderFactory { - func getNonDecodableBuilder() -> RequestBuilder.Type - func getBuilder() -> RequestBuilder.Type -} diff --git a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift deleted file mode 100644 index 819fc85beda2..000000000000 --- a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift +++ /dev/null @@ -1,53 +0,0 @@ -// -// AnotherFakeAPI.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -import RxSwift - -open class AnotherFakeAPI { - /** - To test special tags - - - parameter body: (body) client model - - returns: Observable - */ - open class func call123testSpecialTags(body: Client) -> Observable { - return Observable.create { observer -> Disposable in - call123testSpecialTagsWithRequestBuilder(body: body).execute { (response, error) -> Void in - if let error = error { - observer.onError(error) - } else if let response = response { - observer.onNext(response.body!) - } else { - fatalError() - } - observer.onCompleted() - } - return Disposables.create() - } - } - - /** - To test special tags - - PATCH /another-fake/dummy - - To test special tags and operation ID starting with number - - parameter body: (body) client model - - returns: RequestBuilder - */ - open class func call123testSpecialTagsWithRequestBuilder(body: Client) -> RequestBuilder { - let path = "/another-fake/dummy" - let URLString = PetstoreClientAPI.basePath + path - let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "PATCH", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) - } - -} diff --git a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift deleted file mode 100644 index a20128c73813..000000000000 --- a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift +++ /dev/null @@ -1,654 +0,0 @@ -// -// FakeAPI.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -import RxSwift - -open class FakeAPI { - /** - - - parameter body: (body) Input boolean as post body (optional) - - returns: Observable - */ - open class func fakeOuterBooleanSerialize(body: Bool? = nil) -> Observable { - return Observable.create { observer -> Disposable in - fakeOuterBooleanSerializeWithRequestBuilder(body: body).execute { (response, error) -> Void in - if let error = error { - observer.onError(error) - } else if let response = response { - observer.onNext(response.body!) - } else { - fatalError() - } - observer.onCompleted() - } - return Disposables.create() - } - } - - /** - - POST /fake/outer/boolean - - Test serialization of outer boolean types - - parameter body: (body) Input boolean as post body (optional) - - returns: RequestBuilder - */ - open class func fakeOuterBooleanSerializeWithRequestBuilder(body: Bool? = nil) -> RequestBuilder { - let path = "/fake/outer/boolean" - let URLString = PetstoreClientAPI.basePath + path - let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) - } - - /** - - - parameter body: (body) Input composite as post body (optional) - - returns: Observable - */ - open class func fakeOuterCompositeSerialize(body: OuterComposite? = nil) -> Observable { - return Observable.create { observer -> Disposable in - fakeOuterCompositeSerializeWithRequestBuilder(body: body).execute { (response, error) -> Void in - if let error = error { - observer.onError(error) - } else if let response = response { - observer.onNext(response.body!) - } else { - fatalError() - } - observer.onCompleted() - } - return Disposables.create() - } - } - - /** - - POST /fake/outer/composite - - Test serialization of object with outer number type - - parameter body: (body) Input composite as post body (optional) - - returns: RequestBuilder - */ - open class func fakeOuterCompositeSerializeWithRequestBuilder(body: OuterComposite? = nil) -> RequestBuilder { - let path = "/fake/outer/composite" - let URLString = PetstoreClientAPI.basePath + path - let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) - } - - /** - - - parameter body: (body) Input number as post body (optional) - - returns: Observable - */ - open class func fakeOuterNumberSerialize(body: Double? = nil) -> Observable { - return Observable.create { observer -> Disposable in - fakeOuterNumberSerializeWithRequestBuilder(body: body).execute { (response, error) -> Void in - if let error = error { - observer.onError(error) - } else if let response = response { - observer.onNext(response.body!) - } else { - fatalError() - } - observer.onCompleted() - } - return Disposables.create() - } - } - - /** - - POST /fake/outer/number - - Test serialization of outer number types - - parameter body: (body) Input number as post body (optional) - - returns: RequestBuilder - */ - open class func fakeOuterNumberSerializeWithRequestBuilder(body: Double? = nil) -> RequestBuilder { - let path = "/fake/outer/number" - let URLString = PetstoreClientAPI.basePath + path - let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) - } - - /** - - - parameter body: (body) Input string as post body (optional) - - returns: Observable - */ - open class func fakeOuterStringSerialize(body: String? = nil) -> Observable { - return Observable.create { observer -> Disposable in - fakeOuterStringSerializeWithRequestBuilder(body: body).execute { (response, error) -> Void in - if let error = error { - observer.onError(error) - } else if let response = response { - observer.onNext(response.body!) - } else { - fatalError() - } - observer.onCompleted() - } - return Disposables.create() - } - } - - /** - - POST /fake/outer/string - - Test serialization of outer string types - - parameter body: (body) Input string as post body (optional) - - returns: RequestBuilder - */ - open class func fakeOuterStringSerializeWithRequestBuilder(body: String? = nil) -> RequestBuilder { - let path = "/fake/outer/string" - let URLString = PetstoreClientAPI.basePath + path - let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) - } - - /** - - - parameter body: (body) - - returns: Observable - */ - open class func testBodyWithFileSchema(body: FileSchemaTestClass) -> Observable { - return Observable.create { observer -> Disposable in - testBodyWithFileSchemaWithRequestBuilder(body: body).execute { (_, error) -> Void in - if let error = error { - observer.onError(error) - } else { - observer.onNext(()) - } - observer.onCompleted() - } - return Disposables.create() - } - } - - /** - - PUT /fake/body-with-file-schema - - For this test, the body for this request much reference a schema named `File`. - - parameter body: (body) - - returns: RequestBuilder - */ - open class func testBodyWithFileSchemaWithRequestBuilder(body: FileSchemaTestClass) -> RequestBuilder { - let path = "/fake/body-with-file-schema" - let URLString = PetstoreClientAPI.basePath + path - let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) - } - - /** - - - parameter query: (query) - - parameter body: (body) - - returns: Observable - */ - open class func testBodyWithQueryParams(query: String, body: User) -> Observable { - return Observable.create { observer -> Disposable in - testBodyWithQueryParamsWithRequestBuilder(query: query, body: body).execute { (_, error) -> Void in - if let error = error { - observer.onError(error) - } else { - observer.onNext(()) - } - observer.onCompleted() - } - return Disposables.create() - } - } - - /** - - PUT /fake/body-with-query-params - - parameter query: (query) - - parameter body: (body) - - returns: RequestBuilder - */ - open class func testBodyWithQueryParamsWithRequestBuilder(query: String, body: User) -> RequestBuilder { - let path = "/fake/body-with-query-params" - let URLString = PetstoreClientAPI.basePath + path - let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) - - var url = URLComponents(string: URLString) - url?.queryItems = APIHelper.mapValuesToQueryItems([ - "query": query.encodeToJSON() - ]) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) - } - - /** - To test \"client\" model - - - parameter body: (body) client model - - returns: Observable - */ - open class func testClientModel(body: Client) -> Observable { - return Observable.create { observer -> Disposable in - testClientModelWithRequestBuilder(body: body).execute { (response, error) -> Void in - if let error = error { - observer.onError(error) - } else if let response = response { - observer.onNext(response.body!) - } else { - fatalError() - } - observer.onCompleted() - } - return Disposables.create() - } - } - - /** - To test \"client\" model - - PATCH /fake - - To test \"client\" model - - parameter body: (body) client model - - returns: RequestBuilder - */ - open class func testClientModelWithRequestBuilder(body: Client) -> RequestBuilder { - let path = "/fake" - let URLString = PetstoreClientAPI.basePath + path - let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "PATCH", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) - } - - /** - Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - - - parameter number: (form) None - - parameter double: (form) None - - parameter patternWithoutDelimiter: (form) None - - parameter byte: (form) None - - parameter integer: (form) None (optional) - - parameter int32: (form) None (optional) - - parameter int64: (form) None (optional) - - parameter float: (form) None (optional) - - parameter string: (form) None (optional) - - parameter binary: (form) None (optional) - - parameter date: (form) None (optional) - - parameter dateTime: (form) None (optional) - - parameter password: (form) None (optional) - - parameter callback: (form) None (optional) - - returns: Observable - */ - open class func testEndpointParameters(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil) -> Observable { - return Observable.create { observer -> Disposable in - testEndpointParametersWithRequestBuilder(number: number, double: double, patternWithoutDelimiter: patternWithoutDelimiter, byte: byte, integer: integer, int32: int32, int64: int64, float: float, string: string, binary: binary, date: date, dateTime: dateTime, password: password, callback: callback).execute { (_, error) -> Void in - if let error = error { - observer.onError(error) - } else { - observer.onNext(()) - } - observer.onCompleted() - } - return Disposables.create() - } - } - - /** - Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - - POST /fake - - Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - - BASIC: - - type: http - - name: http_basic_test - - parameter number: (form) None - - parameter double: (form) None - - parameter patternWithoutDelimiter: (form) None - - parameter byte: (form) None - - parameter integer: (form) None (optional) - - parameter int32: (form) None (optional) - - parameter int64: (form) None (optional) - - parameter float: (form) None (optional) - - parameter string: (form) None (optional) - - parameter binary: (form) None (optional) - - parameter date: (form) None (optional) - - parameter dateTime: (form) None (optional) - - parameter password: (form) None (optional) - - parameter callback: (form) None (optional) - - returns: RequestBuilder - */ - open class func testEndpointParametersWithRequestBuilder(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil) -> RequestBuilder { - let path = "/fake" - let URLString = PetstoreClientAPI.basePath + path - let formParams: [String: Any?] = [ - "integer": integer?.encodeToJSON(), - "int32": int32?.encodeToJSON(), - "int64": int64?.encodeToJSON(), - "number": number.encodeToJSON(), - "float": float?.encodeToJSON(), - "double": double.encodeToJSON(), - "string": string?.encodeToJSON(), - "pattern_without_delimiter": patternWithoutDelimiter.encodeToJSON(), - "byte": byte.encodeToJSON(), - "binary": binary?.encodeToJSON(), - "date": date?.encodeToJSON(), - "dateTime": dateTime?.encodeToJSON(), - "password": password?.encodeToJSON(), - "callback": callback?.encodeToJSON() - ] - - let nonNullParameters = APIHelper.rejectNil(formParams) - let parameters = APIHelper.convertBoolToString(nonNullParameters) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } - - /** - * enum for parameter enumHeaderStringArray - */ - public enum EnumHeaderStringArray_testEnumParameters: String { - case greaterThan = ">" - case dollar = "$" - } - - /** - * enum for parameter enumHeaderString - */ - public enum EnumHeaderString_testEnumParameters: String { - case abc = "_abc" - case efg = "-efg" - case xyz = "(xyz)" - } - - /** - * enum for parameter enumQueryStringArray - */ - public enum EnumQueryStringArray_testEnumParameters: String { - case greaterThan = ">" - case dollar = "$" - } - - /** - * enum for parameter enumQueryString - */ - public enum EnumQueryString_testEnumParameters: String { - case abc = "_abc" - case efg = "-efg" - case xyz = "(xyz)" - } - - /** - * enum for parameter enumQueryInteger - */ - public enum EnumQueryInteger_testEnumParameters: Int { - case _1 = 1 - case number2 = -2 - } - - /** - * enum for parameter enumQueryDouble - */ - public enum EnumQueryDouble_testEnumParameters: Double { - case _11 = 1.1 - case number12 = -1.2 - } - - /** - * enum for parameter enumFormStringArray - */ - public enum EnumFormStringArray_testEnumParameters: String { - case greaterThan = ">" - case dollar = "$" - } - - /** - * enum for parameter enumFormString - */ - public enum EnumFormString_testEnumParameters: String { - case abc = "_abc" - case efg = "-efg" - case xyz = "(xyz)" - } - - /** - To test enum parameters - - - parameter enumHeaderStringArray: (header) Header parameter enum test (string array) (optional) - - parameter enumHeaderString: (header) Header parameter enum test (string) (optional, default to .efg) - - parameter enumQueryStringArray: (query) Query parameter enum test (string array) (optional) - - parameter enumQueryString: (query) Query parameter enum test (string) (optional, default to .efg) - - parameter enumQueryInteger: (query) Query parameter enum test (double) (optional) - - parameter enumQueryDouble: (query) Query parameter enum test (double) (optional) - - parameter enumFormStringArray: (form) Form parameter enum test (string array) (optional, default to .dollar) - - parameter enumFormString: (form) Form parameter enum test (string) (optional, default to .efg) - - returns: Observable - */ - open class func testEnumParameters(enumHeaderStringArray: [String]? = nil, enumHeaderString: EnumHeaderString_testEnumParameters? = nil, enumQueryStringArray: [String]? = nil, enumQueryString: EnumQueryString_testEnumParameters? = nil, enumQueryInteger: EnumQueryInteger_testEnumParameters? = nil, enumQueryDouble: EnumQueryDouble_testEnumParameters? = nil, enumFormStringArray: [String]? = nil, enumFormString: EnumFormString_testEnumParameters? = nil) -> Observable { - return Observable.create { observer -> Disposable in - testEnumParametersWithRequestBuilder(enumHeaderStringArray: enumHeaderStringArray, enumHeaderString: enumHeaderString, enumQueryStringArray: enumQueryStringArray, enumQueryString: enumQueryString, enumQueryInteger: enumQueryInteger, enumQueryDouble: enumQueryDouble, enumFormStringArray: enumFormStringArray, enumFormString: enumFormString).execute { (_, error) -> Void in - if let error = error { - observer.onError(error) - } else { - observer.onNext(()) - } - observer.onCompleted() - } - return Disposables.create() - } - } - - /** - To test enum parameters - - GET /fake - - To test enum parameters - - parameter enumHeaderStringArray: (header) Header parameter enum test (string array) (optional) - - parameter enumHeaderString: (header) Header parameter enum test (string) (optional, default to .efg) - - parameter enumQueryStringArray: (query) Query parameter enum test (string array) (optional) - - parameter enumQueryString: (query) Query parameter enum test (string) (optional, default to .efg) - - parameter enumQueryInteger: (query) Query parameter enum test (double) (optional) - - parameter enumQueryDouble: (query) Query parameter enum test (double) (optional) - - parameter enumFormStringArray: (form) Form parameter enum test (string array) (optional, default to .dollar) - - parameter enumFormString: (form) Form parameter enum test (string) (optional, default to .efg) - - returns: RequestBuilder - */ - open class func testEnumParametersWithRequestBuilder(enumHeaderStringArray: [String]? = nil, enumHeaderString: EnumHeaderString_testEnumParameters? = nil, enumQueryStringArray: [String]? = nil, enumQueryString: EnumQueryString_testEnumParameters? = nil, enumQueryInteger: EnumQueryInteger_testEnumParameters? = nil, enumQueryDouble: EnumQueryDouble_testEnumParameters? = nil, enumFormStringArray: [String]? = nil, enumFormString: EnumFormString_testEnumParameters? = nil) -> RequestBuilder { - let path = "/fake" - let URLString = PetstoreClientAPI.basePath + path - let formParams: [String: Any?] = [ - "enum_form_string_array": enumFormStringArray?.encodeToJSON(), - "enum_form_string": enumFormString?.encodeToJSON() - ] - - let nonNullParameters = APIHelper.rejectNil(formParams) - let parameters = APIHelper.convertBoolToString(nonNullParameters) - - var url = URLComponents(string: URLString) - url?.queryItems = APIHelper.mapValuesToQueryItems([ - "enum_query_string_array": enumQueryStringArray?.encodeToJSON(), - "enum_query_string": enumQueryString?.encodeToJSON(), - "enum_query_integer": enumQueryInteger?.encodeToJSON(), - "enum_query_double": enumQueryDouble?.encodeToJSON() - ]) - let nillableHeaders: [String: Any?] = [ - "enum_header_string_array": enumHeaderStringArray?.encodeToJSON(), - "enum_header_string": enumHeaderString?.encodeToJSON() - ] - let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false, headers: headerParameters) - } - - /** - Fake endpoint to test group parameters (optional) - - - parameter requiredStringGroup: (query) Required String in group parameters - - parameter requiredBooleanGroup: (header) Required Boolean in group parameters - - parameter requiredInt64Group: (query) Required Integer in group parameters - - parameter stringGroup: (query) String in group parameters (optional) - - parameter booleanGroup: (header) Boolean in group parameters (optional) - - parameter int64Group: (query) Integer in group parameters (optional) - - returns: Observable - */ - open class func testGroupParameters(requiredStringGroup: Int, requiredBooleanGroup: Bool, requiredInt64Group: Int64, stringGroup: Int? = nil, booleanGroup: Bool? = nil, int64Group: Int64? = nil) -> Observable { - return Observable.create { observer -> Disposable in - testGroupParametersWithRequestBuilder(requiredStringGroup: requiredStringGroup, requiredBooleanGroup: requiredBooleanGroup, requiredInt64Group: requiredInt64Group, stringGroup: stringGroup, booleanGroup: booleanGroup, int64Group: int64Group).execute { (_, error) -> Void in - if let error = error { - observer.onError(error) - } else { - observer.onNext(()) - } - observer.onCompleted() - } - return Disposables.create() - } - } - - /** - Fake endpoint to test group parameters (optional) - - DELETE /fake - - Fake endpoint to test group parameters (optional) - - parameter requiredStringGroup: (query) Required String in group parameters - - parameter requiredBooleanGroup: (header) Required Boolean in group parameters - - parameter requiredInt64Group: (query) Required Integer in group parameters - - parameter stringGroup: (query) String in group parameters (optional) - - parameter booleanGroup: (header) Boolean in group parameters (optional) - - parameter int64Group: (query) Integer in group parameters (optional) - - returns: RequestBuilder - */ - open class func testGroupParametersWithRequestBuilder(requiredStringGroup: Int, requiredBooleanGroup: Bool, requiredInt64Group: Int64, stringGroup: Int? = nil, booleanGroup: Bool? = nil, int64Group: Int64? = nil) -> RequestBuilder { - let path = "/fake" - let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - - var url = URLComponents(string: URLString) - url?.queryItems = APIHelper.mapValuesToQueryItems([ - "required_string_group": requiredStringGroup.encodeToJSON(), - "required_int64_group": requiredInt64Group.encodeToJSON(), - "string_group": stringGroup?.encodeToJSON(), - "int64_group": int64Group?.encodeToJSON() - ]) - let nillableHeaders: [String: Any?] = [ - "required_boolean_group": requiredBooleanGroup.encodeToJSON(), - "boolean_group": booleanGroup?.encodeToJSON() - ] - let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false, headers: headerParameters) - } - - /** - test inline additionalProperties - - - parameter param: (body) request body - - returns: Observable - */ - open class func testInlineAdditionalProperties(param: [String: String]) -> Observable { - return Observable.create { observer -> Disposable in - testInlineAdditionalPropertiesWithRequestBuilder(param: param).execute { (_, error) -> Void in - if let error = error { - observer.onError(error) - } else { - observer.onNext(()) - } - observer.onCompleted() - } - return Disposables.create() - } - } - - /** - test inline additionalProperties - - POST /fake/inline-additionalProperties - - parameter param: (body) request body - - returns: RequestBuilder - */ - open class func testInlineAdditionalPropertiesWithRequestBuilder(param: [String: String]) -> RequestBuilder { - let path = "/fake/inline-additionalProperties" - let URLString = PetstoreClientAPI.basePath + path - let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: param) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) - } - - /** - test json serialization of form data - - - parameter param: (form) field1 - - parameter param2: (form) field2 - - returns: Observable - */ - open class func testJsonFormData(param: String, param2: String) -> Observable { - return Observable.create { observer -> Disposable in - testJsonFormDataWithRequestBuilder(param: param, param2: param2).execute { (_, error) -> Void in - if let error = error { - observer.onError(error) - } else { - observer.onNext(()) - } - observer.onCompleted() - } - return Disposables.create() - } - } - - /** - test json serialization of form data - - GET /fake/jsonFormData - - parameter param: (form) field1 - - parameter param2: (form) field2 - - returns: RequestBuilder - */ - open class func testJsonFormDataWithRequestBuilder(param: String, param2: String) -> RequestBuilder { - let path = "/fake/jsonFormData" - let URLString = PetstoreClientAPI.basePath + path - let formParams: [String: Any?] = [ - "param": param.encodeToJSON(), - "param2": param2.encodeToJSON() - ] - - let nonNullParameters = APIHelper.rejectNil(formParams) - let parameters = APIHelper.convertBoolToString(nonNullParameters) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } - -} diff --git a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift deleted file mode 100644 index c34ace880ce8..000000000000 --- a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift +++ /dev/null @@ -1,56 +0,0 @@ -// -// FakeClassnameTags123API.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -import RxSwift - -open class FakeClassnameTags123API { - /** - To test class name in snake case - - - parameter body: (body) client model - - returns: Observable - */ - open class func testClassname(body: Client) -> Observable { - return Observable.create { observer -> Disposable in - testClassnameWithRequestBuilder(body: body).execute { (response, error) -> Void in - if let error = error { - observer.onError(error) - } else if let response = response { - observer.onNext(response.body!) - } else { - fatalError() - } - observer.onCompleted() - } - return Disposables.create() - } - } - - /** - To test class name in snake case - - PATCH /fake_classname_test - - To test class name in snake case - - API Key: - - type: apiKey api_key_query (QUERY) - - name: api_key_query - - parameter body: (body) client model - - returns: RequestBuilder - */ - open class func testClassnameWithRequestBuilder(body: Client) -> RequestBuilder { - let path = "/fake_classname_test" - let URLString = PetstoreClientAPI.basePath + path - let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "PATCH", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) - } - -} diff --git a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift deleted file mode 100644 index 6b4797fc19a1..000000000000 --- a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift +++ /dev/null @@ -1,460 +0,0 @@ -// -// PetAPI.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -import RxSwift - -open class PetAPI { - /** - Add a new pet to the store - - - parameter body: (body) Pet object that needs to be added to the store - - returns: Observable - */ - open class func addPet(body: Pet) -> Observable { - return Observable.create { observer -> Disposable in - addPetWithRequestBuilder(body: body).execute { (_, error) -> Void in - if let error = error { - observer.onError(error) - } else { - observer.onNext(()) - } - observer.onCompleted() - } - return Disposables.create() - } - } - - /** - Add a new pet to the store - - POST /pet - - OAuth: - - type: oauth2 - - name: petstore_auth - - parameter body: (body) Pet object that needs to be added to the store - - returns: RequestBuilder - */ - open class func addPetWithRequestBuilder(body: Pet) -> RequestBuilder { - let path = "/pet" - let URLString = PetstoreClientAPI.basePath + path - let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) - } - - /** - Deletes a pet - - - parameter petId: (path) Pet id to delete - - parameter apiKey: (header) (optional) - - returns: Observable - */ - open class func deletePet(petId: Int64, apiKey: String? = nil) -> Observable { - return Observable.create { observer -> Disposable in - deletePetWithRequestBuilder(petId: petId, apiKey: apiKey).execute { (_, error) -> Void in - if let error = error { - observer.onError(error) - } else { - observer.onNext(()) - } - observer.onCompleted() - } - return Disposables.create() - } - } - - /** - Deletes a pet - - DELETE /pet/{petId} - - OAuth: - - type: oauth2 - - name: petstore_auth - - parameter petId: (path) Pet id to delete - - parameter apiKey: (header) (optional) - - returns: RequestBuilder - */ - open class func deletePetWithRequestBuilder(petId: Int64, apiKey: String? = nil) -> RequestBuilder { - var path = "/pet/{petId}" - let petIdPreEscape = "\(APIHelper.mapValueToPathItem(petId))" - let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{petId}", with: petIdPostEscape, options: .literal, range: nil) - let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - - let url = URLComponents(string: URLString) - let nillableHeaders: [String: Any?] = [ - "api_key": apiKey?.encodeToJSON() - ] - let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false, headers: headerParameters) - } - - /** - * enum for parameter status - */ - public enum Status_findPetsByStatus: String { - case available = "available" - case pending = "pending" - case sold = "sold" - } - - /** - Finds Pets by status - - - parameter status: (query) Status values that need to be considered for filter - - returns: Observable<[Pet]> - */ - open class func findPetsByStatus(status: [String]) -> Observable<[Pet]> { - return Observable.create { observer -> Disposable in - findPetsByStatusWithRequestBuilder(status: status).execute { (response, error) -> Void in - if let error = error { - observer.onError(error) - } else if let response = response { - observer.onNext(response.body!) - } else { - fatalError() - } - observer.onCompleted() - } - return Disposables.create() - } - } - - /** - Finds Pets by status - - GET /pet/findByStatus - - Multiple status values can be provided with comma separated strings - - OAuth: - - type: oauth2 - - name: petstore_auth - - parameter status: (query) Status values that need to be considered for filter - - returns: RequestBuilder<[Pet]> - */ - open class func findPetsByStatusWithRequestBuilder(status: [String]) -> RequestBuilder<[Pet]> { - let path = "/pet/findByStatus" - let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - - var url = URLComponents(string: URLString) - url?.queryItems = APIHelper.mapValuesToQueryItems([ - "status": status.encodeToJSON() - ]) - - let requestBuilder: RequestBuilder<[Pet]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } - - /** - Finds Pets by tags - - - parameter tags: (query) Tags to filter by - - returns: Observable<[Pet]> - */ - open class func findPetsByTags(tags: [String]) -> Observable<[Pet]> { - return Observable.create { observer -> Disposable in - findPetsByTagsWithRequestBuilder(tags: tags).execute { (response, error) -> Void in - if let error = error { - observer.onError(error) - } else if let response = response { - observer.onNext(response.body!) - } else { - fatalError() - } - observer.onCompleted() - } - return Disposables.create() - } - } - - /** - Finds Pets by tags - - GET /pet/findByTags - - Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. - - OAuth: - - type: oauth2 - - name: petstore_auth - - parameter tags: (query) Tags to filter by - - returns: RequestBuilder<[Pet]> - */ - open class func findPetsByTagsWithRequestBuilder(tags: [String]) -> RequestBuilder<[Pet]> { - let path = "/pet/findByTags" - let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - - var url = URLComponents(string: URLString) - url?.queryItems = APIHelper.mapValuesToQueryItems([ - "tags": tags.encodeToJSON() - ]) - - let requestBuilder: RequestBuilder<[Pet]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } - - /** - Find pet by ID - - - parameter petId: (path) ID of pet to return - - returns: Observable - */ - open class func getPetById(petId: Int64) -> Observable { - return Observable.create { observer -> Disposable in - getPetByIdWithRequestBuilder(petId: petId).execute { (response, error) -> Void in - if let error = error { - observer.onError(error) - } else if let response = response { - observer.onNext(response.body!) - } else { - fatalError() - } - observer.onCompleted() - } - return Disposables.create() - } - } - - /** - Find pet by ID - - GET /pet/{petId} - - Returns a single pet - - API Key: - - type: apiKey api_key - - name: api_key - - parameter petId: (path) ID of pet to return - - returns: RequestBuilder - */ - open class func getPetByIdWithRequestBuilder(petId: Int64) -> RequestBuilder { - var path = "/pet/{petId}" - let petIdPreEscape = "\(APIHelper.mapValueToPathItem(petId))" - let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{petId}", with: petIdPostEscape, options: .literal, range: nil) - let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } - - /** - Update an existing pet - - - parameter body: (body) Pet object that needs to be added to the store - - returns: Observable - */ - open class func updatePet(body: Pet) -> Observable { - return Observable.create { observer -> Disposable in - updatePetWithRequestBuilder(body: body).execute { (_, error) -> Void in - if let error = error { - observer.onError(error) - } else { - observer.onNext(()) - } - observer.onCompleted() - } - return Disposables.create() - } - } - - /** - Update an existing pet - - PUT /pet - - OAuth: - - type: oauth2 - - name: petstore_auth - - parameter body: (body) Pet object that needs to be added to the store - - returns: RequestBuilder - */ - open class func updatePetWithRequestBuilder(body: Pet) -> RequestBuilder { - let path = "/pet" - let URLString = PetstoreClientAPI.basePath + path - let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) - } - - /** - Updates a pet in the store with form data - - - parameter petId: (path) ID of pet that needs to be updated - - parameter name: (form) Updated name of the pet (optional) - - parameter status: (form) Updated status of the pet (optional) - - returns: Observable - */ - open class func updatePetWithForm(petId: Int64, name: String? = nil, status: String? = nil) -> Observable { - return Observable.create { observer -> Disposable in - updatePetWithFormWithRequestBuilder(petId: petId, name: name, status: status).execute { (_, error) -> Void in - if let error = error { - observer.onError(error) - } else { - observer.onNext(()) - } - observer.onCompleted() - } - return Disposables.create() - } - } - - /** - Updates a pet in the store with form data - - POST /pet/{petId} - - OAuth: - - type: oauth2 - - name: petstore_auth - - parameter petId: (path) ID of pet that needs to be updated - - parameter name: (form) Updated name of the pet (optional) - - parameter status: (form) Updated status of the pet (optional) - - returns: RequestBuilder - */ - open class func updatePetWithFormWithRequestBuilder(petId: Int64, name: String? = nil, status: String? = nil) -> RequestBuilder { - var path = "/pet/{petId}" - let petIdPreEscape = "\(APIHelper.mapValueToPathItem(petId))" - let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{petId}", with: petIdPostEscape, options: .literal, range: nil) - let URLString = PetstoreClientAPI.basePath + path - let formParams: [String: Any?] = [ - "name": name?.encodeToJSON(), - "status": status?.encodeToJSON() - ] - - let nonNullParameters = APIHelper.rejectNil(formParams) - let parameters = APIHelper.convertBoolToString(nonNullParameters) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } - - /** - uploads an image - - - parameter petId: (path) ID of pet to update - - parameter additionalMetadata: (form) Additional data to pass to server (optional) - - parameter file: (form) file to upload (optional) - - returns: Observable - */ - open class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil) -> Observable { - return Observable.create { observer -> Disposable in - uploadFileWithRequestBuilder(petId: petId, additionalMetadata: additionalMetadata, file: file).execute { (response, error) -> Void in - if let error = error { - observer.onError(error) - } else if let response = response { - observer.onNext(response.body!) - } else { - fatalError() - } - observer.onCompleted() - } - return Disposables.create() - } - } - - /** - uploads an image - - POST /pet/{petId}/uploadImage - - OAuth: - - type: oauth2 - - name: petstore_auth - - parameter petId: (path) ID of pet to update - - parameter additionalMetadata: (form) Additional data to pass to server (optional) - - parameter file: (form) file to upload (optional) - - returns: RequestBuilder - */ - open class func uploadFileWithRequestBuilder(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil) -> RequestBuilder { - var path = "/pet/{petId}/uploadImage" - let petIdPreEscape = "\(APIHelper.mapValueToPathItem(petId))" - let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{petId}", with: petIdPostEscape, options: .literal, range: nil) - let URLString = PetstoreClientAPI.basePath + path - let formParams: [String: Any?] = [ - "additionalMetadata": additionalMetadata?.encodeToJSON(), - "file": file?.encodeToJSON() - ] - - let nonNullParameters = APIHelper.rejectNil(formParams) - let parameters = APIHelper.convertBoolToString(nonNullParameters) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } - - /** - uploads an image (required) - - - parameter petId: (path) ID of pet to update - - parameter requiredFile: (form) file to upload - - parameter additionalMetadata: (form) Additional data to pass to server (optional) - - returns: Observable - */ - open class func uploadFileWithRequiredFile(petId: Int64, requiredFile: URL, additionalMetadata: String? = nil) -> Observable { - return Observable.create { observer -> Disposable in - uploadFileWithRequiredFileWithRequestBuilder(petId: petId, requiredFile: requiredFile, additionalMetadata: additionalMetadata).execute { (response, error) -> Void in - if let error = error { - observer.onError(error) - } else if let response = response { - observer.onNext(response.body!) - } else { - fatalError() - } - observer.onCompleted() - } - return Disposables.create() - } - } - - /** - uploads an image (required) - - POST /fake/{petId}/uploadImageWithRequiredFile - - OAuth: - - type: oauth2 - - name: petstore_auth - - parameter petId: (path) ID of pet to update - - parameter requiredFile: (form) file to upload - - parameter additionalMetadata: (form) Additional data to pass to server (optional) - - returns: RequestBuilder - */ - open class func uploadFileWithRequiredFileWithRequestBuilder(petId: Int64, requiredFile: URL, additionalMetadata: String? = nil) -> RequestBuilder { - var path = "/fake/{petId}/uploadImageWithRequiredFile" - let petIdPreEscape = "\(APIHelper.mapValueToPathItem(petId))" - let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{petId}", with: petIdPostEscape, options: .literal, range: nil) - let URLString = PetstoreClientAPI.basePath + path - let formParams: [String: Any?] = [ - "additionalMetadata": additionalMetadata?.encodeToJSON(), - "requiredFile": requiredFile.encodeToJSON() - ] - - let nonNullParameters = APIHelper.rejectNil(formParams) - let parameters = APIHelper.convertBoolToString(nonNullParameters) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } - -} diff --git a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift deleted file mode 100644 index c03311277b9a..000000000000 --- a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift +++ /dev/null @@ -1,180 +0,0 @@ -// -// StoreAPI.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -import RxSwift - -open class StoreAPI { - /** - Delete purchase order by ID - - - parameter orderId: (path) ID of the order that needs to be deleted - - returns: Observable - */ - open class func deleteOrder(orderId: String) -> Observable { - return Observable.create { observer -> Disposable in - deleteOrderWithRequestBuilder(orderId: orderId).execute { (_, error) -> Void in - if let error = error { - observer.onError(error) - } else { - observer.onNext(()) - } - observer.onCompleted() - } - return Disposables.create() - } - } - - /** - Delete purchase order by ID - - DELETE /store/order/{order_id} - - For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors - - parameter orderId: (path) ID of the order that needs to be deleted - - returns: RequestBuilder - */ - open class func deleteOrderWithRequestBuilder(orderId: String) -> RequestBuilder { - var path = "/store/order/{order_id}" - let orderIdPreEscape = "\(APIHelper.mapValueToPathItem(orderId))" - let orderIdPostEscape = orderIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{order_id}", with: orderIdPostEscape, options: .literal, range: nil) - let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } - - /** - Returns pet inventories by status - - - returns: Observable<[String:Int]> - */ - open class func getInventory() -> Observable<[String: Int]> { - return Observable.create { observer -> Disposable in - getInventoryWithRequestBuilder().execute { (response, error) -> Void in - if let error = error { - observer.onError(error) - } else if let response = response { - observer.onNext(response.body!) - } else { - fatalError() - } - observer.onCompleted() - } - return Disposables.create() - } - } - - /** - Returns pet inventories by status - - GET /store/inventory - - Returns a map of status codes to quantities - - API Key: - - type: apiKey api_key - - name: api_key - - returns: RequestBuilder<[String:Int]> - */ - open class func getInventoryWithRequestBuilder() -> RequestBuilder<[String: Int]> { - let path = "/store/inventory" - let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder<[String: Int]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } - - /** - Find purchase order by ID - - - parameter orderId: (path) ID of pet that needs to be fetched - - returns: Observable - */ - open class func getOrderById(orderId: Int64) -> Observable { - return Observable.create { observer -> Disposable in - getOrderByIdWithRequestBuilder(orderId: orderId).execute { (response, error) -> Void in - if let error = error { - observer.onError(error) - } else if let response = response { - observer.onNext(response.body!) - } else { - fatalError() - } - observer.onCompleted() - } - return Disposables.create() - } - } - - /** - Find purchase order by ID - - GET /store/order/{order_id} - - For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions - - parameter orderId: (path) ID of pet that needs to be fetched - - returns: RequestBuilder - */ - open class func getOrderByIdWithRequestBuilder(orderId: Int64) -> RequestBuilder { - var path = "/store/order/{order_id}" - let orderIdPreEscape = "\(APIHelper.mapValueToPathItem(orderId))" - let orderIdPostEscape = orderIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{order_id}", with: orderIdPostEscape, options: .literal, range: nil) - let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } - - /** - Place an order for a pet - - - parameter body: (body) order placed for purchasing the pet - - returns: Observable - */ - open class func placeOrder(body: Order) -> Observable { - return Observable.create { observer -> Disposable in - placeOrderWithRequestBuilder(body: body).execute { (response, error) -> Void in - if let error = error { - observer.onError(error) - } else if let response = response { - observer.onNext(response.body!) - } else { - fatalError() - } - observer.onCompleted() - } - return Disposables.create() - } - } - - /** - Place an order for a pet - - POST /store/order - - parameter body: (body) order placed for purchasing the pet - - returns: RequestBuilder - */ - open class func placeOrderWithRequestBuilder(body: Order) -> RequestBuilder { - let path = "/store/order" - let URLString = PetstoreClientAPI.basePath + path - let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) - } - -} diff --git a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift deleted file mode 100644 index ec28b4121d09..000000000000 --- a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift +++ /dev/null @@ -1,339 +0,0 @@ -// -// UserAPI.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -import RxSwift - -open class UserAPI { - /** - Create user - - - parameter body: (body) Created user object - - returns: Observable - */ - open class func createUser(body: User) -> Observable { - return Observable.create { observer -> Disposable in - createUserWithRequestBuilder(body: body).execute { (_, error) -> Void in - if let error = error { - observer.onError(error) - } else { - observer.onNext(()) - } - observer.onCompleted() - } - return Disposables.create() - } - } - - /** - Create user - - POST /user - - This can only be done by the logged in user. - - parameter body: (body) Created user object - - returns: RequestBuilder - */ - open class func createUserWithRequestBuilder(body: User) -> RequestBuilder { - let path = "/user" - let URLString = PetstoreClientAPI.basePath + path - let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) - } - - /** - Creates list of users with given input array - - - parameter body: (body) List of user object - - returns: Observable - */ - open class func createUsersWithArrayInput(body: [User]) -> Observable { - return Observable.create { observer -> Disposable in - createUsersWithArrayInputWithRequestBuilder(body: body).execute { (_, error) -> Void in - if let error = error { - observer.onError(error) - } else { - observer.onNext(()) - } - observer.onCompleted() - } - return Disposables.create() - } - } - - /** - Creates list of users with given input array - - POST /user/createWithArray - - parameter body: (body) List of user object - - returns: RequestBuilder - */ - open class func createUsersWithArrayInputWithRequestBuilder(body: [User]) -> RequestBuilder { - let path = "/user/createWithArray" - let URLString = PetstoreClientAPI.basePath + path - let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) - } - - /** - Creates list of users with given input array - - - parameter body: (body) List of user object - - returns: Observable - */ - open class func createUsersWithListInput(body: [User]) -> Observable { - return Observable.create { observer -> Disposable in - createUsersWithListInputWithRequestBuilder(body: body).execute { (_, error) -> Void in - if let error = error { - observer.onError(error) - } else { - observer.onNext(()) - } - observer.onCompleted() - } - return Disposables.create() - } - } - - /** - Creates list of users with given input array - - POST /user/createWithList - - parameter body: (body) List of user object - - returns: RequestBuilder - */ - open class func createUsersWithListInputWithRequestBuilder(body: [User]) -> RequestBuilder { - let path = "/user/createWithList" - let URLString = PetstoreClientAPI.basePath + path - let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) - } - - /** - Delete user - - - parameter username: (path) The name that needs to be deleted - - returns: Observable - */ - open class func deleteUser(username: String) -> Observable { - return Observable.create { observer -> Disposable in - deleteUserWithRequestBuilder(username: username).execute { (_, error) -> Void in - if let error = error { - observer.onError(error) - } else { - observer.onNext(()) - } - observer.onCompleted() - } - return Disposables.create() - } - } - - /** - Delete user - - DELETE /user/{username} - - This can only be done by the logged in user. - - parameter username: (path) The name that needs to be deleted - - returns: RequestBuilder - */ - open class func deleteUserWithRequestBuilder(username: String) -> RequestBuilder { - var path = "/user/{username}" - let usernamePreEscape = "\(APIHelper.mapValueToPathItem(username))" - let usernamePostEscape = usernamePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{username}", with: usernamePostEscape, options: .literal, range: nil) - let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } - - /** - Get user by user name - - - parameter username: (path) The name that needs to be fetched. Use user1 for testing. - - returns: Observable - */ - open class func getUserByName(username: String) -> Observable { - return Observable.create { observer -> Disposable in - getUserByNameWithRequestBuilder(username: username).execute { (response, error) -> Void in - if let error = error { - observer.onError(error) - } else if let response = response { - observer.onNext(response.body!) - } else { - fatalError() - } - observer.onCompleted() - } - return Disposables.create() - } - } - - /** - Get user by user name - - GET /user/{username} - - parameter username: (path) The name that needs to be fetched. Use user1 for testing. - - returns: RequestBuilder - */ - open class func getUserByNameWithRequestBuilder(username: String) -> RequestBuilder { - var path = "/user/{username}" - let usernamePreEscape = "\(APIHelper.mapValueToPathItem(username))" - let usernamePostEscape = usernamePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{username}", with: usernamePostEscape, options: .literal, range: nil) - let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } - - /** - Logs user into the system - - - parameter username: (query) The user name for login - - parameter password: (query) The password for login in clear text - - returns: Observable - */ - open class func loginUser(username: String, password: String) -> Observable { - return Observable.create { observer -> Disposable in - loginUserWithRequestBuilder(username: username, password: password).execute { (response, error) -> Void in - if let error = error { - observer.onError(error) - } else if let response = response { - observer.onNext(response.body!) - } else { - fatalError() - } - observer.onCompleted() - } - return Disposables.create() - } - } - - /** - Logs user into the system - - GET /user/login - - responseHeaders: [X-Rate-Limit(Int), X-Expires-After(Date)] - - parameter username: (query) The user name for login - - parameter password: (query) The password for login in clear text - - returns: RequestBuilder - */ - open class func loginUserWithRequestBuilder(username: String, password: String) -> RequestBuilder { - let path = "/user/login" - let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - - var url = URLComponents(string: URLString) - url?.queryItems = APIHelper.mapValuesToQueryItems([ - "username": username.encodeToJSON(), - "password": password.encodeToJSON() - ]) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } - - /** - Logs out current logged in user session - - - returns: Observable - */ - open class func logoutUser() -> Observable { - return Observable.create { observer -> Disposable in - logoutUserWithRequestBuilder().execute { (_, error) -> Void in - if let error = error { - observer.onError(error) - } else { - observer.onNext(()) - } - observer.onCompleted() - } - return Disposables.create() - } - } - - /** - Logs out current logged in user session - - GET /user/logout - - returns: RequestBuilder - */ - open class func logoutUserWithRequestBuilder() -> RequestBuilder { - let path = "/user/logout" - let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } - - /** - Updated user - - - parameter username: (path) name that need to be deleted - - parameter body: (body) Updated user object - - returns: Observable - */ - open class func updateUser(username: String, body: User) -> Observable { - return Observable.create { observer -> Disposable in - updateUserWithRequestBuilder(username: username, body: body).execute { (_, error) -> Void in - if let error = error { - observer.onError(error) - } else { - observer.onNext(()) - } - observer.onCompleted() - } - return Disposables.create() - } - } - - /** - Updated user - - PUT /user/{username} - - This can only be done by the logged in user. - - parameter username: (path) name that need to be deleted - - parameter body: (body) Updated user object - - returns: RequestBuilder - */ - open class func updateUserWithRequestBuilder(username: String, body: User) -> RequestBuilder { - var path = "/user/{username}" - let usernamePreEscape = "\(APIHelper.mapValueToPathItem(username))" - let usernamePostEscape = usernamePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{username}", with: usernamePostEscape, options: .literal, range: nil) - let URLString = PetstoreClientAPI.basePath + path - let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) - } - -} diff --git a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/AlamofireImplementations.swift b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/AlamofireImplementations.swift deleted file mode 100644 index 1d54e695608b..000000000000 --- a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/AlamofireImplementations.swift +++ /dev/null @@ -1,450 +0,0 @@ -// AlamofireImplementations.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -import Alamofire - -class AlamofireRequestBuilderFactory: RequestBuilderFactory { - func getNonDecodableBuilder() -> RequestBuilder.Type { - return AlamofireRequestBuilder.self - } - - func getBuilder() -> RequestBuilder.Type { - return AlamofireDecodableRequestBuilder.self - } -} - -private struct SynchronizedDictionary { - - private var dictionary = [K: V]() - private let queue = DispatchQueue( - label: "SynchronizedDictionary", - qos: DispatchQoS.userInitiated, - attributes: [DispatchQueue.Attributes.concurrent], - autoreleaseFrequency: DispatchQueue.AutoreleaseFrequency.inherit, - target: nil - ) - - public subscript(key: K) -> V? { - get { - var value: V? - - queue.sync { - value = self.dictionary[key] - } - - return value - } - set { - queue.sync(flags: DispatchWorkItemFlags.barrier) { - self.dictionary[key] = newValue - } - } - } - } - -// Store manager to retain its reference -private var managerStore = SynchronizedDictionary() - -open class AlamofireRequestBuilder: RequestBuilder { - required public init(method: String, URLString: String, parameters: [String: Any]?, isBody: Bool, headers: [String: String] = [:]) { - super.init(method: method, URLString: URLString, parameters: parameters, isBody: isBody, headers: headers) - } - - /** - May be overridden by a subclass if you want to control the session - configuration. - */ - open func createSessionManager() -> Alamofire.SessionManager { - let configuration = URLSessionConfiguration.default - configuration.httpAdditionalHeaders = buildHeaders() - return Alamofire.SessionManager(configuration: configuration) - } - - /** - May be overridden by a subclass if you want to custom request constructor. - */ - open func createURLRequest() -> URLRequest? { - let encoding: ParameterEncoding = isBody ? JSONDataEncoding() : URLEncoding() - guard let originalRequest = try? URLRequest(url: URLString, method: HTTPMethod(rawValue: method)!, headers: buildHeaders()) else { return nil } - return try? encoding.encode(originalRequest, with: parameters) - } - - /** - May be overridden by a subclass if you want to control the Content-Type - that is given to an uploaded form part. - - Return nil to use the default behavior (inferring the Content-Type from - the file extension). Return the desired Content-Type otherwise. - */ - open func contentTypeForFormPart(fileURL: URL) -> String? { - return nil - } - - /** - May be overridden by a subclass if you want to control the request - configuration (e.g. to override the cache policy). - */ - open func makeRequest(manager: SessionManager, method: HTTPMethod, encoding: ParameterEncoding, headers: [String: String]) -> DataRequest { - return manager.request(URLString, method: method, parameters: parameters, encoding: encoding, headers: headers) - } - - override open func execute(_ completion: @escaping (_ response: Response?, _ error: Error?) -> Void) { - let managerId: String = UUID().uuidString - // Create a new manager for each request to customize its request header - let manager = createSessionManager() - managerStore[managerId] = manager - - let encoding: ParameterEncoding = isBody ? JSONDataEncoding() : URLEncoding() - - let xMethod = Alamofire.HTTPMethod(rawValue: method) - let fileKeys = parameters == nil ? [] : parameters!.filter { $1 is NSURL } - .map { $0.0 } - - if fileKeys.count > 0 { - manager.upload(multipartFormData: { mpForm in - for (k, v) in self.parameters! { - switch v { - case let fileURL as URL: - if let mimeType = self.contentTypeForFormPart(fileURL: fileURL) { - mpForm.append(fileURL, withName: k, fileName: fileURL.lastPathComponent, mimeType: mimeType) - } else { - mpForm.append(fileURL, withName: k) - } - case let string as String: - mpForm.append(string.data(using: String.Encoding.utf8)!, withName: k) - case let number as NSNumber: - mpForm.append(number.stringValue.data(using: String.Encoding.utf8)!, withName: k) - default: - fatalError("Unprocessable value \(v) with key \(k)") - } - } - }, to: URLString, method: xMethod!, headers: nil, encodingCompletion: { encodingResult in - switch encodingResult { - case .success(let upload, _, _): - if let onProgressReady = self.onProgressReady { - onProgressReady(upload.uploadProgress) - } - self.processRequest(request: upload, managerId, completion) - case .failure(let encodingError): - completion(nil, ErrorResponse.error(415, nil, encodingError)) - } - }) - } else { - let request = makeRequest(manager: manager, method: xMethod!, encoding: encoding, headers: headers) - if let onProgressReady = self.onProgressReady { - onProgressReady(request.progress) - } - processRequest(request: request, managerId, completion) - } - - } - - fileprivate func processRequest(request: DataRequest, _ managerId: String, _ completion: @escaping (_ response: Response?, _ error: Error?) -> Void) { - if let credential = self.credential { - request.authenticate(usingCredential: credential) - } - - let cleanupRequest = { - managerStore[managerId] = nil - } - - let validatedRequest = request.validate() - - switch T.self { - case is String.Type: - validatedRequest.responseString(queue: PetstoreClientAPI.apiResponseQueue, completionHandler: { (stringResponse) in - cleanupRequest() - - if stringResponse.result.isFailure { - completion( - nil, - ErrorResponse.error(stringResponse.response?.statusCode ?? 500, stringResponse.data, stringResponse.result.error!) - ) - return - } - - completion( - Response( - response: stringResponse.response!, - body: ((stringResponse.result.value ?? "") as! T) - ), - nil - ) - }) - case is URL.Type: - validatedRequest.responseData(queue: PetstoreClientAPI.apiResponseQueue, completionHandler: { (dataResponse) in - cleanupRequest() - - do { - - guard !dataResponse.result.isFailure else { - throw DownloadException.responseFailed - } - - guard let data = dataResponse.data else { - throw DownloadException.responseDataMissing - } - - guard let request = request.request else { - throw DownloadException.requestMissing - } - - let fileManager = FileManager.default - let urlRequest = try request.asURLRequest() - let documentsDirectory = fileManager.urls(for: .documentDirectory, in: .userDomainMask)[0] - let requestURL = try self.getURL(from: urlRequest) - - var requestPath = try self.getPath(from: requestURL) - - if let headerFileName = self.getFileName(fromContentDisposition: dataResponse.response?.allHeaderFields["Content-Disposition"] as? String) { - requestPath = requestPath.appending("/\(headerFileName)") - } - - let filePath = documentsDirectory.appendingPathComponent(requestPath) - let directoryPath = filePath.deletingLastPathComponent().path - - try fileManager.createDirectory(atPath: directoryPath, withIntermediateDirectories: true, attributes: nil) - try data.write(to: filePath, options: .atomic) - - completion( - Response( - response: dataResponse.response!, - body: (filePath as! T) - ), - nil - ) - - } catch let requestParserError as DownloadException { - completion(nil, ErrorResponse.error(400, dataResponse.data, requestParserError)) - } catch let error { - completion(nil, ErrorResponse.error(400, dataResponse.data, error)) - } - return - }) - case is Void.Type: - validatedRequest.responseData(queue: PetstoreClientAPI.apiResponseQueue, completionHandler: { (voidResponse) in - cleanupRequest() - - if voidResponse.result.isFailure { - completion( - nil, - ErrorResponse.error(voidResponse.response?.statusCode ?? 500, voidResponse.data, voidResponse.result.error!) - ) - return - } - - completion( - Response( - response: voidResponse.response!, - body: nil), - nil - ) - }) - default: - validatedRequest.responseData(queue: PetstoreClientAPI.apiResponseQueue, completionHandler: { (dataResponse) in - cleanupRequest() - - if dataResponse.result.isFailure { - completion( - nil, - ErrorResponse.error(dataResponse.response?.statusCode ?? 500, dataResponse.data, dataResponse.result.error!) - ) - return - } - - completion( - Response( - response: dataResponse.response!, - body: (dataResponse.data as! T) - ), - nil - ) - }) - } - } - - open func buildHeaders() -> [String: String] { - var httpHeaders = SessionManager.defaultHTTPHeaders - for (key, value) in self.headers { - httpHeaders[key] = value - } - return httpHeaders - } - - fileprivate func getFileName(fromContentDisposition contentDisposition: String?) -> String? { - - guard let contentDisposition = contentDisposition else { - return nil - } - - let items = contentDisposition.components(separatedBy: ";") - - var filename: String? - - for contentItem in items { - - let filenameKey = "filename=" - guard let range = contentItem.range(of: filenameKey) else { - break - } - - filename = contentItem - return filename? - .replacingCharacters(in: range, with: "") - .replacingOccurrences(of: "\"", with: "") - .trimmingCharacters(in: .whitespacesAndNewlines) - } - - return filename - - } - - fileprivate func getPath(from url: URL) throws -> String { - - guard var path = URLComponents(url: url, resolvingAgainstBaseURL: true)?.path else { - throw DownloadException.requestMissingPath - } - - if path.hasPrefix("/") { - path.remove(at: path.startIndex) - } - - return path - - } - - fileprivate func getURL(from urlRequest: URLRequest) throws -> URL { - - guard let url = urlRequest.url else { - throw DownloadException.requestMissingURL - } - - return url - } - -} - -private enum DownloadException: Error { - case responseDataMissing - case responseFailed - case requestMissing - case requestMissingPath - case requestMissingURL -} - -public enum AlamofireDecodableRequestBuilderError: Error { - case emptyDataResponse - case nilHTTPResponse - case jsonDecoding(DecodingError) - case generalError(Error) -} - -open class AlamofireDecodableRequestBuilder: AlamofireRequestBuilder { - - override fileprivate func processRequest(request: DataRequest, _ managerId: String, _ completion: @escaping (_ response: Response?, _ error: Error?) -> Void) { - if let credential = self.credential { - request.authenticate(usingCredential: credential) - } - - let cleanupRequest = { - managerStore[managerId] = nil - } - - let validatedRequest = request.validate() - - switch T.self { - case is String.Type: - validatedRequest.responseString(queue: PetstoreClientAPI.apiResponseQueue, completionHandler: { (stringResponse) in - cleanupRequest() - - if stringResponse.result.isFailure { - completion( - nil, - ErrorResponse.error(stringResponse.response?.statusCode ?? 500, stringResponse.data, stringResponse.result.error!) - ) - return - } - - completion( - Response( - response: stringResponse.response!, - body: ((stringResponse.result.value ?? "") as! T) - ), - nil - ) - }) - case is Void.Type: - validatedRequest.responseData(queue: PetstoreClientAPI.apiResponseQueue, completionHandler: { (voidResponse) in - cleanupRequest() - - if voidResponse.result.isFailure { - completion( - nil, - ErrorResponse.error(voidResponse.response?.statusCode ?? 500, voidResponse.data, voidResponse.result.error!) - ) - return - } - - completion( - Response( - response: voidResponse.response!, - body: nil), - nil - ) - }) - case is Data.Type: - validatedRequest.responseData(queue: PetstoreClientAPI.apiResponseQueue, completionHandler: { (dataResponse) in - cleanupRequest() - - if dataResponse.result.isFailure { - completion( - nil, - ErrorResponse.error(dataResponse.response?.statusCode ?? 500, dataResponse.data, dataResponse.result.error!) - ) - return - } - - completion( - Response( - response: dataResponse.response!, - body: (dataResponse.data as! T) - ), - nil - ) - }) - default: - validatedRequest.responseData(queue: PetstoreClientAPI.apiResponseQueue, completionHandler: { (dataResponse: DataResponse) in - cleanupRequest() - - guard dataResponse.result.isSuccess else { - completion(nil, ErrorResponse.error(dataResponse.response?.statusCode ?? 500, dataResponse.data, dataResponse.result.error!)) - return - } - - guard let data = dataResponse.data, !data.isEmpty else { - completion(nil, ErrorResponse.error(-1, nil, AlamofireDecodableRequestBuilderError.emptyDataResponse)) - return - } - - guard let httpResponse = dataResponse.response else { - completion(nil, ErrorResponse.error(-2, nil, AlamofireDecodableRequestBuilderError.nilHTTPResponse)) - return - } - - var responseObj: Response? - - let decodeResult: (decodableObj: T?, error: Error?) = CodableHelper.decode(T.self, from: data) - if decodeResult.error == nil { - responseObj = Response(response: httpResponse, body: decodeResult.decodableObj) - } - - completion(responseObj, decodeResult.error) - }) - } - } - -} diff --git a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/CodableHelper.swift b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/CodableHelper.swift deleted file mode 100644 index 27cf29c65600..000000000000 --- a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/CodableHelper.swift +++ /dev/null @@ -1,75 +0,0 @@ -// -// CodableHelper.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public typealias EncodeResult = (data: Data?, error: Error?) - -open class CodableHelper { - - private static var customDateFormatter: DateFormatter? - private static var defaultDateFormatter: DateFormatter = { - let dateFormatter = DateFormatter() - dateFormatter.calendar = Calendar(identifier: .iso8601) - dateFormatter.locale = Locale(identifier: "en_US_POSIX") - dateFormatter.timeZone = TimeZone(secondsFromGMT: 0) - dateFormatter.dateFormat = Configuration.dateFormat - return dateFormatter - }() - private static var customJSONDecoder: JSONDecoder? - private static var defaultJSONDecoder: JSONDecoder = { - let decoder = JSONDecoder() - decoder.dateDecodingStrategy = .formatted(CodableHelper.dateFormatter) - return decoder - }() - private static var customJSONEncoder: JSONEncoder? - private static var defaultJSONEncoder: JSONEncoder = { - let encoder = JSONEncoder() - encoder.dateEncodingStrategy = .formatted(CodableHelper.dateFormatter) - encoder.outputFormatting = .prettyPrinted - return encoder - }() - - public static var dateFormatter: DateFormatter { - get { return self.customDateFormatter ?? self.defaultDateFormatter } - set { self.customDateFormatter = newValue } - } - public static var jsonDecoder: JSONDecoder { - get { return self.customJSONDecoder ?? self.defaultJSONDecoder } - set { self.customJSONDecoder = newValue } - } - public static var jsonEncoder: JSONEncoder { - get { return self.customJSONEncoder ?? self.defaultJSONEncoder } - set { self.customJSONEncoder = newValue } - } - - open class func decode(_ type: T.Type, from data: Data) -> (decodableObj: T?, error: Error?) where T: Decodable { - var returnedDecodable: T? - var returnedError: Error? - - do { - returnedDecodable = try self.jsonDecoder.decode(type, from: data) - } catch { - returnedError = error - } - - return (returnedDecodable, returnedError) - } - - open class func encode(_ value: T) -> EncodeResult where T: Encodable { - var returnedData: Data? - var returnedError: Error? - - do { - returnedData = try self.jsonEncoder.encode(value) - } catch { - returnedError = error - } - - return (returnedData, returnedError) - } -} diff --git a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Configuration.swift b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Configuration.swift deleted file mode 100644 index e1ecb39726e7..000000000000 --- a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Configuration.swift +++ /dev/null @@ -1,15 +0,0 @@ -// Configuration.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -open class Configuration { - - // This value is used to configure the date formatter that is used to serialize dates into JSON format. - // You must set it prior to encoding any dates, and it will only be read once. - public static var dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSZZZZZ" - -} diff --git a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift deleted file mode 100644 index 74fcfcf2ad49..000000000000 --- a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift +++ /dev/null @@ -1,173 +0,0 @@ -// Extensions.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -extension Bool: JSONEncodable { - func encodeToJSON() -> Any { return self as Any } -} - -extension Float: JSONEncodable { - func encodeToJSON() -> Any { return self as Any } -} - -extension Int: JSONEncodable { - func encodeToJSON() -> Any { return self as Any } -} - -extension Int32: JSONEncodable { - func encodeToJSON() -> Any { return NSNumber(value: self as Int32) } -} - -extension Int64: JSONEncodable { - func encodeToJSON() -> Any { return NSNumber(value: self as Int64) } -} - -extension Double: JSONEncodable { - func encodeToJSON() -> Any { return self as Any } -} - -extension String: JSONEncodable { - func encodeToJSON() -> Any { return self as Any } -} - -extension RawRepresentable where RawValue: JSONEncodable { - func encodeToJSON() -> Any { return self.rawValue as Any } -} - -private func encodeIfPossible(_ object: T) -> Any { - if let encodableObject = object as? JSONEncodable { - return encodableObject.encodeToJSON() - } else { - return object as Any - } -} - -extension Array: JSONEncodable { - func encodeToJSON() -> Any { - return self.map(encodeIfPossible) - } -} - -extension Dictionary: JSONEncodable { - func encodeToJSON() -> Any { - var dictionary = [AnyHashable: Any]() - for (key, value) in self { - dictionary[key] = encodeIfPossible(value) - } - return dictionary as Any - } -} - -extension Data: JSONEncodable { - func encodeToJSON() -> Any { - return self.base64EncodedString(options: Data.Base64EncodingOptions()) - } -} - -extension Date: JSONEncodable { - func encodeToJSON() -> Any { - return CodableHelper.dateFormatter.string(from: self) as Any - } -} - -extension URL: JSONEncodable { - func encodeToJSON() -> Any { - return self - } -} - -extension UUID: JSONEncodable { - func encodeToJSON() -> Any { - return self.uuidString - } -} - -extension String: CodingKey { - - public var stringValue: String { - return self - } - - public init?(stringValue: String) { - self.init(stringLiteral: stringValue) - } - - public var intValue: Int? { - return nil - } - - public init?(intValue: Int) { - return nil - } - -} - -extension KeyedEncodingContainerProtocol { - - public mutating func encodeArray(_ values: [T], forKey key: Self.Key) throws where T: Encodable { - var arrayContainer = nestedUnkeyedContainer(forKey: key) - try arrayContainer.encode(contentsOf: values) - } - - public mutating func encodeArrayIfPresent(_ values: [T]?, forKey key: Self.Key) throws where T: Encodable { - if let values = values { - try encodeArray(values, forKey: key) - } - } - - public mutating func encodeMap(_ pairs: [Self.Key: T]) throws where T: Encodable { - for (key, value) in pairs { - try encode(value, forKey: key) - } - } - - public mutating func encodeMapIfPresent(_ pairs: [Self.Key: T]?) throws where T: Encodable { - if let pairs = pairs { - try encodeMap(pairs) - } - } - -} - -extension KeyedDecodingContainerProtocol { - - public func decodeArray(_ type: T.Type, forKey key: Self.Key) throws -> [T] where T: Decodable { - var tmpArray = [T]() - - var nestedContainer = try nestedUnkeyedContainer(forKey: key) - while !nestedContainer.isAtEnd { - let arrayValue = try nestedContainer.decode(T.self) - tmpArray.append(arrayValue) - } - - return tmpArray - } - - public func decodeArrayIfPresent(_ type: T.Type, forKey key: Self.Key) throws -> [T]? where T: Decodable { - var tmpArray: [T]? - - if contains(key) { - tmpArray = try decodeArray(T.self, forKey: key) - } - - return tmpArray - } - - public func decodeMap(_ type: T.Type, excludedKeys: Set) throws -> [Self.Key: T] where T: Decodable { - var map: [Self.Key: T] = [:] - - for key in allKeys { - if !excludedKeys.contains(key) { - let value = try decode(T.self, forKey: key) - map[key] = value - } - } - - return map - } - -} diff --git a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/JSONEncodableEncoding.swift b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/JSONEncodableEncoding.swift deleted file mode 100644 index fb76bbed26f7..000000000000 --- a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/JSONEncodableEncoding.swift +++ /dev/null @@ -1,54 +0,0 @@ -// -// JSONDataEncoding.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -import Alamofire - -public struct JSONDataEncoding: ParameterEncoding { - - // MARK: Properties - - private static let jsonDataKey = "jsonData" - - // MARK: Encoding - - /// Creates a URL request by encoding parameters and applying them onto an existing request. - /// - /// - parameter urlRequest: The request to have parameters applied. - /// - parameter parameters: The parameters to apply. This should have a single key/value - /// pair with "jsonData" as the key and a Data object as the value. - /// - /// - throws: An `Error` if the encoding process encounters an error. - /// - /// - returns: The encoded request. - public func encode(_ urlRequest: URLRequestConvertible, with parameters: Parameters?) throws -> URLRequest { - var urlRequest = try urlRequest.asURLRequest() - - guard let jsonData = parameters?[JSONDataEncoding.jsonDataKey] as? Data, !jsonData.isEmpty else { - return urlRequest - } - - if urlRequest.value(forHTTPHeaderField: "Content-Type") == nil { - urlRequest.setValue("application/json", forHTTPHeaderField: "Content-Type") - } - - urlRequest.httpBody = jsonData - - return urlRequest - } - - public static func encodingParameters(jsonData: Data?) -> Parameters? { - var returnedParams: Parameters? - if let jsonData = jsonData, !jsonData.isEmpty { - var params = Parameters() - params[jsonDataKey] = jsonData - returnedParams = params - } - return returnedParams - } - -} diff --git a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift deleted file mode 100644 index 827bdec87782..000000000000 --- a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift +++ /dev/null @@ -1,43 +0,0 @@ -// -// JSONEncodingHelper.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -import Alamofire - -open class JSONEncodingHelper { - - open class func encodingParameters(forEncodableObject encodableObj: T?) -> Parameters? { - var params: Parameters? - - // Encode the Encodable object - if let encodableObj = encodableObj { - let encodeResult = CodableHelper.encode(encodableObj) - if encodeResult.error == nil { - params = JSONDataEncoding.encodingParameters(jsonData: encodeResult.data) - } - } - - return params - } - - open class func encodingParameters(forEncodableObject encodableObj: Any?) -> Parameters? { - var params: Parameters? - - if let encodableObj = encodableObj { - do { - let data = try JSONSerialization.data(withJSONObject: encodableObj, options: .prettyPrinted) - params = JSONDataEncoding.encodingParameters(jsonData: data) - } catch { - print(error) - return nil - } - } - - return params - } - -} diff --git a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift deleted file mode 100644 index 25161165865e..000000000000 --- a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift +++ /dev/null @@ -1,36 +0,0 @@ -// Models.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -protocol JSONEncodable { - func encodeToJSON() -> Any -} - -public enum ErrorResponse: Error { - case error(Int, Data?, Error) -} - -open class Response { - public let statusCode: Int - public let header: [String: String] - public let body: T? - - public init(statusCode: Int, header: [String: String], body: T?) { - self.statusCode = statusCode - self.header = header - self.body = body - } - - public convenience init(response: HTTPURLResponse, body: T?) { - let rawHeader = response.allHeaderFields - var header = [String: String]() - for case let (key, value) as (String, String) in rawHeader { - header[key] = value - } - self.init(statusCode: response.statusCode, header: header, body: body) - } -} diff --git a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift deleted file mode 100644 index 83a06951ccd6..000000000000 --- a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift +++ /dev/null @@ -1,25 +0,0 @@ -// -// AdditionalPropertiesClass.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct AdditionalPropertiesClass: Codable { - - public var mapString: [String: String]? - public var mapMapString: [String: [String: String]]? - - public init(mapString: [String: String]?, mapMapString: [String: [String: String]]?) { - self.mapString = mapString - self.mapMapString = mapMapString - } - - public enum CodingKeys: String, CodingKey { - case mapString = "map_string" - case mapMapString = "map_map_string" - } - -} diff --git a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift deleted file mode 100644 index 5ed9f31e2a36..000000000000 --- a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift +++ /dev/null @@ -1,20 +0,0 @@ -// -// Animal.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct Animal: Codable { - - public var className: String - public var color: String? = "red" - - public init(className: String, color: String?) { - self.className = className - self.color = color - } - -} diff --git a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift deleted file mode 100644 index e09b0e9efdc8..000000000000 --- a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift +++ /dev/null @@ -1,10 +0,0 @@ -// -// AnimalFarm.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public typealias AnimalFarm = [Animal] diff --git a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift deleted file mode 100644 index ec270da89074..000000000000 --- a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift +++ /dev/null @@ -1,22 +0,0 @@ -// -// ApiResponse.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct ApiResponse: Codable { - - public var code: Int? - public var type: String? - public var message: String? - - public init(code: Int?, type: String?, message: String?) { - self.code = code - self.type = type - self.message = message - } - -} diff --git a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift deleted file mode 100644 index 3843287630b1..000000000000 --- a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift +++ /dev/null @@ -1,22 +0,0 @@ -// -// ArrayOfArrayOfNumberOnly.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct ArrayOfArrayOfNumberOnly: Codable { - - public var arrayArrayNumber: [[Double]]? - - public init(arrayArrayNumber: [[Double]]?) { - self.arrayArrayNumber = arrayArrayNumber - } - - public enum CodingKeys: String, CodingKey { - case arrayArrayNumber = "ArrayArrayNumber" - } - -} diff --git a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift deleted file mode 100644 index f8b198e81f50..000000000000 --- a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift +++ /dev/null @@ -1,22 +0,0 @@ -// -// ArrayOfNumberOnly.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct ArrayOfNumberOnly: Codable { - - public var arrayNumber: [Double]? - - public init(arrayNumber: [Double]?) { - self.arrayNumber = arrayNumber - } - - public enum CodingKeys: String, CodingKey { - case arrayNumber = "ArrayNumber" - } - -} diff --git a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift deleted file mode 100644 index 67f7f7e5151f..000000000000 --- a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift +++ /dev/null @@ -1,28 +0,0 @@ -// -// ArrayTest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct ArrayTest: Codable { - - public var arrayOfString: [String]? - public var arrayArrayOfInteger: [[Int64]]? - public var arrayArrayOfModel: [[ReadOnlyFirst]]? - - public init(arrayOfString: [String]?, arrayArrayOfInteger: [[Int64]]?, arrayArrayOfModel: [[ReadOnlyFirst]]?) { - self.arrayOfString = arrayOfString - self.arrayArrayOfInteger = arrayArrayOfInteger - self.arrayArrayOfModel = arrayArrayOfModel - } - - public enum CodingKeys: String, CodingKey { - case arrayOfString = "array_of_string" - case arrayArrayOfInteger = "array_array_of_integer" - case arrayArrayOfModel = "array_array_of_model" - } - -} diff --git a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift deleted file mode 100644 index d576b50b1c9c..000000000000 --- a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift +++ /dev/null @@ -1,38 +0,0 @@ -// -// Capitalization.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct Capitalization: Codable { - - public var smallCamel: String? - public var capitalCamel: String? - public var smallSnake: String? - public var capitalSnake: String? - public var sCAETHFlowPoints: String? - /** Name of the pet */ - public var ATT_NAME: String? - - public init(smallCamel: String?, capitalCamel: String?, smallSnake: String?, capitalSnake: String?, sCAETHFlowPoints: String?, ATT_NAME: String?) { - self.smallCamel = smallCamel - self.capitalCamel = capitalCamel - self.smallSnake = smallSnake - self.capitalSnake = capitalSnake - self.sCAETHFlowPoints = sCAETHFlowPoints - self.ATT_NAME = ATT_NAME - } - - public enum CodingKeys: String, CodingKey { - case smallCamel - case capitalCamel = "CapitalCamel" - case smallSnake = "small_Snake" - case capitalSnake = "Capital_Snake" - case sCAETHFlowPoints = "SCA_ETH_Flow_Points" - case ATT_NAME - } - -} diff --git a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift deleted file mode 100644 index 7ab887f3113f..000000000000 --- a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift +++ /dev/null @@ -1,22 +0,0 @@ -// -// Cat.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct Cat: Codable { - - public var className: String - public var color: String? = "red" - public var declawed: Bool? - - public init(className: String, color: String?, declawed: Bool?) { - self.className = className - self.color = color - self.declawed = declawed - } - -} diff --git a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift deleted file mode 100644 index a51ad0dffab1..000000000000 --- a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift +++ /dev/null @@ -1,18 +0,0 @@ -// -// CatAllOf.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct CatAllOf: Codable { - - public var declawed: Bool? - - public init(declawed: Bool?) { - self.declawed = declawed - } - -} diff --git a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Category.swift b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Category.swift deleted file mode 100644 index eb8f7e5e1974..000000000000 --- a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Category.swift +++ /dev/null @@ -1,20 +0,0 @@ -// -// Category.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct Category: Codable { - - public var id: Int64? - public var name: String = "default-name" - - public init(id: Int64?, name: String) { - self.id = id - self.name = name - } - -} diff --git a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift deleted file mode 100644 index e2a7d4427a06..000000000000 --- a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift +++ /dev/null @@ -1,19 +0,0 @@ -// -// ClassModel.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -/** Model for testing model with \"_class\" property */ -public struct ClassModel: Codable { - - public var _class: String? - - public init(_class: String?) { - self._class = _class - } - -} diff --git a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Client.swift b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Client.swift deleted file mode 100644 index 00245ca37280..000000000000 --- a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Client.swift +++ /dev/null @@ -1,18 +0,0 @@ -// -// Client.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct Client: Codable { - - public var client: String? - - public init(client: String?) { - self.client = client - } - -} diff --git a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift deleted file mode 100644 index 492c1228008e..000000000000 --- a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift +++ /dev/null @@ -1,22 +0,0 @@ -// -// Dog.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct Dog: Codable { - - public var className: String - public var color: String? = "red" - public var breed: String? - - public init(className: String, color: String?, breed: String?) { - self.className = className - self.color = color - self.breed = breed - } - -} diff --git a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift deleted file mode 100644 index 7786f8acc5ae..000000000000 --- a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift +++ /dev/null @@ -1,18 +0,0 @@ -// -// DogAllOf.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct DogAllOf: Codable { - - public var breed: String? - - public init(breed: String?) { - self.breed = breed - } - -} diff --git a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift deleted file mode 100644 index 5034ff0b8c68..000000000000 --- a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift +++ /dev/null @@ -1,33 +0,0 @@ -// -// EnumArrays.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct EnumArrays: Codable { - - public enum JustSymbol: String, Codable { - case greaterThanOrEqualTo = ">=" - case dollar = "$" - } - public enum ArrayEnum: String, Codable { - case fish = "fish" - case crab = "crab" - } - public var justSymbol: JustSymbol? - public var arrayEnum: [ArrayEnum]? - - public init(justSymbol: JustSymbol?, arrayEnum: [ArrayEnum]?) { - self.justSymbol = justSymbol - self.arrayEnum = arrayEnum - } - - public enum CodingKeys: String, CodingKey { - case justSymbol = "just_symbol" - case arrayEnum = "array_enum" - } - -} diff --git a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift deleted file mode 100644 index 3c1dfcac577d..000000000000 --- a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift +++ /dev/null @@ -1,14 +0,0 @@ -// -// EnumClass.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public enum EnumClass: String, Codable { - case abc = "_abc" - case efg = "-efg" - case xyz = "(xyz)" -} diff --git a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift deleted file mode 100644 index 6db9b34d183b..000000000000 --- a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift +++ /dev/null @@ -1,52 +0,0 @@ -// -// EnumTest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct EnumTest: Codable { - - public enum EnumString: String, Codable { - case upper = "UPPER" - case lower = "lower" - case empty = "" - } - public enum EnumStringRequired: String, Codable { - case upper = "UPPER" - case lower = "lower" - case empty = "" - } - public enum EnumInteger: Int, Codable { - case _1 = 1 - case number1 = -1 - } - public enum EnumNumber: Double, Codable { - case _11 = 1.1 - case number12 = -1.2 - } - public var enumString: EnumString? - public var enumStringRequired: EnumStringRequired - public var enumInteger: EnumInteger? - public var enumNumber: EnumNumber? - public var outerEnum: OuterEnum? - - public init(enumString: EnumString?, enumStringRequired: EnumStringRequired, enumInteger: EnumInteger?, enumNumber: EnumNumber?, outerEnum: OuterEnum?) { - self.enumString = enumString - self.enumStringRequired = enumStringRequired - self.enumInteger = enumInteger - self.enumNumber = enumNumber - self.outerEnum = outerEnum - } - - public enum CodingKeys: String, CodingKey { - case enumString = "enum_string" - case enumStringRequired = "enum_string_required" - case enumInteger = "enum_integer" - case enumNumber = "enum_number" - case outerEnum - } - -} diff --git a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/File.swift b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/File.swift deleted file mode 100644 index abf3ccffc485..000000000000 --- a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/File.swift +++ /dev/null @@ -1,20 +0,0 @@ -// -// File.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -/** Must be named `File` for test. */ -public struct File: Codable { - - /** Test capitalization */ - public var sourceURI: String? - - public init(sourceURI: String?) { - self.sourceURI = sourceURI - } - -} diff --git a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift deleted file mode 100644 index 532f1457939a..000000000000 --- a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift +++ /dev/null @@ -1,20 +0,0 @@ -// -// FileSchemaTestClass.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct FileSchemaTestClass: Codable { - - public var file: File? - public var files: [File]? - - public init(file: File?, files: [File]?) { - self.file = file - self.files = files - } - -} diff --git a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift deleted file mode 100644 index 20bd6d103b3d..000000000000 --- a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift +++ /dev/null @@ -1,42 +0,0 @@ -// -// FormatTest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct FormatTest: Codable { - - public var integer: Int? - public var int32: Int? - public var int64: Int64? - public var number: Double - public var float: Float? - public var double: Double? - public var string: String? - public var byte: Data - public var binary: URL? - public var date: Date - public var dateTime: Date? - public var uuid: UUID? - public var password: String - - public init(integer: Int?, int32: Int?, int64: Int64?, number: Double, float: Float?, double: Double?, string: String?, byte: Data, binary: URL?, date: Date, dateTime: Date?, uuid: UUID?, password: String) { - self.integer = integer - self.int32 = int32 - self.int64 = int64 - self.number = number - self.float = float - self.double = double - self.string = string - self.byte = byte - self.binary = binary - self.date = date - self.dateTime = dateTime - self.uuid = uuid - self.password = password - } - -} diff --git a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift deleted file mode 100644 index 906ddb06fb17..000000000000 --- a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift +++ /dev/null @@ -1,20 +0,0 @@ -// -// HasOnlyReadOnly.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct HasOnlyReadOnly: Codable { - - public var bar: String? - public var foo: String? - - public init(bar: String?, foo: String?) { - self.bar = bar - self.foo = foo - } - -} diff --git a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/List.swift b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/List.swift deleted file mode 100644 index 08d59953873e..000000000000 --- a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/List.swift +++ /dev/null @@ -1,22 +0,0 @@ -// -// List.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct List: Codable { - - public var _123list: String? - - public init(_123list: String?) { - self._123list = _123list - } - - public enum CodingKeys: String, CodingKey { - case _123list = "123-list" - } - -} diff --git a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift deleted file mode 100644 index 3a10a7dfcaf6..000000000000 --- a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift +++ /dev/null @@ -1,35 +0,0 @@ -// -// MapTest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct MapTest: Codable { - - public enum MapOfEnumString: String, Codable { - case upper = "UPPER" - case lower = "lower" - } - public var mapMapOfString: [String: [String: String]]? - public var mapOfEnumString: [String: String]? - public var directMap: [String: Bool]? - public var indirectMap: StringBooleanMap? - - public init(mapMapOfString: [String: [String: String]]?, mapOfEnumString: [String: String]?, directMap: [String: Bool]?, indirectMap: StringBooleanMap?) { - self.mapMapOfString = mapMapOfString - self.mapOfEnumString = mapOfEnumString - self.directMap = directMap - self.indirectMap = indirectMap - } - - public enum CodingKeys: String, CodingKey { - case mapMapOfString = "map_map_of_string" - case mapOfEnumString = "map_of_enum_string" - case directMap = "direct_map" - case indirectMap = "indirect_map" - } - -} diff --git a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift deleted file mode 100644 index c3deb2f28932..000000000000 --- a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift +++ /dev/null @@ -1,22 +0,0 @@ -// -// MixedPropertiesAndAdditionalPropertiesClass.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct MixedPropertiesAndAdditionalPropertiesClass: Codable { - - public var uuid: UUID? - public var dateTime: Date? - public var map: [String: Animal]? - - public init(uuid: UUID?, dateTime: Date?, map: [String: Animal]?) { - self.uuid = uuid - self.dateTime = dateTime - self.map = map - } - -} diff --git a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift deleted file mode 100644 index 78917d75b44d..000000000000 --- a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift +++ /dev/null @@ -1,26 +0,0 @@ -// -// Model200Response.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -/** Model for testing model name starting with number */ -public struct Model200Response: Codable { - - public var name: Int? - public var _class: String? - - public init(name: Int?, _class: String?) { - self.name = name - self._class = _class - } - - public enum CodingKeys: String, CodingKey { - case name - case _class = "class" - } - -} diff --git a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift deleted file mode 100644 index 43c4891e1e23..000000000000 --- a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift +++ /dev/null @@ -1,32 +0,0 @@ -// -// Name.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -/** Model for testing model name same as property name */ -public struct Name: Codable { - - public var name: Int - public var snakeCase: Int? - public var property: String? - public var _123number: Int? - - public init(name: Int, snakeCase: Int?, property: String?, _123number: Int?) { - self.name = name - self.snakeCase = snakeCase - self.property = property - self._123number = _123number - } - - public enum CodingKeys: String, CodingKey { - case name - case snakeCase = "snake_case" - case property - case _123number = "123Number" - } - -} diff --git a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift deleted file mode 100644 index abd2269e8e76..000000000000 --- a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift +++ /dev/null @@ -1,22 +0,0 @@ -// -// NumberOnly.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct NumberOnly: Codable { - - public var justNumber: Double? - - public init(justNumber: Double?) { - self.justNumber = justNumber - } - - public enum CodingKeys: String, CodingKey { - case justNumber = "JustNumber" - } - -} diff --git a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Order.swift b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Order.swift deleted file mode 100644 index a6e1b1d2e5e4..000000000000 --- a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Order.swift +++ /dev/null @@ -1,34 +0,0 @@ -// -// Order.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct Order: Codable { - - public enum Status: String, Codable { - case placed = "placed" - case approved = "approved" - case delivered = "delivered" - } - public var id: Int64? - public var petId: Int64? - public var quantity: Int? - public var shipDate: Date? - /** Order Status */ - public var status: Status? - public var complete: Bool? = false - - public init(id: Int64?, petId: Int64?, quantity: Int?, shipDate: Date?, status: Status?, complete: Bool?) { - self.id = id - self.petId = petId - self.quantity = quantity - self.shipDate = shipDate - self.status = status - self.complete = complete - } - -} diff --git a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift deleted file mode 100644 index 49aec001c5db..000000000000 --- a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift +++ /dev/null @@ -1,28 +0,0 @@ -// -// OuterComposite.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct OuterComposite: Codable { - - public var myNumber: Double? - public var myString: String? - public var myBoolean: Bool? - - public init(myNumber: Double?, myString: String?, myBoolean: Bool?) { - self.myNumber = myNumber - self.myString = myString - self.myBoolean = myBoolean - } - - public enum CodingKeys: String, CodingKey { - case myNumber = "my_number" - case myString = "my_string" - case myBoolean = "my_boolean" - } - -} diff --git a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift deleted file mode 100644 index 9f80fc95ecf0..000000000000 --- a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift +++ /dev/null @@ -1,14 +0,0 @@ -// -// OuterEnum.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public enum OuterEnum: String, Codable { - case placed = "placed" - case approved = "approved" - case delivered = "delivered" -} diff --git a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift deleted file mode 100644 index af60a550bb19..000000000000 --- a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift +++ /dev/null @@ -1,34 +0,0 @@ -// -// Pet.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct Pet: Codable { - - public enum Status: String, Codable { - case available = "available" - case pending = "pending" - case sold = "sold" - } - public var id: Int64? - public var category: Category? - public var name: String - public var photoUrls: [String] - public var tags: [Tag]? - /** pet status in the store */ - public var status: Status? - - public init(id: Int64?, category: Category?, name: String, photoUrls: [String], tags: [Tag]?, status: Status?) { - self.id = id - self.category = category - self.name = name - self.photoUrls = photoUrls - self.tags = tags - self.status = status - } - -} diff --git a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift deleted file mode 100644 index 0acd21fd1000..000000000000 --- a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift +++ /dev/null @@ -1,20 +0,0 @@ -// -// ReadOnlyFirst.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct ReadOnlyFirst: Codable { - - public var bar: String? - public var baz: String? - - public init(bar: String?, baz: String?) { - self.bar = bar - self.baz = baz - } - -} diff --git a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Return.swift b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Return.swift deleted file mode 100644 index b34ddc68142d..000000000000 --- a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Return.swift +++ /dev/null @@ -1,23 +0,0 @@ -// -// Return.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -/** Model for testing reserved words */ -public struct Return: Codable { - - public var _return: Int? - - public init(_return: Int?) { - self._return = _return - } - - public enum CodingKeys: String, CodingKey { - case _return = "return" - } - -} diff --git a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift deleted file mode 100644 index e79fc45c0e91..000000000000 --- a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift +++ /dev/null @@ -1,22 +0,0 @@ -// -// SpecialModelName.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct SpecialModelName: Codable { - - public var specialPropertyName: Int64? - - public init(specialPropertyName: Int64?) { - self.specialPropertyName = specialPropertyName - } - - public enum CodingKeys: String, CodingKey { - case specialPropertyName = "$special[property.name]" - } - -} diff --git a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift deleted file mode 100644 index 3f1237fee477..000000000000 --- a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift +++ /dev/null @@ -1,45 +0,0 @@ -// -// StringBooleanMap.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct StringBooleanMap: Codable { - - public var additionalProperties: [String: Bool] = [:] - - public subscript(key: String) -> Bool? { - get { - if let value = additionalProperties[key] { - return value - } - return nil - } - - set { - additionalProperties[key] = newValue - } - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - try container.encodeMap(additionalProperties) - } - - // Decodable protocol methods - - public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - var nonAdditionalPropertyKeys = Set() - additionalProperties = try container.decodeMap(Bool.self, excludedKeys: nonAdditionalPropertyKeys) - } - -} diff --git a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift deleted file mode 100644 index 4dd8a9a9f5a0..000000000000 --- a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift +++ /dev/null @@ -1,20 +0,0 @@ -// -// Tag.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct Tag: Codable { - - public var id: Int64? - public var name: String? - - public init(id: Int64?, name: String?) { - self.id = id - self.name = name - } - -} diff --git a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift deleted file mode 100644 index bf0006e1a266..000000000000 --- a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift +++ /dev/null @@ -1,34 +0,0 @@ -// -// TypeHolderDefault.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct TypeHolderDefault: Codable { - - public var stringItem: String = "what" - public var numberItem: Double - public var integerItem: Int - public var boolItem: Bool = true - public var arrayItem: [Int] - - public init(stringItem: String, numberItem: Double, integerItem: Int, boolItem: Bool, arrayItem: [Int]) { - self.stringItem = stringItem - self.numberItem = numberItem - self.integerItem = integerItem - self.boolItem = boolItem - self.arrayItem = arrayItem - } - - public enum CodingKeys: String, CodingKey { - case stringItem = "string_item" - case numberItem = "number_item" - case integerItem = "integer_item" - case boolItem = "bool_item" - case arrayItem = "array_item" - } - -} diff --git a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift deleted file mode 100644 index 602a2a6d185a..000000000000 --- a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift +++ /dev/null @@ -1,34 +0,0 @@ -// -// TypeHolderExample.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct TypeHolderExample: Codable { - - public var stringItem: String - public var numberItem: Double - public var integerItem: Int - public var boolItem: Bool - public var arrayItem: [Int] - - public init(stringItem: String, numberItem: Double, integerItem: Int, boolItem: Bool, arrayItem: [Int]) { - self.stringItem = stringItem - self.numberItem = numberItem - self.integerItem = integerItem - self.boolItem = boolItem - self.arrayItem = arrayItem - } - - public enum CodingKeys: String, CodingKey { - case stringItem = "string_item" - case numberItem = "number_item" - case integerItem = "integer_item" - case boolItem = "bool_item" - case arrayItem = "array_item" - } - -} diff --git a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/User.swift b/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/User.swift deleted file mode 100644 index 79f271ed7356..000000000000 --- a/samples/client/petstore/swift4/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/User.swift +++ /dev/null @@ -1,33 +0,0 @@ -// -// User.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct User: Codable { - - public var id: Int64? - public var username: String? - public var firstName: String? - public var lastName: String? - public var email: String? - public var password: String? - public var phone: String? - /** User Status */ - public var userStatus: Int? - - public init(id: Int64?, username: String?, firstName: String?, lastName: String?, email: String?, password: String?, phone: String?, userStatus: Int?) { - self.id = id - self.username = username - self.firstName = firstName - self.lastName = lastName - self.email = email - self.password = password - self.phone = phone - self.userStatus = userStatus - } - -} diff --git a/samples/client/petstore/swift4/rxswiftLibrary/README.md b/samples/client/petstore/swift4/rxswiftLibrary/README.md deleted file mode 100644 index bd093317bd7a..000000000000 --- a/samples/client/petstore/swift4/rxswiftLibrary/README.md +++ /dev/null @@ -1,141 +0,0 @@ -# Swift4 API client for PetstoreClient - -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 API client 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 an API client. - -- API version: 1.0.0 -- Package version: -- Build package: org.openapitools.codegen.languages.Swift4Codegen - -## Installation - -### Carthage - -Run `carthage update` - -### CocoaPods - -Run `pod install` - -## Documentation for API Endpoints - -All URIs are relative to *http://petstore.swagger.io:80/v2* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*AnotherFakeAPI* | [**call123testSpecialTags**](docs/AnotherFakeAPI.md#call123testspecialtags) | **PATCH** /another-fake/dummy | To test special tags -*FakeAPI* | [**fakeOuterBooleanSerialize**](docs/FakeAPI.md#fakeouterbooleanserialize) | **POST** /fake/outer/boolean | -*FakeAPI* | [**fakeOuterCompositeSerialize**](docs/FakeAPI.md#fakeoutercompositeserialize) | **POST** /fake/outer/composite | -*FakeAPI* | [**fakeOuterNumberSerialize**](docs/FakeAPI.md#fakeouternumberserialize) | **POST** /fake/outer/number | -*FakeAPI* | [**fakeOuterStringSerialize**](docs/FakeAPI.md#fakeouterstringserialize) | **POST** /fake/outer/string | -*FakeAPI* | [**testBodyWithFileSchema**](docs/FakeAPI.md#testbodywithfileschema) | **PUT** /fake/body-with-file-schema | -*FakeAPI* | [**testBodyWithQueryParams**](docs/FakeAPI.md#testbodywithqueryparams) | **PUT** /fake/body-with-query-params | -*FakeAPI* | [**testClientModel**](docs/FakeAPI.md#testclientmodel) | **PATCH** /fake | To test \"client\" model -*FakeAPI* | [**testEndpointParameters**](docs/FakeAPI.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 -*FakeAPI* | [**testEnumParameters**](docs/FakeAPI.md#testenumparameters) | **GET** /fake | To test enum parameters -*FakeAPI* | [**testGroupParameters**](docs/FakeAPI.md#testgroupparameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) -*FakeAPI* | [**testInlineAdditionalProperties**](docs/FakeAPI.md#testinlineadditionalproperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties -*FakeAPI* | [**testJsonFormData**](docs/FakeAPI.md#testjsonformdata) | **GET** /fake/jsonFormData | test json serialization of form data -*FakeClassnameTags123API* | [**testClassname**](docs/FakeClassnameTags123API.md#testclassname) | **PATCH** /fake_classname_test | To test class name in snake case -*PetAPI* | [**addPet**](docs/PetAPI.md#addpet) | **POST** /pet | Add a new pet to the store -*PetAPI* | [**deletePet**](docs/PetAPI.md#deletepet) | **DELETE** /pet/{petId} | Deletes a pet -*PetAPI* | [**findPetsByStatus**](docs/PetAPI.md#findpetsbystatus) | **GET** /pet/findByStatus | Finds Pets by status -*PetAPI* | [**findPetsByTags**](docs/PetAPI.md#findpetsbytags) | **GET** /pet/findByTags | Finds Pets by tags -*PetAPI* | [**getPetById**](docs/PetAPI.md#getpetbyid) | **GET** /pet/{petId} | Find pet by ID -*PetAPI* | [**updatePet**](docs/PetAPI.md#updatepet) | **PUT** /pet | Update an existing pet -*PetAPI* | [**updatePetWithForm**](docs/PetAPI.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data -*PetAPI* | [**uploadFile**](docs/PetAPI.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image -*PetAPI* | [**uploadFileWithRequiredFile**](docs/PetAPI.md#uploadfilewithrequiredfile) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required) -*StoreAPI* | [**deleteOrder**](docs/StoreAPI.md#deleteorder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID -*StoreAPI* | [**getInventory**](docs/StoreAPI.md#getinventory) | **GET** /store/inventory | Returns pet inventories by status -*StoreAPI* | [**getOrderById**](docs/StoreAPI.md#getorderbyid) | **GET** /store/order/{order_id} | Find purchase order by ID -*StoreAPI* | [**placeOrder**](docs/StoreAPI.md#placeorder) | **POST** /store/order | Place an order for a pet -*UserAPI* | [**createUser**](docs/UserAPI.md#createuser) | **POST** /user | Create user -*UserAPI* | [**createUsersWithArrayInput**](docs/UserAPI.md#createuserswitharrayinput) | **POST** /user/createWithArray | Creates list of users with given input array -*UserAPI* | [**createUsersWithListInput**](docs/UserAPI.md#createuserswithlistinput) | **POST** /user/createWithList | Creates list of users with given input array -*UserAPI* | [**deleteUser**](docs/UserAPI.md#deleteuser) | **DELETE** /user/{username} | Delete user -*UserAPI* | [**getUserByName**](docs/UserAPI.md#getuserbyname) | **GET** /user/{username} | Get user by user name -*UserAPI* | [**loginUser**](docs/UserAPI.md#loginuser) | **GET** /user/login | Logs user into the system -*UserAPI* | [**logoutUser**](docs/UserAPI.md#logoutuser) | **GET** /user/logout | Logs out current logged in user session -*UserAPI* | [**updateUser**](docs/UserAPI.md#updateuser) | **PUT** /user/{username} | Updated user - - -## Documentation For Models - - - [AdditionalPropertiesClass](docs/AdditionalPropertiesClass.md) - - [Animal](docs/Animal.md) - - [AnimalFarm](docs/AnimalFarm.md) - - [ApiResponse](docs/ApiResponse.md) - - [ArrayOfArrayOfNumberOnly](docs/ArrayOfArrayOfNumberOnly.md) - - [ArrayOfNumberOnly](docs/ArrayOfNumberOnly.md) - - [ArrayTest](docs/ArrayTest.md) - - [Capitalization](docs/Capitalization.md) - - [Cat](docs/Cat.md) - - [CatAllOf](docs/CatAllOf.md) - - [Category](docs/Category.md) - - [ClassModel](docs/ClassModel.md) - - [Client](docs/Client.md) - - [Dog](docs/Dog.md) - - [DogAllOf](docs/DogAllOf.md) - - [EnumArrays](docs/EnumArrays.md) - - [EnumClass](docs/EnumClass.md) - - [EnumTest](docs/EnumTest.md) - - [File](docs/File.md) - - [FileSchemaTestClass](docs/FileSchemaTestClass.md) - - [FormatTest](docs/FormatTest.md) - - [HasOnlyReadOnly](docs/HasOnlyReadOnly.md) - - [List](docs/List.md) - - [MapTest](docs/MapTest.md) - - [MixedPropertiesAndAdditionalPropertiesClass](docs/MixedPropertiesAndAdditionalPropertiesClass.md) - - [Model200Response](docs/Model200Response.md) - - [Name](docs/Name.md) - - [NumberOnly](docs/NumberOnly.md) - - [Order](docs/Order.md) - - [OuterComposite](docs/OuterComposite.md) - - [OuterEnum](docs/OuterEnum.md) - - [Pet](docs/Pet.md) - - [ReadOnlyFirst](docs/ReadOnlyFirst.md) - - [Return](docs/Return.md) - - [SpecialModelName](docs/SpecialModelName.md) - - [StringBooleanMap](docs/StringBooleanMap.md) - - [Tag](docs/Tag.md) - - [TypeHolderDefault](docs/TypeHolderDefault.md) - - [TypeHolderExample](docs/TypeHolderExample.md) - - [User](docs/User.md) - - -## Documentation For Authorization - - -## api_key - -- **Type**: API key -- **API key parameter name**: api_key -- **Location**: HTTP header - -## api_key_query - -- **Type**: API key -- **API key parameter name**: api_key_query -- **Location**: URL query string - -## http_basic_test - -- **Type**: HTTP basic authentication - -## petstore_auth - -- **Type**: OAuth -- **Flow**: implicit -- **Authorization URL**: http://petstore.swagger.io/api/oauth/dialog -- **Scopes**: - - **write:pets**: modify pets in your account - - **read:pets**: read your pets - - -## Author - - - diff --git a/samples/client/petstore/swift4/rxswiftLibrary/SwaggerClientTests/.gitignore b/samples/client/petstore/swift4/rxswiftLibrary/SwaggerClientTests/.gitignore deleted file mode 100644 index 0269c2f56db9..000000000000 --- a/samples/client/petstore/swift4/rxswiftLibrary/SwaggerClientTests/.gitignore +++ /dev/null @@ -1,72 +0,0 @@ -### https://raw.github.com/github/gitignore/7792e50daeaa6c07460484704671d1dc9f0045a7/Swift.gitignore - -# Xcode -# -# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore - -## Build generated -build/ -DerivedData/ - -## Various settings -*.pbxuser -!default.pbxuser -*.mode1v3 -!default.mode1v3 -*.mode2v3 -!default.mode2v3 -*.perspectivev3 -!default.perspectivev3 -xcuserdata/ - -## Other -*.moved-aside -*.xccheckout -*.xcscmblueprint - -## Obj-C/Swift specific -*.hmap -*.ipa -*.dSYM.zip -*.dSYM - -## Playgrounds -timeline.xctimeline -playground.xcworkspace - -# Swift Package Manager -# -# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. -# Packages/ -# Package.pins -# Package.resolved -.build/ - -# CocoaPods -# -# We recommend against adding the Pods directory to your .gitignore. However -# you should judge for yourself, the pros and cons are mentioned at: -# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control -# -Pods/ - -# Carthage -# -# Add this line if you want to avoid checking in source code from Carthage dependencies. -Carthage/Checkouts - -Carthage/Build - -# fastlane -# -# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the -# screenshots whenever they are needed. -# For more information about the recommended setup visit: -# https://docs.fastlane.tools/best-practices/source-control/#source-control - -fastlane/report.xml -fastlane/Preview.html -fastlane/screenshots -fastlane/test_output - - diff --git a/samples/client/petstore/swift4/rxswiftLibrary/SwaggerClientTests/Podfile b/samples/client/petstore/swift4/rxswiftLibrary/SwaggerClientTests/Podfile deleted file mode 100644 index 77432f9eee92..000000000000 --- a/samples/client/petstore/swift4/rxswiftLibrary/SwaggerClientTests/Podfile +++ /dev/null @@ -1,13 +0,0 @@ -platform :ios, '9.0' - -source 'https://cdn.cocoapods.org/' - -use_frameworks! - -target 'SwaggerClient' do - pod "PetstoreClient", :path => "../" - - target 'SwaggerClientTests' do - inherit! :search_paths - end -end diff --git a/samples/client/petstore/swift4/rxswiftLibrary/SwaggerClientTests/Podfile.lock b/samples/client/petstore/swift4/rxswiftLibrary/SwaggerClientTests/Podfile.lock deleted file mode 100644 index 24d2716656cd..000000000000 --- a/samples/client/petstore/swift4/rxswiftLibrary/SwaggerClientTests/Podfile.lock +++ /dev/null @@ -1,27 +0,0 @@ -PODS: - - Alamofire (4.9.0) - - PetstoreClient (1.0.0): - - Alamofire (~> 4.9.0) - - RxSwift (~> 4.5.0) - - RxSwift (4.5.0) - -DEPENDENCIES: - - PetstoreClient (from `../`) - -SPEC REPOS: - trunk: - - Alamofire - - RxSwift - -EXTERNAL SOURCES: - PetstoreClient: - :path: "../" - -SPEC CHECKSUMS: - Alamofire: afc3e7c6db61476cb45cdd23fed06bad03bbc321 - PetstoreClient: c8065402040b3f3604ff959e729637f863227d27 - RxSwift: f172070dfd1a93d70a9ab97a5a01166206e1c575 - -PODFILE CHECKSUM: 509bec696cc1d8641751b52e4fe4bef04ac4542c - -COCOAPODS: 1.8.4 diff --git a/samples/client/petstore/swift4/rxswiftLibrary/SwaggerClientTests/SwaggerClient.xcodeproj/project.pbxproj b/samples/client/petstore/swift4/rxswiftLibrary/SwaggerClientTests/SwaggerClient.xcodeproj/project.pbxproj deleted file mode 100644 index 14d07786a915..000000000000 --- a/samples/client/petstore/swift4/rxswiftLibrary/SwaggerClientTests/SwaggerClient.xcodeproj/project.pbxproj +++ /dev/null @@ -1,543 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - B024164FBFF71BF644D4419A /* Pods_SwaggerClient.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 177A58DD5CF63F2989335DCC /* Pods_SwaggerClient.framework */; }; - B1D0246C8960F47A60098F37 /* Pods_SwaggerClientTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6F96A0131101344CC5406CB3 /* Pods_SwaggerClientTests.framework */; }; - B596E4BD205657A500B46F03 /* APIHelperTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = B596E4BC205657A500B46F03 /* APIHelperTests.swift */; }; - EAEC0BC21D4E30CE00C908A3 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = EAEC0BC11D4E30CE00C908A3 /* AppDelegate.swift */; }; - EAEC0BC41D4E30CE00C908A3 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = EAEC0BC31D4E30CE00C908A3 /* ViewController.swift */; }; - EAEC0BC71D4E30CE00C908A3 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = EAEC0BC51D4E30CE00C908A3 /* Main.storyboard */; }; - EAEC0BC91D4E30CE00C908A3 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = EAEC0BC81D4E30CE00C908A3 /* Assets.xcassets */; }; - EAEC0BCC1D4E30CE00C908A3 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = EAEC0BCA1D4E30CE00C908A3 /* LaunchScreen.storyboard */; }; - EAEC0BE41D4E330700C908A3 /* PetAPITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = EAEC0BE31D4E330700C908A3 /* PetAPITests.swift */; }; - EAEC0BE61D4E379000C908A3 /* StoreAPITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = EAEC0BE51D4E379000C908A3 /* StoreAPITests.swift */; }; - EAEC0BE81D4E38CB00C908A3 /* UserAPITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = EAEC0BE71D4E38CB00C908A3 /* UserAPITests.swift */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - EAEC0BD31D4E30CE00C908A3 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = EAEC0BB61D4E30CE00C908A3 /* Project object */; - proxyType = 1; - remoteGlobalIDString = EAEC0BBD1D4E30CE00C908A3; - remoteInfo = SwaggerClient; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXFileReference section */ - 177A58DD5CF63F2989335DCC /* Pods_SwaggerClient.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_SwaggerClient.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 2DEFA8828BD4E38FA5262F53 /* Pods-SwaggerClient.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwaggerClient.release.xcconfig"; path = "Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient.release.xcconfig"; sourceTree = ""; }; - 4EF2021609D112A6F5AE0F55 /* Pods-SwaggerClientTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwaggerClientTests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests.debug.xcconfig"; sourceTree = ""; }; - 6F96A0131101344CC5406CB3 /* Pods_SwaggerClientTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_SwaggerClientTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 8D99518E8E05FD856A952698 /* Pods-SwaggerClient.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwaggerClient.debug.xcconfig"; path = "Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient.debug.xcconfig"; sourceTree = ""; }; - B596E4BC205657A500B46F03 /* APIHelperTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = APIHelperTests.swift; sourceTree = ""; }; - EAEC0BBE1D4E30CE00C908A3 /* SwaggerClient.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SwaggerClient.app; sourceTree = BUILT_PRODUCTS_DIR; }; - EAEC0BC11D4E30CE00C908A3 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; - EAEC0BC31D4E30CE00C908A3 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; - EAEC0BC61D4E30CE00C908A3 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; - EAEC0BC81D4E30CE00C908A3 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; - EAEC0BCB1D4E30CE00C908A3 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; - EAEC0BCD1D4E30CE00C908A3 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - EAEC0BD21D4E30CE00C908A3 /* SwaggerClientTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = SwaggerClientTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - EAEC0BD81D4E30CE00C908A3 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - EAEC0BE31D4E330700C908A3 /* PetAPITests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PetAPITests.swift; sourceTree = ""; }; - EAEC0BE51D4E379000C908A3 /* StoreAPITests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StoreAPITests.swift; sourceTree = ""; }; - EAEC0BE71D4E38CB00C908A3 /* UserAPITests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UserAPITests.swift; sourceTree = ""; }; - EFD8AB05F53C74985527D117 /* Pods-SwaggerClientTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwaggerClientTests.release.xcconfig"; path = "Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests.release.xcconfig"; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - EAEC0BBB1D4E30CE00C908A3 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - B024164FBFF71BF644D4419A /* Pods_SwaggerClient.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - EAEC0BCF1D4E30CE00C908A3 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - B1D0246C8960F47A60098F37 /* Pods_SwaggerClientTests.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 55DC454FF5FFEF8A9CBC1CA3 /* Frameworks */ = { - isa = PBXGroup; - children = ( - 177A58DD5CF63F2989335DCC /* Pods_SwaggerClient.framework */, - 6F96A0131101344CC5406CB3 /* Pods_SwaggerClientTests.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; - CB19142D951AB5DD885404A8 /* Pods */ = { - isa = PBXGroup; - children = ( - 8D99518E8E05FD856A952698 /* Pods-SwaggerClient.debug.xcconfig */, - 2DEFA8828BD4E38FA5262F53 /* Pods-SwaggerClient.release.xcconfig */, - 4EF2021609D112A6F5AE0F55 /* Pods-SwaggerClientTests.debug.xcconfig */, - EFD8AB05F53C74985527D117 /* Pods-SwaggerClientTests.release.xcconfig */, - ); - name = Pods; - sourceTree = ""; - }; - EAEC0BB51D4E30CE00C908A3 = { - isa = PBXGroup; - children = ( - EAEC0BC01D4E30CE00C908A3 /* SwaggerClient */, - EAEC0BD51D4E30CE00C908A3 /* SwaggerClientTests */, - EAEC0BBF1D4E30CE00C908A3 /* Products */, - CB19142D951AB5DD885404A8 /* Pods */, - 55DC454FF5FFEF8A9CBC1CA3 /* Frameworks */, - ); - sourceTree = ""; - }; - EAEC0BBF1D4E30CE00C908A3 /* Products */ = { - isa = PBXGroup; - children = ( - EAEC0BBE1D4E30CE00C908A3 /* SwaggerClient.app */, - EAEC0BD21D4E30CE00C908A3 /* SwaggerClientTests.xctest */, - ); - name = Products; - sourceTree = ""; - }; - EAEC0BC01D4E30CE00C908A3 /* SwaggerClient */ = { - isa = PBXGroup; - children = ( - EAEC0BC11D4E30CE00C908A3 /* AppDelegate.swift */, - EAEC0BC31D4E30CE00C908A3 /* ViewController.swift */, - EAEC0BC51D4E30CE00C908A3 /* Main.storyboard */, - EAEC0BC81D4E30CE00C908A3 /* Assets.xcassets */, - EAEC0BCA1D4E30CE00C908A3 /* LaunchScreen.storyboard */, - EAEC0BCD1D4E30CE00C908A3 /* Info.plist */, - ); - path = SwaggerClient; - sourceTree = ""; - }; - EAEC0BD51D4E30CE00C908A3 /* SwaggerClientTests */ = { - isa = PBXGroup; - children = ( - EAEC0BD81D4E30CE00C908A3 /* Info.plist */, - EAEC0BE31D4E330700C908A3 /* PetAPITests.swift */, - EAEC0BE51D4E379000C908A3 /* StoreAPITests.swift */, - EAEC0BE71D4E38CB00C908A3 /* UserAPITests.swift */, - B596E4BC205657A500B46F03 /* APIHelperTests.swift */, - ); - path = SwaggerClientTests; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - EAEC0BBD1D4E30CE00C908A3 /* SwaggerClient */ = { - isa = PBXNativeTarget; - buildConfigurationList = EAEC0BDB1D4E30CE00C908A3 /* Build configuration list for PBXNativeTarget "SwaggerClient" */; - buildPhases = ( - 898E536ECC2C4811DDDF67C1 /* [CP] Check Pods Manifest.lock */, - EAEC0BBA1D4E30CE00C908A3 /* Sources */, - EAEC0BBB1D4E30CE00C908A3 /* Frameworks */, - EAEC0BBC1D4E30CE00C908A3 /* Resources */, - 8A7961360961F06AADAF17C9 /* [CP] Embed Pods Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = SwaggerClient; - productName = SwaggerClient; - productReference = EAEC0BBE1D4E30CE00C908A3 /* SwaggerClient.app */; - productType = "com.apple.product-type.application"; - }; - EAEC0BD11D4E30CE00C908A3 /* SwaggerClientTests */ = { - isa = PBXNativeTarget; - buildConfigurationList = EAEC0BDE1D4E30CE00C908A3 /* Build configuration list for PBXNativeTarget "SwaggerClientTests" */; - buildPhases = ( - 82CB35D52E274C6177DAC0DD /* [CP] Check Pods Manifest.lock */, - EAEC0BCE1D4E30CE00C908A3 /* Sources */, - EAEC0BCF1D4E30CE00C908A3 /* Frameworks */, - EAEC0BD01D4E30CE00C908A3 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - EAEC0BD41D4E30CE00C908A3 /* PBXTargetDependency */, - ); - name = SwaggerClientTests; - productName = SwaggerClientTests; - productReference = EAEC0BD21D4E30CE00C908A3 /* SwaggerClientTests.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - EAEC0BB61D4E30CE00C908A3 /* Project object */ = { - isa = PBXProject; - attributes = { - LastSwiftUpdateCheck = 0730; - LastUpgradeCheck = 0910; - ORGANIZATIONNAME = Swagger; - TargetAttributes = { - EAEC0BBD1D4E30CE00C908A3 = { - CreatedOnToolsVersion = 7.3.1; - LastSwiftMigration = 0800; - }; - EAEC0BD11D4E30CE00C908A3 = { - CreatedOnToolsVersion = 7.3.1; - LastSwiftMigration = 0800; - TestTargetID = EAEC0BBD1D4E30CE00C908A3; - }; - }; - }; - buildConfigurationList = EAEC0BB91D4E30CE00C908A3 /* Build configuration list for PBXProject "SwaggerClient" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = EAEC0BB51D4E30CE00C908A3; - productRefGroup = EAEC0BBF1D4E30CE00C908A3 /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - EAEC0BBD1D4E30CE00C908A3 /* SwaggerClient */, - EAEC0BD11D4E30CE00C908A3 /* SwaggerClientTests */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - EAEC0BBC1D4E30CE00C908A3 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - EAEC0BCC1D4E30CE00C908A3 /* LaunchScreen.storyboard in Resources */, - EAEC0BC91D4E30CE00C908A3 /* Assets.xcassets in Resources */, - EAEC0BC71D4E30CE00C908A3 /* Main.storyboard in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - EAEC0BD01D4E30CE00C908A3 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXShellScriptBuildPhase section */ - 82CB35D52E274C6177DAC0DD /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-SwaggerClientTests-checkManifestLockResult.txt", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; - }; - 898E536ECC2C4811DDDF67C1 /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-SwaggerClient-checkManifestLockResult.txt", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; - }; - 8A7961360961F06AADAF17C9 /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-frameworks.sh", - "${BUILT_PRODUCTS_DIR}/Alamofire/Alamofire.framework", - "${BUILT_PRODUCTS_DIR}/PetstoreClient/PetstoreClient.framework", - "${BUILT_PRODUCTS_DIR}/RxSwift/RxSwift.framework", - ); - name = "[CP] Embed Pods Frameworks"; - outputPaths = ( - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Alamofire.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/PetstoreClient.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RxSwift.framework", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - EAEC0BBA1D4E30CE00C908A3 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - EAEC0BC41D4E30CE00C908A3 /* ViewController.swift in Sources */, - EAEC0BC21D4E30CE00C908A3 /* AppDelegate.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - EAEC0BCE1D4E30CE00C908A3 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - B596E4BD205657A500B46F03 /* APIHelperTests.swift in Sources */, - EAEC0BE81D4E38CB00C908A3 /* UserAPITests.swift in Sources */, - EAEC0BE61D4E379000C908A3 /* StoreAPITests.swift in Sources */, - EAEC0BE41D4E330700C908A3 /* PetAPITests.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - EAEC0BD41D4E30CE00C908A3 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = EAEC0BBD1D4E30CE00C908A3 /* SwaggerClient */; - targetProxy = EAEC0BD31D4E30CE00C908A3 /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin PBXVariantGroup section */ - EAEC0BC51D4E30CE00C908A3 /* Main.storyboard */ = { - isa = PBXVariantGroup; - children = ( - EAEC0BC61D4E30CE00C908A3 /* Base */, - ); - name = Main.storyboard; - sourceTree = ""; - }; - EAEC0BCA1D4E30CE00C908A3 /* LaunchScreen.storyboard */ = { - isa = PBXVariantGroup; - children = ( - EAEC0BCB1D4E30CE00C908A3 /* Base */, - ); - name = LaunchScreen.storyboard; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - -/* Begin XCBuildConfiguration section */ - EAEC0BD91D4E30CE00C908A3 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.3; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = iphoneos; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 4.2; - }; - name = Debug; - }; - EAEC0BDA1D4E30CE00C908A3 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.3; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_VERSION = 4.2; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - EAEC0BDC1D4E30CE00C908A3 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 8D99518E8E05FD856A952698 /* Pods-SwaggerClient.debug.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - INFOPLIST_FILE = SwaggerClient/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = com.swagger.SwaggerClient; - PRODUCT_NAME = "$(TARGET_NAME)"; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Debug; - }; - EAEC0BDD1D4E30CE00C908A3 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 2DEFA8828BD4E38FA5262F53 /* Pods-SwaggerClient.release.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - INFOPLIST_FILE = SwaggerClient/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = com.swagger.SwaggerClient; - PRODUCT_NAME = "$(TARGET_NAME)"; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Release; - }; - EAEC0BDF1D4E30CE00C908A3 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 4EF2021609D112A6F5AE0F55 /* Pods-SwaggerClientTests.debug.xcconfig */; - buildSettings = { - BUNDLE_LOADER = "$(TEST_HOST)"; - CLANG_ENABLE_MODULES = YES; - INFOPLIST_FILE = SwaggerClientTests/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = com.swagger.SwaggerClientTests; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/SwaggerClient.app/SwaggerClient"; - }; - name = Debug; - }; - EAEC0BE01D4E30CE00C908A3 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = EFD8AB05F53C74985527D117 /* Pods-SwaggerClientTests.release.xcconfig */; - buildSettings = { - BUNDLE_LOADER = "$(TEST_HOST)"; - CLANG_ENABLE_MODULES = YES; - INFOPLIST_FILE = SwaggerClientTests/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = com.swagger.SwaggerClientTests; - PRODUCT_NAME = "$(TARGET_NAME)"; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/SwaggerClient.app/SwaggerClient"; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - EAEC0BB91D4E30CE00C908A3 /* Build configuration list for PBXProject "SwaggerClient" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - EAEC0BD91D4E30CE00C908A3 /* Debug */, - EAEC0BDA1D4E30CE00C908A3 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - EAEC0BDB1D4E30CE00C908A3 /* Build configuration list for PBXNativeTarget "SwaggerClient" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - EAEC0BDC1D4E30CE00C908A3 /* Debug */, - EAEC0BDD1D4E30CE00C908A3 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - EAEC0BDE1D4E30CE00C908A3 /* Build configuration list for PBXNativeTarget "SwaggerClientTests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - EAEC0BDF1D4E30CE00C908A3 /* Debug */, - EAEC0BE01D4E30CE00C908A3 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = EAEC0BB61D4E30CE00C908A3 /* Project object */; -} diff --git a/samples/client/petstore/swift4/rxswiftLibrary/SwaggerClientTests/SwaggerClient.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/samples/client/petstore/swift4/rxswiftLibrary/SwaggerClientTests/SwaggerClient.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 13bdd8ab8b75..000000000000 --- a/samples/client/petstore/swift4/rxswiftLibrary/SwaggerClientTests/SwaggerClient.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/samples/client/petstore/swift4/rxswiftLibrary/SwaggerClientTests/SwaggerClient.xcodeproj/xcshareddata/xcschemes/SwaggerClient.xcscheme b/samples/client/petstore/swift4/rxswiftLibrary/SwaggerClientTests/SwaggerClient.xcodeproj/xcshareddata/xcschemes/SwaggerClient.xcscheme deleted file mode 100644 index 38026eb0be95..000000000000 --- a/samples/client/petstore/swift4/rxswiftLibrary/SwaggerClientTests/SwaggerClient.xcodeproj/xcshareddata/xcschemes/SwaggerClient.xcscheme +++ /dev/null @@ -1,103 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/samples/client/petstore/swift4/rxswiftLibrary/SwaggerClientTests/SwaggerClient.xcworkspace/contents.xcworkspacedata b/samples/client/petstore/swift4/rxswiftLibrary/SwaggerClientTests/SwaggerClient.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 9b3fa18954f7..000000000000 --- a/samples/client/petstore/swift4/rxswiftLibrary/SwaggerClientTests/SwaggerClient.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - diff --git a/samples/client/petstore/swift4/rxswiftLibrary/SwaggerClientTests/SwaggerClient.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/samples/client/petstore/swift4/rxswiftLibrary/SwaggerClientTests/SwaggerClient.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d981003d68..000000000000 --- a/samples/client/petstore/swift4/rxswiftLibrary/SwaggerClientTests/SwaggerClient.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/samples/client/petstore/swift4/rxswiftLibrary/SwaggerClientTests/SwaggerClient/AppDelegate.swift b/samples/client/petstore/swift4/rxswiftLibrary/SwaggerClientTests/SwaggerClient/AppDelegate.swift deleted file mode 100644 index e8f911b0fa1d..000000000000 --- a/samples/client/petstore/swift4/rxswiftLibrary/SwaggerClientTests/SwaggerClient/AppDelegate.swift +++ /dev/null @@ -1,43 +0,0 @@ -// -// AppDelegate.swift -// SwaggerClient -// -// Created by Tony Wang on 7/31/16. -// Copyright © 2016 Swagger. All rights reserved. -// - -import UIKit - -@UIApplicationMain -class AppDelegate: UIResponder, UIApplicationDelegate { - - var window: UIWindow? - - func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { - // Override point for customization after application launch. - return true - } - - func applicationWillResignActive(_ application: UIApplication) { - // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. - // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. - } - - func applicationDidEnterBackground(_ application: UIApplication) { - // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. - // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. - } - - func applicationWillEnterForeground(_ application: UIApplication) { - // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. - } - - func applicationDidBecomeActive(_ application: UIApplication) { - // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. - } - - func applicationWillTerminate(_ application: UIApplication) { - // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. - } - -} diff --git a/samples/client/petstore/swift4/rxswiftLibrary/SwaggerClientTests/SwaggerClient/Assets.xcassets/AppIcon.appiconset/Contents.json b/samples/client/petstore/swift4/rxswiftLibrary/SwaggerClientTests/SwaggerClient/Assets.xcassets/AppIcon.appiconset/Contents.json deleted file mode 100644 index b8236c653481..000000000000 --- a/samples/client/petstore/swift4/rxswiftLibrary/SwaggerClientTests/SwaggerClient/Assets.xcassets/AppIcon.appiconset/Contents.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "images" : [ - { - "idiom" : "iphone", - "size" : "20x20", - "scale" : "2x" - }, - { - "idiom" : "iphone", - "size" : "20x20", - "scale" : "3x" - }, - { - "idiom" : "iphone", - "size" : "29x29", - "scale" : "2x" - }, - { - "idiom" : "iphone", - "size" : "29x29", - "scale" : "3x" - }, - { - "idiom" : "iphone", - "size" : "40x40", - "scale" : "2x" - }, - { - "idiom" : "iphone", - "size" : "40x40", - "scale" : "3x" - }, - { - "idiom" : "iphone", - "size" : "60x60", - "scale" : "2x" - }, - { - "idiom" : "iphone", - "size" : "60x60", - "scale" : "3x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/samples/client/petstore/swift4/rxswiftLibrary/SwaggerClientTests/SwaggerClient/Base.lproj/LaunchScreen.storyboard b/samples/client/petstore/swift4/rxswiftLibrary/SwaggerClientTests/SwaggerClient/Base.lproj/LaunchScreen.storyboard deleted file mode 100644 index 2e721e1833f0..000000000000 --- a/samples/client/petstore/swift4/rxswiftLibrary/SwaggerClientTests/SwaggerClient/Base.lproj/LaunchScreen.storyboard +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/samples/client/petstore/swift4/rxswiftLibrary/SwaggerClientTests/SwaggerClient/Base.lproj/Main.storyboard b/samples/client/petstore/swift4/rxswiftLibrary/SwaggerClientTests/SwaggerClient/Base.lproj/Main.storyboard deleted file mode 100644 index 3a2a49bad8c6..000000000000 --- a/samples/client/petstore/swift4/rxswiftLibrary/SwaggerClientTests/SwaggerClient/Base.lproj/Main.storyboard +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/samples/client/petstore/swift4/rxswiftLibrary/SwaggerClientTests/SwaggerClient/Info.plist b/samples/client/petstore/swift4/rxswiftLibrary/SwaggerClientTests/SwaggerClient/Info.plist deleted file mode 100644 index 3d8b6fc4a709..000000000000 --- a/samples/client/petstore/swift4/rxswiftLibrary/SwaggerClientTests/SwaggerClient/Info.plist +++ /dev/null @@ -1,58 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - APPL - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1 - LSRequiresIPhoneOS - - UILaunchStoryboardName - LaunchScreen - UIMainStoryboardFile - Main - UIRequiredDeviceCapabilities - - armv7 - - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UISupportedInterfaceOrientations~ipad - - UIInterfaceOrientationPortrait - UIInterfaceOrientationPortraitUpsideDown - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - NSAppTransportSecurity - - NSExceptionDomains - - petstore.swagger.io - - NSTemporaryExceptionAllowsInsecureHTTPLoads - - - - - - diff --git a/samples/client/petstore/swift4/rxswiftLibrary/SwaggerClientTests/SwaggerClient/ViewController.swift b/samples/client/petstore/swift4/rxswiftLibrary/SwaggerClientTests/SwaggerClient/ViewController.swift deleted file mode 100644 index 3a45ba8fc534..000000000000 --- a/samples/client/petstore/swift4/rxswiftLibrary/SwaggerClientTests/SwaggerClient/ViewController.swift +++ /dev/null @@ -1,23 +0,0 @@ -// -// ViewController.swift -// SwaggerClient -// -// Created by Tony Wang on 7/31/16. -// Copyright © 2016 Swagger. All rights reserved. -// - -import UIKit - -class ViewController: UIViewController { - - override func viewDidLoad() { - super.viewDidLoad() - // Do any additional setup after loading the view, typically from a nib. - } - - override func didReceiveMemoryWarning() { - super.didReceiveMemoryWarning() - // Dispose of any resources that can be recreated. - } - -} diff --git a/samples/client/petstore/swift4/rxswiftLibrary/SwaggerClientTests/SwaggerClientTests/APIHelperTests.swift b/samples/client/petstore/swift4/rxswiftLibrary/SwaggerClientTests/SwaggerClientTests/APIHelperTests.swift deleted file mode 100644 index 4f51881a6663..000000000000 --- a/samples/client/petstore/swift4/rxswiftLibrary/SwaggerClientTests/SwaggerClientTests/APIHelperTests.swift +++ /dev/null @@ -1,55 +0,0 @@ -// -// APIHelperTests.swift -// SwaggerClientTests -// -// Created by Daiki Matsudate on 2018/03/12. -// Copyright © 2018 Swagger. All rights reserved. -// - -import XCTest -import PetstoreClient -@testable import SwaggerClient - -class APIHelperTests: XCTestCase { - - override func setUp() { - super.setUp() - // Put setup code here. This method is called before the invocation of each test method in the class. - } - - override func tearDown() { - // Put teardown code here. This method is called after the invocation of each test method in the class. - super.tearDown() - } - - func testRejectNil() { - let source: [String: Any?] = ["a": 1, "b": nil, "c": ["1", nil, "2"], "d": true, "e": false] - let expected: [String: Any] = ["a": 1, "c": ["1", nil, "2"], "d": true, "e": false] - let actual: [String: Any] = APIHelper.rejectNil(source)! - XCTAssert(NSDictionary(dictionary: actual).isEqual(to: expected)) - } - - func testRejectNilHeaders() { - let source: [String: Any?] = ["a": 1, "b": nil, "c": ["1", nil, "2"], "d": true, "e": false] - let expected: [String: String] = ["a": "1", "c": "1,2", "d": "true", "e": "false"] - let actual: [String: String] = APIHelper.rejectNilHeaders(source) - XCTAssert(NSDictionary(dictionary: actual).isEqual(to: expected)) - } - - func testConvertBoolToString() { - let source: [String: Any] = ["a": 1, "c": ["1", nil, "2"], "d": true, "e": false] - let expected: [String: Any] = ["a": 1, "c": ["1", nil, "2"], "d": "true", "e": "false"] - let actual: [String: Any] = APIHelper.convertBoolToString(source)! - XCTAssert(NSDictionary(dictionary: actual).isEqual(to: expected)) - } - - func testMapValuesToQueryItems() { - let source: [String: Any] = ["a": 1, "c": ["1", nil, "2"], "d": true, "e": false] - let expected: [URLQueryItem] = [URLQueryItem(name: "a", value: "1"), - URLQueryItem(name: "c", value: "1,2"), - URLQueryItem(name: "d", value: "true"), - URLQueryItem(name: "e", value: "false")].sorted(by: { $0.name > $1.name }) - let actual: [URLQueryItem] = APIHelper.mapValuesToQueryItems(source)!.sorted(by: { $0.name > $1.name }) - XCTAssert(actual == expected) - } -} diff --git a/samples/client/petstore/swift4/rxswiftLibrary/SwaggerClientTests/SwaggerClientTests/Info.plist b/samples/client/petstore/swift4/rxswiftLibrary/SwaggerClientTests/SwaggerClientTests/Info.plist deleted file mode 100644 index 619bf44ed70e..000000000000 --- a/samples/client/petstore/swift4/rxswiftLibrary/SwaggerClientTests/SwaggerClientTests/Info.plist +++ /dev/null @@ -1,35 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - BNDL - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1 - NSAppTransportSecurity - - NSExceptionDomains - - petstore.swagger.io - - NSTemporaryExceptionAllowsInsecureHTTPLoads - - - - - - diff --git a/samples/client/petstore/swift4/rxswiftLibrary/SwaggerClientTests/SwaggerClientTests/PetAPITests.swift b/samples/client/petstore/swift4/rxswiftLibrary/SwaggerClientTests/SwaggerClientTests/PetAPITests.swift deleted file mode 100644 index 5b759947421d..000000000000 --- a/samples/client/petstore/swift4/rxswiftLibrary/SwaggerClientTests/SwaggerClientTests/PetAPITests.swift +++ /dev/null @@ -1,88 +0,0 @@ -// -// PetAPITests.swift -// SwaggerClient -// -// Created by Tony Wang on 7/31/16. -// Copyright © 2016 Swagger. All rights reserved. -// - -import PetstoreClient -import RxSwift -import XCTest -@testable import SwaggerClient - -class PetAPITests: XCTestCase { - - let testTimeout = 10.0 - let disposeBag = DisposeBag() - - override func setUp() { - super.setUp() - // Put setup code here. This method is called before the invocation of each test method in the class. - } - - override func tearDown() { - // Put teardown code here. This method is called after the invocation of each test method in the class. - super.tearDown() - } - - func test1CreatePet() { - let expectation = self.expectation(description: "testCreatePet") - let category = PetstoreClient.Category(id: 1234, name: "eyeColor") - let tags = [Tag(id: 1234, name: "New York"), Tag(id: 124321, name: "Jose")] - let newPet = Pet(id: 1000, category: category, name: "Fluffy", photoUrls: ["https://petstore.com/sample/photo1.jpg", "https://petstore.com/sample/photo2.jpg"], tags: tags, status: .available) - - PetAPI.addPet(body: newPet).subscribe(onNext: { - expectation.fulfill() - }, onError: { _ in - XCTFail("error creating pet") - }).disposed(by: disposeBag) - self.waitForExpectations(timeout: testTimeout, handler: nil) - } - - func test2GetPet() { - let expectation = self.expectation(description: "testGetPet") - PetAPI.getPetById(petId: 1000).subscribe(onNext: { pet in - XCTAssert(pet.id == 1000, "invalid id") - XCTAssert(pet.name == "Fluffy", "invalid name") - XCTAssert(pet.category!.id == 1234, "invalid category id") - XCTAssert(pet.category!.name == "eyeColor", "invalid category name") - - let tag1 = pet.tags![0] - XCTAssert(tag1.id == 1234, "invalid tag id") - XCTAssert(tag1.name == "New York", "invalid tag name") - - let tag2 = pet.tags![1] - XCTAssert(tag2.id == 124321, "invalid tag id") - XCTAssert(tag2.name == "Jose", "invalid tag name") - - XCTAssert(pet.photoUrls[0] == "https://petstore.com/sample/photo1.jpg") - XCTAssert(pet.photoUrls[1] == "https://petstore.com/sample/photo2.jpg") - - expectation.fulfill() - }, onError: { _ in - XCTFail("error getting pet") - }).disposed(by: disposeBag) - self.waitForExpectations(timeout: testTimeout, handler: nil) - } - - func test3DeletePet() { - let expectation = self.expectation(description: "testDeletePet") - PetAPI.deletePet(petId: 1000).subscribe(onNext: { - expectation.fulfill() - }, onError: { errorType in - // The server gives us no data back so alamofire parsing fails - at least - // verify that is the error we get here - // Error Domain=com.alamofire.error Code=-6006 "JSON could not be serialized. Input data was nil or zero - // length." UserInfo={NSLocalizedFailureReason=JSON could not be serialized. Input data was nil or zero - // length.} - let error = errorType as NSError - if error.code == -6006 { - expectation.fulfill() - } else { - XCTFail("error deleting pet") - } - }).disposed(by: disposeBag) - self.waitForExpectations(timeout: testTimeout, handler: nil) - } -} diff --git a/samples/client/petstore/swift4/rxswiftLibrary/SwaggerClientTests/SwaggerClientTests/StoreAPITests.swift b/samples/client/petstore/swift4/rxswiftLibrary/SwaggerClientTests/SwaggerClientTests/StoreAPITests.swift deleted file mode 100644 index 5cbe0d30c609..000000000000 --- a/samples/client/petstore/swift4/rxswiftLibrary/SwaggerClientTests/SwaggerClientTests/StoreAPITests.swift +++ /dev/null @@ -1,93 +0,0 @@ -// -// StoreAPITests.swift -// SwaggerClient -// -// Created by Tony Wang on 7/31/16. -// Copyright © 2016 Swagger. All rights reserved. -// - -import PetstoreClient -import RxSwift -import XCTest -@testable import SwaggerClient - -class StoreAPITests: XCTestCase { - - let isoDateFormat = "yyyy-MM-dd'T'HH:mm:ssZ" - - let testTimeout = 10.0 - let disposeBag = DisposeBag() -/* - func test1PlaceOrder() { - // use explicit naming to reference the enum so that we test we don't regress on enum naming - let shipDate = Date() - let order = Order(id: 1000, petId: 1000, quantity: 10, shipDate: shipDate, status: .placed, complete: true) - let expectation = self.expectation(description: "testPlaceOrder") - StoreAPI.placeOrder(body: order).subscribe(onNext: { order in - XCTAssert(order.id == 1000, "invalid id") - XCTAssert(order.quantity == 10, "invalid quantity") - XCTAssert(order.status == .placed, "invalid status") - XCTAssert(order.shipDate!.isEqual(shipDate, format: self.isoDateFormat), - "Date should be idempotent") - XCTAssert(order.complete == true, "invalid complete") - - expectation.fulfill() - }, onError: { _ in - XCTFail("error placing order") - }).disposed(by: disposeBag) - self.waitForExpectations(timeout: testTimeout, handler: nil) - } - - func test2GetOrder() { - let expectation = self.expectation(description: "testGetOrder") - StoreAPI.getOrderById(orderId: 1000).subscribe(onNext: { order -> Void in - XCTAssert(order.id == 1000, "invalid id") - XCTAssert(order.quantity == 10, "invalid quantity") - XCTAssert(order.status == .placed, "invalid status") - XCTAssert(order.complete == true, "invalid complete") - expectation.fulfill() - }, onError: { _ in - XCTFail("error placing order") - }).disposed(by: disposeBag) - self.waitForExpectations(timeout: testTimeout, handler: nil) - } - - func test3DeleteOrder() { - let expectation = self.expectation(description: "testDeleteOrder") - StoreAPI.deleteOrder(orderId: "1000").subscribe(onNext: { - expectation.fulfill() - }, onError: { errorType -> Void in - // The server gives us no data back so alamofire parsing fails - at least - // verify that is the error we get here - // Error Domain=com.alamofire.error Code=-6006 "JSON could not be serialized. Input data was nil or zero - // length." UserInfo={NSLocalizedFailureReason=JSON could not be serialized. Input data was nil or zero - // length.} - let error = errorType as NSError - if error.code == -6006 { - expectation.fulfill() - } else { - XCTFail("error deleting order") - } - }).disposed(by: disposeBag) - self.waitForExpectations(timeout: testTimeout, handler: nil) - } -*/ -} - -private extension Date { - - /** - Returns true if the dates are equal given the format string. - - - parameter date: The date to compare to. - - parameter format: The format string to use to compare. - - - returns: true if the dates are equal, given the format string. - */ - func isEqual(_ date: Date, format: String) -> Bool { - let fmt = DateFormatter() - fmt.dateFormat = format - return fmt.string(from: self).isEqual(fmt.string(from: date)) - } - -} diff --git a/samples/client/petstore/swift4/rxswiftLibrary/SwaggerClientTests/SwaggerClientTests/UserAPITests.swift b/samples/client/petstore/swift4/rxswiftLibrary/SwaggerClientTests/SwaggerClientTests/UserAPITests.swift deleted file mode 100644 index 36e2852923ec..000000000000 --- a/samples/client/petstore/swift4/rxswiftLibrary/SwaggerClientTests/SwaggerClientTests/UserAPITests.swift +++ /dev/null @@ -1,125 +0,0 @@ -// -// UserAPITests.swift -// SwaggerClient -// -// Created by Tony Wang on 7/31/16. -// Copyright © 2016 Swagger. All rights reserved. -// - -import PetstoreClient -import RxSwift -import XCTest -@testable import SwaggerClient - -class UserAPITests: XCTestCase { - - let testTimeout = 10.0 - let disposeBag = DisposeBag() - - override func setUp() { - super.setUp() - // Put setup code here. This method is called before the invocation of each test method in the class. - } - - override func tearDown() { - // Put teardown code here. This method is called after the invocation of each test method in the class. - super.tearDown() - } - - func testLogin() { - let expectation = self.expectation(description: "testLogin") - UserAPI.loginUser(username: "swiftTester", password: "swift").subscribe(onNext: { _ in - expectation.fulfill() - }, onError: { errorType in - // The server isn't returning JSON - and currently the alamofire implementation - // always parses responses as JSON, so making an exception for this here - // Error Domain=NSCocoaErrorDomain Code=3840 "Invalid value around character 0." - // UserInfo={NSDebugDescription=Invalid value around character 0.} - let error = errorType as NSError - if error.code == 3840 { - expectation.fulfill() - } else { - XCTFail("error logging in") - } - }).disposed(by: disposeBag) - self.waitForExpectations(timeout: testTimeout, handler: nil) - } - - func testLogout() { - let expectation = self.expectation(description: "testLogout") - UserAPI.logoutUser().subscribe(onNext: { - expectation.fulfill() - }, onError: { errorType in - // The server gives us no data back so alamofire parsing fails - at least - // verify that is the error we get here - // Error Domain=com.alamofire.error Code=-6006 "JSON could not be serialized. Input data was nil or zero - // length." UserInfo={NSLocalizedFailureReason=JSON could not be serialized. Input data was nil or zero - // length.} - let error = errorType as NSError - if error.code == -6006 { - expectation.fulfill() - } else { - XCTFail("error logging out") - } - }).disposed(by: disposeBag) - self.waitForExpectations(timeout: testTimeout, handler: nil) - } -/* - func test1CreateUser() { - let expectation = self.expectation(description: "testCreateUser") - let newUser = User(id: 1000, username: "test@test.com", firstName: "Test", lastName: "Tester", email: "test@test.com", password: "test!", phone: "867-5309", userStatus: 0) - UserAPI.createUser(body: newUser).subscribe(onNext: { - expectation.fulfill() - }, onError: { errorType in - // The server gives us no data back so alamofire parsing fails - at least - // verify that is the error we get here - // Error Domain=com.alamofire.error Code=-6006 "JSON could not be serialized. Input data was nil or zero - // length." UserInfo={NSLocalizedFailureReason=JSON could not be serialized. Input data was nil or zero - // length.} - let error = errorType as NSError - if error.code == -6006 { - expectation.fulfill() - } else { - XCTFail("error creating user") - } - }).disposed(by: disposeBag) - self.waitForExpectations(timeout: testTimeout, handler: nil) - } - - func test2GetUser() { - let expectation = self.expectation(description: "testGetUser") - UserAPI.getUserByName(username: "test@test.com").subscribe(onNext: {user -> Void in - XCTAssert(user.userStatus == 0, "invalid userStatus") - XCTAssert(user.email == "test@test.com", "invalid email") - XCTAssert(user.firstName == "Test", "invalid firstName") - XCTAssert(user.lastName == "Tester", "invalid lastName") - XCTAssert(user.password == "test!", "invalid password") - XCTAssert(user.phone == "867-5309", "invalid phone") - expectation.fulfill() - }, onError: { _ in - XCTFail("error getting user") - }).disposed(by: disposeBag) - self.waitForExpectations(timeout: testTimeout, handler: nil) - } - - func test3DeleteUser() { - let expectation = self.expectation(description: "testDeleteUser") - UserAPI.deleteUser(username: "test@test.com").subscribe(onNext: { - expectation.fulfill() - }, onError: { errorType -> Void in - // The server gives us no data back so alamofire parsing fails - at least - // verify that is the error we get here - // Error Domain=com.alamofire.error Code=-6006 "JSON could not be serialized. Input data was nil or zero - // length." UserInfo={NSLocalizedFailureReason=JSON could not be serialized. Input data was nil or zero - // length.} - let error = errorType as NSError - if error.code == -6006 { - expectation.fulfill() - } else { - XCTFail("error deleting user") - } - }).disposed(by: disposeBag) - self.waitForExpectations(timeout: testTimeout, handler: nil) - } -*/ -} diff --git a/samples/client/petstore/swift4/rxswiftLibrary/SwaggerClientTests/pom.xml b/samples/client/petstore/swift4/rxswiftLibrary/SwaggerClientTests/pom.xml deleted file mode 100644 index 24424eb7fa25..000000000000 --- a/samples/client/petstore/swift4/rxswiftLibrary/SwaggerClientTests/pom.xml +++ /dev/null @@ -1,43 +0,0 @@ - - 4.0.0 - io.swagger - Swift4RxSwiftPetstoreClientTests - pom - 1.0-SNAPSHOT - Swift4 RxSwift Swagger Petstore Client - - - - maven-dependency-plugin - - - package - - copy-dependencies - - - ${project.build.directory} - - - - - - org.codehaus.mojo - exec-maven-plugin - 1.2.1 - - - xcodebuild-test - integration-test - - exec - - - ./run_xcodebuild.sh - - - - - - - diff --git a/samples/client/petstore/swift4/rxswiftLibrary/SwaggerClientTests/run_xcodebuild.sh b/samples/client/petstore/swift4/rxswiftLibrary/SwaggerClientTests/run_xcodebuild.sh deleted file mode 100755 index 79520c7fc38c..000000000000 --- a/samples/client/petstore/swift4/rxswiftLibrary/SwaggerClientTests/run_xcodebuild.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh - -pod install - -xcodebuild -workspace "SwaggerClient.xcworkspace" -scheme "SwaggerClient" test -destination "platform=iOS Simulator,name=iPhone 8,OS=latest" | xcpretty && exit ${PIPESTATUS[0]} diff --git a/samples/client/petstore/swift4/rxswiftLibrary/docs/AdditionalPropertiesClass.md b/samples/client/petstore/swift4/rxswiftLibrary/docs/AdditionalPropertiesClass.md deleted file mode 100644 index e22d28be1de6..000000000000 --- a/samples/client/petstore/swift4/rxswiftLibrary/docs/AdditionalPropertiesClass.md +++ /dev/null @@ -1,11 +0,0 @@ -# AdditionalPropertiesClass - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**mapString** | **[String:String]** | | [optional] -**mapMapString** | [String:[String: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/swift4/rxswiftLibrary/docs/Animal.md b/samples/client/petstore/swift4/rxswiftLibrary/docs/Animal.md deleted file mode 100644 index 69c601455cd8..000000000000 --- a/samples/client/petstore/swift4/rxswiftLibrary/docs/Animal.md +++ /dev/null @@ -1,11 +0,0 @@ -# Animal - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**className** | **String** | | -**color** | **String** | | [optional] [default to "red"] - -[[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/swift4/rxswiftLibrary/docs/AnimalFarm.md b/samples/client/petstore/swift4/rxswiftLibrary/docs/AnimalFarm.md deleted file mode 100644 index df6bab21dae8..000000000000 --- a/samples/client/petstore/swift4/rxswiftLibrary/docs/AnimalFarm.md +++ /dev/null @@ -1,9 +0,0 @@ -# AnimalFarm - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/samples/client/petstore/swift4/rxswiftLibrary/docs/AnotherFakeAPI.md b/samples/client/petstore/swift4/rxswiftLibrary/docs/AnotherFakeAPI.md deleted file mode 100644 index dcd62507d964..000000000000 --- a/samples/client/petstore/swift4/rxswiftLibrary/docs/AnotherFakeAPI.md +++ /dev/null @@ -1,49 +0,0 @@ -# AnotherFakeAPI - -All URIs are relative to *http://petstore.swagger.io:80/v2* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**call123testSpecialTags**](AnotherFakeAPI.md#call123testspecialtags) | **PATCH** /another-fake/dummy | To test special tags - - -# **call123testSpecialTags** -```swift - open class func call123testSpecialTags(body: Client) -> Observable -``` - -To test special tags - -To test special tags and operation ID starting with number - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let body = Client(client: "client_example") // Client | client model - -// TODO RxSwift sample code not yet implemented. To contribute, please open a ticket via http://github.com/OpenAPITools/openapi-generator/issues/new -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Client**](Client.md) | client model | - -### Return type - -[**Client**](Client.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **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/swift4/rxswiftLibrary/docs/ApiResponse.md b/samples/client/petstore/swift4/rxswiftLibrary/docs/ApiResponse.md deleted file mode 100644 index c6d9768fe9bf..000000000000 --- a/samples/client/petstore/swift4/rxswiftLibrary/docs/ApiResponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# ApiResponse - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**code** | **Int** | | [optional] -**type** | **String** | | [optional] -**message** | **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/swift4/rxswiftLibrary/docs/ArrayOfArrayOfNumberOnly.md b/samples/client/petstore/swift4/rxswiftLibrary/docs/ArrayOfArrayOfNumberOnly.md deleted file mode 100644 index c6fceff5e08d..000000000000 --- a/samples/client/petstore/swift4/rxswiftLibrary/docs/ArrayOfArrayOfNumberOnly.md +++ /dev/null @@ -1,10 +0,0 @@ -# ArrayOfArrayOfNumberOnly - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**arrayArrayNumber** | [[Double]] | | [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/swift4/rxswiftLibrary/docs/ArrayOfNumberOnly.md b/samples/client/petstore/swift4/rxswiftLibrary/docs/ArrayOfNumberOnly.md deleted file mode 100644 index f09f8fa6f70f..000000000000 --- a/samples/client/petstore/swift4/rxswiftLibrary/docs/ArrayOfNumberOnly.md +++ /dev/null @@ -1,10 +0,0 @@ -# ArrayOfNumberOnly - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**arrayNumber** | **[Double]** | | [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/swift4/rxswiftLibrary/docs/ArrayTest.md b/samples/client/petstore/swift4/rxswiftLibrary/docs/ArrayTest.md deleted file mode 100644 index bf416b8330cc..000000000000 --- a/samples/client/petstore/swift4/rxswiftLibrary/docs/ArrayTest.md +++ /dev/null @@ -1,12 +0,0 @@ -# ArrayTest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**arrayOfString** | **[String]** | | [optional] -**arrayArrayOfInteger** | [[Int64]] | | [optional] -**arrayArrayOfModel** | [[ReadOnlyFirst]] | | [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/swift4/rxswiftLibrary/docs/Capitalization.md b/samples/client/petstore/swift4/rxswiftLibrary/docs/Capitalization.md deleted file mode 100644 index 95374216c773..000000000000 --- a/samples/client/petstore/swift4/rxswiftLibrary/docs/Capitalization.md +++ /dev/null @@ -1,15 +0,0 @@ -# Capitalization - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**smallCamel** | **String** | | [optional] -**capitalCamel** | **String** | | [optional] -**smallSnake** | **String** | | [optional] -**capitalSnake** | **String** | | [optional] -**sCAETHFlowPoints** | **String** | | [optional] -**ATT_NAME** | **String** | Name of the pet | [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/swift4/rxswiftLibrary/docs/Cat.md b/samples/client/petstore/swift4/rxswiftLibrary/docs/Cat.md deleted file mode 100644 index fb5949b15761..000000000000 --- a/samples/client/petstore/swift4/rxswiftLibrary/docs/Cat.md +++ /dev/null @@ -1,10 +0,0 @@ -# Cat - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**declawed** | **Bool** | | [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/swift4/rxswiftLibrary/docs/CatAllOf.md b/samples/client/petstore/swift4/rxswiftLibrary/docs/CatAllOf.md deleted file mode 100644 index 79789be61c01..000000000000 --- a/samples/client/petstore/swift4/rxswiftLibrary/docs/CatAllOf.md +++ /dev/null @@ -1,10 +0,0 @@ -# CatAllOf - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**declawed** | **Bool** | | [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/swift4/rxswiftLibrary/docs/Category.md b/samples/client/petstore/swift4/rxswiftLibrary/docs/Category.md deleted file mode 100644 index 5ca5408c0f96..000000000000 --- a/samples/client/petstore/swift4/rxswiftLibrary/docs/Category.md +++ /dev/null @@ -1,11 +0,0 @@ -# Category - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Int64** | | [optional] -**name** | **String** | | [default to "default-name"] - -[[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/swift4/rxswiftLibrary/docs/ClassModel.md b/samples/client/petstore/swift4/rxswiftLibrary/docs/ClassModel.md deleted file mode 100644 index e3912fdf0fd5..000000000000 --- a/samples/client/petstore/swift4/rxswiftLibrary/docs/ClassModel.md +++ /dev/null @@ -1,10 +0,0 @@ -# ClassModel - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**_class** | **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/swift4/rxswiftLibrary/docs/Client.md b/samples/client/petstore/swift4/rxswiftLibrary/docs/Client.md deleted file mode 100644 index 0de1b238c36f..000000000000 --- a/samples/client/petstore/swift4/rxswiftLibrary/docs/Client.md +++ /dev/null @@ -1,10 +0,0 @@ -# Client - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**client** | **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/swift4/rxswiftLibrary/docs/Dog.md b/samples/client/petstore/swift4/rxswiftLibrary/docs/Dog.md deleted file mode 100644 index 4824786da049..000000000000 --- a/samples/client/petstore/swift4/rxswiftLibrary/docs/Dog.md +++ /dev/null @@ -1,10 +0,0 @@ -# Dog - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**breed** | **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/swift4/rxswiftLibrary/docs/DogAllOf.md b/samples/client/petstore/swift4/rxswiftLibrary/docs/DogAllOf.md deleted file mode 100644 index 9302ef52e938..000000000000 --- a/samples/client/petstore/swift4/rxswiftLibrary/docs/DogAllOf.md +++ /dev/null @@ -1,10 +0,0 @@ -# DogAllOf - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**breed** | **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/swift4/rxswiftLibrary/docs/EnumArrays.md b/samples/client/petstore/swift4/rxswiftLibrary/docs/EnumArrays.md deleted file mode 100644 index b9a9807d3c8e..000000000000 --- a/samples/client/petstore/swift4/rxswiftLibrary/docs/EnumArrays.md +++ /dev/null @@ -1,11 +0,0 @@ -# EnumArrays - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**justSymbol** | **String** | | [optional] -**arrayEnum** | **[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/swift4/rxswiftLibrary/docs/EnumClass.md b/samples/client/petstore/swift4/rxswiftLibrary/docs/EnumClass.md deleted file mode 100644 index 67f017becd0c..000000000000 --- a/samples/client/petstore/swift4/rxswiftLibrary/docs/EnumClass.md +++ /dev/null @@ -1,9 +0,0 @@ -# EnumClass - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/samples/client/petstore/swift4/rxswiftLibrary/docs/EnumTest.md b/samples/client/petstore/swift4/rxswiftLibrary/docs/EnumTest.md deleted file mode 100644 index bc9b036dd769..000000000000 --- a/samples/client/petstore/swift4/rxswiftLibrary/docs/EnumTest.md +++ /dev/null @@ -1,14 +0,0 @@ -# EnumTest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**enumString** | **String** | | [optional] -**enumStringRequired** | **String** | | -**enumInteger** | **Int** | | [optional] -**enumNumber** | **Double** | | [optional] -**outerEnum** | [**OuterEnum**](OuterEnum.md) | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/samples/client/petstore/swift4/rxswiftLibrary/docs/FakeAPI.md b/samples/client/petstore/swift4/rxswiftLibrary/docs/FakeAPI.md deleted file mode 100644 index aae8b34423b7..000000000000 --- a/samples/client/petstore/swift4/rxswiftLibrary/docs/FakeAPI.md +++ /dev/null @@ -1,548 +0,0 @@ -# FakeAPI - -All URIs are relative to *http://petstore.swagger.io:80/v2* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**fakeOuterBooleanSerialize**](FakeAPI.md#fakeouterbooleanserialize) | **POST** /fake/outer/boolean | -[**fakeOuterCompositeSerialize**](FakeAPI.md#fakeoutercompositeserialize) | **POST** /fake/outer/composite | -[**fakeOuterNumberSerialize**](FakeAPI.md#fakeouternumberserialize) | **POST** /fake/outer/number | -[**fakeOuterStringSerialize**](FakeAPI.md#fakeouterstringserialize) | **POST** /fake/outer/string | -[**testBodyWithFileSchema**](FakeAPI.md#testbodywithfileschema) | **PUT** /fake/body-with-file-schema | -[**testBodyWithQueryParams**](FakeAPI.md#testbodywithqueryparams) | **PUT** /fake/body-with-query-params | -[**testClientModel**](FakeAPI.md#testclientmodel) | **PATCH** /fake | To test \"client\" model -[**testEndpointParameters**](FakeAPI.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 -[**testEnumParameters**](FakeAPI.md#testenumparameters) | **GET** /fake | To test enum parameters -[**testGroupParameters**](FakeAPI.md#testgroupparameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) -[**testInlineAdditionalProperties**](FakeAPI.md#testinlineadditionalproperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties -[**testJsonFormData**](FakeAPI.md#testjsonformdata) | **GET** /fake/jsonFormData | test json serialization of form data - - -# **fakeOuterBooleanSerialize** -```swift - open class func fakeOuterBooleanSerialize(body: Bool? = nil) -> Observable -``` - - - -Test serialization of outer boolean types - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let body = true // Bool | Input boolean as post body (optional) - -// TODO RxSwift sample code not yet implemented. To contribute, please open a ticket via http://github.com/OpenAPITools/openapi-generator/issues/new -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | **Bool** | Input boolean as post body | [optional] - -### Return type - -**Bool** - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: */* - -[[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) - -# **fakeOuterCompositeSerialize** -```swift - open class func fakeOuterCompositeSerialize(body: OuterComposite? = nil) -> Observable -``` - - - -Test serialization of object with outer number type - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let body = OuterComposite(myNumber: 123, myString: "myString_example", myBoolean: false) // OuterComposite | Input composite as post body (optional) - -// TODO RxSwift sample code not yet implemented. To contribute, please open a ticket via http://github.com/OpenAPITools/openapi-generator/issues/new -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**OuterComposite**](OuterComposite.md) | Input composite as post body | [optional] - -### Return type - -[**OuterComposite**](OuterComposite.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: */* - -[[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) - -# **fakeOuterNumberSerialize** -```swift - open class func fakeOuterNumberSerialize(body: Double? = nil) -> Observable -``` - - - -Test serialization of outer number types - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let body = 987 // Double | Input number as post body (optional) - -// TODO RxSwift sample code not yet implemented. To contribute, please open a ticket via http://github.com/OpenAPITools/openapi-generator/issues/new -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | **Double** | Input number as post body | [optional] - -### Return type - -**Double** - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: */* - -[[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) - -# **fakeOuterStringSerialize** -```swift - open class func fakeOuterStringSerialize(body: String? = nil) -> Observable -``` - - - -Test serialization of outer string types - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let body = "body_example" // String | Input string as post body (optional) - -// TODO RxSwift sample code not yet implemented. To contribute, please open a ticket via http://github.com/OpenAPITools/openapi-generator/issues/new -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | **String** | Input string as post body | [optional] - -### Return type - -**String** - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: */* - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **testBodyWithFileSchema** -```swift - open class func testBodyWithFileSchema(body: FileSchemaTestClass) -> Observable -``` - - - -For this test, the body for this request much reference a schema named `File`. - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let body = FileSchemaTestClass(file: File(sourceURI: "sourceURI_example"), files: [File(sourceURI: "sourceURI_example")]) // FileSchemaTestClass | - -// TODO RxSwift sample code not yet implemented. To contribute, please open a ticket via http://github.com/OpenAPITools/openapi-generator/issues/new -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**FileSchemaTestClass**](FileSchemaTestClass.md) | | - -### Return type - -Void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **testBodyWithQueryParams** -```swift - open class func testBodyWithQueryParams(query: String, body: User) -> Observable -``` - - - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let query = "query_example" // String | -let body = User(id: 123, username: "username_example", firstName: "firstName_example", lastName: "lastName_example", email: "email_example", password: "password_example", phone: "phone_example", userStatus: 123) // User | - -// TODO RxSwift sample code not yet implemented. To contribute, please open a ticket via http://github.com/OpenAPITools/openapi-generator/issues/new -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **query** | **String** | | - **body** | [**User**](User.md) | | - -### Return type - -Void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **testClientModel** -```swift - open class func testClientModel(body: Client) -> Observable -``` - -To test \"client\" model - -To test \"client\" model - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let body = Client(client: "client_example") // Client | client model - -// TODO RxSwift sample code not yet implemented. To contribute, please open a ticket via http://github.com/OpenAPITools/openapi-generator/issues/new -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Client**](Client.md) | client model | - -### Return type - -[**Client**](Client.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **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) - -# **testEndpointParameters** -```swift - open class func testEndpointParameters(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil) -> Observable -``` - -Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - -Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let number = 987 // Double | None -let double = 987 // Double | None -let patternWithoutDelimiter = "patternWithoutDelimiter_example" // String | None -let byte = 987 // Data | None -let integer = 987 // Int | None (optional) -let int32 = 987 // Int | None (optional) -let int64 = 987 // Int64 | None (optional) -let float = 987 // Float | None (optional) -let string = "string_example" // String | None (optional) -let binary = URL(string: "https://example.com")! // URL | None (optional) -let date = Date() // Date | None (optional) -let dateTime = Date() // Date | None (optional) -let password = "password_example" // String | None (optional) -let callback = "callback_example" // String | None (optional) - -// TODO RxSwift sample code not yet implemented. To contribute, please open a ticket via http://github.com/OpenAPITools/openapi-generator/issues/new -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **number** | **Double** | None | - **double** | **Double** | None | - **patternWithoutDelimiter** | **String** | None | - **byte** | **Data** | None | - **integer** | **Int** | None | [optional] - **int32** | **Int** | None | [optional] - **int64** | **Int64** | None | [optional] - **float** | **Float** | None | [optional] - **string** | **String** | None | [optional] - **binary** | **URL** | None | [optional] - **date** | **Date** | None | [optional] - **dateTime** | **Date** | None | [optional] - **password** | **String** | None | [optional] - **callback** | **String** | None | [optional] - -### Return type - -Void (empty response body) - -### Authorization - -[http_basic_test](../README.md#http_basic_test) - -### 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) - -# **testEnumParameters** -```swift - open class func testEnumParameters(enumHeaderStringArray: [String]? = nil, enumHeaderString: EnumHeaderString_testEnumParameters? = nil, enumQueryStringArray: [String]? = nil, enumQueryString: EnumQueryString_testEnumParameters? = nil, enumQueryInteger: EnumQueryInteger_testEnumParameters? = nil, enumQueryDouble: EnumQueryDouble_testEnumParameters? = nil, enumFormStringArray: [String]? = nil, enumFormString: EnumFormString_testEnumParameters? = nil) -> Observable -``` - -To test enum parameters - -To test enum parameters - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let enumHeaderStringArray = ["enumHeaderStringArray_example"] // [String] | Header parameter enum test (string array) (optional) -let enumHeaderString = "enumHeaderString_example" // String | Header parameter enum test (string) (optional) (default to .efg) -let enumQueryStringArray = ["enumQueryStringArray_example"] // [String] | Query parameter enum test (string array) (optional) -let enumQueryString = "enumQueryString_example" // String | Query parameter enum test (string) (optional) (default to .efg) -let enumQueryInteger = 987 // Int | Query parameter enum test (double) (optional) -let enumQueryDouble = 987 // Double | Query parameter enum test (double) (optional) -let enumFormStringArray = ["inner_example"] // [String] | Form parameter enum test (string array) (optional) (default to .dollar) -let enumFormString = "enumFormString_example" // String | Form parameter enum test (string) (optional) (default to .efg) - -// TODO RxSwift sample code not yet implemented. To contribute, please open a ticket via http://github.com/OpenAPITools/openapi-generator/issues/new -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **enumHeaderStringArray** | [**[String]**](String.md) | Header parameter enum test (string array) | [optional] - **enumHeaderString** | **String** | Header parameter enum test (string) | [optional] [default to .efg] - **enumQueryStringArray** | [**[String]**](String.md) | Query parameter enum test (string array) | [optional] - **enumQueryString** | **String** | Query parameter enum test (string) | [optional] [default to .efg] - **enumQueryInteger** | **Int** | Query parameter enum test (double) | [optional] - **enumQueryDouble** | **Double** | Query parameter enum test (double) | [optional] - **enumFormStringArray** | [**[String]**](String.md) | Form parameter enum test (string array) | [optional] [default to .dollar] - **enumFormString** | **String** | Form parameter enum test (string) | [optional] [default to .efg] - -### Return type - -Void (empty response body) - -### Authorization - -No authorization required - -### 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) - -# **testGroupParameters** -```swift - open class func testGroupParameters(requiredStringGroup: Int, requiredBooleanGroup: Bool, requiredInt64Group: Int64, stringGroup: Int? = nil, booleanGroup: Bool? = nil, int64Group: Int64? = nil) -> Observable -``` - -Fake endpoint to test group parameters (optional) - -Fake endpoint to test group parameters (optional) - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let requiredStringGroup = 987 // Int | Required String in group parameters -let requiredBooleanGroup = true // Bool | Required Boolean in group parameters -let requiredInt64Group = 987 // Int64 | Required Integer in group parameters -let stringGroup = 987 // Int | String in group parameters (optional) -let booleanGroup = true // Bool | Boolean in group parameters (optional) -let int64Group = 987 // Int64 | Integer in group parameters (optional) - -// TODO RxSwift sample code not yet implemented. To contribute, please open a ticket via http://github.com/OpenAPITools/openapi-generator/issues/new -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **requiredStringGroup** | **Int** | Required String in group parameters | - **requiredBooleanGroup** | **Bool** | Required Boolean in group parameters | - **requiredInt64Group** | **Int64** | Required Integer in group parameters | - **stringGroup** | **Int** | String in group parameters | [optional] - **booleanGroup** | **Bool** | Boolean in group parameters | [optional] - **int64Group** | **Int64** | Integer in group parameters | [optional] - -### Return type - -Void (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) - -# **testInlineAdditionalProperties** -```swift - open class func testInlineAdditionalProperties(param: [String:String]) -> Observable -``` - -test inline additionalProperties - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let param = "TODO" // [String:String] | request body - -// TODO RxSwift sample code not yet implemented. To contribute, please open a ticket via http://github.com/OpenAPITools/openapi-generator/issues/new -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **param** | [**[String:String]**](String.md) | request body | - -### Return type - -Void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **testJsonFormData** -```swift - open class func testJsonFormData(param: String, param2: String) -> Observable -``` - -test json serialization of form data - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let param = "param_example" // String | field1 -let param2 = "param2_example" // String | field2 - -// TODO RxSwift sample code not yet implemented. To contribute, please open a ticket via http://github.com/OpenAPITools/openapi-generator/issues/new -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **param** | **String** | field1 | - **param2** | **String** | field2 | - -### Return type - -Void (empty response body) - -### Authorization - -No authorization required - -### 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) - diff --git a/samples/client/petstore/swift4/rxswiftLibrary/docs/FakeClassnameTags123API.md b/samples/client/petstore/swift4/rxswiftLibrary/docs/FakeClassnameTags123API.md deleted file mode 100644 index 1b94500e7940..000000000000 --- a/samples/client/petstore/swift4/rxswiftLibrary/docs/FakeClassnameTags123API.md +++ /dev/null @@ -1,49 +0,0 @@ -# FakeClassnameTags123API - -All URIs are relative to *http://petstore.swagger.io:80/v2* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**testClassname**](FakeClassnameTags123API.md#testclassname) | **PATCH** /fake_classname_test | To test class name in snake case - - -# **testClassname** -```swift - open class func testClassname(body: Client) -> Observable -``` - -To test class name in snake case - -To test class name in snake case - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let body = Client(client: "client_example") // Client | client model - -// TODO RxSwift sample code not yet implemented. To contribute, please open a ticket via http://github.com/OpenAPITools/openapi-generator/issues/new -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Client**](Client.md) | client model | - -### Return type - -[**Client**](Client.md) - -### Authorization - -[api_key_query](../README.md#api_key_query) - -### HTTP request headers - - - **Content-Type**: application/json - - **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/swift4/rxswiftLibrary/docs/File.md b/samples/client/petstore/swift4/rxswiftLibrary/docs/File.md deleted file mode 100644 index 3edfef17b794..000000000000 --- a/samples/client/petstore/swift4/rxswiftLibrary/docs/File.md +++ /dev/null @@ -1,10 +0,0 @@ -# File - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**sourceURI** | **String** | Test capitalization | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/samples/client/petstore/swift4/rxswiftLibrary/docs/FileSchemaTestClass.md b/samples/client/petstore/swift4/rxswiftLibrary/docs/FileSchemaTestClass.md deleted file mode 100644 index afdacc60b2c3..000000000000 --- a/samples/client/petstore/swift4/rxswiftLibrary/docs/FileSchemaTestClass.md +++ /dev/null @@ -1,11 +0,0 @@ -# FileSchemaTestClass - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**file** | [**File**](File.md) | | [optional] -**files** | [File] | | [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/swift4/rxswiftLibrary/docs/FormatTest.md b/samples/client/petstore/swift4/rxswiftLibrary/docs/FormatTest.md deleted file mode 100644 index f74d94f6c46a..000000000000 --- a/samples/client/petstore/swift4/rxswiftLibrary/docs/FormatTest.md +++ /dev/null @@ -1,22 +0,0 @@ -# FormatTest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**integer** | **Int** | | [optional] -**int32** | **Int** | | [optional] -**int64** | **Int64** | | [optional] -**number** | **Double** | | -**float** | **Float** | | [optional] -**double** | **Double** | | [optional] -**string** | **String** | | [optional] -**byte** | **Data** | | -**binary** | **URL** | | [optional] -**date** | **Date** | | -**dateTime** | **Date** | | [optional] -**uuid** | **UUID** | | [optional] -**password** | **String** | | - -[[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/swift4/rxswiftLibrary/docs/HasOnlyReadOnly.md b/samples/client/petstore/swift4/rxswiftLibrary/docs/HasOnlyReadOnly.md deleted file mode 100644 index 57b6e3a17e67..000000000000 --- a/samples/client/petstore/swift4/rxswiftLibrary/docs/HasOnlyReadOnly.md +++ /dev/null @@ -1,11 +0,0 @@ -# HasOnlyReadOnly - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**bar** | **String** | | [optional] [readonly] -**foo** | **String** | | [optional] [readonly] - -[[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/swift4/rxswiftLibrary/docs/List.md b/samples/client/petstore/swift4/rxswiftLibrary/docs/List.md deleted file mode 100644 index b77718302edf..000000000000 --- a/samples/client/petstore/swift4/rxswiftLibrary/docs/List.md +++ /dev/null @@ -1,10 +0,0 @@ -# List - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**_123list** | **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/swift4/rxswiftLibrary/docs/MapTest.md b/samples/client/petstore/swift4/rxswiftLibrary/docs/MapTest.md deleted file mode 100644 index 56213c4113f6..000000000000 --- a/samples/client/petstore/swift4/rxswiftLibrary/docs/MapTest.md +++ /dev/null @@ -1,13 +0,0 @@ -# MapTest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**mapMapOfString** | [String:[String:String]] | | [optional] -**mapOfEnumString** | **[String:String]** | | [optional] -**directMap** | **[String:Bool]** | | [optional] -**indirectMap** | [**StringBooleanMap**](StringBooleanMap.md) | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/samples/client/petstore/swift4/rxswiftLibrary/docs/MixedPropertiesAndAdditionalPropertiesClass.md b/samples/client/petstore/swift4/rxswiftLibrary/docs/MixedPropertiesAndAdditionalPropertiesClass.md deleted file mode 100644 index fcffb8ecdbf3..000000000000 --- a/samples/client/petstore/swift4/rxswiftLibrary/docs/MixedPropertiesAndAdditionalPropertiesClass.md +++ /dev/null @@ -1,12 +0,0 @@ -# MixedPropertiesAndAdditionalPropertiesClass - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**uuid** | **UUID** | | [optional] -**dateTime** | **Date** | | [optional] -**map** | [String:Animal] | | [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/swift4/rxswiftLibrary/docs/Model200Response.md b/samples/client/petstore/swift4/rxswiftLibrary/docs/Model200Response.md deleted file mode 100644 index 5865ea690cc3..000000000000 --- a/samples/client/petstore/swift4/rxswiftLibrary/docs/Model200Response.md +++ /dev/null @@ -1,11 +0,0 @@ -# Model200Response - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **Int** | | [optional] -**_class** | **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/swift4/rxswiftLibrary/docs/Name.md b/samples/client/petstore/swift4/rxswiftLibrary/docs/Name.md deleted file mode 100644 index f7b180292cd6..000000000000 --- a/samples/client/petstore/swift4/rxswiftLibrary/docs/Name.md +++ /dev/null @@ -1,13 +0,0 @@ -# Name - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **Int** | | -**snakeCase** | **Int** | | [optional] [readonly] -**property** | **String** | | [optional] -**_123number** | **Int** | | [optional] [readonly] - -[[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/swift4/rxswiftLibrary/docs/NumberOnly.md b/samples/client/petstore/swift4/rxswiftLibrary/docs/NumberOnly.md deleted file mode 100644 index 72bd361168b5..000000000000 --- a/samples/client/petstore/swift4/rxswiftLibrary/docs/NumberOnly.md +++ /dev/null @@ -1,10 +0,0 @@ -# NumberOnly - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**justNumber** | **Double** | | [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/swift4/rxswiftLibrary/docs/Order.md b/samples/client/petstore/swift4/rxswiftLibrary/docs/Order.md deleted file mode 100644 index 15487f01175c..000000000000 --- a/samples/client/petstore/swift4/rxswiftLibrary/docs/Order.md +++ /dev/null @@ -1,15 +0,0 @@ -# Order - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Int64** | | [optional] -**petId** | **Int64** | | [optional] -**quantity** | **Int** | | [optional] -**shipDate** | **Date** | | [optional] -**status** | **String** | Order Status | [optional] -**complete** | **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/swift4/rxswiftLibrary/docs/OuterComposite.md b/samples/client/petstore/swift4/rxswiftLibrary/docs/OuterComposite.md deleted file mode 100644 index d6b3583bc3ff..000000000000 --- a/samples/client/petstore/swift4/rxswiftLibrary/docs/OuterComposite.md +++ /dev/null @@ -1,12 +0,0 @@ -# OuterComposite - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**myNumber** | **Double** | | [optional] -**myString** | **String** | | [optional] -**myBoolean** | **Bool** | | [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/swift4/rxswiftLibrary/docs/OuterEnum.md b/samples/client/petstore/swift4/rxswiftLibrary/docs/OuterEnum.md deleted file mode 100644 index 06d413b01680..000000000000 --- a/samples/client/petstore/swift4/rxswiftLibrary/docs/OuterEnum.md +++ /dev/null @@ -1,9 +0,0 @@ -# OuterEnum - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/samples/client/petstore/swift4/rxswiftLibrary/docs/Pet.md b/samples/client/petstore/swift4/rxswiftLibrary/docs/Pet.md deleted file mode 100644 index 5c05f98fad4a..000000000000 --- a/samples/client/petstore/swift4/rxswiftLibrary/docs/Pet.md +++ /dev/null @@ -1,15 +0,0 @@ -# Pet - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Int64** | | [optional] -**category** | [**Category**](Category.md) | | [optional] -**name** | **String** | | -**photoUrls** | **[String]** | | -**tags** | [Tag] | | [optional] -**status** | **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/swift4/rxswiftLibrary/docs/PetAPI.md b/samples/client/petstore/swift4/rxswiftLibrary/docs/PetAPI.md deleted file mode 100644 index c0ec8a91fb4c..000000000000 --- a/samples/client/petstore/swift4/rxswiftLibrary/docs/PetAPI.md +++ /dev/null @@ -1,379 +0,0 @@ -# PetAPI - -All URIs are relative to *http://petstore.swagger.io:80/v2* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**addPet**](PetAPI.md#addpet) | **POST** /pet | Add a new pet to the store -[**deletePet**](PetAPI.md#deletepet) | **DELETE** /pet/{petId} | Deletes a pet -[**findPetsByStatus**](PetAPI.md#findpetsbystatus) | **GET** /pet/findByStatus | Finds Pets by status -[**findPetsByTags**](PetAPI.md#findpetsbytags) | **GET** /pet/findByTags | Finds Pets by tags -[**getPetById**](PetAPI.md#getpetbyid) | **GET** /pet/{petId} | Find pet by ID -[**updatePet**](PetAPI.md#updatepet) | **PUT** /pet | Update an existing pet -[**updatePetWithForm**](PetAPI.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data -[**uploadFile**](PetAPI.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image -[**uploadFileWithRequiredFile**](PetAPI.md#uploadfilewithrequiredfile) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required) - - -# **addPet** -```swift - open class func addPet(body: Pet) -> Observable -``` - -Add a new pet to the store - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let body = Pet(id: 123, category: Category(id: 123, name: "name_example"), name: "name_example", photoUrls: ["photoUrls_example"], tags: [Tag(id: 123, name: "name_example")], status: "status_example") // Pet | Pet object that needs to be added to the store - -// TODO RxSwift sample code not yet implemented. To contribute, please open a ticket via http://github.com/OpenAPITools/openapi-generator/issues/new -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Pet**](Pet.md) | Pet object that needs to be added to the store | - -### Return type - -Void (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) - -# **deletePet** -```swift - open class func deletePet(petId: Int64, apiKey: String? = nil) -> Observable -``` - -Deletes a pet - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let petId = 987 // Int64 | Pet id to delete -let apiKey = "apiKey_example" // String | (optional) - -// TODO RxSwift sample code not yet implemented. To contribute, please open a ticket via http://github.com/OpenAPITools/openapi-generator/issues/new -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Int64** | Pet id to delete | - **apiKey** | **String** | | [optional] - -### Return type - -Void (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) - -# **findPetsByStatus** -```swift - open class func findPetsByStatus(status: [String]) -> Observable<[Pet]> -``` - -Finds Pets by status - -Multiple status values can be provided with comma separated strings - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let status = ["status_example"] // [String] | Status values that need to be considered for filter - -// TODO RxSwift sample code not yet implemented. To contribute, please open a ticket via http://github.com/OpenAPITools/openapi-generator/issues/new -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **status** | [**[String]**](String.md) | Status values that need to be considered for filter | - -### Return type - -[**[Pet]**](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) - -# **findPetsByTags** -```swift - open class func findPetsByTags(tags: [String]) -> Observable<[Pet]> -``` - -Finds Pets by tags - -Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let tags = ["inner_example"] // [String] | Tags to filter by - -// TODO RxSwift sample code not yet implemented. To contribute, please open a ticket via http://github.com/OpenAPITools/openapi-generator/issues/new -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **tags** | [**[String]**](String.md) | Tags to filter by | - -### Return type - -[**[Pet]**](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) - -# **getPetById** -```swift - open class func getPetById(petId: Int64) -> Observable -``` - -Find pet by ID - -Returns a single pet - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let petId = 987 // Int64 | ID of pet to return - -// TODO RxSwift sample code not yet implemented. To contribute, please open a ticket via http://github.com/OpenAPITools/openapi-generator/issues/new -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Int64** | ID of pet to return | - -### Return type - -[**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) - -# **updatePet** -```swift - open class func updatePet(body: Pet) -> Observable -``` - -Update an existing pet - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let body = Pet(id: 123, category: Category(id: 123, name: "name_example"), name: "name_example", photoUrls: ["photoUrls_example"], tags: [Tag(id: 123, name: "name_example")], status: "status_example") // Pet | Pet object that needs to be added to the store - -// TODO RxSwift sample code not yet implemented. To contribute, please open a ticket via http://github.com/OpenAPITools/openapi-generator/issues/new -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Pet**](Pet.md) | Pet object that needs to be added to the store | - -### Return type - -Void (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) - -# **updatePetWithForm** -```swift - open class func updatePetWithForm(petId: Int64, name: String? = nil, status: String? = nil) -> Observable -``` - -Updates a pet in the store with form data - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let petId = 987 // Int64 | ID of pet that needs to be updated -let name = "name_example" // String | Updated name of the pet (optional) -let status = "status_example" // String | Updated status of the pet (optional) - -// TODO RxSwift sample code not yet implemented. To contribute, please open a ticket via http://github.com/OpenAPITools/openapi-generator/issues/new -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Int64** | ID of pet that needs to be updated | - **name** | **String** | Updated name of the pet | [optional] - **status** | **String** | Updated status of the pet | [optional] - -### Return type - -Void (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) - -# **uploadFile** -```swift - open class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil) -> Observable -``` - -uploads an image - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let petId = 987 // Int64 | ID of pet to update -let additionalMetadata = "additionalMetadata_example" // String | Additional data to pass to server (optional) -let file = URL(string: "https://example.com")! // URL | file to upload (optional) - -// TODO RxSwift sample code not yet implemented. To contribute, please open a ticket via http://github.com/OpenAPITools/openapi-generator/issues/new -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Int64** | ID of pet to update | - **additionalMetadata** | **String** | Additional data to pass to server | [optional] - **file** | **URL** | file to upload | [optional] - -### Return type - -[**ApiResponse**](ApiResponse.md) - -### Authorization - -[petstore_auth](../README.md#petstore_auth) - -### HTTP request headers - - - **Content-Type**: multipart/form-data - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **uploadFileWithRequiredFile** -```swift - open class func uploadFileWithRequiredFile(petId: Int64, requiredFile: URL, additionalMetadata: String? = nil) -> Observable -``` - -uploads an image (required) - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let petId = 987 // Int64 | ID of pet to update -let requiredFile = URL(string: "https://example.com")! // URL | file to upload -let additionalMetadata = "additionalMetadata_example" // String | Additional data to pass to server (optional) - -// TODO RxSwift sample code not yet implemented. To contribute, please open a ticket via http://github.com/OpenAPITools/openapi-generator/issues/new -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Int64** | ID of pet to update | - **requiredFile** | **URL** | file to upload | - **additionalMetadata** | **String** | Additional data to pass to server | [optional] - -### Return type - -[**ApiResponse**](ApiResponse.md) - -### Authorization - -[petstore_auth](../README.md#petstore_auth) - -### HTTP request headers - - - **Content-Type**: multipart/form-data - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/samples/client/petstore/swift4/rxswiftLibrary/docs/ReadOnlyFirst.md b/samples/client/petstore/swift4/rxswiftLibrary/docs/ReadOnlyFirst.md deleted file mode 100644 index ed537b87598b..000000000000 --- a/samples/client/petstore/swift4/rxswiftLibrary/docs/ReadOnlyFirst.md +++ /dev/null @@ -1,11 +0,0 @@ -# ReadOnlyFirst - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**bar** | **String** | | [optional] [readonly] -**baz** | **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/swift4/rxswiftLibrary/docs/Return.md b/samples/client/petstore/swift4/rxswiftLibrary/docs/Return.md deleted file mode 100644 index 66d17c27c887..000000000000 --- a/samples/client/petstore/swift4/rxswiftLibrary/docs/Return.md +++ /dev/null @@ -1,10 +0,0 @@ -# Return - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**_return** | **Int** | | [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/swift4/rxswiftLibrary/docs/SpecialModelName.md b/samples/client/petstore/swift4/rxswiftLibrary/docs/SpecialModelName.md deleted file mode 100644 index 3ec27a38c2ac..000000000000 --- a/samples/client/petstore/swift4/rxswiftLibrary/docs/SpecialModelName.md +++ /dev/null @@ -1,10 +0,0 @@ -# SpecialModelName - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**specialPropertyName** | **Int64** | | [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/swift4/rxswiftLibrary/docs/StoreAPI.md b/samples/client/petstore/swift4/rxswiftLibrary/docs/StoreAPI.md deleted file mode 100644 index a648ce8859b8..000000000000 --- a/samples/client/petstore/swift4/rxswiftLibrary/docs/StoreAPI.md +++ /dev/null @@ -1,166 +0,0 @@ -# StoreAPI - -All URIs are relative to *http://petstore.swagger.io:80/v2* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**deleteOrder**](StoreAPI.md#deleteorder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID -[**getInventory**](StoreAPI.md#getinventory) | **GET** /store/inventory | Returns pet inventories by status -[**getOrderById**](StoreAPI.md#getorderbyid) | **GET** /store/order/{order_id} | Find purchase order by ID -[**placeOrder**](StoreAPI.md#placeorder) | **POST** /store/order | Place an order for a pet - - -# **deleteOrder** -```swift - open class func deleteOrder(orderId: String) -> Observable -``` - -Delete purchase order by ID - -For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let orderId = "orderId_example" // String | ID of the order that needs to be deleted - -// TODO RxSwift sample code not yet implemented. To contribute, please open a ticket via http://github.com/OpenAPITools/openapi-generator/issues/new -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **orderId** | **String** | ID of the order that needs to be deleted | - -### Return type - -Void (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) - -# **getInventory** -```swift - open class func getInventory() -> Observable<[String:Int]> -``` - -Returns pet inventories by status - -Returns a map of status codes to quantities - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - - -// TODO RxSwift sample code not yet implemented. To contribute, please open a ticket via http://github.com/OpenAPITools/openapi-generator/issues/new -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -**[String:Int]** - -### 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) - -# **getOrderById** -```swift - open class func getOrderById(orderId: Int64) -> Observable -``` - -Find purchase order by ID - -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let orderId = 987 // Int64 | ID of pet that needs to be fetched - -// TODO RxSwift sample code not yet implemented. To contribute, please open a ticket via http://github.com/OpenAPITools/openapi-generator/issues/new -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **orderId** | **Int64** | ID of pet that needs to be fetched | - -### Return type - -[**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) - -# **placeOrder** -```swift - open class func placeOrder(body: Order) -> Observable -``` - -Place an order for a pet - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let body = Order(id: 123, petId: 123, quantity: 123, shipDate: Date(), status: "status_example", complete: false) // Order | order placed for purchasing the pet - -// TODO RxSwift sample code not yet implemented. To contribute, please open a ticket via http://github.com/OpenAPITools/openapi-generator/issues/new -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Order**](Order.md) | order placed for purchasing the pet | - -### Return type - -[**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/swift4/rxswiftLibrary/docs/StringBooleanMap.md b/samples/client/petstore/swift4/rxswiftLibrary/docs/StringBooleanMap.md deleted file mode 100644 index 7abf11ec68b1..000000000000 --- a/samples/client/petstore/swift4/rxswiftLibrary/docs/StringBooleanMap.md +++ /dev/null @@ -1,9 +0,0 @@ -# StringBooleanMap - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/samples/client/petstore/swift4/rxswiftLibrary/docs/Tag.md b/samples/client/petstore/swift4/rxswiftLibrary/docs/Tag.md deleted file mode 100644 index ff4ac8aa4519..000000000000 --- a/samples/client/petstore/swift4/rxswiftLibrary/docs/Tag.md +++ /dev/null @@ -1,11 +0,0 @@ -# Tag - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Int64** | | [optional] -**name** | **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/swift4/rxswiftLibrary/docs/TypeHolderDefault.md b/samples/client/petstore/swift4/rxswiftLibrary/docs/TypeHolderDefault.md deleted file mode 100644 index 5161394bdc3e..000000000000 --- a/samples/client/petstore/swift4/rxswiftLibrary/docs/TypeHolderDefault.md +++ /dev/null @@ -1,14 +0,0 @@ -# TypeHolderDefault - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**stringItem** | **String** | | [default to "what"] -**numberItem** | **Double** | | -**integerItem** | **Int** | | -**boolItem** | **Bool** | | [default to true] -**arrayItem** | **[Int]** | | - -[[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/swift4/rxswiftLibrary/docs/TypeHolderExample.md b/samples/client/petstore/swift4/rxswiftLibrary/docs/TypeHolderExample.md deleted file mode 100644 index 46d0471cd71a..000000000000 --- a/samples/client/petstore/swift4/rxswiftLibrary/docs/TypeHolderExample.md +++ /dev/null @@ -1,14 +0,0 @@ -# TypeHolderExample - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**stringItem** | **String** | | -**numberItem** | **Double** | | -**integerItem** | **Int** | | -**boolItem** | **Bool** | | -**arrayItem** | **[Int]** | | - -[[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/swift4/rxswiftLibrary/docs/User.md b/samples/client/petstore/swift4/rxswiftLibrary/docs/User.md deleted file mode 100644 index 5a439de0ff95..000000000000 --- a/samples/client/petstore/swift4/rxswiftLibrary/docs/User.md +++ /dev/null @@ -1,17 +0,0 @@ -# User - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Int64** | | [optional] -**username** | **String** | | [optional] -**firstName** | **String** | | [optional] -**lastName** | **String** | | [optional] -**email** | **String** | | [optional] -**password** | **String** | | [optional] -**phone** | **String** | | [optional] -**userStatus** | **Int** | 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/swift4/rxswiftLibrary/docs/UserAPI.md b/samples/client/petstore/swift4/rxswiftLibrary/docs/UserAPI.md deleted file mode 100644 index a707c7085a37..000000000000 --- a/samples/client/petstore/swift4/rxswiftLibrary/docs/UserAPI.md +++ /dev/null @@ -1,326 +0,0 @@ -# UserAPI - -All URIs are relative to *http://petstore.swagger.io:80/v2* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**createUser**](UserAPI.md#createuser) | **POST** /user | Create user -[**createUsersWithArrayInput**](UserAPI.md#createuserswitharrayinput) | **POST** /user/createWithArray | Creates list of users with given input array -[**createUsersWithListInput**](UserAPI.md#createuserswithlistinput) | **POST** /user/createWithList | Creates list of users with given input array -[**deleteUser**](UserAPI.md#deleteuser) | **DELETE** /user/{username} | Delete user -[**getUserByName**](UserAPI.md#getuserbyname) | **GET** /user/{username} | Get user by user name -[**loginUser**](UserAPI.md#loginuser) | **GET** /user/login | Logs user into the system -[**logoutUser**](UserAPI.md#logoutuser) | **GET** /user/logout | Logs out current logged in user session -[**updateUser**](UserAPI.md#updateuser) | **PUT** /user/{username} | Updated user - - -# **createUser** -```swift - open class func createUser(body: User) -> Observable -``` - -Create user - -This can only be done by the logged in user. - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let body = User(id: 123, username: "username_example", firstName: "firstName_example", lastName: "lastName_example", email: "email_example", password: "password_example", phone: "phone_example", userStatus: 123) // User | Created user object - -// TODO RxSwift sample code not yet implemented. To contribute, please open a ticket via http://github.com/OpenAPITools/openapi-generator/issues/new -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**User**](User.md) | Created user object | - -### Return type - -Void (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) - -# **createUsersWithArrayInput** -```swift - open class func createUsersWithArrayInput(body: [User]) -> Observable -``` - -Creates list of users with given input array - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let body = [User(id: 123, username: "username_example", firstName: "firstName_example", lastName: "lastName_example", email: "email_example", password: "password_example", phone: "phone_example", userStatus: 123)] // [User] | List of user object - -// TODO RxSwift sample code not yet implemented. To contribute, please open a ticket via http://github.com/OpenAPITools/openapi-generator/issues/new -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**[User]**](User.md) | List of user object | - -### Return type - -Void (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) - -# **createUsersWithListInput** -```swift - open class func createUsersWithListInput(body: [User]) -> Observable -``` - -Creates list of users with given input array - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let body = [User(id: 123, username: "username_example", firstName: "firstName_example", lastName: "lastName_example", email: "email_example", password: "password_example", phone: "phone_example", userStatus: 123)] // [User] | List of user object - -// TODO RxSwift sample code not yet implemented. To contribute, please open a ticket via http://github.com/OpenAPITools/openapi-generator/issues/new -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**[User]**](User.md) | List of user object | - -### Return type - -Void (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) - -# **deleteUser** -```swift - open class func deleteUser(username: String) -> Observable -``` - -Delete user - -This can only be done by the logged in user. - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let username = "username_example" // String | The name that needs to be deleted - -// TODO RxSwift sample code not yet implemented. To contribute, please open a ticket via http://github.com/OpenAPITools/openapi-generator/issues/new -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **String** | The name that needs to be deleted | - -### Return type - -Void (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) - -# **getUserByName** -```swift - open class func getUserByName(username: String) -> Observable -``` - -Get user by user name - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let username = "username_example" // String | The name that needs to be fetched. Use user1 for testing. - -// TODO RxSwift sample code not yet implemented. To contribute, please open a ticket via http://github.com/OpenAPITools/openapi-generator/issues/new -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **String** | The name that needs to be fetched. Use user1 for testing. | - -### Return type - -[**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) - -# **loginUser** -```swift - open class func loginUser(username: String, password: String) -> Observable -``` - -Logs user into the system - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let username = "username_example" // String | The user name for login -let password = "password_example" // String | The password for login in clear text - -// TODO RxSwift sample code not yet implemented. To contribute, please open a ticket via http://github.com/OpenAPITools/openapi-generator/issues/new -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **String** | The user name for login | - **password** | **String** | The password for login in clear text | - -### 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) - -# **logoutUser** -```swift - open class func logoutUser() -> Observable -``` - -Logs out current logged in user session - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - - -// TODO RxSwift sample code not yet implemented. To contribute, please open a ticket via http://github.com/OpenAPITools/openapi-generator/issues/new -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -Void (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) - -# **updateUser** -```swift - open class func updateUser(username: String, body: User) -> Observable -``` - -Updated user - -This can only be done by the logged in user. - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let username = "username_example" // String | name that need to be deleted -let body = User(id: 123, username: "username_example", firstName: "firstName_example", lastName: "lastName_example", email: "email_example", password: "password_example", phone: "phone_example", userStatus: 123) // User | Updated user object - -// TODO RxSwift sample code not yet implemented. To contribute, please open a ticket via http://github.com/OpenAPITools/openapi-generator/issues/new -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **String** | name that need to be deleted | - **body** | [**User**](User.md) | Updated user object | - -### Return type - -Void (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/swift4/rxswiftLibrary/git_push.sh b/samples/client/petstore/swift4/rxswiftLibrary/git_push.sh deleted file mode 100644 index ced3be2b0c7b..000000000000 --- a/samples/client/petstore/swift4/rxswiftLibrary/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/swift4/rxswiftLibrary/pom.xml b/samples/client/petstore/swift4/rxswiftLibrary/pom.xml deleted file mode 100644 index 5caba9cb4633..000000000000 --- a/samples/client/petstore/swift4/rxswiftLibrary/pom.xml +++ /dev/null @@ -1,43 +0,0 @@ - - 4.0.0 - io.swagger - Swift4PetstoreClientTests - pom - 1.0-SNAPSHOT - Swift4 Swagger Petstore Client - - - - maven-dependency-plugin - - - package - - copy-dependencies - - - ${project.build.directory} - - - - - - org.codehaus.mojo - exec-maven-plugin - 1.2.1 - - - xcodebuild-test - integration-test - - exec - - - ./run_spmbuild.sh - - - - - - - diff --git a/samples/client/petstore/swift4/rxswiftLibrary/project.yml b/samples/client/petstore/swift4/rxswiftLibrary/project.yml deleted file mode 100644 index 3f2e1286ba54..000000000000 --- a/samples/client/petstore/swift4/rxswiftLibrary/project.yml +++ /dev/null @@ -1,16 +0,0 @@ -name: PetstoreClient -targets: - PetstoreClient: - type: framework - platform: iOS - deploymentTarget: "10.0" - sources: [PetstoreClient] - info: - path: ./Info.plist - version: 1.0.0 - settings: - APPLICATION_EXTENSION_API_ONLY: true - scheme: {} - dependencies: - - carthage: Alamofire - - carthage: RxSwift diff --git a/samples/client/petstore/swift4/rxswiftLibrary/run_spmbuild.sh b/samples/client/petstore/swift4/rxswiftLibrary/run_spmbuild.sh deleted file mode 100755 index 1a9f585ad054..000000000000 --- a/samples/client/petstore/swift4/rxswiftLibrary/run_spmbuild.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -swift build && exit ${PIPESTATUS[0]} diff --git a/samples/client/petstore/swift4/swift4_test_all.sh b/samples/client/petstore/swift4/swift4_test_all.sh deleted file mode 100755 index 68a2475c71bf..000000000000 --- a/samples/client/petstore/swift4/swift4_test_all.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/bash - -set -e - -DIRECTORY=`dirname $0` - -# example project with unit tests -mvn -f $DIRECTORY/default/SwaggerClientTests/pom.xml integration-test -mvn -f $DIRECTORY/promisekitLibrary/SwaggerClientTests/pom.xml integration-test -mvn -f $DIRECTORY/rxswiftLibrary/SwaggerClientTests/pom.xml integration-test - -# spm build -mvn -f $DIRECTORY/default/pom.xml integration-test -mvn -f $DIRECTORY/nonPublicApi/pom.xml integration-test -mvn -f $DIRECTORY/objcCompatible/pom.xml integration-test -mvn -f $DIRECTORY/promisekitLibrary/pom.xml integration-test -mvn -f $DIRECTORY/resultLibrary/pom.xml integration-test -mvn -f $DIRECTORY/rxswiftLibrary/pom.xml integration-test -mvn -f $DIRECTORY/unwrapRequired/pom.xml integration-test diff --git a/samples/client/petstore/swift4/unwrapRequired/.gitignore b/samples/client/petstore/swift4/unwrapRequired/.gitignore deleted file mode 100644 index 5e5d5cebcf47..000000000000 --- a/samples/client/petstore/swift4/unwrapRequired/.gitignore +++ /dev/null @@ -1,63 +0,0 @@ -# Xcode -# -# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore - -## Build generated -build/ -DerivedData - -## Various settings -*.pbxuser -!default.pbxuser -*.mode1v3 -!default.mode1v3 -*.mode2v3 -!default.mode2v3 -*.perspectivev3 -!default.perspectivev3 -xcuserdata - -## Other -*.xccheckout -*.moved-aside -*.xcuserstate -*.xcscmblueprint - -## Obj-C/Swift specific -*.hmap -*.ipa - -## Playgrounds -timeline.xctimeline -playground.xcworkspace - -# Swift Package Manager -# -# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. -# Packages/ -.build/ - -# CocoaPods -# -# We recommend against adding the Pods directory to your .gitignore. However -# you should judge for yourself, the pros and cons are mentioned at: -# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control -# -# Pods/ - -# Carthage -# -# Add this line if you want to avoid checking in source code from Carthage dependencies. -# Carthage/Checkouts - -Carthage/Build - -# fastlane -# -# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the -# screenshots whenever they are needed. -# For more information about the recommended setup visit: -# https://github.com/fastlane/fastlane/blob/master/docs/Gitignore.md - -fastlane/report.xml -fastlane/screenshots diff --git a/samples/client/petstore/swift4/unwrapRequired/.openapi-generator-ignore b/samples/client/petstore/swift4/unwrapRequired/.openapi-generator-ignore deleted file mode 100644 index 7484ee590a38..000000000000 --- a/samples/client/petstore/swift4/unwrapRequired/.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/swift4/unwrapRequired/.openapi-generator/VERSION b/samples/client/petstore/swift4/unwrapRequired/.openapi-generator/VERSION deleted file mode 100644 index b5d898602c2c..000000000000 --- a/samples/client/petstore/swift4/unwrapRequired/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -4.3.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/swift4/unwrapRequired/Cartfile b/samples/client/petstore/swift4/unwrapRequired/Cartfile deleted file mode 100644 index 86748c63d90d..000000000000 --- a/samples/client/petstore/swift4/unwrapRequired/Cartfile +++ /dev/null @@ -1 +0,0 @@ -github "Alamofire/Alamofire" ~> 4.9.0 diff --git a/samples/client/petstore/swift4/unwrapRequired/Info.plist b/samples/client/petstore/swift4/unwrapRequired/Info.plist deleted file mode 100644 index 323e5ecfc420..000000000000 --- a/samples/client/petstore/swift4/unwrapRequired/Info.plist +++ /dev/null @@ -1,22 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.0 - CFBundleVersion - 1 - - diff --git a/samples/client/petstore/swift4/unwrapRequired/Package.resolved b/samples/client/petstore/swift4/unwrapRequired/Package.resolved deleted file mode 100644 index ca6137050ebc..000000000000 --- a/samples/client/petstore/swift4/unwrapRequired/Package.resolved +++ /dev/null @@ -1,16 +0,0 @@ -{ - "object": { - "pins": [ - { - "package": "Alamofire", - "repositoryURL": "https://github.com/Alamofire/Alamofire.git", - "state": { - "branch": null, - "revision": "747c8db8d57b68d5e35275f10c92d55f982adbd4", - "version": "4.9.1" - } - } - ] - }, - "version": 1 -} diff --git a/samples/client/petstore/swift4/unwrapRequired/Package.swift b/samples/client/petstore/swift4/unwrapRequired/Package.swift deleted file mode 100644 index e5c5f0f33b82..000000000000 --- a/samples/client/petstore/swift4/unwrapRequired/Package.swift +++ /dev/null @@ -1,27 +0,0 @@ -// swift-tools-version:4.2 -// The swift-tools-version declares the minimum version of Swift required to build this package. - -import PackageDescription - -let package = Package( - name: "PetstoreClient", - products: [ - // Products define the executables and libraries produced by a package, and make them visible to other packages. - .library( - name: "PetstoreClient", - targets: ["PetstoreClient"]) - ], - dependencies: [ - // Dependencies declare other packages that this package depends on. - .package(url: "https://github.com/Alamofire/Alamofire.git", from: "4.9.0") - ], - targets: [ - // Targets are the basic building blocks of a package. A target can define a module or a test suite. - // Targets can depend on other targets in this package, and on products in packages which this package depends on. - .target( - name: "PetstoreClient", - dependencies: ["Alamofire"], - path: "PetstoreClient/Classes" - ) - ] -) diff --git a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient.podspec b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient.podspec deleted file mode 100644 index a6c9a1f3d45e..000000000000 --- a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient.podspec +++ /dev/null @@ -1,14 +0,0 @@ -Pod::Spec.new do |s| - s.name = 'PetstoreClient' - s.ios.deployment_target = '9.0' - s.osx.deployment_target = '10.11' - s.tvos.deployment_target = '9.0' - s.version = '1.0.0' - s.source = { :git => 'git@github.com:OpenAPITools/openapi-generator.git', :tag => 'v1.0.0' } - s.authors = '' - s.license = 'Proprietary' - s.homepage = 'https://github.com/openapitools/openapi-generator' - s.summary = 'PetstoreClient' - s.source_files = 'PetstoreClient/Classes/**/*.swift' - s.dependency 'Alamofire', '~> 4.9.0' -end diff --git a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient.xcodeproj/project.pbxproj b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient.xcodeproj/project.pbxproj deleted file mode 100644 index b606fe1ab100..000000000000 --- a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient.xcodeproj/project.pbxproj +++ /dev/null @@ -1,576 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 51; - objects = { - -/* Begin PBXBuildFile section */ - 0299339D13C3571C4C57368A /* ApiResponse.swift in Sources */ = {isa = PBXBuildFile; fileRef = A8E7B833748B4F0C7CDA90C6 /* ApiResponse.swift */; }; - 081C0B80A989B1AAF2665121 /* MapTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7986861626C2B1CB49AD7000 /* MapTest.swift */; }; - 0C1E4C682F2D0AF7D9E431EE /* Dog.swift in Sources */ = {isa = PBXBuildFile; fileRef = C6C3E1129526A353B963EFD7 /* Dog.swift */; }; - 0E6932F1C55BA6880693C478 /* Order.swift in Sources */ = {isa = PBXBuildFile; fileRef = 27B2E9EF856E89FEAA359A3A /* Order.swift */; }; - 1E6C7C7F271A802DF8099330 /* APIHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 897716962D472FE162B723CB /* APIHelper.swift */; }; - 22FA6CA58E58550DE36AE750 /* JSONEncodableEncoding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9791B840B8D6EAA35343B00F /* JSONEncodableEncoding.swift */; }; - 248F2F0F29E8FDAE9CAD64C5 /* AdditionalPropertiesClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 396DEF3156BA0D12D0FC5C3C /* AdditionalPropertiesClass.swift */; }; - 269E3103C458C78EA5726EE2 /* Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = B8C298FC8929DCB369053F11 /* Extensions.swift */; }; - 294CDFA409BC369C0FDC5FB3 /* SpecialModelName.swift in Sources */ = {isa = PBXBuildFile; fileRef = 386FD590658E90509C121118 /* SpecialModelName.swift */; }; - 2B441CDFFFDDB343C04F5375 /* Animal.swift in Sources */ = {isa = PBXBuildFile; fileRef = 95568E7C35F119EB4A12B498 /* Animal.swift */; }; - 2C29D5B60E00DDA3878F1BDE /* Pet.swift in Sources */ = {isa = PBXBuildFile; fileRef = ECFEB4C6C257B3BB3CEA36D1 /* Pet.swift */; }; - 31DFF71D8CCCA0D2D2F8AC90 /* User.swift in Sources */ = {isa = PBXBuildFile; fileRef = E5565A447062C7B8F695F451 /* User.swift */; }; - 34C26979F4678B5B579D26E8 /* FakeClassnameTags123API.swift in Sources */ = {isa = PBXBuildFile; fileRef = B42354B407EC173BEB54E042 /* FakeClassnameTags123API.swift */; }; - 3691B017D3AA18404A563C67 /* ArrayOfNumberOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = B65BB72353DA24536A9049BE /* ArrayOfNumberOnly.swift */; }; - 37DEADD6CD0496690725B8A7 /* Name.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5AD994DFAA0DA93C188A4DBA /* Name.swift */; }; - 40E3027D2E38D8329C6AB01F /* APIs.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37DF825B8F3BADA2B2537D17 /* APIs.swift */; }; - 40E46046D2B16D1A672A08E3 /* AlamofireImplementations.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84A201508DF2B697D65F2631 /* AlamofireImplementations.swift */; }; - 418DB36F23C53C6E2C3CDE39 /* Alamofire.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A235FA3FDFB086CC69CDE83D /* Alamofire.framework */; }; - 41A491E9B577C510F927D126 /* OuterEnum.swift in Sources */ = {isa = PBXBuildFile; fileRef = C15008AABC804EB6FB4CDAC6 /* OuterEnum.swift */; }; - 45B3B29D7A62049F824751F8 /* AnimalFarm.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8D22BE01748F51106DE02332 /* AnimalFarm.swift */; }; - 4A344DF7ECE721B4BBEDCB4A /* CatAllOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AD0F94F512DFBC09F9CC79A /* CatAllOf.swift */; }; - 4B4BE77747413A9188CDABD2 /* ArrayOfArrayOfNumberOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B1B8B838B5D9D312F2002EB /* ArrayOfArrayOfNumberOnly.swift */; }; - 555DEA47352B42E49082922B /* NumberOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = B8E0B16084741FCB82389F58 /* NumberOnly.swift */; }; - 5695497F5DBF6C08842755A3 /* TypeHolderDefault.swift in Sources */ = {isa = PBXBuildFile; fileRef = EBC76F6D4D2AA8084B7EB50E /* TypeHolderDefault.swift */; }; - 61322FC4325F1A4FF24ACA48 /* EnumArrays.swift in Sources */ = {isa = PBXBuildFile; fileRef = 10503995D9EFD031A2EFB576 /* EnumArrays.swift */; }; - 64C48E3658CF53EBE8AF82F9 /* UserAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7C8D5F382979854D47F18DB1 /* UserAPI.swift */; }; - 6B638A04B34C82B2091D6EDD /* FormatTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3156CE41C001C80379B84BDB /* FormatTest.swift */; }; - 6FBD978F4D1ED92E7071FFBB /* CodableHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 02A6F6BB2152ACEE1416D44A /* CodableHelper.swift */; }; - 72547ECFB451A509409311EE /* Configuration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 28A444949BBC254798C3B3DD /* Configuration.swift */; }; - 72CE544C52BB33778D1B89B8 /* DogAllOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = A21A69C8402A60E01116ABBD /* DogAllOf.swift */; }; - 7441BBA84C31E06400338F89 /* ClassModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3C30827D8EAF8EA684E7BCEA /* ClassModel.swift */; }; - 7588B7E2960253174ADCCF16 /* JSONEncodingHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 35D710108A69DD8A5297F926 /* JSONEncodingHelper.swift */; }; - 86DE714469BE8BA28AFF710F /* HasOnlyReadOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C7FBC641752D2E13B150973 /* HasOnlyReadOnly.swift */; }; - 914F4D1FCB17773C067C4E68 /* ReadOnlyFirst.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6FD42727E001E799E458C292 /* ReadOnlyFirst.swift */; }; - 922BDADAB291907A7FD14314 /* OuterComposite.swift in Sources */ = {isa = PBXBuildFile; fileRef = F4E0AD8F60A91F72C7687560 /* OuterComposite.swift */; }; - 97F7B85BF07A325EEBF92C93 /* File.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3933D3B2A3AC4577094D0C23 /* File.swift */; }; - 9CA19AA4483F6EB50270A81E /* List.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A6070F581E611FF44AFD40A /* List.swift */; }; - 9CF06ACDA32CB0C3E74E435C /* Model200Response.swift in Sources */ = {isa = PBXBuildFile; fileRef = 82A2C3DC2235F0114C2B08E5 /* Model200Response.swift */; }; - 9DA1C6F8B4D6C8595F28C098 /* EnumTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = FD60AEA646791E0EDE885DE1 /* EnumTest.swift */; }; - A6E50CC6845FE58D8C236253 /* Return.swift in Sources */ = {isa = PBXBuildFile; fileRef = C81447828475F76C5CF4F08A /* Return.swift */; }; - A6E5A5629495DB0ED672B06F /* PetAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A019F500E546A3292CE716A /* PetAPI.swift */; }; - A85E190556818FFA79896E92 /* ArrayTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = F1A0379CDFC55705AE76C998 /* ArrayTest.swift */; }; - ACF3037926301D4D6E848745 /* EnumClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B2C97AE6ACA1E5FB88F5BAA /* EnumClass.swift */; }; - AD594BFB99E31A5E07579237 /* Client.swift in Sources */ = {isa = PBXBuildFile; fileRef = A913A57E72D723632E9A718F /* Client.swift */; }; - B301DB1B80F37C757550AA17 /* MixedPropertiesAndAdditionalPropertiesClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9AD714C7CC59BDD18DE8DF4E /* MixedPropertiesAndAdditionalPropertiesClass.swift */; }; - B3E35FE2773D4A8BA15CFA88 /* Tag.swift in Sources */ = {isa = PBXBuildFile; fileRef = B2896F8BFD1AA2965C8A3015 /* Tag.swift */; }; - BB1F3C6D50B8F0A8CC4F1749 /* Capitalization.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7B38FA00A494D13F4C382A3 /* Capitalization.swift */; }; - CA9B9B19882EA044EAD0B359 /* AnotherFakeAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9DF24D2714B9C4CF14146E88 /* AnotherFakeAPI.swift */; }; - CB68ABDBAADAF6B8D7B93A5D /* StoreAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = A53274D99BBDE1B79BF3521C /* StoreAPI.swift */; }; - D3BAB7C7A607392CA838C580 /* Models.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8699F7966F748ED026A6FB4C /* Models.swift */; }; - D95A5F83AAA7D5C95A29AB83 /* Cat.swift in Sources */ = {isa = PBXBuildFile; fileRef = 212AA914B7F1793A4E32C119 /* Cat.swift */; }; - DDBD4C0FBA3CD6A4DA3DF376 /* FakeAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6E00950725DC44436C5E238C /* FakeAPI.swift */; }; - DDF1D589267D56D9BED3C6E5 /* FileSchemaTestClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B3666552AA854DAF9C480A3 /* FileSchemaTestClass.swift */; }; - E8A58C6414E88AF3EAE45B69 /* Category.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F2985D01F8D60A4B1925C69 /* Category.swift */; }; - EDFC6C5121A43997014049CB /* StringBooleanMap.swift in Sources */ = {isa = PBXBuildFile; fileRef = 47B4DEBABEFE140768CFB70B /* StringBooleanMap.swift */; }; - FECA2E8C9D0BDFEC459E8996 /* TypeHolderExample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19B65C66C97F082718DDD703 /* TypeHolderExample.swift */; }; -/* End PBXBuildFile section */ - -/* Begin PBXFileReference section */ - 02A6F6BB2152ACEE1416D44A /* CodableHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CodableHelper.swift; sourceTree = ""; }; - 10503995D9EFD031A2EFB576 /* EnumArrays.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EnumArrays.swift; sourceTree = ""; }; - 164AD6EC9C4CCF634D7C4590 /* PetstoreClient.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = PetstoreClient.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 19B65C66C97F082718DDD703 /* TypeHolderExample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TypeHolderExample.swift; sourceTree = ""; }; - 212AA914B7F1793A4E32C119 /* Cat.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Cat.swift; sourceTree = ""; }; - 27B2E9EF856E89FEAA359A3A /* Order.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Order.swift; sourceTree = ""; }; - 28A444949BBC254798C3B3DD /* Configuration.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Configuration.swift; sourceTree = ""; }; - 3156CE41C001C80379B84BDB /* FormatTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FormatTest.swift; sourceTree = ""; }; - 35D710108A69DD8A5297F926 /* JSONEncodingHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JSONEncodingHelper.swift; sourceTree = ""; }; - 37DF825B8F3BADA2B2537D17 /* APIs.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = APIs.swift; sourceTree = ""; }; - 386FD590658E90509C121118 /* SpecialModelName.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SpecialModelName.swift; sourceTree = ""; }; - 3933D3B2A3AC4577094D0C23 /* File.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = File.swift; sourceTree = ""; }; - 396DEF3156BA0D12D0FC5C3C /* AdditionalPropertiesClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdditionalPropertiesClass.swift; sourceTree = ""; }; - 3AD0F94F512DFBC09F9CC79A /* CatAllOf.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CatAllOf.swift; sourceTree = ""; }; - 3C30827D8EAF8EA684E7BCEA /* ClassModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ClassModel.swift; sourceTree = ""; }; - 47B4DEBABEFE140768CFB70B /* StringBooleanMap.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StringBooleanMap.swift; sourceTree = ""; }; - 4B2C97AE6ACA1E5FB88F5BAA /* EnumClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EnumClass.swift; sourceTree = ""; }; - 4B3666552AA854DAF9C480A3 /* FileSchemaTestClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FileSchemaTestClass.swift; sourceTree = ""; }; - 4C7FBC641752D2E13B150973 /* HasOnlyReadOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HasOnlyReadOnly.swift; sourceTree = ""; }; - 5AD994DFAA0DA93C188A4DBA /* Name.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Name.swift; sourceTree = ""; }; - 6E00950725DC44436C5E238C /* FakeAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FakeAPI.swift; sourceTree = ""; }; - 6F2985D01F8D60A4B1925C69 /* Category.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Category.swift; sourceTree = ""; }; - 6FD42727E001E799E458C292 /* ReadOnlyFirst.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReadOnlyFirst.swift; sourceTree = ""; }; - 7986861626C2B1CB49AD7000 /* MapTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MapTest.swift; sourceTree = ""; }; - 7A6070F581E611FF44AFD40A /* List.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = List.swift; sourceTree = ""; }; - 7B1B8B838B5D9D312F2002EB /* ArrayOfArrayOfNumberOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArrayOfArrayOfNumberOnly.swift; sourceTree = ""; }; - 7C8D5F382979854D47F18DB1 /* UserAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserAPI.swift; sourceTree = ""; }; - 82A2C3DC2235F0114C2B08E5 /* Model200Response.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Model200Response.swift; sourceTree = ""; }; - 84A201508DF2B697D65F2631 /* AlamofireImplementations.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlamofireImplementations.swift; sourceTree = ""; }; - 8699F7966F748ED026A6FB4C /* Models.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Models.swift; sourceTree = ""; }; - 897716962D472FE162B723CB /* APIHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = APIHelper.swift; sourceTree = ""; }; - 8D22BE01748F51106DE02332 /* AnimalFarm.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnimalFarm.swift; sourceTree = ""; }; - 95568E7C35F119EB4A12B498 /* Animal.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Animal.swift; sourceTree = ""; }; - 9791B840B8D6EAA35343B00F /* JSONEncodableEncoding.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JSONEncodableEncoding.swift; sourceTree = ""; }; - 9A019F500E546A3292CE716A /* PetAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PetAPI.swift; sourceTree = ""; }; - 9AD714C7CC59BDD18DE8DF4E /* MixedPropertiesAndAdditionalPropertiesClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MixedPropertiesAndAdditionalPropertiesClass.swift; sourceTree = ""; }; - 9DF24D2714B9C4CF14146E88 /* AnotherFakeAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnotherFakeAPI.swift; sourceTree = ""; }; - A21A69C8402A60E01116ABBD /* DogAllOf.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DogAllOf.swift; sourceTree = ""; }; - A235FA3FDFB086CC69CDE83D /* Alamofire.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Alamofire.framework; sourceTree = ""; }; - A53274D99BBDE1B79BF3521C /* StoreAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StoreAPI.swift; sourceTree = ""; }; - A7B38FA00A494D13F4C382A3 /* Capitalization.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Capitalization.swift; sourceTree = ""; }; - A8E7B833748B4F0C7CDA90C6 /* ApiResponse.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ApiResponse.swift; sourceTree = ""; }; - A913A57E72D723632E9A718F /* Client.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Client.swift; sourceTree = ""; }; - B2896F8BFD1AA2965C8A3015 /* Tag.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Tag.swift; sourceTree = ""; }; - B42354B407EC173BEB54E042 /* FakeClassnameTags123API.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FakeClassnameTags123API.swift; sourceTree = ""; }; - B65BB72353DA24536A9049BE /* ArrayOfNumberOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArrayOfNumberOnly.swift; sourceTree = ""; }; - B8C298FC8929DCB369053F11 /* Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Extensions.swift; sourceTree = ""; }; - B8E0B16084741FCB82389F58 /* NumberOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NumberOnly.swift; sourceTree = ""; }; - C15008AABC804EB6FB4CDAC6 /* OuterEnum.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OuterEnum.swift; sourceTree = ""; }; - C6C3E1129526A353B963EFD7 /* Dog.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Dog.swift; sourceTree = ""; }; - C81447828475F76C5CF4F08A /* Return.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Return.swift; sourceTree = ""; }; - E5565A447062C7B8F695F451 /* User.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = User.swift; sourceTree = ""; }; - EBC76F6D4D2AA8084B7EB50E /* TypeHolderDefault.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TypeHolderDefault.swift; sourceTree = ""; }; - ECFEB4C6C257B3BB3CEA36D1 /* Pet.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Pet.swift; sourceTree = ""; }; - F1A0379CDFC55705AE76C998 /* ArrayTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArrayTest.swift; sourceTree = ""; }; - F4E0AD8F60A91F72C7687560 /* OuterComposite.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OuterComposite.swift; sourceTree = ""; }; - FD60AEA646791E0EDE885DE1 /* EnumTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EnumTest.swift; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - D1990C2A394CCF025EF98A2F /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 418DB36F23C53C6E2C3CDE39 /* Alamofire.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 1E464C0937FE0D3A7A0FE29A /* Frameworks */ = { - isa = PBXGroup; - children = ( - 7861EE241895128F64DD7873 /* Carthage */, - ); - name = Frameworks; - sourceTree = ""; - }; - 4FBDCF1330A9AB9122780DB3 /* Models */ = { - isa = PBXGroup; - children = ( - 396DEF3156BA0D12D0FC5C3C /* AdditionalPropertiesClass.swift */, - 95568E7C35F119EB4A12B498 /* Animal.swift */, - 8D22BE01748F51106DE02332 /* AnimalFarm.swift */, - A8E7B833748B4F0C7CDA90C6 /* ApiResponse.swift */, - 7B1B8B838B5D9D312F2002EB /* ArrayOfArrayOfNumberOnly.swift */, - B65BB72353DA24536A9049BE /* ArrayOfNumberOnly.swift */, - F1A0379CDFC55705AE76C998 /* ArrayTest.swift */, - A7B38FA00A494D13F4C382A3 /* Capitalization.swift */, - 212AA914B7F1793A4E32C119 /* Cat.swift */, - 3AD0F94F512DFBC09F9CC79A /* CatAllOf.swift */, - 6F2985D01F8D60A4B1925C69 /* Category.swift */, - 3C30827D8EAF8EA684E7BCEA /* ClassModel.swift */, - A913A57E72D723632E9A718F /* Client.swift */, - C6C3E1129526A353B963EFD7 /* Dog.swift */, - A21A69C8402A60E01116ABBD /* DogAllOf.swift */, - 10503995D9EFD031A2EFB576 /* EnumArrays.swift */, - 4B2C97AE6ACA1E5FB88F5BAA /* EnumClass.swift */, - FD60AEA646791E0EDE885DE1 /* EnumTest.swift */, - 3933D3B2A3AC4577094D0C23 /* File.swift */, - 4B3666552AA854DAF9C480A3 /* FileSchemaTestClass.swift */, - 3156CE41C001C80379B84BDB /* FormatTest.swift */, - 4C7FBC641752D2E13B150973 /* HasOnlyReadOnly.swift */, - 7A6070F581E611FF44AFD40A /* List.swift */, - 7986861626C2B1CB49AD7000 /* MapTest.swift */, - 9AD714C7CC59BDD18DE8DF4E /* MixedPropertiesAndAdditionalPropertiesClass.swift */, - 82A2C3DC2235F0114C2B08E5 /* Model200Response.swift */, - 5AD994DFAA0DA93C188A4DBA /* Name.swift */, - B8E0B16084741FCB82389F58 /* NumberOnly.swift */, - 27B2E9EF856E89FEAA359A3A /* Order.swift */, - F4E0AD8F60A91F72C7687560 /* OuterComposite.swift */, - C15008AABC804EB6FB4CDAC6 /* OuterEnum.swift */, - ECFEB4C6C257B3BB3CEA36D1 /* Pet.swift */, - 6FD42727E001E799E458C292 /* ReadOnlyFirst.swift */, - C81447828475F76C5CF4F08A /* Return.swift */, - 386FD590658E90509C121118 /* SpecialModelName.swift */, - 47B4DEBABEFE140768CFB70B /* StringBooleanMap.swift */, - B2896F8BFD1AA2965C8A3015 /* Tag.swift */, - EBC76F6D4D2AA8084B7EB50E /* TypeHolderDefault.swift */, - 19B65C66C97F082718DDD703 /* TypeHolderExample.swift */, - E5565A447062C7B8F695F451 /* User.swift */, - ); - path = Models; - sourceTree = ""; - }; - 5FBA6AE5F64CD737F88B4565 = { - isa = PBXGroup; - children = ( - 9B364C01750D7AA4F983B9E7 /* PetstoreClient */, - 1E464C0937FE0D3A7A0FE29A /* Frameworks */, - 857F0DEA1890CE66D6DAD556 /* Products */, - ); - sourceTree = ""; - }; - 67BF3478113E6B4DF1C4E04F /* OpenAPIs */ = { - isa = PBXGroup; - children = ( - 84A201508DF2B697D65F2631 /* AlamofireImplementations.swift */, - 897716962D472FE162B723CB /* APIHelper.swift */, - 37DF825B8F3BADA2B2537D17 /* APIs.swift */, - 02A6F6BB2152ACEE1416D44A /* CodableHelper.swift */, - 28A444949BBC254798C3B3DD /* Configuration.swift */, - B8C298FC8929DCB369053F11 /* Extensions.swift */, - 9791B840B8D6EAA35343B00F /* JSONEncodableEncoding.swift */, - 35D710108A69DD8A5297F926 /* JSONEncodingHelper.swift */, - 8699F7966F748ED026A6FB4C /* Models.swift */, - F956D0CCAE23BCFD1C7BDD5D /* APIs */, - 4FBDCF1330A9AB9122780DB3 /* Models */, - ); - path = OpenAPIs; - sourceTree = ""; - }; - 7861EE241895128F64DD7873 /* Carthage */ = { - isa = PBXGroup; - children = ( - A012205B41CB71A62B86EECD /* iOS */, - ); - name = Carthage; - path = Carthage/Build; - sourceTree = ""; - }; - 857F0DEA1890CE66D6DAD556 /* Products */ = { - isa = PBXGroup; - children = ( - 164AD6EC9C4CCF634D7C4590 /* PetstoreClient.framework */, - ); - name = Products; - sourceTree = ""; - }; - 9B364C01750D7AA4F983B9E7 /* PetstoreClient */ = { - isa = PBXGroup; - children = ( - EF4C81BDD734856ED5023B77 /* Classes */, - ); - path = PetstoreClient; - sourceTree = ""; - }; - A012205B41CB71A62B86EECD /* iOS */ = { - isa = PBXGroup; - children = ( - A235FA3FDFB086CC69CDE83D /* Alamofire.framework */, - ); - path = iOS; - sourceTree = ""; - }; - EF4C81BDD734856ED5023B77 /* Classes */ = { - isa = PBXGroup; - children = ( - 67BF3478113E6B4DF1C4E04F /* OpenAPIs */, - ); - path = Classes; - sourceTree = ""; - }; - F956D0CCAE23BCFD1C7BDD5D /* APIs */ = { - isa = PBXGroup; - children = ( - 9DF24D2714B9C4CF14146E88 /* AnotherFakeAPI.swift */, - 6E00950725DC44436C5E238C /* FakeAPI.swift */, - B42354B407EC173BEB54E042 /* FakeClassnameTags123API.swift */, - 9A019F500E546A3292CE716A /* PetAPI.swift */, - A53274D99BBDE1B79BF3521C /* StoreAPI.swift */, - 7C8D5F382979854D47F18DB1 /* UserAPI.swift */, - ); - path = APIs; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - C1282C2230015E0D204BEAED /* PetstoreClient */ = { - isa = PBXNativeTarget; - buildConfigurationList = B46EDEB1A7F0D78FE6394544 /* Build configuration list for PBXNativeTarget "PetstoreClient" */; - buildPhases = ( - E539708354CE60FE486F81ED /* Sources */, - D1990C2A394CCF025EF98A2F /* Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = PetstoreClient; - productName = PetstoreClient; - productReference = 164AD6EC9C4CCF634D7C4590 /* PetstoreClient.framework */; - productType = "com.apple.product-type.framework"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - E7D276EE2369D8C455513C2E /* Project object */ = { - isa = PBXProject; - attributes = { - LastUpgradeCheck = 1020; - }; - buildConfigurationList = ECAB17FF35111B5E14DAAC08 /* Build configuration list for PBXProject "PetstoreClient" */; - compatibilityVersion = "Xcode 10.0"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - Base, - en, - ); - mainGroup = 5FBA6AE5F64CD737F88B4565; - projectDirPath = ""; - projectRoot = ""; - targets = ( - C1282C2230015E0D204BEAED /* PetstoreClient */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXSourcesBuildPhase section */ - E539708354CE60FE486F81ED /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 1E6C7C7F271A802DF8099330 /* APIHelper.swift in Sources */, - 40E3027D2E38D8329C6AB01F /* APIs.swift in Sources */, - 248F2F0F29E8FDAE9CAD64C5 /* AdditionalPropertiesClass.swift in Sources */, - 40E46046D2B16D1A672A08E3 /* AlamofireImplementations.swift in Sources */, - 2B441CDFFFDDB343C04F5375 /* Animal.swift in Sources */, - 45B3B29D7A62049F824751F8 /* AnimalFarm.swift in Sources */, - CA9B9B19882EA044EAD0B359 /* AnotherFakeAPI.swift in Sources */, - 0299339D13C3571C4C57368A /* ApiResponse.swift in Sources */, - 4B4BE77747413A9188CDABD2 /* ArrayOfArrayOfNumberOnly.swift in Sources */, - 3691B017D3AA18404A563C67 /* ArrayOfNumberOnly.swift in Sources */, - A85E190556818FFA79896E92 /* ArrayTest.swift in Sources */, - BB1F3C6D50B8F0A8CC4F1749 /* Capitalization.swift in Sources */, - D95A5F83AAA7D5C95A29AB83 /* Cat.swift in Sources */, - 4A344DF7ECE721B4BBEDCB4A /* CatAllOf.swift in Sources */, - E8A58C6414E88AF3EAE45B69 /* Category.swift in Sources */, - 7441BBA84C31E06400338F89 /* ClassModel.swift in Sources */, - AD594BFB99E31A5E07579237 /* Client.swift in Sources */, - 6FBD978F4D1ED92E7071FFBB /* CodableHelper.swift in Sources */, - 72547ECFB451A509409311EE /* Configuration.swift in Sources */, - 0C1E4C682F2D0AF7D9E431EE /* Dog.swift in Sources */, - 72CE544C52BB33778D1B89B8 /* DogAllOf.swift in Sources */, - 61322FC4325F1A4FF24ACA48 /* EnumArrays.swift in Sources */, - ACF3037926301D4D6E848745 /* EnumClass.swift in Sources */, - 9DA1C6F8B4D6C8595F28C098 /* EnumTest.swift in Sources */, - 269E3103C458C78EA5726EE2 /* Extensions.swift in Sources */, - DDBD4C0FBA3CD6A4DA3DF376 /* FakeAPI.swift in Sources */, - 34C26979F4678B5B579D26E8 /* FakeClassnameTags123API.swift in Sources */, - 97F7B85BF07A325EEBF92C93 /* File.swift in Sources */, - DDF1D589267D56D9BED3C6E5 /* FileSchemaTestClass.swift in Sources */, - 6B638A04B34C82B2091D6EDD /* FormatTest.swift in Sources */, - 86DE714469BE8BA28AFF710F /* HasOnlyReadOnly.swift in Sources */, - 22FA6CA58E58550DE36AE750 /* JSONEncodableEncoding.swift in Sources */, - 7588B7E2960253174ADCCF16 /* JSONEncodingHelper.swift in Sources */, - 9CA19AA4483F6EB50270A81E /* List.swift in Sources */, - 081C0B80A989B1AAF2665121 /* MapTest.swift in Sources */, - B301DB1B80F37C757550AA17 /* MixedPropertiesAndAdditionalPropertiesClass.swift in Sources */, - 9CF06ACDA32CB0C3E74E435C /* Model200Response.swift in Sources */, - D3BAB7C7A607392CA838C580 /* Models.swift in Sources */, - 37DEADD6CD0496690725B8A7 /* Name.swift in Sources */, - 555DEA47352B42E49082922B /* NumberOnly.swift in Sources */, - 0E6932F1C55BA6880693C478 /* Order.swift in Sources */, - 922BDADAB291907A7FD14314 /* OuterComposite.swift in Sources */, - 41A491E9B577C510F927D126 /* OuterEnum.swift in Sources */, - 2C29D5B60E00DDA3878F1BDE /* Pet.swift in Sources */, - A6E5A5629495DB0ED672B06F /* PetAPI.swift in Sources */, - 914F4D1FCB17773C067C4E68 /* ReadOnlyFirst.swift in Sources */, - A6E50CC6845FE58D8C236253 /* Return.swift in Sources */, - 294CDFA409BC369C0FDC5FB3 /* SpecialModelName.swift in Sources */, - CB68ABDBAADAF6B8D7B93A5D /* StoreAPI.swift in Sources */, - EDFC6C5121A43997014049CB /* StringBooleanMap.swift in Sources */, - B3E35FE2773D4A8BA15CFA88 /* Tag.swift in Sources */, - 5695497F5DBF6C08842755A3 /* TypeHolderDefault.swift in Sources */, - FECA2E8C9D0BDFEC459E8996 /* TypeHolderExample.swift in Sources */, - 31DFF71D8CCCA0D2D2F8AC90 /* User.swift in Sources */, - 64C48E3658CF53EBE8AF82F9 /* UserAPI.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin XCBuildConfiguration section */ - 3B2C02AFB91CB5C82766ED5C /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - APPLICATION_EXTENSION_API_ONLY = YES; - CODE_SIGN_IDENTITY = ""; - CURRENT_PROJECT_VERSION = 1; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Carthage/Build/iOS", - ); - INFOPLIST_FILE = Info.plist; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Release; - }; - A9EB0A02B94C427CBACFEC7C /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "$(inherited)", - "DEBUG=1", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = iphoneos; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 5.0; - }; - name = Debug; - }; - DD3EEB93949E9EBA4437E9CD /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - APPLICATION_EXTENSION_API_ONLY = YES; - CODE_SIGN_IDENTITY = ""; - CURRENT_PROJECT_VERSION = 1; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Carthage/Build/iOS", - ); - INFOPLIST_FILE = Info.plist; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Debug; - }; - F81D4E5FECD46E9AA6DD2C29 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = iphoneos; - SWIFT_COMPILATION_MODE = wholemodule; - SWIFT_VERSION = 5.0; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - B46EDEB1A7F0D78FE6394544 /* Build configuration list for PBXNativeTarget "PetstoreClient" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - DD3EEB93949E9EBA4437E9CD /* Debug */, - 3B2C02AFB91CB5C82766ED5C /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = ""; - }; - ECAB17FF35111B5E14DAAC08 /* Build configuration list for PBXProject "PetstoreClient" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - A9EB0A02B94C427CBACFEC7C /* Debug */, - F81D4E5FECD46E9AA6DD2C29 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Debug; - }; -/* End XCConfigurationList section */ - }; - rootObject = E7D276EE2369D8C455513C2E /* Project object */; -} diff --git a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 919434a6254f..000000000000 --- a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient.xcodeproj/xcshareddata/xcschemes/PetstoreClient.xcscheme b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient.xcodeproj/xcshareddata/xcschemes/PetstoreClient.xcscheme deleted file mode 100644 index 26d510552bb0..000000000000 --- a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient.xcodeproj/xcshareddata/xcschemes/PetstoreClient.xcscheme +++ /dev/null @@ -1,99 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/APIHelper.swift b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/APIHelper.swift deleted file mode 100644 index 200070096800..000000000000 --- a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/APIHelper.swift +++ /dev/null @@ -1,70 +0,0 @@ -// APIHelper.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct APIHelper { - public static func rejectNil(_ source: [String: Any?]) -> [String: Any]? { - let destination = source.reduce(into: [String: Any]()) { (result, item) in - if let value = item.value { - result[item.key] = value - } - } - - if destination.isEmpty { - return nil - } - return destination - } - - public static func rejectNilHeaders(_ source: [String: Any?]) -> [String: String] { - return source.reduce(into: [String: String]()) { (result, item) in - if let collection = item.value as? [Any?] { - result[item.key] = collection.filter({ $0 != nil }).map { "\($0!)" }.joined(separator: ",") - } else if let value: Any = item.value { - result[item.key] = "\(value)" - } - } - } - - public static func convertBoolToString(_ source: [String: Any]?) -> [String: Any]? { - guard let source = source else { - return nil - } - - return source.reduce(into: [String: Any](), { (result, item) in - switch item.value { - case let x as Bool: - result[item.key] = x.description - default: - result[item.key] = item.value - } - }) - } - - public static func mapValueToPathItem(_ source: Any) -> Any { - if let collection = source as? [Any?] { - return collection.filter({ $0 != nil }).map({"\($0!)"}).joined(separator: ",") - } - return source - } - - public static func mapValuesToQueryItems(_ source: [String: Any?]) -> [URLQueryItem]? { - let destination = source.filter({ $0.value != nil}).reduce(into: [URLQueryItem]()) { (result, item) in - if let collection = item.value as? [Any?] { - let value = collection.filter({ $0 != nil }).map({"\($0!)"}).joined(separator: ",") - result.append(URLQueryItem(name: item.key, value: value)) - } else if let value = item.value { - result.append(URLQueryItem(name: item.key, value: "\(value)")) - } - } - - if destination.isEmpty { - return nil - } - return destination - } -} diff --git a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/APIs.swift b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/APIs.swift deleted file mode 100644 index 832282d224f8..000000000000 --- a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/APIs.swift +++ /dev/null @@ -1,62 +0,0 @@ -// APIs.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -open class PetstoreClientAPI { - public static var basePath = "http://petstore.swagger.io:80/v2" - public static var credential: URLCredential? - public static var customHeaders: [String: String] = [:] - public static var requestBuilderFactory: RequestBuilderFactory = AlamofireRequestBuilderFactory() - public static var apiResponseQueue: DispatchQueue = .main -} - -open class RequestBuilder { - var credential: URLCredential? - var headers: [String: String] - public let parameters: [String: Any]? - public let isBody: Bool - public let method: String - public let URLString: String - - /// Optional block to obtain a reference to the request's progress instance when available. - public var onProgressReady: ((Progress) -> Void)? - - required public init(method: String, URLString: String, parameters: [String: Any]?, isBody: Bool, headers: [String: String] = [:]) { - self.method = method - self.URLString = URLString - self.parameters = parameters - self.isBody = isBody - self.headers = headers - - addHeaders(PetstoreClientAPI.customHeaders) - } - - open func addHeaders(_ aHeaders: [String: String]) { - for (header, value) in aHeaders { - headers[header] = value - } - } - - open func execute(_ completion: @escaping (_ response: Response?, _ error: Error?) -> Void) { } - - public func addHeader(name: String, value: String) -> Self { - if !value.isEmpty { - headers[name] = value - } - return self - } - - open func addCredential() -> Self { - self.credential = PetstoreClientAPI.credential - return self - } -} - -public protocol RequestBuilderFactory { - func getNonDecodableBuilder() -> RequestBuilder.Type - func getBuilder() -> RequestBuilder.Type -} diff --git a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift deleted file mode 100644 index 02e24286e3c8..000000000000 --- a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift +++ /dev/null @@ -1,42 +0,0 @@ -// -// AnotherFakeAPI.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -open class AnotherFakeAPI { - /** - To test special tags - - - parameter body: (body) client model - - parameter completion: completion handler to receive the data and the error objects - */ - open class func call123testSpecialTags(body: Client, completion: @escaping ((_ data: Client?, _ error: Error?) -> Void)) { - call123testSpecialTagsWithRequestBuilder(body: body).execute { (response, error) -> Void in - completion(response?.body, error) - } - } - - /** - To test special tags - - PATCH /another-fake/dummy - - To test special tags and operation ID starting with number - - parameter body: (body) client model - - returns: RequestBuilder - */ - open class func call123testSpecialTagsWithRequestBuilder(body: Client) -> RequestBuilder { - let path = "/another-fake/dummy" - let URLString = PetstoreClientAPI.basePath + path - let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "PATCH", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) - } - -} diff --git a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift deleted file mode 100644 index 8f5d7550f0c8..000000000000 --- a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift +++ /dev/null @@ -1,575 +0,0 @@ -// -// FakeAPI.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -open class FakeAPI { - /** - - - parameter body: (body) Input boolean as post body (optional) - - parameter completion: completion handler to receive the data and the error objects - */ - open class func fakeOuterBooleanSerialize(body: Bool? = nil, completion: @escaping ((_ data: Bool?, _ error: Error?) -> Void)) { - fakeOuterBooleanSerializeWithRequestBuilder(body: body).execute { (response, error) -> Void in - completion(response?.body, error) - } - } - - /** - - POST /fake/outer/boolean - - Test serialization of outer boolean types - - parameter body: (body) Input boolean as post body (optional) - - returns: RequestBuilder - */ - open class func fakeOuterBooleanSerializeWithRequestBuilder(body: Bool? = nil) -> RequestBuilder { - let path = "/fake/outer/boolean" - let URLString = PetstoreClientAPI.basePath + path - let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) - } - - /** - - - parameter body: (body) Input composite as post body (optional) - - parameter completion: completion handler to receive the data and the error objects - */ - open class func fakeOuterCompositeSerialize(body: OuterComposite? = nil, completion: @escaping ((_ data: OuterComposite?, _ error: Error?) -> Void)) { - fakeOuterCompositeSerializeWithRequestBuilder(body: body).execute { (response, error) -> Void in - completion(response?.body, error) - } - } - - /** - - POST /fake/outer/composite - - Test serialization of object with outer number type - - parameter body: (body) Input composite as post body (optional) - - returns: RequestBuilder - */ - open class func fakeOuterCompositeSerializeWithRequestBuilder(body: OuterComposite? = nil) -> RequestBuilder { - let path = "/fake/outer/composite" - let URLString = PetstoreClientAPI.basePath + path - let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) - } - - /** - - - parameter body: (body) Input number as post body (optional) - - parameter completion: completion handler to receive the data and the error objects - */ - open class func fakeOuterNumberSerialize(body: Double? = nil, completion: @escaping ((_ data: Double?, _ error: Error?) -> Void)) { - fakeOuterNumberSerializeWithRequestBuilder(body: body).execute { (response, error) -> Void in - completion(response?.body, error) - } - } - - /** - - POST /fake/outer/number - - Test serialization of outer number types - - parameter body: (body) Input number as post body (optional) - - returns: RequestBuilder - */ - open class func fakeOuterNumberSerializeWithRequestBuilder(body: Double? = nil) -> RequestBuilder { - let path = "/fake/outer/number" - let URLString = PetstoreClientAPI.basePath + path - let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) - } - - /** - - - parameter body: (body) Input string as post body (optional) - - parameter completion: completion handler to receive the data and the error objects - */ - open class func fakeOuterStringSerialize(body: String? = nil, completion: @escaping ((_ data: String?, _ error: Error?) -> Void)) { - fakeOuterStringSerializeWithRequestBuilder(body: body).execute { (response, error) -> Void in - completion(response?.body, error) - } - } - - /** - - POST /fake/outer/string - - Test serialization of outer string types - - parameter body: (body) Input string as post body (optional) - - returns: RequestBuilder - */ - open class func fakeOuterStringSerializeWithRequestBuilder(body: String? = nil) -> RequestBuilder { - let path = "/fake/outer/string" - let URLString = PetstoreClientAPI.basePath + path - let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) - } - - /** - - - parameter body: (body) - - parameter completion: completion handler to receive the data and the error objects - */ - open class func testBodyWithFileSchema(body: FileSchemaTestClass, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - testBodyWithFileSchemaWithRequestBuilder(body: body).execute { (_, error) -> Void in - if error == nil { - completion((), error) - } else { - completion(nil, error) - } - } - } - - /** - - PUT /fake/body-with-file-schema - - For this test, the body for this request much reference a schema named `File`. - - parameter body: (body) - - returns: RequestBuilder - */ - open class func testBodyWithFileSchemaWithRequestBuilder(body: FileSchemaTestClass) -> RequestBuilder { - let path = "/fake/body-with-file-schema" - let URLString = PetstoreClientAPI.basePath + path - let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) - } - - /** - - - parameter query: (query) - - parameter body: (body) - - parameter completion: completion handler to receive the data and the error objects - */ - open class func testBodyWithQueryParams(query: String, body: User, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - testBodyWithQueryParamsWithRequestBuilder(query: query, body: body).execute { (_, error) -> Void in - if error == nil { - completion((), error) - } else { - completion(nil, error) - } - } - } - - /** - - PUT /fake/body-with-query-params - - parameter query: (query) - - parameter body: (body) - - returns: RequestBuilder - */ - open class func testBodyWithQueryParamsWithRequestBuilder(query: String, body: User) -> RequestBuilder { - let path = "/fake/body-with-query-params" - let URLString = PetstoreClientAPI.basePath + path - let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) - - var url = URLComponents(string: URLString) - url?.queryItems = APIHelper.mapValuesToQueryItems([ - "query": query.encodeToJSON() - ]) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) - } - - /** - To test \"client\" model - - - parameter body: (body) client model - - parameter completion: completion handler to receive the data and the error objects - */ - open class func testClientModel(body: Client, completion: @escaping ((_ data: Client?, _ error: Error?) -> Void)) { - testClientModelWithRequestBuilder(body: body).execute { (response, error) -> Void in - completion(response?.body, error) - } - } - - /** - To test \"client\" model - - PATCH /fake - - To test \"client\" model - - parameter body: (body) client model - - returns: RequestBuilder - */ - open class func testClientModelWithRequestBuilder(body: Client) -> RequestBuilder { - let path = "/fake" - let URLString = PetstoreClientAPI.basePath + path - let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "PATCH", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) - } - - /** - Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - - - parameter number: (form) None - - parameter double: (form) None - - parameter patternWithoutDelimiter: (form) None - - parameter byte: (form) None - - parameter integer: (form) None (optional) - - parameter int32: (form) None (optional) - - parameter int64: (form) None (optional) - - parameter float: (form) None (optional) - - parameter string: (form) None (optional) - - parameter binary: (form) None (optional) - - parameter date: (form) None (optional) - - parameter dateTime: (form) None (optional) - - parameter password: (form) None (optional) - - parameter callback: (form) None (optional) - - parameter completion: completion handler to receive the data and the error objects - */ - open class func testEndpointParameters(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - testEndpointParametersWithRequestBuilder(number: number, double: double, patternWithoutDelimiter: patternWithoutDelimiter, byte: byte, integer: integer, int32: int32, int64: int64, float: float, string: string, binary: binary, date: date, dateTime: dateTime, password: password, callback: callback).execute { (_, error) -> Void in - if error == nil { - completion((), error) - } else { - completion(nil, error) - } - } - } - - /** - Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - - POST /fake - - Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - - BASIC: - - type: http - - name: http_basic_test - - parameter number: (form) None - - parameter double: (form) None - - parameter patternWithoutDelimiter: (form) None - - parameter byte: (form) None - - parameter integer: (form) None (optional) - - parameter int32: (form) None (optional) - - parameter int64: (form) None (optional) - - parameter float: (form) None (optional) - - parameter string: (form) None (optional) - - parameter binary: (form) None (optional) - - parameter date: (form) None (optional) - - parameter dateTime: (form) None (optional) - - parameter password: (form) None (optional) - - parameter callback: (form) None (optional) - - returns: RequestBuilder - */ - open class func testEndpointParametersWithRequestBuilder(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil) -> RequestBuilder { - let path = "/fake" - let URLString = PetstoreClientAPI.basePath + path - let formParams: [String: Any?] = [ - "integer": integer?.encodeToJSON(), - "int32": int32?.encodeToJSON(), - "int64": int64?.encodeToJSON(), - "number": number.encodeToJSON(), - "float": float?.encodeToJSON(), - "double": double.encodeToJSON(), - "string": string?.encodeToJSON(), - "pattern_without_delimiter": patternWithoutDelimiter.encodeToJSON(), - "byte": byte.encodeToJSON(), - "binary": binary?.encodeToJSON(), - "date": date?.encodeToJSON(), - "dateTime": dateTime?.encodeToJSON(), - "password": password?.encodeToJSON(), - "callback": callback?.encodeToJSON() - ] - - let nonNullParameters = APIHelper.rejectNil(formParams) - let parameters = APIHelper.convertBoolToString(nonNullParameters) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } - - /** - * enum for parameter enumHeaderStringArray - */ - public enum EnumHeaderStringArray_testEnumParameters: String { - case greaterThan = ">" - case dollar = "$" - } - - /** - * enum for parameter enumHeaderString - */ - public enum EnumHeaderString_testEnumParameters: String { - case abc = "_abc" - case efg = "-efg" - case xyz = "(xyz)" - } - - /** - * enum for parameter enumQueryStringArray - */ - public enum EnumQueryStringArray_testEnumParameters: String { - case greaterThan = ">" - case dollar = "$" - } - - /** - * enum for parameter enumQueryString - */ - public enum EnumQueryString_testEnumParameters: String { - case abc = "_abc" - case efg = "-efg" - case xyz = "(xyz)" - } - - /** - * enum for parameter enumQueryInteger - */ - public enum EnumQueryInteger_testEnumParameters: Int { - case _1 = 1 - case number2 = -2 - } - - /** - * enum for parameter enumQueryDouble - */ - public enum EnumQueryDouble_testEnumParameters: Double { - case _11 = 1.1 - case number12 = -1.2 - } - - /** - * enum for parameter enumFormStringArray - */ - public enum EnumFormStringArray_testEnumParameters: String { - case greaterThan = ">" - case dollar = "$" - } - - /** - * enum for parameter enumFormString - */ - public enum EnumFormString_testEnumParameters: String { - case abc = "_abc" - case efg = "-efg" - case xyz = "(xyz)" - } - - /** - To test enum parameters - - - parameter enumHeaderStringArray: (header) Header parameter enum test (string array) (optional) - - parameter enumHeaderString: (header) Header parameter enum test (string) (optional, default to .efg) - - parameter enumQueryStringArray: (query) Query parameter enum test (string array) (optional) - - parameter enumQueryString: (query) Query parameter enum test (string) (optional, default to .efg) - - parameter enumQueryInteger: (query) Query parameter enum test (double) (optional) - - parameter enumQueryDouble: (query) Query parameter enum test (double) (optional) - - parameter enumFormStringArray: (form) Form parameter enum test (string array) (optional, default to .dollar) - - parameter enumFormString: (form) Form parameter enum test (string) (optional, default to .efg) - - parameter completion: completion handler to receive the data and the error objects - */ - open class func testEnumParameters(enumHeaderStringArray: [String]? = nil, enumHeaderString: EnumHeaderString_testEnumParameters? = nil, enumQueryStringArray: [String]? = nil, enumQueryString: EnumQueryString_testEnumParameters? = nil, enumQueryInteger: EnumQueryInteger_testEnumParameters? = nil, enumQueryDouble: EnumQueryDouble_testEnumParameters? = nil, enumFormStringArray: [String]? = nil, enumFormString: EnumFormString_testEnumParameters? = nil, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - testEnumParametersWithRequestBuilder(enumHeaderStringArray: enumHeaderStringArray, enumHeaderString: enumHeaderString, enumQueryStringArray: enumQueryStringArray, enumQueryString: enumQueryString, enumQueryInteger: enumQueryInteger, enumQueryDouble: enumQueryDouble, enumFormStringArray: enumFormStringArray, enumFormString: enumFormString).execute { (_, error) -> Void in - if error == nil { - completion((), error) - } else { - completion(nil, error) - } - } - } - - /** - To test enum parameters - - GET /fake - - To test enum parameters - - parameter enumHeaderStringArray: (header) Header parameter enum test (string array) (optional) - - parameter enumHeaderString: (header) Header parameter enum test (string) (optional, default to .efg) - - parameter enumQueryStringArray: (query) Query parameter enum test (string array) (optional) - - parameter enumQueryString: (query) Query parameter enum test (string) (optional, default to .efg) - - parameter enumQueryInteger: (query) Query parameter enum test (double) (optional) - - parameter enumQueryDouble: (query) Query parameter enum test (double) (optional) - - parameter enumFormStringArray: (form) Form parameter enum test (string array) (optional, default to .dollar) - - parameter enumFormString: (form) Form parameter enum test (string) (optional, default to .efg) - - returns: RequestBuilder - */ - open class func testEnumParametersWithRequestBuilder(enumHeaderStringArray: [String]? = nil, enumHeaderString: EnumHeaderString_testEnumParameters? = nil, enumQueryStringArray: [String]? = nil, enumQueryString: EnumQueryString_testEnumParameters? = nil, enumQueryInteger: EnumQueryInteger_testEnumParameters? = nil, enumQueryDouble: EnumQueryDouble_testEnumParameters? = nil, enumFormStringArray: [String]? = nil, enumFormString: EnumFormString_testEnumParameters? = nil) -> RequestBuilder { - let path = "/fake" - let URLString = PetstoreClientAPI.basePath + path - let formParams: [String: Any?] = [ - "enum_form_string_array": enumFormStringArray?.encodeToJSON(), - "enum_form_string": enumFormString?.encodeToJSON() - ] - - let nonNullParameters = APIHelper.rejectNil(formParams) - let parameters = APIHelper.convertBoolToString(nonNullParameters) - - var url = URLComponents(string: URLString) - url?.queryItems = APIHelper.mapValuesToQueryItems([ - "enum_query_string_array": enumQueryStringArray?.encodeToJSON(), - "enum_query_string": enumQueryString?.encodeToJSON(), - "enum_query_integer": enumQueryInteger?.encodeToJSON(), - "enum_query_double": enumQueryDouble?.encodeToJSON() - ]) - let nillableHeaders: [String: Any?] = [ - "enum_header_string_array": enumHeaderStringArray?.encodeToJSON(), - "enum_header_string": enumHeaderString?.encodeToJSON() - ] - let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false, headers: headerParameters) - } - - /** - Fake endpoint to test group parameters (optional) - - - parameter requiredStringGroup: (query) Required String in group parameters - - parameter requiredBooleanGroup: (header) Required Boolean in group parameters - - parameter requiredInt64Group: (query) Required Integer in group parameters - - parameter stringGroup: (query) String in group parameters (optional) - - parameter booleanGroup: (header) Boolean in group parameters (optional) - - parameter int64Group: (query) Integer in group parameters (optional) - - parameter completion: completion handler to receive the data and the error objects - */ - open class func testGroupParameters(requiredStringGroup: Int, requiredBooleanGroup: Bool, requiredInt64Group: Int64, stringGroup: Int? = nil, booleanGroup: Bool? = nil, int64Group: Int64? = nil, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - testGroupParametersWithRequestBuilder(requiredStringGroup: requiredStringGroup, requiredBooleanGroup: requiredBooleanGroup, requiredInt64Group: requiredInt64Group, stringGroup: stringGroup, booleanGroup: booleanGroup, int64Group: int64Group).execute { (_, error) -> Void in - if error == nil { - completion((), error) - } else { - completion(nil, error) - } - } - } - - /** - Fake endpoint to test group parameters (optional) - - DELETE /fake - - Fake endpoint to test group parameters (optional) - - parameter requiredStringGroup: (query) Required String in group parameters - - parameter requiredBooleanGroup: (header) Required Boolean in group parameters - - parameter requiredInt64Group: (query) Required Integer in group parameters - - parameter stringGroup: (query) String in group parameters (optional) - - parameter booleanGroup: (header) Boolean in group parameters (optional) - - parameter int64Group: (query) Integer in group parameters (optional) - - returns: RequestBuilder - */ - open class func testGroupParametersWithRequestBuilder(requiredStringGroup: Int, requiredBooleanGroup: Bool, requiredInt64Group: Int64, stringGroup: Int? = nil, booleanGroup: Bool? = nil, int64Group: Int64? = nil) -> RequestBuilder { - let path = "/fake" - let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - - var url = URLComponents(string: URLString) - url?.queryItems = APIHelper.mapValuesToQueryItems([ - "required_string_group": requiredStringGroup.encodeToJSON(), - "required_int64_group": requiredInt64Group.encodeToJSON(), - "string_group": stringGroup?.encodeToJSON(), - "int64_group": int64Group?.encodeToJSON() - ]) - let nillableHeaders: [String: Any?] = [ - "required_boolean_group": requiredBooleanGroup.encodeToJSON(), - "boolean_group": booleanGroup?.encodeToJSON() - ] - let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false, headers: headerParameters) - } - - /** - test inline additionalProperties - - - parameter param: (body) request body - - parameter completion: completion handler to receive the data and the error objects - */ - open class func testInlineAdditionalProperties(param: [String: String], completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - testInlineAdditionalPropertiesWithRequestBuilder(param: param).execute { (_, error) -> Void in - if error == nil { - completion((), error) - } else { - completion(nil, error) - } - } - } - - /** - test inline additionalProperties - - POST /fake/inline-additionalProperties - - parameter param: (body) request body - - returns: RequestBuilder - */ - open class func testInlineAdditionalPropertiesWithRequestBuilder(param: [String: String]) -> RequestBuilder { - let path = "/fake/inline-additionalProperties" - let URLString = PetstoreClientAPI.basePath + path - let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: param) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) - } - - /** - test json serialization of form data - - - parameter param: (form) field1 - - parameter param2: (form) field2 - - parameter completion: completion handler to receive the data and the error objects - */ - open class func testJsonFormData(param: String, param2: String, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - testJsonFormDataWithRequestBuilder(param: param, param2: param2).execute { (_, error) -> Void in - if error == nil { - completion((), error) - } else { - completion(nil, error) - } - } - } - - /** - test json serialization of form data - - GET /fake/jsonFormData - - parameter param: (form) field1 - - parameter param2: (form) field2 - - returns: RequestBuilder - */ - open class func testJsonFormDataWithRequestBuilder(param: String, param2: String) -> RequestBuilder { - let path = "/fake/jsonFormData" - let URLString = PetstoreClientAPI.basePath + path - let formParams: [String: Any?] = [ - "param": param.encodeToJSON(), - "param2": param2.encodeToJSON() - ] - - let nonNullParameters = APIHelper.rejectNil(formParams) - let parameters = APIHelper.convertBoolToString(nonNullParameters) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } - -} diff --git a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift deleted file mode 100644 index 060d434fbf24..000000000000 --- a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift +++ /dev/null @@ -1,45 +0,0 @@ -// -// FakeClassnameTags123API.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -open class FakeClassnameTags123API { - /** - To test class name in snake case - - - parameter body: (body) client model - - parameter completion: completion handler to receive the data and the error objects - */ - open class func testClassname(body: Client, completion: @escaping ((_ data: Client?, _ error: Error?) -> Void)) { - testClassnameWithRequestBuilder(body: body).execute { (response, error) -> Void in - completion(response?.body, error) - } - } - - /** - To test class name in snake case - - PATCH /fake_classname_test - - To test class name in snake case - - API Key: - - type: apiKey api_key_query (QUERY) - - name: api_key_query - - parameter body: (body) client model - - returns: RequestBuilder - */ - open class func testClassnameWithRequestBuilder(body: Client) -> RequestBuilder { - let path = "/fake_classname_test" - let URLString = PetstoreClientAPI.basePath + path - let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "PATCH", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) - } - -} diff --git a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift deleted file mode 100644 index fe75962a72cf..000000000000 --- a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift +++ /dev/null @@ -1,393 +0,0 @@ -// -// PetAPI.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -open class PetAPI { - /** - Add a new pet to the store - - - parameter body: (body) Pet object that needs to be added to the store - - parameter completion: completion handler to receive the data and the error objects - */ - open class func addPet(body: Pet, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - addPetWithRequestBuilder(body: body).execute { (_, error) -> Void in - if error == nil { - completion((), error) - } else { - completion(nil, error) - } - } - } - - /** - Add a new pet to the store - - POST /pet - - OAuth: - - type: oauth2 - - name: petstore_auth - - parameter body: (body) Pet object that needs to be added to the store - - returns: RequestBuilder - */ - open class func addPetWithRequestBuilder(body: Pet) -> RequestBuilder { - let path = "/pet" - let URLString = PetstoreClientAPI.basePath + path - let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) - } - - /** - Deletes a pet - - - parameter petId: (path) Pet id to delete - - parameter apiKey: (header) (optional) - - parameter completion: completion handler to receive the data and the error objects - */ - open class func deletePet(petId: Int64, apiKey: String? = nil, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - deletePetWithRequestBuilder(petId: petId, apiKey: apiKey).execute { (_, error) -> Void in - if error == nil { - completion((), error) - } else { - completion(nil, error) - } - } - } - - /** - Deletes a pet - - DELETE /pet/{petId} - - OAuth: - - type: oauth2 - - name: petstore_auth - - parameter petId: (path) Pet id to delete - - parameter apiKey: (header) (optional) - - returns: RequestBuilder - */ - open class func deletePetWithRequestBuilder(petId: Int64, apiKey: String? = nil) -> RequestBuilder { - var path = "/pet/{petId}" - let petIdPreEscape = "\(APIHelper.mapValueToPathItem(petId))" - let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{petId}", with: petIdPostEscape, options: .literal, range: nil) - let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - - let url = URLComponents(string: URLString) - let nillableHeaders: [String: Any?] = [ - "api_key": apiKey?.encodeToJSON() - ] - let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false, headers: headerParameters) - } - - /** - * enum for parameter status - */ - public enum Status_findPetsByStatus: String { - case available = "available" - case pending = "pending" - case sold = "sold" - } - - /** - Finds Pets by status - - - parameter status: (query) Status values that need to be considered for filter - - parameter completion: completion handler to receive the data and the error objects - */ - open class func findPetsByStatus(status: [String], completion: @escaping ((_ data: [Pet]?, _ error: Error?) -> Void)) { - findPetsByStatusWithRequestBuilder(status: status).execute { (response, error) -> Void in - completion(response?.body, error) - } - } - - /** - Finds Pets by status - - GET /pet/findByStatus - - Multiple status values can be provided with comma separated strings - - OAuth: - - type: oauth2 - - name: petstore_auth - - parameter status: (query) Status values that need to be considered for filter - - returns: RequestBuilder<[Pet]> - */ - open class func findPetsByStatusWithRequestBuilder(status: [String]) -> RequestBuilder<[Pet]> { - let path = "/pet/findByStatus" - let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - - var url = URLComponents(string: URLString) - url?.queryItems = APIHelper.mapValuesToQueryItems([ - "status": status.encodeToJSON() - ]) - - let requestBuilder: RequestBuilder<[Pet]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } - - /** - Finds Pets by tags - - - parameter tags: (query) Tags to filter by - - parameter completion: completion handler to receive the data and the error objects - */ - open class func findPetsByTags(tags: [String], completion: @escaping ((_ data: [Pet]?, _ error: Error?) -> Void)) { - findPetsByTagsWithRequestBuilder(tags: tags).execute { (response, error) -> Void in - completion(response?.body, error) - } - } - - /** - Finds Pets by tags - - GET /pet/findByTags - - Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. - - OAuth: - - type: oauth2 - - name: petstore_auth - - parameter tags: (query) Tags to filter by - - returns: RequestBuilder<[Pet]> - */ - open class func findPetsByTagsWithRequestBuilder(tags: [String]) -> RequestBuilder<[Pet]> { - let path = "/pet/findByTags" - let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - - var url = URLComponents(string: URLString) - url?.queryItems = APIHelper.mapValuesToQueryItems([ - "tags": tags.encodeToJSON() - ]) - - let requestBuilder: RequestBuilder<[Pet]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } - - /** - Find pet by ID - - - parameter petId: (path) ID of pet to return - - parameter completion: completion handler to receive the data and the error objects - */ - open class func getPetById(petId: Int64, completion: @escaping ((_ data: Pet?, _ error: Error?) -> Void)) { - getPetByIdWithRequestBuilder(petId: petId).execute { (response, error) -> Void in - completion(response?.body, error) - } - } - - /** - Find pet by ID - - GET /pet/{petId} - - Returns a single pet - - API Key: - - type: apiKey api_key - - name: api_key - - parameter petId: (path) ID of pet to return - - returns: RequestBuilder - */ - open class func getPetByIdWithRequestBuilder(petId: Int64) -> RequestBuilder { - var path = "/pet/{petId}" - let petIdPreEscape = "\(APIHelper.mapValueToPathItem(petId))" - let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{petId}", with: petIdPostEscape, options: .literal, range: nil) - let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } - - /** - Update an existing pet - - - parameter body: (body) Pet object that needs to be added to the store - - parameter completion: completion handler to receive the data and the error objects - */ - open class func updatePet(body: Pet, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - updatePetWithRequestBuilder(body: body).execute { (_, error) -> Void in - if error == nil { - completion((), error) - } else { - completion(nil, error) - } - } - } - - /** - Update an existing pet - - PUT /pet - - OAuth: - - type: oauth2 - - name: petstore_auth - - parameter body: (body) Pet object that needs to be added to the store - - returns: RequestBuilder - */ - open class func updatePetWithRequestBuilder(body: Pet) -> RequestBuilder { - let path = "/pet" - let URLString = PetstoreClientAPI.basePath + path - let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) - } - - /** - Updates a pet in the store with form data - - - parameter petId: (path) ID of pet that needs to be updated - - parameter name: (form) Updated name of the pet (optional) - - parameter status: (form) Updated status of the pet (optional) - - parameter completion: completion handler to receive the data and the error objects - */ - open class func updatePetWithForm(petId: Int64, name: String? = nil, status: String? = nil, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - updatePetWithFormWithRequestBuilder(petId: petId, name: name, status: status).execute { (_, error) -> Void in - if error == nil { - completion((), error) - } else { - completion(nil, error) - } - } - } - - /** - Updates a pet in the store with form data - - POST /pet/{petId} - - OAuth: - - type: oauth2 - - name: petstore_auth - - parameter petId: (path) ID of pet that needs to be updated - - parameter name: (form) Updated name of the pet (optional) - - parameter status: (form) Updated status of the pet (optional) - - returns: RequestBuilder - */ - open class func updatePetWithFormWithRequestBuilder(petId: Int64, name: String? = nil, status: String? = nil) -> RequestBuilder { - var path = "/pet/{petId}" - let petIdPreEscape = "\(APIHelper.mapValueToPathItem(petId))" - let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{petId}", with: petIdPostEscape, options: .literal, range: nil) - let URLString = PetstoreClientAPI.basePath + path - let formParams: [String: Any?] = [ - "name": name?.encodeToJSON(), - "status": status?.encodeToJSON() - ] - - let nonNullParameters = APIHelper.rejectNil(formParams) - let parameters = APIHelper.convertBoolToString(nonNullParameters) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } - - /** - uploads an image - - - parameter petId: (path) ID of pet to update - - parameter additionalMetadata: (form) Additional data to pass to server (optional) - - parameter file: (form) file to upload (optional) - - parameter completion: completion handler to receive the data and the error objects - */ - open class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil, completion: @escaping ((_ data: ApiResponse?, _ error: Error?) -> Void)) { - uploadFileWithRequestBuilder(petId: petId, additionalMetadata: additionalMetadata, file: file).execute { (response, error) -> Void in - completion(response?.body, error) - } - } - - /** - uploads an image - - POST /pet/{petId}/uploadImage - - OAuth: - - type: oauth2 - - name: petstore_auth - - parameter petId: (path) ID of pet to update - - parameter additionalMetadata: (form) Additional data to pass to server (optional) - - parameter file: (form) file to upload (optional) - - returns: RequestBuilder - */ - open class func uploadFileWithRequestBuilder(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil) -> RequestBuilder { - var path = "/pet/{petId}/uploadImage" - let petIdPreEscape = "\(APIHelper.mapValueToPathItem(petId))" - let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{petId}", with: petIdPostEscape, options: .literal, range: nil) - let URLString = PetstoreClientAPI.basePath + path - let formParams: [String: Any?] = [ - "additionalMetadata": additionalMetadata?.encodeToJSON(), - "file": file?.encodeToJSON() - ] - - let nonNullParameters = APIHelper.rejectNil(formParams) - let parameters = APIHelper.convertBoolToString(nonNullParameters) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } - - /** - uploads an image (required) - - - parameter petId: (path) ID of pet to update - - parameter requiredFile: (form) file to upload - - parameter additionalMetadata: (form) Additional data to pass to server (optional) - - parameter completion: completion handler to receive the data and the error objects - */ - open class func uploadFileWithRequiredFile(petId: Int64, requiredFile: URL, additionalMetadata: String? = nil, completion: @escaping ((_ data: ApiResponse?, _ error: Error?) -> Void)) { - uploadFileWithRequiredFileWithRequestBuilder(petId: petId, requiredFile: requiredFile, additionalMetadata: additionalMetadata).execute { (response, error) -> Void in - completion(response?.body, error) - } - } - - /** - uploads an image (required) - - POST /fake/{petId}/uploadImageWithRequiredFile - - OAuth: - - type: oauth2 - - name: petstore_auth - - parameter petId: (path) ID of pet to update - - parameter requiredFile: (form) file to upload - - parameter additionalMetadata: (form) Additional data to pass to server (optional) - - returns: RequestBuilder - */ - open class func uploadFileWithRequiredFileWithRequestBuilder(petId: Int64, requiredFile: URL, additionalMetadata: String? = nil) -> RequestBuilder { - var path = "/fake/{petId}/uploadImageWithRequiredFile" - let petIdPreEscape = "\(APIHelper.mapValueToPathItem(petId))" - let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{petId}", with: petIdPostEscape, options: .literal, range: nil) - let URLString = PetstoreClientAPI.basePath + path - let formParams: [String: Any?] = [ - "additionalMetadata": additionalMetadata?.encodeToJSON(), - "requiredFile": requiredFile.encodeToJSON() - ] - - let nonNullParameters = APIHelper.rejectNil(formParams) - let parameters = APIHelper.convertBoolToString(nonNullParameters) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } - -} diff --git a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift deleted file mode 100644 index d5f627df52ac..000000000000 --- a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift +++ /dev/null @@ -1,145 +0,0 @@ -// -// StoreAPI.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -open class StoreAPI { - /** - Delete purchase order by ID - - - parameter orderId: (path) ID of the order that needs to be deleted - - parameter completion: completion handler to receive the data and the error objects - */ - open class func deleteOrder(orderId: String, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - deleteOrderWithRequestBuilder(orderId: orderId).execute { (_, error) -> Void in - if error == nil { - completion((), error) - } else { - completion(nil, error) - } - } - } - - /** - Delete purchase order by ID - - DELETE /store/order/{order_id} - - For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors - - parameter orderId: (path) ID of the order that needs to be deleted - - returns: RequestBuilder - */ - open class func deleteOrderWithRequestBuilder(orderId: String) -> RequestBuilder { - var path = "/store/order/{order_id}" - let orderIdPreEscape = "\(APIHelper.mapValueToPathItem(orderId))" - let orderIdPostEscape = orderIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{order_id}", with: orderIdPostEscape, options: .literal, range: nil) - let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } - - /** - Returns pet inventories by status - - - parameter completion: completion handler to receive the data and the error objects - */ - open class func getInventory(completion: @escaping ((_ data: [String: Int]?, _ error: Error?) -> Void)) { - getInventoryWithRequestBuilder().execute { (response, error) -> Void in - completion(response?.body, error) - } - } - - /** - Returns pet inventories by status - - GET /store/inventory - - Returns a map of status codes to quantities - - API Key: - - type: apiKey api_key - - name: api_key - - returns: RequestBuilder<[String:Int]> - */ - open class func getInventoryWithRequestBuilder() -> RequestBuilder<[String: Int]> { - let path = "/store/inventory" - let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder<[String: Int]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } - - /** - Find purchase order by ID - - - parameter orderId: (path) ID of pet that needs to be fetched - - parameter completion: completion handler to receive the data and the error objects - */ - open class func getOrderById(orderId: Int64, completion: @escaping ((_ data: Order?, _ error: Error?) -> Void)) { - getOrderByIdWithRequestBuilder(orderId: orderId).execute { (response, error) -> Void in - completion(response?.body, error) - } - } - - /** - Find purchase order by ID - - GET /store/order/{order_id} - - For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions - - parameter orderId: (path) ID of pet that needs to be fetched - - returns: RequestBuilder - */ - open class func getOrderByIdWithRequestBuilder(orderId: Int64) -> RequestBuilder { - var path = "/store/order/{order_id}" - let orderIdPreEscape = "\(APIHelper.mapValueToPathItem(orderId))" - let orderIdPostEscape = orderIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{order_id}", with: orderIdPostEscape, options: .literal, range: nil) - let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } - - /** - Place an order for a pet - - - parameter body: (body) order placed for purchasing the pet - - parameter completion: completion handler to receive the data and the error objects - */ - open class func placeOrder(body: Order, completion: @escaping ((_ data: Order?, _ error: Error?) -> Void)) { - placeOrderWithRequestBuilder(body: body).execute { (response, error) -> Void in - completion(response?.body, error) - } - } - - /** - Place an order for a pet - - POST /store/order - - parameter body: (body) order placed for purchasing the pet - - returns: RequestBuilder - */ - open class func placeOrderWithRequestBuilder(body: Order) -> RequestBuilder { - let path = "/store/order" - let URLString = PetstoreClientAPI.basePath + path - let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) - } - -} diff --git a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift deleted file mode 100644 index ef4f971a91e2..000000000000 --- a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift +++ /dev/null @@ -1,294 +0,0 @@ -// -// UserAPI.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -open class UserAPI { - /** - Create user - - - parameter body: (body) Created user object - - parameter completion: completion handler to receive the data and the error objects - */ - open class func createUser(body: User, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - createUserWithRequestBuilder(body: body).execute { (_, error) -> Void in - if error == nil { - completion((), error) - } else { - completion(nil, error) - } - } - } - - /** - Create user - - POST /user - - This can only be done by the logged in user. - - parameter body: (body) Created user object - - returns: RequestBuilder - */ - open class func createUserWithRequestBuilder(body: User) -> RequestBuilder { - let path = "/user" - let URLString = PetstoreClientAPI.basePath + path - let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) - } - - /** - Creates list of users with given input array - - - parameter body: (body) List of user object - - parameter completion: completion handler to receive the data and the error objects - */ - open class func createUsersWithArrayInput(body: [User], completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - createUsersWithArrayInputWithRequestBuilder(body: body).execute { (_, error) -> Void in - if error == nil { - completion((), error) - } else { - completion(nil, error) - } - } - } - - /** - Creates list of users with given input array - - POST /user/createWithArray - - parameter body: (body) List of user object - - returns: RequestBuilder - */ - open class func createUsersWithArrayInputWithRequestBuilder(body: [User]) -> RequestBuilder { - let path = "/user/createWithArray" - let URLString = PetstoreClientAPI.basePath + path - let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) - } - - /** - Creates list of users with given input array - - - parameter body: (body) List of user object - - parameter completion: completion handler to receive the data and the error objects - */ - open class func createUsersWithListInput(body: [User], completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - createUsersWithListInputWithRequestBuilder(body: body).execute { (_, error) -> Void in - if error == nil { - completion((), error) - } else { - completion(nil, error) - } - } - } - - /** - Creates list of users with given input array - - POST /user/createWithList - - parameter body: (body) List of user object - - returns: RequestBuilder - */ - open class func createUsersWithListInputWithRequestBuilder(body: [User]) -> RequestBuilder { - let path = "/user/createWithList" - let URLString = PetstoreClientAPI.basePath + path - let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) - } - - /** - Delete user - - - parameter username: (path) The name that needs to be deleted - - parameter completion: completion handler to receive the data and the error objects - */ - open class func deleteUser(username: String, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - deleteUserWithRequestBuilder(username: username).execute { (_, error) -> Void in - if error == nil { - completion((), error) - } else { - completion(nil, error) - } - } - } - - /** - Delete user - - DELETE /user/{username} - - This can only be done by the logged in user. - - parameter username: (path) The name that needs to be deleted - - returns: RequestBuilder - */ - open class func deleteUserWithRequestBuilder(username: String) -> RequestBuilder { - var path = "/user/{username}" - let usernamePreEscape = "\(APIHelper.mapValueToPathItem(username))" - let usernamePostEscape = usernamePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{username}", with: usernamePostEscape, options: .literal, range: nil) - let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } - - /** - Get user by user name - - - parameter username: (path) The name that needs to be fetched. Use user1 for testing. - - parameter completion: completion handler to receive the data and the error objects - */ - open class func getUserByName(username: String, completion: @escaping ((_ data: User?, _ error: Error?) -> Void)) { - getUserByNameWithRequestBuilder(username: username).execute { (response, error) -> Void in - completion(response?.body, error) - } - } - - /** - Get user by user name - - GET /user/{username} - - parameter username: (path) The name that needs to be fetched. Use user1 for testing. - - returns: RequestBuilder - */ - open class func getUserByNameWithRequestBuilder(username: String) -> RequestBuilder { - var path = "/user/{username}" - let usernamePreEscape = "\(APIHelper.mapValueToPathItem(username))" - let usernamePostEscape = usernamePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{username}", with: usernamePostEscape, options: .literal, range: nil) - let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } - - /** - Logs user into the system - - - parameter username: (query) The user name for login - - parameter password: (query) The password for login in clear text - - parameter completion: completion handler to receive the data and the error objects - */ - open class func loginUser(username: String, password: String, completion: @escaping ((_ data: String?, _ error: Error?) -> Void)) { - loginUserWithRequestBuilder(username: username, password: password).execute { (response, error) -> Void in - completion(response?.body, error) - } - } - - /** - Logs user into the system - - GET /user/login - - responseHeaders: [X-Rate-Limit(Int), X-Expires-After(Date)] - - parameter username: (query) The user name for login - - parameter password: (query) The password for login in clear text - - returns: RequestBuilder - */ - open class func loginUserWithRequestBuilder(username: String, password: String) -> RequestBuilder { - let path = "/user/login" - let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - - var url = URLComponents(string: URLString) - url?.queryItems = APIHelper.mapValuesToQueryItems([ - "username": username.encodeToJSON(), - "password": password.encodeToJSON() - ]) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } - - /** - Logs out current logged in user session - - - parameter completion: completion handler to receive the data and the error objects - */ - open class func logoutUser(completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - logoutUserWithRequestBuilder().execute { (_, error) -> Void in - if error == nil { - completion((), error) - } else { - completion(nil, error) - } - } - } - - /** - Logs out current logged in user session - - GET /user/logout - - returns: RequestBuilder - */ - open class func logoutUserWithRequestBuilder() -> RequestBuilder { - let path = "/user/logout" - let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } - - /** - Updated user - - - parameter username: (path) name that need to be deleted - - parameter body: (body) Updated user object - - parameter completion: completion handler to receive the data and the error objects - */ - open class func updateUser(username: String, body: User, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { - updateUserWithRequestBuilder(username: username, body: body).execute { (_, error) -> Void in - if error == nil { - completion((), error) - } else { - completion(nil, error) - } - } - } - - /** - Updated user - - PUT /user/{username} - - This can only be done by the logged in user. - - parameter username: (path) name that need to be deleted - - parameter body: (body) Updated user object - - returns: RequestBuilder - */ - open class func updateUserWithRequestBuilder(username: String, body: User) -> RequestBuilder { - var path = "/user/{username}" - let usernamePreEscape = "\(APIHelper.mapValueToPathItem(username))" - let usernamePostEscape = usernamePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" - path = path.replacingOccurrences(of: "{username}", with: usernamePostEscape, options: .literal, range: nil) - let URLString = PetstoreClientAPI.basePath + path - let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) - - let url = URLComponents(string: URLString) - - let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() - - return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) - } - -} diff --git a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/AlamofireImplementations.swift b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/AlamofireImplementations.swift deleted file mode 100644 index 1d54e695608b..000000000000 --- a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/AlamofireImplementations.swift +++ /dev/null @@ -1,450 +0,0 @@ -// AlamofireImplementations.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -import Alamofire - -class AlamofireRequestBuilderFactory: RequestBuilderFactory { - func getNonDecodableBuilder() -> RequestBuilder.Type { - return AlamofireRequestBuilder.self - } - - func getBuilder() -> RequestBuilder.Type { - return AlamofireDecodableRequestBuilder.self - } -} - -private struct SynchronizedDictionary { - - private var dictionary = [K: V]() - private let queue = DispatchQueue( - label: "SynchronizedDictionary", - qos: DispatchQoS.userInitiated, - attributes: [DispatchQueue.Attributes.concurrent], - autoreleaseFrequency: DispatchQueue.AutoreleaseFrequency.inherit, - target: nil - ) - - public subscript(key: K) -> V? { - get { - var value: V? - - queue.sync { - value = self.dictionary[key] - } - - return value - } - set { - queue.sync(flags: DispatchWorkItemFlags.barrier) { - self.dictionary[key] = newValue - } - } - } - } - -// Store manager to retain its reference -private var managerStore = SynchronizedDictionary() - -open class AlamofireRequestBuilder: RequestBuilder { - required public init(method: String, URLString: String, parameters: [String: Any]?, isBody: Bool, headers: [String: String] = [:]) { - super.init(method: method, URLString: URLString, parameters: parameters, isBody: isBody, headers: headers) - } - - /** - May be overridden by a subclass if you want to control the session - configuration. - */ - open func createSessionManager() -> Alamofire.SessionManager { - let configuration = URLSessionConfiguration.default - configuration.httpAdditionalHeaders = buildHeaders() - return Alamofire.SessionManager(configuration: configuration) - } - - /** - May be overridden by a subclass if you want to custom request constructor. - */ - open func createURLRequest() -> URLRequest? { - let encoding: ParameterEncoding = isBody ? JSONDataEncoding() : URLEncoding() - guard let originalRequest = try? URLRequest(url: URLString, method: HTTPMethod(rawValue: method)!, headers: buildHeaders()) else { return nil } - return try? encoding.encode(originalRequest, with: parameters) - } - - /** - May be overridden by a subclass if you want to control the Content-Type - that is given to an uploaded form part. - - Return nil to use the default behavior (inferring the Content-Type from - the file extension). Return the desired Content-Type otherwise. - */ - open func contentTypeForFormPart(fileURL: URL) -> String? { - return nil - } - - /** - May be overridden by a subclass if you want to control the request - configuration (e.g. to override the cache policy). - */ - open func makeRequest(manager: SessionManager, method: HTTPMethod, encoding: ParameterEncoding, headers: [String: String]) -> DataRequest { - return manager.request(URLString, method: method, parameters: parameters, encoding: encoding, headers: headers) - } - - override open func execute(_ completion: @escaping (_ response: Response?, _ error: Error?) -> Void) { - let managerId: String = UUID().uuidString - // Create a new manager for each request to customize its request header - let manager = createSessionManager() - managerStore[managerId] = manager - - let encoding: ParameterEncoding = isBody ? JSONDataEncoding() : URLEncoding() - - let xMethod = Alamofire.HTTPMethod(rawValue: method) - let fileKeys = parameters == nil ? [] : parameters!.filter { $1 is NSURL } - .map { $0.0 } - - if fileKeys.count > 0 { - manager.upload(multipartFormData: { mpForm in - for (k, v) in self.parameters! { - switch v { - case let fileURL as URL: - if let mimeType = self.contentTypeForFormPart(fileURL: fileURL) { - mpForm.append(fileURL, withName: k, fileName: fileURL.lastPathComponent, mimeType: mimeType) - } else { - mpForm.append(fileURL, withName: k) - } - case let string as String: - mpForm.append(string.data(using: String.Encoding.utf8)!, withName: k) - case let number as NSNumber: - mpForm.append(number.stringValue.data(using: String.Encoding.utf8)!, withName: k) - default: - fatalError("Unprocessable value \(v) with key \(k)") - } - } - }, to: URLString, method: xMethod!, headers: nil, encodingCompletion: { encodingResult in - switch encodingResult { - case .success(let upload, _, _): - if let onProgressReady = self.onProgressReady { - onProgressReady(upload.uploadProgress) - } - self.processRequest(request: upload, managerId, completion) - case .failure(let encodingError): - completion(nil, ErrorResponse.error(415, nil, encodingError)) - } - }) - } else { - let request = makeRequest(manager: manager, method: xMethod!, encoding: encoding, headers: headers) - if let onProgressReady = self.onProgressReady { - onProgressReady(request.progress) - } - processRequest(request: request, managerId, completion) - } - - } - - fileprivate func processRequest(request: DataRequest, _ managerId: String, _ completion: @escaping (_ response: Response?, _ error: Error?) -> Void) { - if let credential = self.credential { - request.authenticate(usingCredential: credential) - } - - let cleanupRequest = { - managerStore[managerId] = nil - } - - let validatedRequest = request.validate() - - switch T.self { - case is String.Type: - validatedRequest.responseString(queue: PetstoreClientAPI.apiResponseQueue, completionHandler: { (stringResponse) in - cleanupRequest() - - if stringResponse.result.isFailure { - completion( - nil, - ErrorResponse.error(stringResponse.response?.statusCode ?? 500, stringResponse.data, stringResponse.result.error!) - ) - return - } - - completion( - Response( - response: stringResponse.response!, - body: ((stringResponse.result.value ?? "") as! T) - ), - nil - ) - }) - case is URL.Type: - validatedRequest.responseData(queue: PetstoreClientAPI.apiResponseQueue, completionHandler: { (dataResponse) in - cleanupRequest() - - do { - - guard !dataResponse.result.isFailure else { - throw DownloadException.responseFailed - } - - guard let data = dataResponse.data else { - throw DownloadException.responseDataMissing - } - - guard let request = request.request else { - throw DownloadException.requestMissing - } - - let fileManager = FileManager.default - let urlRequest = try request.asURLRequest() - let documentsDirectory = fileManager.urls(for: .documentDirectory, in: .userDomainMask)[0] - let requestURL = try self.getURL(from: urlRequest) - - var requestPath = try self.getPath(from: requestURL) - - if let headerFileName = self.getFileName(fromContentDisposition: dataResponse.response?.allHeaderFields["Content-Disposition"] as? String) { - requestPath = requestPath.appending("/\(headerFileName)") - } - - let filePath = documentsDirectory.appendingPathComponent(requestPath) - let directoryPath = filePath.deletingLastPathComponent().path - - try fileManager.createDirectory(atPath: directoryPath, withIntermediateDirectories: true, attributes: nil) - try data.write(to: filePath, options: .atomic) - - completion( - Response( - response: dataResponse.response!, - body: (filePath as! T) - ), - nil - ) - - } catch let requestParserError as DownloadException { - completion(nil, ErrorResponse.error(400, dataResponse.data, requestParserError)) - } catch let error { - completion(nil, ErrorResponse.error(400, dataResponse.data, error)) - } - return - }) - case is Void.Type: - validatedRequest.responseData(queue: PetstoreClientAPI.apiResponseQueue, completionHandler: { (voidResponse) in - cleanupRequest() - - if voidResponse.result.isFailure { - completion( - nil, - ErrorResponse.error(voidResponse.response?.statusCode ?? 500, voidResponse.data, voidResponse.result.error!) - ) - return - } - - completion( - Response( - response: voidResponse.response!, - body: nil), - nil - ) - }) - default: - validatedRequest.responseData(queue: PetstoreClientAPI.apiResponseQueue, completionHandler: { (dataResponse) in - cleanupRequest() - - if dataResponse.result.isFailure { - completion( - nil, - ErrorResponse.error(dataResponse.response?.statusCode ?? 500, dataResponse.data, dataResponse.result.error!) - ) - return - } - - completion( - Response( - response: dataResponse.response!, - body: (dataResponse.data as! T) - ), - nil - ) - }) - } - } - - open func buildHeaders() -> [String: String] { - var httpHeaders = SessionManager.defaultHTTPHeaders - for (key, value) in self.headers { - httpHeaders[key] = value - } - return httpHeaders - } - - fileprivate func getFileName(fromContentDisposition contentDisposition: String?) -> String? { - - guard let contentDisposition = contentDisposition else { - return nil - } - - let items = contentDisposition.components(separatedBy: ";") - - var filename: String? - - for contentItem in items { - - let filenameKey = "filename=" - guard let range = contentItem.range(of: filenameKey) else { - break - } - - filename = contentItem - return filename? - .replacingCharacters(in: range, with: "") - .replacingOccurrences(of: "\"", with: "") - .trimmingCharacters(in: .whitespacesAndNewlines) - } - - return filename - - } - - fileprivate func getPath(from url: URL) throws -> String { - - guard var path = URLComponents(url: url, resolvingAgainstBaseURL: true)?.path else { - throw DownloadException.requestMissingPath - } - - if path.hasPrefix("/") { - path.remove(at: path.startIndex) - } - - return path - - } - - fileprivate func getURL(from urlRequest: URLRequest) throws -> URL { - - guard let url = urlRequest.url else { - throw DownloadException.requestMissingURL - } - - return url - } - -} - -private enum DownloadException: Error { - case responseDataMissing - case responseFailed - case requestMissing - case requestMissingPath - case requestMissingURL -} - -public enum AlamofireDecodableRequestBuilderError: Error { - case emptyDataResponse - case nilHTTPResponse - case jsonDecoding(DecodingError) - case generalError(Error) -} - -open class AlamofireDecodableRequestBuilder: AlamofireRequestBuilder { - - override fileprivate func processRequest(request: DataRequest, _ managerId: String, _ completion: @escaping (_ response: Response?, _ error: Error?) -> Void) { - if let credential = self.credential { - request.authenticate(usingCredential: credential) - } - - let cleanupRequest = { - managerStore[managerId] = nil - } - - let validatedRequest = request.validate() - - switch T.self { - case is String.Type: - validatedRequest.responseString(queue: PetstoreClientAPI.apiResponseQueue, completionHandler: { (stringResponse) in - cleanupRequest() - - if stringResponse.result.isFailure { - completion( - nil, - ErrorResponse.error(stringResponse.response?.statusCode ?? 500, stringResponse.data, stringResponse.result.error!) - ) - return - } - - completion( - Response( - response: stringResponse.response!, - body: ((stringResponse.result.value ?? "") as! T) - ), - nil - ) - }) - case is Void.Type: - validatedRequest.responseData(queue: PetstoreClientAPI.apiResponseQueue, completionHandler: { (voidResponse) in - cleanupRequest() - - if voidResponse.result.isFailure { - completion( - nil, - ErrorResponse.error(voidResponse.response?.statusCode ?? 500, voidResponse.data, voidResponse.result.error!) - ) - return - } - - completion( - Response( - response: voidResponse.response!, - body: nil), - nil - ) - }) - case is Data.Type: - validatedRequest.responseData(queue: PetstoreClientAPI.apiResponseQueue, completionHandler: { (dataResponse) in - cleanupRequest() - - if dataResponse.result.isFailure { - completion( - nil, - ErrorResponse.error(dataResponse.response?.statusCode ?? 500, dataResponse.data, dataResponse.result.error!) - ) - return - } - - completion( - Response( - response: dataResponse.response!, - body: (dataResponse.data as! T) - ), - nil - ) - }) - default: - validatedRequest.responseData(queue: PetstoreClientAPI.apiResponseQueue, completionHandler: { (dataResponse: DataResponse) in - cleanupRequest() - - guard dataResponse.result.isSuccess else { - completion(nil, ErrorResponse.error(dataResponse.response?.statusCode ?? 500, dataResponse.data, dataResponse.result.error!)) - return - } - - guard let data = dataResponse.data, !data.isEmpty else { - completion(nil, ErrorResponse.error(-1, nil, AlamofireDecodableRequestBuilderError.emptyDataResponse)) - return - } - - guard let httpResponse = dataResponse.response else { - completion(nil, ErrorResponse.error(-2, nil, AlamofireDecodableRequestBuilderError.nilHTTPResponse)) - return - } - - var responseObj: Response? - - let decodeResult: (decodableObj: T?, error: Error?) = CodableHelper.decode(T.self, from: data) - if decodeResult.error == nil { - responseObj = Response(response: httpResponse, body: decodeResult.decodableObj) - } - - completion(responseObj, decodeResult.error) - }) - } - } - -} diff --git a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/CodableHelper.swift b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/CodableHelper.swift deleted file mode 100644 index 27cf29c65600..000000000000 --- a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/CodableHelper.swift +++ /dev/null @@ -1,75 +0,0 @@ -// -// CodableHelper.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public typealias EncodeResult = (data: Data?, error: Error?) - -open class CodableHelper { - - private static var customDateFormatter: DateFormatter? - private static var defaultDateFormatter: DateFormatter = { - let dateFormatter = DateFormatter() - dateFormatter.calendar = Calendar(identifier: .iso8601) - dateFormatter.locale = Locale(identifier: "en_US_POSIX") - dateFormatter.timeZone = TimeZone(secondsFromGMT: 0) - dateFormatter.dateFormat = Configuration.dateFormat - return dateFormatter - }() - private static var customJSONDecoder: JSONDecoder? - private static var defaultJSONDecoder: JSONDecoder = { - let decoder = JSONDecoder() - decoder.dateDecodingStrategy = .formatted(CodableHelper.dateFormatter) - return decoder - }() - private static var customJSONEncoder: JSONEncoder? - private static var defaultJSONEncoder: JSONEncoder = { - let encoder = JSONEncoder() - encoder.dateEncodingStrategy = .formatted(CodableHelper.dateFormatter) - encoder.outputFormatting = .prettyPrinted - return encoder - }() - - public static var dateFormatter: DateFormatter { - get { return self.customDateFormatter ?? self.defaultDateFormatter } - set { self.customDateFormatter = newValue } - } - public static var jsonDecoder: JSONDecoder { - get { return self.customJSONDecoder ?? self.defaultJSONDecoder } - set { self.customJSONDecoder = newValue } - } - public static var jsonEncoder: JSONEncoder { - get { return self.customJSONEncoder ?? self.defaultJSONEncoder } - set { self.customJSONEncoder = newValue } - } - - open class func decode(_ type: T.Type, from data: Data) -> (decodableObj: T?, error: Error?) where T: Decodable { - var returnedDecodable: T? - var returnedError: Error? - - do { - returnedDecodable = try self.jsonDecoder.decode(type, from: data) - } catch { - returnedError = error - } - - return (returnedDecodable, returnedError) - } - - open class func encode(_ value: T) -> EncodeResult where T: Encodable { - var returnedData: Data? - var returnedError: Error? - - do { - returnedData = try self.jsonEncoder.encode(value) - } catch { - returnedError = error - } - - return (returnedData, returnedError) - } -} diff --git a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Configuration.swift b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Configuration.swift deleted file mode 100644 index e1ecb39726e7..000000000000 --- a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Configuration.swift +++ /dev/null @@ -1,15 +0,0 @@ -// Configuration.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -open class Configuration { - - // This value is used to configure the date formatter that is used to serialize dates into JSON format. - // You must set it prior to encoding any dates, and it will only be read once. - public static var dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSZZZZZ" - -} diff --git a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Extensions.swift b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Extensions.swift deleted file mode 100644 index 74fcfcf2ad49..000000000000 --- a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Extensions.swift +++ /dev/null @@ -1,173 +0,0 @@ -// Extensions.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -extension Bool: JSONEncodable { - func encodeToJSON() -> Any { return self as Any } -} - -extension Float: JSONEncodable { - func encodeToJSON() -> Any { return self as Any } -} - -extension Int: JSONEncodable { - func encodeToJSON() -> Any { return self as Any } -} - -extension Int32: JSONEncodable { - func encodeToJSON() -> Any { return NSNumber(value: self as Int32) } -} - -extension Int64: JSONEncodable { - func encodeToJSON() -> Any { return NSNumber(value: self as Int64) } -} - -extension Double: JSONEncodable { - func encodeToJSON() -> Any { return self as Any } -} - -extension String: JSONEncodable { - func encodeToJSON() -> Any { return self as Any } -} - -extension RawRepresentable where RawValue: JSONEncodable { - func encodeToJSON() -> Any { return self.rawValue as Any } -} - -private func encodeIfPossible(_ object: T) -> Any { - if let encodableObject = object as? JSONEncodable { - return encodableObject.encodeToJSON() - } else { - return object as Any - } -} - -extension Array: JSONEncodable { - func encodeToJSON() -> Any { - return self.map(encodeIfPossible) - } -} - -extension Dictionary: JSONEncodable { - func encodeToJSON() -> Any { - var dictionary = [AnyHashable: Any]() - for (key, value) in self { - dictionary[key] = encodeIfPossible(value) - } - return dictionary as Any - } -} - -extension Data: JSONEncodable { - func encodeToJSON() -> Any { - return self.base64EncodedString(options: Data.Base64EncodingOptions()) - } -} - -extension Date: JSONEncodable { - func encodeToJSON() -> Any { - return CodableHelper.dateFormatter.string(from: self) as Any - } -} - -extension URL: JSONEncodable { - func encodeToJSON() -> Any { - return self - } -} - -extension UUID: JSONEncodable { - func encodeToJSON() -> Any { - return self.uuidString - } -} - -extension String: CodingKey { - - public var stringValue: String { - return self - } - - public init?(stringValue: String) { - self.init(stringLiteral: stringValue) - } - - public var intValue: Int? { - return nil - } - - public init?(intValue: Int) { - return nil - } - -} - -extension KeyedEncodingContainerProtocol { - - public mutating func encodeArray(_ values: [T], forKey key: Self.Key) throws where T: Encodable { - var arrayContainer = nestedUnkeyedContainer(forKey: key) - try arrayContainer.encode(contentsOf: values) - } - - public mutating func encodeArrayIfPresent(_ values: [T]?, forKey key: Self.Key) throws where T: Encodable { - if let values = values { - try encodeArray(values, forKey: key) - } - } - - public mutating func encodeMap(_ pairs: [Self.Key: T]) throws where T: Encodable { - for (key, value) in pairs { - try encode(value, forKey: key) - } - } - - public mutating func encodeMapIfPresent(_ pairs: [Self.Key: T]?) throws where T: Encodable { - if let pairs = pairs { - try encodeMap(pairs) - } - } - -} - -extension KeyedDecodingContainerProtocol { - - public func decodeArray(_ type: T.Type, forKey key: Self.Key) throws -> [T] where T: Decodable { - var tmpArray = [T]() - - var nestedContainer = try nestedUnkeyedContainer(forKey: key) - while !nestedContainer.isAtEnd { - let arrayValue = try nestedContainer.decode(T.self) - tmpArray.append(arrayValue) - } - - return tmpArray - } - - public func decodeArrayIfPresent(_ type: T.Type, forKey key: Self.Key) throws -> [T]? where T: Decodable { - var tmpArray: [T]? - - if contains(key) { - tmpArray = try decodeArray(T.self, forKey: key) - } - - return tmpArray - } - - public func decodeMap(_ type: T.Type, excludedKeys: Set) throws -> [Self.Key: T] where T: Decodable { - var map: [Self.Key: T] = [:] - - for key in allKeys { - if !excludedKeys.contains(key) { - let value = try decode(T.self, forKey: key) - map[key] = value - } - } - - return map - } - -} diff --git a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/JSONEncodableEncoding.swift b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/JSONEncodableEncoding.swift deleted file mode 100644 index fb76bbed26f7..000000000000 --- a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/JSONEncodableEncoding.swift +++ /dev/null @@ -1,54 +0,0 @@ -// -// JSONDataEncoding.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -import Alamofire - -public struct JSONDataEncoding: ParameterEncoding { - - // MARK: Properties - - private static let jsonDataKey = "jsonData" - - // MARK: Encoding - - /// Creates a URL request by encoding parameters and applying them onto an existing request. - /// - /// - parameter urlRequest: The request to have parameters applied. - /// - parameter parameters: The parameters to apply. This should have a single key/value - /// pair with "jsonData" as the key and a Data object as the value. - /// - /// - throws: An `Error` if the encoding process encounters an error. - /// - /// - returns: The encoded request. - public func encode(_ urlRequest: URLRequestConvertible, with parameters: Parameters?) throws -> URLRequest { - var urlRequest = try urlRequest.asURLRequest() - - guard let jsonData = parameters?[JSONDataEncoding.jsonDataKey] as? Data, !jsonData.isEmpty else { - return urlRequest - } - - if urlRequest.value(forHTTPHeaderField: "Content-Type") == nil { - urlRequest.setValue("application/json", forHTTPHeaderField: "Content-Type") - } - - urlRequest.httpBody = jsonData - - return urlRequest - } - - public static func encodingParameters(jsonData: Data?) -> Parameters? { - var returnedParams: Parameters? - if let jsonData = jsonData, !jsonData.isEmpty { - var params = Parameters() - params[jsonDataKey] = jsonData - returnedParams = params - } - return returnedParams - } - -} diff --git a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift deleted file mode 100644 index 827bdec87782..000000000000 --- a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift +++ /dev/null @@ -1,43 +0,0 @@ -// -// JSONEncodingHelper.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -import Alamofire - -open class JSONEncodingHelper { - - open class func encodingParameters(forEncodableObject encodableObj: T?) -> Parameters? { - var params: Parameters? - - // Encode the Encodable object - if let encodableObj = encodableObj { - let encodeResult = CodableHelper.encode(encodableObj) - if encodeResult.error == nil { - params = JSONDataEncoding.encodingParameters(jsonData: encodeResult.data) - } - } - - return params - } - - open class func encodingParameters(forEncodableObject encodableObj: Any?) -> Parameters? { - var params: Parameters? - - if let encodableObj = encodableObj { - do { - let data = try JSONSerialization.data(withJSONObject: encodableObj, options: .prettyPrinted) - params = JSONDataEncoding.encodingParameters(jsonData: data) - } catch { - print(error) - return nil - } - } - - return params - } - -} diff --git a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models.swift b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models.swift deleted file mode 100644 index 25161165865e..000000000000 --- a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models.swift +++ /dev/null @@ -1,36 +0,0 @@ -// Models.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -protocol JSONEncodable { - func encodeToJSON() -> Any -} - -public enum ErrorResponse: Error { - case error(Int, Data?, Error) -} - -open class Response { - public let statusCode: Int - public let header: [String: String] - public let body: T? - - public init(statusCode: Int, header: [String: String], body: T?) { - self.statusCode = statusCode - self.header = header - self.body = body - } - - public convenience init(response: HTTPURLResponse, body: T?) { - let rawHeader = response.allHeaderFields - var header = [String: String]() - for case let (key, value) as (String, String) in rawHeader { - header[key] = value - } - self.init(statusCode: response.statusCode, header: header, body: body) - } -} diff --git a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift deleted file mode 100644 index 83a06951ccd6..000000000000 --- a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift +++ /dev/null @@ -1,25 +0,0 @@ -// -// AdditionalPropertiesClass.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct AdditionalPropertiesClass: Codable { - - public var mapString: [String: String]? - public var mapMapString: [String: [String: String]]? - - public init(mapString: [String: String]?, mapMapString: [String: [String: String]]?) { - self.mapString = mapString - self.mapMapString = mapMapString - } - - public enum CodingKeys: String, CodingKey { - case mapString = "map_string" - case mapMapString = "map_map_string" - } - -} diff --git a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift deleted file mode 100644 index 88eceebd2a2a..000000000000 --- a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift +++ /dev/null @@ -1,20 +0,0 @@ -// -// Animal.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct Animal: Codable { - - public var className: String? - public var color: String? = "red" - - public init(className: String?, color: String?) { - self.className = className - self.color = color - } - -} diff --git a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift deleted file mode 100644 index e09b0e9efdc8..000000000000 --- a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift +++ /dev/null @@ -1,10 +0,0 @@ -// -// AnimalFarm.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public typealias AnimalFarm = [Animal] diff --git a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift deleted file mode 100644 index ec270da89074..000000000000 --- a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift +++ /dev/null @@ -1,22 +0,0 @@ -// -// ApiResponse.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct ApiResponse: Codable { - - public var code: Int? - public var type: String? - public var message: String? - - public init(code: Int?, type: String?, message: String?) { - self.code = code - self.type = type - self.message = message - } - -} diff --git a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift deleted file mode 100644 index 3843287630b1..000000000000 --- a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift +++ /dev/null @@ -1,22 +0,0 @@ -// -// ArrayOfArrayOfNumberOnly.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct ArrayOfArrayOfNumberOnly: Codable { - - public var arrayArrayNumber: [[Double]]? - - public init(arrayArrayNumber: [[Double]]?) { - self.arrayArrayNumber = arrayArrayNumber - } - - public enum CodingKeys: String, CodingKey { - case arrayArrayNumber = "ArrayArrayNumber" - } - -} diff --git a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift deleted file mode 100644 index f8b198e81f50..000000000000 --- a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift +++ /dev/null @@ -1,22 +0,0 @@ -// -// ArrayOfNumberOnly.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct ArrayOfNumberOnly: Codable { - - public var arrayNumber: [Double]? - - public init(arrayNumber: [Double]?) { - self.arrayNumber = arrayNumber - } - - public enum CodingKeys: String, CodingKey { - case arrayNumber = "ArrayNumber" - } - -} diff --git a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift deleted file mode 100644 index 67f7f7e5151f..000000000000 --- a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift +++ /dev/null @@ -1,28 +0,0 @@ -// -// ArrayTest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct ArrayTest: Codable { - - public var arrayOfString: [String]? - public var arrayArrayOfInteger: [[Int64]]? - public var arrayArrayOfModel: [[ReadOnlyFirst]]? - - public init(arrayOfString: [String]?, arrayArrayOfInteger: [[Int64]]?, arrayArrayOfModel: [[ReadOnlyFirst]]?) { - self.arrayOfString = arrayOfString - self.arrayArrayOfInteger = arrayArrayOfInteger - self.arrayArrayOfModel = arrayArrayOfModel - } - - public enum CodingKeys: String, CodingKey { - case arrayOfString = "array_of_string" - case arrayArrayOfInteger = "array_array_of_integer" - case arrayArrayOfModel = "array_array_of_model" - } - -} diff --git a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift deleted file mode 100644 index d576b50b1c9c..000000000000 --- a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift +++ /dev/null @@ -1,38 +0,0 @@ -// -// Capitalization.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct Capitalization: Codable { - - public var smallCamel: String? - public var capitalCamel: String? - public var smallSnake: String? - public var capitalSnake: String? - public var sCAETHFlowPoints: String? - /** Name of the pet */ - public var ATT_NAME: String? - - public init(smallCamel: String?, capitalCamel: String?, smallSnake: String?, capitalSnake: String?, sCAETHFlowPoints: String?, ATT_NAME: String?) { - self.smallCamel = smallCamel - self.capitalCamel = capitalCamel - self.smallSnake = smallSnake - self.capitalSnake = capitalSnake - self.sCAETHFlowPoints = sCAETHFlowPoints - self.ATT_NAME = ATT_NAME - } - - public enum CodingKeys: String, CodingKey { - case smallCamel - case capitalCamel = "CapitalCamel" - case smallSnake = "small_Snake" - case capitalSnake = "Capital_Snake" - case sCAETHFlowPoints = "SCA_ETH_Flow_Points" - case ATT_NAME - } - -} diff --git a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift deleted file mode 100644 index d6133a3dd5ca..000000000000 --- a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift +++ /dev/null @@ -1,22 +0,0 @@ -// -// Cat.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct Cat: Codable { - - public var className: String? - public var color: String? = "red" - public var declawed: Bool? - - public init(className: String?, color: String?, declawed: Bool?) { - self.className = className - self.color = color - self.declawed = declawed - } - -} diff --git a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift deleted file mode 100644 index a51ad0dffab1..000000000000 --- a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift +++ /dev/null @@ -1,18 +0,0 @@ -// -// CatAllOf.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct CatAllOf: Codable { - - public var declawed: Bool? - - public init(declawed: Bool?) { - self.declawed = declawed - } - -} diff --git a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/Category.swift b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/Category.swift deleted file mode 100644 index 48b43fc318df..000000000000 --- a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/Category.swift +++ /dev/null @@ -1,20 +0,0 @@ -// -// Category.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct Category: Codable { - - public var id: Int64? - public var name: String? = "default-name" - - public init(id: Int64?, name: String?) { - self.id = id - self.name = name - } - -} diff --git a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift deleted file mode 100644 index e2a7d4427a06..000000000000 --- a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift +++ /dev/null @@ -1,19 +0,0 @@ -// -// ClassModel.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -/** Model for testing model with \"_class\" property */ -public struct ClassModel: Codable { - - public var _class: String? - - public init(_class: String?) { - self._class = _class - } - -} diff --git a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/Client.swift b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/Client.swift deleted file mode 100644 index 00245ca37280..000000000000 --- a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/Client.swift +++ /dev/null @@ -1,18 +0,0 @@ -// -// Client.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct Client: Codable { - - public var client: String? - - public init(client: String?) { - self.client = client - } - -} diff --git a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift deleted file mode 100644 index 35c8cea0dd04..000000000000 --- a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift +++ /dev/null @@ -1,22 +0,0 @@ -// -// Dog.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct Dog: Codable { - - public var className: String? - public var color: String? = "red" - public var breed: String? - - public init(className: String?, color: String?, breed: String?) { - self.className = className - self.color = color - self.breed = breed - } - -} diff --git a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift deleted file mode 100644 index 7786f8acc5ae..000000000000 --- a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift +++ /dev/null @@ -1,18 +0,0 @@ -// -// DogAllOf.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct DogAllOf: Codable { - - public var breed: String? - - public init(breed: String?) { - self.breed = breed - } - -} diff --git a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift deleted file mode 100644 index 5034ff0b8c68..000000000000 --- a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift +++ /dev/null @@ -1,33 +0,0 @@ -// -// EnumArrays.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct EnumArrays: Codable { - - public enum JustSymbol: String, Codable { - case greaterThanOrEqualTo = ">=" - case dollar = "$" - } - public enum ArrayEnum: String, Codable { - case fish = "fish" - case crab = "crab" - } - public var justSymbol: JustSymbol? - public var arrayEnum: [ArrayEnum]? - - public init(justSymbol: JustSymbol?, arrayEnum: [ArrayEnum]?) { - self.justSymbol = justSymbol - self.arrayEnum = arrayEnum - } - - public enum CodingKeys: String, CodingKey { - case justSymbol = "just_symbol" - case arrayEnum = "array_enum" - } - -} diff --git a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift deleted file mode 100644 index 3c1dfcac577d..000000000000 --- a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift +++ /dev/null @@ -1,14 +0,0 @@ -// -// EnumClass.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public enum EnumClass: String, Codable { - case abc = "_abc" - case efg = "-efg" - case xyz = "(xyz)" -} diff --git a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift deleted file mode 100644 index b1eb8e98f89a..000000000000 --- a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift +++ /dev/null @@ -1,52 +0,0 @@ -// -// EnumTest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct EnumTest: Codable { - - public enum EnumString: String, Codable { - case upper = "UPPER" - case lower = "lower" - case empty = "" - } - public enum EnumStringRequired: String, Codable { - case upper = "UPPER" - case lower = "lower" - case empty = "" - } - public enum EnumInteger: Int, Codable { - case _1 = 1 - case number1 = -1 - } - public enum EnumNumber: Double, Codable { - case _11 = 1.1 - case number12 = -1.2 - } - public var enumString: EnumString? - public var enumStringRequired: EnumStringRequired? - public var enumInteger: EnumInteger? - public var enumNumber: EnumNumber? - public var outerEnum: OuterEnum? - - public init(enumString: EnumString?, enumStringRequired: EnumStringRequired?, enumInteger: EnumInteger?, enumNumber: EnumNumber?, outerEnum: OuterEnum?) { - self.enumString = enumString - self.enumStringRequired = enumStringRequired - self.enumInteger = enumInteger - self.enumNumber = enumNumber - self.outerEnum = outerEnum - } - - public enum CodingKeys: String, CodingKey { - case enumString = "enum_string" - case enumStringRequired = "enum_string_required" - case enumInteger = "enum_integer" - case enumNumber = "enum_number" - case outerEnum - } - -} diff --git a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/File.swift b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/File.swift deleted file mode 100644 index abf3ccffc485..000000000000 --- a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/File.swift +++ /dev/null @@ -1,20 +0,0 @@ -// -// File.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -/** Must be named `File` for test. */ -public struct File: Codable { - - /** Test capitalization */ - public var sourceURI: String? - - public init(sourceURI: String?) { - self.sourceURI = sourceURI - } - -} diff --git a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift deleted file mode 100644 index 532f1457939a..000000000000 --- a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift +++ /dev/null @@ -1,20 +0,0 @@ -// -// FileSchemaTestClass.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct FileSchemaTestClass: Codable { - - public var file: File? - public var files: [File]? - - public init(file: File?, files: [File]?) { - self.file = file - self.files = files - } - -} diff --git a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift deleted file mode 100644 index 4eed10b95a11..000000000000 --- a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift +++ /dev/null @@ -1,42 +0,0 @@ -// -// FormatTest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct FormatTest: Codable { - - public var integer: Int? - public var int32: Int? - public var int64: Int64? - public var number: Double? - public var float: Float? - public var double: Double? - public var string: String? - public var byte: Data? - public var binary: URL? - public var date: Date? - public var dateTime: Date? - public var uuid: UUID? - public var password: String? - - public init(integer: Int?, int32: Int?, int64: Int64?, number: Double?, float: Float?, double: Double?, string: String?, byte: Data?, binary: URL?, date: Date?, dateTime: Date?, uuid: UUID?, password: String?) { - self.integer = integer - self.int32 = int32 - self.int64 = int64 - self.number = number - self.float = float - self.double = double - self.string = string - self.byte = byte - self.binary = binary - self.date = date - self.dateTime = dateTime - self.uuid = uuid - self.password = password - } - -} diff --git a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift deleted file mode 100644 index 906ddb06fb17..000000000000 --- a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift +++ /dev/null @@ -1,20 +0,0 @@ -// -// HasOnlyReadOnly.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct HasOnlyReadOnly: Codable { - - public var bar: String? - public var foo: String? - - public init(bar: String?, foo: String?) { - self.bar = bar - self.foo = foo - } - -} diff --git a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/List.swift b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/List.swift deleted file mode 100644 index 08d59953873e..000000000000 --- a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/List.swift +++ /dev/null @@ -1,22 +0,0 @@ -// -// List.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct List: Codable { - - public var _123list: String? - - public init(_123list: String?) { - self._123list = _123list - } - - public enum CodingKeys: String, CodingKey { - case _123list = "123-list" - } - -} diff --git a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift deleted file mode 100644 index 3a10a7dfcaf6..000000000000 --- a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift +++ /dev/null @@ -1,35 +0,0 @@ -// -// MapTest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct MapTest: Codable { - - public enum MapOfEnumString: String, Codable { - case upper = "UPPER" - case lower = "lower" - } - public var mapMapOfString: [String: [String: String]]? - public var mapOfEnumString: [String: String]? - public var directMap: [String: Bool]? - public var indirectMap: StringBooleanMap? - - public init(mapMapOfString: [String: [String: String]]?, mapOfEnumString: [String: String]?, directMap: [String: Bool]?, indirectMap: StringBooleanMap?) { - self.mapMapOfString = mapMapOfString - self.mapOfEnumString = mapOfEnumString - self.directMap = directMap - self.indirectMap = indirectMap - } - - public enum CodingKeys: String, CodingKey { - case mapMapOfString = "map_map_of_string" - case mapOfEnumString = "map_of_enum_string" - case directMap = "direct_map" - case indirectMap = "indirect_map" - } - -} diff --git a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift deleted file mode 100644 index c3deb2f28932..000000000000 --- a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift +++ /dev/null @@ -1,22 +0,0 @@ -// -// MixedPropertiesAndAdditionalPropertiesClass.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct MixedPropertiesAndAdditionalPropertiesClass: Codable { - - public var uuid: UUID? - public var dateTime: Date? - public var map: [String: Animal]? - - public init(uuid: UUID?, dateTime: Date?, map: [String: Animal]?) { - self.uuid = uuid - self.dateTime = dateTime - self.map = map - } - -} diff --git a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift deleted file mode 100644 index 78917d75b44d..000000000000 --- a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift +++ /dev/null @@ -1,26 +0,0 @@ -// -// Model200Response.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -/** Model for testing model name starting with number */ -public struct Model200Response: Codable { - - public var name: Int? - public var _class: String? - - public init(name: Int?, _class: String?) { - self.name = name - self._class = _class - } - - public enum CodingKeys: String, CodingKey { - case name - case _class = "class" - } - -} diff --git a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/Name.swift b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/Name.swift deleted file mode 100644 index 785c43bda4c6..000000000000 --- a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/Name.swift +++ /dev/null @@ -1,32 +0,0 @@ -// -// Name.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -/** Model for testing model name same as property name */ -public struct Name: Codable { - - public var name: Int? - public var snakeCase: Int? - public var property: String? - public var _123number: Int? - - public init(name: Int?, snakeCase: Int?, property: String?, _123number: Int?) { - self.name = name - self.snakeCase = snakeCase - self.property = property - self._123number = _123number - } - - public enum CodingKeys: String, CodingKey { - case name - case snakeCase = "snake_case" - case property - case _123number = "123Number" - } - -} diff --git a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift deleted file mode 100644 index abd2269e8e76..000000000000 --- a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift +++ /dev/null @@ -1,22 +0,0 @@ -// -// NumberOnly.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct NumberOnly: Codable { - - public var justNumber: Double? - - public init(justNumber: Double?) { - self.justNumber = justNumber - } - - public enum CodingKeys: String, CodingKey { - case justNumber = "JustNumber" - } - -} diff --git a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/Order.swift b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/Order.swift deleted file mode 100644 index a6e1b1d2e5e4..000000000000 --- a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/Order.swift +++ /dev/null @@ -1,34 +0,0 @@ -// -// Order.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct Order: Codable { - - public enum Status: String, Codable { - case placed = "placed" - case approved = "approved" - case delivered = "delivered" - } - public var id: Int64? - public var petId: Int64? - public var quantity: Int? - public var shipDate: Date? - /** Order Status */ - public var status: Status? - public var complete: Bool? = false - - public init(id: Int64?, petId: Int64?, quantity: Int?, shipDate: Date?, status: Status?, complete: Bool?) { - self.id = id - self.petId = petId - self.quantity = quantity - self.shipDate = shipDate - self.status = status - self.complete = complete - } - -} diff --git a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift deleted file mode 100644 index 49aec001c5db..000000000000 --- a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift +++ /dev/null @@ -1,28 +0,0 @@ -// -// OuterComposite.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct OuterComposite: Codable { - - public var myNumber: Double? - public var myString: String? - public var myBoolean: Bool? - - public init(myNumber: Double?, myString: String?, myBoolean: Bool?) { - self.myNumber = myNumber - self.myString = myString - self.myBoolean = myBoolean - } - - public enum CodingKeys: String, CodingKey { - case myNumber = "my_number" - case myString = "my_string" - case myBoolean = "my_boolean" - } - -} diff --git a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift deleted file mode 100644 index 9f80fc95ecf0..000000000000 --- a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift +++ /dev/null @@ -1,14 +0,0 @@ -// -// OuterEnum.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public enum OuterEnum: String, Codable { - case placed = "placed" - case approved = "approved" - case delivered = "delivered" -} diff --git a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift deleted file mode 100644 index 99eaa1329e48..000000000000 --- a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift +++ /dev/null @@ -1,34 +0,0 @@ -// -// Pet.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct Pet: Codable { - - public enum Status: String, Codable { - case available = "available" - case pending = "pending" - case sold = "sold" - } - public var id: Int64? - public var category: Category? - public var name: String? - public var photoUrls: [String]? - public var tags: [Tag]? - /** pet status in the store */ - public var status: Status? - - public init(id: Int64?, category: Category?, name: String?, photoUrls: [String]?, tags: [Tag]?, status: Status?) { - self.id = id - self.category = category - self.name = name - self.photoUrls = photoUrls - self.tags = tags - self.status = status - } - -} diff --git a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift deleted file mode 100644 index 0acd21fd1000..000000000000 --- a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift +++ /dev/null @@ -1,20 +0,0 @@ -// -// ReadOnlyFirst.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct ReadOnlyFirst: Codable { - - public var bar: String? - public var baz: String? - - public init(bar: String?, baz: String?) { - self.bar = bar - self.baz = baz - } - -} diff --git a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/Return.swift b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/Return.swift deleted file mode 100644 index b34ddc68142d..000000000000 --- a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/Return.swift +++ /dev/null @@ -1,23 +0,0 @@ -// -// Return.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -/** Model for testing reserved words */ -public struct Return: Codable { - - public var _return: Int? - - public init(_return: Int?) { - self._return = _return - } - - public enum CodingKeys: String, CodingKey { - case _return = "return" - } - -} diff --git a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift deleted file mode 100644 index e79fc45c0e91..000000000000 --- a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift +++ /dev/null @@ -1,22 +0,0 @@ -// -// SpecialModelName.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct SpecialModelName: Codable { - - public var specialPropertyName: Int64? - - public init(specialPropertyName: Int64?) { - self.specialPropertyName = specialPropertyName - } - - public enum CodingKeys: String, CodingKey { - case specialPropertyName = "$special[property.name]" - } - -} diff --git a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift deleted file mode 100644 index 3f1237fee477..000000000000 --- a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift +++ /dev/null @@ -1,45 +0,0 @@ -// -// StringBooleanMap.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct StringBooleanMap: Codable { - - public var additionalProperties: [String: Bool] = [:] - - public subscript(key: String) -> Bool? { - get { - if let value = additionalProperties[key] { - return value - } - return nil - } - - set { - additionalProperties[key] = newValue - } - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - try container.encodeMap(additionalProperties) - } - - // Decodable protocol methods - - public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - var nonAdditionalPropertyKeys = Set() - additionalProperties = try container.decodeMap(Bool.self, excludedKeys: nonAdditionalPropertyKeys) - } - -} diff --git a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift deleted file mode 100644 index 4dd8a9a9f5a0..000000000000 --- a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift +++ /dev/null @@ -1,20 +0,0 @@ -// -// Tag.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct Tag: Codable { - - public var id: Int64? - public var name: String? - - public init(id: Int64?, name: String?) { - self.id = id - self.name = name - } - -} diff --git a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift deleted file mode 100644 index 07b590ab1079..000000000000 --- a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift +++ /dev/null @@ -1,34 +0,0 @@ -// -// TypeHolderDefault.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct TypeHolderDefault: Codable { - - public var stringItem: String? = "what" - public var numberItem: Double? - public var integerItem: Int? - public var boolItem: Bool? = true - public var arrayItem: [Int]? - - public init(stringItem: String?, numberItem: Double?, integerItem: Int?, boolItem: Bool?, arrayItem: [Int]?) { - self.stringItem = stringItem - self.numberItem = numberItem - self.integerItem = integerItem - self.boolItem = boolItem - self.arrayItem = arrayItem - } - - public enum CodingKeys: String, CodingKey { - case stringItem = "string_item" - case numberItem = "number_item" - case integerItem = "integer_item" - case boolItem = "bool_item" - case arrayItem = "array_item" - } - -} diff --git a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift deleted file mode 100644 index 29d005161783..000000000000 --- a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift +++ /dev/null @@ -1,34 +0,0 @@ -// -// TypeHolderExample.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct TypeHolderExample: Codable { - - public var stringItem: String? - public var numberItem: Double? - public var integerItem: Int? - public var boolItem: Bool? - public var arrayItem: [Int]? - - public init(stringItem: String?, numberItem: Double?, integerItem: Int?, boolItem: Bool?, arrayItem: [Int]?) { - self.stringItem = stringItem - self.numberItem = numberItem - self.integerItem = integerItem - self.boolItem = boolItem - self.arrayItem = arrayItem - } - - public enum CodingKeys: String, CodingKey { - case stringItem = "string_item" - case numberItem = "number_item" - case integerItem = "integer_item" - case boolItem = "bool_item" - case arrayItem = "array_item" - } - -} diff --git a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/User.swift b/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/User.swift deleted file mode 100644 index 79f271ed7356..000000000000 --- a/samples/client/petstore/swift4/unwrapRequired/PetstoreClient/Classes/OpenAPIs/Models/User.swift +++ /dev/null @@ -1,33 +0,0 @@ -// -// User.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct User: Codable { - - public var id: Int64? - public var username: String? - public var firstName: String? - public var lastName: String? - public var email: String? - public var password: String? - public var phone: String? - /** User Status */ - public var userStatus: Int? - - public init(id: Int64?, username: String?, firstName: String?, lastName: String?, email: String?, password: String?, phone: String?, userStatus: Int?) { - self.id = id - self.username = username - self.firstName = firstName - self.lastName = lastName - self.email = email - self.password = password - self.phone = phone - self.userStatus = userStatus - } - -} diff --git a/samples/client/petstore/swift4/unwrapRequired/README.md b/samples/client/petstore/swift4/unwrapRequired/README.md deleted file mode 100644 index bd093317bd7a..000000000000 --- a/samples/client/petstore/swift4/unwrapRequired/README.md +++ /dev/null @@ -1,141 +0,0 @@ -# Swift4 API client for PetstoreClient - -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 API client 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 an API client. - -- API version: 1.0.0 -- Package version: -- Build package: org.openapitools.codegen.languages.Swift4Codegen - -## Installation - -### Carthage - -Run `carthage update` - -### CocoaPods - -Run `pod install` - -## Documentation for API Endpoints - -All URIs are relative to *http://petstore.swagger.io:80/v2* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*AnotherFakeAPI* | [**call123testSpecialTags**](docs/AnotherFakeAPI.md#call123testspecialtags) | **PATCH** /another-fake/dummy | To test special tags -*FakeAPI* | [**fakeOuterBooleanSerialize**](docs/FakeAPI.md#fakeouterbooleanserialize) | **POST** /fake/outer/boolean | -*FakeAPI* | [**fakeOuterCompositeSerialize**](docs/FakeAPI.md#fakeoutercompositeserialize) | **POST** /fake/outer/composite | -*FakeAPI* | [**fakeOuterNumberSerialize**](docs/FakeAPI.md#fakeouternumberserialize) | **POST** /fake/outer/number | -*FakeAPI* | [**fakeOuterStringSerialize**](docs/FakeAPI.md#fakeouterstringserialize) | **POST** /fake/outer/string | -*FakeAPI* | [**testBodyWithFileSchema**](docs/FakeAPI.md#testbodywithfileschema) | **PUT** /fake/body-with-file-schema | -*FakeAPI* | [**testBodyWithQueryParams**](docs/FakeAPI.md#testbodywithqueryparams) | **PUT** /fake/body-with-query-params | -*FakeAPI* | [**testClientModel**](docs/FakeAPI.md#testclientmodel) | **PATCH** /fake | To test \"client\" model -*FakeAPI* | [**testEndpointParameters**](docs/FakeAPI.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 -*FakeAPI* | [**testEnumParameters**](docs/FakeAPI.md#testenumparameters) | **GET** /fake | To test enum parameters -*FakeAPI* | [**testGroupParameters**](docs/FakeAPI.md#testgroupparameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) -*FakeAPI* | [**testInlineAdditionalProperties**](docs/FakeAPI.md#testinlineadditionalproperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties -*FakeAPI* | [**testJsonFormData**](docs/FakeAPI.md#testjsonformdata) | **GET** /fake/jsonFormData | test json serialization of form data -*FakeClassnameTags123API* | [**testClassname**](docs/FakeClassnameTags123API.md#testclassname) | **PATCH** /fake_classname_test | To test class name in snake case -*PetAPI* | [**addPet**](docs/PetAPI.md#addpet) | **POST** /pet | Add a new pet to the store -*PetAPI* | [**deletePet**](docs/PetAPI.md#deletepet) | **DELETE** /pet/{petId} | Deletes a pet -*PetAPI* | [**findPetsByStatus**](docs/PetAPI.md#findpetsbystatus) | **GET** /pet/findByStatus | Finds Pets by status -*PetAPI* | [**findPetsByTags**](docs/PetAPI.md#findpetsbytags) | **GET** /pet/findByTags | Finds Pets by tags -*PetAPI* | [**getPetById**](docs/PetAPI.md#getpetbyid) | **GET** /pet/{petId} | Find pet by ID -*PetAPI* | [**updatePet**](docs/PetAPI.md#updatepet) | **PUT** /pet | Update an existing pet -*PetAPI* | [**updatePetWithForm**](docs/PetAPI.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data -*PetAPI* | [**uploadFile**](docs/PetAPI.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image -*PetAPI* | [**uploadFileWithRequiredFile**](docs/PetAPI.md#uploadfilewithrequiredfile) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required) -*StoreAPI* | [**deleteOrder**](docs/StoreAPI.md#deleteorder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID -*StoreAPI* | [**getInventory**](docs/StoreAPI.md#getinventory) | **GET** /store/inventory | Returns pet inventories by status -*StoreAPI* | [**getOrderById**](docs/StoreAPI.md#getorderbyid) | **GET** /store/order/{order_id} | Find purchase order by ID -*StoreAPI* | [**placeOrder**](docs/StoreAPI.md#placeorder) | **POST** /store/order | Place an order for a pet -*UserAPI* | [**createUser**](docs/UserAPI.md#createuser) | **POST** /user | Create user -*UserAPI* | [**createUsersWithArrayInput**](docs/UserAPI.md#createuserswitharrayinput) | **POST** /user/createWithArray | Creates list of users with given input array -*UserAPI* | [**createUsersWithListInput**](docs/UserAPI.md#createuserswithlistinput) | **POST** /user/createWithList | Creates list of users with given input array -*UserAPI* | [**deleteUser**](docs/UserAPI.md#deleteuser) | **DELETE** /user/{username} | Delete user -*UserAPI* | [**getUserByName**](docs/UserAPI.md#getuserbyname) | **GET** /user/{username} | Get user by user name -*UserAPI* | [**loginUser**](docs/UserAPI.md#loginuser) | **GET** /user/login | Logs user into the system -*UserAPI* | [**logoutUser**](docs/UserAPI.md#logoutuser) | **GET** /user/logout | Logs out current logged in user session -*UserAPI* | [**updateUser**](docs/UserAPI.md#updateuser) | **PUT** /user/{username} | Updated user - - -## Documentation For Models - - - [AdditionalPropertiesClass](docs/AdditionalPropertiesClass.md) - - [Animal](docs/Animal.md) - - [AnimalFarm](docs/AnimalFarm.md) - - [ApiResponse](docs/ApiResponse.md) - - [ArrayOfArrayOfNumberOnly](docs/ArrayOfArrayOfNumberOnly.md) - - [ArrayOfNumberOnly](docs/ArrayOfNumberOnly.md) - - [ArrayTest](docs/ArrayTest.md) - - [Capitalization](docs/Capitalization.md) - - [Cat](docs/Cat.md) - - [CatAllOf](docs/CatAllOf.md) - - [Category](docs/Category.md) - - [ClassModel](docs/ClassModel.md) - - [Client](docs/Client.md) - - [Dog](docs/Dog.md) - - [DogAllOf](docs/DogAllOf.md) - - [EnumArrays](docs/EnumArrays.md) - - [EnumClass](docs/EnumClass.md) - - [EnumTest](docs/EnumTest.md) - - [File](docs/File.md) - - [FileSchemaTestClass](docs/FileSchemaTestClass.md) - - [FormatTest](docs/FormatTest.md) - - [HasOnlyReadOnly](docs/HasOnlyReadOnly.md) - - [List](docs/List.md) - - [MapTest](docs/MapTest.md) - - [MixedPropertiesAndAdditionalPropertiesClass](docs/MixedPropertiesAndAdditionalPropertiesClass.md) - - [Model200Response](docs/Model200Response.md) - - [Name](docs/Name.md) - - [NumberOnly](docs/NumberOnly.md) - - [Order](docs/Order.md) - - [OuterComposite](docs/OuterComposite.md) - - [OuterEnum](docs/OuterEnum.md) - - [Pet](docs/Pet.md) - - [ReadOnlyFirst](docs/ReadOnlyFirst.md) - - [Return](docs/Return.md) - - [SpecialModelName](docs/SpecialModelName.md) - - [StringBooleanMap](docs/StringBooleanMap.md) - - [Tag](docs/Tag.md) - - [TypeHolderDefault](docs/TypeHolderDefault.md) - - [TypeHolderExample](docs/TypeHolderExample.md) - - [User](docs/User.md) - - -## Documentation For Authorization - - -## api_key - -- **Type**: API key -- **API key parameter name**: api_key -- **Location**: HTTP header - -## api_key_query - -- **Type**: API key -- **API key parameter name**: api_key_query -- **Location**: URL query string - -## http_basic_test - -- **Type**: HTTP basic authentication - -## petstore_auth - -- **Type**: OAuth -- **Flow**: implicit -- **Authorization URL**: http://petstore.swagger.io/api/oauth/dialog -- **Scopes**: - - **write:pets**: modify pets in your account - - **read:pets**: read your pets - - -## Author - - - diff --git a/samples/client/petstore/swift4/unwrapRequired/docs/AdditionalPropertiesClass.md b/samples/client/petstore/swift4/unwrapRequired/docs/AdditionalPropertiesClass.md deleted file mode 100644 index e22d28be1de6..000000000000 --- a/samples/client/petstore/swift4/unwrapRequired/docs/AdditionalPropertiesClass.md +++ /dev/null @@ -1,11 +0,0 @@ -# AdditionalPropertiesClass - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**mapString** | **[String:String]** | | [optional] -**mapMapString** | [String:[String: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/swift4/unwrapRequired/docs/Animal.md b/samples/client/petstore/swift4/unwrapRequired/docs/Animal.md deleted file mode 100644 index 69c601455cd8..000000000000 --- a/samples/client/petstore/swift4/unwrapRequired/docs/Animal.md +++ /dev/null @@ -1,11 +0,0 @@ -# Animal - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**className** | **String** | | -**color** | **String** | | [optional] [default to "red"] - -[[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/swift4/unwrapRequired/docs/AnimalFarm.md b/samples/client/petstore/swift4/unwrapRequired/docs/AnimalFarm.md deleted file mode 100644 index df6bab21dae8..000000000000 --- a/samples/client/petstore/swift4/unwrapRequired/docs/AnimalFarm.md +++ /dev/null @@ -1,9 +0,0 @@ -# AnimalFarm - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/samples/client/petstore/swift4/unwrapRequired/docs/AnotherFakeAPI.md b/samples/client/petstore/swift4/unwrapRequired/docs/AnotherFakeAPI.md deleted file mode 100644 index aead5f1f980f..000000000000 --- a/samples/client/petstore/swift4/unwrapRequired/docs/AnotherFakeAPI.md +++ /dev/null @@ -1,59 +0,0 @@ -# AnotherFakeAPI - -All URIs are relative to *http://petstore.swagger.io:80/v2* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**call123testSpecialTags**](AnotherFakeAPI.md#call123testspecialtags) | **PATCH** /another-fake/dummy | To test special tags - - -# **call123testSpecialTags** -```swift - open class func call123testSpecialTags(body: Client, completion: @escaping (_ data: Client?, _ error: Error?) -> Void) -``` - -To test special tags - -To test special tags and operation ID starting with number - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let body = Client(client: "client_example") // Client | client model - -// To test special tags -AnotherFakeAPI.call123testSpecialTags(body: body) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Client**](Client.md) | client model | - -### Return type - -[**Client**](Client.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **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/swift4/unwrapRequired/docs/ApiResponse.md b/samples/client/petstore/swift4/unwrapRequired/docs/ApiResponse.md deleted file mode 100644 index c6d9768fe9bf..000000000000 --- a/samples/client/petstore/swift4/unwrapRequired/docs/ApiResponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# ApiResponse - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**code** | **Int** | | [optional] -**type** | **String** | | [optional] -**message** | **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/swift4/unwrapRequired/docs/ArrayOfArrayOfNumberOnly.md b/samples/client/petstore/swift4/unwrapRequired/docs/ArrayOfArrayOfNumberOnly.md deleted file mode 100644 index c6fceff5e08d..000000000000 --- a/samples/client/petstore/swift4/unwrapRequired/docs/ArrayOfArrayOfNumberOnly.md +++ /dev/null @@ -1,10 +0,0 @@ -# ArrayOfArrayOfNumberOnly - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**arrayArrayNumber** | [[Double]] | | [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/swift4/unwrapRequired/docs/ArrayOfNumberOnly.md b/samples/client/petstore/swift4/unwrapRequired/docs/ArrayOfNumberOnly.md deleted file mode 100644 index f09f8fa6f70f..000000000000 --- a/samples/client/petstore/swift4/unwrapRequired/docs/ArrayOfNumberOnly.md +++ /dev/null @@ -1,10 +0,0 @@ -# ArrayOfNumberOnly - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**arrayNumber** | **[Double]** | | [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/swift4/unwrapRequired/docs/ArrayTest.md b/samples/client/petstore/swift4/unwrapRequired/docs/ArrayTest.md deleted file mode 100644 index bf416b8330cc..000000000000 --- a/samples/client/petstore/swift4/unwrapRequired/docs/ArrayTest.md +++ /dev/null @@ -1,12 +0,0 @@ -# ArrayTest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**arrayOfString** | **[String]** | | [optional] -**arrayArrayOfInteger** | [[Int64]] | | [optional] -**arrayArrayOfModel** | [[ReadOnlyFirst]] | | [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/swift4/unwrapRequired/docs/Capitalization.md b/samples/client/petstore/swift4/unwrapRequired/docs/Capitalization.md deleted file mode 100644 index 95374216c773..000000000000 --- a/samples/client/petstore/swift4/unwrapRequired/docs/Capitalization.md +++ /dev/null @@ -1,15 +0,0 @@ -# Capitalization - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**smallCamel** | **String** | | [optional] -**capitalCamel** | **String** | | [optional] -**smallSnake** | **String** | | [optional] -**capitalSnake** | **String** | | [optional] -**sCAETHFlowPoints** | **String** | | [optional] -**ATT_NAME** | **String** | Name of the pet | [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/swift4/unwrapRequired/docs/Cat.md b/samples/client/petstore/swift4/unwrapRequired/docs/Cat.md deleted file mode 100644 index fb5949b15761..000000000000 --- a/samples/client/petstore/swift4/unwrapRequired/docs/Cat.md +++ /dev/null @@ -1,10 +0,0 @@ -# Cat - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**declawed** | **Bool** | | [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/swift4/unwrapRequired/docs/CatAllOf.md b/samples/client/petstore/swift4/unwrapRequired/docs/CatAllOf.md deleted file mode 100644 index 79789be61c01..000000000000 --- a/samples/client/petstore/swift4/unwrapRequired/docs/CatAllOf.md +++ /dev/null @@ -1,10 +0,0 @@ -# CatAllOf - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**declawed** | **Bool** | | [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/swift4/unwrapRequired/docs/Category.md b/samples/client/petstore/swift4/unwrapRequired/docs/Category.md deleted file mode 100644 index 5ca5408c0f96..000000000000 --- a/samples/client/petstore/swift4/unwrapRequired/docs/Category.md +++ /dev/null @@ -1,11 +0,0 @@ -# Category - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Int64** | | [optional] -**name** | **String** | | [default to "default-name"] - -[[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/swift4/unwrapRequired/docs/ClassModel.md b/samples/client/petstore/swift4/unwrapRequired/docs/ClassModel.md deleted file mode 100644 index e3912fdf0fd5..000000000000 --- a/samples/client/petstore/swift4/unwrapRequired/docs/ClassModel.md +++ /dev/null @@ -1,10 +0,0 @@ -# ClassModel - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**_class** | **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/swift4/unwrapRequired/docs/Client.md b/samples/client/petstore/swift4/unwrapRequired/docs/Client.md deleted file mode 100644 index 0de1b238c36f..000000000000 --- a/samples/client/petstore/swift4/unwrapRequired/docs/Client.md +++ /dev/null @@ -1,10 +0,0 @@ -# Client - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**client** | **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/swift4/unwrapRequired/docs/Dog.md b/samples/client/petstore/swift4/unwrapRequired/docs/Dog.md deleted file mode 100644 index 4824786da049..000000000000 --- a/samples/client/petstore/swift4/unwrapRequired/docs/Dog.md +++ /dev/null @@ -1,10 +0,0 @@ -# Dog - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**breed** | **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/swift4/unwrapRequired/docs/DogAllOf.md b/samples/client/petstore/swift4/unwrapRequired/docs/DogAllOf.md deleted file mode 100644 index 9302ef52e938..000000000000 --- a/samples/client/petstore/swift4/unwrapRequired/docs/DogAllOf.md +++ /dev/null @@ -1,10 +0,0 @@ -# DogAllOf - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**breed** | **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/swift4/unwrapRequired/docs/EnumArrays.md b/samples/client/petstore/swift4/unwrapRequired/docs/EnumArrays.md deleted file mode 100644 index b9a9807d3c8e..000000000000 --- a/samples/client/petstore/swift4/unwrapRequired/docs/EnumArrays.md +++ /dev/null @@ -1,11 +0,0 @@ -# EnumArrays - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**justSymbol** | **String** | | [optional] -**arrayEnum** | **[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/swift4/unwrapRequired/docs/EnumClass.md b/samples/client/petstore/swift4/unwrapRequired/docs/EnumClass.md deleted file mode 100644 index 67f017becd0c..000000000000 --- a/samples/client/petstore/swift4/unwrapRequired/docs/EnumClass.md +++ /dev/null @@ -1,9 +0,0 @@ -# EnumClass - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/samples/client/petstore/swift4/unwrapRequired/docs/EnumTest.md b/samples/client/petstore/swift4/unwrapRequired/docs/EnumTest.md deleted file mode 100644 index bc9b036dd769..000000000000 --- a/samples/client/petstore/swift4/unwrapRequired/docs/EnumTest.md +++ /dev/null @@ -1,14 +0,0 @@ -# EnumTest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**enumString** | **String** | | [optional] -**enumStringRequired** | **String** | | -**enumInteger** | **Int** | | [optional] -**enumNumber** | **Double** | | [optional] -**outerEnum** | [**OuterEnum**](OuterEnum.md) | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/samples/client/petstore/swift4/unwrapRequired/docs/FakeAPI.md b/samples/client/petstore/swift4/unwrapRequired/docs/FakeAPI.md deleted file mode 100644 index d0ab705d4e4b..000000000000 --- a/samples/client/petstore/swift4/unwrapRequired/docs/FakeAPI.md +++ /dev/null @@ -1,662 +0,0 @@ -# FakeAPI - -All URIs are relative to *http://petstore.swagger.io:80/v2* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**fakeOuterBooleanSerialize**](FakeAPI.md#fakeouterbooleanserialize) | **POST** /fake/outer/boolean | -[**fakeOuterCompositeSerialize**](FakeAPI.md#fakeoutercompositeserialize) | **POST** /fake/outer/composite | -[**fakeOuterNumberSerialize**](FakeAPI.md#fakeouternumberserialize) | **POST** /fake/outer/number | -[**fakeOuterStringSerialize**](FakeAPI.md#fakeouterstringserialize) | **POST** /fake/outer/string | -[**testBodyWithFileSchema**](FakeAPI.md#testbodywithfileschema) | **PUT** /fake/body-with-file-schema | -[**testBodyWithQueryParams**](FakeAPI.md#testbodywithqueryparams) | **PUT** /fake/body-with-query-params | -[**testClientModel**](FakeAPI.md#testclientmodel) | **PATCH** /fake | To test \"client\" model -[**testEndpointParameters**](FakeAPI.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 -[**testEnumParameters**](FakeAPI.md#testenumparameters) | **GET** /fake | To test enum parameters -[**testGroupParameters**](FakeAPI.md#testgroupparameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) -[**testInlineAdditionalProperties**](FakeAPI.md#testinlineadditionalproperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties -[**testJsonFormData**](FakeAPI.md#testjsonformdata) | **GET** /fake/jsonFormData | test json serialization of form data - - -# **fakeOuterBooleanSerialize** -```swift - open class func fakeOuterBooleanSerialize(body: Bool? = nil, completion: @escaping (_ data: Bool?, _ error: Error?) -> Void) -``` - - - -Test serialization of outer boolean types - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let body = true // Bool | Input boolean as post body (optional) - -FakeAPI.fakeOuterBooleanSerialize(body: body) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | **Bool** | Input boolean as post body | [optional] - -### Return type - -**Bool** - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: */* - -[[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) - -# **fakeOuterCompositeSerialize** -```swift - open class func fakeOuterCompositeSerialize(body: OuterComposite? = nil, completion: @escaping (_ data: OuterComposite?, _ error: Error?) -> Void) -``` - - - -Test serialization of object with outer number type - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let body = OuterComposite(myNumber: 123, myString: "myString_example", myBoolean: false) // OuterComposite | Input composite as post body (optional) - -FakeAPI.fakeOuterCompositeSerialize(body: body) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**OuterComposite**](OuterComposite.md) | Input composite as post body | [optional] - -### Return type - -[**OuterComposite**](OuterComposite.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: */* - -[[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) - -# **fakeOuterNumberSerialize** -```swift - open class func fakeOuterNumberSerialize(body: Double? = nil, completion: @escaping (_ data: Double?, _ error: Error?) -> Void) -``` - - - -Test serialization of outer number types - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let body = 987 // Double | Input number as post body (optional) - -FakeAPI.fakeOuterNumberSerialize(body: body) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | **Double** | Input number as post body | [optional] - -### Return type - -**Double** - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: */* - -[[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) - -# **fakeOuterStringSerialize** -```swift - open class func fakeOuterStringSerialize(body: String? = nil, completion: @escaping (_ data: String?, _ error: Error?) -> Void) -``` - - - -Test serialization of outer string types - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let body = "body_example" // String | Input string as post body (optional) - -FakeAPI.fakeOuterStringSerialize(body: body) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | **String** | Input string as post body | [optional] - -### Return type - -**String** - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: */* - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **testBodyWithFileSchema** -```swift - open class func testBodyWithFileSchema(body: FileSchemaTestClass, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - - - -For this test, the body for this request much reference a schema named `File`. - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let body = FileSchemaTestClass(file: File(sourceURI: "sourceURI_example"), files: [File(sourceURI: "sourceURI_example")]) // FileSchemaTestClass | - -FakeAPI.testBodyWithFileSchema(body: body) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**FileSchemaTestClass**](FileSchemaTestClass.md) | | - -### Return type - -Void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **testBodyWithQueryParams** -```swift - open class func testBodyWithQueryParams(query: String, body: User, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - - - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let query = "query_example" // String | -let body = User(id: 123, username: "username_example", firstName: "firstName_example", lastName: "lastName_example", email: "email_example", password: "password_example", phone: "phone_example", userStatus: 123) // User | - -FakeAPI.testBodyWithQueryParams(query: query, body: body) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **query** | **String** | | - **body** | [**User**](User.md) | | - -### Return type - -Void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **testClientModel** -```swift - open class func testClientModel(body: Client, completion: @escaping (_ data: Client?, _ error: Error?) -> Void) -``` - -To test \"client\" model - -To test \"client\" model - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let body = Client(client: "client_example") // Client | client model - -// To test \"client\" model -FakeAPI.testClientModel(body: body) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Client**](Client.md) | client model | - -### Return type - -[**Client**](Client.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **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) - -# **testEndpointParameters** -```swift - open class func testEndpointParameters(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - -Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - -Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let number = 987 // Double | None -let double = 987 // Double | None -let patternWithoutDelimiter = "patternWithoutDelimiter_example" // String | None -let byte = 987 // Data | None -let integer = 987 // Int | None (optional) -let int32 = 987 // Int | None (optional) -let int64 = 987 // Int64 | None (optional) -let float = 987 // Float | None (optional) -let string = "string_example" // String | None (optional) -let binary = URL(string: "https://example.com")! // URL | None (optional) -let date = Date() // Date | None (optional) -let dateTime = Date() // Date | None (optional) -let password = "password_example" // String | None (optional) -let callback = "callback_example" // String | None (optional) - -// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 -FakeAPI.testEndpointParameters(number: number, double: double, patternWithoutDelimiter: patternWithoutDelimiter, byte: byte, integer: integer, int32: int32, int64: int64, float: float, string: string, binary: binary, date: date, dateTime: dateTime, password: password, callback: callback) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **number** | **Double** | None | - **double** | **Double** | None | - **patternWithoutDelimiter** | **String** | None | - **byte** | **Data** | None | - **integer** | **Int** | None | [optional] - **int32** | **Int** | None | [optional] - **int64** | **Int64** | None | [optional] - **float** | **Float** | None | [optional] - **string** | **String** | None | [optional] - **binary** | **URL** | None | [optional] - **date** | **Date** | None | [optional] - **dateTime** | **Date** | None | [optional] - **password** | **String** | None | [optional] - **callback** | **String** | None | [optional] - -### Return type - -Void (empty response body) - -### Authorization - -[http_basic_test](../README.md#http_basic_test) - -### 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) - -# **testEnumParameters** -```swift - open class func testEnumParameters(enumHeaderStringArray: [String]? = nil, enumHeaderString: EnumHeaderString_testEnumParameters? = nil, enumQueryStringArray: [String]? = nil, enumQueryString: EnumQueryString_testEnumParameters? = nil, enumQueryInteger: EnumQueryInteger_testEnumParameters? = nil, enumQueryDouble: EnumQueryDouble_testEnumParameters? = nil, enumFormStringArray: [String]? = nil, enumFormString: EnumFormString_testEnumParameters? = nil, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - -To test enum parameters - -To test enum parameters - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let enumHeaderStringArray = ["enumHeaderStringArray_example"] // [String] | Header parameter enum test (string array) (optional) -let enumHeaderString = "enumHeaderString_example" // String | Header parameter enum test (string) (optional) (default to .efg) -let enumQueryStringArray = ["enumQueryStringArray_example"] // [String] | Query parameter enum test (string array) (optional) -let enumQueryString = "enumQueryString_example" // String | Query parameter enum test (string) (optional) (default to .efg) -let enumQueryInteger = 987 // Int | Query parameter enum test (double) (optional) -let enumQueryDouble = 987 // Double | Query parameter enum test (double) (optional) -let enumFormStringArray = ["inner_example"] // [String] | Form parameter enum test (string array) (optional) (default to .dollar) -let enumFormString = "enumFormString_example" // String | Form parameter enum test (string) (optional) (default to .efg) - -// To test enum parameters -FakeAPI.testEnumParameters(enumHeaderStringArray: enumHeaderStringArray, enumHeaderString: enumHeaderString, enumQueryStringArray: enumQueryStringArray, enumQueryString: enumQueryString, enumQueryInteger: enumQueryInteger, enumQueryDouble: enumQueryDouble, enumFormStringArray: enumFormStringArray, enumFormString: enumFormString) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **enumHeaderStringArray** | [**[String]**](String.md) | Header parameter enum test (string array) | [optional] - **enumHeaderString** | **String** | Header parameter enum test (string) | [optional] [default to .efg] - **enumQueryStringArray** | [**[String]**](String.md) | Query parameter enum test (string array) | [optional] - **enumQueryString** | **String** | Query parameter enum test (string) | [optional] [default to .efg] - **enumQueryInteger** | **Int** | Query parameter enum test (double) | [optional] - **enumQueryDouble** | **Double** | Query parameter enum test (double) | [optional] - **enumFormStringArray** | [**[String]**](String.md) | Form parameter enum test (string array) | [optional] [default to .dollar] - **enumFormString** | **String** | Form parameter enum test (string) | [optional] [default to .efg] - -### Return type - -Void (empty response body) - -### Authorization - -No authorization required - -### 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) - -# **testGroupParameters** -```swift - open class func testGroupParameters(requiredStringGroup: Int, requiredBooleanGroup: Bool, requiredInt64Group: Int64, stringGroup: Int? = nil, booleanGroup: Bool? = nil, int64Group: Int64? = nil, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - -Fake endpoint to test group parameters (optional) - -Fake endpoint to test group parameters (optional) - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let requiredStringGroup = 987 // Int | Required String in group parameters -let requiredBooleanGroup = true // Bool | Required Boolean in group parameters -let requiredInt64Group = 987 // Int64 | Required Integer in group parameters -let stringGroup = 987 // Int | String in group parameters (optional) -let booleanGroup = true // Bool | Boolean in group parameters (optional) -let int64Group = 987 // Int64 | Integer in group parameters (optional) - -// Fake endpoint to test group parameters (optional) -FakeAPI.testGroupParameters(requiredStringGroup: requiredStringGroup, requiredBooleanGroup: requiredBooleanGroup, requiredInt64Group: requiredInt64Group, stringGroup: stringGroup, booleanGroup: booleanGroup, int64Group: int64Group) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **requiredStringGroup** | **Int** | Required String in group parameters | - **requiredBooleanGroup** | **Bool** | Required Boolean in group parameters | - **requiredInt64Group** | **Int64** | Required Integer in group parameters | - **stringGroup** | **Int** | String in group parameters | [optional] - **booleanGroup** | **Bool** | Boolean in group parameters | [optional] - **int64Group** | **Int64** | Integer in group parameters | [optional] - -### Return type - -Void (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) - -# **testInlineAdditionalProperties** -```swift - open class func testInlineAdditionalProperties(param: [String:String], completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - -test inline additionalProperties - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let param = "TODO" // [String:String] | request body - -// test inline additionalProperties -FakeAPI.testInlineAdditionalProperties(param: param) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **param** | [**[String:String]**](String.md) | request body | - -### Return type - -Void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **testJsonFormData** -```swift - open class func testJsonFormData(param: String, param2: String, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - -test json serialization of form data - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let param = "param_example" // String | field1 -let param2 = "param2_example" // String | field2 - -// test json serialization of form data -FakeAPI.testJsonFormData(param: param, param2: param2) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **param** | **String** | field1 | - **param2** | **String** | field2 | - -### Return type - -Void (empty response body) - -### Authorization - -No authorization required - -### 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) - diff --git a/samples/client/petstore/swift4/unwrapRequired/docs/FakeClassnameTags123API.md b/samples/client/petstore/swift4/unwrapRequired/docs/FakeClassnameTags123API.md deleted file mode 100644 index 9f24b46edbc3..000000000000 --- a/samples/client/petstore/swift4/unwrapRequired/docs/FakeClassnameTags123API.md +++ /dev/null @@ -1,59 +0,0 @@ -# FakeClassnameTags123API - -All URIs are relative to *http://petstore.swagger.io:80/v2* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**testClassname**](FakeClassnameTags123API.md#testclassname) | **PATCH** /fake_classname_test | To test class name in snake case - - -# **testClassname** -```swift - open class func testClassname(body: Client, completion: @escaping (_ data: Client?, _ error: Error?) -> Void) -``` - -To test class name in snake case - -To test class name in snake case - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let body = Client(client: "client_example") // Client | client model - -// To test class name in snake case -FakeClassnameTags123API.testClassname(body: body) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Client**](Client.md) | client model | - -### Return type - -[**Client**](Client.md) - -### Authorization - -[api_key_query](../README.md#api_key_query) - -### HTTP request headers - - - **Content-Type**: application/json - - **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/swift4/unwrapRequired/docs/File.md b/samples/client/petstore/swift4/unwrapRequired/docs/File.md deleted file mode 100644 index 3edfef17b794..000000000000 --- a/samples/client/petstore/swift4/unwrapRequired/docs/File.md +++ /dev/null @@ -1,10 +0,0 @@ -# File - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**sourceURI** | **String** | Test capitalization | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/samples/client/petstore/swift4/unwrapRequired/docs/FileSchemaTestClass.md b/samples/client/petstore/swift4/unwrapRequired/docs/FileSchemaTestClass.md deleted file mode 100644 index afdacc60b2c3..000000000000 --- a/samples/client/petstore/swift4/unwrapRequired/docs/FileSchemaTestClass.md +++ /dev/null @@ -1,11 +0,0 @@ -# FileSchemaTestClass - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**file** | [**File**](File.md) | | [optional] -**files** | [File] | | [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/swift4/unwrapRequired/docs/FormatTest.md b/samples/client/petstore/swift4/unwrapRequired/docs/FormatTest.md deleted file mode 100644 index f74d94f6c46a..000000000000 --- a/samples/client/petstore/swift4/unwrapRequired/docs/FormatTest.md +++ /dev/null @@ -1,22 +0,0 @@ -# FormatTest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**integer** | **Int** | | [optional] -**int32** | **Int** | | [optional] -**int64** | **Int64** | | [optional] -**number** | **Double** | | -**float** | **Float** | | [optional] -**double** | **Double** | | [optional] -**string** | **String** | | [optional] -**byte** | **Data** | | -**binary** | **URL** | | [optional] -**date** | **Date** | | -**dateTime** | **Date** | | [optional] -**uuid** | **UUID** | | [optional] -**password** | **String** | | - -[[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/swift4/unwrapRequired/docs/HasOnlyReadOnly.md b/samples/client/petstore/swift4/unwrapRequired/docs/HasOnlyReadOnly.md deleted file mode 100644 index 57b6e3a17e67..000000000000 --- a/samples/client/petstore/swift4/unwrapRequired/docs/HasOnlyReadOnly.md +++ /dev/null @@ -1,11 +0,0 @@ -# HasOnlyReadOnly - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**bar** | **String** | | [optional] [readonly] -**foo** | **String** | | [optional] [readonly] - -[[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/swift4/unwrapRequired/docs/List.md b/samples/client/petstore/swift4/unwrapRequired/docs/List.md deleted file mode 100644 index b77718302edf..000000000000 --- a/samples/client/petstore/swift4/unwrapRequired/docs/List.md +++ /dev/null @@ -1,10 +0,0 @@ -# List - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**_123list** | **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/swift4/unwrapRequired/docs/MapTest.md b/samples/client/petstore/swift4/unwrapRequired/docs/MapTest.md deleted file mode 100644 index 56213c4113f6..000000000000 --- a/samples/client/petstore/swift4/unwrapRequired/docs/MapTest.md +++ /dev/null @@ -1,13 +0,0 @@ -# MapTest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**mapMapOfString** | [String:[String:String]] | | [optional] -**mapOfEnumString** | **[String:String]** | | [optional] -**directMap** | **[String:Bool]** | | [optional] -**indirectMap** | [**StringBooleanMap**](StringBooleanMap.md) | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/samples/client/petstore/swift4/unwrapRequired/docs/MixedPropertiesAndAdditionalPropertiesClass.md b/samples/client/petstore/swift4/unwrapRequired/docs/MixedPropertiesAndAdditionalPropertiesClass.md deleted file mode 100644 index fcffb8ecdbf3..000000000000 --- a/samples/client/petstore/swift4/unwrapRequired/docs/MixedPropertiesAndAdditionalPropertiesClass.md +++ /dev/null @@ -1,12 +0,0 @@ -# MixedPropertiesAndAdditionalPropertiesClass - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**uuid** | **UUID** | | [optional] -**dateTime** | **Date** | | [optional] -**map** | [String:Animal] | | [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/swift4/unwrapRequired/docs/Model200Response.md b/samples/client/petstore/swift4/unwrapRequired/docs/Model200Response.md deleted file mode 100644 index 5865ea690cc3..000000000000 --- a/samples/client/petstore/swift4/unwrapRequired/docs/Model200Response.md +++ /dev/null @@ -1,11 +0,0 @@ -# Model200Response - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **Int** | | [optional] -**_class** | **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/swift4/unwrapRequired/docs/Name.md b/samples/client/petstore/swift4/unwrapRequired/docs/Name.md deleted file mode 100644 index f7b180292cd6..000000000000 --- a/samples/client/petstore/swift4/unwrapRequired/docs/Name.md +++ /dev/null @@ -1,13 +0,0 @@ -# Name - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **Int** | | -**snakeCase** | **Int** | | [optional] [readonly] -**property** | **String** | | [optional] -**_123number** | **Int** | | [optional] [readonly] - -[[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/swift4/unwrapRequired/docs/NumberOnly.md b/samples/client/petstore/swift4/unwrapRequired/docs/NumberOnly.md deleted file mode 100644 index 72bd361168b5..000000000000 --- a/samples/client/petstore/swift4/unwrapRequired/docs/NumberOnly.md +++ /dev/null @@ -1,10 +0,0 @@ -# NumberOnly - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**justNumber** | **Double** | | [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/swift4/unwrapRequired/docs/Order.md b/samples/client/petstore/swift4/unwrapRequired/docs/Order.md deleted file mode 100644 index 15487f01175c..000000000000 --- a/samples/client/petstore/swift4/unwrapRequired/docs/Order.md +++ /dev/null @@ -1,15 +0,0 @@ -# Order - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Int64** | | [optional] -**petId** | **Int64** | | [optional] -**quantity** | **Int** | | [optional] -**shipDate** | **Date** | | [optional] -**status** | **String** | Order Status | [optional] -**complete** | **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/swift4/unwrapRequired/docs/OuterComposite.md b/samples/client/petstore/swift4/unwrapRequired/docs/OuterComposite.md deleted file mode 100644 index d6b3583bc3ff..000000000000 --- a/samples/client/petstore/swift4/unwrapRequired/docs/OuterComposite.md +++ /dev/null @@ -1,12 +0,0 @@ -# OuterComposite - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**myNumber** | **Double** | | [optional] -**myString** | **String** | | [optional] -**myBoolean** | **Bool** | | [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/swift4/unwrapRequired/docs/OuterEnum.md b/samples/client/petstore/swift4/unwrapRequired/docs/OuterEnum.md deleted file mode 100644 index 06d413b01680..000000000000 --- a/samples/client/petstore/swift4/unwrapRequired/docs/OuterEnum.md +++ /dev/null @@ -1,9 +0,0 @@ -# OuterEnum - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/samples/client/petstore/swift4/unwrapRequired/docs/Pet.md b/samples/client/petstore/swift4/unwrapRequired/docs/Pet.md deleted file mode 100644 index 5c05f98fad4a..000000000000 --- a/samples/client/petstore/swift4/unwrapRequired/docs/Pet.md +++ /dev/null @@ -1,15 +0,0 @@ -# Pet - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Int64** | | [optional] -**category** | [**Category**](Category.md) | | [optional] -**name** | **String** | | -**photoUrls** | **[String]** | | -**tags** | [Tag] | | [optional] -**status** | **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/swift4/unwrapRequired/docs/PetAPI.md b/samples/client/petstore/swift4/unwrapRequired/docs/PetAPI.md deleted file mode 100644 index 27efe0833476..000000000000 --- a/samples/client/petstore/swift4/unwrapRequired/docs/PetAPI.md +++ /dev/null @@ -1,469 +0,0 @@ -# PetAPI - -All URIs are relative to *http://petstore.swagger.io:80/v2* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**addPet**](PetAPI.md#addpet) | **POST** /pet | Add a new pet to the store -[**deletePet**](PetAPI.md#deletepet) | **DELETE** /pet/{petId} | Deletes a pet -[**findPetsByStatus**](PetAPI.md#findpetsbystatus) | **GET** /pet/findByStatus | Finds Pets by status -[**findPetsByTags**](PetAPI.md#findpetsbytags) | **GET** /pet/findByTags | Finds Pets by tags -[**getPetById**](PetAPI.md#getpetbyid) | **GET** /pet/{petId} | Find pet by ID -[**updatePet**](PetAPI.md#updatepet) | **PUT** /pet | Update an existing pet -[**updatePetWithForm**](PetAPI.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data -[**uploadFile**](PetAPI.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image -[**uploadFileWithRequiredFile**](PetAPI.md#uploadfilewithrequiredfile) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required) - - -# **addPet** -```swift - open class func addPet(body: Pet, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - -Add a new pet to the store - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let body = Pet(id: 123, category: Category(id: 123, name: "name_example"), name: "name_example", photoUrls: ["photoUrls_example"], tags: [Tag(id: 123, name: "name_example")], status: "status_example") // Pet | Pet object that needs to be added to the store - -// Add a new pet to the store -PetAPI.addPet(body: body) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Pet**](Pet.md) | Pet object that needs to be added to the store | - -### Return type - -Void (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) - -# **deletePet** -```swift - open class func deletePet(petId: Int64, apiKey: String? = nil, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - -Deletes a pet - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let petId = 987 // Int64 | Pet id to delete -let apiKey = "apiKey_example" // String | (optional) - -// Deletes a pet -PetAPI.deletePet(petId: petId, apiKey: apiKey) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Int64** | Pet id to delete | - **apiKey** | **String** | | [optional] - -### Return type - -Void (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) - -# **findPetsByStatus** -```swift - open class func findPetsByStatus(status: [String], completion: @escaping (_ data: [Pet]?, _ error: Error?) -> Void) -``` - -Finds Pets by status - -Multiple status values can be provided with comma separated strings - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let status = ["status_example"] // [String] | Status values that need to be considered for filter - -// Finds Pets by status -PetAPI.findPetsByStatus(status: status) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **status** | [**[String]**](String.md) | Status values that need to be considered for filter | - -### Return type - -[**[Pet]**](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) - -# **findPetsByTags** -```swift - open class func findPetsByTags(tags: [String], completion: @escaping (_ data: [Pet]?, _ error: Error?) -> Void) -``` - -Finds Pets by tags - -Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let tags = ["inner_example"] // [String] | Tags to filter by - -// Finds Pets by tags -PetAPI.findPetsByTags(tags: tags) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **tags** | [**[String]**](String.md) | Tags to filter by | - -### Return type - -[**[Pet]**](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) - -# **getPetById** -```swift - open class func getPetById(petId: Int64, completion: @escaping (_ data: Pet?, _ error: Error?) -> Void) -``` - -Find pet by ID - -Returns a single pet - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let petId = 987 // Int64 | ID of pet to return - -// Find pet by ID -PetAPI.getPetById(petId: petId) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Int64** | ID of pet to return | - -### Return type - -[**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) - -# **updatePet** -```swift - open class func updatePet(body: Pet, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - -Update an existing pet - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let body = Pet(id: 123, category: Category(id: 123, name: "name_example"), name: "name_example", photoUrls: ["photoUrls_example"], tags: [Tag(id: 123, name: "name_example")], status: "status_example") // Pet | Pet object that needs to be added to the store - -// Update an existing pet -PetAPI.updatePet(body: body) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Pet**](Pet.md) | Pet object that needs to be added to the store | - -### Return type - -Void (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) - -# **updatePetWithForm** -```swift - open class func updatePetWithForm(petId: Int64, name: String? = nil, status: String? = nil, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - -Updates a pet in the store with form data - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let petId = 987 // Int64 | ID of pet that needs to be updated -let name = "name_example" // String | Updated name of the pet (optional) -let status = "status_example" // String | Updated status of the pet (optional) - -// Updates a pet in the store with form data -PetAPI.updatePetWithForm(petId: petId, name: name, status: status) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Int64** | ID of pet that needs to be updated | - **name** | **String** | Updated name of the pet | [optional] - **status** | **String** | Updated status of the pet | [optional] - -### Return type - -Void (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) - -# **uploadFile** -```swift - open class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil, completion: @escaping (_ data: ApiResponse?, _ error: Error?) -> Void) -``` - -uploads an image - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let petId = 987 // Int64 | ID of pet to update -let additionalMetadata = "additionalMetadata_example" // String | Additional data to pass to server (optional) -let file = URL(string: "https://example.com")! // URL | file to upload (optional) - -// uploads an image -PetAPI.uploadFile(petId: petId, additionalMetadata: additionalMetadata, file: file) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Int64** | ID of pet to update | - **additionalMetadata** | **String** | Additional data to pass to server | [optional] - **file** | **URL** | file to upload | [optional] - -### Return type - -[**ApiResponse**](ApiResponse.md) - -### Authorization - -[petstore_auth](../README.md#petstore_auth) - -### HTTP request headers - - - **Content-Type**: multipart/form-data - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **uploadFileWithRequiredFile** -```swift - open class func uploadFileWithRequiredFile(petId: Int64, requiredFile: URL, additionalMetadata: String? = nil, completion: @escaping (_ data: ApiResponse?, _ error: Error?) -> Void) -``` - -uploads an image (required) - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let petId = 987 // Int64 | ID of pet to update -let requiredFile = URL(string: "https://example.com")! // URL | file to upload -let additionalMetadata = "additionalMetadata_example" // String | Additional data to pass to server (optional) - -// uploads an image (required) -PetAPI.uploadFileWithRequiredFile(petId: petId, requiredFile: requiredFile, additionalMetadata: additionalMetadata) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **Int64** | ID of pet to update | - **requiredFile** | **URL** | file to upload | - **additionalMetadata** | **String** | Additional data to pass to server | [optional] - -### Return type - -[**ApiResponse**](ApiResponse.md) - -### Authorization - -[petstore_auth](../README.md#petstore_auth) - -### HTTP request headers - - - **Content-Type**: multipart/form-data - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/samples/client/petstore/swift4/unwrapRequired/docs/ReadOnlyFirst.md b/samples/client/petstore/swift4/unwrapRequired/docs/ReadOnlyFirst.md deleted file mode 100644 index ed537b87598b..000000000000 --- a/samples/client/petstore/swift4/unwrapRequired/docs/ReadOnlyFirst.md +++ /dev/null @@ -1,11 +0,0 @@ -# ReadOnlyFirst - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**bar** | **String** | | [optional] [readonly] -**baz** | **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/swift4/unwrapRequired/docs/Return.md b/samples/client/petstore/swift4/unwrapRequired/docs/Return.md deleted file mode 100644 index 66d17c27c887..000000000000 --- a/samples/client/petstore/swift4/unwrapRequired/docs/Return.md +++ /dev/null @@ -1,10 +0,0 @@ -# Return - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**_return** | **Int** | | [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/swift4/unwrapRequired/docs/SpecialModelName.md b/samples/client/petstore/swift4/unwrapRequired/docs/SpecialModelName.md deleted file mode 100644 index 3ec27a38c2ac..000000000000 --- a/samples/client/petstore/swift4/unwrapRequired/docs/SpecialModelName.md +++ /dev/null @@ -1,10 +0,0 @@ -# SpecialModelName - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**specialPropertyName** | **Int64** | | [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/swift4/unwrapRequired/docs/StoreAPI.md b/samples/client/petstore/swift4/unwrapRequired/docs/StoreAPI.md deleted file mode 100644 index 36365ca51993..000000000000 --- a/samples/client/petstore/swift4/unwrapRequired/docs/StoreAPI.md +++ /dev/null @@ -1,206 +0,0 @@ -# StoreAPI - -All URIs are relative to *http://petstore.swagger.io:80/v2* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**deleteOrder**](StoreAPI.md#deleteorder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID -[**getInventory**](StoreAPI.md#getinventory) | **GET** /store/inventory | Returns pet inventories by status -[**getOrderById**](StoreAPI.md#getorderbyid) | **GET** /store/order/{order_id} | Find purchase order by ID -[**placeOrder**](StoreAPI.md#placeorder) | **POST** /store/order | Place an order for a pet - - -# **deleteOrder** -```swift - open class func deleteOrder(orderId: String, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - -Delete purchase order by ID - -For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let orderId = "orderId_example" // String | ID of the order that needs to be deleted - -// Delete purchase order by ID -StoreAPI.deleteOrder(orderId: orderId) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **orderId** | **String** | ID of the order that needs to be deleted | - -### Return type - -Void (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) - -# **getInventory** -```swift - open class func getInventory(completion: @escaping (_ data: [String:Int]?, _ error: Error?) -> Void) -``` - -Returns pet inventories by status - -Returns a map of status codes to quantities - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - - -// Returns pet inventories by status -StoreAPI.getInventory() { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -**[String:Int]** - -### 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) - -# **getOrderById** -```swift - open class func getOrderById(orderId: Int64, completion: @escaping (_ data: Order?, _ error: Error?) -> Void) -``` - -Find purchase order by ID - -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let orderId = 987 // Int64 | ID of pet that needs to be fetched - -// Find purchase order by ID -StoreAPI.getOrderById(orderId: orderId) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **orderId** | **Int64** | ID of pet that needs to be fetched | - -### Return type - -[**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) - -# **placeOrder** -```swift - open class func placeOrder(body: Order, completion: @escaping (_ data: Order?, _ error: Error?) -> Void) -``` - -Place an order for a pet - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let body = Order(id: 123, petId: 123, quantity: 123, shipDate: Date(), status: "status_example", complete: false) // Order | order placed for purchasing the pet - -// Place an order for a pet -StoreAPI.placeOrder(body: body) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Order**](Order.md) | order placed for purchasing the pet | - -### Return type - -[**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/swift4/unwrapRequired/docs/StringBooleanMap.md b/samples/client/petstore/swift4/unwrapRequired/docs/StringBooleanMap.md deleted file mode 100644 index 7abf11ec68b1..000000000000 --- a/samples/client/petstore/swift4/unwrapRequired/docs/StringBooleanMap.md +++ /dev/null @@ -1,9 +0,0 @@ -# StringBooleanMap - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/samples/client/petstore/swift4/unwrapRequired/docs/Tag.md b/samples/client/petstore/swift4/unwrapRequired/docs/Tag.md deleted file mode 100644 index ff4ac8aa4519..000000000000 --- a/samples/client/petstore/swift4/unwrapRequired/docs/Tag.md +++ /dev/null @@ -1,11 +0,0 @@ -# Tag - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Int64** | | [optional] -**name** | **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/swift4/unwrapRequired/docs/TypeHolderDefault.md b/samples/client/petstore/swift4/unwrapRequired/docs/TypeHolderDefault.md deleted file mode 100644 index 5161394bdc3e..000000000000 --- a/samples/client/petstore/swift4/unwrapRequired/docs/TypeHolderDefault.md +++ /dev/null @@ -1,14 +0,0 @@ -# TypeHolderDefault - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**stringItem** | **String** | | [default to "what"] -**numberItem** | **Double** | | -**integerItem** | **Int** | | -**boolItem** | **Bool** | | [default to true] -**arrayItem** | **[Int]** | | - -[[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/swift4/unwrapRequired/docs/TypeHolderExample.md b/samples/client/petstore/swift4/unwrapRequired/docs/TypeHolderExample.md deleted file mode 100644 index 46d0471cd71a..000000000000 --- a/samples/client/petstore/swift4/unwrapRequired/docs/TypeHolderExample.md +++ /dev/null @@ -1,14 +0,0 @@ -# TypeHolderExample - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**stringItem** | **String** | | -**numberItem** | **Double** | | -**integerItem** | **Int** | | -**boolItem** | **Bool** | | -**arrayItem** | **[Int]** | | - -[[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/swift4/unwrapRequired/docs/User.md b/samples/client/petstore/swift4/unwrapRequired/docs/User.md deleted file mode 100644 index 5a439de0ff95..000000000000 --- a/samples/client/petstore/swift4/unwrapRequired/docs/User.md +++ /dev/null @@ -1,17 +0,0 @@ -# User - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **Int64** | | [optional] -**username** | **String** | | [optional] -**firstName** | **String** | | [optional] -**lastName** | **String** | | [optional] -**email** | **String** | | [optional] -**password** | **String** | | [optional] -**phone** | **String** | | [optional] -**userStatus** | **Int** | 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/swift4/unwrapRequired/docs/UserAPI.md b/samples/client/petstore/swift4/unwrapRequired/docs/UserAPI.md deleted file mode 100644 index 380813bc68c0..000000000000 --- a/samples/client/petstore/swift4/unwrapRequired/docs/UserAPI.md +++ /dev/null @@ -1,406 +0,0 @@ -# UserAPI - -All URIs are relative to *http://petstore.swagger.io:80/v2* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**createUser**](UserAPI.md#createuser) | **POST** /user | Create user -[**createUsersWithArrayInput**](UserAPI.md#createuserswitharrayinput) | **POST** /user/createWithArray | Creates list of users with given input array -[**createUsersWithListInput**](UserAPI.md#createuserswithlistinput) | **POST** /user/createWithList | Creates list of users with given input array -[**deleteUser**](UserAPI.md#deleteuser) | **DELETE** /user/{username} | Delete user -[**getUserByName**](UserAPI.md#getuserbyname) | **GET** /user/{username} | Get user by user name -[**loginUser**](UserAPI.md#loginuser) | **GET** /user/login | Logs user into the system -[**logoutUser**](UserAPI.md#logoutuser) | **GET** /user/logout | Logs out current logged in user session -[**updateUser**](UserAPI.md#updateuser) | **PUT** /user/{username} | Updated user - - -# **createUser** -```swift - open class func createUser(body: User, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - -Create user - -This can only be done by the logged in user. - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let body = User(id: 123, username: "username_example", firstName: "firstName_example", lastName: "lastName_example", email: "email_example", password: "password_example", phone: "phone_example", userStatus: 123) // User | Created user object - -// Create user -UserAPI.createUser(body: body) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**User**](User.md) | Created user object | - -### Return type - -Void (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) - -# **createUsersWithArrayInput** -```swift - open class func createUsersWithArrayInput(body: [User], completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - -Creates list of users with given input array - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let body = [User(id: 123, username: "username_example", firstName: "firstName_example", lastName: "lastName_example", email: "email_example", password: "password_example", phone: "phone_example", userStatus: 123)] // [User] | List of user object - -// Creates list of users with given input array -UserAPI.createUsersWithArrayInput(body: body) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**[User]**](User.md) | List of user object | - -### Return type - -Void (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) - -# **createUsersWithListInput** -```swift - open class func createUsersWithListInput(body: [User], completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - -Creates list of users with given input array - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let body = [User(id: 123, username: "username_example", firstName: "firstName_example", lastName: "lastName_example", email: "email_example", password: "password_example", phone: "phone_example", userStatus: 123)] // [User] | List of user object - -// Creates list of users with given input array -UserAPI.createUsersWithListInput(body: body) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**[User]**](User.md) | List of user object | - -### Return type - -Void (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) - -# **deleteUser** -```swift - open class func deleteUser(username: String, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - -Delete user - -This can only be done by the logged in user. - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let username = "username_example" // String | The name that needs to be deleted - -// Delete user -UserAPI.deleteUser(username: username) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **String** | The name that needs to be deleted | - -### Return type - -Void (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) - -# **getUserByName** -```swift - open class func getUserByName(username: String, completion: @escaping (_ data: User?, _ error: Error?) -> Void) -``` - -Get user by user name - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let username = "username_example" // String | The name that needs to be fetched. Use user1 for testing. - -// Get user by user name -UserAPI.getUserByName(username: username) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **String** | The name that needs to be fetched. Use user1 for testing. | - -### Return type - -[**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) - -# **loginUser** -```swift - open class func loginUser(username: String, password: String, completion: @escaping (_ data: String?, _ error: Error?) -> Void) -``` - -Logs user into the system - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let username = "username_example" // String | The user name for login -let password = "password_example" // String | The password for login in clear text - -// Logs user into the system -UserAPI.loginUser(username: username, password: password) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **String** | The user name for login | - **password** | **String** | The password for login in clear text | - -### 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) - -# **logoutUser** -```swift - open class func logoutUser(completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - -Logs out current logged in user session - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - - -// Logs out current logged in user session -UserAPI.logoutUser() { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -Void (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) - -# **updateUser** -```swift - open class func updateUser(username: String, body: User, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) -``` - -Updated user - -This can only be done by the logged in user. - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import PetstoreClient - -let username = "username_example" // String | name that need to be deleted -let body = User(id: 123, username: "username_example", firstName: "firstName_example", lastName: "lastName_example", email: "email_example", password: "password_example", phone: "phone_example", userStatus: 123) // User | Updated user object - -// Updated user -UserAPI.updateUser(username: username, body: body) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **String** | name that need to be deleted | - **body** | [**User**](User.md) | Updated user object | - -### Return type - -Void (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/swift4/unwrapRequired/git_push.sh b/samples/client/petstore/swift4/unwrapRequired/git_push.sh deleted file mode 100644 index ced3be2b0c7b..000000000000 --- a/samples/client/petstore/swift4/unwrapRequired/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/swift4/unwrapRequired/pom.xml b/samples/client/petstore/swift4/unwrapRequired/pom.xml deleted file mode 100644 index 5caba9cb4633..000000000000 --- a/samples/client/petstore/swift4/unwrapRequired/pom.xml +++ /dev/null @@ -1,43 +0,0 @@ - - 4.0.0 - io.swagger - Swift4PetstoreClientTests - pom - 1.0-SNAPSHOT - Swift4 Swagger Petstore Client - - - - maven-dependency-plugin - - - package - - copy-dependencies - - - ${project.build.directory} - - - - - - org.codehaus.mojo - exec-maven-plugin - 1.2.1 - - - xcodebuild-test - integration-test - - exec - - - ./run_spmbuild.sh - - - - - - - diff --git a/samples/client/petstore/swift4/unwrapRequired/project.yml b/samples/client/petstore/swift4/unwrapRequired/project.yml deleted file mode 100644 index 148b42517be9..000000000000 --- a/samples/client/petstore/swift4/unwrapRequired/project.yml +++ /dev/null @@ -1,15 +0,0 @@ -name: PetstoreClient -targets: - PetstoreClient: - type: framework - platform: iOS - deploymentTarget: "10.0" - sources: [PetstoreClient] - info: - path: ./Info.plist - version: 1.0.0 - settings: - APPLICATION_EXTENSION_API_ONLY: true - scheme: {} - dependencies: - - carthage: Alamofire diff --git a/samples/client/petstore/swift4/unwrapRequired/run_spmbuild.sh b/samples/client/petstore/swift4/unwrapRequired/run_spmbuild.sh deleted file mode 100755 index 1a9f585ad054..000000000000 --- a/samples/client/petstore/swift4/unwrapRequired/run_spmbuild.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -swift build && exit ${PIPESTATUS[0]} diff --git a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/model/order.ts b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/model/order.ts index f2c21d7d24c4..8a0ea8e6dd0d 100644 --- a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/model/order.ts +++ b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/model/order.ts @@ -22,10 +22,10 @@ export interface Order { /** * Order Status */ - status?: OrderStatus; + status?: OrderStatusEnum; complete?: boolean; } -export enum OrderStatus { +export enum OrderStatusEnum { Placed = 'placed', Approved = 'approved', Delivered = 'delivered' diff --git a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/model/pet.ts b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/model/pet.ts index 12e3d9b75910..96bf2cd3df45 100644 --- a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/model/pet.ts +++ b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/model/pet.ts @@ -25,9 +25,9 @@ export interface Pet { /** * pet status in the store */ - status?: PetStatus; + status?: PetStatusEnum; } -export enum PetStatus { +export enum PetStatusEnum { Available = 'available', Pending = 'pending', Sold = 'sold' diff --git a/samples/client/petstore/typescript-axios/builds/default/api.ts b/samples/client/petstore/typescript-axios/builds/default/api.ts index e252e289aa11..c82afd1ed5d4 100644 --- a/samples/client/petstore/typescript-axios/builds/default/api.ts +++ b/samples/client/petstore/typescript-axios/builds/default/api.ts @@ -986,7 +986,6 @@ export class PetApi extends BaseAPI { public uploadFile(petId: number, additionalMetadata?: string, file?: any, options?: any) { return PetApiFp(this.configuration).uploadFile(petId, additionalMetadata, file, options).then((request) => request(this.axios, this.basePath)); } - } @@ -1313,7 +1312,6 @@ export class StoreApi extends BaseAPI { public placeOrder(body: Order, options?: any) { return StoreApiFp(this.configuration).placeOrder(body, options).then((request) => request(this.axios, this.basePath)); } - } @@ -1953,7 +1951,6 @@ export class UserApi extends BaseAPI { public updateUser(username: string, body: User, options?: any) { return UserApiFp(this.configuration).updateUser(username, body, options).then((request) => request(this.axios, this.basePath)); } - } diff --git a/samples/client/petstore/typescript-axios/builds/es6-target/api.ts b/samples/client/petstore/typescript-axios/builds/es6-target/api.ts index e252e289aa11..c82afd1ed5d4 100644 --- a/samples/client/petstore/typescript-axios/builds/es6-target/api.ts +++ b/samples/client/petstore/typescript-axios/builds/es6-target/api.ts @@ -986,7 +986,6 @@ export class PetApi extends BaseAPI { public uploadFile(petId: number, additionalMetadata?: string, file?: any, options?: any) { return PetApiFp(this.configuration).uploadFile(petId, additionalMetadata, file, options).then((request) => request(this.axios, this.basePath)); } - } @@ -1313,7 +1312,6 @@ export class StoreApi extends BaseAPI { public placeOrder(body: Order, options?: any) { return StoreApiFp(this.configuration).placeOrder(body, options).then((request) => request(this.axios, this.basePath)); } - } @@ -1953,7 +1951,6 @@ export class UserApi extends BaseAPI { public updateUser(username: string, body: User, options?: any) { return UserApiFp(this.configuration).updateUser(username, body, options).then((request) => request(this.axios, this.basePath)); } - } diff --git a/samples/client/petstore/typescript-axios/builds/with-complex-headers/api.ts b/samples/client/petstore/typescript-axios/builds/with-complex-headers/api.ts index 9a223021114c..dc1fc46ef7b3 100644 --- a/samples/client/petstore/typescript-axios/builds/with-complex-headers/api.ts +++ b/samples/client/petstore/typescript-axios/builds/with-complex-headers/api.ts @@ -1041,7 +1041,6 @@ export class PetApi extends BaseAPI { public uploadFile(petId: number, additionalMetadata?: string, file?: any, options?: any) { return PetApiFp(this.configuration).uploadFile(petId, additionalMetadata, file, options).then((request) => request(this.axios, this.basePath)); } - } @@ -1368,7 +1367,6 @@ export class StoreApi extends BaseAPI { public placeOrder(order: Order, options?: any) { return StoreApiFp(this.configuration).placeOrder(order, options).then((request) => request(this.axios, this.basePath)); } - } @@ -2008,7 +2006,6 @@ export class UserApi extends BaseAPI { public updateUser(username: string, user: User, options?: any) { return UserApiFp(this.configuration).updateUser(username, user, options).then((request) => request(this.axios, this.basePath)); } - } diff --git a/samples/client/petstore/typescript-axios/builds/with-interfaces/api.ts b/samples/client/petstore/typescript-axios/builds/with-interfaces/api.ts index 14c956210b94..ac4f6d9e9d4b 100644 --- a/samples/client/petstore/typescript-axios/builds/with-interfaces/api.ts +++ b/samples/client/petstore/typescript-axios/builds/with-interfaces/api.ts @@ -1079,7 +1079,6 @@ export class PetApi extends BaseAPI implements PetApiInterface { public uploadFile(petId: number, additionalMetadata?: string, file?: any, options?: any) { return PetApiFp(this.configuration).uploadFile(petId, additionalMetadata, file, options).then((request) => request(this.axios, this.basePath)); } - } @@ -1453,7 +1452,6 @@ export class StoreApi extends BaseAPI implements StoreApiInterface { public placeOrder(body: Order, options?: any) { return StoreApiFp(this.configuration).placeOrder(body, options).then((request) => request(this.axios, this.basePath)); } - } @@ -2182,7 +2180,6 @@ export class UserApi extends BaseAPI implements UserApiInterface { public updateUser(username: string, body: User, options?: any) { return UserApiFp(this.configuration).updateUser(username, body, options).then((request) => request(this.axios, this.basePath)); } - } diff --git a/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/api/another/level/pet-api.ts b/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/api/another/level/pet-api.ts index 1358cf311a42..d3147eece07b 100644 --- a/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/api/another/level/pet-api.ts +++ b/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/api/another/level/pet-api.ts @@ -762,5 +762,4 @@ export class PetApi extends BaseAPI { public uploadFile(petId: number, additionalMetadata?: string, file?: any, options?: any) { return PetApiFp(this.configuration).uploadFile(petId, additionalMetadata, file, options).then((request) => request(this.axios, this.basePath)); } - } diff --git a/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/api/another/level/store-api.ts b/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/api/another/level/store-api.ts index 2dcb9e39bb7f..f6f895bc2149 100644 --- a/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/api/another/level/store-api.ts +++ b/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/api/another/level/store-api.ts @@ -343,5 +343,4 @@ export class StoreApi extends BaseAPI { public placeOrder(body: Order, options?: any) { return StoreApiFp(this.configuration).placeOrder(body, options).then((request) => request(this.axios, this.basePath)); } - } diff --git a/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/api/another/level/user-api.ts b/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/api/another/level/user-api.ts index 7319fd816bd0..88cf7e898eed 100644 --- a/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/api/another/level/user-api.ts +++ b/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/api/another/level/user-api.ts @@ -656,5 +656,4 @@ export class UserApi extends BaseAPI { public updateUser(username: string, body: User, options?: any) { return UserApiFp(this.configuration).updateUser(username, body, options).then((request) => request(this.axios, this.basePath)); } - } diff --git a/samples/client/petstore/typescript-axios/builds/with-npm-version/api.ts b/samples/client/petstore/typescript-axios/builds/with-npm-version/api.ts index e252e289aa11..c82afd1ed5d4 100644 --- a/samples/client/petstore/typescript-axios/builds/with-npm-version/api.ts +++ b/samples/client/petstore/typescript-axios/builds/with-npm-version/api.ts @@ -986,7 +986,6 @@ export class PetApi extends BaseAPI { public uploadFile(petId: number, additionalMetadata?: string, file?: any, options?: any) { return PetApiFp(this.configuration).uploadFile(petId, additionalMetadata, file, options).then((request) => request(this.axios, this.basePath)); } - } @@ -1313,7 +1312,6 @@ export class StoreApi extends BaseAPI { public placeOrder(body: Order, options?: any) { return StoreApiFp(this.configuration).placeOrder(body, options).then((request) => request(this.axios, this.basePath)); } - } @@ -1953,7 +1951,6 @@ export class UserApi extends BaseAPI { public updateUser(username: string, body: User, options?: any) { return UserApiFp(this.configuration).updateUser(username, body, options).then((request) => request(this.axios, this.basePath)); } - } diff --git a/samples/client/petstore/typescript-axios/builds/with-single-request-parameters/.gitignore b/samples/client/petstore/typescript-axios/builds/with-single-request-parameters/.gitignore new file mode 100644 index 000000000000..205d8013f46f --- /dev/null +++ b/samples/client/petstore/typescript-axios/builds/with-single-request-parameters/.gitignore @@ -0,0 +1,4 @@ +wwwroot/*.js +node_modules +typings +dist \ No newline at end of file diff --git a/samples/client/petstore/typescript-axios/builds/with-single-request-parameters/.npmignore b/samples/client/petstore/typescript-axios/builds/with-single-request-parameters/.npmignore new file mode 100644 index 000000000000..999d88df6939 --- /dev/null +++ b/samples/client/petstore/typescript-axios/builds/with-single-request-parameters/.npmignore @@ -0,0 +1 @@ +# empty npmignore to ensure all required files (e.g., in the dist folder) are published by npm \ No newline at end of file diff --git a/samples/client/petstore/swift4/default/.openapi-generator-ignore b/samples/client/petstore/typescript-axios/builds/with-single-request-parameters/.openapi-generator-ignore similarity index 100% rename from samples/client/petstore/swift4/default/.openapi-generator-ignore rename to samples/client/petstore/typescript-axios/builds/with-single-request-parameters/.openapi-generator-ignore diff --git a/samples/client/petstore/typescript-axios/builds/with-single-request-parameters/.openapi-generator/VERSION b/samples/client/petstore/typescript-axios/builds/with-single-request-parameters/.openapi-generator/VERSION new file mode 100644 index 000000000000..d99e7162d01f --- /dev/null +++ b/samples/client/petstore/typescript-axios/builds/with-single-request-parameters/.openapi-generator/VERSION @@ -0,0 +1 @@ +5.0.0-SNAPSHOT \ No newline at end of file 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 new file mode 100644 index 000000000000..e5f45026d560 --- /dev/null +++ b/samples/client/petstore/typescript-axios/builds/with-single-request-parameters/api.ts @@ -0,0 +1,2250 @@ +// tslint:disable +/** + * 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 * as globalImportUrl from 'url'; +import { Configuration } from './configuration'; +import globalAxios, { AxiosPromise, AxiosInstance } from 'axios'; +// Some imports not used depending on template conditions +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from './base'; + +/** + * Describes the result of uploading an image resource + * @export + * @interface ApiResponse + */ +export interface ApiResponse { + /** + * + * @type {number} + * @memberof ApiResponse + */ + code?: number; + /** + * + * @type {string} + * @memberof ApiResponse + */ + type?: string; + /** + * + * @type {string} + * @memberof ApiResponse + */ + message?: string; +} +/** + * A category for a pet + * @export + * @interface Category + */ +export interface Category { + /** + * + * @type {number} + * @memberof Category + */ + id?: number; + /** + * + * @type {string} + * @memberof Category + */ + name?: string; +} +/** + * An order for a pets from the pet store + * @export + * @interface Order + */ +export interface Order { + /** + * + * @type {number} + * @memberof Order + */ + id?: number; + /** + * + * @type {number} + * @memberof Order + */ + petId?: number; + /** + * + * @type {number} + * @memberof Order + */ + quantity?: number; + /** + * + * @type {string} + * @memberof Order + */ + shipDate?: string; + /** + * Order Status + * @type {string} + * @memberof Order + */ + status?: OrderStatusEnum; + /** + * + * @type {boolean} + * @memberof Order + */ + complete?: boolean; +} + +/** + * @export + * @enum {string} + */ +export enum OrderStatusEnum { + Placed = 'placed', + Approved = 'approved', + Delivered = 'delivered' +} + +/** + * A pet for sale in the pet store + * @export + * @interface Pet + */ +export interface Pet { + /** + * + * @type {number} + * @memberof Pet + */ + id?: number; + /** + * + * @type {Category} + * @memberof Pet + */ + category?: Category; + /** + * + * @type {string} + * @memberof Pet + */ + name: string; + /** + * + * @type {Array} + * @memberof Pet + */ + photoUrls: Array; + /** + * + * @type {Array} + * @memberof Pet + */ + tags?: Array; + /** + * pet status in the store + * @type {string} + * @memberof Pet + */ + status?: PetStatusEnum; +} + +/** + * @export + * @enum {string} + */ +export enum PetStatusEnum { + Available = 'available', + Pending = 'pending', + Sold = 'sold' +} + +/** + * A tag for a pet + * @export + * @interface Tag + */ +export interface Tag { + /** + * + * @type {number} + * @memberof Tag + */ + id?: number; + /** + * + * @type {string} + * @memberof Tag + */ + name?: string; +} +/** + * A User who is purchasing from the pet store + * @export + * @interface User + */ +export interface User { + /** + * + * @type {number} + * @memberof User + */ + id?: number; + /** + * + * @type {string} + * @memberof User + */ + username?: string; + /** + * + * @type {string} + * @memberof User + */ + firstName?: string; + /** + * + * @type {string} + * @memberof User + */ + lastName?: string; + /** + * + * @type {string} + * @memberof User + */ + email?: string; + /** + * + * @type {string} + * @memberof User + */ + password?: string; + /** + * + * @type {string} + * @memberof User + */ + phone?: string; + /** + * User Status + * @type {number} + * @memberof User + */ + userStatus?: number; +} + +/** + * PetApi - axios parameter creator + * @export + */ +export const PetApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * + * @summary Add a new pet to the store + * @param {Pet} body Pet object that needs to be added to the store + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + addPet: async (body: Pet, 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 addPet.'); + } + const localVarPath = `/pet`; + const localVarUrlObj = globalImportUrl.parse(localVarPath, true); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication petstore_auth required + // oauth required + if (configuration && configuration.accessToken) { + const localVarAccessTokenValue = typeof configuration.accessToken === 'function' + ? configuration.accessToken("petstore_auth", ["write:pets", "read:pets"]) + : configuration.accessToken; + localVarHeaderParameter["Authorization"] = "Bearer " + localVarAccessTokenValue; + } + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + localVarUrlObj.query = {...localVarUrlObj.query, ...localVarQueryParameter, ...options.query}; + // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 + delete localVarUrlObj.search; + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; + localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || ""); + + return { + url: globalImportUrl.format(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary Deletes a pet + * @param {number} petId Pet id to delete + * @param {string} [apiKey] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deletePet: async (petId: number, apiKey?: string, options: any = {}): Promise => { + // verify required parameter 'petId' is not null or undefined + if (petId === null || petId === undefined) { + throw new RequiredError('petId','Required parameter petId was null or undefined when calling deletePet.'); + } + const localVarPath = `/pet/{petId}` + .replace(`{${"petId"}}`, encodeURIComponent(String(petId))); + const localVarUrlObj = globalImportUrl.parse(localVarPath, true); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication petstore_auth required + // oauth required + if (configuration && configuration.accessToken) { + const localVarAccessTokenValue = typeof configuration.accessToken === 'function' + ? configuration.accessToken("petstore_auth", ["write:pets", "read:pets"]) + : configuration.accessToken; + localVarHeaderParameter["Authorization"] = "Bearer " + localVarAccessTokenValue; + } + + if (apiKey !== undefined && apiKey !== null) { + localVarHeaderParameter['api_key'] = String(apiKey); + } + + + + localVarUrlObj.query = {...localVarUrlObj.query, ...localVarQueryParameter, ...options.query}; + // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 + delete localVarUrlObj.search; + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: globalImportUrl.format(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Multiple status values can be provided with comma separated strings + * @summary Finds Pets by status + * @param {Array<'available' | 'pending' | 'sold'>} status Status values that need to be considered for filter + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + findPetsByStatus: async (status: Array<'available' | 'pending' | 'sold'>, options: any = {}): Promise => { + // verify required parameter 'status' is not null or undefined + if (status === null || status === undefined) { + throw new RequiredError('status','Required parameter status was null or undefined when calling findPetsByStatus.'); + } + const localVarPath = `/pet/findByStatus`; + const localVarUrlObj = globalImportUrl.parse(localVarPath, true); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication petstore_auth required + // oauth required + if (configuration && configuration.accessToken) { + const localVarAccessTokenValue = typeof configuration.accessToken === 'function' + ? configuration.accessToken("petstore_auth", ["write:pets", "read:pets"]) + : configuration.accessToken; + localVarHeaderParameter["Authorization"] = "Bearer " + localVarAccessTokenValue; + } + + if (status) { + localVarQueryParameter['status'] = status.join(COLLECTION_FORMATS.csv); + } + + + + localVarUrlObj.query = {...localVarUrlObj.query, ...localVarQueryParameter, ...options.query}; + // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 + delete localVarUrlObj.search; + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: globalImportUrl.format(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + * @summary Finds Pets by tags + * @param {Array} tags Tags to filter by + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + findPetsByTags: async (tags: Array, options: any = {}): Promise => { + // verify required parameter 'tags' is not null or undefined + if (tags === null || tags === undefined) { + throw new RequiredError('tags','Required parameter tags was null or undefined when calling findPetsByTags.'); + } + const localVarPath = `/pet/findByTags`; + const localVarUrlObj = globalImportUrl.parse(localVarPath, true); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication petstore_auth required + // oauth required + if (configuration && configuration.accessToken) { + const localVarAccessTokenValue = typeof configuration.accessToken === 'function' + ? configuration.accessToken("petstore_auth", ["write:pets", "read:pets"]) + : configuration.accessToken; + localVarHeaderParameter["Authorization"] = "Bearer " + localVarAccessTokenValue; + } + + if (tags) { + localVarQueryParameter['tags'] = tags.join(COLLECTION_FORMATS.csv); + } + + + + localVarUrlObj.query = {...localVarUrlObj.query, ...localVarQueryParameter, ...options.query}; + // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 + delete localVarUrlObj.search; + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: globalImportUrl.format(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Returns a single pet + * @summary Find pet by ID + * @param {number} petId ID of pet to return + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getPetById: async (petId: number, options: any = {}): Promise => { + // verify required parameter 'petId' is not null or undefined + if (petId === null || petId === undefined) { + throw new RequiredError('petId','Required parameter petId was null or undefined when calling getPetById.'); + } + const localVarPath = `/pet/{petId}` + .replace(`{${"petId"}}`, encodeURIComponent(String(petId))); + const localVarUrlObj = globalImportUrl.parse(localVarPath, true); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication api_key required + if (configuration && configuration.apiKey) { + const localVarApiKeyValue = typeof configuration.apiKey === 'function' + ? await configuration.apiKey("api_key") + : await configuration.apiKey; + localVarHeaderParameter["api_key"] = localVarApiKeyValue; + } + + + + localVarUrlObj.query = {...localVarUrlObj.query, ...localVarQueryParameter, ...options.query}; + // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 + delete localVarUrlObj.search; + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: globalImportUrl.format(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary Update an existing pet + * @param {Pet} body Pet object that needs to be added to the store + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updatePet: async (body: Pet, 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 updatePet.'); + } + const localVarPath = `/pet`; + const localVarUrlObj = globalImportUrl.parse(localVarPath, true); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication petstore_auth required + // oauth required + if (configuration && configuration.accessToken) { + const localVarAccessTokenValue = typeof configuration.accessToken === 'function' + ? configuration.accessToken("petstore_auth", ["write:pets", "read:pets"]) + : configuration.accessToken; + localVarHeaderParameter["Authorization"] = "Bearer " + localVarAccessTokenValue; + } + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + localVarUrlObj.query = {...localVarUrlObj.query, ...localVarQueryParameter, ...options.query}; + // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 + delete localVarUrlObj.search; + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; + localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || ""); + + return { + url: globalImportUrl.format(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary Updates a pet in the store with form data + * @param {number} petId ID of pet that needs to be updated + * @param {string} [name] Updated name of the pet + * @param {string} [status] Updated status of the pet + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updatePetWithForm: async (petId: number, name?: string, status?: string, options: any = {}): Promise => { + // verify required parameter 'petId' is not null or undefined + if (petId === null || petId === undefined) { + throw new RequiredError('petId','Required parameter petId was null or undefined when calling updatePetWithForm.'); + } + const localVarPath = `/pet/{petId}` + .replace(`{${"petId"}}`, encodeURIComponent(String(petId))); + const localVarUrlObj = globalImportUrl.parse(localVarPath, true); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + const localVarFormParams = new URLSearchParams(); + + // authentication petstore_auth required + // oauth required + if (configuration && configuration.accessToken) { + const localVarAccessTokenValue = typeof configuration.accessToken === 'function' + ? configuration.accessToken("petstore_auth", ["write:pets", "read:pets"]) + : configuration.accessToken; + localVarHeaderParameter["Authorization"] = "Bearer " + localVarAccessTokenValue; + } + + + if (name !== undefined) { + localVarFormParams.set('name', name as any); + } + + if (status !== undefined) { + localVarFormParams.set('status', status as any); + } + + + localVarHeaderParameter['Content-Type'] = 'application/x-www-form-urlencoded'; + + localVarUrlObj.query = {...localVarUrlObj.query, ...localVarQueryParameter, ...options.query}; + // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 + delete localVarUrlObj.search; + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = localVarFormParams.toString(); + + return { + url: globalImportUrl.format(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary uploads an image + * @param {number} petId ID of pet to update + * @param {string} [additionalMetadata] Additional data to pass to server + * @param {any} [file] file to upload + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + uploadFile: async (petId: number, additionalMetadata?: string, file?: any, options: any = {}): Promise => { + // verify required parameter 'petId' is not null or undefined + if (petId === null || petId === undefined) { + throw new RequiredError('petId','Required parameter petId was null or undefined when calling uploadFile.'); + } + const localVarPath = `/pet/{petId}/uploadImage` + .replace(`{${"petId"}}`, encodeURIComponent(String(petId))); + const localVarUrlObj = globalImportUrl.parse(localVarPath, true); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + const localVarFormParams = new FormData(); + + // authentication petstore_auth required + // oauth required + if (configuration && configuration.accessToken) { + const localVarAccessTokenValue = typeof configuration.accessToken === 'function' + ? configuration.accessToken("petstore_auth", ["write:pets", "read:pets"]) + : configuration.accessToken; + localVarHeaderParameter["Authorization"] = "Bearer " + localVarAccessTokenValue; + } + + + if (additionalMetadata !== undefined) { + localVarFormParams.append('additionalMetadata', additionalMetadata as any); + } + + if (file !== undefined) { + localVarFormParams.append('file', file as any); + } + + + localVarHeaderParameter['Content-Type'] = 'multipart/form-data'; + + localVarUrlObj.query = {...localVarUrlObj.query, ...localVarQueryParameter, ...options.query}; + // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 + delete localVarUrlObj.search; + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = localVarFormParams; + + return { + url: globalImportUrl.format(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * PetApi - functional programming interface + * @export + */ +export const PetApiFp = function(configuration?: Configuration) { + return { + /** + * + * @summary Add a new pet to the store + * @param {Pet} body Pet object that needs to be added to the store + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async addPet(body: Pet, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await PetApiAxiosParamCreator(configuration).addPet(body, options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; + return axios.request(axiosRequestArgs); + }; + }, + /** + * + * @summary Deletes a pet + * @param {number} petId Pet id to delete + * @param {string} [apiKey] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async deletePet(petId: number, apiKey?: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await PetApiAxiosParamCreator(configuration).deletePet(petId, apiKey, options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; + return axios.request(axiosRequestArgs); + }; + }, + /** + * Multiple status values can be provided with comma separated strings + * @summary Finds Pets by status + * @param {Array<'available' | 'pending' | 'sold'>} status Status values that need to be considered for filter + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + const localVarAxiosArgs = await PetApiAxiosParamCreator(configuration).findPetsByStatus(status, options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; + return axios.request(axiosRequestArgs); + }; + }, + /** + * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + * @summary Finds Pets by tags + * @param {Array} tags Tags to filter by + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async findPetsByTags(tags: Array, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + const localVarAxiosArgs = await PetApiAxiosParamCreator(configuration).findPetsByTags(tags, options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; + return axios.request(axiosRequestArgs); + }; + }, + /** + * Returns a single pet + * @summary Find pet by ID + * @param {number} petId ID of pet to return + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getPetById(petId: number, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await PetApiAxiosParamCreator(configuration).getPetById(petId, options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; + return axios.request(axiosRequestArgs); + }; + }, + /** + * + * @summary Update an existing pet + * @param {Pet} body Pet object that needs to be added to the store + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async updatePet(body: Pet, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await PetApiAxiosParamCreator(configuration).updatePet(body, options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; + return axios.request(axiosRequestArgs); + }; + }, + /** + * + * @summary Updates a pet in the store with form data + * @param {number} petId ID of pet that needs to be updated + * @param {string} [name] Updated name of the pet + * @param {string} [status] Updated status of the pet + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async updatePetWithForm(petId: number, name?: string, status?: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await PetApiAxiosParamCreator(configuration).updatePetWithForm(petId, name, status, options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; + return axios.request(axiosRequestArgs); + }; + }, + /** + * + * @summary uploads an image + * @param {number} petId ID of pet to update + * @param {string} [additionalMetadata] Additional data to pass to server + * @param {any} [file] file to upload + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async uploadFile(petId: number, additionalMetadata?: string, file?: any, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await PetApiAxiosParamCreator(configuration).uploadFile(petId, additionalMetadata, file, options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; + return axios.request(axiosRequestArgs); + }; + }, + } +}; + +/** + * PetApi - factory interface + * @export + */ +export const PetApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + return { + /** + * + * @summary Add a new pet to the store + * @param {Pet} body Pet object that needs to be added to the store + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + addPet(body: Pet, options?: any): AxiosPromise { + return PetApiFp(configuration).addPet(body, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary Deletes a pet + * @param {number} petId Pet id to delete + * @param {string} [apiKey] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deletePet(petId: number, apiKey?: string, options?: any): AxiosPromise { + return PetApiFp(configuration).deletePet(petId, apiKey, options).then((request) => request(axios, basePath)); + }, + /** + * Multiple status values can be provided with comma separated strings + * @summary Finds Pets by status + * @param {Array<'available' | 'pending' | 'sold'>} status Status values that need to be considered for filter + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, options?: any): AxiosPromise> { + return PetApiFp(configuration).findPetsByStatus(status, options).then((request) => request(axios, basePath)); + }, + /** + * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + * @summary Finds Pets by tags + * @param {Array} tags Tags to filter by + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + findPetsByTags(tags: Array, options?: any): AxiosPromise> { + return PetApiFp(configuration).findPetsByTags(tags, options).then((request) => request(axios, basePath)); + }, + /** + * Returns a single pet + * @summary Find pet by ID + * @param {number} petId ID of pet to return + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getPetById(petId: number, options?: any): AxiosPromise { + return PetApiFp(configuration).getPetById(petId, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary Update an existing pet + * @param {Pet} body Pet object that needs to be added to the store + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updatePet(body: Pet, options?: any): AxiosPromise { + return PetApiFp(configuration).updatePet(body, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary Updates a pet in the store with form data + * @param {number} petId ID of pet that needs to be updated + * @param {string} [name] Updated name of the pet + * @param {string} [status] Updated status of the pet + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updatePetWithForm(petId: number, name?: string, status?: string, options?: any): AxiosPromise { + return PetApiFp(configuration).updatePetWithForm(petId, name, status, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary uploads an image + * @param {number} petId ID of pet to update + * @param {string} [additionalMetadata] Additional data to pass to server + * @param {any} [file] file to upload + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + uploadFile(petId: number, additionalMetadata?: string, file?: any, options?: any): AxiosPromise { + return PetApiFp(configuration).uploadFile(petId, additionalMetadata, file, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * Request parameters for addPet operation in PetApi. + * @export + * @interface PetApiAddPetRequest + */ +export interface PetApiAddPetRequest { + /** + * Pet object that needs to be added to the store + * @type {Pet} + * @memberof PetApiAddPet + */ + readonly body: Pet +} + +/** + * Request parameters for deletePet operation in PetApi. + * @export + * @interface PetApiDeletePetRequest + */ +export interface PetApiDeletePetRequest { + /** + * Pet id to delete + * @type {number} + * @memberof PetApiDeletePet + */ + readonly petId: number + + /** + * + * @type {string} + * @memberof PetApiDeletePet + */ + readonly apiKey?: string +} + +/** + * Request parameters for findPetsByStatus operation in PetApi. + * @export + * @interface PetApiFindPetsByStatusRequest + */ +export interface PetApiFindPetsByStatusRequest { + /** + * Status values that need to be considered for filter + * @type {Array<'available' | 'pending' | 'sold'>} + * @memberof PetApiFindPetsByStatus + */ + readonly status: Array<'available' | 'pending' | 'sold'> +} + +/** + * Request parameters for findPetsByTags operation in PetApi. + * @export + * @interface PetApiFindPetsByTagsRequest + */ +export interface PetApiFindPetsByTagsRequest { + /** + * Tags to filter by + * @type {Array} + * @memberof PetApiFindPetsByTags + */ + readonly tags: Array +} + +/** + * Request parameters for getPetById operation in PetApi. + * @export + * @interface PetApiGetPetByIdRequest + */ +export interface PetApiGetPetByIdRequest { + /** + * ID of pet to return + * @type {number} + * @memberof PetApiGetPetById + */ + readonly petId: number +} + +/** + * Request parameters for updatePet operation in PetApi. + * @export + * @interface PetApiUpdatePetRequest + */ +export interface PetApiUpdatePetRequest { + /** + * Pet object that needs to be added to the store + * @type {Pet} + * @memberof PetApiUpdatePet + */ + readonly body: Pet +} + +/** + * Request parameters for updatePetWithForm operation in PetApi. + * @export + * @interface PetApiUpdatePetWithFormRequest + */ +export interface PetApiUpdatePetWithFormRequest { + /** + * ID of pet that needs to be updated + * @type {number} + * @memberof PetApiUpdatePetWithForm + */ + readonly petId: number + + /** + * Updated name of the pet + * @type {string} + * @memberof PetApiUpdatePetWithForm + */ + readonly name?: string + + /** + * Updated status of the pet + * @type {string} + * @memberof PetApiUpdatePetWithForm + */ + readonly status?: string +} + +/** + * Request parameters for uploadFile operation in PetApi. + * @export + * @interface PetApiUploadFileRequest + */ +export interface PetApiUploadFileRequest { + /** + * ID of pet to update + * @type {number} + * @memberof PetApiUploadFile + */ + readonly petId: number + + /** + * Additional data to pass to server + * @type {string} + * @memberof PetApiUploadFile + */ + readonly additionalMetadata?: string + + /** + * file to upload + * @type {any} + * @memberof PetApiUploadFile + */ + readonly file?: any +} + +/** + * PetApi - object-oriented interface + * @export + * @class PetApi + * @extends {BaseAPI} + */ +export class PetApi extends BaseAPI { + /** + * + * @summary Add a new pet to the store + * @param {PetApiAddPetRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof PetApi + */ + public addPet(requestParameters: PetApiAddPetRequest, options?: any) { + return PetApiFp(this.configuration).addPet(requestParameters.body, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary Deletes a pet + * @param {PetApiDeletePetRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof PetApi + */ + public deletePet(requestParameters: PetApiDeletePetRequest, options?: any) { + return PetApiFp(this.configuration).deletePet(requestParameters.petId, requestParameters.apiKey, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Multiple status values can be provided with comma separated strings + * @summary Finds Pets by status + * @param {PetApiFindPetsByStatusRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof PetApi + */ + public findPetsByStatus(requestParameters: PetApiFindPetsByStatusRequest, options?: any) { + return PetApiFp(this.configuration).findPetsByStatus(requestParameters.status, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + * @summary Finds Pets by tags + * @param {PetApiFindPetsByTagsRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof PetApi + */ + public findPetsByTags(requestParameters: PetApiFindPetsByTagsRequest, options?: any) { + return PetApiFp(this.configuration).findPetsByTags(requestParameters.tags, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns a single pet + * @summary Find pet by ID + * @param {PetApiGetPetByIdRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof PetApi + */ + public getPetById(requestParameters: PetApiGetPetByIdRequest, options?: any) { + return PetApiFp(this.configuration).getPetById(requestParameters.petId, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary Update an existing pet + * @param {PetApiUpdatePetRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof PetApi + */ + public updatePet(requestParameters: PetApiUpdatePetRequest, options?: any) { + return PetApiFp(this.configuration).updatePet(requestParameters.body, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary Updates a pet in the store with form data + * @param {PetApiUpdatePetWithFormRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof PetApi + */ + public updatePetWithForm(requestParameters: PetApiUpdatePetWithFormRequest, options?: any) { + return PetApiFp(this.configuration).updatePetWithForm(requestParameters.petId, requestParameters.name, requestParameters.status, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary uploads an image + * @param {PetApiUploadFileRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof PetApi + */ + public uploadFile(requestParameters: PetApiUploadFileRequest, options?: any) { + return PetApiFp(this.configuration).uploadFile(requestParameters.petId, requestParameters.additionalMetadata, requestParameters.file, options).then((request) => request(this.axios, this.basePath)); + } +} + + +/** + * StoreApi - axios parameter creator + * @export + */ +export const StoreApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * 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 {string} orderId ID of the order that needs to be deleted + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deleteOrder: async (orderId: string, options: any = {}): Promise => { + // verify required parameter 'orderId' is not null or undefined + if (orderId === null || orderId === undefined) { + throw new RequiredError('orderId','Required parameter orderId was null or undefined when calling deleteOrder.'); + } + const localVarPath = `/store/order/{orderId}` + .replace(`{${"orderId"}}`, encodeURIComponent(String(orderId))); + const localVarUrlObj = globalImportUrl.parse(localVarPath, true); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + localVarUrlObj.query = {...localVarUrlObj.query, ...localVarQueryParameter, ...options.query}; + // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 + delete localVarUrlObj.search; + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: globalImportUrl.format(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Returns a map of status codes to quantities + * @summary Returns pet inventories by status + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getInventory: async (options: any = {}): Promise => { + const localVarPath = `/store/inventory`; + const localVarUrlObj = globalImportUrl.parse(localVarPath, true); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication api_key required + if (configuration && configuration.apiKey) { + const localVarApiKeyValue = typeof configuration.apiKey === 'function' + ? await configuration.apiKey("api_key") + : await configuration.apiKey; + localVarHeaderParameter["api_key"] = localVarApiKeyValue; + } + + + + localVarUrlObj.query = {...localVarUrlObj.query, ...localVarQueryParameter, ...options.query}; + // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 + delete localVarUrlObj.search; + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: globalImportUrl.format(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * @summary Find purchase order by ID + * @param {number} orderId ID of pet that needs to be fetched + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getOrderById: async (orderId: number, options: any = {}): Promise => { + // verify required parameter 'orderId' is not null or undefined + if (orderId === null || orderId === undefined) { + throw new RequiredError('orderId','Required parameter orderId was null or undefined when calling getOrderById.'); + } + const localVarPath = `/store/order/{orderId}` + .replace(`{${"orderId"}}`, encodeURIComponent(String(orderId))); + const localVarUrlObj = globalImportUrl.parse(localVarPath, true); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + localVarUrlObj.query = {...localVarUrlObj.query, ...localVarQueryParameter, ...options.query}; + // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 + delete localVarUrlObj.search; + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: globalImportUrl.format(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary Place an order for a 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.'); + } + const localVarPath = `/store/order`; + const localVarUrlObj = globalImportUrl.parse(localVarPath, true); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + localVarUrlObj.query = {...localVarUrlObj.query, ...localVarQueryParameter, ...options.query}; + // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 + delete localVarUrlObj.search; + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; + localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || ""); + + return { + url: globalImportUrl.format(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * StoreApi - functional programming interface + * @export + */ +export const StoreApiFp = function(configuration?: Configuration) { + return { + /** + * 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 {string} orderId ID of the order that needs to be deleted + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async deleteOrder(orderId: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await StoreApiAxiosParamCreator(configuration).deleteOrder(orderId, options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; + return axios.request(axiosRequestArgs); + }; + }, + /** + * Returns a map of status codes to quantities + * @summary Returns pet inventories by status + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getInventory(options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: number; }>> { + const localVarAxiosArgs = await StoreApiAxiosParamCreator(configuration).getInventory(options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; + return axios.request(axiosRequestArgs); + }; + }, + /** + * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * @summary Find purchase order by ID + * @param {number} orderId ID of pet that needs to be fetched + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getOrderById(orderId: number, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await StoreApiAxiosParamCreator(configuration).getOrderById(orderId, options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; + return axios.request(axiosRequestArgs); + }; + }, + /** + * + * @summary Place an order for a 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> { + const localVarAxiosArgs = await StoreApiAxiosParamCreator(configuration).placeOrder(body, options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; + return axios.request(axiosRequestArgs); + }; + }, + } +}; + +/** + * StoreApi - factory interface + * @export + */ +export const StoreApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + return { + /** + * 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 {string} orderId ID of the order that needs to be deleted + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deleteOrder(orderId: string, options?: any): AxiosPromise { + return StoreApiFp(configuration).deleteOrder(orderId, options).then((request) => request(axios, basePath)); + }, + /** + * Returns a map of status codes to quantities + * @summary Returns pet inventories by status + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getInventory(options?: any): AxiosPromise<{ [key: string]: number; }> { + return StoreApiFp(configuration).getInventory(options).then((request) => request(axios, basePath)); + }, + /** + * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * @summary Find purchase order by ID + * @param {number} orderId ID of pet that needs to be fetched + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getOrderById(orderId: number, options?: any): AxiosPromise { + return StoreApiFp(configuration).getOrderById(orderId, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary Place an order for a pet + * @param {Order} body order placed for purchasing the pet + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + placeOrder(body: Order, options?: any): AxiosPromise { + return StoreApiFp(configuration).placeOrder(body, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * Request parameters for deleteOrder operation in StoreApi. + * @export + * @interface StoreApiDeleteOrderRequest + */ +export interface StoreApiDeleteOrderRequest { + /** + * ID of the order that needs to be deleted + * @type {string} + * @memberof StoreApiDeleteOrder + */ + readonly orderId: string +} + +/** + * Request parameters for getOrderById operation in StoreApi. + * @export + * @interface StoreApiGetOrderByIdRequest + */ +export interface StoreApiGetOrderByIdRequest { + /** + * ID of pet that needs to be fetched + * @type {number} + * @memberof StoreApiGetOrderById + */ + readonly orderId: number +} + +/** + * Request parameters for placeOrder operation in StoreApi. + * @export + * @interface StoreApiPlaceOrderRequest + */ +export interface StoreApiPlaceOrderRequest { + /** + * order placed for purchasing the pet + * @type {Order} + * @memberof StoreApiPlaceOrder + */ + readonly body: Order +} + +/** + * StoreApi - object-oriented interface + * @export + * @class StoreApi + * @extends {BaseAPI} + */ +export class StoreApi extends BaseAPI { + /** + * 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 {StoreApiDeleteOrderRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof StoreApi + */ + public deleteOrder(requestParameters: StoreApiDeleteOrderRequest, options?: any) { + return StoreApiFp(this.configuration).deleteOrder(requestParameters.orderId, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns a map of status codes to quantities + * @summary Returns pet inventories by status + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof StoreApi + */ + public getInventory(options?: any) { + return StoreApiFp(this.configuration).getInventory(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * @summary Find purchase order by ID + * @param {StoreApiGetOrderByIdRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof StoreApi + */ + public getOrderById(requestParameters: StoreApiGetOrderByIdRequest, options?: any) { + return StoreApiFp(this.configuration).getOrderById(requestParameters.orderId, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary Place an order for a pet + * @param {StoreApiPlaceOrderRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof StoreApi + */ + public placeOrder(requestParameters: StoreApiPlaceOrderRequest, options?: any) { + return StoreApiFp(this.configuration).placeOrder(requestParameters.body, options).then((request) => request(this.axios, this.basePath)); + } +} + + +/** + * UserApi - axios parameter creator + * @export + */ +export const UserApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * This can only be done by the logged in user. + * @summary Create user + * @param {User} body Created user object + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createUser: async (body: User, 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 createUser.'); + } + const localVarPath = `/user`; + const localVarUrlObj = globalImportUrl.parse(localVarPath, true); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + localVarUrlObj.query = {...localVarUrlObj.query, ...localVarQueryParameter, ...options.query}; + // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 + delete localVarUrlObj.search; + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; + localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || ""); + + return { + url: globalImportUrl.format(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary Creates list of users with given input array + * @param {Array} body List of user object + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createUsersWithArrayInput: async (body: Array, 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 createUsersWithArrayInput.'); + } + const localVarPath = `/user/createWithArray`; + const localVarUrlObj = globalImportUrl.parse(localVarPath, true); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + localVarUrlObj.query = {...localVarUrlObj.query, ...localVarQueryParameter, ...options.query}; + // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 + delete localVarUrlObj.search; + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; + localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || ""); + + return { + url: globalImportUrl.format(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary Creates list of users with given input array + * @param {Array} body List of user object + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createUsersWithListInput: async (body: Array, 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 createUsersWithListInput.'); + } + const localVarPath = `/user/createWithList`; + const localVarUrlObj = globalImportUrl.parse(localVarPath, true); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + localVarUrlObj.query = {...localVarUrlObj.query, ...localVarQueryParameter, ...options.query}; + // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 + delete localVarUrlObj.search; + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; + localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || ""); + + return { + url: globalImportUrl.format(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * This can only be done by the logged in user. + * @summary Delete user + * @param {string} username The name that needs to be deleted + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deleteUser: async (username: string, options: any = {}): Promise => { + // verify required parameter 'username' is not null or undefined + if (username === null || username === undefined) { + throw new RequiredError('username','Required parameter username was null or undefined when calling deleteUser.'); + } + const localVarPath = `/user/{username}` + .replace(`{${"username"}}`, encodeURIComponent(String(username))); + const localVarUrlObj = globalImportUrl.parse(localVarPath, true); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + localVarUrlObj.query = {...localVarUrlObj.query, ...localVarQueryParameter, ...options.query}; + // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 + delete localVarUrlObj.search; + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: globalImportUrl.format(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary Get user by user name + * @param {string} username The name that needs to be fetched. Use user1 for testing. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getUserByName: async (username: string, options: any = {}): Promise => { + // verify required parameter 'username' is not null or undefined + if (username === null || username === undefined) { + throw new RequiredError('username','Required parameter username was null or undefined when calling getUserByName.'); + } + const localVarPath = `/user/{username}` + .replace(`{${"username"}}`, encodeURIComponent(String(username))); + const localVarUrlObj = globalImportUrl.parse(localVarPath, true); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + localVarUrlObj.query = {...localVarUrlObj.query, ...localVarQueryParameter, ...options.query}; + // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 + delete localVarUrlObj.search; + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: globalImportUrl.format(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary Logs user into the system + * @param {string} username The user name for login + * @param {string} password The password for login in clear text + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + loginUser: async (username: string, password: string, options: any = {}): Promise => { + // verify required parameter 'username' is not null or undefined + if (username === null || username === undefined) { + throw new RequiredError('username','Required parameter username was null or undefined when calling loginUser.'); + } + // verify required parameter 'password' is not null or undefined + if (password === null || password === undefined) { + throw new RequiredError('password','Required parameter password was null or undefined when calling loginUser.'); + } + const localVarPath = `/user/login`; + const localVarUrlObj = globalImportUrl.parse(localVarPath, true); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + if (username !== undefined) { + localVarQueryParameter['username'] = username; + } + + if (password !== undefined) { + localVarQueryParameter['password'] = password; + } + + + + localVarUrlObj.query = {...localVarUrlObj.query, ...localVarQueryParameter, ...options.query}; + // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 + delete localVarUrlObj.search; + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: globalImportUrl.format(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary Logs out current logged in user session + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + logoutUser: async (options: any = {}): Promise => { + const localVarPath = `/user/logout`; + const localVarUrlObj = globalImportUrl.parse(localVarPath, true); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + localVarUrlObj.query = {...localVarUrlObj.query, ...localVarQueryParameter, ...options.query}; + // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 + delete localVarUrlObj.search; + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: globalImportUrl.format(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * This can only be done by the logged in user. + * @summary Updated user + * @param {string} username name that need to be deleted + * @param {User} body Updated user object + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updateUser: async (username: string, body: User, options: any = {}): Promise => { + // verify required parameter 'username' is not null or undefined + if (username === null || username === undefined) { + throw new RequiredError('username','Required parameter username was null or undefined when calling updateUser.'); + } + // 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 updateUser.'); + } + const localVarPath = `/user/{username}` + .replace(`{${"username"}}`, encodeURIComponent(String(username))); + const localVarUrlObj = globalImportUrl.parse(localVarPath, true); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + localVarUrlObj.query = {...localVarUrlObj.query, ...localVarQueryParameter, ...options.query}; + // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 + delete localVarUrlObj.search; + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; + localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || ""); + + return { + url: globalImportUrl.format(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * UserApi - functional programming interface + * @export + */ +export const UserApiFp = function(configuration?: Configuration) { + return { + /** + * This can only be done by the logged in user. + * @summary Create user + * @param {User} body Created user object + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async createUser(body: User, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await UserApiAxiosParamCreator(configuration).createUser(body, options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; + return axios.request(axiosRequestArgs); + }; + }, + /** + * + * @summary Creates list of users with given input array + * @param {Array} body List of user object + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async createUsersWithArrayInput(body: Array, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await UserApiAxiosParamCreator(configuration).createUsersWithArrayInput(body, options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; + return axios.request(axiosRequestArgs); + }; + }, + /** + * + * @summary Creates list of users with given input array + * @param {Array} body List of user object + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async createUsersWithListInput(body: Array, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await UserApiAxiosParamCreator(configuration).createUsersWithListInput(body, options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; + return axios.request(axiosRequestArgs); + }; + }, + /** + * This can only be done by the logged in user. + * @summary Delete user + * @param {string} username The name that needs to be deleted + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async deleteUser(username: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await UserApiAxiosParamCreator(configuration).deleteUser(username, options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; + return axios.request(axiosRequestArgs); + }; + }, + /** + * + * @summary Get user by user name + * @param {string} username The name that needs to be fetched. Use user1 for testing. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getUserByName(username: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await UserApiAxiosParamCreator(configuration).getUserByName(username, options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; + return axios.request(axiosRequestArgs); + }; + }, + /** + * + * @summary Logs user into the system + * @param {string} username The user name for login + * @param {string} password The password for login in clear text + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async loginUser(username: string, password: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await UserApiAxiosParamCreator(configuration).loginUser(username, password, options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; + return axios.request(axiosRequestArgs); + }; + }, + /** + * + * @summary Logs out current logged in user session + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async logoutUser(options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await UserApiAxiosParamCreator(configuration).logoutUser(options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; + return axios.request(axiosRequestArgs); + }; + }, + /** + * This can only be done by the logged in user. + * @summary Updated user + * @param {string} username name that need to be deleted + * @param {User} body Updated user object + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async updateUser(username: string, body: User, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await UserApiAxiosParamCreator(configuration).updateUser(username, body, options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; + return axios.request(axiosRequestArgs); + }; + }, + } +}; + +/** + * UserApi - factory interface + * @export + */ +export const UserApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + return { + /** + * This can only be done by the logged in user. + * @summary Create user + * @param {User} body Created user object + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createUser(body: User, options?: any): AxiosPromise { + return UserApiFp(configuration).createUser(body, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary Creates list of users with given input array + * @param {Array} body List of user object + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createUsersWithArrayInput(body: Array, options?: any): AxiosPromise { + return UserApiFp(configuration).createUsersWithArrayInput(body, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary Creates list of users with given input array + * @param {Array} body List of user object + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createUsersWithListInput(body: Array, options?: any): AxiosPromise { + return UserApiFp(configuration).createUsersWithListInput(body, options).then((request) => request(axios, basePath)); + }, + /** + * This can only be done by the logged in user. + * @summary Delete user + * @param {string} username The name that needs to be deleted + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deleteUser(username: string, options?: any): AxiosPromise { + return UserApiFp(configuration).deleteUser(username, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary Get user by user name + * @param {string} username The name that needs to be fetched. Use user1 for testing. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getUserByName(username: string, options?: any): AxiosPromise { + return UserApiFp(configuration).getUserByName(username, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary Logs user into the system + * @param {string} username The user name for login + * @param {string} password The password for login in clear text + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + loginUser(username: string, password: string, options?: any): AxiosPromise { + return UserApiFp(configuration).loginUser(username, password, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary Logs out current logged in user session + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + logoutUser(options?: any): AxiosPromise { + return UserApiFp(configuration).logoutUser(options).then((request) => request(axios, basePath)); + }, + /** + * This can only be done by the logged in user. + * @summary Updated user + * @param {string} username name that need to be deleted + * @param {User} body Updated user object + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updateUser(username: string, body: User, options?: any): AxiosPromise { + return UserApiFp(configuration).updateUser(username, body, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * Request parameters for createUser operation in UserApi. + * @export + * @interface UserApiCreateUserRequest + */ +export interface UserApiCreateUserRequest { + /** + * Created user object + * @type {User} + * @memberof UserApiCreateUser + */ + readonly body: User +} + +/** + * Request parameters for createUsersWithArrayInput operation in UserApi. + * @export + * @interface UserApiCreateUsersWithArrayInputRequest + */ +export interface UserApiCreateUsersWithArrayInputRequest { + /** + * List of user object + * @type {Array} + * @memberof UserApiCreateUsersWithArrayInput + */ + readonly body: Array +} + +/** + * Request parameters for createUsersWithListInput operation in UserApi. + * @export + * @interface UserApiCreateUsersWithListInputRequest + */ +export interface UserApiCreateUsersWithListInputRequest { + /** + * List of user object + * @type {Array} + * @memberof UserApiCreateUsersWithListInput + */ + readonly body: Array +} + +/** + * Request parameters for deleteUser operation in UserApi. + * @export + * @interface UserApiDeleteUserRequest + */ +export interface UserApiDeleteUserRequest { + /** + * The name that needs to be deleted + * @type {string} + * @memberof UserApiDeleteUser + */ + readonly username: string +} + +/** + * Request parameters for getUserByName operation in UserApi. + * @export + * @interface UserApiGetUserByNameRequest + */ +export interface UserApiGetUserByNameRequest { + /** + * The name that needs to be fetched. Use user1 for testing. + * @type {string} + * @memberof UserApiGetUserByName + */ + readonly username: string +} + +/** + * Request parameters for loginUser operation in UserApi. + * @export + * @interface UserApiLoginUserRequest + */ +export interface UserApiLoginUserRequest { + /** + * The user name for login + * @type {string} + * @memberof UserApiLoginUser + */ + readonly username: string + + /** + * The password for login in clear text + * @type {string} + * @memberof UserApiLoginUser + */ + readonly password: string +} + +/** + * Request parameters for updateUser operation in UserApi. + * @export + * @interface UserApiUpdateUserRequest + */ +export interface UserApiUpdateUserRequest { + /** + * name that need to be deleted + * @type {string} + * @memberof UserApiUpdateUser + */ + readonly username: string + + /** + * Updated user object + * @type {User} + * @memberof UserApiUpdateUser + */ + readonly body: User +} + +/** + * UserApi - object-oriented interface + * @export + * @class UserApi + * @extends {BaseAPI} + */ +export class UserApi extends BaseAPI { + /** + * This can only be done by the logged in user. + * @summary Create user + * @param {UserApiCreateUserRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof UserApi + */ + public createUser(requestParameters: UserApiCreateUserRequest, options?: any) { + return UserApiFp(this.configuration).createUser(requestParameters.body, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary Creates list of users with given input array + * @param {UserApiCreateUsersWithArrayInputRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof UserApi + */ + public createUsersWithArrayInput(requestParameters: UserApiCreateUsersWithArrayInputRequest, options?: any) { + return UserApiFp(this.configuration).createUsersWithArrayInput(requestParameters.body, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary Creates list of users with given input array + * @param {UserApiCreateUsersWithListInputRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof UserApi + */ + public createUsersWithListInput(requestParameters: UserApiCreateUsersWithListInputRequest, options?: any) { + return UserApiFp(this.configuration).createUsersWithListInput(requestParameters.body, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * This can only be done by the logged in user. + * @summary Delete user + * @param {UserApiDeleteUserRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof UserApi + */ + public deleteUser(requestParameters: UserApiDeleteUserRequest, options?: any) { + return UserApiFp(this.configuration).deleteUser(requestParameters.username, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary Get user by user name + * @param {UserApiGetUserByNameRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof UserApi + */ + public getUserByName(requestParameters: UserApiGetUserByNameRequest, options?: any) { + return UserApiFp(this.configuration).getUserByName(requestParameters.username, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary Logs user into the system + * @param {UserApiLoginUserRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof UserApi + */ + public loginUser(requestParameters: UserApiLoginUserRequest, options?: any) { + return UserApiFp(this.configuration).loginUser(requestParameters.username, requestParameters.password, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary Logs out current logged in user session + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof UserApi + */ + public logoutUser(options?: any) { + return UserApiFp(this.configuration).logoutUser(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * This can only be done by the logged in user. + * @summary Updated user + * @param {UserApiUpdateUserRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof UserApi + */ + public updateUser(requestParameters: UserApiUpdateUserRequest, options?: any) { + return UserApiFp(this.configuration).updateUser(requestParameters.username, requestParameters.body, options).then((request) => request(this.axios, this.basePath)); + } +} + + diff --git a/samples/client/petstore/typescript-axios/builds/with-single-request-parameters/base.ts b/samples/client/petstore/typescript-axios/builds/with-single-request-parameters/base.ts new file mode 100644 index 000000000000..71e2f198af3e --- /dev/null +++ b/samples/client/petstore/typescript-axios/builds/with-single-request-parameters/base.ts @@ -0,0 +1,70 @@ +// tslint:disable +/** + * 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 { Configuration } from "./configuration"; +// Some imports not used depending on template conditions +// @ts-ignore +import globalAxios, { AxiosPromise, AxiosInstance } from 'axios'; + +export const BASE_PATH = "http://petstore.swagger.io/v2".replace(/\/+$/, ""); + +/** + * + * @export + */ +export const COLLECTION_FORMATS = { + csv: ",", + ssv: " ", + tsv: "\t", + pipes: "|", +}; + +/** + * + * @export + * @interface RequestArgs + */ +export interface RequestArgs { + url: string; + options: any; +} + +/** + * + * @export + * @class BaseAPI + */ +export class BaseAPI { + protected configuration: Configuration | undefined; + + constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) { + if (configuration) { + this.configuration = configuration; + this.basePath = configuration.basePath || this.basePath; + } + } +}; + +/** + * + * @export + * @class RequiredError + * @extends {Error} + */ +export class RequiredError extends Error { + name: "RequiredError" = "RequiredError"; + constructor(public field: string, msg?: string) { + super(msg); + } +} diff --git a/samples/client/petstore/typescript-axios/builds/with-single-request-parameters/configuration.ts b/samples/client/petstore/typescript-axios/builds/with-single-request-parameters/configuration.ts new file mode 100644 index 000000000000..3d5dc74ee608 --- /dev/null +++ b/samples/client/petstore/typescript-axios/builds/with-single-request-parameters/configuration.ts @@ -0,0 +1,75 @@ +// tslint:disable +/** + * 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. + */ + + +export interface ConfigurationParameters { + apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); + username?: string; + password?: string; + accessToken?: string | ((name?: string, scopes?: string[]) => string); + basePath?: string; + baseOptions?: any; +} + +export class Configuration { + /** + * parameter for apiKey security + * @param name security name + * @memberof Configuration + */ + apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); + /** + * parameter for basic security + * + * @type {string} + * @memberof Configuration + */ + username?: string; + /** + * parameter for basic security + * + * @type {string} + * @memberof Configuration + */ + password?: string; + /** + * parameter for oauth2 security + * @param name security name + * @param scopes oauth2 scope + * @memberof Configuration + */ + accessToken?: string | ((name?: string, scopes?: string[]) => string); + /** + * override base path + * + * @type {string} + * @memberof Configuration + */ + basePath?: string; + /** + * base options for axios calls + * + * @type {any} + * @memberof Configuration + */ + baseOptions?: any; + + constructor(param: ConfigurationParameters = {}) { + this.apiKey = param.apiKey; + this.username = param.username; + this.password = param.password; + this.accessToken = param.accessToken; + this.basePath = param.basePath; + this.baseOptions = param.baseOptions; + } +} diff --git a/samples/client/petstore/swift4/default/git_push.sh b/samples/client/petstore/typescript-axios/builds/with-single-request-parameters/git_push.sh similarity index 100% rename from samples/client/petstore/swift4/default/git_push.sh rename to samples/client/petstore/typescript-axios/builds/with-single-request-parameters/git_push.sh diff --git a/samples/client/petstore/typescript-axios/builds/with-single-request-parameters/index.ts b/samples/client/petstore/typescript-axios/builds/with-single-request-parameters/index.ts new file mode 100644 index 000000000000..0cb247adefaf --- /dev/null +++ b/samples/client/petstore/typescript-axios/builds/with-single-request-parameters/index.ts @@ -0,0 +1,16 @@ +// tslint:disable +/** + * 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. + */ + + +export * from "./api"; +export * from "./configuration"; diff --git a/samples/client/test/swift4/default/.gitignore b/samples/client/test/swift4/default/.gitignore deleted file mode 100644 index 5e5d5cebcf47..000000000000 --- a/samples/client/test/swift4/default/.gitignore +++ /dev/null @@ -1,63 +0,0 @@ -# Xcode -# -# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore - -## Build generated -build/ -DerivedData - -## Various settings -*.pbxuser -!default.pbxuser -*.mode1v3 -!default.mode1v3 -*.mode2v3 -!default.mode2v3 -*.perspectivev3 -!default.perspectivev3 -xcuserdata - -## Other -*.xccheckout -*.moved-aside -*.xcuserstate -*.xcscmblueprint - -## Obj-C/Swift specific -*.hmap -*.ipa - -## Playgrounds -timeline.xctimeline -playground.xcworkspace - -# Swift Package Manager -# -# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. -# Packages/ -.build/ - -# CocoaPods -# -# We recommend against adding the Pods directory to your .gitignore. However -# you should judge for yourself, the pros and cons are mentioned at: -# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control -# -# Pods/ - -# Carthage -# -# Add this line if you want to avoid checking in source code from Carthage dependencies. -# Carthage/Checkouts - -Carthage/Build - -# fastlane -# -# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the -# screenshots whenever they are needed. -# For more information about the recommended setup visit: -# https://github.com/fastlane/fastlane/blob/master/docs/Gitignore.md - -fastlane/report.xml -fastlane/screenshots diff --git a/samples/client/test/swift4/default/.openapi-generator-ignore b/samples/client/test/swift4/default/.openapi-generator-ignore deleted file mode 100644 index 7484ee590a38..000000000000 --- a/samples/client/test/swift4/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/test/swift4/default/.openapi-generator/VERSION b/samples/client/test/swift4/default/.openapi-generator/VERSION deleted file mode 100644 index bfbf77eb7fad..000000000000 --- a/samples/client/test/swift4/default/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -4.3.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/test/swift4/default/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata b/samples/client/test/swift4/default/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 919434a6254f..000000000000 --- a/samples/client/test/swift4/default/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/samples/client/test/swift4/default/Cartfile b/samples/client/test/swift4/default/Cartfile deleted file mode 100644 index 86748c63d90d..000000000000 --- a/samples/client/test/swift4/default/Cartfile +++ /dev/null @@ -1 +0,0 @@ -github "Alamofire/Alamofire" ~> 4.9.0 diff --git a/samples/client/test/swift4/default/Info.plist b/samples/client/test/swift4/default/Info.plist deleted file mode 100644 index 323e5ecfc420..000000000000 --- a/samples/client/test/swift4/default/Info.plist +++ /dev/null @@ -1,22 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.0 - CFBundleVersion - 1 - - diff --git a/samples/client/test/swift4/default/Package.resolved b/samples/client/test/swift4/default/Package.resolved deleted file mode 100644 index ca6137050ebc..000000000000 --- a/samples/client/test/swift4/default/Package.resolved +++ /dev/null @@ -1,16 +0,0 @@ -{ - "object": { - "pins": [ - { - "package": "Alamofire", - "repositoryURL": "https://github.com/Alamofire/Alamofire.git", - "state": { - "branch": null, - "revision": "747c8db8d57b68d5e35275f10c92d55f982adbd4", - "version": "4.9.1" - } - } - ] - }, - "version": 1 -} diff --git a/samples/client/test/swift4/default/Package.swift b/samples/client/test/swift4/default/Package.swift deleted file mode 100644 index a2afb320f9aa..000000000000 --- a/samples/client/test/swift4/default/Package.swift +++ /dev/null @@ -1,27 +0,0 @@ -// swift-tools-version:4.2 -// The swift-tools-version declares the minimum version of Swift required to build this package. - -import PackageDescription - -let package = Package( - name: "TestClient", - products: [ - // Products define the executables and libraries produced by a package, and make them visible to other packages. - .library( - name: "TestClient", - targets: ["TestClient"]) - ], - dependencies: [ - // Dependencies declare other packages that this package depends on. - .package(url: "https://github.com/Alamofire/Alamofire.git", from: "4.9.0") - ], - targets: [ - // Targets are the basic building blocks of a package. A target can define a module or a test suite. - // Targets can depend on other targets in this package, and on products in packages which this package depends on. - .target( - name: "TestClient", - dependencies: ["Alamofire"], - path: "TestClient/Classes" - ) - ] -) diff --git a/samples/client/test/swift4/default/README.md b/samples/client/test/swift4/default/README.md deleted file mode 100644 index fe2d3170d33c..000000000000 --- a/samples/client/test/swift4/default/README.md +++ /dev/null @@ -1,63 +0,0 @@ -# Swift4 API client for TestClient - -This is a test schema which exercises Swagger schema features for testing the swift4 language codegen module. - -## Overview -This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [openapi-spec from a remote server, you can easily generate an API client. - -- API version: 1.0 -- Package version: -- Build package: org.openapitools.codegen.languages.Swift4Codegen -For more information, please visit [http://www.example.com](http://www.example.com) - -## Installation - -### Carthage - -Run `carthage update` - -### CocoaPods - -Run `pod install` - -## Documentation for API Endpoints - -All URIs are relative to *http://api.example.com/basePath* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*Swift4TestAPI* | [**getAllModels**](docs/Swift4TestAPI.md#getallmodels) | **GET** /allModels | Get all of the models - - -## Documentation For Models - - - [AllPrimitives](docs/AllPrimitives.md) - - [BaseCard](docs/BaseCard.md) - - [ErrorInfo](docs/ErrorInfo.md) - - [GetAllModelsResult](docs/GetAllModelsResult.md) - - [ModelDoubleArray](docs/ModelDoubleArray.md) - - [ModelErrorInfoArray](docs/ModelErrorInfoArray.md) - - [ModelStringArray](docs/ModelStringArray.md) - - [ModelWithIntAdditionalPropertiesOnly](docs/ModelWithIntAdditionalPropertiesOnly.md) - - [ModelWithPropertiesAndAdditionalProperties](docs/ModelWithPropertiesAndAdditionalProperties.md) - - [ModelWithStringAdditionalPropertiesOnly](docs/ModelWithStringAdditionalPropertiesOnly.md) - - [PersonCard](docs/PersonCard.md) - - [PersonCardAllOf](docs/PersonCardAllOf.md) - - [PlaceCard](docs/PlaceCard.md) - - [PlaceCardAllOf](docs/PlaceCardAllOf.md) - - [SampleBase](docs/SampleBase.md) - - [SampleSubClass](docs/SampleSubClass.md) - - [SampleSubClassAllOf](docs/SampleSubClassAllOf.md) - - [StringEnum](docs/StringEnum.md) - - [VariableNameTest](docs/VariableNameTest.md) - - -## Documentation For Authorization - - All endpoints do not require authorization. - - -## Author - -jdoe@example.com - diff --git a/samples/client/test/swift4/default/TestClient.podspec b/samples/client/test/swift4/default/TestClient.podspec deleted file mode 100644 index 4adf2b418ade..000000000000 --- a/samples/client/test/swift4/default/TestClient.podspec +++ /dev/null @@ -1,14 +0,0 @@ -Pod::Spec.new do |s| - s.name = 'TestClient' - s.ios.deployment_target = '9.0' - s.osx.deployment_target = '10.11' - s.tvos.deployment_target = '9.0' - s.version = '1.0' - s.source = { :git => 'git@github.com:OpenAPITools/openapi-generator.git', :tag => 'v1.0' } - s.authors = '' - s.license = 'Proprietary' - s.homepage = 'https://github.com/openapitools/openapi-generator' - s.summary = 'TestClient' - s.source_files = 'TestClient/Classes/**/*.swift' - s.dependency 'Alamofire', '~> 4.9.0' -end diff --git a/samples/client/test/swift4/default/TestClient.xcodeproj/project.pbxproj b/samples/client/test/swift4/default/TestClient.xcodeproj/project.pbxproj deleted file mode 100644 index ca8fa20ff1c1..000000000000 --- a/samples/client/test/swift4/default/TestClient.xcodeproj/project.pbxproj +++ /dev/null @@ -1,474 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 51; - objects = { - -/* Begin PBXBuildFile section */ - 0061472DD11FF6D7742349C7 /* PersonCard.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30CDB0CB291617B59C7E29CB /* PersonCard.swift */; }; - 05AA5B59607A30F18E94292F /* ModelWithStringAdditionalPropertiesOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6BFF565190B02C5B55C36C5E /* ModelWithStringAdditionalPropertiesOnly.swift */; }; - 1415101700773F07D9E14327 /* APIs.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4F6F3F378FFC3FC0AC42268D /* APIs.swift */; }; - 19E70FF1DDE7B0282F400F45 /* APIHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = C6AD136503821775A39AEEEA /* APIHelper.swift */; }; - 2002BB13501E9D1F5952C760 /* SampleSubClassAllOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6555C6E30D09EAE39142D186 /* SampleSubClassAllOf.swift */; }; - 27F628F6D077CE2DCC6CC337 /* ModelWithIntAdditionalPropertiesOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = 68FA5194EA643821CA1085C3 /* ModelWithIntAdditionalPropertiesOnly.swift */; }; - 3DC6743F3ECD7005940DED98 /* GetAllModelsResult.swift in Sources */ = {isa = PBXBuildFile; fileRef = ACAEAEEB934E57798AED0602 /* GetAllModelsResult.swift */; }; - 3F20DE4CB1AD4F3A2ED05326 /* SampleSubClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = EA9C1F9551FB619240EC0F70 /* SampleSubClass.swift */; }; - 4209C8951507A706227F2A85 /* SampleBase.swift in Sources */ = {isa = PBXBuildFile; fileRef = CAB9BE4C49A34C2D3AE2D4E3 /* SampleBase.swift */; }; - 493DB82F57B410C3C40CDD6B /* ModelWithPropertiesAndAdditionalProperties.swift in Sources */ = {isa = PBXBuildFile; fileRef = 17B59E56BC42D7F70BBC0D08 /* ModelWithPropertiesAndAdditionalProperties.swift */; }; - 4D1CD48EC9034A49C536DF05 /* BaseCard.swift in Sources */ = {isa = PBXBuildFile; fileRef = C209BA7D3B7026133ACB6149 /* BaseCard.swift */; }; - 561FBF0BA4127AAA4B2EB66D /* AllPrimitives.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7EE13D018B8E8F7283534E94 /* AllPrimitives.swift */; }; - 5C7477A5CDC76B3293CBBC53 /* Models.swift in Sources */ = {isa = PBXBuildFile; fileRef = A140137667E350EAFDE010EA /* Models.swift */; }; - 633435C240C960AFE29EEF3A /* StringEnum.swift in Sources */ = {isa = PBXBuildFile; fileRef = A3BD76CE1B85046CF575F42B /* StringEnum.swift */; }; - 6B1961ED41DFDFDB3029BE6F /* Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = D3D0164E2EEC228143968A2D /* Extensions.swift */; }; - 6CADD5CF7C8834F9ACA88E4F /* Swift4TestAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = CF9E03057B35B32AC59ADC1B /* Swift4TestAPI.swift */; }; - 7C22E572E92D490CC366F0C2 /* ErrorInfo.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1A813A17AF964F26FB864212 /* ErrorInfo.swift */; }; - 7D51DA4415EEB4A0D2CECC95 /* JSONEncodableEncoding.swift in Sources */ = {isa = PBXBuildFile; fileRef = D7DCE280D9FD953B91C0F18E /* JSONEncodableEncoding.swift */; }; - 7F99AF29003DAFA2AFC85FEC /* ModelDoubleArray.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE5A2A8F47EC101841093D2C /* ModelDoubleArray.swift */; }; - 8F02FB3DCBA785F15F6BA602 /* PlaceCard.swift in Sources */ = {isa = PBXBuildFile; fileRef = 13DD01D5ABD4BE352CB6FCBF /* PlaceCard.swift */; }; - 9193BA83FEDAFA9788D03ACF /* PlaceCardAllOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = 889ABCD292051498ACCC66E8 /* PlaceCardAllOf.swift */; }; - A4E70E34B9EABA6E7C911B37 /* ModelErrorInfoArray.swift in Sources */ = {isa = PBXBuildFile; fileRef = C244E3993E5EAFE0E4DEF9C9 /* ModelErrorInfoArray.swift */; }; - AC78737EC4A34F22FC3D5E8C /* CodableHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 93BA682C97038055435A32D0 /* CodableHelper.swift */; }; - AFB1FE9D61B4F2B80E1C7AB8 /* Alamofire.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F082FE9586189859619C91E5 /* Alamofire.framework */; }; - D43D0FC46CD094545F0284F3 /* PersonCardAllOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2C4F016421122219AE4DCDF9 /* PersonCardAllOf.swift */; }; - E29D4269C5947A5CFCE3A810 /* Configuration.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE6DF5346C62BDE2DAFA3B4E /* Configuration.swift */; }; - E32B8F685CB25522E611ED1D /* ModelStringArray.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5DEC406D4B97E9127B278F6B /* ModelStringArray.swift */; }; - E6AA92100A56C799A2FCDA59 /* AlamofireImplementations.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1E452EBA4D5D6D227089137 /* AlamofireImplementations.swift */; }; - FB58DEE4F76D0111D3218BDF /* JSONEncodingHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 042A701F1D826A4F68808DE6 /* JSONEncodingHelper.swift */; }; - FD7D9D3454F9C64656CDCB8B /* VariableNameTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7C09C1DB6708AB2D8997BEE2 /* VariableNameTest.swift */; }; -/* End PBXBuildFile section */ - -/* Begin PBXFileReference section */ - 042A701F1D826A4F68808DE6 /* JSONEncodingHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JSONEncodingHelper.swift; sourceTree = ""; }; - 13DD01D5ABD4BE352CB6FCBF /* PlaceCard.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PlaceCard.swift; sourceTree = ""; }; - 17B59E56BC42D7F70BBC0D08 /* ModelWithPropertiesAndAdditionalProperties.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ModelWithPropertiesAndAdditionalProperties.swift; sourceTree = ""; }; - 1A813A17AF964F26FB864212 /* ErrorInfo.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ErrorInfo.swift; sourceTree = ""; }; - 2C4F016421122219AE4DCDF9 /* PersonCardAllOf.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PersonCardAllOf.swift; sourceTree = ""; }; - 30CDB0CB291617B59C7E29CB /* PersonCard.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PersonCard.swift; sourceTree = ""; }; - 4F6F3F378FFC3FC0AC42268D /* APIs.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = APIs.swift; sourceTree = ""; }; - 5DEC406D4B97E9127B278F6B /* ModelStringArray.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ModelStringArray.swift; sourceTree = ""; }; - 6555C6E30D09EAE39142D186 /* SampleSubClassAllOf.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SampleSubClassAllOf.swift; sourceTree = ""; }; - 68FA5194EA643821CA1085C3 /* ModelWithIntAdditionalPropertiesOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ModelWithIntAdditionalPropertiesOnly.swift; sourceTree = ""; }; - 6BFF565190B02C5B55C36C5E /* ModelWithStringAdditionalPropertiesOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ModelWithStringAdditionalPropertiesOnly.swift; sourceTree = ""; }; - 7C09C1DB6708AB2D8997BEE2 /* VariableNameTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VariableNameTest.swift; sourceTree = ""; }; - 7EE13D018B8E8F7283534E94 /* AllPrimitives.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AllPrimitives.swift; sourceTree = ""; }; - 889ABCD292051498ACCC66E8 /* PlaceCardAllOf.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PlaceCardAllOf.swift; sourceTree = ""; }; - 93BA682C97038055435A32D0 /* CodableHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CodableHelper.swift; sourceTree = ""; }; - 9FD147676BF8F2DD7E471810 /* TestClient.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = TestClient.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - A140137667E350EAFDE010EA /* Models.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Models.swift; sourceTree = ""; }; - A3BD76CE1B85046CF575F42B /* StringEnum.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StringEnum.swift; sourceTree = ""; }; - ACAEAEEB934E57798AED0602 /* GetAllModelsResult.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GetAllModelsResult.swift; sourceTree = ""; }; - B1E452EBA4D5D6D227089137 /* AlamofireImplementations.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlamofireImplementations.swift; sourceTree = ""; }; - C209BA7D3B7026133ACB6149 /* BaseCard.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseCard.swift; sourceTree = ""; }; - C244E3993E5EAFE0E4DEF9C9 /* ModelErrorInfoArray.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ModelErrorInfoArray.swift; sourceTree = ""; }; - C6AD136503821775A39AEEEA /* APIHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = APIHelper.swift; sourceTree = ""; }; - CAB9BE4C49A34C2D3AE2D4E3 /* SampleBase.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SampleBase.swift; sourceTree = ""; }; - CE6DF5346C62BDE2DAFA3B4E /* Configuration.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Configuration.swift; sourceTree = ""; }; - CF9E03057B35B32AC59ADC1B /* Swift4TestAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Swift4TestAPI.swift; sourceTree = ""; }; - D3D0164E2EEC228143968A2D /* Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Extensions.swift; sourceTree = ""; }; - D7DCE280D9FD953B91C0F18E /* JSONEncodableEncoding.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JSONEncodableEncoding.swift; sourceTree = ""; }; - EA9C1F9551FB619240EC0F70 /* SampleSubClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SampleSubClass.swift; sourceTree = ""; }; - EE5A2A8F47EC101841093D2C /* ModelDoubleArray.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ModelDoubleArray.swift; sourceTree = ""; }; - F082FE9586189859619C91E5 /* Alamofire.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Alamofire.framework; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - F915CBFBD18EAF6362CE8399 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - AFB1FE9D61B4F2B80E1C7AB8 /* Alamofire.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 3049D31996790CF8E31B6F01 = { - isa = PBXGroup; - children = ( - 8C649F3AF4A7C6D66B52AA38 /* TestClient */, - FDF67B74659AE43B939D6A0D /* Frameworks */, - CBA5AD47CD6A6AF075403DD1 /* Products */, - ); - sourceTree = ""; - }; - 3A1CFAB4CC75547815260F88 /* OpenAPIs */ = { - isa = PBXGroup; - children = ( - B1E452EBA4D5D6D227089137 /* AlamofireImplementations.swift */, - C6AD136503821775A39AEEEA /* APIHelper.swift */, - 4F6F3F378FFC3FC0AC42268D /* APIs.swift */, - 93BA682C97038055435A32D0 /* CodableHelper.swift */, - CE6DF5346C62BDE2DAFA3B4E /* Configuration.swift */, - D3D0164E2EEC228143968A2D /* Extensions.swift */, - D7DCE280D9FD953B91C0F18E /* JSONEncodableEncoding.swift */, - 042A701F1D826A4F68808DE6 /* JSONEncodingHelper.swift */, - A140137667E350EAFDE010EA /* Models.swift */, - AC6589BAFE1BDABB49267C33 /* APIs */, - 9A5460679035417A84B6C884 /* Models */, - ); - path = OpenAPIs; - sourceTree = ""; - }; - 3E4B2B40F4EEE4F7E6149EBF /* Classes */ = { - isa = PBXGroup; - children = ( - 3A1CFAB4CC75547815260F88 /* OpenAPIs */, - ); - path = Classes; - sourceTree = ""; - }; - 7B6E2BAF77019A8E9F4FFB57 /* iOS */ = { - isa = PBXGroup; - children = ( - F082FE9586189859619C91E5 /* Alamofire.framework */, - ); - path = iOS; - sourceTree = ""; - }; - 8C649F3AF4A7C6D66B52AA38 /* TestClient */ = { - isa = PBXGroup; - children = ( - 3E4B2B40F4EEE4F7E6149EBF /* Classes */, - ); - path = TestClient; - sourceTree = ""; - }; - 9A5460679035417A84B6C884 /* Models */ = { - isa = PBXGroup; - children = ( - 7EE13D018B8E8F7283534E94 /* AllPrimitives.swift */, - C209BA7D3B7026133ACB6149 /* BaseCard.swift */, - 1A813A17AF964F26FB864212 /* ErrorInfo.swift */, - ACAEAEEB934E57798AED0602 /* GetAllModelsResult.swift */, - EE5A2A8F47EC101841093D2C /* ModelDoubleArray.swift */, - C244E3993E5EAFE0E4DEF9C9 /* ModelErrorInfoArray.swift */, - 5DEC406D4B97E9127B278F6B /* ModelStringArray.swift */, - 68FA5194EA643821CA1085C3 /* ModelWithIntAdditionalPropertiesOnly.swift */, - 17B59E56BC42D7F70BBC0D08 /* ModelWithPropertiesAndAdditionalProperties.swift */, - 6BFF565190B02C5B55C36C5E /* ModelWithStringAdditionalPropertiesOnly.swift */, - 30CDB0CB291617B59C7E29CB /* PersonCard.swift */, - 2C4F016421122219AE4DCDF9 /* PersonCardAllOf.swift */, - 13DD01D5ABD4BE352CB6FCBF /* PlaceCard.swift */, - 889ABCD292051498ACCC66E8 /* PlaceCardAllOf.swift */, - CAB9BE4C49A34C2D3AE2D4E3 /* SampleBase.swift */, - EA9C1F9551FB619240EC0F70 /* SampleSubClass.swift */, - 6555C6E30D09EAE39142D186 /* SampleSubClassAllOf.swift */, - A3BD76CE1B85046CF575F42B /* StringEnum.swift */, - 7C09C1DB6708AB2D8997BEE2 /* VariableNameTest.swift */, - ); - path = Models; - sourceTree = ""; - }; - AC6589BAFE1BDABB49267C33 /* APIs */ = { - isa = PBXGroup; - children = ( - CF9E03057B35B32AC59ADC1B /* Swift4TestAPI.swift */, - ); - path = APIs; - sourceTree = ""; - }; - CBA5AD47CD6A6AF075403DD1 /* Products */ = { - isa = PBXGroup; - children = ( - 9FD147676BF8F2DD7E471810 /* TestClient.framework */, - ); - name = Products; - sourceTree = ""; - }; - FA683CC04EA50A59799FB657 /* Carthage */ = { - isa = PBXGroup; - children = ( - 7B6E2BAF77019A8E9F4FFB57 /* iOS */, - ); - name = Carthage; - path = Carthage/Build; - sourceTree = ""; - }; - FDF67B74659AE43B939D6A0D /* Frameworks */ = { - isa = PBXGroup; - children = ( - FA683CC04EA50A59799FB657 /* Carthage */, - ); - name = Frameworks; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 57071453919863518A53B6C4 /* TestClient */ = { - isa = PBXNativeTarget; - buildConfigurationList = 8C5DAAB4D2F2BC3EB2A18339 /* Build configuration list for PBXNativeTarget "TestClient" */; - buildPhases = ( - 411C0E7C892A386592910621 /* Sources */, - F915CBFBD18EAF6362CE8399 /* Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = TestClient; - productName = TestClient; - productReference = 9FD147676BF8F2DD7E471810 /* TestClient.framework */; - productType = "com.apple.product-type.framework"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 498565B44CD0696E30C61F1F /* Project object */ = { - isa = PBXProject; - attributes = { - LastUpgradeCheck = 1020; - TargetAttributes = { - }; - }; - buildConfigurationList = 87FDCE50021B77EB5CF8EF08 /* Build configuration list for PBXProject "TestClient" */; - compatibilityVersion = "Xcode 10.0"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - Base, - en, - ); - mainGroup = 3049D31996790CF8E31B6F01; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 57071453919863518A53B6C4 /* TestClient */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXSourcesBuildPhase section */ - 411C0E7C892A386592910621 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 19E70FF1DDE7B0282F400F45 /* APIHelper.swift in Sources */, - 1415101700773F07D9E14327 /* APIs.swift in Sources */, - E6AA92100A56C799A2FCDA59 /* AlamofireImplementations.swift in Sources */, - 561FBF0BA4127AAA4B2EB66D /* AllPrimitives.swift in Sources */, - 4D1CD48EC9034A49C536DF05 /* BaseCard.swift in Sources */, - AC78737EC4A34F22FC3D5E8C /* CodableHelper.swift in Sources */, - E29D4269C5947A5CFCE3A810 /* Configuration.swift in Sources */, - 7C22E572E92D490CC366F0C2 /* ErrorInfo.swift in Sources */, - 6B1961ED41DFDFDB3029BE6F /* Extensions.swift in Sources */, - 3DC6743F3ECD7005940DED98 /* GetAllModelsResult.swift in Sources */, - 7D51DA4415EEB4A0D2CECC95 /* JSONEncodableEncoding.swift in Sources */, - FB58DEE4F76D0111D3218BDF /* JSONEncodingHelper.swift in Sources */, - 7F99AF29003DAFA2AFC85FEC /* ModelDoubleArray.swift in Sources */, - A4E70E34B9EABA6E7C911B37 /* ModelErrorInfoArray.swift in Sources */, - E32B8F685CB25522E611ED1D /* ModelStringArray.swift in Sources */, - 27F628F6D077CE2DCC6CC337 /* ModelWithIntAdditionalPropertiesOnly.swift in Sources */, - 493DB82F57B410C3C40CDD6B /* ModelWithPropertiesAndAdditionalProperties.swift in Sources */, - 05AA5B59607A30F18E94292F /* ModelWithStringAdditionalPropertiesOnly.swift in Sources */, - 5C7477A5CDC76B3293CBBC53 /* Models.swift in Sources */, - 0061472DD11FF6D7742349C7 /* PersonCard.swift in Sources */, - D43D0FC46CD094545F0284F3 /* PersonCardAllOf.swift in Sources */, - 8F02FB3DCBA785F15F6BA602 /* PlaceCard.swift in Sources */, - 9193BA83FEDAFA9788D03ACF /* PlaceCardAllOf.swift in Sources */, - 4209C8951507A706227F2A85 /* SampleBase.swift in Sources */, - 3F20DE4CB1AD4F3A2ED05326 /* SampleSubClass.swift in Sources */, - 2002BB13501E9D1F5952C760 /* SampleSubClassAllOf.swift in Sources */, - 633435C240C960AFE29EEF3A /* StringEnum.swift in Sources */, - 6CADD5CF7C8834F9ACA88E4F /* Swift4TestAPI.swift in Sources */, - FD7D9D3454F9C64656CDCB8B /* VariableNameTest.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin XCBuildConfiguration section */ - 1D58A58AE8D976D68029505F /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - APPLICATION_EXTENSION_API_ONLY = YES; - CODE_SIGN_IDENTITY = ""; - CURRENT_PROJECT_VERSION = 1; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Carthage/Build/iOS", - ); - INFOPLIST_FILE = Info.plist; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Debug; - }; - 20BF9E8F2FA4569489A9CEAC /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "$(inherited)", - "DEBUG=1", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = iphoneos; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 5.0; - }; - name = Debug; - }; - 295215B264B439F2CFBEFBA2 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = iphoneos; - SWIFT_COMPILATION_MODE = wholemodule; - SWIFT_VERSION = 5.0; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - 4CDAC84BFAB424A21776ADCA /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - APPLICATION_EXTENSION_API_ONLY = YES; - CODE_SIGN_IDENTITY = ""; - CURRENT_PROJECT_VERSION = 1; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Carthage/Build/iOS", - ); - INFOPLIST_FILE = Info.plist; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 87FDCE50021B77EB5CF8EF08 /* Build configuration list for PBXProject "TestClient" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 20BF9E8F2FA4569489A9CEAC /* Debug */, - 295215B264B439F2CFBEFBA2 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Debug; - }; - 8C5DAAB4D2F2BC3EB2A18339 /* Build configuration list for PBXNativeTarget "TestClient" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 1D58A58AE8D976D68029505F /* Debug */, - 4CDAC84BFAB424A21776ADCA /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = ""; - }; -/* End XCConfigurationList section */ - }; - rootObject = 498565B44CD0696E30C61F1F /* Project object */; -} diff --git a/samples/client/test/swift4/default/TestClient.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/samples/client/test/swift4/default/TestClient.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 919434a6254f..000000000000 --- a/samples/client/test/swift4/default/TestClient.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/samples/client/test/swift4/default/TestClient.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/samples/client/test/swift4/default/TestClient.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d981003d68..000000000000 --- a/samples/client/test/swift4/default/TestClient.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/samples/client/test/swift4/default/TestClient.xcodeproj/xcshareddata/xcschemes/TestClient.xcscheme b/samples/client/test/swift4/default/TestClient.xcodeproj/xcshareddata/xcschemes/TestClient.xcscheme deleted file mode 100644 index a96ec1a1ddf8..000000000000 --- a/samples/client/test/swift4/default/TestClient.xcodeproj/xcshareddata/xcschemes/TestClient.xcscheme +++ /dev/null @@ -1,99 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/APIHelper.swift b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/APIHelper.swift deleted file mode 100644 index 200070096800..000000000000 --- a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/APIHelper.swift +++ /dev/null @@ -1,70 +0,0 @@ -// APIHelper.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct APIHelper { - public static func rejectNil(_ source: [String: Any?]) -> [String: Any]? { - let destination = source.reduce(into: [String: Any]()) { (result, item) in - if let value = item.value { - result[item.key] = value - } - } - - if destination.isEmpty { - return nil - } - return destination - } - - public static func rejectNilHeaders(_ source: [String: Any?]) -> [String: String] { - return source.reduce(into: [String: String]()) { (result, item) in - if let collection = item.value as? [Any?] { - result[item.key] = collection.filter({ $0 != nil }).map { "\($0!)" }.joined(separator: ",") - } else if let value: Any = item.value { - result[item.key] = "\(value)" - } - } - } - - public static func convertBoolToString(_ source: [String: Any]?) -> [String: Any]? { - guard let source = source else { - return nil - } - - return source.reduce(into: [String: Any](), { (result, item) in - switch item.value { - case let x as Bool: - result[item.key] = x.description - default: - result[item.key] = item.value - } - }) - } - - public static func mapValueToPathItem(_ source: Any) -> Any { - if let collection = source as? [Any?] { - return collection.filter({ $0 != nil }).map({"\($0!)"}).joined(separator: ",") - } - return source - } - - public static func mapValuesToQueryItems(_ source: [String: Any?]) -> [URLQueryItem]? { - let destination = source.filter({ $0.value != nil}).reduce(into: [URLQueryItem]()) { (result, item) in - if let collection = item.value as? [Any?] { - let value = collection.filter({ $0 != nil }).map({"\($0!)"}).joined(separator: ",") - result.append(URLQueryItem(name: item.key, value: value)) - } else if let value = item.value { - result.append(URLQueryItem(name: item.key, value: "\(value)")) - } - } - - if destination.isEmpty { - return nil - } - return destination - } -} diff --git a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/APIs.swift b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/APIs.swift deleted file mode 100644 index b8c1ec2d40df..000000000000 --- a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/APIs.swift +++ /dev/null @@ -1,62 +0,0 @@ -// APIs.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -open class TestClientAPI { - public static var basePath = "http://api.example.com/basePath" - public static var credential: URLCredential? - public static var customHeaders: [String: String] = [:] - public static var requestBuilderFactory: RequestBuilderFactory = AlamofireRequestBuilderFactory() - public static var apiResponseQueue: DispatchQueue = .main -} - -open class RequestBuilder { - var credential: URLCredential? - var headers: [String: String] - public let parameters: [String: Any]? - public let isBody: Bool - public let method: String - public let URLString: String - - /// Optional block to obtain a reference to the request's progress instance when available. - public var onProgressReady: ((Progress) -> Void)? - - required public init(method: String, URLString: String, parameters: [String: Any]?, isBody: Bool, headers: [String: String] = [:]) { - self.method = method - self.URLString = URLString - self.parameters = parameters - self.isBody = isBody - self.headers = headers - - addHeaders(TestClientAPI.customHeaders) - } - - open func addHeaders(_ aHeaders: [String: String]) { - for (header, value) in aHeaders { - headers[header] = value - } - } - - open func execute(_ completion: @escaping (_ response: Response?, _ error: Error?) -> Void) { } - - public func addHeader(name: String, value: String) -> Self { - if !value.isEmpty { - headers[name] = value - } - return self - } - - open func addCredential() -> Self { - self.credential = TestClientAPI.credential - return self - } -} - -public protocol RequestBuilderFactory { - func getNonDecodableBuilder() -> RequestBuilder.Type - func getBuilder() -> RequestBuilder.Type -} diff --git a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/APIs/Swift4TestAPI.swift b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/APIs/Swift4TestAPI.swift deleted file mode 100644 index 22b7b0f9d96e..000000000000 --- a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/APIs/Swift4TestAPI.swift +++ /dev/null @@ -1,45 +0,0 @@ -// -// Swift4TestAPI.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -open class Swift4TestAPI { - /** - Get all of the models - - - parameter clientId: (query) id that represent the Api client - - parameter completion: completion handler to receive the data and the error objects - */ - open class func getAllModels(clientId: String, completion: @escaping ((_ data: GetAllModelsResult?, _ error: Error?) -> Void)) { - getAllModelsWithRequestBuilder(clientId: clientId).execute { (response, error) -> Void in - completion(response?.body, error) - } - } - - /** - Get all of the models - - GET /allModels - - This endpoint tests get a dictionary which contains examples of all of the models. - - parameter clientId: (query) id that represent the Api client - - returns: RequestBuilder - */ - open class func getAllModelsWithRequestBuilder(clientId: String) -> RequestBuilder { - let path = "/allModels" - let URLString = TestClientAPI.basePath + path - let parameters: [String: Any]? = nil - - var url = URLComponents(string: URLString) - url?.queryItems = APIHelper.mapValuesToQueryItems([ - "client_id": clientId.encodeToJSON() - ]) - - let requestBuilder: RequestBuilder.Type = TestClientAPI.requestBuilderFactory.getBuilder() - - return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) - } - -} diff --git a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/AlamofireImplementations.swift b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/AlamofireImplementations.swift deleted file mode 100644 index 1487a4730f70..000000000000 --- a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/AlamofireImplementations.swift +++ /dev/null @@ -1,450 +0,0 @@ -// AlamofireImplementations.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -import Alamofire - -class AlamofireRequestBuilderFactory: RequestBuilderFactory { - func getNonDecodableBuilder() -> RequestBuilder.Type { - return AlamofireRequestBuilder.self - } - - func getBuilder() -> RequestBuilder.Type { - return AlamofireDecodableRequestBuilder.self - } -} - -private struct SynchronizedDictionary { - - private var dictionary = [K: V]() - private let queue = DispatchQueue( - label: "SynchronizedDictionary", - qos: DispatchQoS.userInitiated, - attributes: [DispatchQueue.Attributes.concurrent], - autoreleaseFrequency: DispatchQueue.AutoreleaseFrequency.inherit, - target: nil - ) - - public subscript(key: K) -> V? { - get { - var value: V? - - queue.sync { - value = self.dictionary[key] - } - - return value - } - set { - queue.sync(flags: DispatchWorkItemFlags.barrier) { - self.dictionary[key] = newValue - } - } - } - } - -// Store manager to retain its reference -private var managerStore = SynchronizedDictionary() - -open class AlamofireRequestBuilder: RequestBuilder { - required public init(method: String, URLString: String, parameters: [String: Any]?, isBody: Bool, headers: [String: String] = [:]) { - super.init(method: method, URLString: URLString, parameters: parameters, isBody: isBody, headers: headers) - } - - /** - May be overridden by a subclass if you want to control the session - configuration. - */ - open func createSessionManager() -> Alamofire.SessionManager { - let configuration = URLSessionConfiguration.default - configuration.httpAdditionalHeaders = buildHeaders() - return Alamofire.SessionManager(configuration: configuration) - } - - /** - May be overridden by a subclass if you want to custom request constructor. - */ - open func createURLRequest() -> URLRequest? { - let encoding: ParameterEncoding = isBody ? JSONDataEncoding() : URLEncoding() - guard let originalRequest = try? URLRequest(url: URLString, method: HTTPMethod(rawValue: method)!, headers: buildHeaders()) else { return nil } - return try? encoding.encode(originalRequest, with: parameters) - } - - /** - May be overridden by a subclass if you want to control the Content-Type - that is given to an uploaded form part. - - Return nil to use the default behavior (inferring the Content-Type from - the file extension). Return the desired Content-Type otherwise. - */ - open func contentTypeForFormPart(fileURL: URL) -> String? { - return nil - } - - /** - May be overridden by a subclass if you want to control the request - configuration (e.g. to override the cache policy). - */ - open func makeRequest(manager: SessionManager, method: HTTPMethod, encoding: ParameterEncoding, headers: [String: String]) -> DataRequest { - return manager.request(URLString, method: method, parameters: parameters, encoding: encoding, headers: headers) - } - - override open func execute(_ completion: @escaping (_ response: Response?, _ error: Error?) -> Void) { - let managerId: String = UUID().uuidString - // Create a new manager for each request to customize its request header - let manager = createSessionManager() - managerStore[managerId] = manager - - let encoding: ParameterEncoding = isBody ? JSONDataEncoding() : URLEncoding() - - let xMethod = Alamofire.HTTPMethod(rawValue: method) - let fileKeys = parameters == nil ? [] : parameters!.filter { $1 is NSURL } - .map { $0.0 } - - if fileKeys.count > 0 { - manager.upload(multipartFormData: { mpForm in - for (k, v) in self.parameters! { - switch v { - case let fileURL as URL: - if let mimeType = self.contentTypeForFormPart(fileURL: fileURL) { - mpForm.append(fileURL, withName: k, fileName: fileURL.lastPathComponent, mimeType: mimeType) - } else { - mpForm.append(fileURL, withName: k) - } - case let string as String: - mpForm.append(string.data(using: String.Encoding.utf8)!, withName: k) - case let number as NSNumber: - mpForm.append(number.stringValue.data(using: String.Encoding.utf8)!, withName: k) - default: - fatalError("Unprocessable value \(v) with key \(k)") - } - } - }, to: URLString, method: xMethod!, headers: nil, encodingCompletion: { encodingResult in - switch encodingResult { - case .success(let upload, _, _): - if let onProgressReady = self.onProgressReady { - onProgressReady(upload.uploadProgress) - } - self.processRequest(request: upload, managerId, completion) - case .failure(let encodingError): - completion(nil, ErrorResponse.error(415, nil, encodingError)) - } - }) - } else { - let request = makeRequest(manager: manager, method: xMethod!, encoding: encoding, headers: headers) - if let onProgressReady = self.onProgressReady { - onProgressReady(request.progress) - } - processRequest(request: request, managerId, completion) - } - - } - - fileprivate func processRequest(request: DataRequest, _ managerId: String, _ completion: @escaping (_ response: Response?, _ error: Error?) -> Void) { - if let credential = self.credential { - request.authenticate(usingCredential: credential) - } - - let cleanupRequest = { - managerStore[managerId] = nil - } - - let validatedRequest = request.validate() - - switch T.self { - case is String.Type: - validatedRequest.responseString(queue: TestClientAPI.apiResponseQueue, completionHandler: { (stringResponse) in - cleanupRequest() - - if stringResponse.result.isFailure { - completion( - nil, - ErrorResponse.error(stringResponse.response?.statusCode ?? 500, stringResponse.data, stringResponse.result.error!) - ) - return - } - - completion( - Response( - response: stringResponse.response!, - body: ((stringResponse.result.value ?? "") as! T) - ), - nil - ) - }) - case is URL.Type: - validatedRequest.responseData(queue: TestClientAPI.apiResponseQueue, completionHandler: { (dataResponse) in - cleanupRequest() - - do { - - guard !dataResponse.result.isFailure else { - throw DownloadException.responseFailed - } - - guard let data = dataResponse.data else { - throw DownloadException.responseDataMissing - } - - guard let request = request.request else { - throw DownloadException.requestMissing - } - - let fileManager = FileManager.default - let urlRequest = try request.asURLRequest() - let documentsDirectory = fileManager.urls(for: .documentDirectory, in: .userDomainMask)[0] - let requestURL = try self.getURL(from: urlRequest) - - var requestPath = try self.getPath(from: requestURL) - - if let headerFileName = self.getFileName(fromContentDisposition: dataResponse.response?.allHeaderFields["Content-Disposition"] as? String) { - requestPath = requestPath.appending("/\(headerFileName)") - } - - let filePath = documentsDirectory.appendingPathComponent(requestPath) - let directoryPath = filePath.deletingLastPathComponent().path - - try fileManager.createDirectory(atPath: directoryPath, withIntermediateDirectories: true, attributes: nil) - try data.write(to: filePath, options: .atomic) - - completion( - Response( - response: dataResponse.response!, - body: (filePath as! T) - ), - nil - ) - - } catch let requestParserError as DownloadException { - completion(nil, ErrorResponse.error(400, dataResponse.data, requestParserError)) - } catch let error { - completion(nil, ErrorResponse.error(400, dataResponse.data, error)) - } - return - }) - case is Void.Type: - validatedRequest.responseData(queue: TestClientAPI.apiResponseQueue, completionHandler: { (voidResponse) in - cleanupRequest() - - if voidResponse.result.isFailure { - completion( - nil, - ErrorResponse.error(voidResponse.response?.statusCode ?? 500, voidResponse.data, voidResponse.result.error!) - ) - return - } - - completion( - Response( - response: voidResponse.response!, - body: nil), - nil - ) - }) - default: - validatedRequest.responseData(queue: TestClientAPI.apiResponseQueue, completionHandler: { (dataResponse) in - cleanupRequest() - - if dataResponse.result.isFailure { - completion( - nil, - ErrorResponse.error(dataResponse.response?.statusCode ?? 500, dataResponse.data, dataResponse.result.error!) - ) - return - } - - completion( - Response( - response: dataResponse.response!, - body: (dataResponse.data as! T) - ), - nil - ) - }) - } - } - - open func buildHeaders() -> [String: String] { - var httpHeaders = SessionManager.defaultHTTPHeaders - for (key, value) in self.headers { - httpHeaders[key] = value - } - return httpHeaders - } - - fileprivate func getFileName(fromContentDisposition contentDisposition: String?) -> String? { - - guard let contentDisposition = contentDisposition else { - return nil - } - - let items = contentDisposition.components(separatedBy: ";") - - var filename: String? - - for contentItem in items { - - let filenameKey = "filename=" - guard let range = contentItem.range(of: filenameKey) else { - break - } - - filename = contentItem - return filename? - .replacingCharacters(in: range, with: "") - .replacingOccurrences(of: "\"", with: "") - .trimmingCharacters(in: .whitespacesAndNewlines) - } - - return filename - - } - - fileprivate func getPath(from url: URL) throws -> String { - - guard var path = URLComponents(url: url, resolvingAgainstBaseURL: true)?.path else { - throw DownloadException.requestMissingPath - } - - if path.hasPrefix("/") { - path.remove(at: path.startIndex) - } - - return path - - } - - fileprivate func getURL(from urlRequest: URLRequest) throws -> URL { - - guard let url = urlRequest.url else { - throw DownloadException.requestMissingURL - } - - return url - } - -} - -private enum DownloadException: Error { - case responseDataMissing - case responseFailed - case requestMissing - case requestMissingPath - case requestMissingURL -} - -public enum AlamofireDecodableRequestBuilderError: Error { - case emptyDataResponse - case nilHTTPResponse - case jsonDecoding(DecodingError) - case generalError(Error) -} - -open class AlamofireDecodableRequestBuilder: AlamofireRequestBuilder { - - override fileprivate func processRequest(request: DataRequest, _ managerId: String, _ completion: @escaping (_ response: Response?, _ error: Error?) -> Void) { - if let credential = self.credential { - request.authenticate(usingCredential: credential) - } - - let cleanupRequest = { - managerStore[managerId] = nil - } - - let validatedRequest = request.validate() - - switch T.self { - case is String.Type: - validatedRequest.responseString(queue: TestClientAPI.apiResponseQueue, completionHandler: { (stringResponse) in - cleanupRequest() - - if stringResponse.result.isFailure { - completion( - nil, - ErrorResponse.error(stringResponse.response?.statusCode ?? 500, stringResponse.data, stringResponse.result.error!) - ) - return - } - - completion( - Response( - response: stringResponse.response!, - body: ((stringResponse.result.value ?? "") as! T) - ), - nil - ) - }) - case is Void.Type: - validatedRequest.responseData(queue: TestClientAPI.apiResponseQueue, completionHandler: { (voidResponse) in - cleanupRequest() - - if voidResponse.result.isFailure { - completion( - nil, - ErrorResponse.error(voidResponse.response?.statusCode ?? 500, voidResponse.data, voidResponse.result.error!) - ) - return - } - - completion( - Response( - response: voidResponse.response!, - body: nil), - nil - ) - }) - case is Data.Type: - validatedRequest.responseData(queue: TestClientAPI.apiResponseQueue, completionHandler: { (dataResponse) in - cleanupRequest() - - if dataResponse.result.isFailure { - completion( - nil, - ErrorResponse.error(dataResponse.response?.statusCode ?? 500, dataResponse.data, dataResponse.result.error!) - ) - return - } - - completion( - Response( - response: dataResponse.response!, - body: (dataResponse.data as! T) - ), - nil - ) - }) - default: - validatedRequest.responseData(queue: TestClientAPI.apiResponseQueue, completionHandler: { (dataResponse: DataResponse) in - cleanupRequest() - - guard dataResponse.result.isSuccess else { - completion(nil, ErrorResponse.error(dataResponse.response?.statusCode ?? 500, dataResponse.data, dataResponse.result.error!)) - return - } - - guard let data = dataResponse.data, !data.isEmpty else { - completion(nil, ErrorResponse.error(-1, nil, AlamofireDecodableRequestBuilderError.emptyDataResponse)) - return - } - - guard let httpResponse = dataResponse.response else { - completion(nil, ErrorResponse.error(-2, nil, AlamofireDecodableRequestBuilderError.nilHTTPResponse)) - return - } - - var responseObj: Response? - - let decodeResult: (decodableObj: T?, error: Error?) = CodableHelper.decode(T.self, from: data) - if decodeResult.error == nil { - responseObj = Response(response: httpResponse, body: decodeResult.decodableObj) - } - - completion(responseObj, decodeResult.error) - }) - } - } - -} diff --git a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/CodableHelper.swift b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/CodableHelper.swift deleted file mode 100644 index 27cf29c65600..000000000000 --- a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/CodableHelper.swift +++ /dev/null @@ -1,75 +0,0 @@ -// -// CodableHelper.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public typealias EncodeResult = (data: Data?, error: Error?) - -open class CodableHelper { - - private static var customDateFormatter: DateFormatter? - private static var defaultDateFormatter: DateFormatter = { - let dateFormatter = DateFormatter() - dateFormatter.calendar = Calendar(identifier: .iso8601) - dateFormatter.locale = Locale(identifier: "en_US_POSIX") - dateFormatter.timeZone = TimeZone(secondsFromGMT: 0) - dateFormatter.dateFormat = Configuration.dateFormat - return dateFormatter - }() - private static var customJSONDecoder: JSONDecoder? - private static var defaultJSONDecoder: JSONDecoder = { - let decoder = JSONDecoder() - decoder.dateDecodingStrategy = .formatted(CodableHelper.dateFormatter) - return decoder - }() - private static var customJSONEncoder: JSONEncoder? - private static var defaultJSONEncoder: JSONEncoder = { - let encoder = JSONEncoder() - encoder.dateEncodingStrategy = .formatted(CodableHelper.dateFormatter) - encoder.outputFormatting = .prettyPrinted - return encoder - }() - - public static var dateFormatter: DateFormatter { - get { return self.customDateFormatter ?? self.defaultDateFormatter } - set { self.customDateFormatter = newValue } - } - public static var jsonDecoder: JSONDecoder { - get { return self.customJSONDecoder ?? self.defaultJSONDecoder } - set { self.customJSONDecoder = newValue } - } - public static var jsonEncoder: JSONEncoder { - get { return self.customJSONEncoder ?? self.defaultJSONEncoder } - set { self.customJSONEncoder = newValue } - } - - open class func decode(_ type: T.Type, from data: Data) -> (decodableObj: T?, error: Error?) where T: Decodable { - var returnedDecodable: T? - var returnedError: Error? - - do { - returnedDecodable = try self.jsonDecoder.decode(type, from: data) - } catch { - returnedError = error - } - - return (returnedDecodable, returnedError) - } - - open class func encode(_ value: T) -> EncodeResult where T: Encodable { - var returnedData: Data? - var returnedError: Error? - - do { - returnedData = try self.jsonEncoder.encode(value) - } catch { - returnedError = error - } - - return (returnedData, returnedError) - } -} diff --git a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Configuration.swift b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Configuration.swift deleted file mode 100644 index e1ecb39726e7..000000000000 --- a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Configuration.swift +++ /dev/null @@ -1,15 +0,0 @@ -// Configuration.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -open class Configuration { - - // This value is used to configure the date formatter that is used to serialize dates into JSON format. - // You must set it prior to encoding any dates, and it will only be read once. - public static var dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSZZZZZ" - -} diff --git a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Extensions.swift b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Extensions.swift deleted file mode 100644 index 74fcfcf2ad49..000000000000 --- a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Extensions.swift +++ /dev/null @@ -1,173 +0,0 @@ -// Extensions.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -extension Bool: JSONEncodable { - func encodeToJSON() -> Any { return self as Any } -} - -extension Float: JSONEncodable { - func encodeToJSON() -> Any { return self as Any } -} - -extension Int: JSONEncodable { - func encodeToJSON() -> Any { return self as Any } -} - -extension Int32: JSONEncodable { - func encodeToJSON() -> Any { return NSNumber(value: self as Int32) } -} - -extension Int64: JSONEncodable { - func encodeToJSON() -> Any { return NSNumber(value: self as Int64) } -} - -extension Double: JSONEncodable { - func encodeToJSON() -> Any { return self as Any } -} - -extension String: JSONEncodable { - func encodeToJSON() -> Any { return self as Any } -} - -extension RawRepresentable where RawValue: JSONEncodable { - func encodeToJSON() -> Any { return self.rawValue as Any } -} - -private func encodeIfPossible(_ object: T) -> Any { - if let encodableObject = object as? JSONEncodable { - return encodableObject.encodeToJSON() - } else { - return object as Any - } -} - -extension Array: JSONEncodable { - func encodeToJSON() -> Any { - return self.map(encodeIfPossible) - } -} - -extension Dictionary: JSONEncodable { - func encodeToJSON() -> Any { - var dictionary = [AnyHashable: Any]() - for (key, value) in self { - dictionary[key] = encodeIfPossible(value) - } - return dictionary as Any - } -} - -extension Data: JSONEncodable { - func encodeToJSON() -> Any { - return self.base64EncodedString(options: Data.Base64EncodingOptions()) - } -} - -extension Date: JSONEncodable { - func encodeToJSON() -> Any { - return CodableHelper.dateFormatter.string(from: self) as Any - } -} - -extension URL: JSONEncodable { - func encodeToJSON() -> Any { - return self - } -} - -extension UUID: JSONEncodable { - func encodeToJSON() -> Any { - return self.uuidString - } -} - -extension String: CodingKey { - - public var stringValue: String { - return self - } - - public init?(stringValue: String) { - self.init(stringLiteral: stringValue) - } - - public var intValue: Int? { - return nil - } - - public init?(intValue: Int) { - return nil - } - -} - -extension KeyedEncodingContainerProtocol { - - public mutating func encodeArray(_ values: [T], forKey key: Self.Key) throws where T: Encodable { - var arrayContainer = nestedUnkeyedContainer(forKey: key) - try arrayContainer.encode(contentsOf: values) - } - - public mutating func encodeArrayIfPresent(_ values: [T]?, forKey key: Self.Key) throws where T: Encodable { - if let values = values { - try encodeArray(values, forKey: key) - } - } - - public mutating func encodeMap(_ pairs: [Self.Key: T]) throws where T: Encodable { - for (key, value) in pairs { - try encode(value, forKey: key) - } - } - - public mutating func encodeMapIfPresent(_ pairs: [Self.Key: T]?) throws where T: Encodable { - if let pairs = pairs { - try encodeMap(pairs) - } - } - -} - -extension KeyedDecodingContainerProtocol { - - public func decodeArray(_ type: T.Type, forKey key: Self.Key) throws -> [T] where T: Decodable { - var tmpArray = [T]() - - var nestedContainer = try nestedUnkeyedContainer(forKey: key) - while !nestedContainer.isAtEnd { - let arrayValue = try nestedContainer.decode(T.self) - tmpArray.append(arrayValue) - } - - return tmpArray - } - - public func decodeArrayIfPresent(_ type: T.Type, forKey key: Self.Key) throws -> [T]? where T: Decodable { - var tmpArray: [T]? - - if contains(key) { - tmpArray = try decodeArray(T.self, forKey: key) - } - - return tmpArray - } - - public func decodeMap(_ type: T.Type, excludedKeys: Set) throws -> [Self.Key: T] where T: Decodable { - var map: [Self.Key: T] = [:] - - for key in allKeys { - if !excludedKeys.contains(key) { - let value = try decode(T.self, forKey: key) - map[key] = value - } - } - - return map - } - -} diff --git a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/JSONEncodableEncoding.swift b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/JSONEncodableEncoding.swift deleted file mode 100644 index fb76bbed26f7..000000000000 --- a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/JSONEncodableEncoding.swift +++ /dev/null @@ -1,54 +0,0 @@ -// -// JSONDataEncoding.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -import Alamofire - -public struct JSONDataEncoding: ParameterEncoding { - - // MARK: Properties - - private static let jsonDataKey = "jsonData" - - // MARK: Encoding - - /// Creates a URL request by encoding parameters and applying them onto an existing request. - /// - /// - parameter urlRequest: The request to have parameters applied. - /// - parameter parameters: The parameters to apply. This should have a single key/value - /// pair with "jsonData" as the key and a Data object as the value. - /// - /// - throws: An `Error` if the encoding process encounters an error. - /// - /// - returns: The encoded request. - public func encode(_ urlRequest: URLRequestConvertible, with parameters: Parameters?) throws -> URLRequest { - var urlRequest = try urlRequest.asURLRequest() - - guard let jsonData = parameters?[JSONDataEncoding.jsonDataKey] as? Data, !jsonData.isEmpty else { - return urlRequest - } - - if urlRequest.value(forHTTPHeaderField: "Content-Type") == nil { - urlRequest.setValue("application/json", forHTTPHeaderField: "Content-Type") - } - - urlRequest.httpBody = jsonData - - return urlRequest - } - - public static func encodingParameters(jsonData: Data?) -> Parameters? { - var returnedParams: Parameters? - if let jsonData = jsonData, !jsonData.isEmpty { - var params = Parameters() - params[jsonDataKey] = jsonData - returnedParams = params - } - return returnedParams - } - -} diff --git a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/JSONEncodingHelper.swift b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/JSONEncodingHelper.swift deleted file mode 100644 index 827bdec87782..000000000000 --- a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/JSONEncodingHelper.swift +++ /dev/null @@ -1,43 +0,0 @@ -// -// JSONEncodingHelper.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -import Alamofire - -open class JSONEncodingHelper { - - open class func encodingParameters(forEncodableObject encodableObj: T?) -> Parameters? { - var params: Parameters? - - // Encode the Encodable object - if let encodableObj = encodableObj { - let encodeResult = CodableHelper.encode(encodableObj) - if encodeResult.error == nil { - params = JSONDataEncoding.encodingParameters(jsonData: encodeResult.data) - } - } - - return params - } - - open class func encodingParameters(forEncodableObject encodableObj: Any?) -> Parameters? { - var params: Parameters? - - if let encodableObj = encodableObj { - do { - let data = try JSONSerialization.data(withJSONObject: encodableObj, options: .prettyPrinted) - params = JSONDataEncoding.encodingParameters(jsonData: data) - } catch { - print(error) - return nil - } - } - - return params - } - -} diff --git a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models.swift b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models.swift deleted file mode 100644 index 25161165865e..000000000000 --- a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models.swift +++ /dev/null @@ -1,36 +0,0 @@ -// Models.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -protocol JSONEncodable { - func encodeToJSON() -> Any -} - -public enum ErrorResponse: Error { - case error(Int, Data?, Error) -} - -open class Response { - public let statusCode: Int - public let header: [String: String] - public let body: T? - - public init(statusCode: Int, header: [String: String], body: T?) { - self.statusCode = statusCode - self.header = header - self.body = body - } - - public convenience init(response: HTTPURLResponse, body: T?) { - let rawHeader = response.allHeaderFields - var header = [String: String]() - for case let (key, value) as (String, String) in rawHeader { - header[key] = value - } - self.init(statusCode: response.statusCode, header: header, body: body) - } -} diff --git a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/AllPrimitives.swift b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/AllPrimitives.swift deleted file mode 100644 index 64073972bc6e..000000000000 --- a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/AllPrimitives.swift +++ /dev/null @@ -1,72 +0,0 @@ -// -// AllPrimitives.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -/** Object which contains lots of different primitive OpenAPI types */ -public struct AllPrimitives: Codable { - - public enum MyInlineStringEnum: String, Codable { - case inlinestringenumvalue1 = "inlineStringEnumValue1" - case inlinestringenumvalue2 = "inlineStringEnumValue2" - case inlinestringenumvalue3 = "inlineStringEnumValue3" - } - public var myInteger: Int? - public var myIntegerArray: [Int]? - public var myLong: Int64? - public var myLongArray: [Int64]? - public var myFloat: Float? - public var myFloatArray: [Float]? - public var myDouble: Double? - public var myDoubleArray: [Double]? - public var myString: String? - public var myStringArray: [String]? - public var myBytes: Data? - public var myBytesArray: [Data]? - public var myBoolean: Bool? - public var myBooleanArray: [Bool]? - public var myDate: Date? - public var myDateArray: [Date]? - public var myDateTime: Date? - public var myDateTimeArray: [Date]? - public var myFile: URL? - public var myFileArray: [URL]? - public var myUUID: UUID? - public var myUUIDArray: [UUID]? - public var myStringEnum: StringEnum? - public var myStringEnumArray: [StringEnum]? - public var myInlineStringEnum: MyInlineStringEnum? - - public init(myInteger: Int?, myIntegerArray: [Int]?, myLong: Int64?, myLongArray: [Int64]?, myFloat: Float?, myFloatArray: [Float]?, myDouble: Double?, myDoubleArray: [Double]?, myString: String?, myStringArray: [String]?, myBytes: Data?, myBytesArray: [Data]?, myBoolean: Bool?, myBooleanArray: [Bool]?, myDate: Date?, myDateArray: [Date]?, myDateTime: Date?, myDateTimeArray: [Date]?, myFile: URL?, myFileArray: [URL]?, myUUID: UUID?, myUUIDArray: [UUID]?, myStringEnum: StringEnum?, myStringEnumArray: [StringEnum]?, myInlineStringEnum: MyInlineStringEnum?) { - self.myInteger = myInteger - self.myIntegerArray = myIntegerArray - self.myLong = myLong - self.myLongArray = myLongArray - self.myFloat = myFloat - self.myFloatArray = myFloatArray - self.myDouble = myDouble - self.myDoubleArray = myDoubleArray - self.myString = myString - self.myStringArray = myStringArray - self.myBytes = myBytes - self.myBytesArray = myBytesArray - self.myBoolean = myBoolean - self.myBooleanArray = myBooleanArray - self.myDate = myDate - self.myDateArray = myDateArray - self.myDateTime = myDateTime - self.myDateTimeArray = myDateTimeArray - self.myFile = myFile - self.myFileArray = myFileArray - self.myUUID = myUUID - self.myUUIDArray = myUUIDArray - self.myStringEnum = myStringEnum - self.myStringEnumArray = myStringEnumArray - self.myInlineStringEnum = myInlineStringEnum - } - -} diff --git a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/BaseCard.swift b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/BaseCard.swift deleted file mode 100644 index 2ffb3a5e1ab9..000000000000 --- a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/BaseCard.swift +++ /dev/null @@ -1,19 +0,0 @@ -// -// BaseCard.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -/** This is a base card object which uses a 'cardType' discriminator. */ -public struct BaseCard: Codable { - - public var cardType: String - - public init(cardType: String) { - self.cardType = cardType - } - -} diff --git a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/ErrorInfo.swift b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/ErrorInfo.swift deleted file mode 100644 index c2b1fcda5868..000000000000 --- a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/ErrorInfo.swift +++ /dev/null @@ -1,23 +0,0 @@ -// -// ErrorInfo.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -/** Example Error object */ -public struct ErrorInfo: Codable { - - public var code: Int? - public var message: String? - public var details: [String]? - - public init(code: Int?, message: String?, details: [String]?) { - self.code = code - self.message = message - self.details = details - } - -} diff --git a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/GetAllModelsResult.swift b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/GetAllModelsResult.swift deleted file mode 100644 index b8cfedbe94af..000000000000 --- a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/GetAllModelsResult.swift +++ /dev/null @@ -1,23 +0,0 @@ -// -// GetAllModelsResult.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -/** Response object containing AllPrimitives object */ -public struct GetAllModelsResult: Codable { - - public var myPrimitiveArray: [AllPrimitives]? - public var myPrimitive: AllPrimitives? - public var myVariableNameTest: VariableNameTest? - - public init(myPrimitiveArray: [AllPrimitives]?, myPrimitive: AllPrimitives?, myVariableNameTest: VariableNameTest?) { - self.myPrimitiveArray = myPrimitiveArray - self.myPrimitive = myPrimitive - self.myVariableNameTest = myVariableNameTest - } - -} diff --git a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/ModelDoubleArray.swift b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/ModelDoubleArray.swift deleted file mode 100644 index 9e523219a446..000000000000 --- a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/ModelDoubleArray.swift +++ /dev/null @@ -1,11 +0,0 @@ -// -// ModelDoubleArray.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -/** This defines an array of doubles. */ -public typealias ModelDoubleArray = [Double] diff --git a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/ModelErrorInfoArray.swift b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/ModelErrorInfoArray.swift deleted file mode 100644 index 358c83dc7a91..000000000000 --- a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/ModelErrorInfoArray.swift +++ /dev/null @@ -1,11 +0,0 @@ -// -// ModelErrorInfoArray.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -/** This defines an array of ErrorInfo objects. */ -public typealias ModelErrorInfoArray = [ErrorInfo] diff --git a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/ModelStringArray.swift b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/ModelStringArray.swift deleted file mode 100644 index 6a614cc36019..000000000000 --- a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/ModelStringArray.swift +++ /dev/null @@ -1,11 +0,0 @@ -// -// ModelStringArray.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -/** This defines an array of strings. */ -public typealias ModelStringArray = [String] diff --git a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/ModelWithIntAdditionalPropertiesOnly.swift b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/ModelWithIntAdditionalPropertiesOnly.swift deleted file mode 100644 index 2878543406a4..000000000000 --- a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/ModelWithIntAdditionalPropertiesOnly.swift +++ /dev/null @@ -1,46 +0,0 @@ -// -// ModelWithIntAdditionalPropertiesOnly.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -/** This is an empty model with no properties and only additionalProperties of type int32 */ -public struct ModelWithIntAdditionalPropertiesOnly: Codable { - - public var additionalProperties: [String: Int] = [:] - - public subscript(key: String) -> Int? { - get { - if let value = additionalProperties[key] { - return value - } - return nil - } - - set { - additionalProperties[key] = newValue - } - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - try container.encodeMap(additionalProperties) - } - - // Decodable protocol methods - - public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - var nonAdditionalPropertyKeys = Set() - additionalProperties = try container.decodeMap(Int.self, excludedKeys: nonAdditionalPropertyKeys) - } - -} diff --git a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/ModelWithPropertiesAndAdditionalProperties.swift b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/ModelWithPropertiesAndAdditionalProperties.swift deleted file mode 100644 index d8f115cb4998..000000000000 --- a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/ModelWithPropertiesAndAdditionalProperties.swift +++ /dev/null @@ -1,89 +0,0 @@ -// -// ModelWithPropertiesAndAdditionalProperties.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -/** This is an empty model with no properties and only additionalProperties of type int32 */ -public struct ModelWithPropertiesAndAdditionalProperties: Codable { - - public var myIntegerReq: Int - public var myIntegerOpt: Int? - public var myPrimitiveReq: AllPrimitives - public var myPrimitiveOpt: AllPrimitives? - public var myStringArrayReq: [String] - public var myStringArrayOpt: [String]? - public var myPrimitiveArrayReq: [AllPrimitives] - public var myPrimitiveArrayOpt: [AllPrimitives]? - - public init(myIntegerReq: Int, myIntegerOpt: Int?, myPrimitiveReq: AllPrimitives, myPrimitiveOpt: AllPrimitives?, myStringArrayReq: [String], myStringArrayOpt: [String]?, myPrimitiveArrayReq: [AllPrimitives], myPrimitiveArrayOpt: [AllPrimitives]?) { - self.myIntegerReq = myIntegerReq - self.myIntegerOpt = myIntegerOpt - self.myPrimitiveReq = myPrimitiveReq - self.myPrimitiveOpt = myPrimitiveOpt - self.myStringArrayReq = myStringArrayReq - self.myStringArrayOpt = myStringArrayOpt - self.myPrimitiveArrayReq = myPrimitiveArrayReq - self.myPrimitiveArrayOpt = myPrimitiveArrayOpt - } - public var additionalProperties: [String: String] = [:] - - public subscript(key: String) -> String? { - get { - if let value = additionalProperties[key] { - return value - } - return nil - } - - set { - additionalProperties[key] = newValue - } - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - try container.encode(myIntegerReq, forKey: "myIntegerReq") - try container.encodeIfPresent(myIntegerOpt, forKey: "myIntegerOpt") - try container.encode(myPrimitiveReq, forKey: "myPrimitiveReq") - try container.encodeIfPresent(myPrimitiveOpt, forKey: "myPrimitiveOpt") - try container.encode(myStringArrayReq, forKey: "myStringArrayReq") - try container.encodeIfPresent(myStringArrayOpt, forKey: "myStringArrayOpt") - try container.encode(myPrimitiveArrayReq, forKey: "myPrimitiveArrayReq") - try container.encodeIfPresent(myPrimitiveArrayOpt, forKey: "myPrimitiveArrayOpt") - try container.encodeMap(additionalProperties) - } - - // Decodable protocol methods - - public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - myIntegerReq = try container.decode(Int.self, forKey: "myIntegerReq") - myIntegerOpt = try container.decodeIfPresent(Int.self, forKey: "myIntegerOpt") - myPrimitiveReq = try container.decode(AllPrimitives.self, forKey: "myPrimitiveReq") - myPrimitiveOpt = try container.decodeIfPresent(AllPrimitives.self, forKey: "myPrimitiveOpt") - myStringArrayReq = try container.decode([String].self, forKey: "myStringArrayReq") - myStringArrayOpt = try container.decodeIfPresent([String].self, forKey: "myStringArrayOpt") - myPrimitiveArrayReq = try container.decode([AllPrimitives].self, forKey: "myPrimitiveArrayReq") - myPrimitiveArrayOpt = try container.decodeIfPresent([AllPrimitives].self, forKey: "myPrimitiveArrayOpt") - var nonAdditionalPropertyKeys = Set() - nonAdditionalPropertyKeys.insert("myIntegerReq") - nonAdditionalPropertyKeys.insert("myIntegerOpt") - nonAdditionalPropertyKeys.insert("myPrimitiveReq") - nonAdditionalPropertyKeys.insert("myPrimitiveOpt") - nonAdditionalPropertyKeys.insert("myStringArrayReq") - nonAdditionalPropertyKeys.insert("myStringArrayOpt") - nonAdditionalPropertyKeys.insert("myPrimitiveArrayReq") - nonAdditionalPropertyKeys.insert("myPrimitiveArrayOpt") - additionalProperties = try container.decodeMap(String.self, excludedKeys: nonAdditionalPropertyKeys) - } - -} diff --git a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/ModelWithStringAdditionalPropertiesOnly.swift b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/ModelWithStringAdditionalPropertiesOnly.swift deleted file mode 100644 index fffed8885315..000000000000 --- a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/ModelWithStringAdditionalPropertiesOnly.swift +++ /dev/null @@ -1,46 +0,0 @@ -// -// ModelWithStringAdditionalPropertiesOnly.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -/** This is an empty model with no properties and only additionalProperties of type string */ -public struct ModelWithStringAdditionalPropertiesOnly: Codable { - - public var additionalProperties: [String: String] = [:] - - public subscript(key: String) -> String? { - get { - if let value = additionalProperties[key] { - return value - } - return nil - } - - set { - additionalProperties[key] = newValue - } - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: String.self) - - try container.encodeMap(additionalProperties) - } - - // Decodable protocol methods - - public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: String.self) - - var nonAdditionalPropertyKeys = Set() - additionalProperties = try container.decodeMap(String.self, excludedKeys: nonAdditionalPropertyKeys) - } - -} diff --git a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/PersonCard.swift b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/PersonCard.swift deleted file mode 100644 index db1a081b275d..000000000000 --- a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/PersonCard.swift +++ /dev/null @@ -1,23 +0,0 @@ -// -// PersonCard.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -/** This is a card object for a Person derived from BaseCard. */ -public struct PersonCard: Codable { - - public var cardType: String - public var firstName: String? - public var lastName: String? - - public init(cardType: String, firstName: String?, lastName: String?) { - self.cardType = cardType - self.firstName = firstName - self.lastName = lastName - } - -} diff --git a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/PersonCardAllOf.swift b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/PersonCardAllOf.swift deleted file mode 100644 index e11d38985a2e..000000000000 --- a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/PersonCardAllOf.swift +++ /dev/null @@ -1,20 +0,0 @@ -// -// PersonCardAllOf.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct PersonCardAllOf: Codable { - - public var firstName: String? - public var lastName: String? - - public init(firstName: String?, lastName: String?) { - self.firstName = firstName - self.lastName = lastName - } - -} diff --git a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/PlaceCard.swift b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/PlaceCard.swift deleted file mode 100644 index 0fd94cf83640..000000000000 --- a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/PlaceCard.swift +++ /dev/null @@ -1,23 +0,0 @@ -// -// PlaceCard.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -/** This is a card object for a Person derived from BaseCard. */ -public struct PlaceCard: Codable { - - public var cardType: String - public var placeName: String? - public var placeAddress: String? - - public init(cardType: String, placeName: String?, placeAddress: String?) { - self.cardType = cardType - self.placeName = placeName - self.placeAddress = placeAddress - } - -} diff --git a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/PlaceCardAllOf.swift b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/PlaceCardAllOf.swift deleted file mode 100644 index c5e89a15e00f..000000000000 --- a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/PlaceCardAllOf.swift +++ /dev/null @@ -1,20 +0,0 @@ -// -// PlaceCardAllOf.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct PlaceCardAllOf: Codable { - - public var placeName: String? - public var placeAddress: String? - - public init(placeName: String?, placeAddress: String?) { - self.placeName = placeName - self.placeAddress = placeAddress - } - -} diff --git a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/SampleBase.swift b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/SampleBase.swift deleted file mode 100644 index 7d884d88e185..000000000000 --- a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/SampleBase.swift +++ /dev/null @@ -1,21 +0,0 @@ -// -// SampleBase.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -/** This is a base class object from which other classes will derive. */ -public struct SampleBase: Codable { - - public var baseClassStringProp: String? - public var baseClassIntegerProp: Int? - - public init(baseClassStringProp: String?, baseClassIntegerProp: Int?) { - self.baseClassStringProp = baseClassStringProp - self.baseClassIntegerProp = baseClassIntegerProp - } - -} diff --git a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/SampleSubClass.swift b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/SampleSubClass.swift deleted file mode 100644 index c6ffc74a959d..000000000000 --- a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/SampleSubClass.swift +++ /dev/null @@ -1,25 +0,0 @@ -// -// SampleSubClass.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -/** This is a subclass defived from the SampleBase class. */ -public struct SampleSubClass: Codable { - - public var baseClassStringProp: String? - public var baseClassIntegerProp: Int? - public var subClassStringProp: String? - public var subClassIntegerProp: Int? - - public init(baseClassStringProp: String?, baseClassIntegerProp: Int?, subClassStringProp: String?, subClassIntegerProp: Int?) { - self.baseClassStringProp = baseClassStringProp - self.baseClassIntegerProp = baseClassIntegerProp - self.subClassStringProp = subClassStringProp - self.subClassIntegerProp = subClassIntegerProp - } - -} diff --git a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/SampleSubClassAllOf.swift b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/SampleSubClassAllOf.swift deleted file mode 100644 index 7f52bb9fef4c..000000000000 --- a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/SampleSubClassAllOf.swift +++ /dev/null @@ -1,20 +0,0 @@ -// -// SampleSubClassAllOf.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public struct SampleSubClassAllOf: Codable { - - public var subClassStringProp: String? - public var subClassIntegerProp: Int? - - public init(subClassStringProp: String?, subClassIntegerProp: Int?) { - self.subClassStringProp = subClassStringProp - self.subClassIntegerProp = subClassIntegerProp - } - -} diff --git a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/StringEnum.swift b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/StringEnum.swift deleted file mode 100644 index 67c1c22deda7..000000000000 --- a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/StringEnum.swift +++ /dev/null @@ -1,14 +0,0 @@ -// -// StringEnum.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -public enum StringEnum: String, Codable { - case stringenumvalue1 = "stringEnumValue1" - case stringenumvalue2 = "stringEnumValue2" - case stringenumvalue3 = "stringEnumValue3" -} diff --git a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/VariableNameTest.swift b/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/VariableNameTest.swift deleted file mode 100644 index 285d86a56941..000000000000 --- a/samples/client/test/swift4/default/TestClient/Classes/OpenAPIs/Models/VariableNameTest.swift +++ /dev/null @@ -1,32 +0,0 @@ -// -// VariableNameTest.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation - -/** This object contains property names which we know will be different from their variable name. Examples of this include snake case property names and property names which are Swift 4 reserved words. */ -public struct VariableNameTest: Codable { - - /** This snake-case examle_name property name should be converted to a camelCase variable name like exampleName */ - public var exampleName: String? - /** This property name is a reserved word in most languages, including Swift 4. */ - public var _for: String? - /** This model object property name should be unchanged from the JSON property name. */ - public var normalName: String? - - public init(exampleName: String?, _for: String?, normalName: String?) { - self.exampleName = exampleName - self._for = _for - self.normalName = normalName - } - - public enum CodingKeys: String, CodingKey { - case exampleName = "example_name" - case _for = "for" - case normalName - } - -} diff --git a/samples/client/test/swift4/default/TestClientApp/.gitignore b/samples/client/test/swift4/default/TestClientApp/.gitignore deleted file mode 100644 index 0269c2f56db9..000000000000 --- a/samples/client/test/swift4/default/TestClientApp/.gitignore +++ /dev/null @@ -1,72 +0,0 @@ -### https://raw.github.com/github/gitignore/7792e50daeaa6c07460484704671d1dc9f0045a7/Swift.gitignore - -# Xcode -# -# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore - -## Build generated -build/ -DerivedData/ - -## Various settings -*.pbxuser -!default.pbxuser -*.mode1v3 -!default.mode1v3 -*.mode2v3 -!default.mode2v3 -*.perspectivev3 -!default.perspectivev3 -xcuserdata/ - -## Other -*.moved-aside -*.xccheckout -*.xcscmblueprint - -## Obj-C/Swift specific -*.hmap -*.ipa -*.dSYM.zip -*.dSYM - -## Playgrounds -timeline.xctimeline -playground.xcworkspace - -# Swift Package Manager -# -# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. -# Packages/ -# Package.pins -# Package.resolved -.build/ - -# CocoaPods -# -# We recommend against adding the Pods directory to your .gitignore. However -# you should judge for yourself, the pros and cons are mentioned at: -# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control -# -Pods/ - -# Carthage -# -# Add this line if you want to avoid checking in source code from Carthage dependencies. -Carthage/Checkouts - -Carthage/Build - -# fastlane -# -# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the -# screenshots whenever they are needed. -# For more information about the recommended setup visit: -# https://docs.fastlane.tools/best-practices/source-control/#source-control - -fastlane/report.xml -fastlane/Preview.html -fastlane/screenshots -fastlane/test_output - - diff --git a/samples/client/test/swift4/default/TestClientApp/Podfile b/samples/client/test/swift4/default/TestClientApp/Podfile deleted file mode 100644 index 4c786a266c9a..000000000000 --- a/samples/client/test/swift4/default/TestClientApp/Podfile +++ /dev/null @@ -1,13 +0,0 @@ -platform :ios, '9.0' - -source 'https://cdn.cocoapods.org/' - -use_frameworks! - -target 'TestClientApp' do - pod "TestClient", :path => "../" - - target 'TestClientAppTests' do - inherit! :search_paths - end -end diff --git a/samples/client/test/swift4/default/TestClientApp/Podfile.lock b/samples/client/test/swift4/default/TestClientApp/Podfile.lock deleted file mode 100644 index 52635b1df2f5..000000000000 --- a/samples/client/test/swift4/default/TestClientApp/Podfile.lock +++ /dev/null @@ -1,23 +0,0 @@ -PODS: - - Alamofire (4.9.0) - - TestClient (1.0): - - Alamofire (~> 4.9.0) - -DEPENDENCIES: - - TestClient (from `../`) - -SPEC REPOS: - trunk: - - Alamofire - -EXTERNAL SOURCES: - TestClient: - :path: "../" - -SPEC CHECKSUMS: - Alamofire: afc3e7c6db61476cb45cdd23fed06bad03bbc321 - TestClient: 4923530f672e09a8d020c93372c5ecc195a00ff2 - -PODFILE CHECKSUM: 837b06bfc9f93ccd7664fd918d113c8e3824bde3 - -COCOAPODS: 1.8.4 diff --git a/samples/client/test/swift4/default/TestClientApp/TestClientApp.xcodeproj/project.pbxproj b/samples/client/test/swift4/default/TestClientApp/TestClientApp.xcodeproj/project.pbxproj deleted file mode 100644 index 2a08244d0ac2..000000000000 --- a/samples/client/test/swift4/default/TestClientApp/TestClientApp.xcodeproj/project.pbxproj +++ /dev/null @@ -1,548 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 48; - objects = { - -/* Begin PBXBuildFile section */ - 38F9390AFCDA262FB068DF15 /* Pods_TestClientApp.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A23B54E8FB808BD3C9DD08C8 /* Pods_TestClientApp.framework */; }; - C1ADDA787241158A360D054C /* Pods_TestClientAppTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7476A9BCC24D9147A35E4C81 /* Pods_TestClientAppTests.framework */; }; - FDC99C781F1E832E000EB08F /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = FDC99C771F1E832E000EB08F /* AppDelegate.swift */; }; - FDC99C7A1F1E832E000EB08F /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = FDC99C791F1E832E000EB08F /* ViewController.swift */; }; - FDC99C7D1F1E832E000EB08F /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = FDC99C7B1F1E832E000EB08F /* Main.storyboard */; }; - FDC99C7F1F1E832E000EB08F /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = FDC99C7E1F1E832E000EB08F /* Assets.xcassets */; }; - FDC99C821F1E832E000EB08F /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = FDC99C801F1E832E000EB08F /* LaunchScreen.storyboard */; }; - FDC99C8D1F1E832E000EB08F /* TestClientAppTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = FDC99C8C1F1E832E000EB08F /* TestClientAppTests.swift */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - FDC99C891F1E832E000EB08F /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = FDC99C6C1F1E832D000EB08F /* Project object */; - proxyType = 1; - remoteGlobalIDString = FDC99C731F1E832D000EB08F; - remoteInfo = TestClientApp; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXFileReference section */ - 3DE372F32029703A6CED4209 /* Pods-TestClientAppTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-TestClientAppTests.release.xcconfig"; path = "Target Support Files/Pods-TestClientAppTests/Pods-TestClientAppTests.release.xcconfig"; sourceTree = ""; }; - 6DB31B4AAB586D1D0C5D8EA5 /* Pods-TestClientAppTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-TestClientAppTests.debug.xcconfig"; path = "Target Support Files/Pods-TestClientAppTests/Pods-TestClientAppTests.debug.xcconfig"; sourceTree = ""; }; - 7476A9BCC24D9147A35E4C81 /* Pods_TestClientAppTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_TestClientAppTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - A23B54E8FB808BD3C9DD08C8 /* Pods_TestClientApp.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_TestClientApp.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - F7DC1AA685120D6BF86B80A5 /* Pods-TestClientApp.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-TestClientApp.debug.xcconfig"; path = "Target Support Files/Pods-TestClientApp/Pods-TestClientApp.debug.xcconfig"; sourceTree = ""; }; - FD4690FD2BC8291E69C8FD40 /* Pods-TestClientApp.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-TestClientApp.release.xcconfig"; path = "Target Support Files/Pods-TestClientApp/Pods-TestClientApp.release.xcconfig"; sourceTree = ""; }; - FDC99C741F1E832E000EB08F /* TestClientApp.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = TestClientApp.app; sourceTree = BUILT_PRODUCTS_DIR; }; - FDC99C771F1E832E000EB08F /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; - FDC99C791F1E832E000EB08F /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; - FDC99C7C1F1E832E000EB08F /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; - FDC99C7E1F1E832E000EB08F /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; - FDC99C811F1E832E000EB08F /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; - FDC99C831F1E832E000EB08F /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - FDC99C881F1E832E000EB08F /* TestClientAppTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = TestClientAppTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - FDC99C8C1F1E832E000EB08F /* TestClientAppTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TestClientAppTests.swift; sourceTree = ""; }; - FDC99C8E1F1E832E000EB08F /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - FDC99C711F1E832D000EB08F /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 38F9390AFCDA262FB068DF15 /* Pods_TestClientApp.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - FDC99C851F1E832E000EB08F /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - C1ADDA787241158A360D054C /* Pods_TestClientAppTests.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 14E10881047978AE906EB19F /* Frameworks */ = { - isa = PBXGroup; - children = ( - A23B54E8FB808BD3C9DD08C8 /* Pods_TestClientApp.framework */, - 7476A9BCC24D9147A35E4C81 /* Pods_TestClientAppTests.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; - CF51681F23C24C36AAED2CE8 /* Pods */ = { - isa = PBXGroup; - children = ( - F7DC1AA685120D6BF86B80A5 /* Pods-TestClientApp.debug.xcconfig */, - FD4690FD2BC8291E69C8FD40 /* Pods-TestClientApp.release.xcconfig */, - 6DB31B4AAB586D1D0C5D8EA5 /* Pods-TestClientAppTests.debug.xcconfig */, - 3DE372F32029703A6CED4209 /* Pods-TestClientAppTests.release.xcconfig */, - ); - name = Pods; - path = Pods; - sourceTree = ""; - }; - FDC99C6B1F1E832D000EB08F = { - isa = PBXGroup; - children = ( - FDC99C761F1E832E000EB08F /* TestClientApp */, - FDC99C8B1F1E832E000EB08F /* TestClientAppTests */, - FDC99C751F1E832E000EB08F /* Products */, - CF51681F23C24C36AAED2CE8 /* Pods */, - 14E10881047978AE906EB19F /* Frameworks */, - ); - sourceTree = ""; - }; - FDC99C751F1E832E000EB08F /* Products */ = { - isa = PBXGroup; - children = ( - FDC99C741F1E832E000EB08F /* TestClientApp.app */, - FDC99C881F1E832E000EB08F /* TestClientAppTests.xctest */, - ); - name = Products; - sourceTree = ""; - }; - FDC99C761F1E832E000EB08F /* TestClientApp */ = { - isa = PBXGroup; - children = ( - FDC99C771F1E832E000EB08F /* AppDelegate.swift */, - FDC99C791F1E832E000EB08F /* ViewController.swift */, - FDC99C7B1F1E832E000EB08F /* Main.storyboard */, - FDC99C7E1F1E832E000EB08F /* Assets.xcassets */, - FDC99C801F1E832E000EB08F /* LaunchScreen.storyboard */, - FDC99C831F1E832E000EB08F /* Info.plist */, - ); - path = TestClientApp; - sourceTree = ""; - }; - FDC99C8B1F1E832E000EB08F /* TestClientAppTests */ = { - isa = PBXGroup; - children = ( - FDC99C8C1F1E832E000EB08F /* TestClientAppTests.swift */, - FDC99C8E1F1E832E000EB08F /* Info.plist */, - ); - path = TestClientAppTests; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - FDC99C731F1E832D000EB08F /* TestClientApp */ = { - isa = PBXNativeTarget; - buildConfigurationList = FDC99C911F1E832E000EB08F /* Build configuration list for PBXNativeTarget "TestClientApp" */; - buildPhases = ( - 49D4BFD3E4300757B94A1108 /* [CP] Check Pods Manifest.lock */, - FDC99C701F1E832D000EB08F /* Sources */, - FDC99C711F1E832D000EB08F /* Frameworks */, - FDC99C721F1E832D000EB08F /* Resources */, - 963B093FCC81F62B36EB9CB5 /* [CP] Embed Pods Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = TestClientApp; - productName = TestClientApp; - productReference = FDC99C741F1E832E000EB08F /* TestClientApp.app */; - productType = "com.apple.product-type.application"; - }; - FDC99C871F1E832E000EB08F /* TestClientAppTests */ = { - isa = PBXNativeTarget; - buildConfigurationList = FDC99C941F1E832E000EB08F /* Build configuration list for PBXNativeTarget "TestClientAppTests" */; - buildPhases = ( - 29B2A5322E23310EC5D6B2DD /* [CP] Check Pods Manifest.lock */, - FDC99C841F1E832E000EB08F /* Sources */, - FDC99C851F1E832E000EB08F /* Frameworks */, - FDC99C861F1E832E000EB08F /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - FDC99C8A1F1E832E000EB08F /* PBXTargetDependency */, - ); - name = TestClientAppTests; - productName = TestClientAppTests; - productReference = FDC99C881F1E832E000EB08F /* TestClientAppTests.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - FDC99C6C1F1E832D000EB08F /* Project object */ = { - isa = PBXProject; - attributes = { - LastSwiftUpdateCheck = 0900; - LastUpgradeCheck = 0900; - ORGANIZATIONNAME = "Swagger Codegen"; - TargetAttributes = { - FDC99C731F1E832D000EB08F = { - CreatedOnToolsVersion = 9.0; - }; - FDC99C871F1E832E000EB08F = { - CreatedOnToolsVersion = 9.0; - TestTargetID = FDC99C731F1E832D000EB08F; - }; - }; - }; - buildConfigurationList = FDC99C6F1F1E832D000EB08F /* Build configuration list for PBXProject "TestClientApp" */; - compatibilityVersion = "Xcode 8.0"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = FDC99C6B1F1E832D000EB08F; - productRefGroup = FDC99C751F1E832E000EB08F /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - FDC99C731F1E832D000EB08F /* TestClientApp */, - FDC99C871F1E832E000EB08F /* TestClientAppTests */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - FDC99C721F1E832D000EB08F /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - FDC99C821F1E832E000EB08F /* LaunchScreen.storyboard in Resources */, - FDC99C7F1F1E832E000EB08F /* Assets.xcassets in Resources */, - FDC99C7D1F1E832E000EB08F /* Main.storyboard in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - FDC99C861F1E832E000EB08F /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXShellScriptBuildPhase section */ - 29B2A5322E23310EC5D6B2DD /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputFileListPaths = ( - ); - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-TestClientAppTests-checkManifestLockResult.txt", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; - }; - 49D4BFD3E4300757B94A1108 /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputFileListPaths = ( - ); - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-TestClientApp-checkManifestLockResult.txt", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; - }; - 963B093FCC81F62B36EB9CB5 /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-TestClientApp/Pods-TestClientApp-frameworks.sh", - "${BUILT_PRODUCTS_DIR}/Alamofire/Alamofire.framework", - "${BUILT_PRODUCTS_DIR}/TestClient/TestClient.framework", - ); - name = "[CP] Embed Pods Frameworks"; - outputPaths = ( - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Alamofire.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/TestClient.framework", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-TestClientApp/Pods-TestClientApp-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - FDC99C701F1E832D000EB08F /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - FDC99C7A1F1E832E000EB08F /* ViewController.swift in Sources */, - FDC99C781F1E832E000EB08F /* AppDelegate.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - FDC99C841F1E832E000EB08F /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - FDC99C8D1F1E832E000EB08F /* TestClientAppTests.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - FDC99C8A1F1E832E000EB08F /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = FDC99C731F1E832D000EB08F /* TestClientApp */; - targetProxy = FDC99C891F1E832E000EB08F /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin PBXVariantGroup section */ - FDC99C7B1F1E832E000EB08F /* Main.storyboard */ = { - isa = PBXVariantGroup; - children = ( - FDC99C7C1F1E832E000EB08F /* Base */, - ); - name = Main.storyboard; - sourceTree = ""; - }; - FDC99C801F1E832E000EB08F /* LaunchScreen.storyboard */ = { - isa = PBXVariantGroup; - children = ( - FDC99C811F1E832E000EB08F /* Base */, - ); - name = LaunchScreen.storyboard; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - -/* Begin XCBuildConfiguration section */ - FDC99C8F1F1E832E000EB08F /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGN_IDENTITY = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 11.0; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = iphoneos; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - }; - name = Debug; - }; - FDC99C901F1E832E000EB08F /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGN_IDENTITY = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 11.0; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - FDC99C921F1E832E000EB08F /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = F7DC1AA685120D6BF86B80A5 /* Pods-TestClientApp.debug.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - DEVELOPMENT_TEAM = 82A2S5FGTA; - INFOPLIST_FILE = TestClientApp/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = org.swagger.TestClientApp; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.0; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Debug; - }; - FDC99C931F1E832E000EB08F /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = FD4690FD2BC8291E69C8FD40 /* Pods-TestClientApp.release.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - DEVELOPMENT_TEAM = 82A2S5FGTA; - INFOPLIST_FILE = TestClientApp/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = org.swagger.TestClientApp; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.0; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Release; - }; - FDC99C951F1E832E000EB08F /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 6DB31B4AAB586D1D0C5D8EA5 /* Pods-TestClientAppTests.debug.xcconfig */; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; - BUNDLE_LOADER = "$(TEST_HOST)"; - DEVELOPMENT_TEAM = 82A2S5FGTA; - INFOPLIST_FILE = TestClientAppTests/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = org.swagger.TestClientAppTests; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.0; - TARGETED_DEVICE_FAMILY = "1,2"; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/TestClientApp.app/TestClientApp"; - }; - name = Debug; - }; - FDC99C961F1E832E000EB08F /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 3DE372F32029703A6CED4209 /* Pods-TestClientAppTests.release.xcconfig */; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; - BUNDLE_LOADER = "$(TEST_HOST)"; - DEVELOPMENT_TEAM = 82A2S5FGTA; - INFOPLIST_FILE = TestClientAppTests/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = org.swagger.TestClientAppTests; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.0; - TARGETED_DEVICE_FAMILY = "1,2"; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/TestClientApp.app/TestClientApp"; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - FDC99C6F1F1E832D000EB08F /* Build configuration list for PBXProject "TestClientApp" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - FDC99C8F1F1E832E000EB08F /* Debug */, - FDC99C901F1E832E000EB08F /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - FDC99C911F1E832E000EB08F /* Build configuration list for PBXNativeTarget "TestClientApp" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - FDC99C921F1E832E000EB08F /* Debug */, - FDC99C931F1E832E000EB08F /* Release */, - ); - defaultConfigurationIsVisible = 0; - }; - FDC99C941F1E832E000EB08F /* Build configuration list for PBXNativeTarget "TestClientAppTests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - FDC99C951F1E832E000EB08F /* Debug */, - FDC99C961F1E832E000EB08F /* Release */, - ); - defaultConfigurationIsVisible = 0; - }; -/* End XCConfigurationList section */ - }; - rootObject = FDC99C6C1F1E832D000EB08F /* Project object */; -} diff --git a/samples/client/test/swift4/default/TestClientApp/TestClientApp.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/samples/client/test/swift4/default/TestClientApp/TestClientApp.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 8a25971ab6b7..000000000000 --- a/samples/client/test/swift4/default/TestClientApp/TestClientApp.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/samples/client/test/swift4/default/TestClientApp/TestClientApp.xcworkspace/contents.xcworkspacedata b/samples/client/test/swift4/default/TestClientApp/TestClientApp.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index ad74fb61eb23..000000000000 --- a/samples/client/test/swift4/default/TestClientApp/TestClientApp.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - diff --git a/samples/client/test/swift4/default/TestClientApp/TestClientApp.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/samples/client/test/swift4/default/TestClientApp/TestClientApp.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d981003d68..000000000000 --- a/samples/client/test/swift4/default/TestClientApp/TestClientApp.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/samples/client/test/swift4/default/TestClientApp/TestClientApp/AppDelegate.swift b/samples/client/test/swift4/default/TestClientApp/TestClientApp/AppDelegate.swift deleted file mode 100644 index f8a7b948d85c..000000000000 --- a/samples/client/test/swift4/default/TestClientApp/TestClientApp/AppDelegate.swift +++ /dev/null @@ -1,43 +0,0 @@ -// -// AppDelegate.swift -// TestClientApp -// -// Created by Eric Hyche on 7/18/17. -// Copyright © 2017 Swagger Codegen. All rights reserved. -// - -import UIKit - -@UIApplicationMain -class AppDelegate: UIResponder, UIApplicationDelegate { - - var window: UIWindow? - - func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { - // Override point for customization after application launch. - return true - } - - func applicationWillResignActive(_ application: UIApplication) { - // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. - // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. - } - - func applicationDidEnterBackground(_ application: UIApplication) { - // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. - // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. - } - - func applicationWillEnterForeground(_ application: UIApplication) { - // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. - } - - func applicationDidBecomeActive(_ application: UIApplication) { - // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. - } - - func applicationWillTerminate(_ application: UIApplication) { - // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. - } - -} diff --git a/samples/client/test/swift4/default/TestClientApp/TestClientApp/Assets.xcassets/AppIcon.appiconset/Contents.json b/samples/client/test/swift4/default/TestClientApp/TestClientApp/Assets.xcassets/AppIcon.appiconset/Contents.json deleted file mode 100644 index 1d060ed28827..000000000000 --- a/samples/client/test/swift4/default/TestClientApp/TestClientApp/Assets.xcassets/AppIcon.appiconset/Contents.json +++ /dev/null @@ -1,93 +0,0 @@ -{ - "images" : [ - { - "idiom" : "iphone", - "size" : "20x20", - "scale" : "2x" - }, - { - "idiom" : "iphone", - "size" : "20x20", - "scale" : "3x" - }, - { - "idiom" : "iphone", - "size" : "29x29", - "scale" : "2x" - }, - { - "idiom" : "iphone", - "size" : "29x29", - "scale" : "3x" - }, - { - "idiom" : "iphone", - "size" : "40x40", - "scale" : "2x" - }, - { - "idiom" : "iphone", - "size" : "40x40", - "scale" : "3x" - }, - { - "idiom" : "iphone", - "size" : "60x60", - "scale" : "2x" - }, - { - "idiom" : "iphone", - "size" : "60x60", - "scale" : "3x" - }, - { - "idiom" : "ipad", - "size" : "20x20", - "scale" : "1x" - }, - { - "idiom" : "ipad", - "size" : "20x20", - "scale" : "2x" - }, - { - "idiom" : "ipad", - "size" : "29x29", - "scale" : "1x" - }, - { - "idiom" : "ipad", - "size" : "29x29", - "scale" : "2x" - }, - { - "idiom" : "ipad", - "size" : "40x40", - "scale" : "1x" - }, - { - "idiom" : "ipad", - "size" : "40x40", - "scale" : "2x" - }, - { - "idiom" : "ipad", - "size" : "76x76", - "scale" : "1x" - }, - { - "idiom" : "ipad", - "size" : "76x76", - "scale" : "2x" - }, - { - "idiom" : "ipad", - "size" : "83.5x83.5", - "scale" : "2x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/samples/client/test/swift4/default/TestClientApp/TestClientApp/Base.lproj/LaunchScreen.storyboard b/samples/client/test/swift4/default/TestClientApp/TestClientApp/Base.lproj/LaunchScreen.storyboard deleted file mode 100644 index 5654142a8abc..000000000000 --- a/samples/client/test/swift4/default/TestClientApp/TestClientApp/Base.lproj/LaunchScreen.storyboard +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/samples/client/test/swift4/default/TestClientApp/TestClientApp/Base.lproj/Main.storyboard b/samples/client/test/swift4/default/TestClientApp/TestClientApp/Base.lproj/Main.storyboard deleted file mode 100644 index 7ef2ecfcfd93..000000000000 --- a/samples/client/test/swift4/default/TestClientApp/TestClientApp/Base.lproj/Main.storyboard +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/samples/client/test/swift4/default/TestClientApp/TestClientApp/Info.plist b/samples/client/test/swift4/default/TestClientApp/TestClientApp/Info.plist deleted file mode 100644 index 16be3b681122..000000000000 --- a/samples/client/test/swift4/default/TestClientApp/TestClientApp/Info.plist +++ /dev/null @@ -1,45 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - APPL - CFBundleShortVersionString - 1.0 - CFBundleVersion - 1 - LSRequiresIPhoneOS - - UILaunchStoryboardName - LaunchScreen - UIMainStoryboardFile - Main - UIRequiredDeviceCapabilities - - armv7 - - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UISupportedInterfaceOrientations~ipad - - UIInterfaceOrientationPortrait - UIInterfaceOrientationPortraitUpsideDown - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - - diff --git a/samples/client/test/swift4/default/TestClientApp/TestClientApp/ViewController.swift b/samples/client/test/swift4/default/TestClientApp/TestClientApp/ViewController.swift deleted file mode 100644 index a5f289c421f1..000000000000 --- a/samples/client/test/swift4/default/TestClientApp/TestClientApp/ViewController.swift +++ /dev/null @@ -1,23 +0,0 @@ -// -// ViewController.swift -// TestClientApp -// -// Created by Eric Hyche on 7/18/17. -// Copyright © 2017 Swagger Codegen. All rights reserved. -// - -import UIKit - -class ViewController: UIViewController { - - override func viewDidLoad() { - super.viewDidLoad() - // Do any additional setup after loading the view, typically from a nib. - } - - override func didReceiveMemoryWarning() { - super.didReceiveMemoryWarning() - // Dispose of any resources that can be recreated. - } - -} diff --git a/samples/client/test/swift4/default/TestClientApp/TestClientAppTests/Info.plist b/samples/client/test/swift4/default/TestClientApp/TestClientAppTests/Info.plist deleted file mode 100644 index 6c40a6cd0c4a..000000000000 --- a/samples/client/test/swift4/default/TestClientApp/TestClientAppTests/Info.plist +++ /dev/null @@ -1,22 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - BNDL - CFBundleShortVersionString - 1.0 - CFBundleVersion - 1 - - diff --git a/samples/client/test/swift4/default/TestClientApp/TestClientAppTests/TestClientAppTests.swift b/samples/client/test/swift4/default/TestClientApp/TestClientAppTests/TestClientAppTests.swift deleted file mode 100644 index 7a33147fbf2e..000000000000 --- a/samples/client/test/swift4/default/TestClientApp/TestClientAppTests/TestClientAppTests.swift +++ /dev/null @@ -1,41 +0,0 @@ -// -// TestClientAppTests.swift -// TestClientAppTests -// -// Created by Eric Hyche on 7/18/17. -// Copyright © 2017 Swagger Codegen. All rights reserved. -// - -import XCTest -import TestClient -@testable import TestClientApp - -class TestClientAppTests: XCTestCase { - - func testWhenVariableNameIsDifferentFromPropertyName() { - // This tests to make sure that the swift4 language can handle when - // we have property names which map to variable names that are not the same. - // This can happen when we have things like snake_case property names, - // or when we have property names which may be Swift 4 reserved words. - let jsonData = """ - { - "example_name": "Test example name", - "for": "Some reason", - "normalName": "Some normal name value" - } - """.data(using: .utf8)! - - let decodedResult = CodableHelper.decode(VariableNameTest.self, from: jsonData) - - XCTAssertNil(decodedResult.error, "Got an error decoding VariableNameTest, error=\(String(describing: decodedResult.error))") - - guard let variableNameTest = decodedResult.decodableObj else { - XCTFail("Did not get an VariableNameTest decoded object") - return - } - - XCTAssertTrue(variableNameTest.exampleName == "Test example name", "Did not decode snake_case property correctly.") - XCTAssertTrue(variableNameTest._for == "Some reason", "Did not decode property name that is a reserved word correctly.") - } - -} diff --git a/samples/client/test/swift4/default/TestClientApp/pom.xml b/samples/client/test/swift4/default/TestClientApp/pom.xml deleted file mode 100644 index fdb3db1495bb..000000000000 --- a/samples/client/test/swift4/default/TestClientApp/pom.xml +++ /dev/null @@ -1,43 +0,0 @@ - - 4.0.0 - io.swagger - Swift4TestClientTests - pom - 1.0-SNAPSHOT - Swift4 Swagger Test Schema Client - - - - maven-dependency-plugin - - - package - - copy-dependencies - - - ${project.build.directory} - - - - - - org.codehaus.mojo - exec-maven-plugin - 1.2.1 - - - xcodebuild-test - integration-test - - exec - - - ./run_xcodebuild.sh - - - - - - - diff --git a/samples/client/test/swift4/default/TestClientApp/run_xcodebuild.sh b/samples/client/test/swift4/default/TestClientApp/run_xcodebuild.sh deleted file mode 100755 index 060ec332217e..000000000000 --- a/samples/client/test/swift4/default/TestClientApp/run_xcodebuild.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh - -pod install - -xcodebuild clean build build-for-testing -workspace "TestClientApp.xcworkspace" -scheme "TestClientApp" -destination "platform=iOS Simulator,name=iPhone 11 Pro Max,OS=latest" && xcodebuild test-without-building -workspace "TestClientApp.xcworkspace" -scheme "TestClientAppTests" -destination "platform=iOS Simulator,name=iPhone 11 Pro Max,OS=latest" | xcpretty && exit ${PIPESTATUS[0]} diff --git a/samples/client/test/swift4/default/docs/AllPrimitives.md b/samples/client/test/swift4/default/docs/AllPrimitives.md deleted file mode 100644 index 1cfa94eaf73b..000000000000 --- a/samples/client/test/swift4/default/docs/AllPrimitives.md +++ /dev/null @@ -1,34 +0,0 @@ -# AllPrimitives - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**myInteger** | **Int** | | [optional] -**myIntegerArray** | **[Int]** | | [optional] -**myLong** | **Int64** | | [optional] -**myLongArray** | **[Int64]** | | [optional] -**myFloat** | **Float** | | [optional] -**myFloatArray** | **[Float]** | | [optional] -**myDouble** | **Double** | | [optional] -**myDoubleArray** | **[Double]** | | [optional] -**myString** | **String** | | [optional] -**myStringArray** | **[String]** | | [optional] -**myBytes** | **Data** | | [optional] -**myBytesArray** | **[Data]** | | [optional] -**myBoolean** | **Bool** | | [optional] -**myBooleanArray** | **[Bool]** | | [optional] -**myDate** | **Date** | | [optional] -**myDateArray** | **[Date]** | | [optional] -**myDateTime** | **Date** | | [optional] -**myDateTimeArray** | **[Date]** | | [optional] -**myFile** | **URL** | | [optional] -**myFileArray** | **[URL]** | | [optional] -**myUUID** | **UUID** | | [optional] -**myUUIDArray** | **[UUID]** | | [optional] -**myStringEnum** | [**StringEnum**](StringEnum.md) | | [optional] -**myStringEnumArray** | [StringEnum] | | [optional] -**myInlineStringEnum** | **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/test/swift4/default/docs/BaseCard.md b/samples/client/test/swift4/default/docs/BaseCard.md deleted file mode 100644 index 42d41b7db138..000000000000 --- a/samples/client/test/swift4/default/docs/BaseCard.md +++ /dev/null @@ -1,10 +0,0 @@ -# BaseCard - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**cardType** | **String** | | - -[[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/test/swift4/default/docs/ErrorInfo.md b/samples/client/test/swift4/default/docs/ErrorInfo.md deleted file mode 100644 index 5cc21d73ae18..000000000000 --- a/samples/client/test/swift4/default/docs/ErrorInfo.md +++ /dev/null @@ -1,12 +0,0 @@ -# ErrorInfo - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**code** | **Int** | | [optional] -**message** | **String** | | [optional] -**details** | **[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/test/swift4/default/docs/GetAllModelsResult.md b/samples/client/test/swift4/default/docs/GetAllModelsResult.md deleted file mode 100644 index 4de449547ae1..000000000000 --- a/samples/client/test/swift4/default/docs/GetAllModelsResult.md +++ /dev/null @@ -1,12 +0,0 @@ -# GetAllModelsResult - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**myPrimitiveArray** | [AllPrimitives] | | [optional] -**myPrimitive** | [**AllPrimitives**](AllPrimitives.md) | | [optional] -**myVariableNameTest** | [**VariableNameTest**](VariableNameTest.md) | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/samples/client/test/swift4/default/docs/ModelDoubleArray.md b/samples/client/test/swift4/default/docs/ModelDoubleArray.md deleted file mode 100644 index 46a1e87a9ce2..000000000000 --- a/samples/client/test/swift4/default/docs/ModelDoubleArray.md +++ /dev/null @@ -1,9 +0,0 @@ -# ModelDoubleArray - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/samples/client/test/swift4/default/docs/ModelErrorInfoArray.md b/samples/client/test/swift4/default/docs/ModelErrorInfoArray.md deleted file mode 100644 index 666ca4ccc0ed..000000000000 --- a/samples/client/test/swift4/default/docs/ModelErrorInfoArray.md +++ /dev/null @@ -1,9 +0,0 @@ -# ModelErrorInfoArray - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/samples/client/test/swift4/default/docs/ModelStringArray.md b/samples/client/test/swift4/default/docs/ModelStringArray.md deleted file mode 100644 index a84e8f1d4bb5..000000000000 --- a/samples/client/test/swift4/default/docs/ModelStringArray.md +++ /dev/null @@ -1,9 +0,0 @@ -# ModelStringArray - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/samples/client/test/swift4/default/docs/ModelWithIntAdditionalPropertiesOnly.md b/samples/client/test/swift4/default/docs/ModelWithIntAdditionalPropertiesOnly.md deleted file mode 100644 index 209683e4fdf0..000000000000 --- a/samples/client/test/swift4/default/docs/ModelWithIntAdditionalPropertiesOnly.md +++ /dev/null @@ -1,9 +0,0 @@ -# ModelWithIntAdditionalPropertiesOnly - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/samples/client/test/swift4/default/docs/ModelWithPropertiesAndAdditionalProperties.md b/samples/client/test/swift4/default/docs/ModelWithPropertiesAndAdditionalProperties.md deleted file mode 100644 index 098c03d68827..000000000000 --- a/samples/client/test/swift4/default/docs/ModelWithPropertiesAndAdditionalProperties.md +++ /dev/null @@ -1,17 +0,0 @@ -# ModelWithPropertiesAndAdditionalProperties - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**myIntegerReq** | **Int** | | -**myIntegerOpt** | **Int** | | [optional] -**myPrimitiveReq** | [**AllPrimitives**](AllPrimitives.md) | | -**myPrimitiveOpt** | [**AllPrimitives**](AllPrimitives.md) | | [optional] -**myStringArrayReq** | **[String]** | | -**myStringArrayOpt** | **[String]** | | [optional] -**myPrimitiveArrayReq** | [AllPrimitives] | | -**myPrimitiveArrayOpt** | [AllPrimitives] | | [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/test/swift4/default/docs/ModelWithStringAdditionalPropertiesOnly.md b/samples/client/test/swift4/default/docs/ModelWithStringAdditionalPropertiesOnly.md deleted file mode 100644 index ca910111612d..000000000000 --- a/samples/client/test/swift4/default/docs/ModelWithStringAdditionalPropertiesOnly.md +++ /dev/null @@ -1,9 +0,0 @@ -# ModelWithStringAdditionalPropertiesOnly - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/samples/client/test/swift4/default/docs/PersonCard.md b/samples/client/test/swift4/default/docs/PersonCard.md deleted file mode 100644 index 385299f87686..000000000000 --- a/samples/client/test/swift4/default/docs/PersonCard.md +++ /dev/null @@ -1,11 +0,0 @@ -# PersonCard - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**firstName** | **String** | | [optional] -**lastName** | **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/test/swift4/default/docs/PersonCardAllOf.md b/samples/client/test/swift4/default/docs/PersonCardAllOf.md deleted file mode 100644 index e4b78f76c9eb..000000000000 --- a/samples/client/test/swift4/default/docs/PersonCardAllOf.md +++ /dev/null @@ -1,11 +0,0 @@ -# PersonCardAllOf - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**firstName** | **String** | | [optional] -**lastName** | **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/test/swift4/default/docs/PlaceCard.md b/samples/client/test/swift4/default/docs/PlaceCard.md deleted file mode 100644 index 87002357ce02..000000000000 --- a/samples/client/test/swift4/default/docs/PlaceCard.md +++ /dev/null @@ -1,11 +0,0 @@ -# PlaceCard - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**placeName** | **String** | | [optional] -**placeAddress** | **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/test/swift4/default/docs/PlaceCardAllOf.md b/samples/client/test/swift4/default/docs/PlaceCardAllOf.md deleted file mode 100644 index 5ed8d8a4d0e9..000000000000 --- a/samples/client/test/swift4/default/docs/PlaceCardAllOf.md +++ /dev/null @@ -1,11 +0,0 @@ -# PlaceCardAllOf - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**placeName** | **String** | | [optional] -**placeAddress** | **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/test/swift4/default/docs/SampleBase.md b/samples/client/test/swift4/default/docs/SampleBase.md deleted file mode 100644 index a7c7ac9722db..000000000000 --- a/samples/client/test/swift4/default/docs/SampleBase.md +++ /dev/null @@ -1,11 +0,0 @@ -# SampleBase - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**baseClassStringProp** | **String** | | [optional] -**baseClassIntegerProp** | **Int** | | [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/test/swift4/default/docs/SampleSubClass.md b/samples/client/test/swift4/default/docs/SampleSubClass.md deleted file mode 100644 index 435633ccde1c..000000000000 --- a/samples/client/test/swift4/default/docs/SampleSubClass.md +++ /dev/null @@ -1,13 +0,0 @@ -# SampleSubClass - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**baseClassStringProp** | **String** | | [optional] -**baseClassIntegerProp** | **Int** | | [optional] -**subClassStringProp** | **String** | | [optional] -**subClassIntegerProp** | **Int** | | [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/test/swift4/default/docs/SampleSubClassAllOf.md b/samples/client/test/swift4/default/docs/SampleSubClassAllOf.md deleted file mode 100644 index 50a64944e82b..000000000000 --- a/samples/client/test/swift4/default/docs/SampleSubClassAllOf.md +++ /dev/null @@ -1,11 +0,0 @@ -# SampleSubClassAllOf - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**subClassStringProp** | **String** | | [optional] -**subClassIntegerProp** | **Int** | | [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/test/swift4/default/docs/StringEnum.md b/samples/client/test/swift4/default/docs/StringEnum.md deleted file mode 100644 index b0009f7e8269..000000000000 --- a/samples/client/test/swift4/default/docs/StringEnum.md +++ /dev/null @@ -1,9 +0,0 @@ -# StringEnum - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/samples/client/test/swift4/default/docs/Swift4TestAPI.md b/samples/client/test/swift4/default/docs/Swift4TestAPI.md deleted file mode 100644 index b6ea64ba2526..000000000000 --- a/samples/client/test/swift4/default/docs/Swift4TestAPI.md +++ /dev/null @@ -1,59 +0,0 @@ -# Swift4TestAPI - -All URIs are relative to *http://api.example.com/basePath* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**getAllModels**](Swift4TestAPI.md#getallmodels) | **GET** /allModels | Get all of the models - - -# **getAllModels** -```swift - open class func getAllModels(clientId: String, completion: @escaping (_ data: GetAllModelsResult?, _ error: Error?) -> Void) -``` - -Get all of the models - -This endpoint tests get a dictionary which contains examples of all of the models. - -### Example -```swift -// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new -import TestClient - -let clientId = "clientId_example" // String | id that represent the Api client - -// Get all of the models -Swift4TestAPI.getAllModels(clientId: clientId) { (response, error) in - guard error == nil else { - print(error) - return - } - - if (response) { - dump(response) - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **clientId** | **String** | id that represent the Api client | - -### Return type - -[**GetAllModelsResult**](GetAllModelsResult.md) - -### Authorization - -No authorization required - -### 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) - diff --git a/samples/client/test/swift4/default/docs/VariableNameTest.md b/samples/client/test/swift4/default/docs/VariableNameTest.md deleted file mode 100644 index d5369e75f1b3..000000000000 --- a/samples/client/test/swift4/default/docs/VariableNameTest.md +++ /dev/null @@ -1,12 +0,0 @@ -# VariableNameTest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**exampleName** | **String** | This snake-case examle_name property name should be converted to a camelCase variable name like exampleName | [optional] -**_for** | **String** | This property name is a reserved word in most languages, including Swift 4. | [optional] -**normalName** | **String** | This model object property name should be unchanged from the JSON property name. | [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/test/swift4/default/git_push.sh b/samples/client/test/swift4/default/git_push.sh deleted file mode 100644 index ced3be2b0c7b..000000000000 --- a/samples/client/test/swift4/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/test/swift4/default/pom.xml b/samples/client/test/swift4/default/pom.xml deleted file mode 100644 index 5caba9cb4633..000000000000 --- a/samples/client/test/swift4/default/pom.xml +++ /dev/null @@ -1,43 +0,0 @@ - - 4.0.0 - io.swagger - Swift4PetstoreClientTests - pom - 1.0-SNAPSHOT - Swift4 Swagger Petstore Client - - - - maven-dependency-plugin - - - package - - copy-dependencies - - - ${project.build.directory} - - - - - - org.codehaus.mojo - exec-maven-plugin - 1.2.1 - - - xcodebuild-test - integration-test - - exec - - - ./run_spmbuild.sh - - - - - - - diff --git a/samples/client/test/swift4/default/project.yml b/samples/client/test/swift4/default/project.yml deleted file mode 100644 index 6fe83fbc9dae..000000000000 --- a/samples/client/test/swift4/default/project.yml +++ /dev/null @@ -1,15 +0,0 @@ -name: TestClient -targets: - TestClient: - type: framework - platform: iOS - deploymentTarget: "10.0" - sources: [TestClient] - info: - path: ./Info.plist - version: 1.0 - settings: - APPLICATION_EXTENSION_API_ONLY: true - scheme: {} - dependencies: - - carthage: Alamofire diff --git a/samples/client/test/swift4/default/run_spmbuild.sh b/samples/client/test/swift4/default/run_spmbuild.sh deleted file mode 100755 index 1a9f585ad054..000000000000 --- a/samples/client/test/swift4/default/run_spmbuild.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -swift build && exit ${PIPESTATUS[0]} diff --git a/samples/client/test/swift4/swift4_test_all.sh b/samples/client/test/swift4/swift4_test_all.sh deleted file mode 100755 index dcb30d887c91..000000000000 --- a/samples/client/test/swift4/swift4_test_all.sh +++ /dev/null @@ -1,11 +0,0 @@ -#/bin/bash - -set -e - -DIRECTORY=`dirname $0` - -# example project with unit tests -mvn -f $DIRECTORY/default/TestClientApp/pom.xml integration-test - -# spm build -mvn -f $DIRECTORY/default/pom.xml integration-test diff --git a/samples/documentation/petstore/plantuml/schemas.plantuml b/samples/documentation/petstore/plantuml/schemas.plantuml index f4d1ddf5e7de..479f8f16ff79 100644 --- a/samples/documentation/petstore/plantuml/schemas.plantuml +++ b/samples/documentation/petstore/plantuml/schemas.plantuml @@ -13,6 +13,16 @@ entity Category { name: String } +entity InlineObject { + name: String + status: String +} + +entity InlineObject1 { + additionalMetadata: String + file: File +} + entity Order { id: Long petId: Long diff --git a/samples/openapi3/client/petstore/scala-sttp/README.md b/samples/openapi3/client/petstore/scala-sttp/README.md index c745a7ecee88..891ebf40fc01 100644 --- a/samples/openapi3/client/petstore/scala-sttp/README.md +++ b/samples/openapi3/client/petstore/scala-sttp/README.md @@ -108,12 +108,6 @@ Authentication schemes defined for the API: - **API key parameter name**: api_key - **Location**: HTTP header -### auth_cookie - -- **Type**: API key -- **API key parameter name**: AUTH_KEY -- **Location**: - ## Author 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 index 7b7df3b8e149..34679dea5d7a 100644 --- 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 @@ -34,7 +34,7 @@ class UserApi(baseUrl: String)(implicit serializer: SttpSerializer) { * code 0 : (successful operation) * * Available security schemes: - * auth_cookie (apiKey) + * api_key (apiKey) * * @param user Created user object */ @@ -42,7 +42,7 @@ class UserApi(baseUrl: String)(implicit serializer: SttpSerializer) { basicRequest .method(Method.POST, uri"$baseUrl/user") .contentType("application/json") - .cookie("AUTH_KEY", apiKey.value) + .header("api_key", apiKey.value) .body(user) .response(asJson[Unit]) @@ -51,7 +51,7 @@ class UserApi(baseUrl: String)(implicit serializer: SttpSerializer) { * code 0 : (successful operation) * * Available security schemes: - * auth_cookie (apiKey) + * api_key (apiKey) * * @param user List of user object */ @@ -59,7 +59,7 @@ class UserApi(baseUrl: String)(implicit serializer: SttpSerializer) { basicRequest .method(Method.POST, uri"$baseUrl/user/createWithArray") .contentType("application/json") - .cookie("AUTH_KEY", apiKey.value) + .header("api_key", apiKey.value) .body(user) .response(asJson[Unit]) @@ -68,7 +68,7 @@ class UserApi(baseUrl: String)(implicit serializer: SttpSerializer) { * code 0 : (successful operation) * * Available security schemes: - * auth_cookie (apiKey) + * api_key (apiKey) * * @param user List of user object */ @@ -76,7 +76,7 @@ class UserApi(baseUrl: String)(implicit serializer: SttpSerializer) { basicRequest .method(Method.POST, uri"$baseUrl/user/createWithList") .contentType("application/json") - .cookie("AUTH_KEY", apiKey.value) + .header("api_key", apiKey.value) .body(user) .response(asJson[Unit]) @@ -88,7 +88,7 @@ class UserApi(baseUrl: String)(implicit serializer: SttpSerializer) { * code 404 : (User not found) * * Available security schemes: - * auth_cookie (apiKey) + * api_key (apiKey) * * @param username The name that needs to be deleted */ @@ -96,7 +96,7 @@ class UserApi(baseUrl: String)(implicit serializer: SttpSerializer) { basicRequest .method(Method.DELETE, uri"$baseUrl/user/${username}") .contentType("application/json") - .cookie("AUTH_KEY", apiKey.value) + .header("api_key", apiKey.value) .response(asJson[Unit]) /** @@ -117,7 +117,7 @@ class UserApi(baseUrl: String)(implicit serializer: SttpSerializer) { * Expected answers: * code 200 : String (successful operation) * Headers : - * Set-Cookie - Cookie authentication key for use with the `auth_cookie` apiKey authentication. + * 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) @@ -136,13 +136,13 @@ class UserApi(baseUrl: String)(implicit serializer: SttpSerializer) { * code 0 : (successful operation) * * Available security schemes: - * auth_cookie (apiKey) + * api_key (apiKey) */ def logoutUser()(implicit apiKey: ApiKeyValue): ApiRequestT[Unit] = basicRequest .method(Method.GET, uri"$baseUrl/user/logout") .contentType("application/json") - .cookie("AUTH_KEY", apiKey.value) + .header("api_key", apiKey.value) .response(asJson[Unit]) /** @@ -153,7 +153,7 @@ class UserApi(baseUrl: String)(implicit serializer: SttpSerializer) { * code 404 : (User not found) * * Available security schemes: - * auth_cookie (apiKey) + * api_key (apiKey) * * @param username name that need to be deleted * @param user Updated user object @@ -162,7 +162,7 @@ class UserApi(baseUrl: String)(implicit serializer: SttpSerializer) { basicRequest .method(Method.PUT, uri"$baseUrl/user/${username}") .contentType("application/json") - .cookie("AUTH_KEY", apiKey.value) + .header("api_key", apiKey.value) .body(user) .response(asJson[Unit]) diff --git a/samples/server/petstore/erlang-server/.openapi-generator/VERSION b/samples/server/petstore/erlang-server/.openapi-generator/VERSION new file mode 100644 index 000000000000..d99e7162d01f --- /dev/null +++ b/samples/server/petstore/erlang-server/.openapi-generator/VERSION @@ -0,0 +1 @@ +5.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/erlang-server/priv/openapi.json b/samples/server/petstore/erlang-server/priv/openapi.json index c72a9d39daa2..4be6ecab7079 100644 --- a/samples/server/petstore/erlang-server/priv/openapi.json +++ b/samples/server/petstore/erlang-server/priv/openapi.json @@ -1,5 +1,5 @@ { - "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.", "license" : { @@ -9,6 +9,10 @@ "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" } ], @@ -27,24 +31,25 @@ "post" : { "operationId" : "addPet", "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Pet" + "$ref" : "#/components/requestBodies/Pet" + }, + "responses" : { + "200" : { + "content" : { + "application/xml" : { + "schema" : { + "$ref" : "#/components/schemas/Pet" + } + }, + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Pet" + } } }, - "application/xml" : { - "schema" : { - "$ref" : "#/components/schemas/Pet" - } - } + "description" : "successful operation" }, - "description" : "Pet object that needs to be added to the store", - "required" : true - }, - "responses" : { "405" : { - "content" : { }, "description" : "Invalid input" } }, @@ -52,38 +57,36 @@ "petstore_auth" : [ "write:pets", "read:pets" ] } ], "summary" : "Add a new pet to the store", - "tags" : [ "pet" ], - "x-codegen-request-body-name" : "body" + "tags" : [ "pet" ] }, "put" : { "operationId" : "updatePet", "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Pet" + "$ref" : "#/components/requestBodies/Pet" + }, + "responses" : { + "200" : { + "content" : { + "application/xml" : { + "schema" : { + "$ref" : "#/components/schemas/Pet" + } + }, + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Pet" + } } }, - "application/xml" : { - "schema" : { - "$ref" : "#/components/schemas/Pet" - } - } + "description" : "successful operation" }, - "description" : "Pet object that needs to be added to the store", - "required" : true - }, - "responses" : { "400" : { - "content" : { }, "description" : "Invalid ID supplied" }, "404" : { - "content" : { }, "description" : "Pet not found" }, "405" : { - "content" : { }, "description" : "Validation exception" } }, @@ -91,8 +94,7 @@ "petstore_auth" : [ "write:pets", "read:pets" ] } ], "summary" : "Update an existing pet", - "tags" : [ "pet" ], - "x-codegen-request-body-name" : "body" + "tags" : [ "pet" ] } }, "/pet/findByStatus" : { @@ -138,12 +140,11 @@ "description" : "successful operation" }, "400" : { - "content" : { }, "description" : "Invalid status value" } }, "security" : [ { - "petstore_auth" : [ "write:pets", "read:pets" ] + "petstore_auth" : [ "read:pets" ] } ], "summary" : "Finds Pets by status", "tags" : [ "pet" ] @@ -191,12 +192,11 @@ "description" : "successful operation" }, "400" : { - "content" : { }, "description" : "Invalid tag value" } }, "security" : [ { - "petstore_auth" : [ "write:pets", "read:pets" ] + "petstore_auth" : [ "read:pets" ] } ], "summary" : "Finds Pets by tags", "tags" : [ "pet" ] @@ -206,24 +206,28 @@ "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" : { - "content" : { }, "description" : "Invalid pet value" } }, @@ -238,13 +242,15 @@ "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" : { @@ -263,11 +269,9 @@ "description" : "successful operation" }, "400" : { - "content" : { }, "description" : "Invalid ID supplied" }, "404" : { - "content" : { }, "description" : "Pet not found" } }, @@ -281,15 +285,18 @@ "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" : { @@ -302,14 +309,14 @@ "description" : "Updated status of the pet", "type" : "string" } - } + }, + "type" : "object" } } } }, "responses" : { "405" : { - "content" : { }, "description" : "Invalid input" } }, @@ -325,15 +332,18 @@ "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" : { @@ -347,7 +357,8 @@ "format" : "binary", "type" : "string" } - } + }, + "type" : "object" } } } @@ -403,7 +414,7 @@ "operationId" : "placeOrder", "requestBody" : { "content" : { - "*/*" : { + "application/json" : { "schema" : { "$ref" : "#/components/schemas/Order" } @@ -429,13 +440,11 @@ "description" : "successful operation" }, "400" : { - "content" : { }, "description" : "Invalid Order" } }, "summary" : "Place an order for a pet", - "tags" : [ "store" ], - "x-codegen-request-body-name" : "body" + "tags" : [ "store" ] } }, "/store/order/{orderId}" : { @@ -444,20 +453,20 @@ "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" } }, @@ -469,6 +478,7 @@ "operationId" : "getOrderById", "parameters" : [ { "description" : "ID of pet that needs to be fetched", + "explode" : false, "in" : "path", "name" : "orderId", "required" : true, @@ -477,7 +487,8 @@ "maximum" : 5, "minimum" : 1, "type" : "integer" - } + }, + "style" : "simple" } ], "responses" : { "200" : { @@ -496,11 +507,9 @@ "description" : "successful operation" }, "400" : { - "content" : { }, "description" : "Invalid ID supplied" }, "404" : { - "content" : { }, "description" : "Order not found" } }, @@ -514,7 +523,7 @@ "operationId" : "createUser", "requestBody" : { "content" : { - "*/*" : { + "application/json" : { "schema" : { "$ref" : "#/components/schemas/User" } @@ -525,69 +534,50 @@ }, "responses" : { "default" : { - "content" : { }, "description" : "successful operation" } }, + "security" : [ { + "api_key" : [ ] + } ], "summary" : "Create user", - "tags" : [ "user" ], - "x-codegen-request-body-name" : "body" + "tags" : [ "user" ] } }, "/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" + "tags" : [ "user" ] } }, "/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" + "tags" : [ "user" ] } }, "/user/login" : { @@ -595,20 +585,25 @@ "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" : { @@ -626,24 +621,36 @@ }, "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" } }, @@ -656,10 +663,12 @@ "operationId" : "logoutUser", "responses" : { "default" : { - "content" : { }, "description" : "successful operation" } }, + "security" : [ { + "api_key" : [ ] + } ], "summary" : "Logs out current logged in user session", "tags" : [ "user" ] } @@ -670,23 +679,26 @@ "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" ] }, @@ -694,12 +706,14 @@ "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" : { @@ -718,11 +732,9 @@ "description" : "successful operation" }, "400" : { - "content" : { }, "description" : "Invalid username supplied" }, "404" : { - "content" : { }, "description" : "User not found" } }, @@ -734,16 +746,18 @@ "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" } @@ -754,21 +768,71 @@ }, "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" + "tags" : [ "user" ] } } }, "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", @@ -825,6 +889,7 @@ "type" : "integer" }, "name" : { + "pattern" : "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$", "type" : "string" } }, @@ -987,6 +1052,33 @@ }, "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" : { diff --git a/samples/server/petstore/erlang-server/src/openapi_api.erl b/samples/server/petstore/erlang-server/src/openapi_api.erl index ba4b3a0e7aff..a1a6fa220ec3 100644 --- a/samples/server/petstore/erlang-server/src/openapi_api.erl +++ b/samples/server/petstore/erlang-server/src/openapi_api.erl @@ -349,6 +349,7 @@ request_param_info('LoginUser', 'username') -> source => qs_val , rules => [ {type, 'binary'}, + {pattern, "/^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$/" }, required ] }; @@ -427,6 +428,8 @@ populate_request_param(OperationID, Name, Req0, ValidatorState) -> ) -> ok | no_return(). +validate_response('AddPet', 200, Body, ValidatorState) -> + validate_response_body('Pet', 'Pet', Body, ValidatorState); validate_response('AddPet', 405, Body, ValidatorState) -> validate_response_body('', '', Body, ValidatorState); @@ -450,6 +453,8 @@ validate_response('GetPetById', 400, Body, ValidatorState) -> validate_response('GetPetById', 404, Body, ValidatorState) -> validate_response_body('', '', Body, ValidatorState); +validate_response('UpdatePet', 200, Body, ValidatorState) -> + validate_response_body('Pet', 'Pet', Body, ValidatorState); validate_response('UpdatePet', 400, Body, ValidatorState) -> validate_response_body('', '', Body, ValidatorState); validate_response('UpdatePet', 404, Body, ValidatorState) -> diff --git a/samples/server/petstore/erlang-server/src/openapi_user_handler.erl b/samples/server/petstore/erlang-server/src/openapi_user_handler.erl index 6381a75aeb2a..4c71b5ebcfd0 100644 --- a/samples/server/petstore/erlang-server/src/openapi_user_handler.erl +++ b/samples/server/petstore/erlang-server/src/openapi_user_handler.erl @@ -119,6 +119,120 @@ allowed_methods(Req, State) -> Req :: cowboy_req:req(), State :: state() }. +is_authorized( + Req0, + State = #state{ + operation_id = 'CreateUser' = OperationID, + logic_handler = LogicHandler + } +) -> + From = header, + Result = openapi_auth:authorize_api_key( + LogicHandler, + OperationID, + From, + "api_key", + Req0 + ), + case Result of + {true, Context, Req} -> {true, Req, State#state{context = Context}}; + {false, AuthHeader, Req} -> {{false, AuthHeader}, Req, State} + end; +is_authorized( + Req0, + State = #state{ + operation_id = 'CreateUsersWithArrayInput' = OperationID, + logic_handler = LogicHandler + } +) -> + From = header, + Result = openapi_auth:authorize_api_key( + LogicHandler, + OperationID, + From, + "api_key", + Req0 + ), + case Result of + {true, Context, Req} -> {true, Req, State#state{context = Context}}; + {false, AuthHeader, Req} -> {{false, AuthHeader}, Req, State} + end; +is_authorized( + Req0, + State = #state{ + operation_id = 'CreateUsersWithListInput' = OperationID, + logic_handler = LogicHandler + } +) -> + From = header, + Result = openapi_auth:authorize_api_key( + LogicHandler, + OperationID, + From, + "api_key", + Req0 + ), + case Result of + {true, Context, Req} -> {true, Req, State#state{context = Context}}; + {false, AuthHeader, Req} -> {{false, AuthHeader}, Req, State} + end; +is_authorized( + Req0, + State = #state{ + operation_id = 'DeleteUser' = OperationID, + logic_handler = LogicHandler + } +) -> + From = header, + Result = openapi_auth:authorize_api_key( + LogicHandler, + OperationID, + From, + "api_key", + Req0 + ), + case Result of + {true, Context, Req} -> {true, Req, State#state{context = Context}}; + {false, AuthHeader, Req} -> {{false, AuthHeader}, Req, State} + end; +is_authorized( + Req0, + State = #state{ + operation_id = 'LogoutUser' = OperationID, + logic_handler = LogicHandler + } +) -> + From = header, + Result = openapi_auth:authorize_api_key( + LogicHandler, + OperationID, + From, + "api_key", + Req0 + ), + case Result of + {true, Context, Req} -> {true, Req, State#state{context = Context}}; + {false, AuthHeader, Req} -> {{false, AuthHeader}, Req, State} + end; +is_authorized( + Req0, + State = #state{ + operation_id = 'UpdateUser' = OperationID, + logic_handler = LogicHandler + } +) -> + From = header, + Result = openapi_auth:authorize_api_key( + LogicHandler, + OperationID, + From, + "api_key", + Req0 + ), + case Result of + {true, Context, Req} -> {true, Req, State#state{context = Context}}; + {false, AuthHeader, Req} -> {{false, AuthHeader}, Req, State} + end; is_authorized(Req, State) -> {true, Req, State}.